var a8 = (n, e) => () => (e || n((e = { exports: {} }).exports, e), e.exports);
var hse = a8((Ua) => {
  function A2(n, e) {
    for (var t = 0; t < e.length; t++) {
      const i = e[t];
      if (typeof i != "string" && !Array.isArray(i)) {
        for (const a in i)
          if (a !== "default" && !(a in n)) {
            const o = Object.getOwnPropertyDescriptor(i, a);
            o && Object.defineProperty(n, a, o.get ? o : {
              enumerable: !0,
              get: () => i[a]
            });
          }
      }
    }
    return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
  }
  var Ko = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
  function Cw(n) {
    return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
  }
  var VO = { exports: {} }, K1 = {}, HO = { exports: {} }, uE = { exports: {} };
  uE.exports;
  var yP;
  function s8() {
    return yP || (yP = 1, function(n, e) {
      var t = {};
      /**
       * @license React
       * react.development.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.
       */
      t.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 i = "18.2.0", a = Symbol.for("react.element"), o = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), _ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), k = Symbol.iterator, $ = "@@iterator";
        function B(F) {
          if (F === null || typeof F != "object")
            return null;
          var ne = k && F[k] || F[$];
          return typeof ne == "function" ? ne : null;
        }
        var V = {
          /**
           * @internal
           * @type {ReactComponent}
           */
          current: null
        }, z = {
          transition: null
        }, G = {
          current: null,
          // Used to reproduce behavior of `batchedUpdates` in legacy mode.
          isBatchingLegacy: !1,
          didScheduleLegacyUpdate: !1
        }, ie = {
          /**
           * @internal
           * @type {ReactComponent}
           */
          current: null
        }, ue = {}, Re = null;
        function Oe(F) {
          Re = F;
        }
        ue.setExtraStackFrame = function(F) {
          Re = F;
        }, ue.getCurrentStack = null, ue.getStackAddendum = function() {
          var F = "";
          Re && (F += Re);
          var ne = ue.getCurrentStack;
          return ne && (F += ne() || ""), F;
        };
        var $e = !1, Ee = !1, Fe = !1, Ne = !1, Q = !1, ae = {
          ReactCurrentDispatcher: V,
          ReactCurrentBatchConfig: z,
          ReactCurrentOwner: ie
        };
        ae.ReactDebugCurrentFrame = ue, ae.ReactCurrentActQueue = G;
        function le(F) {
          {
            for (var ne = arguments.length, Se = new Array(ne > 1 ? ne - 1 : 0), Te = 1; Te < ne; Te++)
              Se[Te - 1] = arguments[Te];
            Ae("warn", F, Se);
          }
        }
        function se(F) {
          {
            for (var ne = arguments.length, Se = new Array(ne > 1 ? ne - 1 : 0), Te = 1; Te < ne; Te++)
              Se[Te - 1] = arguments[Te];
            Ae("error", F, Se);
          }
        }
        function Ae(F, ne, Se) {
          {
            var Te = ae.ReactDebugCurrentFrame, tt = Te.getStackAddendum();
            tt !== "" && (ne += "%s", Se = Se.concat([tt]));
            var bt = Se.map(function(pt) {
              return String(pt);
            });
            bt.unshift("Warning: " + ne), Function.prototype.apply.call(console[F], console, bt);
          }
        }
        var q = {};
        function Z(F, ne) {
          {
            var Se = F.constructor, Te = Se && (Se.displayName || Se.name) || "ReactClass", tt = Te + "." + ne;
            if (q[tt])
              return;
            se("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.", ne, Te), q[tt] = !0;
          }
        }
        var ee = {
          /**
           * 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(F) {
            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(F, ne, Se) {
            Z(F, "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(F, ne, Se, Te) {
            Z(F, "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(F, ne, Se, Te) {
            Z(F, "setState");
          }
        }, Le = Object.assign, Me = {};
        Object.freeze(Me);
        function De(F, ne, Se) {
          this.props = F, this.context = ne, this.refs = Me, this.updater = Se || ee;
        }
        De.prototype.isReactComponent = {}, De.prototype.setState = function(F, ne) {
          if (typeof F != "object" && typeof F != "function" && F != 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, F, ne, "setState");
        }, De.prototype.forceUpdate = function(F) {
          this.updater.enqueueForceUpdate(this, F, "forceUpdate");
        };
        {
          var Ye = {
            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)."]
          }, Ze = function(F, ne) {
            Object.defineProperty(De.prototype, F, {
              get: function() {
                le("%s(...) is deprecated in plain JavaScript React classes. %s", ne[0], ne[1]);
              }
            });
          };
          for (var Xe in Ye)
            Ye.hasOwnProperty(Xe) && Ze(Xe, Ye[Xe]);
        }
        function lt() {
        }
        lt.prototype = De.prototype;
        function Dt(F, ne, Se) {
          this.props = F, this.context = ne, this.refs = Me, this.updater = Se || ee;
        }
        var Ct = Dt.prototype = new lt();
        Ct.constructor = Dt, Le(Ct, De.prototype), Ct.isPureReactComponent = !0;
        function hn() {
          var F = {
            current: null
          };
          return Object.seal(F), F;
        }
        var Je = Array.isArray;
        function Pt(F) {
          return Je(F);
        }
        function Vn(F) {
          {
            var ne = typeof Symbol == "function" && Symbol.toStringTag, Se = ne && F[Symbol.toStringTag] || F.constructor.name || "Object";
            return Se;
          }
        }
        function Hn(F) {
          try {
            return Nn(F), !1;
          } catch {
            return !0;
          }
        }
        function Nn(F) {
          return "" + F;
        }
        function Si(F) {
          if (Hn(F))
            return se("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Vn(F)), Nn(F);
        }
        function Sr(F, ne, Se) {
          var Te = F.displayName;
          if (Te)
            return Te;
          var tt = ne.displayName || ne.name || "";
          return tt !== "" ? Se + "(" + tt + ")" : Se;
        }
        function In(F) {
          return F.displayName || "Context";
        }
        function Tn(F) {
          if (F == null)
            return null;
          if (typeof F.tag == "number" && se("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof F == "function")
            return F.displayName || F.name || null;
          if (typeof F == "string")
            return F;
          switch (F) {
            case u:
              return "Fragment";
            case o:
              return "Portal";
            case p:
              return "Profiler";
            case c:
              return "StrictMode";
            case b:
              return "Suspense";
            case T:
              return "SuspenseList";
          }
          if (typeof F == "object")
            switch (F.$$typeof) {
              case _:
                var ne = F;
                return In(ne) + ".Consumer";
              case y:
                var Se = F;
                return In(Se._context) + ".Provider";
              case S:
                return Sr(F, F.render, "ForwardRef");
              case O:
                var Te = F.displayName || null;
                return Te !== null ? Te : Tn(F.type) || "Memo";
              case N: {
                var tt = F, bt = tt._payload, pt = tt._init;
                try {
                  return Tn(pt(bt));
                } catch {
                  return null;
                }
              }
            }
          return null;
        }
        var Pn = Object.prototype.hasOwnProperty, Qn = {
          key: !0,
          ref: !0,
          __self: !0,
          __source: !0
        }, Jn, ui, Mi;
        Mi = {};
        function ci(F) {
          if (Pn.call(F, "ref")) {
            var ne = Object.getOwnPropertyDescriptor(F, "ref").get;
            if (ne && ne.isReactWarning)
              return !1;
          }
          return F.ref !== void 0;
        }
        function dn(F) {
          if (Pn.call(F, "key")) {
            var ne = Object.getOwnPropertyDescriptor(F, "key").get;
            if (ne && ne.isReactWarning)
              return !1;
          }
          return F.key !== void 0;
        }
        function xr(F, ne) {
          var Se = function() {
            Jn || (Jn = !0, se("%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)", ne));
          };
          Se.isReactWarning = !0, Object.defineProperty(F, "key", {
            get: Se,
            configurable: !0
          });
        }
        function Wr(F, ne) {
          var Se = function() {
            ui || (ui = !0, se("%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)", ne));
          };
          Se.isReactWarning = !0, Object.defineProperty(F, "ref", {
            get: Se,
            configurable: !0
          });
        }
        function ai(F) {
          if (typeof F.ref == "string" && ie.current && F.__self && ie.current.stateNode !== F.__self) {
            var ne = Tn(ie.current.type);
            Mi[ne] || (se('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', ne, F.ref), Mi[ne] = !0);
          }
        }
        var at = function(F, ne, Se, Te, tt, bt, pt) {
          var Wt = {
            // This tag allows us to uniquely identify this as a React Element
            $$typeof: a,
            // Built-in properties that belong on the element
            type: F,
            key: ne,
            ref: Se,
            props: pt,
            // Record the component responsible for creating this element.
            _owner: bt
          };
          return Wt._store = {}, Object.defineProperty(Wt._store, "validated", {
            configurable: !1,
            enumerable: !1,
            writable: !0,
            value: !1
          }), Object.defineProperty(Wt, "_self", {
            configurable: !1,
            enumerable: !1,
            writable: !1,
            value: Te
          }), Object.defineProperty(Wt, "_source", {
            configurable: !1,
            enumerable: !1,
            writable: !1,
            value: tt
          }), Object.freeze && (Object.freeze(Wt.props), Object.freeze(Wt)), Wt;
        };
        function Tt(F, ne, Se) {
          var Te, tt = {}, bt = null, pt = null, Wt = null, fn = null;
          if (ne != null) {
            ci(ne) && (pt = ne.ref, ai(ne)), dn(ne) && (Si(ne.key), bt = "" + ne.key), Wt = ne.__self === void 0 ? null : ne.__self, fn = ne.__source === void 0 ? null : ne.__source;
            for (Te in ne)
              Pn.call(ne, Te) && !Qn.hasOwnProperty(Te) && (tt[Te] = ne[Te]);
          }
          var si = arguments.length - 2;
          if (si === 1)
            tt.children = Se;
          else if (si > 1) {
            for (var pn = Array(si), vi = 0; vi < si; vi++)
              pn[vi] = arguments[vi + 2];
            Object.freeze && Object.freeze(pn), tt.children = pn;
          }
          if (F && F.defaultProps) {
            var xn = F.defaultProps;
            for (Te in xn)
              tt[Te] === void 0 && (tt[Te] = xn[Te]);
          }
          if (bt || pt) {
            var Qi = typeof F == "function" ? F.displayName || F.name || "Unknown" : F;
            bt && xr(tt, Qi), pt && Wr(tt, Qi);
          }
          return at(F, bt, pt, Wt, fn, ie.current, tt);
        }
        function nn(F, ne) {
          var Se = at(F.type, ne, F.ref, F._self, F._source, F._owner, F.props);
          return Se;
        }
        function kn(F, ne, Se) {
          if (F == null)
            throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + F + ".");
          var Te, tt = Le({}, F.props), bt = F.key, pt = F.ref, Wt = F._self, fn = F._source, si = F._owner;
          if (ne != null) {
            ci(ne) && (pt = ne.ref, si = ie.current), dn(ne) && (Si(ne.key), bt = "" + ne.key);
            var pn;
            F.type && F.type.defaultProps && (pn = F.type.defaultProps);
            for (Te in ne)
              Pn.call(ne, Te) && !Qn.hasOwnProperty(Te) && (ne[Te] === void 0 && pn !== void 0 ? tt[Te] = pn[Te] : tt[Te] = ne[Te]);
          }
          var vi = arguments.length - 2;
          if (vi === 1)
            tt.children = Se;
          else if (vi > 1) {
            for (var xn = Array(vi), Qi = 0; Qi < vi; Qi++)
              xn[Qi] = arguments[Qi + 2];
            tt.children = xn;
          }
          return at(F.type, bt, pt, Wt, fn, si, tt);
        }
        function Mn(F) {
          return typeof F == "object" && F !== null && F.$$typeof === a;
        }
        var Oi = ".", ki = ":";
        function Gr(F) {
          var ne = /[=:]/g, Se = {
            "=": "=0",
            ":": "=2"
          }, Te = F.replace(ne, function(tt) {
            return Se[tt];
          });
          return "$" + Te;
        }
        var Fn = !1, Ki = /\/+/g;
        function On(F) {
          return F.replace(Ki, "$&/");
        }
        function gi(F, ne) {
          return typeof F == "object" && F !== null && F.key != null ? (Si(F.key), Gr("" + F.key)) : ne.toString(36);
        }
        function ls(F, ne, Se, Te, tt) {
          var bt = typeof F;
          (bt === "undefined" || bt === "boolean") && (F = null);
          var pt = !1;
          if (F === null)
            pt = !0;
          else
            switch (bt) {
              case "string":
              case "number":
                pt = !0;
                break;
              case "object":
                switch (F.$$typeof) {
                  case a:
                  case o:
                    pt = !0;
                }
            }
          if (pt) {
            var Wt = F, fn = tt(Wt), si = Te === "" ? Oi + gi(Wt, 0) : Te;
            if (Pt(fn)) {
              var pn = "";
              si != null && (pn = On(si) + "/"), ls(fn, ne, pn, "", function(id) {
                return id;
              });
            } else
              fn != null && (Mn(fn) && (fn.key && (!Wt || Wt.key !== fn.key) && Si(fn.key), fn = nn(
                fn,
                // Keep both the (mapped) and old keys if they differ, just as
                // traverseAllChildren used to do for objects as children
                Se + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
                (fn.key && (!Wt || Wt.key !== fn.key) ? (
                  // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
                  // eslint-disable-next-line react-internal/safe-string-coercion
                  On("" + fn.key) + "/"
                ) : "") + si
              )), ne.push(fn));
            return 1;
          }
          var vi, xn, Qi = 0, zn = Te === "" ? Oi : Te + ki;
          if (Pt(F))
            for (var Ba = 0; Ba < F.length; Ba++)
              vi = F[Ba], xn = zn + gi(vi, Ba), Qi += ls(vi, ne, Se, xn, tt);
          else {
            var Gl = B(F);
            if (typeof Gl == "function") {
              var Ac = F;
              Gl === Ac.entries && (Fn || le("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Fn = !0);
              for (var xi = Gl.call(Ac), Ra, Lc = 0; !(Ra = xi.next()).done; )
                vi = Ra.value, xn = zn + gi(vi, Lc++), Qi += ls(vi, ne, Se, xn, tt);
            } else if (bt === "object") {
              var nd = String(F);
              throw new Error("Objects are not valid as a React child (found: " + (nd === "[object Object]" ? "object with keys {" + Object.keys(F).join(", ") + "}" : nd) + "). If you meant to render a collection of children, use an array instead.");
            }
          }
          return Qi;
        }
        function Fi(F, ne, Se) {
          if (F == null)
            return F;
          var Te = [], tt = 0;
          return ls(F, Te, "", "", function(bt) {
            return ne.call(Se, bt, tt++);
          }), Te;
        }
        function za(F) {
          var ne = 0;
          return Fi(F, function() {
            ne++;
          }), ne;
        }
        function Ar(F, ne, Se) {
          Fi(F, function() {
            ne.apply(this, arguments);
          }, Se);
        }
        function ga(F) {
          return Fi(F, function(ne) {
            return ne;
          }) || [];
        }
        function br(F) {
          if (!Mn(F))
            throw new Error("React.Children.only expected to receive a single React element child.");
          return F;
        }
        function Ca(F) {
          var ne = {
            $$typeof: _,
            // 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: F,
            _currentValue2: F,
            // 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
          };
          ne.Provider = {
            $$typeof: y,
            _context: ne
          };
          var Se = !1, Te = !1, tt = !1;
          {
            var bt = {
              $$typeof: _,
              _context: ne
            };
            Object.defineProperties(bt, {
              Provider: {
                get: function() {
                  return Te || (Te = !0, se("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), ne.Provider;
                },
                set: function(pt) {
                  ne.Provider = pt;
                }
              },
              _currentValue: {
                get: function() {
                  return ne._currentValue;
                },
                set: function(pt) {
                  ne._currentValue = pt;
                }
              },
              _currentValue2: {
                get: function() {
                  return ne._currentValue2;
                },
                set: function(pt) {
                  ne._currentValue2 = pt;
                }
              },
              _threadCount: {
                get: function() {
                  return ne._threadCount;
                },
                set: function(pt) {
                  ne._threadCount = pt;
                }
              },
              Consumer: {
                get: function() {
                  return Se || (Se = !0, se("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), ne.Consumer;
                }
              },
              displayName: {
                get: function() {
                  return ne.displayName;
                },
                set: function(pt) {
                  tt || (le("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", pt), tt = !0);
                }
              }
            }), ne.Consumer = bt;
          }
          return ne._currentRenderer = null, ne._currentRenderer2 = null, ne;
        }
        var sa = -1, Ai = 0, ir = 1, rr = 2;
        function Ta(F) {
          if (F._status === sa) {
            var ne = F._result, Se = ne();
            if (Se.then(function(bt) {
              if (F._status === Ai || F._status === sa) {
                var pt = F;
                pt._status = ir, pt._result = bt;
              }
            }, function(bt) {
              if (F._status === Ai || F._status === sa) {
                var pt = F;
                pt._status = rr, pt._result = bt;
              }
            }), F._status === sa) {
              var Te = F;
              Te._status = Ai, Te._result = Se;
            }
          }
          if (F._status === ir) {
            var tt = F._result;
            return tt === void 0 && se(`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?`, tt), "default" in tt || se(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))`, tt), tt.default;
          } else
            throw F._result;
        }
        function Ms(F) {
          var ne = {
            // We use these fields to store the result.
            _status: sa,
            _result: F
          }, Se = {
            $$typeof: N,
            _payload: ne,
            _init: Ta
          };
          {
            var Te, tt;
            Object.defineProperties(Se, {
              defaultProps: {
                configurable: !0,
                get: function() {
                  return Te;
                },
                set: function(bt) {
                  se("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."), Te = bt, Object.defineProperty(Se, "defaultProps", {
                    enumerable: !0
                  });
                }
              },
              propTypes: {
                configurable: !0,
                get: function() {
                  return tt;
                },
                set: function(bt) {
                  se("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."), tt = bt, Object.defineProperty(Se, "propTypes", {
                    enumerable: !0
                  });
                }
              }
            });
          }
          return Se;
        }
        function Ul(F) {
          F != null && F.$$typeof === O ? se("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof F != "function" ? se("forwardRef requires a render function but was given %s.", F === null ? "null" : typeof F) : F.length !== 0 && F.length !== 2 && se("forwardRef render functions accept exactly two parameters: props and ref. %s", F.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), F != null && (F.defaultProps != null || F.propTypes != null) && se("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
          var ne = {
            $$typeof: S,
            render: F
          };
          {
            var Se;
            Object.defineProperty(ne, "displayName", {
              enumerable: !1,
              configurable: !0,
              get: function() {
                return Se;
              },
              set: function(Te) {
                Se = Te, !F.name && !F.displayName && (F.displayName = Te);
              }
            });
          }
          return ne;
        }
        var re;
        re = Symbol.for("react.module.reference");
        function We(F) {
          return !!(typeof F == "string" || typeof F == "function" || F === u || F === p || Q || F === c || F === b || F === T || Ne || F === D || $e || Ee || Fe || typeof F == "object" && F !== null && (F.$$typeof === N || F.$$typeof === O || F.$$typeof === y || F.$$typeof === _ || F.$$typeof === S || // 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.
          F.$$typeof === re || F.getModuleId !== void 0));
        }
        function st(F, ne) {
          We(F) || se("memo: The first argument must be a component. Instead received: %s", F === null ? "null" : typeof F);
          var Se = {
            $$typeof: O,
            type: F,
            compare: ne === void 0 ? null : ne
          };
          {
            var Te;
            Object.defineProperty(Se, "displayName", {
              enumerable: !1,
              configurable: !0,
              get: function() {
                return Te;
              },
              set: function(tt) {
                Te = tt, !F.name && !F.displayName && (F.displayName = tt);
              }
            });
          }
          return Se;
        }
        function ct() {
          var F = V.current;
          return F === null && se(`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.`), F;
        }
        function Sn(F) {
          var ne = ct();
          if (F._context !== void 0) {
            var Se = F._context;
            Se.Consumer === F ? se("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?") : Se.Provider === F && se("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
          }
          return ne.useContext(F);
        }
        function jn(F) {
          var ne = ct();
          return ne.useState(F);
        }
        function un(F, ne, Se) {
          var Te = ct();
          return Te.useReducer(F, ne, Se);
        }
        function It(F) {
          var ne = ct();
          return ne.useRef(F);
        }
        function Yr(F, ne) {
          var Se = ct();
          return Se.useEffect(F, ne);
        }
        function ji(F, ne) {
          var Se = ct();
          return Se.useInsertionEffect(F, ne);
        }
        function Ui(F, ne) {
          var Se = ct();
          return Se.useLayoutEffect(F, ne);
        }
        function Zr(F, ne) {
          var Se = ct();
          return Se.useCallback(F, ne);
        }
        function nl(F, ne) {
          var Se = ct();
          return Se.useMemo(F, ne);
        }
        function mi(F, ne, Se) {
          var Te = ct();
          return Te.useImperativeHandle(F, ne, Se);
        }
        function us(F, ne) {
          {
            var Se = ct();
            return Se.useDebugValue(F, ne);
          }
        }
        function Zh() {
          var F = ct();
          return F.useTransition();
        }
        function il(F) {
          var ne = ct();
          return ne.useDeferredValue(F);
        }
        function cn() {
          var F = ct();
          return F.useId();
        }
        function Ru(F, ne, Se) {
          var Te = ct();
          return Te.useSyncExternalStore(F, ne, Se);
        }
        var rl = 0, Mu, cs, Qh, $a, Af, Lf, Nf;
        function zl() {
        }
        zl.__reactDisabledLog = !0;
        function Df() {
          {
            if (rl === 0) {
              Mu = console.log, cs = console.info, Qh = console.warn, $a = console.error, Af = console.group, Lf = console.groupCollapsed, Nf = console.groupEnd;
              var F = {
                configurable: !0,
                enumerable: !0,
                value: zl,
                writable: !0
              };
              Object.defineProperties(console, {
                info: F,
                log: F,
                warn: F,
                error: F,
                group: F,
                groupCollapsed: F,
                groupEnd: F
              });
            }
            rl++;
          }
        }
        function al() {
          {
            if (rl--, rl === 0) {
              var F = {
                configurable: !0,
                enumerable: !0,
                writable: !0
              };
              Object.defineProperties(console, {
                log: Le({}, F, {
                  value: Mu
                }),
                info: Le({}, F, {
                  value: cs
                }),
                warn: Le({}, F, {
                  value: Qh
                }),
                error: Le({}, F, {
                  value: $a
                }),
                group: Le({}, F, {
                  value: Af
                }),
                groupCollapsed: Le({}, F, {
                  value: Lf
                }),
                groupEnd: Le({}, F, {
                  value: Nf
                })
              });
            }
            rl < 0 && se("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
          }
        }
        var Os = ae.ReactCurrentDispatcher, As;
        function Ou(F, ne, Se) {
          {
            if (As === void 0)
              try {
                throw Error();
              } catch (tt) {
                var Te = tt.stack.trim().match(/\n( *(at )?)/);
                As = Te && Te[1] || "";
              }
            return `
` + As + F;
          }
        }
        var Oo = !1, Au;
        {
          var $l = typeof WeakMap == "function" ? WeakMap : Map;
          Au = new $l();
        }
        function Lu(F, ne) {
          if (!F || Oo)
            return "";
          {
            var Se = Au.get(F);
            if (Se !== void 0)
              return Se;
          }
          var Te;
          Oo = !0;
          var tt = Error.prepareStackTrace;
          Error.prepareStackTrace = void 0;
          var bt;
          bt = Os.current, Os.current = null, Df();
          try {
            if (ne) {
              var pt = function() {
                throw Error();
              };
              if (Object.defineProperty(pt.prototype, "props", {
                set: function() {
                  throw Error();
                }
              }), typeof Reflect == "object" && Reflect.construct) {
                try {
                  Reflect.construct(pt, []);
                } catch (zn) {
                  Te = zn;
                }
                Reflect.construct(F, [], pt);
              } else {
                try {
                  pt.call();
                } catch (zn) {
                  Te = zn;
                }
                F.call(pt.prototype);
              }
            } else {
              try {
                throw Error();
              } catch (zn) {
                Te = zn;
              }
              F();
            }
          } catch (zn) {
            if (zn && Te && typeof zn.stack == "string") {
              for (var Wt = zn.stack.split(`
`), fn = Te.stack.split(`
`), si = Wt.length - 1, pn = fn.length - 1; si >= 1 && pn >= 0 && Wt[si] !== fn[pn]; )
                pn--;
              for (; si >= 1 && pn >= 0; si--, pn--)
                if (Wt[si] !== fn[pn]) {
                  if (si !== 1 || pn !== 1)
                    do
                      if (si--, pn--, pn < 0 || Wt[si] !== fn[pn]) {
                        var vi = `
` + Wt[si].replace(" at new ", " at ");
                        return F.displayName && vi.includes("<anonymous>") && (vi = vi.replace("<anonymous>", F.displayName)), typeof F == "function" && Au.set(F, vi), vi;
                      }
                    while (si >= 1 && pn >= 0);
                  break;
                }
            }
          } finally {
            Oo = !1, Os.current = bt, al(), Error.prepareStackTrace = tt;
          }
          var xn = F ? F.displayName || F.name : "", Qi = xn ? Ou(xn) : "";
          return typeof F == "function" && Au.set(F, Qi), Qi;
        }
        function If(F, ne, Se) {
          return Lu(F, !1);
        }
        function wc(F) {
          var ne = F.prototype;
          return !!(ne && ne.isReactComponent);
        }
        function Rn(F, ne, Se) {
          if (F == null)
            return "";
          if (typeof F == "function")
            return Lu(F, wc(F));
          if (typeof F == "string")
            return Ou(F);
          switch (F) {
            case b:
              return Ou("Suspense");
            case T:
              return Ou("SuspenseList");
          }
          if (typeof F == "object")
            switch (F.$$typeof) {
              case S:
                return If(F.render);
              case O:
                return Rn(F.type, ne, Se);
              case N: {
                var Te = F, tt = Te._payload, bt = Te._init;
                try {
                  return Rn(bt(tt), ne, Se);
                } catch {
                }
              }
            }
          return "";
        }
        var sl = {}, Cc = ae.ReactDebugCurrentFrame;
        function Bl(F) {
          if (F) {
            var ne = F._owner, Se = Rn(F.type, F._source, ne ? ne.type : null);
            Cc.setExtraStackFrame(Se);
          } else
            Cc.setExtraStackFrame(null);
        }
        function Jh(F, ne, Se, Te, tt) {
          {
            var bt = Function.call.bind(Pn);
            for (var pt in F)
              if (bt(F, pt)) {
                var Wt = void 0;
                try {
                  if (typeof F[pt] != "function") {
                    var fn = Error((Te || "React class") + ": " + Se + " type `" + pt + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof F[pt] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                    throw fn.name = "Invariant Violation", fn;
                  }
                  Wt = F[pt](ne, pt, Te, Se, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
                } catch (si) {
                  Wt = si;
                }
                Wt && !(Wt instanceof Error) && (Bl(tt), se("%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).", Te || "React class", Se, pt, typeof Wt), Bl(null)), Wt instanceof Error && !(Wt.message in sl) && (sl[Wt.message] = !0, Bl(tt), se("Failed %s type: %s", Se, Wt.message), Bl(null));
              }
          }
        }
        function Un(F) {
          if (F) {
            var ne = F._owner, Se = Rn(F.type, F._source, ne ? ne.type : null);
            Oe(Se);
          } else
            Oe(null);
        }
        var Tc;
        Tc = !1;
        function Nu() {
          if (ie.current) {
            var F = Tn(ie.current.type);
            if (F)
              return `

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

Check your code at ` + ne + ":" + Se + ".";
          }
          return "";
        }
        function Ao(F) {
          return F != null ? Qt(F.__source) : "";
        }
        var cr = {};
        function fs(F) {
          var ne = Nu();
          if (!ne) {
            var Se = typeof F == "string" ? F : F.displayName || F.name;
            Se && (ne = `

Check the top-level render call using <` + Se + ">.");
          }
          return ne;
        }
        function Ls(F, ne) {
          if (!(!F._store || F._store.validated || F.key != null)) {
            F._store.validated = !0;
            var Se = fs(ne);
            if (!cr[Se]) {
              cr[Se] = !0;
              var Te = "";
              F && F._owner && F._owner !== ie.current && (Te = " It was passed a child from " + Tn(F._owner.type) + "."), Un(F), se('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Se, Te), Un(null);
            }
          }
        }
        function Du(F, ne) {
          if (typeof F == "object") {
            if (Pt(F))
              for (var Se = 0; Se < F.length; Se++) {
                var Te = F[Se];
                Mn(Te) && Ls(Te, ne);
              }
            else if (Mn(F))
              F._store && (F._store.validated = !0);
            else if (F) {
              var tt = B(F);
              if (typeof tt == "function" && tt !== F.entries)
                for (var bt = tt.call(F), pt; !(pt = bt.next()).done; )
                  Mn(pt.value) && Ls(pt.value, ne);
            }
          }
        }
        function Zi(F) {
          {
            var ne = F.type;
            if (ne == null || typeof ne == "string")
              return;
            var Se;
            if (typeof ne == "function")
              Se = ne.propTypes;
            else if (typeof ne == "object" && (ne.$$typeof === S || // Note: Memo only checks outer props here.
            // Inner props are checked in the reconciler.
            ne.$$typeof === O))
              Se = ne.propTypes;
            else
              return;
            if (Se) {
              var Te = Tn(ne);
              Jh(Se, F.props, "prop", Te, F);
            } else if (ne.PropTypes !== void 0 && !Tc) {
              Tc = !0;
              var tt = Tn(ne);
              se("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", tt || "Unknown");
            }
            typeof ne.getDefaultProps == "function" && !ne.getDefaultProps.isReactClassApproved && se("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
          }
        }
        function fr(F) {
          {
            for (var ne = Object.keys(F.props), Se = 0; Se < ne.length; Se++) {
              var Te = ne[Se];
              if (Te !== "children" && Te !== "key") {
                Un(F), se("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Te), Un(null);
                break;
              }
            }
            F.ref !== null && (Un(F), se("Invalid attribute `ref` supplied to `React.Fragment`."), Un(null));
          }
        }
        function ed(F, ne, Se) {
          var Te = We(F);
          if (!Te) {
            var tt = "";
            (F === void 0 || typeof F == "object" && F !== null && Object.keys(F).length === 0) && (tt += " 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 bt = Ao(ne);
            bt ? tt += bt : tt += Nu();
            var pt;
            F === null ? pt = "null" : Pt(F) ? pt = "array" : F !== void 0 && F.$$typeof === a ? (pt = "<" + (Tn(F.type) || "Unknown") + " />", tt = " Did you accidentally export a JSX literal instead of a component?") : pt = typeof F, se("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", pt, tt);
          }
          var Wt = Tt.apply(this, arguments);
          if (Wt == null)
            return Wt;
          if (Te)
            for (var fn = 2; fn < arguments.length; fn++)
              Du(arguments[fn], F);
          return F === u ? fr(Wt) : Zi(Wt), Wt;
        }
        var Qr = !1;
        function hs(F) {
          var ne = ed.bind(null, F);
          return ne.type = F, Qr || (Qr = !0, le("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(ne, "type", {
            enumerable: !1,
            get: function() {
              return le("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
                value: F
              }), F;
            }
          }), ne;
        }
        function Lo(F, ne, Se) {
          for (var Te = kn.apply(this, arguments), tt = 2; tt < arguments.length; tt++)
            Du(arguments[tt], Te.type);
          return Zi(Te), Te;
        }
        function Pf(F, ne) {
          var Se = z.transition;
          z.transition = {};
          var Te = z.transition;
          z.transition._updatedFibers = /* @__PURE__ */ new Set();
          try {
            F();
          } finally {
            if (z.transition = Se, Se === null && Te._updatedFibers) {
              var tt = Te._updatedFibers.size;
              tt > 10 && le("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."), Te._updatedFibers.clear();
            }
          }
        }
        var Rc = !1, Mc = null;
        function ei(F) {
          if (Mc === null)
            try {
              var ne = ("require" + Math.random()).slice(0, 7), Se = n && n[ne];
              Mc = Se.call(n, "timers").setImmediate;
            } catch {
              Mc = function(tt) {
                Rc === !1 && (Rc = !0, typeof MessageChannel > "u" && se("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 bt = new MessageChannel();
                bt.port1.onmessage = tt, bt.port2.postMessage(void 0);
              };
            }
          return Mc(F);
        }
        var An = 0, Vl = !1;
        function kf(F) {
          {
            var ne = An;
            An++, G.current === null && (G.current = []);
            var Se = G.isBatchingLegacy, Te;
            try {
              if (G.isBatchingLegacy = !0, Te = F(), !Se && G.didScheduleLegacyUpdate) {
                var tt = G.current;
                tt !== null && (G.didScheduleLegacyUpdate = !1, Wl(tt));
              }
            } catch (xn) {
              throw Hl(ne), xn;
            } finally {
              G.isBatchingLegacy = Se;
            }
            if (Te !== null && typeof Te == "object" && typeof Te.then == "function") {
              var bt = Te, pt = !1, Wt = {
                then: function(xn, Qi) {
                  pt = !0, bt.then(function(zn) {
                    Hl(ne), An === 0 ? Ff(zn, xn, Qi) : xn(zn);
                  }, function(zn) {
                    Hl(ne), Qi(zn);
                  });
                }
              };
              return !Vl && typeof Promise < "u" && Promise.resolve().then(function() {
              }).then(function() {
                pt || (Vl = !0, se("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 () => ...);"));
              }), Wt;
            } else {
              var fn = Te;
              if (Hl(ne), An === 0) {
                var si = G.current;
                si !== null && (Wl(si), G.current = null);
                var pn = {
                  then: function(xn, Qi) {
                    G.current === null ? (G.current = [], Ff(fn, xn, Qi)) : xn(fn);
                  }
                };
                return pn;
              } else {
                var vi = {
                  then: function(xn, Qi) {
                    xn(fn);
                  }
                };
                return vi;
              }
            }
          }
        }
        function Hl(F) {
          F !== An - 1 && se("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), An = F;
        }
        function Ff(F, ne, Se) {
          {
            var Te = G.current;
            if (Te !== null)
              try {
                Wl(Te), ei(function() {
                  Te.length === 0 ? (G.current = null, ne(F)) : Ff(F, ne, Se);
                });
              } catch (tt) {
                Se(tt);
              }
            else
              ne(F);
          }
        }
        var ol = !1;
        function Wl(F) {
          if (!ol) {
            ol = !0;
            var ne = 0;
            try {
              for (; ne < F.length; ne++) {
                var Se = F[ne];
                do
                  Se = Se(!0);
                while (Se !== null);
              }
              F.length = 0;
            } catch (Te) {
              throw F = F.slice(ne + 1), Te;
            } finally {
              ol = !1;
            }
          }
        }
        var Oc = ed, td = Lo, Li = hs, Iu = {
          map: Fi,
          forEach: Ar,
          count: za,
          toArray: ga,
          only: br
        };
        e.Children = Iu, e.Component = De, e.Fragment = u, e.Profiler = p, e.PureComponent = Dt, e.StrictMode = c, e.Suspense = b, e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ae, e.cloneElement = td, e.createContext = Ca, e.createElement = Oc, e.createFactory = Li, e.createRef = hn, e.forwardRef = Ul, e.isValidElement = Mn, e.lazy = Ms, e.memo = st, e.startTransition = Pf, e.unstable_act = kf, e.useCallback = Zr, e.useContext = Sn, e.useDebugValue = us, e.useDeferredValue = il, e.useEffect = Yr, e.useId = cn, e.useImperativeHandle = mi, e.useInsertionEffect = ji, e.useLayoutEffect = Ui, e.useMemo = nl, e.useReducer = un, e.useRef = It, e.useState = jn, e.useSyncExternalStore = Ru, e.useTransition = Zh, e.version = i, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
      }();
    }(uE, uE.exports)), uE.exports;
  }
  var Zn = {};
  /**
   * @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 _P;
  function o8() {
    if (_P)
      return Zn;
    _P = 1;
    var n = Symbol.for("react.element"), e = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), y = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.iterator;
    function b(q) {
      return q === null || typeof q != "object" ? null : (q = S && q[S] || q["@@iterator"], typeof q == "function" ? q : null);
    }
    var T = { isMounted: function() {
      return !1;
    }, enqueueForceUpdate: function() {
    }, enqueueReplaceState: function() {
    }, enqueueSetState: function() {
    } }, O = Object.assign, N = {};
    function D(q, Z, ee) {
      this.props = q, this.context = Z, this.refs = N, this.updater = ee || T;
    }
    D.prototype.isReactComponent = {}, D.prototype.setState = function(q, Z) {
      if (typeof q != "object" && typeof q != "function" && q != 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, q, Z, "setState");
    }, D.prototype.forceUpdate = function(q) {
      this.updater.enqueueForceUpdate(this, q, "forceUpdate");
    };
    function k() {
    }
    k.prototype = D.prototype;
    function $(q, Z, ee) {
      this.props = q, this.context = Z, this.refs = N, this.updater = ee || T;
    }
    var B = $.prototype = new k();
    B.constructor = $, O(B, D.prototype), B.isPureReactComponent = !0;
    var V = Array.isArray, z = Object.prototype.hasOwnProperty, G = { current: null }, ie = { key: !0, ref: !0, __self: !0, __source: !0 };
    function ue(q, Z, ee) {
      var Le, Me = {}, De = null, Ye = null;
      if (Z != null)
        for (Le in Z.ref !== void 0 && (Ye = Z.ref), Z.key !== void 0 && (De = "" + Z.key), Z)
          z.call(Z, Le) && !ie.hasOwnProperty(Le) && (Me[Le] = Z[Le]);
      var Ze = arguments.length - 2;
      if (Ze === 1)
        Me.children = ee;
      else if (1 < Ze) {
        for (var Xe = Array(Ze), lt = 0; lt < Ze; lt++)
          Xe[lt] = arguments[lt + 2];
        Me.children = Xe;
      }
      if (q && q.defaultProps)
        for (Le in Ze = q.defaultProps, Ze)
          Me[Le] === void 0 && (Me[Le] = Ze[Le]);
      return { $$typeof: n, type: q, key: De, ref: Ye, props: Me, _owner: G.current };
    }
    function Re(q, Z) {
      return { $$typeof: n, type: q.type, key: Z, ref: q.ref, props: q.props, _owner: q._owner };
    }
    function Oe(q) {
      return typeof q == "object" && q !== null && q.$$typeof === n;
    }
    function $e(q) {
      var Z = { "=": "=0", ":": "=2" };
      return "$" + q.replace(/[=:]/g, function(ee) {
        return Z[ee];
      });
    }
    var Ee = /\/+/g;
    function Fe(q, Z) {
      return typeof q == "object" && q !== null && q.key != null ? $e("" + q.key) : Z.toString(36);
    }
    function Ne(q, Z, ee, Le, Me) {
      var De = typeof q;
      (De === "undefined" || De === "boolean") && (q = null);
      var Ye = !1;
      if (q === null)
        Ye = !0;
      else
        switch (De) {
          case "string":
          case "number":
            Ye = !0;
            break;
          case "object":
            switch (q.$$typeof) {
              case n:
              case e:
                Ye = !0;
            }
        }
      if (Ye)
        return Ye = q, Me = Me(Ye), q = Le === "" ? "." + Fe(Ye, 0) : Le, V(Me) ? (ee = "", q != null && (ee = q.replace(Ee, "$&/") + "/"), Ne(Me, Z, ee, "", function(lt) {
          return lt;
        })) : Me != null && (Oe(Me) && (Me = Re(Me, ee + (!Me.key || Ye && Ye.key === Me.key ? "" : ("" + Me.key).replace(Ee, "$&/") + "/") + q)), Z.push(Me)), 1;
      if (Ye = 0, Le = Le === "" ? "." : Le + ":", V(q))
        for (var Ze = 0; Ze < q.length; Ze++) {
          De = q[Ze];
          var Xe = Le + Fe(De, Ze);
          Ye += Ne(De, Z, ee, Xe, Me);
        }
      else if (Xe = b(q), typeof Xe == "function")
        for (q = Xe.call(q), Ze = 0; !(De = q.next()).done; )
          De = De.value, Xe = Le + Fe(De, Ze++), Ye += Ne(De, Z, ee, Xe, Me);
      else if (De === "object")
        throw Z = String(q), Error("Objects are not valid as a React child (found: " + (Z === "[object Object]" ? "object with keys {" + Object.keys(q).join(", ") + "}" : Z) + "). If you meant to render a collection of children, use an array instead.");
      return Ye;
    }
    function Q(q, Z, ee) {
      if (q == null)
        return q;
      var Le = [], Me = 0;
      return Ne(q, Le, "", "", function(De) {
        return Z.call(ee, De, Me++);
      }), Le;
    }
    function ae(q) {
      if (q._status === -1) {
        var Z = q._result;
        Z = Z(), Z.then(function(ee) {
          (q._status === 0 || q._status === -1) && (q._status = 1, q._result = ee);
        }, function(ee) {
          (q._status === 0 || q._status === -1) && (q._status = 2, q._result = ee);
        }), q._status === -1 && (q._status = 0, q._result = Z);
      }
      if (q._status === 1)
        return q._result.default;
      throw q._result;
    }
    var le = { current: null }, se = { transition: null }, Ae = { ReactCurrentDispatcher: le, ReactCurrentBatchConfig: se, ReactCurrentOwner: G };
    return Zn.Children = { map: Q, forEach: function(q, Z, ee) {
      Q(q, function() {
        Z.apply(this, arguments);
      }, ee);
    }, count: function(q) {
      var Z = 0;
      return Q(q, function() {
        Z++;
      }), Z;
    }, toArray: function(q) {
      return Q(q, function(Z) {
        return Z;
      }) || [];
    }, only: function(q) {
      if (!Oe(q))
        throw Error("React.Children.only expected to receive a single React element child.");
      return q;
    } }, Zn.Component = D, Zn.Fragment = t, Zn.Profiler = a, Zn.PureComponent = $, Zn.StrictMode = i, Zn.Suspense = p, Zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ae, Zn.cloneElement = function(q, Z, ee) {
      if (q == null)
        throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + q + ".");
      var Le = O({}, q.props), Me = q.key, De = q.ref, Ye = q._owner;
      if (Z != null) {
        if (Z.ref !== void 0 && (De = Z.ref, Ye = G.current), Z.key !== void 0 && (Me = "" + Z.key), q.type && q.type.defaultProps)
          var Ze = q.type.defaultProps;
        for (Xe in Z)
          z.call(Z, Xe) && !ie.hasOwnProperty(Xe) && (Le[Xe] = Z[Xe] === void 0 && Ze !== void 0 ? Ze[Xe] : Z[Xe]);
      }
      var Xe = arguments.length - 2;
      if (Xe === 1)
        Le.children = ee;
      else if (1 < Xe) {
        Ze = Array(Xe);
        for (var lt = 0; lt < Xe; lt++)
          Ze[lt] = arguments[lt + 2];
        Le.children = Ze;
      }
      return { $$typeof: n, type: q.type, key: Me, ref: De, props: Le, _owner: Ye };
    }, Zn.createContext = function(q) {
      return q = { $$typeof: u, _currentValue: q, _currentValue2: q, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, q.Provider = { $$typeof: o, _context: q }, q.Consumer = q;
    }, Zn.createElement = ue, Zn.createFactory = function(q) {
      var Z = ue.bind(null, q);
      return Z.type = q, Z;
    }, Zn.createRef = function() {
      return { current: null };
    }, Zn.forwardRef = function(q) {
      return { $$typeof: c, render: q };
    }, Zn.isValidElement = Oe, Zn.lazy = function(q) {
      return { $$typeof: _, _payload: { _status: -1, _result: q }, _init: ae };
    }, Zn.memo = function(q, Z) {
      return { $$typeof: y, type: q, compare: Z === void 0 ? null : Z };
    }, Zn.startTransition = function(q) {
      var Z = se.transition;
      se.transition = {};
      try {
        q();
      } finally {
        se.transition = Z;
      }
    }, Zn.unstable_act = function() {
      throw Error("act(...) is not supported in production builds of React.");
    }, Zn.useCallback = function(q, Z) {
      return le.current.useCallback(q, Z);
    }, Zn.useContext = function(q) {
      return le.current.useContext(q);
    }, Zn.useDebugValue = function() {
    }, Zn.useDeferredValue = function(q) {
      return le.current.useDeferredValue(q);
    }, Zn.useEffect = function(q, Z) {
      return le.current.useEffect(q, Z);
    }, Zn.useId = function() {
      return le.current.useId();
    }, Zn.useImperativeHandle = function(q, Z, ee) {
      return le.current.useImperativeHandle(q, Z, ee);
    }, Zn.useInsertionEffect = function(q, Z) {
      return le.current.useInsertionEffect(q, Z);
    }, Zn.useLayoutEffect = function(q, Z) {
      return le.current.useLayoutEffect(q, Z);
    }, Zn.useMemo = function(q, Z) {
      return le.current.useMemo(q, Z);
    }, Zn.useReducer = function(q, Z, ee) {
      return le.current.useReducer(q, Z, ee);
    }, Zn.useRef = function(q) {
      return le.current.useRef(q);
    }, Zn.useState = function(q) {
      return le.current.useState(q);
    }, Zn.useSyncExternalStore = function(q, Z, ee) {
      return le.current.useSyncExternalStore(q, Z, ee);
    }, Zn.useTransition = function() {
      return le.current.useTransition();
    }, Zn.version = "18.2.0", Zn;
  }
  var l8 = {};
  l8.NODE_ENV === "production" ? HO.exports = o8() : HO.exports = s8();
  var Kt = HO.exports;
  const L2 = /* @__PURE__ */ Cw(Kt), EP = /* @__PURE__ */ A2({
    __proto__: null,
    default: L2
  }, [Kt]);
  var SP;
  function u8() {
    if (SP)
      return K1;
    SP = 1;
    var n = {};
    /**
     * @license React
     * react-jsx-runtime.development.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.
     */
    return n.NODE_ENV !== "production" && function() {
      var e = Kt, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), p = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), N = Symbol.iterator, D = "@@iterator";
      function k(re) {
        if (re === null || typeof re != "object")
          return null;
        var We = N && re[N] || re[D];
        return typeof We == "function" ? We : null;
      }
      var $ = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
      function B(re) {
        {
          for (var We = arguments.length, st = new Array(We > 1 ? We - 1 : 0), ct = 1; ct < We; ct++)
            st[ct - 1] = arguments[ct];
          V("error", re, st);
        }
      }
      function V(re, We, st) {
        {
          var ct = $.ReactDebugCurrentFrame, Sn = ct.getStackAddendum();
          Sn !== "" && (We += "%s", st = st.concat([Sn]));
          var jn = st.map(function(un) {
            return String(un);
          });
          jn.unshift("Warning: " + We), Function.prototype.apply.call(console[re], console, jn);
        }
      }
      var z = !1, G = !1, ie = !1, ue = !1, Re = !1, Oe;
      Oe = Symbol.for("react.module.reference");
      function $e(re) {
        return !!(typeof re == "string" || typeof re == "function" || re === a || re === u || Re || re === o || re === _ || re === S || ue || re === O || z || G || ie || typeof re == "object" && re !== null && (re.$$typeof === T || re.$$typeof === b || re.$$typeof === c || re.$$typeof === p || re.$$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.
        re.$$typeof === Oe || re.getModuleId !== void 0));
      }
      function Ee(re, We, st) {
        var ct = re.displayName;
        if (ct)
          return ct;
        var Sn = We.displayName || We.name || "";
        return Sn !== "" ? st + "(" + Sn + ")" : st;
      }
      function Fe(re) {
        return re.displayName || "Context";
      }
      function Ne(re) {
        if (re == null)
          return null;
        if (typeof re.tag == "number" && B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof re == "function")
          return re.displayName || re.name || null;
        if (typeof re == "string")
          return re;
        switch (re) {
          case a:
            return "Fragment";
          case i:
            return "Portal";
          case u:
            return "Profiler";
          case o:
            return "StrictMode";
          case _:
            return "Suspense";
          case S:
            return "SuspenseList";
        }
        if (typeof re == "object")
          switch (re.$$typeof) {
            case p:
              var We = re;
              return Fe(We) + ".Consumer";
            case c:
              var st = re;
              return Fe(st._context) + ".Provider";
            case y:
              return Ee(re, re.render, "ForwardRef");
            case b:
              var ct = re.displayName || null;
              return ct !== null ? ct : Ne(re.type) || "Memo";
            case T: {
              var Sn = re, jn = Sn._payload, un = Sn._init;
              try {
                return Ne(un(jn));
              } catch {
                return null;
              }
            }
          }
        return null;
      }
      var Q = Object.assign, ae = 0, le, se, Ae, q, Z, ee, Le;
      function Me() {
      }
      Me.__reactDisabledLog = !0;
      function De() {
        {
          if (ae === 0) {
            le = console.log, se = console.info, Ae = console.warn, q = console.error, Z = console.group, ee = console.groupCollapsed, Le = console.groupEnd;
            var re = {
              configurable: !0,
              enumerable: !0,
              value: Me,
              writable: !0
            };
            Object.defineProperties(console, {
              info: re,
              log: re,
              warn: re,
              error: re,
              group: re,
              groupCollapsed: re,
              groupEnd: re
            });
          }
          ae++;
        }
      }
      function Ye() {
        {
          if (ae--, ae === 0) {
            var re = {
              configurable: !0,
              enumerable: !0,
              writable: !0
            };
            Object.defineProperties(console, {
              log: Q({}, re, {
                value: le
              }),
              info: Q({}, re, {
                value: se
              }),
              warn: Q({}, re, {
                value: Ae
              }),
              error: Q({}, re, {
                value: q
              }),
              group: Q({}, re, {
                value: Z
              }),
              groupCollapsed: Q({}, re, {
                value: ee
              }),
              groupEnd: Q({}, re, {
                value: Le
              })
            });
          }
          ae < 0 && B("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
        }
      }
      var Ze = $.ReactCurrentDispatcher, Xe;
      function lt(re, We, st) {
        {
          if (Xe === void 0)
            try {
              throw Error();
            } catch (Sn) {
              var ct = Sn.stack.trim().match(/\n( *(at )?)/);
              Xe = ct && ct[1] || "";
            }
          return `
` + Xe + re;
        }
      }
      var Dt = !1, Ct;
      {
        var hn = typeof WeakMap == "function" ? WeakMap : Map;
        Ct = new hn();
      }
      function Je(re, We) {
        if (!re || Dt)
          return "";
        {
          var st = Ct.get(re);
          if (st !== void 0)
            return st;
        }
        var ct;
        Dt = !0;
        var Sn = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        var jn;
        jn = Ze.current, Ze.current = null, De();
        try {
          if (We) {
            var un = function() {
              throw Error();
            };
            if (Object.defineProperty(un.prototype, "props", {
              set: function() {
                throw Error();
              }
            }), typeof Reflect == "object" && Reflect.construct) {
              try {
                Reflect.construct(un, []);
              } catch (us) {
                ct = us;
              }
              Reflect.construct(re, [], un);
            } else {
              try {
                un.call();
              } catch (us) {
                ct = us;
              }
              re.call(un.prototype);
            }
          } else {
            try {
              throw Error();
            } catch (us) {
              ct = us;
            }
            re();
          }
        } catch (us) {
          if (us && ct && typeof us.stack == "string") {
            for (var It = us.stack.split(`
`), Yr = ct.stack.split(`
`), ji = It.length - 1, Ui = Yr.length - 1; ji >= 1 && Ui >= 0 && It[ji] !== Yr[Ui]; )
              Ui--;
            for (; ji >= 1 && Ui >= 0; ji--, Ui--)
              if (It[ji] !== Yr[Ui]) {
                if (ji !== 1 || Ui !== 1)
                  do
                    if (ji--, Ui--, Ui < 0 || It[ji] !== Yr[Ui]) {
                      var Zr = `
` + It[ji].replace(" at new ", " at ");
                      return re.displayName && Zr.includes("<anonymous>") && (Zr = Zr.replace("<anonymous>", re.displayName)), typeof re == "function" && Ct.set(re, Zr), Zr;
                    }
                  while (ji >= 1 && Ui >= 0);
                break;
              }
          }
        } finally {
          Dt = !1, Ze.current = jn, Ye(), Error.prepareStackTrace = Sn;
        }
        var nl = re ? re.displayName || re.name : "", mi = nl ? lt(nl) : "";
        return typeof re == "function" && Ct.set(re, mi), mi;
      }
      function Pt(re, We, st) {
        return Je(re, !1);
      }
      function Vn(re) {
        var We = re.prototype;
        return !!(We && We.isReactComponent);
      }
      function Hn(re, We, st) {
        if (re == null)
          return "";
        if (typeof re == "function")
          return Je(re, Vn(re));
        if (typeof re == "string")
          return lt(re);
        switch (re) {
          case _:
            return lt("Suspense");
          case S:
            return lt("SuspenseList");
        }
        if (typeof re == "object")
          switch (re.$$typeof) {
            case y:
              return Pt(re.render);
            case b:
              return Hn(re.type, We, st);
            case T: {
              var ct = re, Sn = ct._payload, jn = ct._init;
              try {
                return Hn(jn(Sn), We, st);
              } catch {
              }
            }
          }
        return "";
      }
      var Nn = Object.prototype.hasOwnProperty, Si = {}, Sr = $.ReactDebugCurrentFrame;
      function In(re) {
        if (re) {
          var We = re._owner, st = Hn(re.type, re._source, We ? We.type : null);
          Sr.setExtraStackFrame(st);
        } else
          Sr.setExtraStackFrame(null);
      }
      function Tn(re, We, st, ct, Sn) {
        {
          var jn = Function.call.bind(Nn);
          for (var un in re)
            if (jn(re, un)) {
              var It = void 0;
              try {
                if (typeof re[un] != "function") {
                  var Yr = Error((ct || "React class") + ": " + st + " type `" + un + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof re[un] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                  throw Yr.name = "Invariant Violation", Yr;
                }
                It = re[un](We, un, ct, st, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
              } catch (ji) {
                It = ji;
              }
              It && !(It instanceof Error) && (In(Sn), B("%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).", ct || "React class", st, un, typeof It), In(null)), It instanceof Error && !(It.message in Si) && (Si[It.message] = !0, In(Sn), B("Failed %s type: %s", st, It.message), In(null));
            }
        }
      }
      var Pn = Array.isArray;
      function Qn(re) {
        return Pn(re);
      }
      function Jn(re) {
        {
          var We = typeof Symbol == "function" && Symbol.toStringTag, st = We && re[Symbol.toStringTag] || re.constructor.name || "Object";
          return st;
        }
      }
      function ui(re) {
        try {
          return Mi(re), !1;
        } catch {
          return !0;
        }
      }
      function Mi(re) {
        return "" + re;
      }
      function ci(re) {
        if (ui(re))
          return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jn(re)), Mi(re);
      }
      var dn = $.ReactCurrentOwner, xr = {
        key: !0,
        ref: !0,
        __self: !0,
        __source: !0
      }, Wr, ai, at;
      at = {};
      function Tt(re) {
        if (Nn.call(re, "ref")) {
          var We = Object.getOwnPropertyDescriptor(re, "ref").get;
          if (We && We.isReactWarning)
            return !1;
        }
        return re.ref !== void 0;
      }
      function nn(re) {
        if (Nn.call(re, "key")) {
          var We = Object.getOwnPropertyDescriptor(re, "key").get;
          if (We && We.isReactWarning)
            return !1;
        }
        return re.key !== void 0;
      }
      function kn(re, We) {
        if (typeof re.ref == "string" && dn.current && We && dn.current.stateNode !== We) {
          var st = Ne(dn.current.type);
          at[st] || (B('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', Ne(dn.current.type), re.ref), at[st] = !0);
        }
      }
      function Mn(re, We) {
        {
          var st = function() {
            Wr || (Wr = !0, B("%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)", We));
          };
          st.isReactWarning = !0, Object.defineProperty(re, "key", {
            get: st,
            configurable: !0
          });
        }
      }
      function Oi(re, We) {
        {
          var st = function() {
            ai || (ai = !0, B("%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)", We));
          };
          st.isReactWarning = !0, Object.defineProperty(re, "ref", {
            get: st,
            configurable: !0
          });
        }
      }
      var ki = function(re, We, st, ct, Sn, jn, un) {
        var It = {
          // This tag allows us to uniquely identify this as a React Element
          $$typeof: t,
          // Built-in properties that belong on the element
          type: re,
          key: We,
          ref: st,
          props: un,
          // Record the component responsible for creating this element.
          _owner: jn
        };
        return It._store = {}, Object.defineProperty(It._store, "validated", {
          configurable: !1,
          enumerable: !1,
          writable: !0,
          value: !1
        }), Object.defineProperty(It, "_self", {
          configurable: !1,
          enumerable: !1,
          writable: !1,
          value: ct
        }), Object.defineProperty(It, "_source", {
          configurable: !1,
          enumerable: !1,
          writable: !1,
          value: Sn
        }), Object.freeze && (Object.freeze(It.props), Object.freeze(It)), It;
      };
      function Gr(re, We, st, ct, Sn) {
        {
          var jn, un = {}, It = null, Yr = null;
          st !== void 0 && (ci(st), It = "" + st), nn(We) && (ci(We.key), It = "" + We.key), Tt(We) && (Yr = We.ref, kn(We, Sn));
          for (jn in We)
            Nn.call(We, jn) && !xr.hasOwnProperty(jn) && (un[jn] = We[jn]);
          if (re && re.defaultProps) {
            var ji = re.defaultProps;
            for (jn in ji)
              un[jn] === void 0 && (un[jn] = ji[jn]);
          }
          if (It || Yr) {
            var Ui = typeof re == "function" ? re.displayName || re.name || "Unknown" : re;
            It && Mn(un, Ui), Yr && Oi(un, Ui);
          }
          return ki(re, It, Yr, Sn, ct, dn.current, un);
        }
      }
      var Fn = $.ReactCurrentOwner, Ki = $.ReactDebugCurrentFrame;
      function On(re) {
        if (re) {
          var We = re._owner, st = Hn(re.type, re._source, We ? We.type : null);
          Ki.setExtraStackFrame(st);
        } else
          Ki.setExtraStackFrame(null);
      }
      var gi;
      gi = !1;
      function ls(re) {
        return typeof re == "object" && re !== null && re.$$typeof === t;
      }
      function Fi() {
        {
          if (Fn.current) {
            var re = Ne(Fn.current.type);
            if (re)
              return `

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

Check your code at ` + We + ":" + st + ".";
          }
          return "";
        }
      }
      var Ar = {};
      function ga(re) {
        {
          var We = Fi();
          if (!We) {
            var st = typeof re == "string" ? re : re.displayName || re.name;
            st && (We = `

Check the top-level render call using <` + st + ">.");
          }
          return We;
        }
      }
      function br(re, We) {
        {
          if (!re._store || re._store.validated || re.key != null)
            return;
          re._store.validated = !0;
          var st = ga(We);
          if (Ar[st])
            return;
          Ar[st] = !0;
          var ct = "";
          re && re._owner && re._owner !== Fn.current && (ct = " It was passed a child from " + Ne(re._owner.type) + "."), On(re), B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', st, ct), On(null);
        }
      }
      function Ca(re, We) {
        {
          if (typeof re != "object")
            return;
          if (Qn(re))
            for (var st = 0; st < re.length; st++) {
              var ct = re[st];
              ls(ct) && br(ct, We);
            }
          else if (ls(re))
            re._store && (re._store.validated = !0);
          else if (re) {
            var Sn = k(re);
            if (typeof Sn == "function" && Sn !== re.entries)
              for (var jn = Sn.call(re), un; !(un = jn.next()).done; )
                ls(un.value) && br(un.value, We);
          }
        }
      }
      function sa(re) {
        {
          var We = re.type;
          if (We == null || typeof We == "string")
            return;
          var st;
          if (typeof We == "function")
            st = We.propTypes;
          else if (typeof We == "object" && (We.$$typeof === y || // Note: Memo only checks outer props here.
          // Inner props are checked in the reconciler.
          We.$$typeof === b))
            st = We.propTypes;
          else
            return;
          if (st) {
            var ct = Ne(We);
            Tn(st, re.props, "prop", ct, re);
          } else if (We.PropTypes !== void 0 && !gi) {
            gi = !0;
            var Sn = Ne(We);
            B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Sn || "Unknown");
          }
          typeof We.getDefaultProps == "function" && !We.getDefaultProps.isReactClassApproved && B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
        }
      }
      function Ai(re) {
        {
          for (var We = Object.keys(re.props), st = 0; st < We.length; st++) {
            var ct = We[st];
            if (ct !== "children" && ct !== "key") {
              On(re), B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ct), On(null);
              break;
            }
          }
          re.ref !== null && (On(re), B("Invalid attribute `ref` supplied to `React.Fragment`."), On(null));
        }
      }
      function ir(re, We, st, ct, Sn, jn) {
        {
          var un = $e(re);
          if (!un) {
            var It = "";
            (re === void 0 || typeof re == "object" && re !== null && Object.keys(re).length === 0) && (It += " 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 Yr = za(Sn);
            Yr ? It += Yr : It += Fi();
            var ji;
            re === null ? ji = "null" : Qn(re) ? ji = "array" : re !== void 0 && re.$$typeof === t ? (ji = "<" + (Ne(re.type) || "Unknown") + " />", It = " Did you accidentally export a JSX literal instead of a component?") : ji = typeof re, B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ji, It);
          }
          var Ui = Gr(re, We, st, Sn, jn);
          if (Ui == null)
            return Ui;
          if (un) {
            var Zr = We.children;
            if (Zr !== void 0)
              if (ct)
                if (Qn(Zr)) {
                  for (var nl = 0; nl < Zr.length; nl++)
                    Ca(Zr[nl], re);
                  Object.freeze && Object.freeze(Zr);
                } else
                  B("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
              else
                Ca(Zr, re);
          }
          return re === a ? Ai(Ui) : sa(Ui), Ui;
        }
      }
      function rr(re, We, st) {
        return ir(re, We, st, !0);
      }
      function Ta(re, We, st) {
        return ir(re, We, st, !1);
      }
      var Ms = Ta, Ul = rr;
      K1.Fragment = a, K1.jsx = Ms, K1.jsxs = Ul;
    }(), K1;
  }
  var Z1 = {};
  /**
   * @license React
   * react-jsx-runtime.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 xP;
  function c8() {
    if (xP)
      return Z1;
    xP = 1;
    var n = Kt, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
    function u(c, p, y) {
      var _, S = {}, b = null, T = null;
      y !== void 0 && (b = "" + y), p.key !== void 0 && (b = "" + p.key), p.ref !== void 0 && (T = p.ref);
      for (_ in p)
        i.call(p, _) && !o.hasOwnProperty(_) && (S[_] = p[_]);
      if (c && c.defaultProps)
        for (_ in p = c.defaultProps, p)
          S[_] === void 0 && (S[_] = p[_]);
      return { $$typeof: e, type: c, key: b, ref: T, props: S, _owner: a.current };
    }
    return Z1.Fragment = t, Z1.jsx = u, Z1.jsxs = u, Z1;
  }
  var f8 = {};
  f8.NODE_ENV === "production" ? VO.exports = c8() : VO.exports = u8();
  var K = VO.exports;
  const h8 = {
    type: "logger",
    log(n) {
      this.output("log", n);
    },
    warn(n) {
      this.output("warn", n);
    },
    error(n) {
      this.output("error", n);
    },
    output(n, e) {
      console && console[n] && console[n].apply(console, e);
    }
  };
  class zb {
    constructor(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      this.init(e, t);
    }
    init(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      this.prefix = t.prefix || "i18next:", this.logger = e || h8, this.options = t, this.debug = t.debug;
    }
    log() {
      for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
        t[i] = arguments[i];
      return this.forward(t, "log", "", !0);
    }
    warn() {
      for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
        t[i] = arguments[i];
      return this.forward(t, "warn", "", !0);
    }
    error() {
      for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
        t[i] = arguments[i];
      return this.forward(t, "error", "");
    }
    deprecate() {
      for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
        t[i] = arguments[i];
      return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
    }
    forward(e, t, i, a) {
      return a && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
    }
    create(e) {
      return new zb(this.logger, {
        prefix: `${this.prefix}:${e}:`,
        ...this.options
      });
    }
    clone(e) {
      return e = e || this.options, e.prefix = e.prefix || this.prefix, new zb(this.logger, e);
    }
  }
  var jh = new zb();
  class Tw {
    constructor() {
      this.observers = {};
    }
    on(e, t) {
      return e.split(" ").forEach((i) => {
        this.observers[i] = this.observers[i] || [], this.observers[i].push(t);
      }), this;
    }
    off(e, t) {
      if (this.observers[e]) {
        if (!t) {
          delete this.observers[e];
          return;
        }
        this.observers[e] = this.observers[e].filter((i) => i !== t);
      }
    }
    emit(e) {
      for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
        i[a - 1] = arguments[a];
      this.observers[e] && [].concat(this.observers[e]).forEach((u) => {
        u(...i);
      }), this.observers["*"] && [].concat(this.observers["*"]).forEach((u) => {
        u.apply(u, [e, ...i]);
      });
    }
  }
  function Q1() {
    let n, e;
    const t = new Promise((i, a) => {
      n = i, e = a;
    });
    return t.resolve = n, t.reject = e, t;
  }
  function bP(n) {
    return n == null ? "" : "" + n;
  }
  function d8(n, e, t) {
    n.forEach((i) => {
      e[i] && (t[i] = e[i]);
    });
  }
  function BA(n, e, t) {
    function i(u) {
      return u && u.indexOf("###") > -1 ? u.replace(/###/g, ".") : u;
    }
    function a() {
      return !n || typeof n == "string";
    }
    const o = typeof e != "string" ? [].concat(e) : e.split(".");
    for (; o.length > 1; ) {
      if (a())
        return {};
      const u = i(o.shift());
      !n[u] && t && (n[u] = new t()), Object.prototype.hasOwnProperty.call(n, u) ? n = n[u] : n = {};
    }
    return a() ? {} : {
      obj: n,
      k: i(o.shift())
    };
  }
  function wP(n, e, t) {
    const {
      obj: i,
      k: a
    } = BA(n, e, Object);
    i[a] = t;
  }
  function p8(n, e, t, i) {
    const {
      obj: a,
      k: o
    } = BA(n, e, Object);
    a[o] = a[o] || [], i && (a[o] = a[o].concat(t)), i || a[o].push(t);
  }
  function $b(n, e) {
    const {
      obj: t,
      k: i
    } = BA(n, e);
    if (t)
      return t[i];
  }
  function g8(n, e, t) {
    const i = $b(n, t);
    return i !== void 0 ? i : $b(e, t);
  }
  function N2(n, e, t) {
    for (const i in e)
      i !== "__proto__" && i !== "constructor" && (i in n ? typeof n[i] == "string" || n[i] instanceof String || typeof e[i] == "string" || e[i] instanceof String ? t && (n[i] = e[i]) : N2(n[i], e[i], t) : n[i] = e[i]);
    return n;
  }
  function y0(n) {
    return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
  }
  var m8 = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "'": "&#39;",
    "/": "&#x2F;"
  };
  function v8(n) {
    return typeof n == "string" ? n.replace(/[&<>"'\/]/g, (e) => m8[e]) : n;
  }
  const y8 = [" ", ",", "?", "!", ";"];
  function _8(n, e, t) {
    e = e || "", t = t || "";
    const i = y8.filter((u) => e.indexOf(u) < 0 && t.indexOf(u) < 0);
    if (i.length === 0)
      return !0;
    const a = new RegExp(`(${i.map((u) => u === "?" ? "\\?" : u).join("|")})`);
    let o = !a.test(n);
    if (!o) {
      const u = n.indexOf(t);
      u > 0 && !a.test(n.substring(0, u)) && (o = !0);
    }
    return o;
  }
  function Bb(n, e) {
    let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
    if (!n)
      return;
    if (n[e])
      return n[e];
    const i = e.split(t);
    let a = n;
    for (let o = 0; o < i.length; ++o) {
      if (!a || typeof a[i[o]] == "string" && o + 1 < i.length)
        return;
      if (a[i[o]] === void 0) {
        let u = 2, c = i.slice(o, o + u).join(t), p = a[c];
        for (; p === void 0 && i.length > o + u; )
          u++, c = i.slice(o, o + u).join(t), p = a[c];
        if (p === void 0)
          return;
        if (p === null)
          return null;
        if (e.endsWith(c)) {
          if (typeof p == "string")
            return p;
          if (c && typeof p[c] == "string")
            return p[c];
        }
        const y = i.slice(o + u).join(t);
        return y ? Bb(p, y, t) : void 0;
      }
      a = a[i[o]];
    }
    return a;
  }
  function Vb(n) {
    return n && n.indexOf("_") > 0 ? n.replace("_", "-") : n;
  }
  class CP extends Tw {
    constructor(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
        ns: ["translation"],
        defaultNS: "translation"
      };
      super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
    }
    addNamespaces(e) {
      this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
    }
    removeNamespaces(e) {
      const t = this.options.ns.indexOf(e);
      t > -1 && this.options.ns.splice(t, 1);
    }
    getResource(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
      const o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, u = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
      let c = [e, t];
      i && typeof i != "string" && (c = c.concat(i)), i && typeof i == "string" && (c = c.concat(o ? i.split(o) : i)), e.indexOf(".") > -1 && (c = e.split("."));
      const p = $b(this.data, c);
      return p || !u || typeof i != "string" ? p : Bb(this.data && this.data[e] && this.data[e][t], i, o);
    }
    addResource(e, t, i, a) {
      let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
        silent: !1
      };
      const u = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator;
      let c = [e, t];
      i && (c = c.concat(u ? i.split(u) : i)), e.indexOf(".") > -1 && (c = e.split("."), a = t, t = c[1]), this.addNamespaces(t), wP(this.data, c, a), o.silent || this.emit("added", e, t, i, a);
    }
    addResources(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
        silent: !1
      };
      for (const o in i)
        (typeof i[o] == "string" || Object.prototype.toString.apply(i[o]) === "[object Array]") && this.addResource(e, t, o, i[o], {
          silent: !0
        });
      a.silent || this.emit("added", e, t, i);
    }
    addResourceBundle(e, t, i, a, o) {
      let u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
        silent: !1
      }, c = [e, t];
      e.indexOf(".") > -1 && (c = e.split("."), a = i, i = t, t = c[1]), this.addNamespaces(t);
      let p = $b(this.data, c) || {};
      a ? N2(p, i, o) : p = {
        ...p,
        ...i
      }, wP(this.data, c, p), u.silent || this.emit("added", e, t, i);
    }
    removeResourceBundle(e, t) {
      this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
    }
    hasResourceBundle(e, t) {
      return this.getResource(e, t) !== void 0;
    }
    getResourceBundle(e, t) {
      return t || (t = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? {
        ...this.getResource(e, t)
      } : this.getResource(e, t);
    }
    getDataByLanguage(e) {
      return this.data[e];
    }
    hasLanguageSomeTranslations(e) {
      const t = this.getDataByLanguage(e);
      return !!(t && Object.keys(t) || []).find((a) => t[a] && Object.keys(t[a]).length > 0);
    }
    toJSON() {
      return this.data;
    }
  }
  var D2 = {
    processors: {},
    addPostProcessor(n) {
      this.processors[n.name] = n;
    },
    handle(n, e, t, i, a) {
      return n.forEach((o) => {
        this.processors[o] && (e = this.processors[o].process(e, t, i, a));
      }), e;
    }
  };
  const TP = {};
  class Hb extends Tw {
    constructor(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      super(), d8(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = jh.create("translator");
    }
    changeLanguage(e) {
      e && (this.language = e);
    }
    exists(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
        interpolation: {}
      };
      if (e == null)
        return !1;
      const i = this.resolve(e, t);
      return i && i.res !== void 0;
    }
    extractFromKey(e, t) {
      let i = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
      i === void 0 && (i = ":");
      const a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
      let o = t.ns || this.options.defaultNS || [];
      const u = i && e.indexOf(i) > -1, c = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !_8(e, i, a);
      if (u && !c) {
        const p = e.match(this.interpolator.nestingRegexp);
        if (p && p.length > 0)
          return {
            key: e,
            namespaces: o
          };
        const y = e.split(i);
        (i !== a || i === a && this.options.ns.indexOf(y[0]) > -1) && (o = y.shift()), e = y.join(a);
      }
      return typeof o == "string" && (o = [o]), {
        key: e,
        namespaces: o
      };
    }
    translate(e, t, i) {
      if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
        ...t
      }), t || (t = {}), e == null)
        return "";
      Array.isArray(e) || (e = [String(e)]);
      const a = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, o = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
        key: u,
        namespaces: c
      } = this.extractFromKey(e[e.length - 1], t), p = c[c.length - 1], y = t.lng || this.language, _ = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
      if (y && y.toLowerCase() === "cimode") {
        if (_) {
          const V = t.nsSeparator || this.options.nsSeparator;
          return a ? {
            res: `${p}${V}${u}`,
            usedKey: u,
            exactUsedKey: u,
            usedLng: y,
            usedNS: p,
            usedParams: this.getUsedParamsDetails(t)
          } : `${p}${V}${u}`;
        }
        return a ? {
          res: u,
          usedKey: u,
          exactUsedKey: u,
          usedLng: y,
          usedNS: p,
          usedParams: this.getUsedParamsDetails(t)
        } : u;
      }
      const S = this.resolve(e, t);
      let b = S && S.res;
      const T = S && S.usedKey || u, O = S && S.exactUsedKey || u, N = Object.prototype.toString.apply(b), D = ["[object Number]", "[object Function]", "[object RegExp]"], k = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, $ = !this.i18nFormat || this.i18nFormat.handleAsObject;
      if ($ && b && (typeof b != "string" && typeof b != "boolean" && typeof b != "number") && D.indexOf(N) < 0 && !(typeof k == "string" && N === "[object Array]")) {
        if (!t.returnObjects && !this.options.returnObjects) {
          this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
          const V = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(T, b, {
            ...t,
            ns: c
          }) : `key '${u} (${this.language})' returned an object instead of string.`;
          return a ? (S.res = V, S.usedParams = this.getUsedParamsDetails(t), S) : V;
        }
        if (o) {
          const V = N === "[object Array]", z = V ? [] : {}, G = V ? O : T;
          for (const ie in b)
            if (Object.prototype.hasOwnProperty.call(b, ie)) {
              const ue = `${G}${o}${ie}`;
              z[ie] = this.translate(ue, {
                ...t,
                joinArrays: !1,
                ns: c
              }), z[ie] === ue && (z[ie] = b[ie]);
            }
          b = z;
        }
      } else if ($ && typeof k == "string" && N === "[object Array]")
        b = b.join(k), b && (b = this.extendTranslation(b, e, t, i));
      else {
        let V = !1, z = !1;
        const G = t.count !== void 0 && typeof t.count != "string", ie = Hb.hasDefaultValue(t), ue = G ? this.pluralResolver.getSuffix(y, t.count, t) : "", Re = t.ordinal && G ? this.pluralResolver.getSuffix(y, t.count, {
          ordinal: !1
        }) : "", Oe = t[`defaultValue${ue}`] || t[`defaultValue${Re}`] || t.defaultValue;
        !this.isValidLookup(b) && ie && (V = !0, b = Oe), this.isValidLookup(b) || (z = !0, b = u);
        const Ee = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && z ? void 0 : b, Fe = ie && Oe !== b && this.options.updateMissing;
        if (z || V || Fe) {
          if (this.logger.log(Fe ? "updateKey" : "missingKey", y, p, u, Fe ? Oe : b), o) {
            const le = this.resolve(u, {
              ...t,
              keySeparator: !1
            });
            le && le.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
          }
          let Ne = [];
          const Q = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
          if (this.options.saveMissingTo === "fallback" && Q && Q[0])
            for (let le = 0; le < Q.length; le++)
              Ne.push(Q[le]);
          else
            this.options.saveMissingTo === "all" ? Ne = this.languageUtils.toResolveHierarchy(t.lng || this.language) : Ne.push(t.lng || this.language);
          const ae = (le, se, Ae) => {
            const q = ie && Ae !== b ? Ae : Ee;
            this.options.missingKeyHandler ? this.options.missingKeyHandler(le, p, se, q, Fe, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(le, p, se, q, Fe, t), this.emit("missingKey", le, p, se, b);
          };
          this.options.saveMissing && (this.options.saveMissingPlurals && G ? Ne.forEach((le) => {
            this.pluralResolver.getSuffixes(le, t).forEach((se) => {
              ae([le], u + se, t[`defaultValue${se}`] || Oe);
            });
          }) : ae(Ne, u, Oe));
        }
        b = this.extendTranslation(b, e, t, S, i), z && b === u && this.options.appendNamespaceToMissingKey && (b = `${p}:${u}`), (z || V) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? b = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${p}:${u}` : u, V ? b : void 0) : b = this.options.parseMissingKeyHandler(b));
      }
      return a ? (S.res = b, S.usedParams = this.getUsedParamsDetails(t), S) : b;
    }
    extendTranslation(e, t, i, a, o) {
      var u = this;
      if (this.i18nFormat && this.i18nFormat.parse)
        e = this.i18nFormat.parse(e, {
          ...this.options.interpolation.defaultVariables,
          ...i
        }, i.lng || this.language || a.usedLng, a.usedNS, a.usedKey, {
          resolved: a
        });
      else if (!i.skipInterpolation) {
        i.interpolation && this.interpolator.init({
          ...i,
          interpolation: {
            ...this.options.interpolation,
            ...i.interpolation
          }
        });
        const y = typeof e == "string" && (i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
        let _;
        if (y) {
          const b = e.match(this.interpolator.nestingRegexp);
          _ = b && b.length;
        }
        let S = i.replace && typeof i.replace != "string" ? i.replace : i;
        if (this.options.interpolation.defaultVariables && (S = {
          ...this.options.interpolation.defaultVariables,
          ...S
        }), e = this.interpolator.interpolate(e, S, i.lng || this.language, i), y) {
          const b = e.match(this.interpolator.nestingRegexp), T = b && b.length;
          _ < T && (i.nest = !1);
        }
        !i.lng && this.options.compatibilityAPI !== "v1" && a && a.res && (i.lng = a.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, function() {
          for (var b = arguments.length, T = new Array(b), O = 0; O < b; O++)
            T[O] = arguments[O];
          return o && o[0] === T[0] && !i.context ? (u.logger.warn(`It seems you are nesting recursively key: ${T[0]} in key: ${t[0]}`), null) : u.translate(...T, t);
        }, i)), i.interpolation && this.interpolator.reset();
      }
      const c = i.postProcess || this.options.postProcess, p = typeof c == "string" ? [c] : c;
      return e != null && p && p.length && i.applyPostProcessor !== !1 && (e = D2.handle(p, e, t, this.options && this.options.postProcessPassResolved ? {
        i18nResolved: {
          ...a,
          usedParams: this.getUsedParamsDetails(i)
        },
        ...i
      } : i, this)), e;
    }
    resolve(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i, a, o, u, c;
      return typeof e == "string" && (e = [e]), e.forEach((p) => {
        if (this.isValidLookup(i))
          return;
        const y = this.extractFromKey(p, t), _ = y.key;
        a = _;
        let S = y.namespaces;
        this.options.fallbackNS && (S = S.concat(this.options.fallbackNS));
        const b = t.count !== void 0 && typeof t.count != "string", T = b && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), O = t.context !== void 0 && (typeof t.context == "string" || typeof t.context == "number") && t.context !== "", N = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
        S.forEach((D) => {
          this.isValidLookup(i) || (c = D, !TP[`${N[0]}-${D}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(c) && (TP[`${N[0]}-${D}`] = !0, this.logger.warn(`key "${a}" for languages "${N.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), N.forEach((k) => {
            if (this.isValidLookup(i))
              return;
            u = k;
            const $ = [_];
            if (this.i18nFormat && this.i18nFormat.addLookupKeys)
              this.i18nFormat.addLookupKeys($, _, k, D, t);
            else {
              let V;
              b && (V = this.pluralResolver.getSuffix(k, t.count, t));
              const z = `${this.options.pluralSeparator}zero`, G = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
              if (b && ($.push(_ + V), t.ordinal && V.indexOf(G) === 0 && $.push(_ + V.replace(G, this.options.pluralSeparator)), T && $.push(_ + z)), O) {
                const ie = `${_}${this.options.contextSeparator}${t.context}`;
                $.push(ie), b && ($.push(ie + V), t.ordinal && V.indexOf(G) === 0 && $.push(ie + V.replace(G, this.options.pluralSeparator)), T && $.push(ie + z));
              }
            }
            let B;
            for (; B = $.pop(); )
              this.isValidLookup(i) || (o = B, i = this.getResource(k, D, B, t));
          }));
        });
      }), {
        res: i,
        usedKey: a,
        exactUsedKey: o,
        usedLng: u,
        usedNS: c
      };
    }
    isValidLookup(e) {
      return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
    }
    getResource(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
      return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, i, a) : this.resourceStore.getResource(e, t, i, a);
    }
    getUsedParamsDetails() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && typeof e.replace != "string";
      let a = i ? e.replace : e;
      if (i && typeof e.count < "u" && (a.count = e.count), this.options.interpolation.defaultVariables && (a = {
        ...this.options.interpolation.defaultVariables,
        ...a
      }), !i) {
        a = {
          ...a
        };
        for (const o of t)
          delete a[o];
      }
      return a;
    }
    static hasDefaultValue(e) {
      const t = "defaultValue";
      for (const i in e)
        if (Object.prototype.hasOwnProperty.call(e, i) && t === i.substring(0, t.length) && e[i] !== void 0)
          return !0;
      return !1;
    }
  }
  function GM(n) {
    return n.charAt(0).toUpperCase() + n.slice(1);
  }
  class RP {
    constructor(e) {
      this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = jh.create("languageUtils");
    }
    getScriptPartFromCode(e) {
      if (e = Vb(e), !e || e.indexOf("-") < 0)
        return null;
      const t = e.split("-");
      return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
    }
    getLanguagePartFromCode(e) {
      if (e = Vb(e), !e || e.indexOf("-") < 0)
        return e;
      const t = e.split("-");
      return this.formatLanguageCode(t[0]);
    }
    formatLanguageCode(e) {
      if (typeof e == "string" && e.indexOf("-") > -1) {
        const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
        let i = e.split("-");
        return this.options.lowerCaseLng ? i = i.map((a) => a.toLowerCase()) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = GM(i[1].toLowerCase()))) : i.length === 3 && (i[0] = i[0].toLowerCase(), i[1].length === 2 && (i[1] = i[1].toUpperCase()), i[0] !== "sgn" && i[2].length === 2 && (i[2] = i[2].toUpperCase()), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = GM(i[1].toLowerCase())), t.indexOf(i[2].toLowerCase()) > -1 && (i[2] = GM(i[2].toLowerCase()))), i.join("-");
      }
      return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
    }
    isSupportedCode(e) {
      return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
    }
    getBestMatchFromCodes(e) {
      if (!e)
        return null;
      let t;
      return e.forEach((i) => {
        if (t)
          return;
        const a = this.formatLanguageCode(i);
        (!this.options.supportedLngs || this.isSupportedCode(a)) && (t = a);
      }), !t && this.options.supportedLngs && e.forEach((i) => {
        if (t)
          return;
        const a = this.getLanguagePartFromCode(i);
        if (this.isSupportedCode(a))
          return t = a;
        t = this.options.supportedLngs.find((o) => {
          if (o === a)
            return o;
          if (!(o.indexOf("-") < 0 && a.indexOf("-") < 0) && o.indexOf(a) === 0)
            return o;
        });
      }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
    }
    getFallbackCodes(e, t) {
      if (!e)
        return [];
      if (typeof e == "function" && (e = e(t)), typeof e == "string" && (e = [e]), Object.prototype.toString.apply(e) === "[object Array]")
        return e;
      if (!t)
        return e.default || [];
      let i = e[t];
      return i || (i = e[this.getScriptPartFromCode(t)]), i || (i = e[this.formatLanguageCode(t)]), i || (i = e[this.getLanguagePartFromCode(t)]), i || (i = e.default), i || [];
    }
    toResolveHierarchy(e, t) {
      const i = this.getFallbackCodes(t || this.options.fallbackLng || [], e), a = [], o = (u) => {
        u && (this.isSupportedCode(u) ? a.push(u) : this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`));
      };
      return typeof e == "string" && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(e))) : typeof e == "string" && o(this.formatLanguageCode(e)), i.forEach((u) => {
        a.indexOf(u) < 0 && o(this.formatLanguageCode(u));
      }), a;
    }
  }
  let E8 = [{
    lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
    nr: [1, 2],
    fc: 1
  }, {
    lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
    nr: [1, 2],
    fc: 2
  }, {
    lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
    nr: [1],
    fc: 3
  }, {
    lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
    nr: [1, 2, 5],
    fc: 4
  }, {
    lngs: ["ar"],
    nr: [0, 1, 2, 3, 11, 100],
    fc: 5
  }, {
    lngs: ["cs", "sk"],
    nr: [1, 2, 5],
    fc: 6
  }, {
    lngs: ["csb", "pl"],
    nr: [1, 2, 5],
    fc: 7
  }, {
    lngs: ["cy"],
    nr: [1, 2, 3, 8],
    fc: 8
  }, {
    lngs: ["fr"],
    nr: [1, 2],
    fc: 9
  }, {
    lngs: ["ga"],
    nr: [1, 2, 3, 7, 11],
    fc: 10
  }, {
    lngs: ["gd"],
    nr: [1, 2, 3, 20],
    fc: 11
  }, {
    lngs: ["is"],
    nr: [1, 2],
    fc: 12
  }, {
    lngs: ["jv"],
    nr: [0, 1],
    fc: 13
  }, {
    lngs: ["kw"],
    nr: [1, 2, 3, 4],
    fc: 14
  }, {
    lngs: ["lt"],
    nr: [1, 2, 10],
    fc: 15
  }, {
    lngs: ["lv"],
    nr: [1, 2, 0],
    fc: 16
  }, {
    lngs: ["mk"],
    nr: [1, 2],
    fc: 17
  }, {
    lngs: ["mnk"],
    nr: [0, 1, 2],
    fc: 18
  }, {
    lngs: ["mt"],
    nr: [1, 2, 11, 20],
    fc: 19
  }, {
    lngs: ["or"],
    nr: [2, 1],
    fc: 2
  }, {
    lngs: ["ro"],
    nr: [1, 2, 20],
    fc: 20
  }, {
    lngs: ["sl"],
    nr: [5, 1, 2, 3],
    fc: 21
  }, {
    lngs: ["he", "iw"],
    nr: [1, 2, 20, 21],
    fc: 22
  }], S8 = {
    1: function(n) {
      return +(n > 1);
    },
    2: function(n) {
      return +(n != 1);
    },
    3: function(n) {
      return 0;
    },
    4: function(n) {
      return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
    },
    5: function(n) {
      return n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
    },
    6: function(n) {
      return n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2;
    },
    7: function(n) {
      return n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
    },
    8: function(n) {
      return n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3;
    },
    9: function(n) {
      return +(n >= 2);
    },
    10: function(n) {
      return n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4;
    },
    11: function(n) {
      return n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3;
    },
    12: function(n) {
      return +(n % 10 != 1 || n % 100 == 11);
    },
    13: function(n) {
      return +(n !== 0);
    },
    14: function(n) {
      return n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3;
    },
    15: function(n) {
      return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
    },
    16: function(n) {
      return n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2;
    },
    17: function(n) {
      return n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1;
    },
    18: function(n) {
      return n == 0 ? 0 : n == 1 ? 1 : 2;
    },
    19: function(n) {
      return n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3;
    },
    20: function(n) {
      return n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2;
    },
    21: function(n) {
      return n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0;
    },
    22: function(n) {
      return n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3;
    }
  };
  const x8 = ["v1", "v2", "v3"], b8 = ["v4"], MP = {
    zero: 0,
    one: 1,
    two: 2,
    few: 3,
    many: 4,
    other: 5
  };
  function w8() {
    const n = {};
    return E8.forEach((e) => {
      e.lngs.forEach((t) => {
        n[t] = {
          numbers: e.nr,
          plurals: S8[e.fc]
        };
      });
    }), n;
  }
  class C8 {
    constructor(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      this.languageUtils = e, this.options = t, this.logger = jh.create("pluralResolver"), (!this.options.compatibilityJSON || b8.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = w8();
    }
    addRule(e, t) {
      this.rules[e] = t;
    }
    getRule(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (this.shouldUseIntlApi())
        try {
          return new Intl.PluralRules(Vb(e), {
            type: t.ordinal ? "ordinal" : "cardinal"
          });
        } catch {
          return;
        }
      return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)];
    }
    needsPlural(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const i = this.getRule(e, t);
      return this.shouldUseIntlApi() ? i && i.resolvedOptions().pluralCategories.length > 1 : i && i.numbers.length > 1;
    }
    getPluralFormsOfKey(e, t) {
      let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      return this.getSuffixes(e, i).map((a) => `${t}${a}`);
    }
    getSuffixes(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const i = this.getRule(e, t);
      return i ? this.shouldUseIntlApi() ? i.resolvedOptions().pluralCategories.sort((a, o) => MP[a] - MP[o]).map((a) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : i.numbers.map((a) => this.getSuffix(e, a, t)) : [];
    }
    getSuffix(e, t) {
      let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      const a = this.getRule(e, i);
      return a ? this.shouldUseIntlApi() ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : this.getSuffixRetroCompatible(a, t) : (this.logger.warn(`no plural rule found for: ${e}`), "");
    }
    getSuffixRetroCompatible(e, t) {
      const i = e.noAbs ? e.plurals(t) : e.plurals(Math.abs(t));
      let a = e.numbers[i];
      this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 && (a === 2 ? a = "plural" : a === 1 && (a = ""));
      const o = () => this.options.prepend && a.toString() ? this.options.prepend + a.toString() : a.toString();
      return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? o() : this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
    }
    shouldUseIntlApi() {
      return !x8.includes(this.options.compatibilityJSON);
    }
  }
  function OP(n, e, t) {
    let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = g8(n, e, t);
    return !o && a && typeof t == "string" && (o = Bb(n, t, i), o === void 0 && (o = Bb(e, t, i))), o;
  }
  class T8 {
    constructor() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      this.logger = jh.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
    }
    init() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      e.interpolation || (e.interpolation = {
        escapeValue: !0
      });
      const t = e.interpolation;
      this.escape = t.escape !== void 0 ? t.escape : v8, this.escapeValue = t.escapeValue !== void 0 ? t.escapeValue : !0, this.useRawValueToEscape = t.useRawValueToEscape !== void 0 ? t.useRawValueToEscape : !1, this.prefix = t.prefix ? y0(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? y0(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? y0(t.nestingPrefix) : t.nestingPrefixEscaped || y0("$t("), this.nestingSuffix = t.nestingSuffix ? y0(t.nestingSuffix) : t.nestingSuffixEscaped || y0(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = t.alwaysFormat !== void 0 ? t.alwaysFormat : !1, this.resetRegExp();
    }
    reset() {
      this.options && this.init(this.options);
    }
    resetRegExp() {
      const e = `${this.prefix}(.+?)${this.suffix}`;
      this.regexp = new RegExp(e, "g");
      const t = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
      this.regexpUnescape = new RegExp(t, "g");
      const i = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
      this.nestingRegexp = new RegExp(i, "g");
    }
    interpolate(e, t, i, a) {
      let o, u, c;
      const p = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
      function y(O) {
        return O.replace(/\$/g, "$$$$");
      }
      const _ = (O) => {
        if (O.indexOf(this.formatSeparator) < 0) {
          const $ = OP(t, p, O, this.options.keySeparator, this.options.ignoreJSONStructure);
          return this.alwaysFormat ? this.format($, void 0, i, {
            ...a,
            ...t,
            interpolationkey: O
          }) : $;
        }
        const N = O.split(this.formatSeparator), D = N.shift().trim(), k = N.join(this.formatSeparator).trim();
        return this.format(OP(t, p, D, this.options.keySeparator, this.options.ignoreJSONStructure), k, i, {
          ...a,
          ...t,
          interpolationkey: D
        });
      };
      this.resetRegExp();
      const S = a && a.missingInterpolationHandler || this.options.missingInterpolationHandler, b = a && a.interpolation && a.interpolation.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
      return [{
        regex: this.regexpUnescape,
        safeValue: (O) => y(O)
      }, {
        regex: this.regexp,
        safeValue: (O) => this.escapeValue ? y(this.escape(O)) : y(O)
      }].forEach((O) => {
        for (c = 0; o = O.regex.exec(e); ) {
          const N = o[1].trim();
          if (u = _(N), u === void 0)
            if (typeof S == "function") {
              const k = S(e, o, a);
              u = typeof k == "string" ? k : "";
            } else if (a && Object.prototype.hasOwnProperty.call(a, N))
              u = "";
            else if (b) {
              u = o[0];
              continue;
            } else
              this.logger.warn(`missed to pass in variable ${N} for interpolating ${e}`), u = "";
          else
            typeof u != "string" && !this.useRawValueToEscape && (u = bP(u));
          const D = O.safeValue(u);
          if (e = e.replace(o[0], D), b ? (O.regex.lastIndex += u.length, O.regex.lastIndex -= o[0].length) : O.regex.lastIndex = 0, c++, c >= this.maxReplaces)
            break;
        }
      }), e;
    }
    nest(e, t) {
      let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a, o, u;
      function c(p, y) {
        const _ = this.nestingOptionsSeparator;
        if (p.indexOf(_) < 0)
          return p;
        const S = p.split(new RegExp(`${_}[ ]*{`));
        let b = `{${S[1]}`;
        p = S[0], b = this.interpolate(b, u);
        const T = b.match(/'/g), O = b.match(/"/g);
        (T && T.length % 2 === 0 && !O || O.length % 2 !== 0) && (b = b.replace(/'/g, '"'));
        try {
          u = JSON.parse(b), y && (u = {
            ...y,
            ...u
          });
        } catch (N) {
          return this.logger.warn(`failed parsing options string in nesting for key ${p}`, N), `${p}${_}${b}`;
        }
        return delete u.defaultValue, p;
      }
      for (; a = this.nestingRegexp.exec(e); ) {
        let p = [];
        u = {
          ...i
        }, u = u.replace && typeof u.replace != "string" ? u.replace : u, u.applyPostProcessor = !1, delete u.defaultValue;
        let y = !1;
        if (a[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(a[1])) {
          const _ = a[1].split(this.formatSeparator).map((S) => S.trim());
          a[1] = _.shift(), p = _, y = !0;
        }
        if (o = t(c.call(this, a[1].trim(), u), u), o && a[0] === e && typeof o != "string")
          return o;
        typeof o != "string" && (o = bP(o)), o || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), o = ""), y && (o = p.reduce((_, S) => this.format(_, S, i.lng, {
          ...i,
          interpolationkey: a[1].trim()
        }), o.trim())), e = e.replace(a[0], o), this.regexp.lastIndex = 0;
      }
      return e;
    }
  }
  function R8(n) {
    let e = n.toLowerCase().trim();
    const t = {};
    if (n.indexOf("(") > -1) {
      const i = n.split("(");
      e = i[0].toLowerCase().trim();
      const a = i[1].substring(0, i[1].length - 1);
      e === "currency" && a.indexOf(":") < 0 ? t.currency || (t.currency = a.trim()) : e === "relativetime" && a.indexOf(":") < 0 ? t.range || (t.range = a.trim()) : a.split(";").forEach((u) => {
        if (!u)
          return;
        const [c, ...p] = u.split(":"), y = p.join(":").trim().replace(/^'+|'+$/g, "");
        t[c.trim()] || (t[c.trim()] = y), y === "false" && (t[c.trim()] = !1), y === "true" && (t[c.trim()] = !0), isNaN(y) || (t[c.trim()] = parseInt(y, 10));
      });
    }
    return {
      formatName: e,
      formatOptions: t
    };
  }
  function _0(n) {
    const e = {};
    return function(i, a, o) {
      const u = a + JSON.stringify(o);
      let c = e[u];
      return c || (c = n(Vb(a), o), e[u] = c), c(i);
    };
  }
  class M8 {
    constructor() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      this.logger = jh.create("formatter"), this.options = e, this.formats = {
        number: _0((t, i) => {
          const a = new Intl.NumberFormat(t, {
            ...i
          });
          return (o) => a.format(o);
        }),
        currency: _0((t, i) => {
          const a = new Intl.NumberFormat(t, {
            ...i,
            style: "currency"
          });
          return (o) => a.format(o);
        }),
        datetime: _0((t, i) => {
          const a = new Intl.DateTimeFormat(t, {
            ...i
          });
          return (o) => a.format(o);
        }),
        relativetime: _0((t, i) => {
          const a = new Intl.RelativeTimeFormat(t, {
            ...i
          });
          return (o) => a.format(o, i.range || "day");
        }),
        list: _0((t, i) => {
          const a = new Intl.ListFormat(t, {
            ...i
          });
          return (o) => a.format(o);
        })
      }, this.init(e);
    }
    init(e) {
      const i = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
        interpolation: {}
      }).interpolation;
      this.formatSeparator = i.formatSeparator ? i.formatSeparator : i.formatSeparator || ",";
    }
    add(e, t) {
      this.formats[e.toLowerCase().trim()] = t;
    }
    addCached(e, t) {
      this.formats[e.toLowerCase().trim()] = _0(t);
    }
    format(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
      return t.split(this.formatSeparator).reduce((c, p) => {
        const {
          formatName: y,
          formatOptions: _
        } = R8(p);
        if (this.formats[y]) {
          let S = c;
          try {
            const b = a && a.formatParams && a.formatParams[a.interpolationkey] || {}, T = b.locale || b.lng || a.locale || a.lng || i;
            S = this.formats[y](c, T, {
              ..._,
              ...a,
              ...b
            });
          } catch (b) {
            this.logger.warn(b);
          }
          return S;
        } else
          this.logger.warn(`there was no format function for ${y}`);
        return c;
      }, e);
    }
  }
  function O8(n, e) {
    n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
  }
  class A8 extends Tw {
    constructor(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
      super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = a, this.logger = jh.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = a.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = a.maxRetries >= 0 ? a.maxRetries : 5, this.retryTimeout = a.retryTimeout >= 1 ? a.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(i, a.backend, a);
    }
    queueLoad(e, t, i, a) {
      const o = {}, u = {}, c = {}, p = {};
      return e.forEach((y) => {
        let _ = !0;
        t.forEach((S) => {
          const b = `${y}|${S}`;
          !i.reload && this.store.hasResourceBundle(y, S) ? this.state[b] = 2 : this.state[b] < 0 || (this.state[b] === 1 ? u[b] === void 0 && (u[b] = !0) : (this.state[b] = 1, _ = !1, u[b] === void 0 && (u[b] = !0), o[b] === void 0 && (o[b] = !0), p[S] === void 0 && (p[S] = !0)));
        }), _ || (c[y] = !0);
      }), (Object.keys(o).length || Object.keys(u).length) && this.queue.push({
        pending: u,
        pendingCount: Object.keys(u).length,
        loaded: {},
        errors: [],
        callback: a
      }), {
        toLoad: Object.keys(o),
        pending: Object.keys(u),
        toLoadLanguages: Object.keys(c),
        toLoadNamespaces: Object.keys(p)
      };
    }
    loaded(e, t, i) {
      const a = e.split("|"), o = a[0], u = a[1];
      t && this.emit("failedLoading", o, u, t), i && this.store.addResourceBundle(o, u, i), this.state[e] = t ? -1 : 2;
      const c = {};
      this.queue.forEach((p) => {
        p8(p.loaded, [o], u), O8(p, e), t && p.errors.push(t), p.pendingCount === 0 && !p.done && (Object.keys(p.loaded).forEach((y) => {
          c[y] || (c[y] = {});
          const _ = p.loaded[y];
          _.length && _.forEach((S) => {
            c[y][S] === void 0 && (c[y][S] = !0);
          });
        }), p.done = !0, p.errors.length ? p.callback(p.errors) : p.callback());
      }), this.emit("loaded", c), this.queue = this.queue.filter((p) => !p.done);
    }
    read(e, t, i) {
      let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, u = arguments.length > 5 ? arguments[5] : void 0;
      if (!e.length)
        return u(null, {});
      if (this.readingCalls >= this.maxParallelReads) {
        this.waitingReads.push({
          lng: e,
          ns: t,
          fcName: i,
          tried: a,
          wait: o,
          callback: u
        });
        return;
      }
      this.readingCalls++;
      const c = (y, _) => {
        if (this.readingCalls--, this.waitingReads.length > 0) {
          const S = this.waitingReads.shift();
          this.read(S.lng, S.ns, S.fcName, S.tried, S.wait, S.callback);
        }
        if (y && _ && a < this.maxRetries) {
          setTimeout(() => {
            this.read.call(this, e, t, i, a + 1, o * 2, u);
          }, o);
          return;
        }
        u(y, _);
      }, p = this.backend[i].bind(this.backend);
      if (p.length === 2) {
        try {
          const y = p(e, t);
          y && typeof y.then == "function" ? y.then((_) => c(null, _)).catch(c) : c(null, y);
        } catch (y) {
          c(y);
        }
        return;
      }
      return p(e, t, c);
    }
    prepareLoading(e, t) {
      let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = arguments.length > 3 ? arguments[3] : void 0;
      if (!this.backend)
        return this.logger.warn("No backend was added via i18next.use. Will not load resources."), a && a();
      typeof e == "string" && (e = this.languageUtils.toResolveHierarchy(e)), typeof t == "string" && (t = [t]);
      const o = this.queueLoad(e, t, i, a);
      if (!o.toLoad.length)
        return o.pending.length || a(), null;
      o.toLoad.forEach((u) => {
        this.loadOne(u);
      });
    }
    load(e, t, i) {
      this.prepareLoading(e, t, {}, i);
    }
    reload(e, t, i) {
      this.prepareLoading(e, t, {
        reload: !0
      }, i);
    }
    loadOne(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
      const i = e.split("|"), a = i[0], o = i[1];
      this.read(a, o, "read", void 0, void 0, (u, c) => {
        u && this.logger.warn(`${t}loading namespace ${o} for language ${a} failed`, u), !u && c && this.logger.log(`${t}loaded namespace ${o} for language ${a}`, c), this.loaded(e, u, c);
      });
    }
    saveMissing(e, t, i, a, o) {
      let u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, c = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
      };
      if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
        this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
        return;
      }
      if (!(i == null || i === "")) {
        if (this.backend && this.backend.create) {
          const p = {
            ...u,
            isUpdate: o
          }, y = this.backend.create.bind(this.backend);
          if (y.length < 6)
            try {
              let _;
              y.length === 5 ? _ = y(e, t, i, a, p) : _ = y(e, t, i, a), _ && typeof _.then == "function" ? _.then((S) => c(null, S)).catch(c) : c(null, _);
            } catch (_) {
              c(_);
            }
          else
            y(e, t, i, a, c, p);
        }
        !e || !e[0] || this.store.addResource(e[0], t, i, a);
      }
    }
  }
  function AP() {
    return {
      debug: !1,
      initImmediate: !0,
      ns: ["translation"],
      defaultNS: ["translation"],
      fallbackLng: ["dev"],
      fallbackNS: !1,
      supportedLngs: !1,
      nonExplicitSupportedLngs: !1,
      load: "all",
      preload: !1,
      simplifyPluralSuffix: !0,
      keySeparator: ".",
      nsSeparator: ":",
      pluralSeparator: "_",
      contextSeparator: "_",
      partialBundledLanguages: !1,
      saveMissing: !1,
      updateMissing: !1,
      saveMissingTo: "fallback",
      saveMissingPlurals: !0,
      missingKeyHandler: !1,
      missingInterpolationHandler: !1,
      postProcess: !1,
      postProcessPassResolved: !1,
      returnNull: !1,
      returnEmptyString: !0,
      returnObjects: !1,
      joinArrays: !1,
      returnedObjectHandler: !1,
      parseMissingKeyHandler: !1,
      appendNamespaceToMissingKey: !1,
      appendNamespaceToCIMode: !1,
      overloadTranslationOptionHandler: function(e) {
        let t = {};
        if (typeof e[1] == "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
          const i = e[3] || e[2];
          Object.keys(i).forEach((a) => {
            t[a] = i[a];
          });
        }
        return t;
      },
      interpolation: {
        escapeValue: !0,
        format: (n, e, t, i) => n,
        prefix: "{{",
        suffix: "}}",
        formatSeparator: ",",
        unescapePrefix: "-",
        nestingPrefix: "$t(",
        nestingSuffix: ")",
        nestingOptionsSeparator: ",",
        maxReplaces: 1e3,
        skipOnVariables: !0
      }
    };
  }
  function LP(n) {
    return typeof n.ns == "string" && (n.ns = [n.ns]), typeof n.fallbackLng == "string" && (n.fallbackLng = [n.fallbackLng]), typeof n.fallbackNS == "string" && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs && n.supportedLngs.indexOf("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), n;
  }
  function rb() {
  }
  function L8(n) {
    Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
      typeof n[t] == "function" && (n[t] = n[t].bind(n));
    });
  }
  class xE extends Tw {
    constructor() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
      if (super(), this.options = LP(e), this.services = {}, this.logger = jh, this.modules = {
        external: []
      }, L8(this), t && !this.isInitialized && !e.isClone) {
        if (!this.options.initImmediate)
          return this.init(e, t), this;
        setTimeout(() => {
          this.init(e, t);
        }, 0);
      }
    }
    init() {
      var e = this;
      let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = arguments.length > 1 ? arguments[1] : void 0;
      typeof t == "function" && (i = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (typeof t.ns == "string" ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
      const a = AP();
      this.options = {
        ...a,
        ...this.options,
        ...LP(t)
      }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
        ...a.interpolation,
        ...this.options.interpolation
      }), t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
      function o(_) {
        return _ ? typeof _ == "function" ? new _() : _ : null;
      }
      if (!this.options.isClone) {
        this.modules.logger ? jh.init(o(this.modules.logger), this.options) : jh.init(null, this.options);
        let _;
        this.modules.formatter ? _ = this.modules.formatter : typeof Intl < "u" && (_ = M8);
        const S = new RP(this.options);
        this.store = new CP(this.options.resources, this.options);
        const b = this.services;
        b.logger = jh, b.resourceStore = this.store, b.languageUtils = S, b.pluralResolver = new C8(S, {
          prepend: this.options.pluralSeparator,
          compatibilityJSON: this.options.compatibilityJSON,
          simplifyPluralSuffix: this.options.simplifyPluralSuffix
        }), _ && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (b.formatter = o(_), b.formatter.init(b, this.options), this.options.interpolation.format = b.formatter.format.bind(b.formatter)), b.interpolator = new T8(this.options), b.utils = {
          hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
        }, b.backendConnector = new A8(o(this.modules.backend), b.resourceStore, b, this.options), b.backendConnector.on("*", function(T) {
          for (var O = arguments.length, N = new Array(O > 1 ? O - 1 : 0), D = 1; D < O; D++)
            N[D - 1] = arguments[D];
          e.emit(T, ...N);
        }), this.modules.languageDetector && (b.languageDetector = o(this.modules.languageDetector), b.languageDetector.init && b.languageDetector.init(b, this.options.detection, this.options)), this.modules.i18nFormat && (b.i18nFormat = o(this.modules.i18nFormat), b.i18nFormat.init && b.i18nFormat.init(this)), this.translator = new Hb(this.services, this.options), this.translator.on("*", function(T) {
          for (var O = arguments.length, N = new Array(O > 1 ? O - 1 : 0), D = 1; D < O; D++)
            N[D - 1] = arguments[D];
          e.emit(T, ...N);
        }), this.modules.external.forEach((T) => {
          T.init && T.init(this);
        });
      }
      if (this.format = this.options.interpolation.format, i || (i = rb), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
        const _ = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
        _.length > 0 && _[0] !== "dev" && (this.options.lng = _[0]);
      }
      !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((_) => {
        this[_] = function() {
          return e.store[_](...arguments);
        };
      }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((_) => {
        this[_] = function() {
          return e.store[_](...arguments), e;
        };
      });
      const p = Q1(), y = () => {
        const _ = (S, b) => {
          this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), p.resolve(b), i(S, b);
        };
        if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
          return _(null, this.t.bind(this));
        this.changeLanguage(this.options.lng, _);
      };
      return this.options.resources || !this.options.initImmediate ? y() : setTimeout(y, 0), p;
    }
    loadResources(e) {
      let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : rb;
      const a = typeof e == "string" ? e : this.language;
      if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
        if (a && a.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0))
          return i();
        const o = [], u = (c) => {
          if (!c || c === "cimode")
            return;
          this.services.languageUtils.toResolveHierarchy(c).forEach((y) => {
            y !== "cimode" && o.indexOf(y) < 0 && o.push(y);
          });
        };
        a ? u(a) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((p) => u(p)), this.options.preload && this.options.preload.forEach((c) => u(c)), this.services.backendConnector.load(o, this.options.ns, (c) => {
          !c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(c);
        });
      } else
        i(null);
    }
    reloadResources(e, t, i) {
      const a = Q1();
      return e || (e = this.languages), t || (t = this.options.ns), i || (i = rb), this.services.backendConnector.reload(e, t, (o) => {
        a.resolve(), i(o);
      }), a;
    }
    use(e) {
      if (!e)
        throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
      if (!e.type)
        throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
      return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && D2.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
    }
    setResolvedLanguage(e) {
      if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
        for (let t = 0; t < this.languages.length; t++) {
          const i = this.languages[t];
          if (!(["cimode", "dev"].indexOf(i) > -1) && this.store.hasLanguageSomeTranslations(i)) {
            this.resolvedLanguage = i;
            break;
          }
        }
    }
    changeLanguage(e, t) {
      var i = this;
      this.isLanguageChangingTo = e;
      const a = Q1();
      this.emit("languageChanging", e);
      const o = (p) => {
        this.language = p, this.languages = this.services.languageUtils.toResolveHierarchy(p), this.resolvedLanguage = void 0, this.setResolvedLanguage(p);
      }, u = (p, y) => {
        y ? (o(y), this.translator.changeLanguage(y), this.isLanguageChangingTo = void 0, this.emit("languageChanged", y), this.logger.log("languageChanged", y)) : this.isLanguageChangingTo = void 0, a.resolve(function() {
          return i.t(...arguments);
        }), t && t(p, function() {
          return i.t(...arguments);
        });
      }, c = (p) => {
        !e && !p && this.services.languageDetector && (p = []);
        const y = typeof p == "string" ? p : this.services.languageUtils.getBestMatchFromCodes(p);
        y && (this.language || o(y), this.translator.language || this.translator.changeLanguage(y), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(y)), this.loadResources(y, (_) => {
          u(_, y);
        });
      };
      return !e && this.services.languageDetector && !this.services.languageDetector.async ? c(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(c) : this.services.languageDetector.detect(c) : c(e), a;
    }
    getFixedT(e, t, i) {
      var a = this;
      const o = function(u, c) {
        let p;
        if (typeof c != "object") {
          for (var y = arguments.length, _ = new Array(y > 2 ? y - 2 : 0), S = 2; S < y; S++)
            _[S - 2] = arguments[S];
          p = a.options.overloadTranslationOptionHandler([u, c].concat(_));
        } else
          p = {
            ...c
          };
        p.lng = p.lng || o.lng, p.lngs = p.lngs || o.lngs, p.ns = p.ns || o.ns, p.keyPrefix = p.keyPrefix || i || o.keyPrefix;
        const b = a.options.keySeparator || ".";
        let T;
        return p.keyPrefix && Array.isArray(u) ? T = u.map((O) => `${p.keyPrefix}${b}${O}`) : T = p.keyPrefix ? `${p.keyPrefix}${b}${u}` : u, a.t(T, p);
      };
      return typeof e == "string" ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = i, o;
    }
    t() {
      return this.translator && this.translator.translate(...arguments);
    }
    exists() {
      return this.translator && this.translator.exists(...arguments);
    }
    setDefaultNamespace(e) {
      this.options.defaultNS = e;
    }
    hasLoadedNamespace(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (!this.isInitialized)
        return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
      if (!this.languages || !this.languages.length)
        return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
      const i = t.lng || this.resolvedLanguage || this.languages[0], a = this.options ? this.options.fallbackLng : !1, o = this.languages[this.languages.length - 1];
      if (i.toLowerCase() === "cimode")
        return !0;
      const u = (c, p) => {
        const y = this.services.backendConnector.state[`${c}|${p}`];
        return y === -1 || y === 2;
      };
      if (t.precheck) {
        const c = t.precheck(this, u);
        if (c !== void 0)
          return c;
      }
      return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || u(i, e) && (!a || u(o, e)));
    }
    loadNamespaces(e, t) {
      const i = Q1();
      return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach((a) => {
        this.options.ns.indexOf(a) < 0 && this.options.ns.push(a);
      }), this.loadResources((a) => {
        i.resolve(), t && t(a);
      }), i) : (t && t(), Promise.resolve());
    }
    loadLanguages(e, t) {
      const i = Q1();
      typeof e == "string" && (e = [e]);
      const a = this.options.preload || [], o = e.filter((u) => a.indexOf(u) < 0);
      return o.length ? (this.options.preload = a.concat(o), this.loadResources((u) => {
        i.resolve(), t && t(u);
      }), i) : (t && t(), Promise.resolve());
    }
    dir(e) {
      if (e || (e = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !e)
        return "rtl";
      const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], i = this.services && this.services.languageUtils || new RP(AP());
      return t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
    }
    static createInstance() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
      return new xE(e, t);
    }
    cloneInstance() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : rb;
      const i = e.forkResourceStore;
      i && delete e.forkResourceStore;
      const a = {
        ...this.options,
        ...e,
        isClone: !0
      }, o = new xE(a);
      return (e.debug !== void 0 || e.prefix !== void 0) && (o.logger = o.logger.clone(e)), ["store", "services", "language"].forEach((c) => {
        o[c] = this[c];
      }), o.services = {
        ...this.services
      }, o.services.utils = {
        hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
      }, i && (o.store = new CP(this.store.data, a), o.services.resourceStore = o.store), o.translator = new Hb(o.services, a), o.translator.on("*", function(c) {
        for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), _ = 1; _ < p; _++)
          y[_ - 1] = arguments[_];
        o.emit(c, ...y);
      }), o.init(a, t), o.translator.options = a, o.translator.backendConnector.services.utils = {
        hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
      }, o;
    }
    toJSON() {
      return {
        options: this.options,
        store: this.store,
        language: this.language,
        languages: this.languages,
        resolvedLanguage: this.resolvedLanguage
      };
    }
  }
  const Ts = xE.createInstance();
  Ts.createInstance = xE.createInstance;
  Ts.createInstance;
  Ts.dir;
  Ts.init;
  Ts.loadResources;
  Ts.reloadResources;
  Ts.use;
  Ts.changeLanguage;
  Ts.getFixedT;
  Ts.t;
  Ts.exists;
  Ts.setDefaultNamespace;
  Ts.hasLoadedNamespace;
  Ts.loadNamespaces;
  Ts.loadLanguages;
  function N8(n, e) {
    if (!(n instanceof e))
      throw new TypeError("Cannot call a class as a function");
  }
  function bE(n) {
    "@babel/helpers - typeof";
    return bE = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
      return typeof e;
    } : function(e) {
      return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    }, bE(n);
  }
  function D8(n, e) {
    if (bE(n) !== "object" || n === null)
      return n;
    var t = n[Symbol.toPrimitive];
    if (t !== void 0) {
      var i = t.call(n, e || "default");
      if (bE(i) !== "object")
        return i;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (e === "string" ? String : Number)(n);
  }
  function I8(n) {
    var e = D8(n, "string");
    return bE(e) === "symbol" ? e : String(e);
  }
  function NP(n, e) {
    for (var t = 0; t < e.length; t++) {
      var i = e[t];
      i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, I8(i.key), i);
    }
  }
  function P8(n, e, t) {
    return e && NP(n.prototype, e), t && NP(n, t), Object.defineProperty(n, "prototype", {
      writable: !1
    }), n;
  }
  var I2 = [], k8 = I2.forEach, F8 = I2.slice;
  function j8(n) {
    return k8.call(F8.call(arguments, 1), function(e) {
      if (e)
        for (var t in e)
          n[t] === void 0 && (n[t] = e[t]);
    }), n;
  }
  var DP = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, U8 = function(e, t, i) {
    var a = i || {};
    a.path = a.path || "/";
    var o = encodeURIComponent(t), u = "".concat(e, "=").concat(o);
    if (a.maxAge > 0) {
      var c = a.maxAge - 0;
      if (Number.isNaN(c))
        throw new Error("maxAge should be a Number");
      u += "; Max-Age=".concat(Math.floor(c));
    }
    if (a.domain) {
      if (!DP.test(a.domain))
        throw new TypeError("option domain is invalid");
      u += "; Domain=".concat(a.domain);
    }
    if (a.path) {
      if (!DP.test(a.path))
        throw new TypeError("option path is invalid");
      u += "; Path=".concat(a.path);
    }
    if (a.expires) {
      if (typeof a.expires.toUTCString != "function")
        throw new TypeError("option expires is invalid");
      u += "; Expires=".concat(a.expires.toUTCString());
    }
    if (a.httpOnly && (u += "; HttpOnly"), a.secure && (u += "; Secure"), a.sameSite) {
      var p = typeof a.sameSite == "string" ? a.sameSite.toLowerCase() : a.sameSite;
      switch (p) {
        case !0:
          u += "; SameSite=Strict";
          break;
        case "lax":
          u += "; SameSite=Lax";
          break;
        case "strict":
          u += "; SameSite=Strict";
          break;
        case "none":
          u += "; SameSite=None";
          break;
        default:
          throw new TypeError("option sameSite is invalid");
      }
    }
    return u;
  }, IP = {
    create: function(e, t, i, a) {
      var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
        path: "/",
        sameSite: "strict"
      };
      i && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + i * 60 * 1e3)), a && (o.domain = a), document.cookie = U8(e, encodeURIComponent(t), o);
    },
    read: function(e) {
      for (var t = "".concat(e, "="), i = document.cookie.split(";"), a = 0; a < i.length; a++) {
        for (var o = i[a]; o.charAt(0) === " "; )
          o = o.substring(1, o.length);
        if (o.indexOf(t) === 0)
          return o.substring(t.length, o.length);
      }
      return null;
    },
    remove: function(e) {
      this.create(e, "", -1);
    }
  }, z8 = {
    name: "cookie",
    lookup: function(e) {
      var t;
      if (e.lookupCookie && typeof document < "u") {
        var i = IP.read(e.lookupCookie);
        i && (t = i);
      }
      return t;
    },
    cacheUserLanguage: function(e, t) {
      t.lookupCookie && typeof document < "u" && IP.create(t.lookupCookie, e, t.cookieMinutes, t.cookieDomain, t.cookieOptions);
    }
  }, $8 = {
    name: "querystring",
    lookup: function(e) {
      var t;
      if (typeof window < "u") {
        var i = window.location.search;
        !window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?")));
        for (var a = i.substring(1), o = a.split("&"), u = 0; u < o.length; u++) {
          var c = o[u].indexOf("=");
          if (c > 0) {
            var p = o[u].substring(0, c);
            p === e.lookupQuerystring && (t = o[u].substring(c + 1));
          }
        }
      }
      return t;
    }
  }, J1 = null, PP = function() {
    if (J1 !== null)
      return J1;
    try {
      J1 = window !== "undefined" && window.localStorage !== null;
      var e = "i18next.translate.boo";
      window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e);
    } catch {
      J1 = !1;
    }
    return J1;
  }, B8 = {
    name: "localStorage",
    lookup: function(e) {
      var t;
      if (e.lookupLocalStorage && PP()) {
        var i = window.localStorage.getItem(e.lookupLocalStorage);
        i && (t = i);
      }
      return t;
    },
    cacheUserLanguage: function(e, t) {
      t.lookupLocalStorage && PP() && window.localStorage.setItem(t.lookupLocalStorage, e);
    }
  }, eE = null, kP = function() {
    if (eE !== null)
      return eE;
    try {
      eE = window !== "undefined" && window.sessionStorage !== null;
      var e = "i18next.translate.boo";
      window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
    } catch {
      eE = !1;
    }
    return eE;
  }, V8 = {
    name: "sessionStorage",
    lookup: function(e) {
      var t;
      if (e.lookupSessionStorage && kP()) {
        var i = window.sessionStorage.getItem(e.lookupSessionStorage);
        i && (t = i);
      }
      return t;
    },
    cacheUserLanguage: function(e, t) {
      t.lookupSessionStorage && kP() && window.sessionStorage.setItem(t.lookupSessionStorage, e);
    }
  }, H8 = {
    name: "navigator",
    lookup: function(e) {
      var t = [];
      if (typeof navigator < "u") {
        if (navigator.languages)
          for (var i = 0; i < navigator.languages.length; i++)
            t.push(navigator.languages[i]);
        navigator.userLanguage && t.push(navigator.userLanguage), navigator.language && t.push(navigator.language);
      }
      return t.length > 0 ? t : void 0;
    }
  }, W8 = {
    name: "htmlTag",
    lookup: function(e) {
      var t, i = e.htmlTag || (typeof document < "u" ? document.documentElement : null);
      return i && typeof i.getAttribute == "function" && (t = i.getAttribute("lang")), t;
    }
  }, G8 = {
    name: "path",
    lookup: function(e) {
      var t;
      if (typeof window < "u") {
        var i = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
        if (i instanceof Array)
          if (typeof e.lookupFromPathIndex == "number") {
            if (typeof i[e.lookupFromPathIndex] != "string")
              return;
            t = i[e.lookupFromPathIndex].replace("/", "");
          } else
            t = i[0].replace("/", "");
      }
      return t;
    }
  }, Y8 = {
    name: "subdomain",
    lookup: function(e) {
      var t = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, i = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
      if (i)
        return i[t];
    }
  };
  function q8() {
    return {
      order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
      lookupQuerystring: "lng",
      lookupCookie: "i18next",
      lookupLocalStorage: "i18nextLng",
      lookupSessionStorage: "i18nextLng",
      // cache user language
      caches: ["localStorage"],
      excludeCacheFor: ["cimode"],
      // cookieMinutes: 10,
      // cookieDomain: 'myDomain'
      convertDetectedLanguage: function(e) {
        return e;
      }
    };
  }
  var P2 = /* @__PURE__ */ function() {
    function n(e) {
      var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      N8(this, n), this.type = "languageDetector", this.detectors = {}, this.init(e, t);
    }
    return P8(n, [{
      key: "init",
      value: function(t) {
        var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
        this.services = t || {
          languageUtils: {}
        }, this.options = j8(i, this.options || {}, q8()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
          return o.replace("-", "_");
        }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(z8), this.addDetector($8), this.addDetector(B8), this.addDetector(V8), this.addDetector(H8), this.addDetector(W8), this.addDetector(G8), this.addDetector(Y8);
      }
    }, {
      key: "addDetector",
      value: function(t) {
        this.detectors[t.name] = t;
      }
    }, {
      key: "detect",
      value: function(t) {
        var i = this;
        t || (t = this.options.order);
        var a = [];
        return t.forEach(function(o) {
          if (i.detectors[o]) {
            var u = i.detectors[o].lookup(i.options);
            u && typeof u == "string" && (u = [u]), u && (a = a.concat(u));
          }
        }), a = a.map(function(o) {
          return i.options.convertDetectedLanguage(o);
        }), this.services.languageUtils.getBestMatchFromCodes ? a : a.length > 0 ? a[0] : null;
      }
    }, {
      key: "cacheUserLanguage",
      value: function(t, i) {
        var a = this;
        i || (i = this.options.caches), i && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || i.forEach(function(o) {
          a.detectors[o] && a.detectors[o].cacheUserLanguage(t, a.options);
        }));
      }
    }]), n;
  }();
  P2.type = "languageDetector";
  function WO(n) {
    "@babel/helpers - typeof";
    return WO = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
      return typeof e;
    } : function(e) {
      return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    }, WO(n);
  }
  var k2 = [], X8 = k2.forEach, K8 = k2.slice;
  function GO(n) {
    return X8.call(K8.call(arguments, 1), function(e) {
      if (e)
        for (var t in e)
          n[t] === void 0 && (n[t] = e[t]);
    }), n;
  }
  function F2() {
    return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : WO(XMLHttpRequest)) === "object";
  }
  function Z8(n) {
    return !!n && typeof n.then == "function";
  }
  function Q8(n) {
    return Z8(n) ? n : Promise.resolve(n);
  }
  function J8(n) {
    throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
  }
  var YO = { exports: {} }, ab = { exports: {} }, FP;
  function eB() {
    return FP || (FP = 1, function(n, e) {
      var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ko < "u" && Ko, i = function() {
        function o() {
          this.fetch = !1, this.DOMException = t.DOMException;
        }
        return o.prototype = t, new o();
      }();
      (function(o) {
        (function(u) {
          var c = typeof o < "u" && o || typeof self < "u" && self || typeof c < "u" && c, p = {
            searchParams: "URLSearchParams" in c,
            iterable: "Symbol" in c && "iterator" in Symbol,
            blob: "FileReader" in c && "Blob" in c && function() {
              try {
                return new Blob(), !0;
              } catch {
                return !1;
              }
            }(),
            formData: "FormData" in c,
            arrayBuffer: "ArrayBuffer" in c
          };
          function y(Q) {
            return Q && DataView.prototype.isPrototypeOf(Q);
          }
          if (p.arrayBuffer)
            var _ = [
              "[object Int8Array]",
              "[object Uint8Array]",
              "[object Uint8ClampedArray]",
              "[object Int16Array]",
              "[object Uint16Array]",
              "[object Int32Array]",
              "[object Uint32Array]",
              "[object Float32Array]",
              "[object Float64Array]"
            ], S = ArrayBuffer.isView || function(Q) {
              return Q && _.indexOf(Object.prototype.toString.call(Q)) > -1;
            };
          function b(Q) {
            if (typeof Q != "string" && (Q = String(Q)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(Q) || Q === "")
              throw new TypeError('Invalid character in header field name: "' + Q + '"');
            return Q.toLowerCase();
          }
          function T(Q) {
            return typeof Q != "string" && (Q = String(Q)), Q;
          }
          function O(Q) {
            var ae = {
              next: function() {
                var le = Q.shift();
                return { done: le === void 0, value: le };
              }
            };
            return p.iterable && (ae[Symbol.iterator] = function() {
              return ae;
            }), ae;
          }
          function N(Q) {
            this.map = {}, Q instanceof N ? Q.forEach(function(ae, le) {
              this.append(le, ae);
            }, this) : Array.isArray(Q) ? Q.forEach(function(ae) {
              this.append(ae[0], ae[1]);
            }, this) : Q && Object.getOwnPropertyNames(Q).forEach(function(ae) {
              this.append(ae, Q[ae]);
            }, this);
          }
          N.prototype.append = function(Q, ae) {
            Q = b(Q), ae = T(ae);
            var le = this.map[Q];
            this.map[Q] = le ? le + ", " + ae : ae;
          }, N.prototype.delete = function(Q) {
            delete this.map[b(Q)];
          }, N.prototype.get = function(Q) {
            return Q = b(Q), this.has(Q) ? this.map[Q] : null;
          }, N.prototype.has = function(Q) {
            return this.map.hasOwnProperty(b(Q));
          }, N.prototype.set = function(Q, ae) {
            this.map[b(Q)] = T(ae);
          }, N.prototype.forEach = function(Q, ae) {
            for (var le in this.map)
              this.map.hasOwnProperty(le) && Q.call(ae, this.map[le], le, this);
          }, N.prototype.keys = function() {
            var Q = [];
            return this.forEach(function(ae, le) {
              Q.push(le);
            }), O(Q);
          }, N.prototype.values = function() {
            var Q = [];
            return this.forEach(function(ae) {
              Q.push(ae);
            }), O(Q);
          }, N.prototype.entries = function() {
            var Q = [];
            return this.forEach(function(ae, le) {
              Q.push([le, ae]);
            }), O(Q);
          }, p.iterable && (N.prototype[Symbol.iterator] = N.prototype.entries);
          function D(Q) {
            if (Q.bodyUsed)
              return Promise.reject(new TypeError("Already read"));
            Q.bodyUsed = !0;
          }
          function k(Q) {
            return new Promise(function(ae, le) {
              Q.onload = function() {
                ae(Q.result);
              }, Q.onerror = function() {
                le(Q.error);
              };
            });
          }
          function $(Q) {
            var ae = new FileReader(), le = k(ae);
            return ae.readAsArrayBuffer(Q), le;
          }
          function B(Q) {
            var ae = new FileReader(), le = k(ae);
            return ae.readAsText(Q), le;
          }
          function V(Q) {
            for (var ae = new Uint8Array(Q), le = new Array(ae.length), se = 0; se < ae.length; se++)
              le[se] = String.fromCharCode(ae[se]);
            return le.join("");
          }
          function z(Q) {
            if (Q.slice)
              return Q.slice(0);
            var ae = new Uint8Array(Q.byteLength);
            return ae.set(new Uint8Array(Q)), ae.buffer;
          }
          function G() {
            return this.bodyUsed = !1, this._initBody = function(Q) {
              this.bodyUsed = this.bodyUsed, this._bodyInit = Q, Q ? typeof Q == "string" ? this._bodyText = Q : p.blob && Blob.prototype.isPrototypeOf(Q) ? this._bodyBlob = Q : p.formData && FormData.prototype.isPrototypeOf(Q) ? this._bodyFormData = Q : p.searchParams && URLSearchParams.prototype.isPrototypeOf(Q) ? this._bodyText = Q.toString() : p.arrayBuffer && p.blob && y(Q) ? (this._bodyArrayBuffer = z(Q.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : p.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(Q) || S(Q)) ? this._bodyArrayBuffer = z(Q) : this._bodyText = Q = Object.prototype.toString.call(Q) : this._bodyText = "", this.headers.get("content-type") || (typeof Q == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : p.searchParams && URLSearchParams.prototype.isPrototypeOf(Q) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
            }, p.blob && (this.blob = function() {
              var Q = D(this);
              if (Q)
                return Q;
              if (this._bodyBlob)
                return Promise.resolve(this._bodyBlob);
              if (this._bodyArrayBuffer)
                return Promise.resolve(new Blob([this._bodyArrayBuffer]));
              if (this._bodyFormData)
                throw new Error("could not read FormData body as blob");
              return Promise.resolve(new Blob([this._bodyText]));
            }, this.arrayBuffer = function() {
              if (this._bodyArrayBuffer) {
                var Q = D(this);
                return Q || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
                  this._bodyArrayBuffer.buffer.slice(
                    this._bodyArrayBuffer.byteOffset,
                    this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
                  )
                ) : Promise.resolve(this._bodyArrayBuffer));
              } else
                return this.blob().then($);
            }), this.text = function() {
              var Q = D(this);
              if (Q)
                return Q;
              if (this._bodyBlob)
                return B(this._bodyBlob);
              if (this._bodyArrayBuffer)
                return Promise.resolve(V(this._bodyArrayBuffer));
              if (this._bodyFormData)
                throw new Error("could not read FormData body as text");
              return Promise.resolve(this._bodyText);
            }, p.formData && (this.formData = function() {
              return this.text().then(Oe);
            }), this.json = function() {
              return this.text().then(JSON.parse);
            }, this;
          }
          var ie = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
          function ue(Q) {
            var ae = Q.toUpperCase();
            return ie.indexOf(ae) > -1 ? ae : Q;
          }
          function Re(Q, ae) {
            if (!(this instanceof Re))
              throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
            ae = ae || {};
            var le = ae.body;
            if (Q instanceof Re) {
              if (Q.bodyUsed)
                throw new TypeError("Already read");
              this.url = Q.url, this.credentials = Q.credentials, ae.headers || (this.headers = new N(Q.headers)), this.method = Q.method, this.mode = Q.mode, this.signal = Q.signal, !le && Q._bodyInit != null && (le = Q._bodyInit, Q.bodyUsed = !0);
            } else
              this.url = String(Q);
            if (this.credentials = ae.credentials || this.credentials || "same-origin", (ae.headers || !this.headers) && (this.headers = new N(ae.headers)), this.method = ue(ae.method || this.method || "GET"), this.mode = ae.mode || this.mode || null, this.signal = ae.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && le)
              throw new TypeError("Body not allowed for GET or HEAD requests");
            if (this._initBody(le), (this.method === "GET" || this.method === "HEAD") && (ae.cache === "no-store" || ae.cache === "no-cache")) {
              var se = /([?&])_=[^&]*/;
              if (se.test(this.url))
                this.url = this.url.replace(se, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
              else {
                var Ae = /\?/;
                this.url += (Ae.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
              }
            }
          }
          Re.prototype.clone = function() {
            return new Re(this, { body: this._bodyInit });
          };
          function Oe(Q) {
            var ae = new FormData();
            return Q.trim().split("&").forEach(function(le) {
              if (le) {
                var se = le.split("="), Ae = se.shift().replace(/\+/g, " "), q = se.join("=").replace(/\+/g, " ");
                ae.append(decodeURIComponent(Ae), decodeURIComponent(q));
              }
            }), ae;
          }
          function $e(Q) {
            var ae = new N(), le = Q.replace(/\r?\n[\t ]+/g, " ");
            return le.split("\r").map(function(se) {
              return se.indexOf(`
`) === 0 ? se.substr(1, se.length) : se;
            }).forEach(function(se) {
              var Ae = se.split(":"), q = Ae.shift().trim();
              if (q) {
                var Z = Ae.join(":").trim();
                ae.append(q, Z);
              }
            }), ae;
          }
          G.call(Re.prototype);
          function Ee(Q, ae) {
            if (!(this instanceof Ee))
              throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
            ae || (ae = {}), this.type = "default", this.status = ae.status === void 0 ? 200 : ae.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = ae.statusText === void 0 ? "" : "" + ae.statusText, this.headers = new N(ae.headers), this.url = ae.url || "", this._initBody(Q);
          }
          G.call(Ee.prototype), Ee.prototype.clone = function() {
            return new Ee(this._bodyInit, {
              status: this.status,
              statusText: this.statusText,
              headers: new N(this.headers),
              url: this.url
            });
          }, Ee.error = function() {
            var Q = new Ee(null, { status: 0, statusText: "" });
            return Q.type = "error", Q;
          };
          var Fe = [301, 302, 303, 307, 308];
          Ee.redirect = function(Q, ae) {
            if (Fe.indexOf(ae) === -1)
              throw new RangeError("Invalid status code");
            return new Ee(null, { status: ae, headers: { location: Q } });
          }, u.DOMException = c.DOMException;
          try {
            new u.DOMException();
          } catch {
            u.DOMException = function(ae, le) {
              this.message = ae, this.name = le;
              var se = Error(ae);
              this.stack = se.stack;
            }, u.DOMException.prototype = Object.create(Error.prototype), u.DOMException.prototype.constructor = u.DOMException;
          }
          function Ne(Q, ae) {
            return new Promise(function(le, se) {
              var Ae = new Re(Q, ae);
              if (Ae.signal && Ae.signal.aborted)
                return se(new u.DOMException("Aborted", "AbortError"));
              var q = new XMLHttpRequest();
              function Z() {
                q.abort();
              }
              q.onload = function() {
                var Le = {
                  status: q.status,
                  statusText: q.statusText,
                  headers: $e(q.getAllResponseHeaders() || "")
                };
                Le.url = "responseURL" in q ? q.responseURL : Le.headers.get("X-Request-URL");
                var Me = "response" in q ? q.response : q.responseText;
                setTimeout(function() {
                  le(new Ee(Me, Le));
                }, 0);
              }, q.onerror = function() {
                setTimeout(function() {
                  se(new TypeError("Network request failed"));
                }, 0);
              }, q.ontimeout = function() {
                setTimeout(function() {
                  se(new TypeError("Network request failed"));
                }, 0);
              }, q.onabort = function() {
                setTimeout(function() {
                  se(new u.DOMException("Aborted", "AbortError"));
                }, 0);
              };
              function ee(Le) {
                try {
                  return Le === "" && c.location.href ? c.location.href : Le;
                } catch {
                  return Le;
                }
              }
              q.open(Ae.method, ee(Ae.url), !0), Ae.credentials === "include" ? q.withCredentials = !0 : Ae.credentials === "omit" && (q.withCredentials = !1), "responseType" in q && (p.blob ? q.responseType = "blob" : p.arrayBuffer && Ae.headers.get("Content-Type") && Ae.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (q.responseType = "arraybuffer")), ae && typeof ae.headers == "object" && !(ae.headers instanceof N) ? Object.getOwnPropertyNames(ae.headers).forEach(function(Le) {
                q.setRequestHeader(Le, T(ae.headers[Le]));
              }) : Ae.headers.forEach(function(Le, Me) {
                q.setRequestHeader(Me, Le);
              }), Ae.signal && (Ae.signal.addEventListener("abort", Z), q.onreadystatechange = function() {
                q.readyState === 4 && Ae.signal.removeEventListener("abort", Z);
              }), q.send(typeof Ae._bodyInit > "u" ? null : Ae._bodyInit);
            });
          }
          return Ne.polyfill = !0, c.fetch || (c.fetch = Ne, c.Headers = N, c.Request = Re, c.Response = Ee), u.Headers = N, u.Request = Re, u.Response = Ee, u.fetch = Ne, u;
        })({});
      })(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
      var a = t.fetch ? t : i;
      e = a.fetch, e.default = a.fetch, e.fetch = a.fetch, e.Headers = a.Headers, e.Request = a.Request, e.Response = a.Response, n.exports = e;
    }(ab, ab.exports)), ab.exports;
  }
  (function(n, e) {
    var t;
    if (typeof fetch == "function" && (typeof Ko < "u" && Ko.fetch ? t = Ko.fetch : typeof window < "u" && window.fetch ? t = window.fetch : t = fetch), typeof J8 < "u" && (typeof window > "u" || typeof window.document > "u")) {
      var i = t || eB();
      i.default && (i = i.default), e.default = i, n.exports = e.default;
    }
  })(YO, YO.exports);
  var j2 = YO.exports;
  const U2 = /* @__PURE__ */ Cw(j2), jP = /* @__PURE__ */ A2({
    __proto__: null,
    default: U2
  }, [j2]);
  function Wb(n) {
    "@babel/helpers - typeof";
    return Wb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
      return typeof e;
    } : function(e) {
      return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    }, Wb(n);
  }
  var _p;
  typeof fetch == "function" && (typeof global < "u" && global.fetch ? _p = global.fetch : typeof window < "u" && window.fetch ? _p = window.fetch : _p = fetch);
  var wE;
  F2() && (typeof global < "u" && global.XMLHttpRequest ? wE = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (wE = window.XMLHttpRequest));
  var Gb;
  typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Gb = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Gb = window.ActiveXObject));
  !_p && jP && !wE && !Gb && (_p = U2 || jP);
  typeof _p != "function" && (_p = void 0);
  var qO = function(e, t) {
    if (t && Wb(t) === "object") {
      var i = "";
      for (var a in t)
        i += "&" + encodeURIComponent(a) + "=" + encodeURIComponent(t[a]);
      if (!i)
        return e;
      e = e + (e.indexOf("?") !== -1 ? "&" : "?") + i.slice(1);
    }
    return e;
  }, UP = function(e, t, i) {
    var a = function(u) {
      if (!u.ok)
        return i(u.statusText || "Error", {
          status: u.status
        });
      u.text().then(function(c) {
        i(null, {
          status: u.status,
          data: c
        });
      }).catch(i);
    };
    typeof fetch == "function" ? fetch(e, t).then(a).catch(i) : _p(e, t).then(a).catch(i);
  }, zP = !1, tB = function(e, t, i, a) {
    e.queryStringParams && (t = qO(t, e.queryStringParams));
    var o = GO({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
    typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), i && (o["Content-Type"] = "application/json");
    var u = typeof e.requestOptions == "function" ? e.requestOptions(i) : e.requestOptions, c = GO({
      method: i ? "POST" : "GET",
      body: i ? e.stringify(i) : void 0,
      headers: o
    }, zP ? {} : u);
    try {
      UP(t, c, a);
    } catch (p) {
      if (!u || Object.keys(u).length === 0 || !p.message || p.message.indexOf("not implemented") < 0)
        return a(p);
      try {
        Object.keys(u).forEach(function(y) {
          delete c[y];
        }), UP(t, c, a), zP = !0;
      } catch (y) {
        a(y);
      }
    }
  }, nB = function(e, t, i, a) {
    i && Wb(i) === "object" && (i = qO("", i).slice(1)), e.queryStringParams && (t = qO(t, e.queryStringParams));
    try {
      var o;
      wE ? o = new wE() : o = new Gb("MSXML2.XMLHTTP.3.0"), o.open(i ? "POST" : "GET", t, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, i && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
      var u = e.customHeaders;
      if (u = typeof u == "function" ? u() : u, u)
        for (var c in u)
          o.setRequestHeader(c, u[c]);
      o.onreadystatechange = function() {
        o.readyState > 3 && a(o.status >= 400 ? o.statusText : null, {
          status: o.status,
          data: o.responseText
        });
      }, o.send(i);
    } catch (p) {
      console && console.log(p);
    }
  }, iB = function(e, t, i, a) {
    if (typeof i == "function" && (a = i, i = void 0), a = a || function() {
    }, _p && t.indexOf("file:") !== 0)
      return tB(e, t, i, a);
    if (F2() || typeof ActiveXObject == "function")
      return nB(e, t, i, a);
    a(new Error("No fetch and no xhr implementation found!"));
  };
  function CE(n) {
    "@babel/helpers - typeof";
    return CE = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
      return typeof e;
    } : function(e) {
      return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    }, CE(n);
  }
  function rB(n, e) {
    if (!(n instanceof e))
      throw new TypeError("Cannot call a class as a function");
  }
  function $P(n, e) {
    for (var t = 0; t < e.length; t++) {
      var i = e[t];
      i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, z2(i.key), i);
    }
  }
  function aB(n, e, t) {
    return e && $P(n.prototype, e), t && $P(n, t), Object.defineProperty(n, "prototype", { writable: !1 }), n;
  }
  function sB(n, e, t) {
    return e = z2(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
  }
  function z2(n) {
    var e = oB(n, "string");
    return CE(e) === "symbol" ? e : String(e);
  }
  function oB(n, e) {
    if (CE(n) !== "object" || n === null)
      return n;
    var t = n[Symbol.toPrimitive];
    if (t !== void 0) {
      var i = t.call(n, e || "default");
      if (CE(i) !== "object")
        return i;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (e === "string" ? String : Number)(n);
  }
  var lB = function() {
    return {
      loadPath: "/locales/{{lng}}/{{ns}}.json",
      addPath: "/locales/add/{{lng}}/{{ns}}",
      parse: function(t) {
        return JSON.parse(t);
      },
      stringify: JSON.stringify,
      parsePayload: function(t, i, a) {
        return sB({}, i, a || "");
      },
      parseLoadPayload: function(t, i) {
      },
      request: iB,
      reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
      customHeaders: {},
      queryStringParams: {},
      crossDomain: !1,
      withCredentials: !1,
      overrideMimeType: !1,
      requestOptions: {
        mode: "cors",
        credentials: "same-origin",
        cache: "default"
      }
    };
  }, $2 = function() {
    function n(e) {
      var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      rB(this, n), this.services = e, this.options = t, this.allOptions = i, this.type = "backend", this.init(e, t, i);
    }
    return aB(n, [{
      key: "init",
      value: function(t) {
        var i = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
        this.services = t, this.options = GO(a, this.options || {}, lB()), this.allOptions = o, this.services && this.options.reloadInterval && setInterval(function() {
          return i.reload();
        }, this.options.reloadInterval);
      }
    }, {
      key: "readMulti",
      value: function(t, i, a) {
        this._readAny(t, t, i, i, a);
      }
    }, {
      key: "read",
      value: function(t, i, a) {
        this._readAny([t], t, [i], i, a);
      }
    }, {
      key: "_readAny",
      value: function(t, i, a, o, u) {
        var c = this, p = this.options.loadPath;
        typeof this.options.loadPath == "function" && (p = this.options.loadPath(t, a)), p = Q8(p), p.then(function(y) {
          if (!y)
            return u(null, {});
          var _ = c.services.interpolator.interpolate(y, {
            lng: t.join("+"),
            ns: a.join("+")
          });
          c.loadUrl(_, u, i, o);
        });
      }
    }, {
      key: "loadUrl",
      value: function(t, i, a, o) {
        var u = this, c = typeof a == "string" ? [a] : a, p = typeof o == "string" ? [o] : o, y = this.options.parseLoadPayload(c, p);
        this.options.request(this.options, t, y, function(_, S) {
          if (S && (S.status >= 500 && S.status < 600 || !S.status))
            return i("failed loading " + t + "; status code: " + S.status, !0);
          if (S && S.status >= 400 && S.status < 500)
            return i("failed loading " + t + "; status code: " + S.status, !1);
          if (!S && _ && _.message && _.message.indexOf("Failed to fetch") > -1)
            return i("failed loading " + t + ": " + _.message, !0);
          if (_)
            return i(_, !1);
          var b, T;
          try {
            typeof S.data == "string" ? b = u.options.parse(S.data, a, o) : b = S.data;
          } catch {
            T = "failed parsing " + t + " to json";
          }
          if (T)
            return i(T, !1);
          i(null, b);
        });
      }
    }, {
      key: "create",
      value: function(t, i, a, o, u) {
        var c = this;
        if (this.options.addPath) {
          typeof t == "string" && (t = [t]);
          var p = this.options.parsePayload(i, a, o), y = 0, _ = [], S = [];
          t.forEach(function(b) {
            var T = c.options.addPath;
            typeof c.options.addPath == "function" && (T = c.options.addPath(b, i));
            var O = c.services.interpolator.interpolate(T, {
              lng: b,
              ns: i
            });
            c.options.request(c.options, O, p, function(N, D) {
              y += 1, _.push(N), S.push(D), y === t.length && typeof u == "function" && u(_, S);
            });
          });
        }
      }
    }, {
      key: "reload",
      value: function() {
        var t = this, i = this.services, a = i.backendConnector, o = i.languageUtils, u = i.logger, c = a.language;
        if (!(c && c.toLowerCase() === "cimode")) {
          var p = [], y = function(S) {
            var b = o.toResolveHierarchy(S);
            b.forEach(function(T) {
              p.indexOf(T) < 0 && p.push(T);
            });
          };
          y(c), this.allOptions.preload && this.allOptions.preload.forEach(function(_) {
            return y(_);
          }), p.forEach(function(_) {
            t.allOptions.ns.forEach(function(S) {
              a.read(_, S, "read", null, null, function(b, T) {
                b && u.warn("loading namespace ".concat(S, " for language ").concat(_, " failed"), b), !b && T && u.log("loaded namespace ".concat(S, " for language ").concat(_), T), a.loaded("".concat(_, "|").concat(S), b, T);
              });
            });
          });
        }
      }
    }]), n;
  }();
  $2.type = "backend";
  function uB() {
    if (console && console.warn) {
      for (var n = arguments.length, e = new Array(n), t = 0; t < n; t++)
        e[t] = arguments[t];
      typeof e[0] == "string" && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
    }
  }
  const BP = {};
  function XO() {
    for (var n = arguments.length, e = new Array(n), t = 0; t < n; t++)
      e[t] = arguments[t];
    typeof e[0] == "string" && BP[e[0]] || (typeof e[0] == "string" && (BP[e[0]] = /* @__PURE__ */ new Date()), uB(...e));
  }
  const B2 = (n, e) => () => {
    if (n.isInitialized)
      e();
    else {
      const t = () => {
        setTimeout(() => {
          n.off("initialized", t);
        }, 0), e();
      };
      n.on("initialized", t);
    }
  };
  function VP(n, e, t) {
    n.loadNamespaces(e, B2(n, t));
  }
  function HP(n, e, t, i) {
    typeof t == "string" && (t = [t]), t.forEach((a) => {
      n.options.ns.indexOf(a) < 0 && n.options.ns.push(a);
    }), n.loadLanguages(e, B2(n, i));
  }
  function cB(n, e) {
    let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
    const i = e.languages[0], a = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
    if (i.toLowerCase() === "cimode")
      return !0;
    const u = (c, p) => {
      const y = e.services.backendConnector.state[`${c}|${p}`];
      return y === -1 || y === 2;
    };
    return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !u(e.isLanguageChangingTo, n) ? !1 : !!(e.hasResourceBundle(i, n) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || u(i, n) && (!a || u(o, n)));
  }
  function fB(n, e) {
    let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
    return !e.languages || !e.languages.length ? (XO("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(n, {
      lng: t.lng,
      precheck: (a, o) => {
        if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !o(a.isLanguageChangingTo, n))
          return !1;
      }
    }) : cB(n, e, t);
  }
  const hB = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, dB = {
    "&amp;": "&",
    "&#38;": "&",
    "&lt;": "<",
    "&#60;": "<",
    "&gt;": ">",
    "&#62;": ">",
    "&apos;": "'",
    "&#39;": "'",
    "&quot;": '"',
    "&#34;": '"',
    "&nbsp;": " ",
    "&#160;": " ",
    "&copy;": "©",
    "&#169;": "©",
    "&reg;": "®",
    "&#174;": "®",
    "&hellip;": "…",
    "&#8230;": "…",
    "&#x2F;": "/",
    "&#47;": "/"
  }, pB = (n) => dB[n], gB = (n) => n.replace(hB, pB);
  let KO = {
    bindI18n: "languageChanged",
    bindI18nStore: "",
    transEmptyNodeValue: "",
    transSupportBasicHtmlNodes: !0,
    transWrapTextNodes: "",
    transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
    useSuspense: !0,
    unescape: gB
  };
  function mB() {
    let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    KO = {
      ...KO,
      ...n
    };
  }
  function vB() {
    return KO;
  }
  let V2;
  function yB(n) {
    V2 = n;
  }
  function _B() {
    return V2;
  }
  const EB = {
    type: "3rdParty",
    init(n) {
      mB(n.options.react), yB(n);
    }
  }, SB = Kt.createContext();
  class xB {
    constructor() {
      this.usedNamespaces = {};
    }
    addUsedNamespaces(e) {
      e.forEach((t) => {
        this.usedNamespaces[t] || (this.usedNamespaces[t] = !0);
      });
    }
    getUsedNamespaces() {
      return Object.keys(this.usedNamespaces);
    }
  }
  const bB = (n, e) => {
    const t = Kt.useRef();
    return Kt.useEffect(() => {
      t.current = e ? t.current : n;
    }, [n, e]), t.current;
  };
  function Rs(n) {
    let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
    const {
      i18n: t
    } = e, {
      i18n: i,
      defaultNS: a
    } = Kt.useContext(SB) || {}, o = t || i || _B();
    if (o && !o.reportNamespaces && (o.reportNamespaces = new xB()), !o) {
      XO("You will need to pass in an i18next instance by using initReactI18next");
      const B = (z, G) => typeof G == "string" ? G : G && typeof G == "object" && typeof G.defaultValue == "string" ? G.defaultValue : Array.isArray(z) ? z[z.length - 1] : z, V = [B, {}, !1];
      return V.t = B, V.i18n = {}, V.ready = !1, V;
    }
    o.options.react && o.options.react.wait !== void 0 && XO("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
    const u = {
      ...vB(),
      ...o.options.react,
      ...e
    }, {
      useSuspense: c,
      keyPrefix: p
    } = u;
    let y = n || a || o.options && o.options.defaultNS;
    y = typeof y == "string" ? [y] : y || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(y);
    const _ = (o.isInitialized || o.initializedStoreOnce) && y.every((B) => fB(B, o, u));
    function S() {
      return o.getFixedT(e.lng || null, u.nsMode === "fallback" ? y : y[0], p);
    }
    const [b, T] = Kt.useState(S);
    let O = y.join();
    e.lng && (O = `${e.lng}${O}`);
    const N = bB(O), D = Kt.useRef(!0);
    Kt.useEffect(() => {
      const {
        bindI18n: B,
        bindI18nStore: V
      } = u;
      D.current = !0, !_ && !c && (e.lng ? HP(o, e.lng, y, () => {
        D.current && T(S);
      }) : VP(o, y, () => {
        D.current && T(S);
      })), _ && N && N !== O && D.current && T(S);
      function z() {
        D.current && T(S);
      }
      return B && o && o.on(B, z), V && o && o.store.on(V, z), () => {
        D.current = !1, B && o && B.split(" ").forEach((G) => o.off(G, z)), V && o && V.split(" ").forEach((G) => o.store.off(G, z));
      };
    }, [o, O]);
    const k = Kt.useRef(!0);
    Kt.useEffect(() => {
      D.current && !k.current && T(S), k.current = !1;
    }, [o, p]);
    const $ = [b, o, _];
    if ($.t = b, $.i18n = o, $.ready = _, _ || !_ && !c)
      return $;
    throw new Promise((B) => {
      e.lng ? HP(o, e.lng, y, () => B()) : VP(o, y, () => B());
    });
  }
  Ts.use(P2).use($2).use(EB).init({
    ns: ["locale"],
    defaultNS: "locale",
    fallbackLng: "en",
    interpolation: {
      escapeValue: !1
    },
    backend: {
      loadPath: window.applicationUrl + "static/i18n/{{lng}}/{{ns}}.json"
    },
    react: {
      useSuspense: !1
    }
  });
  const Y0 = {
    // use the radius of the Normal sphere
    radians: 6370997 / (2 * Math.PI),
    degrees: 2 * Math.PI * 6370997 / 360,
    ft: 0.3048,
    m: 1,
    "us-ft": 1200 / 3937
  };
  let wB = class {
    /**
     * @param {Options} options Projection options.
     */
    constructor(e) {
      this.code_ = e.code, this.units_ = /** @type {import("./Units.js").Units} */
      e.units, this.extent_ = e.extent !== void 0 ? e.extent : null, this.worldExtent_ = e.worldExtent !== void 0 ? e.worldExtent : null, this.axisOrientation_ = e.axisOrientation !== void 0 ? e.axisOrientation : "enu", this.global_ = e.global !== void 0 ? e.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = e.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = e.metersPerUnit;
    }
    /**
     * @return {boolean} The projection is suitable for wrapping the x-axis
     */
    canWrapX() {
      return this.canWrapX_;
    }
    /**
     * Get the code for this projection, e.g. 'EPSG:4326'.
     * @return {string} Code.
     * @api
     */
    getCode() {
      return this.code_;
    }
    /**
     * Get the validity extent for this projection.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getExtent() {
      return this.extent_;
    }
    /**
     * Get the units of this projection.
     * @return {import("./Units.js").Units} Units.
     * @api
     */
    getUnits() {
      return this.units_;
    }
    /**
     * Get the amount of meters per unit of this projection.  If the projection is
     * not configured with `metersPerUnit` or a units identifier, the return is
     * `undefined`.
     * @return {number|undefined} Meters.
     * @api
     */
    getMetersPerUnit() {
      return this.metersPerUnit_ || Y0[this.units_];
    }
    /**
     * Get the world extent for this projection.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getWorldExtent() {
      return this.worldExtent_;
    }
    /**
     * Get the axis orientation of this projection.
     * Example values are:
     * enu - the default easting, northing, elevation.
     * neu - northing, easting, up - useful for "lat/long" geographic coordinates,
     *     or south orientated transverse mercator.
     * wnu - westing, northing, up - some planetary coordinate systems have
     *     "west positive" coordinate systems
     * @return {string} Axis orientation.
     * @api
     */
    getAxisOrientation() {
      return this.axisOrientation_;
    }
    /**
     * Is this projection a global projection which spans the whole world?
     * @return {boolean} Whether the projection is global.
     * @api
     */
    isGlobal() {
      return this.global_;
    }
    /**
     * Set if the projection is a global projection which spans the whole world
     * @param {boolean} global Whether the projection is global.
     * @api
     */
    setGlobal(e) {
      this.global_ = e, this.canWrapX_ = !!(e && this.extent_);
    }
    /**
     * @return {import("../tilegrid/TileGrid.js").default} The default tile grid.
     */
    getDefaultTileGrid() {
      return this.defaultTileGrid_;
    }
    /**
     * @param {import("../tilegrid/TileGrid.js").default} tileGrid The default tile grid.
     */
    setDefaultTileGrid(e) {
      this.defaultTileGrid_ = e;
    }
    /**
     * Set the validity extent for this projection.
     * @param {import("../extent.js").Extent} extent Extent.
     * @api
     */
    setExtent(e) {
      this.extent_ = e, this.canWrapX_ = !!(this.global_ && e);
    }
    /**
     * Set the world extent for this projection.
     * @param {import("../extent.js").Extent} worldExtent World extent
     *     [minlon, minlat, maxlon, maxlat].
     * @api
     */
    setWorldExtent(e) {
      this.worldExtent_ = e;
    }
    /**
     * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}
     * for this projection.
     * @param {function(number, import("../coordinate.js").Coordinate):number} func Function
     * @api
     */
    setGetPointResolution(e) {
      this.getPointResolutionFunc_ = e;
    }
    /**
     * Get the custom point resolution function for this projection (if set).
     * @return {function(number, import("../coordinate.js").Coordinate):number|undefined} The custom point
     * resolution function (if set).
     */
    getPointResolutionFunc() {
      return this.getPointResolutionFunc_;
    }
  };
  const VA = wB, qE = 6378137, P0 = Math.PI * qE, CB = [-P0, -P0, P0, P0], TB = [-180, -85, 180, 85], sb = qE * Math.log(Math.tan(Math.PI / 2));
  class E0 extends VA {
    /**
     * @param {string} code Code.
     */
    constructor(e) {
      super({
        code: e,
        units: "m",
        extent: CB,
        global: !0,
        worldExtent: TB,
        getPointResolution: function(t, i) {
          return t / Math.cosh(i[1] / qE);
        }
      });
    }
  }
  const WP = [
    new E0("EPSG:3857"),
    new E0("EPSG:102100"),
    new E0("EPSG:102113"),
    new E0("EPSG:900913"),
    new E0("http://www.opengis.net/def/crs/EPSG/0/3857"),
    new E0("http://www.opengis.net/gml/srs/epsg.xml#3857")
  ];
  function RB(n, e, t) {
    const i = n.length;
    t = t > 1 ? t : 2, e === void 0 && (t > 2 ? e = n.slice() : e = new Array(i));
    for (let a = 0; a < i; a += t) {
      e[a] = P0 * n[a] / 180;
      let o = qE * Math.log(Math.tan(Math.PI * (+n[a + 1] + 90) / 360));
      o > sb ? o = sb : o < -sb && (o = -sb), e[a + 1] = o;
    }
    return e;
  }
  function MB(n, e, t) {
    const i = n.length;
    t = t > 1 ? t : 2, e === void 0 && (t > 2 ? e = n.slice() : e = new Array(i));
    for (let a = 0; a < i; a += t)
      e[a] = 180 * n[a] / P0, e[a + 1] = 360 * Math.atan(Math.exp(n[a + 1] / qE)) / Math.PI - 90;
    return e;
  }
  const OB = 6378137, GP = [-180, -90, 180, 90], AB = Math.PI * OB / 180;
  class xv extends VA {
    /**
     * @param {string} code Code.
     * @param {string} [axisOrientation] Axis orientation.
     */
    constructor(e, t) {
      super({
        code: e,
        units: "degrees",
        extent: GP,
        axisOrientation: t,
        global: !0,
        metersPerUnit: AB,
        worldExtent: GP
      });
    }
  }
  const YP = [
    new xv("CRS:84"),
    new xv("EPSG:4326", "neu"),
    new xv("urn:ogc:def:crs:OGC:1.3:CRS84"),
    new xv("urn:ogc:def:crs:OGC:2:84"),
    new xv("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),
    new xv("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
    new xv("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
  ];
  let ZO = {};
  function LB(n) {
    return ZO[n] || ZO[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
  }
  function NB(n, e) {
    ZO[n] = e;
  }
  function XE(n) {
    for (const e in n)
      delete n[e];
  }
  function q0(n) {
    let e;
    for (e in n)
      return !1;
    return !e;
  }
  let V0 = {};
  function X0(n, e, t) {
    const i = n.getCode(), a = e.getCode();
    i in V0 || (V0[i] = {}), V0[i][a] = t;
  }
  function H2(n, e) {
    let t;
    return n in V0 && e in V0[n] && (t = V0[n][e]), t;
  }
  const bs = {
    UNKNOWN: 0,
    INTERSECTING: 1,
    ABOVE: 2,
    RIGHT: 4,
    BELOW: 8,
    LEFT: 16
  };
  function QO(n) {
    const e = Su();
    for (let t = 0, i = n.length; t < i; ++t)
      vE(e, n[t]);
    return e;
  }
  function DB(n, e, t) {
    const i = Math.min.apply(null, n), a = Math.min.apply(null, e), o = Math.max.apply(null, n), u = Math.max.apply(null, e);
    return wp(i, a, o, u, t);
  }
  function TE(n, e, t) {
    return t ? (t[0] = n[0] - e, t[1] = n[1] - e, t[2] = n[2] + e, t[3] = n[3] + e, t) : [
      n[0] - e,
      n[1] - e,
      n[2] + e,
      n[3] + e
    ];
  }
  function W2(n, e) {
    return e ? (e[0] = n[0], e[1] = n[1], e[2] = n[2], e[3] = n[3], e) : n.slice();
  }
  function Rw(n, e, t) {
    let i, a;
    return e < n[0] ? i = n[0] - e : n[2] < e ? i = e - n[2] : i = 0, t < n[1] ? a = n[1] - t : n[3] < t ? a = t - n[3] : a = 0, i * i + a * a;
  }
  function KE(n, e) {
    return HA(n, e[0], e[1]);
  }
  function xf(n, e) {
    return n[0] <= e[0] && e[2] <= n[2] && n[1] <= e[1] && e[3] <= n[3];
  }
  function HA(n, e, t) {
    return n[0] <= e && e <= n[2] && n[1] <= t && t <= n[3];
  }
  function JO(n, e) {
    const t = n[0], i = n[1], a = n[2], o = n[3], u = e[0], c = e[1];
    let p = bs.UNKNOWN;
    return u < t ? p = p | bs.LEFT : u > a && (p = p | bs.RIGHT), c < i ? p = p | bs.BELOW : c > o && (p = p | bs.ABOVE), p === bs.UNKNOWN && (p = bs.INTERSECTING), p;
  }
  function Su() {
    return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
  }
  function wp(n, e, t, i, a) {
    return a ? (a[0] = n, a[1] = e, a[2] = t, a[3] = i, a) : [n, e, t, i];
  }
  function ZE(n) {
    return wp(1 / 0, 1 / 0, -1 / 0, -1 / 0, n);
  }
  function G2(n, e) {
    const t = n[0], i = n[1];
    return wp(t, i, t, i, e);
  }
  function WA(n, e, t, i, a) {
    const o = ZE(a);
    return Y2(o, n, e, t, i);
  }
  function K0(n, e) {
    return n[0] == e[0] && n[2] == e[2] && n[1] == e[1] && n[3] == e[3];
  }
  function IB(n, e) {
    return e[0] < n[0] && (n[0] = e[0]), e[2] > n[2] && (n[2] = e[2]), e[1] < n[1] && (n[1] = e[1]), e[3] > n[3] && (n[3] = e[3]), n;
  }
  function vE(n, e) {
    e[0] < n[0] && (n[0] = e[0]), e[0] > n[2] && (n[2] = e[0]), e[1] < n[1] && (n[1] = e[1]), e[1] > n[3] && (n[3] = e[1]);
  }
  function Y2(n, e, t, i, a) {
    for (; t < i; t += a)
      PB(n, e[t], e[t + 1]);
    return n;
  }
  function PB(n, e, t) {
    n[0] = Math.min(n[0], e), n[1] = Math.min(n[1], t), n[2] = Math.max(n[2], e), n[3] = Math.max(n[3], t);
  }
  function q2(n, e) {
    let t;
    return t = e(Mw(n)), t || (t = e(Ow(n)), t) || (t = e(Aw(n)), t) || (t = e(Xv(n)), t) ? t : !1;
  }
  function eA(n) {
    let e = 0;
    return Kv(n) || (e = _i(n) * Cs(n)), e;
  }
  function Mw(n) {
    return [n[0], n[1]];
  }
  function Ow(n) {
    return [n[2], n[1]];
  }
  function Cp(n) {
    return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2];
  }
  function kB(n, e) {
    let t;
    if (e === "bottom-left")
      t = Mw(n);
    else if (e === "bottom-right")
      t = Ow(n);
    else if (e === "top-left")
      t = Xv(n);
    else if (e === "top-right")
      t = Aw(n);
    else
      throw new Error("Invalid corner");
    return t;
  }
  function RE(n, e, t, i, a) {
    const [o, u, c, p, y, _, S, b] = tA(
      n,
      e,
      t,
      i
    );
    return wp(
      Math.min(o, c, y, S),
      Math.min(u, p, _, b),
      Math.max(o, c, y, S),
      Math.max(u, p, _, b),
      a
    );
  }
  function tA(n, e, t, i) {
    const a = e * i[0] / 2, o = e * i[1] / 2, u = Math.cos(t), c = Math.sin(t), p = a * u, y = a * c, _ = o * u, S = o * c, b = n[0], T = n[1];
    return [
      b - p + S,
      T - y - _,
      b - p - S,
      T - y + _,
      b + p - S,
      T + y + _,
      b + p + S,
      T + y - _,
      b - p + S,
      T - y - _
    ];
  }
  function Cs(n) {
    return n[3] - n[1];
  }
  function Iv(n, e, t) {
    const i = t || Su();
    return Zo(n, e) ? (n[0] > e[0] ? i[0] = n[0] : i[0] = e[0], n[1] > e[1] ? i[1] = n[1] : i[1] = e[1], n[2] < e[2] ? i[2] = n[2] : i[2] = e[2], n[3] < e[3] ? i[3] = n[3] : i[3] = e[3]) : ZE(i), i;
  }
  function Xv(n) {
    return [n[0], n[3]];
  }
  function Aw(n) {
    return [n[2], n[3]];
  }
  function _i(n) {
    return n[2] - n[0];
  }
  function Zo(n, e) {
    return n[0] <= e[2] && n[2] >= e[0] && n[1] <= e[3] && n[3] >= e[1];
  }
  function Kv(n) {
    return n[2] < n[0] || n[3] < n[1];
  }
  function FB(n, e) {
    return e ? (e[0] = n[0], e[1] = n[1], e[2] = n[2], e[3] = n[3], e) : n;
  }
  function jB(n, e, t) {
    let i = !1;
    const a = JO(n, e), o = JO(n, t);
    if (a === bs.INTERSECTING || o === bs.INTERSECTING)
      i = !0;
    else {
      const u = n[0], c = n[1], p = n[2], y = n[3], _ = e[0], S = e[1], b = t[0], T = t[1], O = (T - S) / (b - _);
      let N, D;
      o & bs.ABOVE && !(a & bs.ABOVE) && (N = b - (T - y) / O, i = N >= u && N <= p), !i && o & bs.RIGHT && !(a & bs.RIGHT) && (D = T - (b - p) * O, i = D >= c && D <= y), !i && o & bs.BELOW && !(a & bs.BELOW) && (N = b - (T - c) / O, i = N >= u && N <= p), !i && o & bs.LEFT && !(a & bs.LEFT) && (D = T - (b - u) * O, i = D >= c && D <= y);
    }
    return i;
  }
  function UB(n, e, t, i) {
    if (Kv(n))
      return ZE(t);
    let a = [];
    if (i > 1) {
      const c = n[2] - n[0], p = n[3] - n[1];
      for (let y = 0; y < i; ++y)
        a.push(
          n[0] + c * y / i,
          n[1],
          n[2],
          n[1] + p * y / i,
          n[2] - c * y / i,
          n[3],
          n[0],
          n[3] - p * y / i
        );
    } else
      a = [
        n[0],
        n[1],
        n[2],
        n[1],
        n[2],
        n[3],
        n[0],
        n[3]
      ];
    e(a, a, 2);
    const o = [], u = [];
    for (let c = 0, p = a.length; c < p; c += 2)
      o.push(a[c]), u.push(a[c + 1]);
    return DB(o, u, t);
  }
  function X2(n, e) {
    const t = e.getExtent(), i = Cp(n);
    if (e.canWrapX() && (i[0] < t[0] || i[0] >= t[2])) {
      const a = _i(t), u = Math.floor(
        (i[0] - t[0]) / a
      ) * a;
      n[0] -= u, n[2] -= u;
    }
    return n;
  }
  function zB(n, e) {
    if (e.canWrapX()) {
      const t = e.getExtent();
      if (!isFinite(n[0]) || !isFinite(n[2]))
        return [[t[0], n[1], t[2], n[3]]];
      X2(n, e);
      const i = _i(t);
      if (_i(n) > i)
        return [[t[0], n[1], t[2], n[3]]];
      if (n[0] < t[0])
        return [
          [n[0] + i, n[1], t[2], n[3]],
          [t[0], n[1], n[2], n[3]]
        ];
      if (n[2] > t[2])
        return [
          [n[0], n[1], t[2], n[3]],
          [t[0], n[1], n[2] - i, n[3]]
        ];
    }
    return [n];
  }
  function da(n, e, t) {
    return Math.min(Math.max(n, e), t);
  }
  function $B(n, e, t, i, a, o) {
    const u = a - t, c = o - i;
    if (u !== 0 || c !== 0) {
      const p = ((n - t) * u + (e - i) * c) / (u * u + c * c);
      p > 1 ? (t = a, i = o) : p > 0 && (t += u * p, i += c * p);
    }
    return Pv(n, e, t, i);
  }
  function Pv(n, e, t, i) {
    const a = t - n, o = i - e;
    return a * a + o * o;
  }
  function BB(n) {
    const e = n.length;
    for (let i = 0; i < e; i++) {
      let a = i, o = Math.abs(n[i][i]);
      for (let c = i + 1; c < e; c++) {
        const p = Math.abs(n[c][i]);
        p > o && (o = p, a = c);
      }
      if (o === 0)
        return null;
      const u = n[a];
      n[a] = n[i], n[i] = u;
      for (let c = i + 1; c < e; c++) {
        const p = -n[c][i] / n[i][i];
        for (let y = i; y < e + 1; y++)
          i == y ? n[c][y] = 0 : n[c][y] += p * n[i][y];
      }
    }
    const t = new Array(e);
    for (let i = e - 1; i >= 0; i--) {
      t[i] = n[i][e] / n[i][i];
      for (let a = i - 1; a >= 0; a--)
        n[a][e] -= n[a][i] * t[i];
    }
    return t;
  }
  function Lb(n) {
    return n * Math.PI / 180;
  }
  function kv(n, e) {
    const t = n % e;
    return t * e < 0 ? t + e : t;
  }
  function _c(n, e, t) {
    return n + t * (e - n);
  }
  function Lw(n, e) {
    const t = Math.pow(10, e);
    return Math.round(n * t) / t;
  }
  function qP(n, e) {
    return Math.round(Lw(n, e));
  }
  function k0(n, e) {
    return Math.floor(Lw(n, e));
  }
  function Gg(n, e) {
    return Math.ceil(Lw(n, e));
  }
  function GA(n, e) {
    const t = ("" + n).split("."), i = ("" + e).split(".");
    for (let a = 0; a < Math.max(t.length, i.length); a++) {
      const o = parseInt(t[a] || "0", 10), u = parseInt(i[a] || "0", 10);
      if (o > u)
        return 1;
      if (u > o)
        return -1;
    }
    return 0;
  }
  function VB(n, e) {
    return n[0] += +e[0], n[1] += +e[1], n;
  }
  function Yb(n, e) {
    let t = !0;
    for (let i = n.length - 1; i >= 0; --i)
      if (n[i] != e[i]) {
        t = !1;
        break;
      }
    return t;
  }
  function YA(n, e) {
    const t = Math.cos(e), i = Math.sin(e), a = n[0] * t - n[1] * i, o = n[1] * t + n[0] * i;
    return n[0] = a, n[1] = o, n;
  }
  function HB(n, e) {
    return n[0] *= e, n[1] *= e, n;
  }
  function K2(n, e) {
    if (e.canWrapX()) {
      const t = _i(e.getExtent()), i = Z2(n, e, t);
      i && (n[0] -= i * t);
    }
    return n;
  }
  function Z2(n, e, t) {
    const i = e.getExtent();
    let a = 0;
    return e.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (t = t || _i(i), a = Math.floor(
      (n[0] - i[0]) / t
    )), a;
  }
  const WB = 63710088e-1;
  function XP(n, e, t) {
    t = t || WB;
    const i = Lb(n[1]), a = Lb(e[1]), o = (a - i) / 2, u = Lb(e[0] - n[0]) / 2, c = Math.sin(o) * Math.sin(o) + Math.sin(u) * Math.sin(u) * Math.cos(i) * Math.cos(a);
    return 2 * t * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c));
  }
  const Q2 = {
    info: 1,
    warn: 2,
    error: 3,
    none: 4
  };
  let GB = Q2.info;
  function J2(...n) {
    GB > Q2.warn || console.warn(...n);
  }
  let nA = !0;
  function YB(n) {
    nA = !(n === void 0 ? !0 : n);
  }
  function qA(n, e) {
    if (e !== void 0) {
      for (let t = 0, i = n.length; t < i; ++t)
        e[t] = n[t];
      e = e;
    } else
      e = n.slice();
    return e;
  }
  function eF(n, e) {
    if (e !== void 0 && n !== e) {
      for (let t = 0, i = n.length; t < i; ++t)
        e[t] = n[t];
      n = e;
    }
    return n;
  }
  function tF(n) {
    NB(n.getCode(), n), X0(n, n, qA);
  }
  function qB(n) {
    n.forEach(tF);
  }
  function Er(n) {
    return typeof n == "string" ? LB(
      /** @type {string} */
      n
    ) : (
      /** @type {Projection} */
      n || null
    );
  }
  function qb(n, e, t, i) {
    n = Er(n);
    let a;
    const o = n.getPointResolutionFunc();
    if (o) {
      if (a = o(e, t), i && i !== n.getUnits()) {
        const u = n.getMetersPerUnit();
        u && (a = a * u / Y0[i]);
      }
    } else {
      const u = n.getUnits();
      if (u == "degrees" && !i || i == "degrees")
        a = e;
      else {
        const c = KA(
          n,
          Er("EPSG:4326")
        );
        if (c === eF && u !== "degrees")
          a = e * n.getMetersPerUnit();
        else {
          let y = [
            t[0] - e / 2,
            t[1],
            t[0] + e / 2,
            t[1],
            t[0],
            t[1] - e / 2,
            t[0],
            t[1] + e / 2
          ];
          y = c(y, y, 2);
          const _ = XP(y.slice(0, 2), y.slice(2, 4)), S = XP(y.slice(4, 6), y.slice(6, 8));
          a = (_ + S) / 2;
        }
        const p = i ? Y0[i] : n.getMetersPerUnit();
        p !== void 0 && (a /= p);
      }
    }
    return a;
  }
  function iA(n) {
    qB(n), n.forEach(function(e) {
      n.forEach(function(t) {
        e !== t && X0(e, t, qA);
      });
    });
  }
  function XB(n, e, t, i) {
    n.forEach(function(a) {
      e.forEach(function(o) {
        X0(a, o, t), X0(o, a, i);
      });
    });
  }
  function XA(n, e) {
    return n ? typeof n == "string" ? Er(n) : (
      /** @type {Projection} */
      n
    ) : Er(e);
  }
  function KP(n) {
    return (
      /**
       * @param {Array<number>} input Input.
       * @param {Array<number>} [output] Output.
       * @param {number} [dimension] Dimension.
       * @return {Array<number>} Output.
       */
      function(e, t, i) {
        const a = e.length;
        i = i !== void 0 ? i : 2, t = t !== void 0 ? t : new Array(a);
        for (let o = 0; o < a; o += i) {
          const u = n(e.slice(o, o + i)), c = u.length;
          for (let p = 0, y = i; p < y; ++p)
            t[o + p] = p >= c ? e[o + p] : u[p];
        }
        return t;
      }
    );
  }
  function KB(n, e, t, i) {
    const a = Er(n), o = Er(e);
    X0(
      a,
      o,
      KP(t)
    ), X0(
      o,
      a,
      KP(i)
    );
  }
  function Ph(n, e) {
    if (n === e)
      return !0;
    const t = n.getUnits() === e.getUnits();
    return (n.getCode() === e.getCode() || KA(n, e) === qA) && t;
  }
  function KA(n, e) {
    const t = n.getCode(), i = e.getCode();
    let a = H2(t, i);
    return a || (a = eF), a;
  }
  function ME(n, e) {
    const t = Er(n), i = Er(e);
    return KA(t, i);
  }
  function ZA(n, e, t) {
    return ME(e, t)(n, void 0, n.length);
  }
  function ZB(n, e, t, i) {
    const a = ME(e, t);
    return UB(n, a, void 0, i);
  }
  function rA(n, e) {
    return n;
  }
  function gp(n, e) {
    return nA && !Yb(n, [0, 0]) && n[0] >= -180 && n[0] <= 180 && n[1] >= -90 && n[1] <= 90 && (nA = !1, J2(
      "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates."
    )), n;
  }
  function nF(n, e) {
    return n;
  }
  function yp(n, e) {
    return n;
  }
  function ZP(n, e, t) {
    return function(i) {
      let a, o;
      if (n.canWrapX()) {
        const u = n.getExtent(), c = _i(u);
        i = i.slice(0), o = Z2(i, n, c), o && (i[0] = i[0] - o * c), i[0] = da(i[0], u[0], u[2]), i[1] = da(i[1], u[1], u[3]), a = t(i);
      } else
        a = t(i);
      return o && e.canWrapX() && (a[0] += o * _i(e.getExtent())), a;
    };
  }
  function QB() {
    iA(WP), iA(YP), XB(
      YP,
      WP,
      RB,
      MB
    );
  }
  QB();
  let JB = null;
  function eV(n) {
    JB = n;
    const e = Object.keys(n.defs), t = e.length;
    let i, a;
    for (i = 0; i < t; ++i) {
      const o = e[i];
      if (!Er(o)) {
        const u = n.defs(o);
        let c = (
          /** @type {import("./Units.js").Units} */
          u.units
        );
        !c && u.projName === "longlat" && (c = "degrees"), tF(
          new VA({
            code: o,
            axisOrientation: u.axis,
            metersPerUnit: u.to_meter,
            units: c
          })
        );
      }
    }
    for (i = 0; i < t; ++i) {
      const o = e[i], u = Er(o);
      for (a = 0; a < t; ++a) {
        const c = e[a], p = Er(c);
        if (!H2(o, c))
          if (n.defs[o] === n.defs[c])
            iA([u, p]);
          else {
            const y = n(o, c);
            KB(
              u,
              p,
              ZP(u, p, y.forward),
              ZP(p, u, y.inverse)
            );
          }
      }
    }
  }
  function tV(n) {
    n("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), n("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), n("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), n.WGS84 = n["EPSG:4326"], n["EPSG:3785"] = n["EPSG:3857"], n.GOOGLE = n["EPSG:3857"], n["EPSG:900913"] = n["EPSG:3857"], n["EPSG:102113"] = n["EPSG:3857"];
  }
  var zv = 1, $v = 2, H0 = 3, nV = 4, aA = 5, QP = 6378137, iV = 6356752314e-3, JP = 0.0066943799901413165, yE = 484813681109536e-20, it = Math.PI / 2, rV = 0.16666666666666666, aV = 0.04722222222222222, sV = 0.022156084656084655, dt = 1e-10, Qs = 0.017453292519943295, Uh = 57.29577951308232, Gi = Math.PI / 4, OE = Math.PI * 2, ba = 3.14159265359, kl = {};
  kl.greenwich = 0;
  kl.lisbon = -9.131906111111;
  kl.paris = 2.337229166667;
  kl.bogota = -74.080916666667;
  kl.madrid = -3.687938888889;
  kl.rome = 12.452333333333;
  kl.bern = 7.439583333333;
  kl.jakarta = 106.807719444444;
  kl.ferro = -17.666666666667;
  kl.brussels = 4.367975;
  kl.stockholm = 18.058277777778;
  kl.athens = 23.7163375;
  kl.oslo = 10.722916666667;
  const oV = {
    ft: { to_meter: 0.3048 },
    "us-ft": { to_meter: 1200 / 3937 }
  };
  var ek = /[\s_\-\/\(\)]/g;
  function Jg(n, e) {
    if (n[e])
      return n[e];
    for (var t = Object.keys(n), i = e.toLowerCase().replace(ek, ""), a = -1, o, u; ++a < t.length; )
      if (o = t[a], u = o.toLowerCase().replace(ek, ""), u === i)
        return n[o];
  }
  function sA(n) {
    var e = {}, t = n.split("+").map(function(c) {
      return c.trim();
    }).filter(function(c) {
      return c;
    }).reduce(function(c, p) {
      var y = p.split("=");
      return y.push(!0), c[y[0].toLowerCase()] = y[1], c;
    }, {}), i, a, o, u = {
      proj: "projName",
      datum: "datumCode",
      rf: function(c) {
        e.rf = parseFloat(c);
      },
      lat_0: function(c) {
        e.lat0 = c * Qs;
      },
      lat_1: function(c) {
        e.lat1 = c * Qs;
      },
      lat_2: function(c) {
        e.lat2 = c * Qs;
      },
      lat_ts: function(c) {
        e.lat_ts = c * Qs;
      },
      lon_0: function(c) {
        e.long0 = c * Qs;
      },
      lon_1: function(c) {
        e.long1 = c * Qs;
      },
      lon_2: function(c) {
        e.long2 = c * Qs;
      },
      alpha: function(c) {
        e.alpha = parseFloat(c) * Qs;
      },
      gamma: function(c) {
        e.rectified_grid_angle = parseFloat(c);
      },
      lonc: function(c) {
        e.longc = c * Qs;
      },
      x_0: function(c) {
        e.x0 = parseFloat(c);
      },
      y_0: function(c) {
        e.y0 = parseFloat(c);
      },
      k_0: function(c) {
        e.k0 = parseFloat(c);
      },
      k: function(c) {
        e.k0 = parseFloat(c);
      },
      a: function(c) {
        e.a = parseFloat(c);
      },
      b: function(c) {
        e.b = parseFloat(c);
      },
      r_a: function() {
        e.R_A = !0;
      },
      zone: function(c) {
        e.zone = parseInt(c, 10);
      },
      south: function() {
        e.utmSouth = !0;
      },
      towgs84: function(c) {
        e.datum_params = c.split(",").map(function(p) {
          return parseFloat(p);
        });
      },
      to_meter: function(c) {
        e.to_meter = parseFloat(c);
      },
      units: function(c) {
        e.units = c;
        var p = Jg(oV, c);
        p && (e.to_meter = p.to_meter);
      },
      from_greenwich: function(c) {
        e.from_greenwich = c * Qs;
      },
      pm: function(c) {
        var p = Jg(kl, c);
        e.from_greenwich = (p || parseFloat(c)) * Qs;
      },
      nadgrids: function(c) {
        c === "@null" ? e.datumCode = "none" : e.nadgrids = c;
      },
      axis: function(c) {
        var p = "ewnsud";
        c.length === 3 && p.indexOf(c.substr(0, 1)) !== -1 && p.indexOf(c.substr(1, 1)) !== -1 && p.indexOf(c.substr(2, 1)) !== -1 && (e.axis = c);
      },
      approx: function() {
        e.approx = !0;
      }
    };
    for (i in t)
      a = t[i], i in u ? (o = u[i], typeof o == "function" ? o(a) : e[o] = a) : e[i] = a;
    return typeof e.datumCode == "string" && e.datumCode !== "WGS84" && (e.datumCode = e.datumCode.toLowerCase()), e;
  }
  var AE = 1, iF = 2, rF = 3, Xb = 4, aF = 5, QA = -1, lV = /\s/, uV = /[A-Za-z]/, cV = /[A-Za-z84_]/, Nw = /[,\]]/, sF = /[\d\.E\-\+]/;
  function Op(n) {
    if (typeof n != "string")
      throw new Error("not a string");
    this.text = n.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = AE;
  }
  Op.prototype.readCharicter = function() {
    var n = this.text[this.place++];
    if (this.state !== Xb)
      for (; lV.test(n); ) {
        if (this.place >= this.text.length)
          return;
        n = this.text[this.place++];
      }
    switch (this.state) {
      case AE:
        return this.neutral(n);
      case iF:
        return this.keyword(n);
      case Xb:
        return this.quoted(n);
      case aF:
        return this.afterquote(n);
      case rF:
        return this.number(n);
      case QA:
        return;
    }
  };
  Op.prototype.afterquote = function(n) {
    if (n === '"') {
      this.word += '"', this.state = Xb;
      return;
    }
    if (Nw.test(n)) {
      this.word = this.word.trim(), this.afterItem(n);
      return;
    }
    throw new Error(`havn't handled "` + n + '" in afterquote yet, index ' + this.place);
  };
  Op.prototype.afterItem = function(n) {
    if (n === ",") {
      this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = AE;
      return;
    }
    if (n === "]") {
      this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = AE, this.currentObject = this.stack.pop(), this.currentObject || (this.state = QA);
      return;
    }
  };
  Op.prototype.number = function(n) {
    if (sF.test(n)) {
      this.word += n;
      return;
    }
    if (Nw.test(n)) {
      this.word = parseFloat(this.word), this.afterItem(n);
      return;
    }
    throw new Error(`havn't handled "` + n + '" in number yet, index ' + this.place);
  };
  Op.prototype.quoted = function(n) {
    if (n === '"') {
      this.state = aF;
      return;
    }
    this.word += n;
  };
  Op.prototype.keyword = function(n) {
    if (cV.test(n)) {
      this.word += n;
      return;
    }
    if (n === "[") {
      var e = [];
      e.push(this.word), this.level++, this.root === null ? this.root = e : this.currentObject.push(e), this.stack.push(this.currentObject), this.currentObject = e, this.state = AE;
      return;
    }
    if (Nw.test(n)) {
      this.afterItem(n);
      return;
    }
    throw new Error(`havn't handled "` + n + '" in keyword yet, index ' + this.place);
  };
  Op.prototype.neutral = function(n) {
    if (uV.test(n)) {
      this.word = n, this.state = iF;
      return;
    }
    if (n === '"') {
      this.word = "", this.state = Xb;
      return;
    }
    if (sF.test(n)) {
      this.word = n, this.state = rF;
      return;
    }
    if (Nw.test(n)) {
      this.afterItem(n);
      return;
    }
    throw new Error(`havn't handled "` + n + '" in neutral yet, index ' + this.place);
  };
  Op.prototype.output = function() {
    for (; this.place < this.text.length; )
      this.readCharicter();
    if (this.state === QA)
      return this.root;
    throw new Error('unable to parse string "' + this.text + '". State is ' + this.state);
  };
  function fV(n) {
    var e = new Op(n);
    return e.output();
  }
  function tk(n, e, t) {
    Array.isArray(e) && (t.unshift(e), e = null);
    var i = e ? {} : n, a = t.reduce(function(o, u) {
      return F0(u, o), o;
    }, i);
    e && (n[e] = a);
  }
  function F0(n, e) {
    if (!Array.isArray(n)) {
      e[n] = !0;
      return;
    }
    var t = n.shift();
    if (t === "PARAMETER" && (t = n.shift()), n.length === 1) {
      if (Array.isArray(n[0])) {
        e[t] = {}, F0(n[0], e[t]);
        return;
      }
      e[t] = n[0];
      return;
    }
    if (!n.length) {
      e[t] = !0;
      return;
    }
    if (t === "TOWGS84") {
      e[t] = n;
      return;
    }
    if (t === "AXIS") {
      t in e || (e[t] = []), e[t].push(n);
      return;
    }
    Array.isArray(t) || (e[t] = {});
    var i;
    switch (t) {
      case "UNIT":
      case "PRIMEM":
      case "VERT_DATUM":
        e[t] = {
          name: n[0].toLowerCase(),
          convert: n[1]
        }, n.length === 3 && F0(n[2], e[t]);
        return;
      case "SPHEROID":
      case "ELLIPSOID":
        e[t] = {
          name: n[0],
          a: n[1],
          rf: n[2]
        }, n.length === 4 && F0(n[3], e[t]);
        return;
      case "PROJECTEDCRS":
      case "PROJCRS":
      case "GEOGCS":
      case "GEOCCS":
      case "PROJCS":
      case "LOCAL_CS":
      case "GEODCRS":
      case "GEODETICCRS":
      case "GEODETICDATUM":
      case "EDATUM":
      case "ENGINEERINGDATUM":
      case "VERT_CS":
      case "VERTCRS":
      case "VERTICALCRS":
      case "COMPD_CS":
      case "COMPOUNDCRS":
      case "ENGINEERINGCRS":
      case "ENGCRS":
      case "FITTED_CS":
      case "LOCAL_DATUM":
      case "DATUM":
        n[0] = ["name", n[0]], tk(e, t, n);
        return;
      default:
        for (i = -1; ++i < n.length; )
          if (!Array.isArray(n[i]))
            return F0(n, e[t]);
        return tk(e, t, n);
    }
  }
  var hV = 0.017453292519943295;
  function dV(n, e) {
    var t = e[0], i = e[1];
    !(t in n) && i in n && (n[t] = n[i], e.length === 3 && (n[t] = e[2](n[t])));
  }
  function Ih(n) {
    return n * hV;
  }
  function pV(n) {
    if (n.type === "GEOGCS" ? n.projName = "longlat" : n.type === "LOCAL_CS" ? (n.projName = "identity", n.local = !0) : typeof n.PROJECTION == "object" ? n.projName = Object.keys(n.PROJECTION)[0] : n.projName = n.PROJECTION, n.AXIS) {
      for (var e = "", t = 0, i = n.AXIS.length; t < i; ++t) {
        var a = [n.AXIS[t][0].toLowerCase(), n.AXIS[t][1].toLowerCase()];
        a[0].indexOf("north") !== -1 || (a[0] === "y" || a[0] === "lat") && a[1] === "north" ? e += "n" : a[0].indexOf("south") !== -1 || (a[0] === "y" || a[0] === "lat") && a[1] === "south" ? e += "s" : a[0].indexOf("east") !== -1 || (a[0] === "x" || a[0] === "lon") && a[1] === "east" ? e += "e" : (a[0].indexOf("west") !== -1 || (a[0] === "x" || a[0] === "lon") && a[1] === "west") && (e += "w");
      }
      e.length === 2 && (e += "u"), e.length === 3 && (n.axis = e);
    }
    n.UNIT && (n.units = n.UNIT.name.toLowerCase(), n.units === "metre" && (n.units = "meter"), n.UNIT.convert && (n.type === "GEOGCS" ? n.DATUM && n.DATUM.SPHEROID && (n.to_meter = n.UNIT.convert * n.DATUM.SPHEROID.a) : n.to_meter = n.UNIT.convert));
    var o = n.GEOGCS;
    n.type === "GEOGCS" && (o = n), o && (o.DATUM ? n.datumCode = o.DATUM.name.toLowerCase() : n.datumCode = o.name.toLowerCase(), n.datumCode.slice(0, 2) === "d_" && (n.datumCode = n.datumCode.slice(2)), (n.datumCode === "new_zealand_geodetic_datum_1949" || n.datumCode === "new_zealand_1949") && (n.datumCode = "nzgd49"), (n.datumCode === "wgs_1984" || n.datumCode === "world_geodetic_system_1984") && (n.PROJECTION === "Mercator_Auxiliary_Sphere" && (n.sphere = !0), n.datumCode = "wgs84"), n.datumCode.slice(-6) === "_ferro" && (n.datumCode = n.datumCode.slice(0, -6)), n.datumCode.slice(-8) === "_jakarta" && (n.datumCode = n.datumCode.slice(0, -8)), ~n.datumCode.indexOf("belge") && (n.datumCode = "rnb72"), o.DATUM && o.DATUM.SPHEROID && (n.ellps = o.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), n.ellps.toLowerCase().slice(0, 13) === "international" && (n.ellps = "intl"), n.a = o.DATUM.SPHEROID.a, n.rf = parseFloat(o.DATUM.SPHEROID.rf, 10)), o.DATUM && o.DATUM.TOWGS84 && (n.datum_params = o.DATUM.TOWGS84), ~n.datumCode.indexOf("osgb_1936") && (n.datumCode = "osgb36"), ~n.datumCode.indexOf("osni_1952") && (n.datumCode = "osni52"), (~n.datumCode.indexOf("tm65") || ~n.datumCode.indexOf("geodetic_datum_of_1965")) && (n.datumCode = "ire65"), n.datumCode === "ch1903+" && (n.datumCode = "ch1903"), ~n.datumCode.indexOf("israel") && (n.datumCode = "isr93")), n.b && !isFinite(n.b) && (n.b = n.a);
    function u(y) {
      var _ = n.to_meter || 1;
      return y * _;
    }
    var c = function(y) {
      return dV(n, y);
    }, p = [
      ["standard_parallel_1", "Standard_Parallel_1"],
      ["standard_parallel_1", "Latitude of 1st standard parallel"],
      ["standard_parallel_2", "Standard_Parallel_2"],
      ["standard_parallel_2", "Latitude of 2nd standard parallel"],
      ["false_easting", "False_Easting"],
      ["false_easting", "False easting"],
      ["false-easting", "Easting at false origin"],
      ["false_northing", "False_Northing"],
      ["false_northing", "False northing"],
      ["false_northing", "Northing at false origin"],
      ["central_meridian", "Central_Meridian"],
      ["central_meridian", "Longitude of natural origin"],
      ["central_meridian", "Longitude of false origin"],
      ["latitude_of_origin", "Latitude_Of_Origin"],
      ["latitude_of_origin", "Central_Parallel"],
      ["latitude_of_origin", "Latitude of natural origin"],
      ["latitude_of_origin", "Latitude of false origin"],
      ["scale_factor", "Scale_Factor"],
      ["k0", "scale_factor"],
      ["latitude_of_center", "Latitude_Of_Center"],
      ["latitude_of_center", "Latitude_of_center"],
      ["lat0", "latitude_of_center", Ih],
      ["longitude_of_center", "Longitude_Of_Center"],
      ["longitude_of_center", "Longitude_of_center"],
      ["longc", "longitude_of_center", Ih],
      ["x0", "false_easting", u],
      ["y0", "false_northing", u],
      ["long0", "central_meridian", Ih],
      ["lat0", "latitude_of_origin", Ih],
      ["lat0", "standard_parallel_1", Ih],
      ["lat1", "standard_parallel_1", Ih],
      ["lat2", "standard_parallel_2", Ih],
      ["azimuth", "Azimuth"],
      ["alpha", "azimuth", Ih],
      ["srsCode", "name"]
    ];
    p.forEach(c), !n.long0 && n.longc && (n.projName === "Albers_Conic_Equal_Area" || n.projName === "Lambert_Azimuthal_Equal_Area") && (n.long0 = n.longc), !n.lat_ts && n.lat1 && (n.projName === "Stereographic_South_Pole" || n.projName === "Polar Stereographic (variant B)") ? (n.lat0 = Ih(n.lat1 > 0 ? 90 : -90), n.lat_ts = n.lat1) : !n.lat_ts && n.lat0 && n.projName === "Polar_Stereographic" && (n.lat_ts = n.lat0, n.lat0 = Ih(n.lat0 > 0 ? 90 : -90));
  }
  function oF(n) {
    var e = fV(n), t = e.shift(), i = e.shift();
    e.unshift(["name", i]), e.unshift(["type", t]);
    var a = {};
    return F0(e, a), pV(a), a;
  }
  function Xo(n) {
    var e = this;
    if (arguments.length === 2) {
      var t = arguments[1];
      typeof t == "string" ? t.charAt(0) === "+" ? Xo[n] = sA(arguments[1]) : Xo[n] = oF(arguments[1]) : Xo[n] = t;
    } else if (arguments.length === 1) {
      if (Array.isArray(n))
        return n.map(function(i) {
          Array.isArray(i) ? Xo.apply(e, i) : Xo(i);
        });
      if (typeof n == "string") {
        if (n in Xo)
          return Xo[n];
      } else
        "EPSG" in n ? Xo["EPSG:" + n.EPSG] = n : "ESRI" in n ? Xo["ESRI:" + n.ESRI] = n : "IAU2000" in n ? Xo["IAU2000:" + n.IAU2000] = n : console.log(n);
      return;
    }
  }
  tV(Xo);
  function gV(n) {
    return typeof n == "string";
  }
  function mV(n) {
    return n in Xo;
  }
  var vV = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"];
  function yV(n) {
    return vV.some(function(e) {
      return n.indexOf(e) > -1;
    });
  }
  var _V = ["3857", "900913", "3785", "102113"];
  function EV(n) {
    var e = Jg(n, "authority");
    if (e) {
      var t = Jg(e, "epsg");
      return t && _V.indexOf(t) > -1;
    }
  }
  function SV(n) {
    var e = Jg(n, "extension");
    if (e)
      return Jg(e, "proj4");
  }
  function xV(n) {
    return n[0] === "+";
  }
  function bV(n) {
    if (gV(n)) {
      if (mV(n))
        return Xo[n];
      if (yV(n)) {
        var e = oF(n);
        if (EV(e))
          return Xo["EPSG:3857"];
        var t = SV(e);
        return t ? sA(t) : e;
      }
      if (xV(n))
        return sA(n);
    } else
      return n;
  }
  function nk(n, e) {
    n = n || {};
    var t, i;
    if (!e)
      return n;
    for (i in e)
      t = e[i], t !== void 0 && (n[i] = t);
    return n;
  }
  function Gh(n, e, t) {
    var i = n * e;
    return t / Math.sqrt(1 - i * i);
  }
  function QE(n) {
    return n < 0 ? -1 : 1;
  }
  function wt(n) {
    return Math.abs(n) <= ba ? n : n - QE(n) * OE;
  }
  function Cf(n, e, t) {
    var i = n * t, a = 0.5 * n;
    return i = Math.pow((1 - i) / (1 + i), a), Math.tan(0.5 * (it - e)) / i;
  }
  function LE(n, e) {
    for (var t = 0.5 * n, i, a, o = it - 2 * Math.atan(e), u = 0; u <= 15; u++)
      if (i = n * Math.sin(o), a = it - 2 * Math.atan(e * Math.pow((1 - i) / (1 + i), t)) - o, o += a, Math.abs(a) <= 1e-10)
        return o;
    return -9999;
  }
  function wV() {
    var n = this.b / this.a;
    this.es = 1 - n * n, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = Gh(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1);
  }
  function CV(n) {
    var e = n.x, t = n.y;
    if (t * Uh > 90 && t * Uh < -90 && e * Uh > 180 && e * Uh < -180)
      return null;
    var i, a;
    if (Math.abs(Math.abs(t) - it) <= dt)
      return null;
    if (this.sphere)
      i = this.x0 + this.a * this.k0 * wt(e - this.long0), a = this.y0 + this.a * this.k0 * Math.log(Math.tan(Gi + 0.5 * t));
    else {
      var o = Math.sin(t), u = Cf(this.e, t, o);
      i = this.x0 + this.a * this.k0 * wt(e - this.long0), a = this.y0 - this.a * this.k0 * Math.log(u);
    }
    return n.x = i, n.y = a, n;
  }
  function TV(n) {
    var e = n.x - this.x0, t = n.y - this.y0, i, a;
    if (this.sphere)
      a = it - 2 * Math.atan(Math.exp(-t / (this.a * this.k0)));
    else {
      var o = Math.exp(-t / (this.a * this.k0));
      if (a = LE(this.e, o), a === -9999)
        return null;
    }
    return i = wt(this.long0 + e / (this.a * this.k0)), n.x = i, n.y = a, n;
  }
  var RV = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
  const MV = {
    init: wV,
    forward: CV,
    inverse: TV,
    names: RV
  };
  function OV() {
  }
  function ik(n) {
    return n;
  }
  var AV = ["longlat", "identity"];
  const LV = {
    init: OV,
    forward: ik,
    inverse: ik,
    names: AV
  };
  var NV = [MV, LV], Nb = {}, Kb = [];
  function lF(n, e) {
    var t = Kb.length;
    return n.names ? (Kb[t] = n, n.names.forEach(function(i) {
      Nb[i.toLowerCase()] = t;
    }), this) : (console.log(e), !0);
  }
  function DV(n) {
    if (!n)
      return !1;
    var e = n.toLowerCase();
    if (typeof Nb[e] < "u" && Kb[Nb[e]])
      return Kb[Nb[e]];
  }
  function IV() {
    NV.forEach(lF);
  }
  const PV = {
    start: IV,
    add: lF,
    get: DV
  };
  var En = {};
  En.MERIT = {
    a: 6378137,
    rf: 298.257,
    ellipseName: "MERIT 1983"
  };
  En.SGS85 = {
    a: 6378136,
    rf: 298.257,
    ellipseName: "Soviet Geodetic System 85"
  };
  En.GRS80 = {
    a: 6378137,
    rf: 298.257222101,
    ellipseName: "GRS 1980(IUGG, 1980)"
  };
  En.IAU76 = {
    a: 6378140,
    rf: 298.257,
    ellipseName: "IAU 1976"
  };
  En.airy = {
    a: 6377563396e-3,
    b: 635625691e-2,
    ellipseName: "Airy 1830"
  };
  En.APL4 = {
    a: 6378137,
    rf: 298.25,
    ellipseName: "Appl. Physics. 1965"
  };
  En.NWL9D = {
    a: 6378145,
    rf: 298.25,
    ellipseName: "Naval Weapons Lab., 1965"
  };
  En.mod_airy = {
    a: 6377340189e-3,
    b: 6356034446e-3,
    ellipseName: "Modified Airy"
  };
  En.andrae = {
    a: 637710443e-2,
    rf: 300,
    ellipseName: "Andrae 1876 (Den., Iclnd.)"
  };
  En.aust_SA = {
    a: 6378160,
    rf: 298.25,
    ellipseName: "Australian Natl & S. Amer. 1969"
  };
  En.GRS67 = {
    a: 6378160,
    rf: 298.247167427,
    ellipseName: "GRS 67(IUGG 1967)"
  };
  En.bessel = {
    a: 6377397155e-3,
    rf: 299.1528128,
    ellipseName: "Bessel 1841"
  };
  En.bess_nam = {
    a: 6377483865e-3,
    rf: 299.1528128,
    ellipseName: "Bessel 1841 (Namibia)"
  };
  En.clrk66 = {
    a: 63782064e-1,
    b: 63565838e-1,
    ellipseName: "Clarke 1866"
  };
  En.clrk80 = {
    a: 6378249145e-3,
    rf: 293.4663,
    ellipseName: "Clarke 1880 mod."
  };
  En.clrk80ign = {
    a: 63782492e-1,
    b: 6356515,
    rf: 293.4660213,
    ellipseName: "Clarke 1880 (IGN)"
  };
  En.clrk58 = {
    a: 6378293645208759e-9,
    rf: 294.2606763692654,
    ellipseName: "Clarke 1858"
  };
  En.CPM = {
    a: 63757387e-1,
    rf: 334.29,
    ellipseName: "Comm. des Poids et Mesures 1799"
  };
  En.delmbr = {
    a: 6376428,
    rf: 311.5,
    ellipseName: "Delambre 1810 (Belgium)"
  };
  En.engelis = {
    a: 637813605e-2,
    rf: 298.2566,
    ellipseName: "Engelis 1985"
  };
  En.evrst30 = {
    a: 6377276345e-3,
    rf: 300.8017,
    ellipseName: "Everest 1830"
  };
  En.evrst48 = {
    a: 6377304063e-3,
    rf: 300.8017,
    ellipseName: "Everest 1948"
  };
  En.evrst56 = {
    a: 6377301243e-3,
    rf: 300.8017,
    ellipseName: "Everest 1956"
  };
  En.evrst69 = {
    a: 6377295664e-3,
    rf: 300.8017,
    ellipseName: "Everest 1969"
  };
  En.evrstSS = {
    a: 6377298556e-3,
    rf: 300.8017,
    ellipseName: "Everest (Sabah & Sarawak)"
  };
  En.fschr60 = {
    a: 6378166,
    rf: 298.3,
    ellipseName: "Fischer (Mercury Datum) 1960"
  };
  En.fschr60m = {
    a: 6378155,
    rf: 298.3,
    ellipseName: "Fischer 1960"
  };
  En.fschr68 = {
    a: 6378150,
    rf: 298.3,
    ellipseName: "Fischer 1968"
  };
  En.helmert = {
    a: 6378200,
    rf: 298.3,
    ellipseName: "Helmert 1906"
  };
  En.hough = {
    a: 6378270,
    rf: 297,
    ellipseName: "Hough"
  };
  En.intl = {
    a: 6378388,
    rf: 297,
    ellipseName: "International 1909 (Hayford)"
  };
  En.kaula = {
    a: 6378163,
    rf: 298.24,
    ellipseName: "Kaula 1961"
  };
  En.lerch = {
    a: 6378139,
    rf: 298.257,
    ellipseName: "Lerch 1979"
  };
  En.mprts = {
    a: 6397300,
    rf: 191,
    ellipseName: "Maupertius 1738"
  };
  En.new_intl = {
    a: 63781575e-1,
    b: 63567722e-1,
    ellipseName: "New International 1967"
  };
  En.plessis = {
    a: 6376523,
    rf: 6355863,
    ellipseName: "Plessis 1817 (France)"
  };
  En.krass = {
    a: 6378245,
    rf: 298.3,
    ellipseName: "Krassovsky, 1942"
  };
  En.SEasia = {
    a: 6378155,
    b: 63567733205e-4,
    ellipseName: "Southeast Asia"
  };
  En.walbeck = {
    a: 6376896,
    b: 63558348467e-4,
    ellipseName: "Walbeck"
  };
  En.WGS60 = {
    a: 6378165,
    rf: 298.3,
    ellipseName: "WGS 60"
  };
  En.WGS66 = {
    a: 6378145,
    rf: 298.25,
    ellipseName: "WGS 66"
  };
  En.WGS7 = {
    a: 6378135,
    rf: 298.26,
    ellipseName: "WGS 72"
  };
  var kV = En.WGS84 = {
    a: 6378137,
    rf: 298.257223563,
    ellipseName: "WGS 84"
  };
  En.sphere = {
    a: 6370997,
    b: 6370997,
    ellipseName: "Normal Sphere (r=6370997)"
  };
  function FV(n, e, t, i) {
    var a = n * n, o = e * e, u = (a - o) / a, c = 0;
    i ? (n *= 1 - u * (rV + u * (aV + u * sV)), a = n * n, u = 0) : c = Math.sqrt(u);
    var p = (a - o) / o;
    return {
      es: u,
      e: c,
      ep2: p
    };
  }
  function jV(n, e, t, i, a) {
    if (!n) {
      var o = Jg(En, i);
      o || (o = kV), n = o.a, e = o.b, t = o.rf;
    }
    return t && !e && (e = (1 - 1 / t) * n), (t === 0 || Math.abs(n - e) < dt) && (a = !0, e = n), {
      a: n,
      b: e,
      rf: t,
      sphere: a
    };
  }
  var Ua = {};
  Ua.wgs84 = {
    towgs84: "0,0,0",
    ellipse: "WGS84",
    datumName: "WGS84"
  };
  Ua.ch1903 = {
    towgs84: "674.374,15.056,405.346",
    ellipse: "bessel",
    datumName: "swiss"
  };
  Ua.ggrs87 = {
    towgs84: "-199.87,74.79,246.62",
    ellipse: "GRS80",
    datumName: "Greek_Geodetic_Reference_System_1987"
  };
  Ua.nad83 = {
    towgs84: "0,0,0",
    ellipse: "GRS80",
    datumName: "North_American_Datum_1983"
  };
  Ua.nad27 = {
    nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
    ellipse: "clrk66",
    datumName: "North_American_Datum_1927"
  };
  Ua.potsdam = {
    towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
    ellipse: "bessel",
    datumName: "Potsdam Rauenberg 1950 DHDN"
  };
  Ua.carthage = {
    towgs84: "-263.0,6.0,431.0",
    ellipse: "clark80",
    datumName: "Carthage 1934 Tunisia"
  };
  Ua.hermannskogel = {
    towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
    ellipse: "bessel",
    datumName: "Hermannskogel"
  };
  Ua.osni52 = {
    towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
    ellipse: "airy",
    datumName: "Irish National"
  };
  Ua.ire65 = {
    towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
    ellipse: "mod_airy",
    datumName: "Ireland 1965"
  };
  Ua.rassadiran = {
    towgs84: "-133.63,-157.5,-158.62",
    ellipse: "intl",
    datumName: "Rassadiran"
  };
  Ua.nzgd49 = {
    towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
    ellipse: "intl",
    datumName: "New Zealand Geodetic Datum 1949"
  };
  Ua.osgb36 = {
    towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
    ellipse: "airy",
    datumName: "Airy 1830"
  };
  Ua.s_jtsk = {
    towgs84: "589,76,480",
    ellipse: "bessel",
    datumName: "S-JTSK (Ferro)"
  };
  Ua.beduaram = {
    towgs84: "-106,-87,188",
    ellipse: "clrk80",
    datumName: "Beduaram"
  };
  Ua.gunung_segara = {
    towgs84: "-403,684,41",
    ellipse: "bessel",
    datumName: "Gunung Segara Jakarta"
  };
  Ua.rnb72 = {
    towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
    ellipse: "intl",
    datumName: "Reseau National Belge 1972"
  };
  function UV(n, e, t, i, a, o, u) {
    var c = {};
    return n === void 0 || n === "none" ? c.datum_type = aA : c.datum_type = nV, e && (c.datum_params = e.map(parseFloat), (c.datum_params[0] !== 0 || c.datum_params[1] !== 0 || c.datum_params[2] !== 0) && (c.datum_type = zv), c.datum_params.length > 3 && (c.datum_params[3] !== 0 || c.datum_params[4] !== 0 || c.datum_params[5] !== 0 || c.datum_params[6] !== 0) && (c.datum_type = $v, c.datum_params[3] *= yE, c.datum_params[4] *= yE, c.datum_params[5] *= yE, c.datum_params[6] = c.datum_params[6] / 1e6 + 1)), u && (c.datum_type = H0, c.grids = u), c.a = t, c.b = i, c.es = a, c.ep2 = o, c;
  }
  var uF = {};
  function zV(n, e) {
    var t = new DataView(e), i = VV(t), a = HV(t, i), o = WV(t, a, i), u = { header: a, subgrids: o };
    return uF[n] = u, u;
  }
  function $V(n) {
    if (n === void 0)
      return null;
    var e = n.split(",");
    return e.map(BV);
  }
  function BV(n) {
    if (n.length === 0)
      return null;
    var e = n[0] === "@";
    return e && (n = n.slice(1)), n === "null" ? { name: "null", mandatory: !e, grid: null, isNull: !0 } : {
      name: n,
      mandatory: !e,
      grid: uF[n] || null,
      isNull: !1
    };
  }
  function j0(n) {
    return n / 3600 * Math.PI / 180;
  }
  function VV(n) {
    var e = n.getInt32(8, !1);
    return e === 11 ? !1 : (e = n.getInt32(8, !0), e !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0);
  }
  function HV(n, e) {
    return {
      nFields: n.getInt32(8, e),
      nSubgridFields: n.getInt32(24, e),
      nSubgrids: n.getInt32(40, e),
      shiftType: oA(n, 56, 64).trim(),
      fromSemiMajorAxis: n.getFloat64(120, e),
      fromSemiMinorAxis: n.getFloat64(136, e),
      toSemiMajorAxis: n.getFloat64(152, e),
      toSemiMinorAxis: n.getFloat64(168, e)
    };
  }
  function oA(n, e, t) {
    return String.fromCharCode.apply(null, new Uint8Array(n.buffer.slice(e, t)));
  }
  function WV(n, e, t) {
    for (var i = 176, a = [], o = 0; o < e.nSubgrids; o++) {
      var u = YV(n, i, t), c = qV(n, i, u, t), p = Math.round(
        1 + (u.upperLongitude - u.lowerLongitude) / u.longitudeInterval
      ), y = Math.round(
        1 + (u.upperLatitude - u.lowerLatitude) / u.latitudeInterval
      );
      a.push({
        ll: [j0(u.lowerLongitude), j0(u.lowerLatitude)],
        del: [j0(u.longitudeInterval), j0(u.latitudeInterval)],
        lim: [p, y],
        count: u.gridNodeCount,
        cvs: GV(c)
      }), i += 176 + u.gridNodeCount * 16;
    }
    return a;
  }
  function GV(n) {
    return n.map(function(e) {
      return [j0(e.longitudeShift), j0(e.latitudeShift)];
    });
  }
  function YV(n, e, t) {
    return {
      name: oA(n, e + 8, e + 16).trim(),
      parent: oA(n, e + 24, e + 24 + 8).trim(),
      lowerLatitude: n.getFloat64(e + 72, t),
      upperLatitude: n.getFloat64(e + 88, t),
      lowerLongitude: n.getFloat64(e + 104, t),
      upperLongitude: n.getFloat64(e + 120, t),
      latitudeInterval: n.getFloat64(e + 136, t),
      longitudeInterval: n.getFloat64(e + 152, t),
      gridNodeCount: n.getInt32(e + 168, t)
    };
  }
  function qV(n, e, t, i) {
    for (var a = e + 176, o = 16, u = [], c = 0; c < t.gridNodeCount; c++) {
      var p = {
        latitudeShift: n.getFloat32(a + c * o, i),
        longitudeShift: n.getFloat32(a + c * o + 4, i),
        latitudeAccuracy: n.getFloat32(a + c * o + 8, i),
        longitudeAccuracy: n.getFloat32(a + c * o + 12, i)
      };
      u.push(p);
    }
    return u;
  }
  function $h(n, e) {
    if (!(this instanceof $h))
      return new $h(n);
    e = e || function(y) {
      if (y)
        throw y;
    };
    var t = bV(n);
    if (typeof t != "object") {
      e(n);
      return;
    }
    var i = $h.projections.get(t.projName);
    if (!i) {
      e(n);
      return;
    }
    if (t.datumCode && t.datumCode !== "none") {
      var a = Jg(Ua, t.datumCode);
      a && (t.datum_params = t.datum_params || (a.towgs84 ? a.towgs84.split(",") : null), t.ellps = a.ellipse, t.datumName = a.datumName ? a.datumName : t.datumCode);
    }
    t.k0 = t.k0 || 1, t.axis = t.axis || "enu", t.ellps = t.ellps || "wgs84", t.lat1 = t.lat1 || t.lat0;
    var o = jV(t.a, t.b, t.rf, t.ellps, t.sphere), u = FV(o.a, o.b, o.rf, t.R_A), c = $V(t.nadgrids), p = t.datum || UV(
      t.datumCode,
      t.datum_params,
      o.a,
      o.b,
      u.es,
      u.ep2,
      c
    );
    nk(this, t), nk(this, i), this.a = o.a, this.b = o.b, this.rf = o.rf, this.sphere = o.sphere, this.es = u.es, this.e = u.e, this.ep2 = u.ep2, this.datum = p, this.init(), e(null, this);
  }
  $h.projections = PV;
  $h.projections.start();
  function XV(n, e) {
    return n.datum_type !== e.datum_type || n.a !== e.a || Math.abs(n.es - e.es) > 5e-11 ? !1 : n.datum_type === zv ? n.datum_params[0] === e.datum_params[0] && n.datum_params[1] === e.datum_params[1] && n.datum_params[2] === e.datum_params[2] : n.datum_type === $v ? n.datum_params[0] === e.datum_params[0] && n.datum_params[1] === e.datum_params[1] && n.datum_params[2] === e.datum_params[2] && n.datum_params[3] === e.datum_params[3] && n.datum_params[4] === e.datum_params[4] && n.datum_params[5] === e.datum_params[5] && n.datum_params[6] === e.datum_params[6] : !0;
  }
  function cF(n, e, t) {
    var i = n.x, a = n.y, o = n.z ? n.z : 0, u, c, p, y;
    if (a < -it && a > -1.001 * it)
      a = -it;
    else if (a > it && a < 1.001 * it)
      a = it;
    else {
      if (a < -it)
        return { x: -1 / 0, y: -1 / 0, z: n.z };
      if (a > it)
        return { x: 1 / 0, y: 1 / 0, z: n.z };
    }
    return i > Math.PI && (i -= 2 * Math.PI), c = Math.sin(a), y = Math.cos(a), p = c * c, u = t / Math.sqrt(1 - e * p), {
      x: (u + o) * y * Math.cos(i),
      y: (u + o) * y * Math.sin(i),
      z: (u * (1 - e) + o) * c
    };
  }
  function fF(n, e, t, i) {
    var a = 1e-12, o = a * a, u = 30, c, p, y, _, S, b, T, O, N, D, k, $, B, V = n.x, z = n.y, G = n.z ? n.z : 0, ie, ue, Re;
    if (c = Math.sqrt(V * V + z * z), p = Math.sqrt(V * V + z * z + G * G), c / t < a) {
      if (ie = 0, p / t < a)
        return ue = it, Re = -i, {
          x: n.x,
          y: n.y,
          z: n.z
        };
    } else
      ie = Math.atan2(z, V);
    y = G / p, _ = c / p, S = 1 / Math.sqrt(1 - e * (2 - e) * _ * _), O = _ * (1 - e) * S, N = y * S, B = 0;
    do
      B++, T = t / Math.sqrt(1 - e * N * N), Re = c * O + G * N - T * (1 - e * N * N), b = e * T / (T + Re), S = 1 / Math.sqrt(1 - b * (2 - b) * _ * _), D = _ * (1 - b) * S, k = y * S, $ = k * O - D * N, O = D, N = k;
    while ($ * $ > o && B < u);
    return ue = Math.atan(k / Math.abs(D)), {
      x: ie,
      y: ue,
      z: Re
    };
  }
  function KV(n, e, t) {
    if (e === zv)
      return {
        x: n.x + t[0],
        y: n.y + t[1],
        z: n.z + t[2]
      };
    if (e === $v) {
      var i = t[0], a = t[1], o = t[2], u = t[3], c = t[4], p = t[5], y = t[6];
      return {
        x: y * (n.x - p * n.y + c * n.z) + i,
        y: y * (p * n.x + n.y - u * n.z) + a,
        z: y * (-c * n.x + u * n.y + n.z) + o
      };
    }
  }
  function ZV(n, e, t) {
    if (e === zv)
      return {
        x: n.x - t[0],
        y: n.y - t[1],
        z: n.z - t[2]
      };
    if (e === $v) {
      var i = t[0], a = t[1], o = t[2], u = t[3], c = t[4], p = t[5], y = t[6], _ = (n.x - i) / y, S = (n.y - a) / y, b = (n.z - o) / y;
      return {
        x: _ + p * S - c * b,
        y: -p * _ + S + u * b,
        z: c * _ - u * S + b
      };
    }
  }
  function ob(n) {
    return n === zv || n === $v;
  }
  function QV(n, e, t) {
    if (XV(n, e) || n.datum_type === aA || e.datum_type === aA)
      return t;
    var i = n.a, a = n.es;
    if (n.datum_type === H0) {
      var o = rk(n, !1, t);
      if (o !== 0)
        return;
      i = QP, a = JP;
    }
    var u = e.a, c = e.b, p = e.es;
    if (e.datum_type === H0 && (u = QP, c = iV, p = JP), a === p && i === u && !ob(n.datum_type) && !ob(e.datum_type))
      return t;
    if (t = cF(t, a, i), ob(n.datum_type) && (t = KV(t, n.datum_type, n.datum_params)), ob(e.datum_type) && (t = ZV(t, e.datum_type, e.datum_params)), t = fF(t, p, u, c), e.datum_type === H0) {
      var y = rk(e, !0, t);
      if (y !== 0)
        return;
    }
    return t;
  }
  function rk(n, e, t) {
    if (n.grids === null || n.grids.length === 0)
      return console.log("Grid shift grids not found"), -1;
    var i = { x: -t.x, y: t.y }, a = { x: Number.NaN, y: Number.NaN }, o = [];
    e:
      for (var u = 0; u < n.grids.length; u++) {
        var c = n.grids[u];
        if (o.push(c.name), c.isNull) {
          a = i;
          break;
        }
        if (c.mandatory, c.grid === null) {
          if (c.mandatory)
            return console.log("Unable to find mandatory grid '" + c.name + "'"), -1;
          continue;
        }
        for (var p = c.grid.subgrids, y = 0, _ = p.length; y < _; y++) {
          var S = p[y], b = (Math.abs(S.del[1]) + Math.abs(S.del[0])) / 1e4, T = S.ll[0] - b, O = S.ll[1] - b, N = S.ll[0] + (S.lim[0] - 1) * S.del[0] + b, D = S.ll[1] + (S.lim[1] - 1) * S.del[1] + b;
          if (!(O > i.y || T > i.x || D < i.y || N < i.x) && (a = JV(i, e, S), !isNaN(a.x)))
            break e;
        }
      }
    return isNaN(a.x) ? (console.log("Failed to find a grid shift table for location '" + -i.x * Uh + " " + i.y * Uh + " tried: '" + o + "'"), -1) : (t.x = -a.x, t.y = a.y, 0);
  }
  function JV(n, e, t) {
    var i = { x: Number.NaN, y: Number.NaN };
    if (isNaN(n.x))
      return i;
    var a = { x: n.x, y: n.y };
    a.x -= t.ll[0], a.y -= t.ll[1], a.x = wt(a.x - Math.PI) + Math.PI;
    var o = ak(a, t);
    if (e) {
      if (isNaN(o.x))
        return i;
      o.x = a.x - o.x, o.y = a.y - o.y;
      var u = 9, c = 1e-12, p, y;
      do {
        if (y = ak(o, t), isNaN(y.x)) {
          console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");
          break;
        }
        p = { x: a.x - (y.x + o.x), y: a.y - (y.y + o.y) }, o.x += p.x, o.y += p.y;
      } while (u-- && Math.abs(p.x) > c && Math.abs(p.y) > c);
      if (u < 0)
        return console.log("Inverse grid shift iterator failed to converge."), i;
      i.x = wt(o.x + t.ll[0]), i.y = o.y + t.ll[1];
    } else
      isNaN(o.x) || (i.x = n.x + o.x, i.y = n.y + o.y);
    return i;
  }
  function ak(n, e) {
    var t = { x: n.x / e.del[0], y: n.y / e.del[1] }, i = { x: Math.floor(t.x), y: Math.floor(t.y) }, a = { x: t.x - 1 * i.x, y: t.y - 1 * i.y }, o = { x: Number.NaN, y: Number.NaN }, u;
    if (i.x < 0 || i.x >= e.lim[0] || i.y < 0 || i.y >= e.lim[1])
      return o;
    u = i.y * e.lim[0] + i.x;
    var c = { x: e.cvs[u][0], y: e.cvs[u][1] };
    u++;
    var p = { x: e.cvs[u][0], y: e.cvs[u][1] };
    u += e.lim[0];
    var y = { x: e.cvs[u][0], y: e.cvs[u][1] };
    u--;
    var _ = { x: e.cvs[u][0], y: e.cvs[u][1] }, S = a.x * a.y, b = a.x * (1 - a.y), T = (1 - a.x) * (1 - a.y), O = (1 - a.x) * a.y;
    return o.x = T * c.x + b * p.x + O * _.x + S * y.x, o.y = T * c.y + b * p.y + O * _.y + S * y.y, o;
  }
  function sk(n, e, t) {
    var i = t.x, a = t.y, o = t.z || 0, u, c, p, y = {};
    for (p = 0; p < 3; p++)
      if (!(e && p === 2 && t.z === void 0))
        switch (p === 0 ? (u = i, "ew".indexOf(n.axis[p]) !== -1 ? c = "x" : c = "y") : p === 1 ? (u = a, "ns".indexOf(n.axis[p]) !== -1 ? c = "y" : c = "x") : (u = o, c = "z"), n.axis[p]) {
          case "e":
            y[c] = u;
            break;
          case "w":
            y[c] = -u;
            break;
          case "n":
            y[c] = u;
            break;
          case "s":
            y[c] = -u;
            break;
          case "u":
            t[c] !== void 0 && (y.z = u);
            break;
          case "d":
            t[c] !== void 0 && (y.z = -u);
            break;
          default:
            return null;
        }
    return y;
  }
  function hF(n) {
    var e = {
      x: n[0],
      y: n[1]
    };
    return n.length > 2 && (e.z = n[2]), n.length > 3 && (e.m = n[3]), e;
  }
  function eH(n) {
    ok(n.x), ok(n.y);
  }
  function ok(n) {
    if (typeof Number.isFinite == "function") {
      if (Number.isFinite(n))
        return;
      throw new TypeError("coordinates must be finite numbers");
    }
    if (typeof n != "number" || n !== n || !isFinite(n))
      throw new TypeError("coordinates must be finite numbers");
  }
  function tH(n, e) {
    return (n.datum.datum_type === zv || n.datum.datum_type === $v || n.datum.datum_type === H0) && e.datumCode !== "WGS84" || (e.datum.datum_type === zv || e.datum.datum_type === $v || e.datum.datum_type === H0) && n.datumCode !== "WGS84";
  }
  function Zb(n, e, t, i) {
    var a;
    Array.isArray(t) ? t = hF(t) : t = {
      x: t.x,
      y: t.y,
      z: t.z,
      m: t.m
    };
    var o = t.z !== void 0;
    if (eH(t), n.datum && e.datum && tH(n, e) && (a = new $h("WGS84"), t = Zb(n, a, t, i), n = a), i && n.axis !== "enu" && (t = sk(n, !1, t)), n.projName === "longlat")
      t = {
        x: t.x * Qs,
        y: t.y * Qs,
        z: t.z || 0
      };
    else if (n.to_meter && (t = {
      x: t.x * n.to_meter,
      y: t.y * n.to_meter,
      z: t.z || 0
    }), t = n.inverse(t), !t)
      return;
    if (n.from_greenwich && (t.x += n.from_greenwich), t = QV(n.datum, e.datum, t), !!t)
      return e.from_greenwich && (t = {
        x: t.x - e.from_greenwich,
        y: t.y,
        z: t.z || 0
      }), e.projName === "longlat" ? t = {
        x: t.x * Uh,
        y: t.y * Uh,
        z: t.z || 0
      } : (t = e.forward(t), e.to_meter && (t = {
        x: t.x / e.to_meter,
        y: t.y / e.to_meter,
        z: t.z || 0
      })), i && e.axis !== "enu" ? sk(e, !0, t) : (t && !o && delete t.z, t);
  }
  var lk = $h("WGS84");
  function YM(n, e, t, i) {
    var a, o, u;
    return Array.isArray(t) ? (a = Zb(n, e, t, i) || { x: NaN, y: NaN }, t.length > 2 ? typeof n.name < "u" && n.name === "geocent" || typeof e.name < "u" && e.name === "geocent" ? typeof a.z == "number" ? [a.x, a.y, a.z].concat(t.splice(3)) : [a.x, a.y, t[2]].concat(t.splice(3)) : [a.x, a.y].concat(t.splice(2)) : [a.x, a.y]) : (o = Zb(n, e, t, i), u = Object.keys(t), u.length === 2 || u.forEach(function(c) {
      if (typeof n.name < "u" && n.name === "geocent" || typeof e.name < "u" && e.name === "geocent") {
        if (c === "x" || c === "y" || c === "z")
          return;
      } else if (c === "x" || c === "y")
        return;
      o[c] = t[c];
    }), o);
  }
  function uk(n) {
    return n instanceof $h ? n : n.oProj ? n.oProj : $h(n);
  }
  function Pl(n, e, t) {
    n = uk(n);
    var i = !1, a;
    return typeof e > "u" ? (e = n, n = lk, i = !0) : (typeof e.x < "u" || Array.isArray(e)) && (t = e, e = n, n = lk, i = !0), e = uk(e), t ? YM(n, e, t) : (a = {
      forward: function(o, u) {
        return YM(n, e, o, u);
      },
      inverse: function(o, u) {
        return YM(e, n, o, u);
      }
    }, i && (a.oProj = e), a);
  }
  var ck = 6, dF = "AJSAJS", pF = "AFAFAF", U0 = 65, Ml = 73, yc = 79, cE = 86, fE = 90;
  const nH = {
    forward: gF,
    inverse: iH,
    toPoint: mF
  };
  function gF(n, e) {
    return e = e || 5, sH(rH({
      lat: n[1],
      lon: n[0]
    }), e);
  }
  function iH(n) {
    var e = JA(yF(n.toUpperCase()));
    return e.lat && e.lon ? [e.lon, e.lat, e.lon, e.lat] : [e.left, e.bottom, e.right, e.top];
  }
  function mF(n) {
    var e = JA(yF(n.toUpperCase()));
    return e.lat && e.lon ? [e.lon, e.lat] : [(e.left + e.right) / 2, (e.top + e.bottom) / 2];
  }
  function qM(n) {
    return n * (Math.PI / 180);
  }
  function fk(n) {
    return 180 * (n / Math.PI);
  }
  function rH(n) {
    var e = n.lat, t = n.lon, i = 6378137, a = 669438e-8, o = 0.9996, u, c, p, y, _, S, b, T = qM(e), O = qM(t), N, D;
    D = Math.floor((t + 180) / 6) + 1, t === 180 && (D = 60), e >= 56 && e < 64 && t >= 3 && t < 12 && (D = 32), e >= 72 && e < 84 && (t >= 0 && t < 9 ? D = 31 : t >= 9 && t < 21 ? D = 33 : t >= 21 && t < 33 ? D = 35 : t >= 33 && t < 42 && (D = 37)), u = (D - 1) * 6 - 180 + 3, N = qM(u), c = a / (1 - a), p = i / Math.sqrt(1 - a * Math.sin(T) * Math.sin(T)), y = Math.tan(T) * Math.tan(T), _ = c * Math.cos(T) * Math.cos(T), S = Math.cos(T) * (O - N), b = i * ((1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256) * T - (3 * a / 8 + 3 * a * a / 32 + 45 * a * a * a / 1024) * Math.sin(2 * T) + (15 * a * a / 256 + 45 * a * a * a / 1024) * Math.sin(4 * T) - 35 * a * a * a / 3072 * Math.sin(6 * T));
    var k = o * p * (S + (1 - y + _) * S * S * S / 6 + (5 - 18 * y + y * y + 72 * _ - 58 * c) * S * S * S * S * S / 120) + 5e5, $ = o * (b + p * Math.tan(T) * (S * S / 2 + (5 - y + 9 * _ + 4 * _ * _) * S * S * S * S / 24 + (61 - 58 * y + y * y + 600 * _ - 330 * c) * S * S * S * S * S * S / 720));
    return e < 0 && ($ += 1e7), {
      northing: Math.round($),
      easting: Math.round(k),
      zoneNumber: D,
      zoneLetter: aH(e)
    };
  }
  function JA(n) {
    var e = n.northing, t = n.easting, i = n.zoneLetter, a = n.zoneNumber;
    if (a < 0 || a > 60)
      return null;
    var o = 0.9996, u = 6378137, c = 669438e-8, p, y = (1 - Math.sqrt(1 - c)) / (1 + Math.sqrt(1 - c)), _, S, b, T, O, N, D, k, $, B = t - 5e5, V = e;
    i < "N" && (V -= 1e7), D = (a - 1) * 6 - 180 + 3, p = c / (1 - c), N = V / o, k = N / (u * (1 - c / 4 - 3 * c * c / 64 - 5 * c * c * c / 256)), $ = k + (3 * y / 2 - 27 * y * y * y / 32) * Math.sin(2 * k) + (21 * y * y / 16 - 55 * y * y * y * y / 32) * Math.sin(4 * k) + 151 * y * y * y / 96 * Math.sin(6 * k), _ = u / Math.sqrt(1 - c * Math.sin($) * Math.sin($)), S = Math.tan($) * Math.tan($), b = p * Math.cos($) * Math.cos($), T = u * (1 - c) / Math.pow(1 - c * Math.sin($) * Math.sin($), 1.5), O = B / (_ * o);
    var z = $ - _ * Math.tan($) / T * (O * O / 2 - (5 + 3 * S + 10 * b - 4 * b * b - 9 * p) * O * O * O * O / 24 + (61 + 90 * S + 298 * b + 45 * S * S - 252 * p - 3 * b * b) * O * O * O * O * O * O / 720);
    z = fk(z);
    var G = (O - (1 + 2 * S + b) * O * O * O / 6 + (5 - 2 * b + 28 * S - 3 * b * b + 8 * p + 24 * S * S) * O * O * O * O * O / 120) / Math.cos($);
    G = D + fk(G);
    var ie;
    if (n.accuracy) {
      var ue = JA({
        northing: n.northing + n.accuracy,
        easting: n.easting + n.accuracy,
        zoneLetter: n.zoneLetter,
        zoneNumber: n.zoneNumber
      });
      ie = {
        top: ue.lat,
        right: ue.lon,
        bottom: z,
        left: G
      };
    } else
      ie = {
        lat: z,
        lon: G
      };
    return ie;
  }
  function aH(n) {
    var e = "Z";
    return 84 >= n && n >= 72 ? e = "X" : 72 > n && n >= 64 ? e = "W" : 64 > n && n >= 56 ? e = "V" : 56 > n && n >= 48 ? e = "U" : 48 > n && n >= 40 ? e = "T" : 40 > n && n >= 32 ? e = "S" : 32 > n && n >= 24 ? e = "R" : 24 > n && n >= 16 ? e = "Q" : 16 > n && n >= 8 ? e = "P" : 8 > n && n >= 0 ? e = "N" : 0 > n && n >= -8 ? e = "M" : -8 > n && n >= -16 ? e = "L" : -16 > n && n >= -24 ? e = "K" : -24 > n && n >= -32 ? e = "J" : -32 > n && n >= -40 ? e = "H" : -40 > n && n >= -48 ? e = "G" : -48 > n && n >= -56 ? e = "F" : -56 > n && n >= -64 ? e = "E" : -64 > n && n >= -72 ? e = "D" : -72 > n && n >= -80 && (e = "C"), e;
  }
  function sH(n, e) {
    var t = "00000" + n.easting, i = "00000" + n.northing;
    return n.zoneNumber + n.zoneLetter + oH(n.easting, n.northing, n.zoneNumber) + t.substr(t.length - 5, e) + i.substr(i.length - 5, e);
  }
  function oH(n, e, t) {
    var i = vF(t), a = Math.floor(n / 1e5), o = Math.floor(e / 1e5) % 20;
    return lH(a, o, i);
  }
  function vF(n) {
    var e = n % ck;
    return e === 0 && (e = ck), e;
  }
  function lH(n, e, t) {
    var i = t - 1, a = dF.charCodeAt(i), o = pF.charCodeAt(i), u = a + n - 1, c = o + e, p = !1;
    u > fE && (u = u - fE + U0 - 1, p = !0), (u === Ml || a < Ml && u > Ml || (u > Ml || a < Ml) && p) && u++, (u === yc || a < yc && u > yc || (u > yc || a < yc) && p) && (u++, u === Ml && u++), u > fE && (u = u - fE + U0 - 1), c > cE ? (c = c - cE + U0 - 1, p = !0) : p = !1, (c === Ml || o < Ml && c > Ml || (c > Ml || o < Ml) && p) && c++, (c === yc || o < yc && c > yc || (c > yc || o < yc) && p) && (c++, c === Ml && c++), c > cE && (c = c - cE + U0 - 1);
    var y = String.fromCharCode(u) + String.fromCharCode(c);
    return y;
  }
  function yF(n) {
    if (n && n.length === 0)
      throw "MGRSPoint coverting from nothing";
    for (var e = n.length, t = null, i = "", a, o = 0; !/[A-Z]/.test(a = n.charAt(o)); ) {
      if (o >= 2)
        throw "MGRSPoint bad conversion from: " + n;
      i += a, o++;
    }
    var u = parseInt(i, 10);
    if (o === 0 || o + 3 > e)
      throw "MGRSPoint bad conversion from: " + n;
    var c = n.charAt(o++);
    if (c <= "A" || c === "B" || c === "Y" || c >= "Z" || c === "I" || c === "O")
      throw "MGRSPoint zone letter " + c + " not handled: " + n;
    t = n.substring(o, o += 2);
    for (var p = vF(u), y = uH(t.charAt(0), p), _ = cH(t.charAt(1), p); _ < fH(c); )
      _ += 2e6;
    var S = e - o;
    if (S % 2 !== 0)
      throw `MGRSPoint has to have an even number 
of digits after the zone letter and two 100km letters - front 
half for easting meters, second half for 
northing meters` + n;
    var b = S / 2, T = 0, O = 0, N, D, k, $, B;
    return b > 0 && (N = 1e5 / Math.pow(10, b), D = n.substring(o, o + b), T = parseFloat(D) * N, k = n.substring(o + b), O = parseFloat(k) * N), $ = T + y, B = O + _, {
      easting: $,
      northing: B,
      zoneLetter: c,
      zoneNumber: u,
      accuracy: N
    };
  }
  function uH(n, e) {
    for (var t = dF.charCodeAt(e - 1), i = 1e5, a = !1; t !== n.charCodeAt(0); ) {
      if (t++, t === Ml && t++, t === yc && t++, t > fE) {
        if (a)
          throw "Bad character: " + n;
        t = U0, a = !0;
      }
      i += 1e5;
    }
    return i;
  }
  function cH(n, e) {
    if (n > "V")
      throw "MGRSPoint given invalid Northing " + n;
    for (var t = pF.charCodeAt(e - 1), i = 0, a = !1; t !== n.charCodeAt(0); ) {
      if (t++, t === Ml && t++, t === yc && t++, t > cE) {
        if (a)
          throw "Bad character: " + n;
        t = U0, a = !0;
      }
      i += 1e5;
    }
    return i;
  }
  function fH(n) {
    var e;
    switch (n) {
      case "C":
        e = 11e5;
        break;
      case "D":
        e = 2e6;
        break;
      case "E":
        e = 28e5;
        break;
      case "F":
        e = 37e5;
        break;
      case "G":
        e = 46e5;
        break;
      case "H":
        e = 55e5;
        break;
      case "J":
        e = 64e5;
        break;
      case "K":
        e = 73e5;
        break;
      case "L":
        e = 82e5;
        break;
      case "M":
        e = 91e5;
        break;
      case "N":
        e = 0;
        break;
      case "P":
        e = 8e5;
        break;
      case "Q":
        e = 17e5;
        break;
      case "R":
        e = 26e5;
        break;
      case "S":
        e = 35e5;
        break;
      case "T":
        e = 44e5;
        break;
      case "U":
        e = 53e5;
        break;
      case "V":
        e = 62e5;
        break;
      case "W":
        e = 7e6;
        break;
      case "X":
        e = 79e5;
        break;
      default:
        e = -1;
    }
    if (e >= 0)
      return e;
    throw "Invalid zone letter: " + n;
  }
  function Z0(n, e, t) {
    if (!(this instanceof Z0))
      return new Z0(n, e, t);
    if (Array.isArray(n))
      this.x = n[0], this.y = n[1], this.z = n[2] || 0;
    else if (typeof n == "object")
      this.x = n.x, this.y = n.y, this.z = n.z || 0;
    else if (typeof n == "string" && typeof e > "u") {
      var i = n.split(",");
      this.x = parseFloat(i[0], 10), this.y = parseFloat(i[1], 10), this.z = parseFloat(i[2], 10) || 0;
    } else
      this.x = n, this.y = e, this.z = t || 0;
    console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
  }
  Z0.fromMGRS = function(n) {
    return new Z0(mF(n));
  };
  Z0.prototype.toMGRS = function(n) {
    return gF([this.x, this.y], n);
  };
  var hH = 1, dH = 0.25, hk = 0.046875, dk = 0.01953125, pk = 0.01068115234375, pH = 0.75, gH = 0.46875, mH = 0.013020833333333334, vH = 0.007120768229166667, yH = 0.3645833333333333, _H = 0.005696614583333333, EH = 0.3076171875;
  function _F(n) {
    var e = [];
    e[0] = hH - n * (dH + n * (hk + n * (dk + n * pk))), e[1] = n * (pH - n * (hk + n * (dk + n * pk)));
    var t = n * n;
    return e[2] = t * (gH - n * (mH + n * vH)), t *= n, e[3] = t * (yH - n * _H), e[4] = t * n * EH, e;
  }
  function Dw(n, e, t, i) {
    return t *= e, e *= e, i[0] * n - t * (i[1] + e * (i[2] + e * (i[3] + e * i[4])));
  }
  var SH = 20;
  function EF(n, e, t) {
    for (var i = 1 / (1 - e), a = n, o = SH; o; --o) {
      var u = Math.sin(a), c = 1 - e * u * u;
      if (c = (Dw(a, u, Math.cos(a), t) - n) * (c * Math.sqrt(c)) * i, a -= c, Math.abs(c) < dt)
        return a;
    }
    return a;
  }
  function xH() {
    this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = _F(this.es), this.ml0 = Dw(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en));
  }
  function bH(n) {
    var e = n.x, t = n.y, i = wt(e - this.long0), a, o, u, c = Math.sin(t), p = Math.cos(t);
    if (this.es) {
      var _ = p * i, S = Math.pow(_, 2), b = this.ep2 * Math.pow(p, 2), T = Math.pow(b, 2), O = Math.abs(p) > dt ? Math.tan(t) : 0, N = Math.pow(O, 2), D = Math.pow(N, 2);
      a = 1 - this.es * Math.pow(c, 2), _ = _ / Math.sqrt(a);
      var k = Dw(t, c, p, this.en);
      o = this.a * (this.k0 * _ * (1 + S / 6 * (1 - N + b + S / 20 * (5 - 18 * N + D + 14 * b - 58 * N * b + S / 42 * (61 + 179 * D - D * N - 479 * N))))) + this.x0, u = this.a * (this.k0 * (k - this.ml0 + c * i * _ / 2 * (1 + S / 12 * (5 - N + 9 * b + 4 * T + S / 30 * (61 + D - 58 * N + 270 * b - 330 * N * b + S / 56 * (1385 + 543 * D - D * N - 3111 * N)))))) + this.y0;
    } else {
      var y = p * Math.sin(i);
      if (Math.abs(Math.abs(y) - 1) < dt)
        return 93;
      if (o = 0.5 * this.a * this.k0 * Math.log((1 + y) / (1 - y)) + this.x0, u = p * Math.cos(i) / Math.sqrt(1 - Math.pow(y, 2)), y = Math.abs(u), y >= 1) {
        if (y - 1 > dt)
          return 93;
        u = 0;
      } else
        u = Math.acos(u);
      t < 0 && (u = -u), u = this.a * this.k0 * (u - this.lat0) + this.y0;
    }
    return n.x = o, n.y = u, n;
  }
  function wH(n) {
    var e, t, i, a, o = (n.x - this.x0) * (1 / this.a), u = (n.y - this.y0) * (1 / this.a);
    if (this.es)
      if (e = this.ml0 + u / this.k0, t = EF(e, this.es, this.en), Math.abs(t) < it) {
        var S = Math.sin(t), b = Math.cos(t), T = Math.abs(b) > dt ? Math.tan(t) : 0, O = this.ep2 * Math.pow(b, 2), N = Math.pow(O, 2), D = Math.pow(T, 2), k = Math.pow(D, 2);
        e = 1 - this.es * Math.pow(S, 2);
        var $ = o * Math.sqrt(e) / this.k0, B = Math.pow($, 2);
        e = e * T, i = t - e * B / (1 - this.es) * 0.5 * (1 - B / 12 * (5 + 3 * D - 9 * O * D + O - 4 * N - B / 30 * (61 + 90 * D - 252 * O * D + 45 * k + 46 * O - B / 56 * (1385 + 3633 * D + 4095 * k + 1574 * k * D)))), a = wt(this.long0 + $ * (1 - B / 6 * (1 + 2 * D + O - B / 20 * (5 + 28 * D + 24 * k + 8 * O * D + 6 * O - B / 42 * (61 + 662 * D + 1320 * k + 720 * k * D)))) / b);
      } else
        i = it * QE(u), a = 0;
    else {
      var c = Math.exp(o / this.k0), p = 0.5 * (c - 1 / c), y = this.lat0 + u / this.k0, _ = Math.cos(y);
      e = Math.sqrt((1 - Math.pow(_, 2)) / (1 + Math.pow(p, 2))), i = Math.asin(e), u < 0 && (i = -i), p === 0 && _ === 0 ? a = 0 : a = wt(Math.atan2(p, _) + this.long0);
    }
    return n.x = a, n.y = i, n;
  }
  var CH = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"];
  const Db = {
    init: xH,
    forward: bH,
    inverse: wH,
    names: CH
  };
  function SF(n) {
    var e = Math.exp(n);
    return e = (e - 1 / e) / 2, e;
  }
  function Sf(n, e) {
    n = Math.abs(n), e = Math.abs(e);
    var t = Math.max(n, e), i = Math.min(n, e) / (t || 1);
    return t * Math.sqrt(1 + Math.pow(i, 2));
  }
  function TH(n) {
    var e = 1 + n, t = e - 1;
    return t === 0 ? n : n * Math.log(e) / t;
  }
  function RH(n) {
    var e = Math.abs(n);
    return e = TH(e * (1 + e / (Sf(1, e) + 1))), n < 0 ? -e : e;
  }
  function eL(n, e) {
    for (var t = 2 * Math.cos(2 * e), i = n.length - 1, a = n[i], o = 0, u; --i >= 0; )
      u = -o + t * a + n[i], o = a, a = u;
    return e + u * Math.sin(2 * e);
  }
  function MH(n, e) {
    for (var t = 2 * Math.cos(e), i = n.length - 1, a = n[i], o = 0, u; --i >= 0; )
      u = -o + t * a + n[i], o = a, a = u;
    return Math.sin(e) * u;
  }
  function OH(n) {
    var e = Math.exp(n);
    return e = (e + 1 / e) / 2, e;
  }
  function xF(n, e, t) {
    for (var i = Math.sin(e), a = Math.cos(e), o = SF(t), u = OH(t), c = 2 * a * u, p = -2 * i * o, y = n.length - 1, _ = n[y], S = 0, b = 0, T = 0, O, N; --y >= 0; )
      O = b, N = S, b = _, S = T, _ = -O + c * b - p * S + n[y], T = -N + p * b + c * S;
    return c = i * u, p = a * o, [c * _ - p * T, c * T + p * _];
  }
  function AH() {
    if (!this.approx && (isNaN(this.es) || this.es <= 0))
      throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');
    this.approx && (Db.init.apply(this), this.forward = Db.forward, this.inverse = Db.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = [];
    var n = this.es / (1 + Math.sqrt(1 - this.es)), e = n / (2 - n), t = e;
    this.cgb[0] = e * (2 + e * (-2 / 3 + e * (-2 + e * (116 / 45 + e * (26 / 45 + e * (-2854 / 675)))))), this.cbg[0] = e * (-2 + e * (2 / 3 + e * (4 / 3 + e * (-82 / 45 + e * (32 / 45 + e * (4642 / 4725)))))), t = t * e, this.cgb[1] = t * (7 / 3 + e * (-8 / 5 + e * (-227 / 45 + e * (2704 / 315 + e * (2323 / 945))))), this.cbg[1] = t * (5 / 3 + e * (-16 / 15 + e * (-13 / 9 + e * (904 / 315 + e * (-1522 / 945))))), t = t * e, this.cgb[2] = t * (56 / 15 + e * (-136 / 35 + e * (-1262 / 105 + e * (73814 / 2835)))), this.cbg[2] = t * (-26 / 15 + e * (34 / 21 + e * (8 / 5 + e * (-12686 / 2835)))), t = t * e, this.cgb[3] = t * (4279 / 630 + e * (-332 / 35 + e * (-399572 / 14175))), this.cbg[3] = t * (1237 / 630 + e * (-12 / 5 + e * (-24832 / 14175))), t = t * e, this.cgb[4] = t * (4174 / 315 + e * (-144838 / 6237)), this.cbg[4] = t * (-734 / 315 + e * (109598 / 31185)), t = t * e, this.cgb[5] = t * (601676 / 22275), this.cbg[5] = t * (444337 / 155925), t = Math.pow(e, 2), this.Qn = this.k0 / (1 + e) * (1 + t * (1 / 4 + t * (1 / 64 + t / 256))), this.utg[0] = e * (-0.5 + e * (2 / 3 + e * (-37 / 96 + e * (1 / 360 + e * (81 / 512 + e * (-96199 / 604800)))))), this.gtu[0] = e * (0.5 + e * (-2 / 3 + e * (5 / 16 + e * (41 / 180 + e * (-127 / 288 + e * (7891 / 37800)))))), this.utg[1] = t * (-1 / 48 + e * (-1 / 15 + e * (437 / 1440 + e * (-46 / 105 + e * (1118711 / 3870720))))), this.gtu[1] = t * (13 / 48 + e * (-3 / 5 + e * (557 / 1440 + e * (281 / 630 + e * (-1983433 / 1935360))))), t = t * e, this.utg[2] = t * (-17 / 480 + e * (37 / 840 + e * (209 / 4480 + e * (-5569 / 90720)))), this.gtu[2] = t * (61 / 240 + e * (-103 / 140 + e * (15061 / 26880 + e * (167603 / 181440)))), t = t * e, this.utg[3] = t * (-4397 / 161280 + e * (11 / 504 + e * (830251 / 7257600))), this.gtu[3] = t * (49561 / 161280 + e * (-179 / 168 + e * (6601661 / 7257600))), t = t * e, this.utg[4] = t * (-4583 / 161280 + e * (108847 / 3991680)), this.gtu[4] = t * (34729 / 80640 + e * (-3418889 / 1995840)), t = t * e, this.utg[5] = t * (-20648693 / 638668800), this.gtu[5] = t * (212378941 / 319334400);
    var i = eL(this.cbg, this.lat0);
    this.Zb = -this.Qn * (i + MH(this.gtu, 2 * i));
  }
  function LH(n) {
    var e = wt(n.x - this.long0), t = n.y;
    t = eL(this.cbg, t);
    var i = Math.sin(t), a = Math.cos(t), o = Math.sin(e), u = Math.cos(e);
    t = Math.atan2(i, u * a), e = Math.atan2(o * a, Sf(i, a * u)), e = RH(Math.tan(e));
    var c = xF(this.gtu, 2 * t, 2 * e);
    t = t + c[0], e = e + c[1];
    var p, y;
    return Math.abs(e) <= 2.623395162778 ? (p = this.a * (this.Qn * e) + this.x0, y = this.a * (this.Qn * t + this.Zb) + this.y0) : (p = 1 / 0, y = 1 / 0), n.x = p, n.y = y, n;
  }
  function NH(n) {
    var e = (n.x - this.x0) * (1 / this.a), t = (n.y - this.y0) * (1 / this.a);
    t = (t - this.Zb) / this.Qn, e = e / this.Qn;
    var i, a;
    if (Math.abs(e) <= 2.623395162778) {
      var o = xF(this.utg, 2 * t, 2 * e);
      t = t + o[0], e = e + o[1], e = Math.atan(SF(e));
      var u = Math.sin(t), c = Math.cos(t), p = Math.sin(e), y = Math.cos(e);
      t = Math.atan2(u * y, Sf(p, y * c)), e = Math.atan2(p, y * c), i = wt(e + this.long0), a = eL(this.cgb, t);
    } else
      i = 1 / 0, a = 1 / 0;
    return n.x = i, n.y = a, n;
  }
  var DH = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"];
  const Ib = {
    init: AH,
    forward: LH,
    inverse: NH,
    names: DH
  };
  function IH(n, e) {
    if (n === void 0) {
      if (n = Math.floor((wt(e) + Math.PI) * 30 / Math.PI) + 1, n < 0)
        return 0;
      if (n > 60)
        return 60;
    }
    return n;
  }
  var PH = "etmerc";
  function kH() {
    var n = IH(this.zone, this.long0);
    if (n === void 0)
      throw new Error("unknown utm zone");
    this.lat0 = 0, this.long0 = (6 * Math.abs(n) - 183) * Qs, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Ib.init.apply(this), this.forward = Ib.forward, this.inverse = Ib.inverse;
  }
  var FH = ["Universal Transverse Mercator System", "utm"];
  const jH = {
    init: kH,
    names: FH,
    dependsOn: PH
  };
  function tL(n, e) {
    return Math.pow((1 - n) / (1 + n), e);
  }
  var UH = 20;
  function zH() {
    var n = Math.sin(this.lat0), e = Math.cos(this.lat0);
    e *= e, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * n * n), this.C = Math.sqrt(1 + this.es * e * e / (1 - this.es)), this.phic0 = Math.asin(n / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + Gi) / (Math.pow(Math.tan(0.5 * this.lat0 + Gi), this.C) * tL(this.e * n, this.ratexp));
  }
  function $H(n) {
    var e = n.x, t = n.y;
    return n.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * t + Gi), this.C) * tL(this.e * Math.sin(t), this.ratexp)) - it, n.x = this.C * e, n;
  }
  function BH(n) {
    for (var e = 1e-14, t = n.x / this.C, i = n.y, a = Math.pow(Math.tan(0.5 * i + Gi) / this.K, 1 / this.C), o = UH; o > 0 && (i = 2 * Math.atan(a * tL(this.e * Math.sin(n.y), -0.5 * this.e)) - it, !(Math.abs(i - n.y) < e)); --o)
      n.y = i;
    return o ? (n.x = t, n.y = i, n) : null;
  }
  var VH = ["gauss"];
  const nL = {
    init: zH,
    forward: $H,
    inverse: BH,
    names: VH
  };
  function HH() {
    nL.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative"));
  }
  function WH(n) {
    var e, t, i, a;
    return n.x = wt(n.x - this.long0), nL.forward.apply(this, [n]), e = Math.sin(n.y), t = Math.cos(n.y), i = Math.cos(n.x), a = this.k0 * this.R2 / (1 + this.sinc0 * e + this.cosc0 * t * i), n.x = a * t * Math.sin(n.x), n.y = a * (this.cosc0 * e - this.sinc0 * t * i), n.x = this.a * n.x + this.x0, n.y = this.a * n.y + this.y0, n;
  }
  function GH(n) {
    var e, t, i, a, o;
    if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, o = Math.sqrt(n.x * n.x + n.y * n.y)) {
      var u = 2 * Math.atan2(o, this.R2);
      e = Math.sin(u), t = Math.cos(u), a = Math.asin(t * this.sinc0 + n.y * e * this.cosc0 / o), i = Math.atan2(n.x * e, o * this.cosc0 * t - n.y * this.sinc0 * e);
    } else
      a = this.phic0, i = 0;
    return n.x = i, n.y = a, nL.inverse.apply(this, [n]), n.x = wt(n.x + this.long0), n;
  }
  var YH = ["Stereographic_North_Pole", "Oblique_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
  const qH = {
    init: HH,
    forward: WH,
    inverse: GH,
    names: YH
  };
  function XH(n, e, t) {
    return e *= t, Math.tan(0.5 * (it + n)) * Math.pow((1 - e) / (1 + e), 0.5 * t);
  }
  function KH() {
    this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= dt && (this.k0 = 0.5 * (1 + QE(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= dt && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= dt && Math.abs(Math.cos(this.lat_ts)) > dt && (this.k0 = 0.5 * this.cons * Gh(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / Cf(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = Gh(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - it, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0));
  }
  function ZH(n) {
    var e = n.x, t = n.y, i = Math.sin(t), a = Math.cos(t), o, u, c, p, y, _, S = wt(e - this.long0);
    return Math.abs(Math.abs(e - this.long0) - Math.PI) <= dt && Math.abs(t + this.lat0) <= dt ? (n.x = NaN, n.y = NaN, n) : this.sphere ? (o = 2 * this.k0 / (1 + this.sinlat0 * i + this.coslat0 * a * Math.cos(S)), n.x = this.a * o * a * Math.sin(S) + this.x0, n.y = this.a * o * (this.coslat0 * i - this.sinlat0 * a * Math.cos(S)) + this.y0, n) : (u = 2 * Math.atan(this.ssfn_(t, i, this.e)) - it, p = Math.cos(u), c = Math.sin(u), Math.abs(this.coslat0) <= dt ? (y = Cf(this.e, t * this.con, this.con * i), _ = 2 * this.a * this.k0 * y / this.cons, n.x = this.x0 + _ * Math.sin(e - this.long0), n.y = this.y0 - this.con * _ * Math.cos(e - this.long0), n) : (Math.abs(this.sinlat0) < dt ? (o = 2 * this.a * this.k0 / (1 + p * Math.cos(S)), n.y = o * c) : (o = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * c + this.cosX0 * p * Math.cos(S))), n.y = o * (this.cosX0 * c - this.sinX0 * p * Math.cos(S)) + this.y0), n.x = o * p * Math.sin(S) + this.x0, n));
  }
  function QH(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e, t, i, a, o, u = Math.sqrt(n.x * n.x + n.y * n.y);
    if (this.sphere) {
      var c = 2 * Math.atan(u / (2 * this.a * this.k0));
      return e = this.long0, t = this.lat0, u <= dt ? (n.x = e, n.y = t, n) : (t = Math.asin(Math.cos(c) * this.sinlat0 + n.y * Math.sin(c) * this.coslat0 / u), Math.abs(this.coslat0) < dt ? this.lat0 > 0 ? e = wt(this.long0 + Math.atan2(n.x, -1 * n.y)) : e = wt(this.long0 + Math.atan2(n.x, n.y)) : e = wt(this.long0 + Math.atan2(n.x * Math.sin(c), u * this.coslat0 * Math.cos(c) - n.y * this.sinlat0 * Math.sin(c))), n.x = e, n.y = t, n);
    } else if (Math.abs(this.coslat0) <= dt) {
      if (u <= dt)
        return t = this.lat0, e = this.long0, n.x = e, n.y = t, n;
      n.x *= this.con, n.y *= this.con, i = u * this.cons / (2 * this.a * this.k0), t = this.con * LE(this.e, i), e = this.con * wt(this.con * this.long0 + Math.atan2(n.x, -1 * n.y));
    } else
      a = 2 * Math.atan(u * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), e = this.long0, u <= dt ? o = this.X0 : (o = Math.asin(Math.cos(a) * this.sinX0 + n.y * Math.sin(a) * this.cosX0 / u), e = wt(this.long0 + Math.atan2(n.x * Math.sin(a), u * this.cosX0 * Math.cos(a) - n.y * this.sinX0 * Math.sin(a)))), t = -1 * LE(this.e, Math.tan(0.5 * (it + o)));
    return n.x = e, n.y = t, n;
  }
  var JH = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)", "Polar_Stereographic"];
  const eW = {
    init: KH,
    forward: ZH,
    inverse: QH,
    names: JH,
    ssfn_: XH
  };
  function tW() {
    var n = this.lat0;
    this.lambda0 = this.long0;
    var e = Math.sin(n), t = this.a, i = this.rf, a = 1 / i, o = 2 * a - Math.pow(a, 2), u = this.e = Math.sqrt(o);
    this.R = this.k0 * t * Math.sqrt(1 - o) / (1 - o * Math.pow(e, 2)), this.alpha = Math.sqrt(1 + o / (1 - o) * Math.pow(Math.cos(n), 4)), this.b0 = Math.asin(e / this.alpha);
    var c = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), p = Math.log(Math.tan(Math.PI / 4 + n / 2)), y = Math.log((1 + u * e) / (1 - u * e));
    this.K = c - this.alpha * p + this.alpha * u / 2 * y;
  }
  function nW(n) {
    var e = Math.log(Math.tan(Math.PI / 4 - n.y / 2)), t = this.e / 2 * Math.log((1 + this.e * Math.sin(n.y)) / (1 - this.e * Math.sin(n.y))), i = -this.alpha * (e + t) + this.K, a = 2 * (Math.atan(Math.exp(i)) - Math.PI / 4), o = this.alpha * (n.x - this.lambda0), u = Math.atan(Math.sin(o) / (Math.sin(this.b0) * Math.tan(a) + Math.cos(this.b0) * Math.cos(o))), c = Math.asin(Math.cos(this.b0) * Math.sin(a) - Math.sin(this.b0) * Math.cos(a) * Math.cos(o));
    return n.y = this.R / 2 * Math.log((1 + Math.sin(c)) / (1 - Math.sin(c))) + this.y0, n.x = this.R * u + this.x0, n;
  }
  function iW(n) {
    for (var e = n.x - this.x0, t = n.y - this.y0, i = e / this.R, a = 2 * (Math.atan(Math.exp(t / this.R)) - Math.PI / 4), o = Math.asin(Math.cos(this.b0) * Math.sin(a) + Math.sin(this.b0) * Math.cos(a) * Math.cos(i)), u = Math.atan(Math.sin(i) / (Math.cos(this.b0) * Math.cos(i) - Math.sin(this.b0) * Math.tan(a))), c = this.lambda0 + u / this.alpha, p = 0, y = o, _ = -1e3, S = 0; Math.abs(y - _) > 1e-7; ) {
      if (++S > 20)
        return;
      p = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + o / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(y)) / 2)), _ = y, y = 2 * Math.atan(Math.exp(p)) - Math.PI / 2;
    }
    return n.x = c, n.y = y, n;
  }
  var rW = ["somerc"];
  const aW = {
    init: tW,
    forward: nW,
    inverse: iW,
    names: rW
  };
  var R0 = 1e-7;
  function sW(n) {
    var e = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], t = typeof n.PROJECTION == "object" ? Object.keys(n.PROJECTION)[0] : n.PROJECTION;
    return "no_uoff" in n || "no_off" in n || e.indexOf(t) !== -1;
  }
  function oW() {
    var n, e, t, i, a, o, u, c, p, y, _ = 0, S, b = 0, T = 0, O = 0, N = 0, D = 0, k = 0;
    this.no_off = sW(this), this.no_rot = "no_rot" in this;
    var $ = !1;
    "alpha" in this && ($ = !0);
    var B = !1;
    if ("rectified_grid_angle" in this && (B = !0), $ && (k = this.alpha), B && (_ = this.rectified_grid_angle * Qs), $ || B)
      b = this.longc;
    else if (T = this.long1, N = this.lat1, O = this.long2, D = this.lat2, Math.abs(N - D) <= R0 || (n = Math.abs(N)) <= R0 || Math.abs(n - it) <= R0 || Math.abs(Math.abs(this.lat0) - it) <= R0 || Math.abs(Math.abs(D) - it) <= R0)
      throw new Error();
    var V = 1 - this.es;
    e = Math.sqrt(V), Math.abs(this.lat0) > dt ? (c = Math.sin(this.lat0), t = Math.cos(this.lat0), n = 1 - this.es * c * c, this.B = t * t, this.B = Math.sqrt(1 + this.es * this.B * this.B / V), this.A = this.B * this.k0 * e / n, i = this.B * e / (t * Math.sqrt(n)), a = i * i - 1, a <= 0 ? a = 0 : (a = Math.sqrt(a), this.lat0 < 0 && (a = -a)), this.E = a += i, this.E *= Math.pow(Cf(this.e, this.lat0, c), this.B)) : (this.B = 1 / e, this.A = this.k0, this.E = i = a = 1), $ || B ? ($ ? (S = Math.asin(Math.sin(k) / i), B || (_ = k)) : (S = _, k = Math.asin(i * Math.sin(S))), this.lam0 = b - Math.asin(0.5 * (a - 1 / a) * Math.tan(S)) / this.B) : (o = Math.pow(Cf(this.e, N, Math.sin(N)), this.B), u = Math.pow(Cf(this.e, D, Math.sin(D)), this.B), a = this.E / o, p = (u - o) / (u + o), y = this.E * this.E, y = (y - u * o) / (y + u * o), n = T - O, n < -Math.pi ? O -= OE : n > Math.pi && (O += OE), this.lam0 = wt(0.5 * (T + O) - Math.atan(y * Math.tan(0.5 * this.B * (T - O)) / p) / this.B), S = Math.atan(2 * Math.sin(this.B * wt(T - this.lam0)) / (a - 1 / a)), _ = k = Math.asin(i * Math.sin(S))), this.singam = Math.sin(S), this.cosgam = Math.cos(S), this.sinrot = Math.sin(_), this.cosrot = Math.cos(_), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(i * i - 1) / Math.cos(k))), this.lat0 < 0 && (this.u_0 = -this.u_0)), a = 0.5 * S, this.v_pole_n = this.ArB * Math.log(Math.tan(Gi - a)), this.v_pole_s = this.ArB * Math.log(Math.tan(Gi + a));
  }
  function lW(n) {
    var e = {}, t, i, a, o, u, c, p, y;
    if (n.x = n.x - this.lam0, Math.abs(Math.abs(n.y) - it) > dt) {
      if (u = this.E / Math.pow(Cf(this.e, n.y, Math.sin(n.y)), this.B), c = 1 / u, t = 0.5 * (u - c), i = 0.5 * (u + c), o = Math.sin(this.B * n.x), a = (t * this.singam - o * this.cosgam) / i, Math.abs(Math.abs(a) - 1) < dt)
        throw new Error();
      y = 0.5 * this.ArB * Math.log((1 - a) / (1 + a)), c = Math.cos(this.B * n.x), Math.abs(c) < R0 ? p = this.A * n.x : p = this.ArB * Math.atan2(t * this.cosgam + o * this.singam, c);
    } else
      y = n.y > 0 ? this.v_pole_n : this.v_pole_s, p = this.ArB * n.y;
    return this.no_rot ? (e.x = p, e.y = y) : (p -= this.u_0, e.x = y * this.cosrot + p * this.sinrot, e.y = p * this.cosrot - y * this.sinrot), e.x = this.a * e.x + this.x0, e.y = this.a * e.y + this.y0, e;
  }
  function uW(n) {
    var e, t, i, a, o, u, c, p = {};
    if (n.x = (n.x - this.x0) * (1 / this.a), n.y = (n.y - this.y0) * (1 / this.a), this.no_rot ? (t = n.y, e = n.x) : (t = n.x * this.cosrot - n.y * this.sinrot, e = n.y * this.cosrot + n.x * this.sinrot + this.u_0), i = Math.exp(-this.BrA * t), a = 0.5 * (i - 1 / i), o = 0.5 * (i + 1 / i), u = Math.sin(this.BrA * e), c = (u * this.cosgam + a * this.singam) / o, Math.abs(Math.abs(c) - 1) < dt)
      p.x = 0, p.y = c < 0 ? -it : it;
    else {
      if (p.y = this.E / Math.sqrt((1 + c) / (1 - c)), p.y = LE(this.e, Math.pow(p.y, 1 / this.B)), p.y === 1 / 0)
        throw new Error();
      p.x = -this.rB * Math.atan2(a * this.cosgam - u * this.singam, Math.cos(this.BrA * e));
    }
    return p.x += this.lam0, p;
  }
  var cW = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"];
  const fW = {
    init: oW,
    forward: lW,
    inverse: uW,
    names: cW
  };
  function hW() {
    if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < dt)) {
      var n = this.b / this.a;
      this.e = Math.sqrt(1 - n * n);
      var e = Math.sin(this.lat1), t = Math.cos(this.lat1), i = Gh(this.e, e, t), a = Cf(this.e, this.lat1, e), o = Math.sin(this.lat2), u = Math.cos(this.lat2), c = Gh(this.e, o, u), p = Cf(this.e, this.lat2, o), y = Cf(this.e, this.lat0, Math.sin(this.lat0));
      Math.abs(this.lat1 - this.lat2) > dt ? this.ns = Math.log(i / c) / Math.log(a / p) : this.ns = e, isNaN(this.ns) && (this.ns = e), this.f0 = i / (this.ns * Math.pow(a, this.ns)), this.rh = this.a * this.f0 * Math.pow(y, this.ns), this.title || (this.title = "Lambert Conformal Conic");
    }
  }
  function dW(n) {
    var e = n.x, t = n.y;
    Math.abs(2 * Math.abs(t) - Math.PI) <= dt && (t = QE(t) * (it - 2 * dt));
    var i = Math.abs(Math.abs(t) - it), a, o;
    if (i > dt)
      a = Cf(this.e, t, Math.sin(t)), o = this.a * this.f0 * Math.pow(a, this.ns);
    else {
      if (i = t * this.ns, i <= 0)
        return null;
      o = 0;
    }
    var u = this.ns * wt(e - this.long0);
    return n.x = this.k0 * (o * Math.sin(u)) + this.x0, n.y = this.k0 * (this.rh - o * Math.cos(u)) + this.y0, n;
  }
  function pW(n) {
    var e, t, i, a, o, u = (n.x - this.x0) / this.k0, c = this.rh - (n.y - this.y0) / this.k0;
    this.ns > 0 ? (e = Math.sqrt(u * u + c * c), t = 1) : (e = -Math.sqrt(u * u + c * c), t = -1);
    var p = 0;
    if (e !== 0 && (p = Math.atan2(t * u, t * c)), e !== 0 || this.ns > 0) {
      if (t = 1 / this.ns, i = Math.pow(e / (this.a * this.f0), t), a = LE(this.e, i), a === -9999)
        return null;
    } else
      a = -it;
    return o = wt(p / this.ns + this.long0), n.x = o, n.y = a, n;
  }
  var gW = [
    "Lambert Tangential Conformal Conic Projection",
    "Lambert_Conformal_Conic",
    "Lambert_Conformal_Conic_1SP",
    "Lambert_Conformal_Conic_2SP",
    "lcc",
    "Lambert Conic Conformal (1SP)",
    "Lambert Conic Conformal (2SP)"
  ];
  const mW = {
    init: hW,
    forward: dW,
    inverse: pW,
    names: gW
  };
  function vW() {
    this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq;
  }
  function yW(n) {
    var e, t, i, a, o, u, c, p = n.x, y = n.y, _ = wt(p - this.long0);
    return e = Math.pow((1 + this.e * Math.sin(y)) / (1 - this.e * Math.sin(y)), this.alfa * this.e / 2), t = 2 * (Math.atan(this.k * Math.pow(Math.tan(y / 2 + this.s45), this.alfa) / e) - this.s45), i = -_ * this.alfa, a = Math.asin(Math.cos(this.ad) * Math.sin(t) + Math.sin(this.ad) * Math.cos(t) * Math.cos(i)), o = Math.asin(Math.cos(t) * Math.sin(i) / Math.cos(a)), u = this.n * o, c = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(a / 2 + this.s45), this.n), n.y = c * Math.cos(u) / 1, n.x = c * Math.sin(u) / 1, this.czech || (n.y *= -1, n.x *= -1), n;
  }
  function _W(n) {
    var e, t, i, a, o, u, c, p, y = n.x;
    n.x = n.y, n.y = y, this.czech || (n.y *= -1, n.x *= -1), u = Math.sqrt(n.x * n.x + n.y * n.y), o = Math.atan2(n.y, n.x), a = o / Math.sin(this.s0), i = 2 * (Math.atan(Math.pow(this.ro0 / u, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), e = Math.asin(Math.cos(this.ad) * Math.sin(i) - Math.sin(this.ad) * Math.cos(i) * Math.cos(a)), t = Math.asin(Math.cos(i) * Math.sin(a) / Math.cos(e)), n.x = this.long0 - t / this.alfa, c = e, p = 0;
    var _ = 0;
    do
      n.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(e / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(c)) / (1 - this.e * Math.sin(c)), this.e / 2)) - this.s45), Math.abs(c - n.y) < 1e-10 && (p = 1), c = n.y, _ += 1;
    while (p === 0 && _ < 15);
    return _ >= 15 ? null : n;
  }
  var EW = ["Krovak", "krovak"];
  const SW = {
    init: vW,
    forward: yW,
    inverse: _W,
    names: EW
  };
  function Qo(n, e, t, i, a) {
    return n * a - e * Math.sin(2 * a) + t * Math.sin(4 * a) - i * Math.sin(6 * a);
  }
  function JE(n) {
    return 1 - 0.25 * n * (1 + n / 16 * (3 + 1.25 * n));
  }
  function eS(n) {
    return 0.375 * n * (1 + 0.25 * n * (1 + 0.46875 * n));
  }
  function tS(n) {
    return 0.05859375 * n * n * (1 + 0.75 * n);
  }
  function nS(n) {
    return n * n * n * (35 / 3072);
  }
  function Q0(n, e, t) {
    var i = e * t;
    return n / Math.sqrt(1 - i * i);
  }
  function h_(n) {
    return Math.abs(n) < it ? n : n - QE(n) * Math.PI;
  }
  function Qb(n, e, t, i, a) {
    var o, u;
    o = n / e;
    for (var c = 0; c < 15; c++)
      if (u = (n - (e * o - t * Math.sin(2 * o) + i * Math.sin(4 * o) - a * Math.sin(6 * o))) / (e - 2 * t * Math.cos(2 * o) + 4 * i * Math.cos(4 * o) - 6 * a * Math.cos(6 * o)), o += u, Math.abs(u) <= 1e-10)
        return o;
    return NaN;
  }
  function xW() {
    this.sphere || (this.e0 = JE(this.es), this.e1 = eS(this.es), this.e2 = tS(this.es), this.e3 = nS(this.es), this.ml0 = this.a * Qo(this.e0, this.e1, this.e2, this.e3, this.lat0));
  }
  function bW(n) {
    var e, t, i = n.x, a = n.y;
    if (i = wt(i - this.long0), this.sphere)
      e = this.a * Math.asin(Math.cos(a) * Math.sin(i)), t = this.a * (Math.atan2(Math.tan(a), Math.cos(i)) - this.lat0);
    else {
      var o = Math.sin(a), u = Math.cos(a), c = Q0(this.a, this.e, o), p = Math.tan(a) * Math.tan(a), y = i * Math.cos(a), _ = y * y, S = this.es * u * u / (1 - this.es), b = this.a * Qo(this.e0, this.e1, this.e2, this.e3, a);
      e = c * y * (1 - _ * p * (1 / 6 - (8 - p + 8 * S) * _ / 120)), t = b - this.ml0 + c * o / u * _ * (0.5 + (5 - p + 6 * S) * _ / 24);
    }
    return n.x = e + this.x0, n.y = t + this.y0, n;
  }
  function wW(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e = n.x / this.a, t = n.y / this.a, i, a;
    if (this.sphere) {
      var o = t + this.lat0;
      i = Math.asin(Math.sin(o) * Math.cos(e)), a = Math.atan2(Math.tan(e), Math.cos(o));
    } else {
      var u = this.ml0 / this.a + t, c = Qb(u, this.e0, this.e1, this.e2, this.e3);
      if (Math.abs(Math.abs(c) - it) <= dt)
        return n.x = this.long0, n.y = it, t < 0 && (n.y *= -1), n;
      var p = Q0(this.a, this.e, Math.sin(c)), y = p * p * p / this.a / this.a * (1 - this.es), _ = Math.pow(Math.tan(c), 2), S = e * this.a / p, b = S * S;
      i = c - p * Math.tan(c) / y * S * S * (0.5 - (1 + 3 * _) * S * S / 24), a = S * (1 - b * (_ / 3 + (1 + 3 * _) * _ * b / 15)) / Math.cos(c);
    }
    return n.x = wt(a + this.long0), n.y = h_(i), n;
  }
  var CW = ["Cassini", "Cassini_Soldner", "cass"];
  const TW = {
    init: xW,
    forward: bW,
    inverse: wW,
    names: CW
  };
  function Zg(n, e) {
    var t;
    return n > 1e-7 ? (t = n * e, (1 - n * n) * (e / (1 - t * t) - 0.5 / n * Math.log((1 - t) / (1 + t)))) : 2 * e;
  }
  var RW = 1, MW = 2, OW = 3, AW = 4;
  function LW() {
    var n = Math.abs(this.lat0);
    if (Math.abs(n - it) < dt ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(n) < dt ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) {
      var e;
      switch (this.qp = Zg(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = zW(this.es), this.mode) {
        case this.N_POLE:
          this.dd = 1;
          break;
        case this.S_POLE:
          this.dd = 1;
          break;
        case this.EQUIT:
          this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp;
          break;
        case this.OBLIQ:
          this.rq = Math.sqrt(0.5 * this.qp), e = Math.sin(this.lat0), this.sinb1 = Zg(this.e, e) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * e * e) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd;
          break;
      }
    } else
      this.mode === this.OBLIQ && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0));
  }
  function NW(n) {
    var e, t, i, a, o, u, c, p, y, _, S = n.x, b = n.y;
    if (S = wt(S - this.long0), this.sphere) {
      if (o = Math.sin(b), _ = Math.cos(b), i = Math.cos(S), this.mode === this.OBLIQ || this.mode === this.EQUIT) {
        if (t = this.mode === this.EQUIT ? 1 + _ * i : 1 + this.sinph0 * o + this.cosph0 * _ * i, t <= dt)
          return null;
        t = Math.sqrt(2 / t), e = t * _ * Math.sin(S), t *= this.mode === this.EQUIT ? o : this.cosph0 * o - this.sinph0 * _ * i;
      } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
        if (this.mode === this.N_POLE && (i = -i), Math.abs(b + this.lat0) < dt)
          return null;
        t = Gi - b * 0.5, t = 2 * (this.mode === this.S_POLE ? Math.cos(t) : Math.sin(t)), e = t * Math.sin(S), t *= i;
      }
    } else {
      switch (c = 0, p = 0, y = 0, i = Math.cos(S), a = Math.sin(S), o = Math.sin(b), u = Zg(this.e, o), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (c = u / this.qp, p = Math.sqrt(1 - c * c)), this.mode) {
        case this.OBLIQ:
          y = 1 + this.sinb1 * c + this.cosb1 * p * i;
          break;
        case this.EQUIT:
          y = 1 + p * i;
          break;
        case this.N_POLE:
          y = it + b, u = this.qp - u;
          break;
        case this.S_POLE:
          y = b - it, u = this.qp + u;
          break;
      }
      if (Math.abs(y) < dt)
        return null;
      switch (this.mode) {
        case this.OBLIQ:
        case this.EQUIT:
          y = Math.sqrt(2 / y), this.mode === this.OBLIQ ? t = this.ymf * y * (this.cosb1 * c - this.sinb1 * p * i) : t = (y = Math.sqrt(2 / (1 + p * i))) * c * this.ymf, e = this.xmf * y * p * a;
          break;
        case this.N_POLE:
        case this.S_POLE:
          u >= 0 ? (e = (y = Math.sqrt(u)) * a, t = i * (this.mode === this.S_POLE ? y : -y)) : e = t = 0;
          break;
      }
    }
    return n.x = this.a * e + this.x0, n.y = this.a * t + this.y0, n;
  }
  function DW(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e = n.x / this.a, t = n.y / this.a, i, a, o, u, c, p, y;
    if (this.sphere) {
      var _ = 0, S, b = 0;
      if (S = Math.sqrt(e * e + t * t), a = S * 0.5, a > 1)
        return null;
      switch (a = 2 * Math.asin(a), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (b = Math.sin(a), _ = Math.cos(a)), this.mode) {
        case this.EQUIT:
          a = Math.abs(S) <= dt ? 0 : Math.asin(t * b / S), e *= b, t = _ * S;
          break;
        case this.OBLIQ:
          a = Math.abs(S) <= dt ? this.lat0 : Math.asin(_ * this.sinph0 + t * b * this.cosph0 / S), e *= b * this.cosph0, t = (_ - Math.sin(a) * this.sinph0) * S;
          break;
        case this.N_POLE:
          t = -t, a = it - a;
          break;
        case this.S_POLE:
          a -= it;
          break;
      }
      i = t === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(e, t);
    } else {
      if (y = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) {
        if (e /= this.dd, t *= this.dd, p = Math.sqrt(e * e + t * t), p < dt)
          return n.x = this.long0, n.y = this.lat0, n;
        u = 2 * Math.asin(0.5 * p / this.rq), o = Math.cos(u), e *= u = Math.sin(u), this.mode === this.OBLIQ ? (y = o * this.sinb1 + t * u * this.cosb1 / p, c = this.qp * y, t = p * this.cosb1 * o - t * this.sinb1 * u) : (y = t * u / p, c = this.qp * y, t = p * o);
      } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
        if (this.mode === this.N_POLE && (t = -t), c = e * e + t * t, !c)
          return n.x = this.long0, n.y = this.lat0, n;
        y = 1 - c / this.qp, this.mode === this.S_POLE && (y = -y);
      }
      i = Math.atan2(e, t), a = $W(Math.asin(y), this.apa);
    }
    return n.x = wt(this.long0 + i), n.y = a, n;
  }
  var IW = 0.3333333333333333, PW = 0.17222222222222222, kW = 0.10257936507936508, FW = 0.06388888888888888, jW = 0.0664021164021164, UW = 0.016415012942191543;
  function zW(n) {
    var e, t = [];
    return t[0] = n * IW, e = n * n, t[0] += e * PW, t[1] = e * FW, e *= n, t[0] += e * kW, t[1] += e * jW, t[2] = e * UW, t;
  }
  function $W(n, e) {
    var t = n + n;
    return n + e[0] * Math.sin(t) + e[1] * Math.sin(t + t) + e[2] * Math.sin(t + t + t);
  }
  var BW = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
  const VW = {
    init: LW,
    forward: NW,
    inverse: DW,
    names: BW,
    S_POLE: RW,
    N_POLE: MW,
    EQUIT: OW,
    OBLIQ: AW
  };
  function em(n) {
    return Math.abs(n) > 1 && (n = n > 1 ? 1 : -1), Math.asin(n);
  }
  function HW() {
    Math.abs(this.lat1 + this.lat2) < dt || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = Gh(this.e3, this.sin_po, this.cos_po), this.qs1 = Zg(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = Gh(this.e3, this.sin_po, this.cos_po), this.qs2 = Zg(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = Zg(this.e3, this.sin_po), Math.abs(this.lat1 - this.lat2) > dt ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0);
  }
  function WW(n) {
    var e = n.x, t = n.y;
    this.sin_phi = Math.sin(t), this.cos_phi = Math.cos(t);
    var i = Zg(this.e3, this.sin_phi), a = this.a * Math.sqrt(this.c - this.ns0 * i) / this.ns0, o = this.ns0 * wt(e - this.long0), u = a * Math.sin(o) + this.x0, c = this.rh - a * Math.cos(o) + this.y0;
    return n.x = u, n.y = c, n;
  }
  function GW(n) {
    var e, t, i, a, o, u;
    return n.x -= this.x0, n.y = this.rh - n.y + this.y0, this.ns0 >= 0 ? (e = Math.sqrt(n.x * n.x + n.y * n.y), i = 1) : (e = -Math.sqrt(n.x * n.x + n.y * n.y), i = -1), a = 0, e !== 0 && (a = Math.atan2(i * n.x, i * n.y)), i = e * this.ns0 / this.a, this.sphere ? u = Math.asin((this.c - i * i) / (2 * this.ns0)) : (t = (this.c - i * i) / this.ns0, u = this.phi1z(this.e3, t)), o = wt(a / this.ns0 + this.long0), n.x = o, n.y = u, n;
  }
  function YW(n, e) {
    var t, i, a, o, u, c = em(0.5 * e);
    if (n < dt)
      return c;
    for (var p = n * n, y = 1; y <= 25; y++)
      if (t = Math.sin(c), i = Math.cos(c), a = n * t, o = 1 - a * a, u = 0.5 * o * o / i * (e / (1 - p) - t / o + 0.5 / n * Math.log((1 - a) / (1 + a))), c = c + u, Math.abs(u) <= 1e-7)
        return c;
    return null;
  }
  var qW = ["Albers_Conic_Equal_Area", "Albers", "aea"];
  const XW = {
    init: HW,
    forward: WW,
    inverse: GW,
    names: qW,
    phi1z: YW
  };
  function KW() {
    this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1;
  }
  function ZW(n) {
    var e, t, i, a, o, u, c, p, y = n.x, _ = n.y;
    return i = wt(y - this.long0), e = Math.sin(_), t = Math.cos(_), a = Math.cos(i), u = this.sin_p14 * e + this.cos_p14 * t * a, o = 1, u > 0 || Math.abs(u) <= dt ? (c = this.x0 + this.a * o * t * Math.sin(i) / u, p = this.y0 + this.a * o * (this.cos_p14 * e - this.sin_p14 * t * a) / u) : (c = this.x0 + this.infinity_dist * t * Math.sin(i), p = this.y0 + this.infinity_dist * (this.cos_p14 * e - this.sin_p14 * t * a)), n.x = c, n.y = p, n;
  }
  function QW(n) {
    var e, t, i, a, o, u;
    return n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, (e = Math.sqrt(n.x * n.x + n.y * n.y)) ? (a = Math.atan2(e, this.rc), t = Math.sin(a), i = Math.cos(a), u = em(i * this.sin_p14 + n.y * t * this.cos_p14 / e), o = Math.atan2(n.x * t, e * this.cos_p14 * i - n.y * this.sin_p14 * t), o = wt(this.long0 + o)) : (u = this.phic0, o = 0), n.x = o, n.y = u, n;
  }
  var JW = ["gnom"];
  const eG = {
    init: KW,
    forward: ZW,
    inverse: QW,
    names: JW
  };
  function tG(n, e) {
    var t = 1 - (1 - n * n) / (2 * n) * Math.log((1 - n) / (1 + n));
    if (Math.abs(Math.abs(e) - t) < 1e-6)
      return e < 0 ? -1 * it : it;
    for (var i = Math.asin(0.5 * e), a, o, u, c, p = 0; p < 30; p++)
      if (o = Math.sin(i), u = Math.cos(i), c = n * o, a = Math.pow(1 - c * c, 2) / (2 * u) * (e / (1 - n * n) - o / (1 - c * c) + 0.5 / n * Math.log((1 - c) / (1 + c))), i += a, Math.abs(a) <= 1e-10)
        return i;
    return NaN;
  }
  function nG() {
    this.sphere || (this.k0 = Gh(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)));
  }
  function iG(n) {
    var e = n.x, t = n.y, i, a, o = wt(e - this.long0);
    if (this.sphere)
      i = this.x0 + this.a * o * Math.cos(this.lat_ts), a = this.y0 + this.a * Math.sin(t) / Math.cos(this.lat_ts);
    else {
      var u = Zg(this.e, Math.sin(t));
      i = this.x0 + this.a * this.k0 * o, a = this.y0 + this.a * u * 0.5 / this.k0;
    }
    return n.x = i, n.y = a, n;
  }
  function rG(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e, t;
    return this.sphere ? (e = wt(this.long0 + n.x / this.a / Math.cos(this.lat_ts)), t = Math.asin(n.y / this.a * Math.cos(this.lat_ts))) : (t = tG(this.e, 2 * n.y * this.k0 / this.a), e = wt(this.long0 + n.x / (this.a * this.k0))), n.x = e, n.y = t, n;
  }
  var aG = ["cea"];
  const sG = {
    init: nG,
    forward: iG,
    inverse: rG,
    names: aG
  };
  function oG() {
    this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts);
  }
  function lG(n) {
    var e = n.x, t = n.y, i = wt(e - this.long0), a = h_(t - this.lat0);
    return n.x = this.x0 + this.a * i * this.rc, n.y = this.y0 + this.a * a, n;
  }
  function uG(n) {
    var e = n.x, t = n.y;
    return n.x = wt(this.long0 + (e - this.x0) / (this.a * this.rc)), n.y = h_(this.lat0 + (t - this.y0) / this.a), n;
  }
  var cG = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
  const fG = {
    init: oG,
    forward: lG,
    inverse: uG,
    names: cG
  };
  var gk = 20;
  function hG() {
    this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = JE(this.es), this.e1 = eS(this.es), this.e2 = tS(this.es), this.e3 = nS(this.es), this.ml0 = this.a * Qo(this.e0, this.e1, this.e2, this.e3, this.lat0);
  }
  function dG(n) {
    var e = n.x, t = n.y, i, a, o, u = wt(e - this.long0);
    if (o = u * Math.sin(t), this.sphere)
      Math.abs(t) <= dt ? (i = this.a * u, a = -1 * this.a * this.lat0) : (i = this.a * Math.sin(o) / Math.tan(t), a = this.a * (h_(t - this.lat0) + (1 - Math.cos(o)) / Math.tan(t)));
    else if (Math.abs(t) <= dt)
      i = this.a * u, a = -1 * this.ml0;
    else {
      var c = Q0(this.a, this.e, Math.sin(t)) / Math.tan(t);
      i = c * Math.sin(o), a = this.a * Qo(this.e0, this.e1, this.e2, this.e3, t) - this.ml0 + c * (1 - Math.cos(o));
    }
    return n.x = i + this.x0, n.y = a + this.y0, n;
  }
  function pG(n) {
    var e, t, i, a, o, u, c, p, y;
    if (i = n.x - this.x0, a = n.y - this.y0, this.sphere)
      if (Math.abs(a + this.a * this.lat0) <= dt)
        e = wt(i / this.a + this.long0), t = 0;
      else {
        u = this.lat0 + a / this.a, c = i * i / this.a / this.a + u * u, p = u;
        var _;
        for (o = gk; o; --o)
          if (_ = Math.tan(p), y = -1 * (u * (p * _ + 1) - p - 0.5 * (p * p + c) * _) / ((p - u) / _ - 1), p += y, Math.abs(y) <= dt) {
            t = p;
            break;
          }
        e = wt(this.long0 + Math.asin(i * Math.tan(p) / this.a) / Math.sin(t));
      }
    else if (Math.abs(a + this.ml0) <= dt)
      t = 0, e = wt(this.long0 + i / this.a);
    else {
      u = (this.ml0 + a) / this.a, c = i * i / this.a / this.a + u * u, p = u;
      var S, b, T, O, N;
      for (o = gk; o; --o)
        if (N = this.e * Math.sin(p), S = Math.sqrt(1 - N * N) * Math.tan(p), b = this.a * Qo(this.e0, this.e1, this.e2, this.e3, p), T = this.e0 - 2 * this.e1 * Math.cos(2 * p) + 4 * this.e2 * Math.cos(4 * p) - 6 * this.e3 * Math.cos(6 * p), O = b / this.a, y = (u * (S * O + 1) - O - 0.5 * S * (O * O + c)) / (this.es * Math.sin(2 * p) * (O * O + c - 2 * u * O) / (4 * S) + (u - O) * (S * T - 2 / Math.sin(2 * p)) - T), p -= y, Math.abs(y) <= dt) {
          t = p;
          break;
        }
      S = Math.sqrt(1 - this.es * Math.pow(Math.sin(t), 2)) * Math.tan(t), e = wt(this.long0 + Math.asin(i * S / this.a) / Math.sin(t));
    }
    return n.x = e, n.y = t, n;
  }
  var gG = ["Polyconic", "poly"];
  const mG = {
    init: hG,
    forward: dG,
    inverse: pG,
    names: gG
  };
  function vG() {
    this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4;
  }
  function yG(n) {
    var e, t = n.x, i = n.y, a = i - this.lat0, o = t - this.long0, u = a / yE * 1e-5, c = o, p = 1, y = 0;
    for (e = 1; e <= 10; e++)
      p = p * u, y = y + this.A[e] * p;
    var _ = y, S = c, b = 1, T = 0, O, N, D = 0, k = 0;
    for (e = 1; e <= 6; e++)
      O = b * _ - T * S, N = T * _ + b * S, b = O, T = N, D = D + this.B_re[e] * b - this.B_im[e] * T, k = k + this.B_im[e] * b + this.B_re[e] * T;
    return n.x = k * this.a + this.x0, n.y = D * this.a + this.y0, n;
  }
  function _G(n) {
    var e, t = n.x, i = n.y, a = t - this.x0, o = i - this.y0, u = o / this.a, c = a / this.a, p = 1, y = 0, _, S, b = 0, T = 0;
    for (e = 1; e <= 6; e++)
      _ = p * u - y * c, S = y * u + p * c, p = _, y = S, b = b + this.C_re[e] * p - this.C_im[e] * y, T = T + this.C_im[e] * p + this.C_re[e] * y;
    for (var O = 0; O < this.iterations; O++) {
      var N = b, D = T, k, $, B = u, V = c;
      for (e = 2; e <= 6; e++)
        k = N * b - D * T, $ = D * b + N * T, N = k, D = $, B = B + (e - 1) * (this.B_re[e] * N - this.B_im[e] * D), V = V + (e - 1) * (this.B_im[e] * N + this.B_re[e] * D);
      N = 1, D = 0;
      var z = this.B_re[1], G = this.B_im[1];
      for (e = 2; e <= 6; e++)
        k = N * b - D * T, $ = D * b + N * T, N = k, D = $, z = z + e * (this.B_re[e] * N - this.B_im[e] * D), G = G + e * (this.B_im[e] * N + this.B_re[e] * D);
      var ie = z * z + G * G;
      b = (B * z + V * G) / ie, T = (V * z - B * G) / ie;
    }
    var ue = b, Re = T, Oe = 1, $e = 0;
    for (e = 1; e <= 9; e++)
      Oe = Oe * ue, $e = $e + this.D[e] * Oe;
    var Ee = this.lat0 + $e * yE * 1e5, Fe = this.long0 + Re;
    return n.x = Fe, n.y = Ee, n;
  }
  var EG = ["New_Zealand_Map_Grid", "nzmg"];
  const SG = {
    init: vG,
    forward: yG,
    inverse: _G,
    names: EG
  };
  function xG() {
  }
  function bG(n) {
    var e = n.x, t = n.y, i = wt(e - this.long0), a = this.x0 + this.a * i, o = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + t / 2.5)) * 1.25;
    return n.x = a, n.y = o, n;
  }
  function wG(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e = wt(this.long0 + n.x / this.a), t = 2.5 * (Math.atan(Math.exp(0.8 * n.y / this.a)) - Math.PI / 4);
    return n.x = e, n.y = t, n;
  }
  var CG = ["Miller_Cylindrical", "mill"];
  const TG = {
    init: xG,
    forward: bG,
    inverse: wG,
    names: CG
  };
  var RG = 20;
  function MG() {
    this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = _F(this.es);
  }
  function OG(n) {
    var e, t, i = n.x, a = n.y;
    if (i = wt(i - this.long0), this.sphere) {
      if (!this.m)
        a = this.n !== 1 ? Math.asin(this.n * Math.sin(a)) : a;
      else
        for (var o = this.n * Math.sin(a), u = RG; u; --u) {
          var c = (this.m * a + Math.sin(a) - o) / (this.m + Math.cos(a));
          if (a -= c, Math.abs(c) < dt)
            break;
        }
      e = this.a * this.C_x * i * (this.m + Math.cos(a)), t = this.a * this.C_y * a;
    } else {
      var p = Math.sin(a), y = Math.cos(a);
      t = this.a * Dw(a, p, y, this.en), e = this.a * i * y / Math.sqrt(1 - this.es * p * p);
    }
    return n.x = e, n.y = t, n;
  }
  function AG(n) {
    var e, t, i, a;
    return n.x -= this.x0, i = n.x / this.a, n.y -= this.y0, e = n.y / this.a, this.sphere ? (e /= this.C_y, i = i / (this.C_x * (this.m + Math.cos(e))), this.m ? e = em((this.m * e + Math.sin(e)) / this.n) : this.n !== 1 && (e = em(Math.sin(e) / this.n)), i = wt(i + this.long0), e = h_(e)) : (e = EF(n.y / this.a, this.es, this.en), a = Math.abs(e), a < it ? (a = Math.sin(e), t = this.long0 + n.x * Math.sqrt(1 - this.es * a * a) / (this.a * Math.cos(e)), i = wt(t)) : a - dt < it && (i = this.long0)), n.x = i, n.y = e, n;
  }
  var LG = ["Sinusoidal", "sinu"];
  const NG = {
    init: MG,
    forward: OG,
    inverse: AG,
    names: LG
  };
  function DG() {
  }
  function IG(n) {
    for (var e = n.x, t = n.y, i = wt(e - this.long0), a = t, o = Math.PI * Math.sin(t); ; ) {
      var u = -(a + Math.sin(a) - o) / (1 + Math.cos(a));
      if (a += u, Math.abs(u) < dt)
        break;
    }
    a /= 2, Math.PI / 2 - Math.abs(t) < dt && (i = 0);
    var c = 0.900316316158 * this.a * i * Math.cos(a) + this.x0, p = 1.4142135623731 * this.a * Math.sin(a) + this.y0;
    return n.x = c, n.y = p, n;
  }
  function PG(n) {
    var e, t;
    n.x -= this.x0, n.y -= this.y0, t = n.y / (1.4142135623731 * this.a), Math.abs(t) > 0.999999999999 && (t = 0.999999999999), e = Math.asin(t);
    var i = wt(this.long0 + n.x / (0.900316316158 * this.a * Math.cos(e)));
    i < -Math.PI && (i = -Math.PI), i > Math.PI && (i = Math.PI), t = (2 * e + Math.sin(2 * e)) / Math.PI, Math.abs(t) > 1 && (t = 1);
    var a = Math.asin(t);
    return n.x = i, n.y = a, n;
  }
  var kG = ["Mollweide", "moll"];
  const FG = {
    init: DG,
    forward: IG,
    inverse: PG,
    names: kG
  };
  function jG() {
    Math.abs(this.lat1 + this.lat2) < dt || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = JE(this.es), this.e1 = eS(this.es), this.e2 = tS(this.es), this.e3 = nS(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = Gh(this.e, this.sinphi, this.cosphi), this.ml1 = Qo(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < dt ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = Gh(this.e, this.sinphi, this.cosphi), this.ml2 = Qo(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Qo(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0));
  }
  function UG(n) {
    var e = n.x, t = n.y, i;
    if (this.sphere)
      i = this.a * (this.g - t);
    else {
      var a = Qo(this.e0, this.e1, this.e2, this.e3, t);
      i = this.a * (this.g - a);
    }
    var o = this.ns * wt(e - this.long0), u = this.x0 + i * Math.sin(o), c = this.y0 + this.rh - i * Math.cos(o);
    return n.x = u, n.y = c, n;
  }
  function zG(n) {
    n.x -= this.x0, n.y = this.rh - n.y + this.y0;
    var e, t, i, a;
    this.ns >= 0 ? (t = Math.sqrt(n.x * n.x + n.y * n.y), e = 1) : (t = -Math.sqrt(n.x * n.x + n.y * n.y), e = -1);
    var o = 0;
    if (t !== 0 && (o = Math.atan2(e * n.x, e * n.y)), this.sphere)
      return a = wt(this.long0 + o / this.ns), i = h_(this.g - t / this.a), n.x = a, n.y = i, n;
    var u = this.g - t / this.a;
    return i = Qb(u, this.e0, this.e1, this.e2, this.e3), a = wt(this.long0 + o / this.ns), n.x = a, n.y = i, n;
  }
  var $G = ["Equidistant_Conic", "eqdc"];
  const BG = {
    init: jG,
    forward: UG,
    inverse: zG,
    names: $G
  };
  function VG() {
    this.R = this.a;
  }
  function HG(n) {
    var e = n.x, t = n.y, i = wt(e - this.long0), a, o;
    Math.abs(t) <= dt && (a = this.x0 + this.R * i, o = this.y0);
    var u = em(2 * Math.abs(t / Math.PI));
    (Math.abs(i) <= dt || Math.abs(Math.abs(t) - it) <= dt) && (a = this.x0, t >= 0 ? o = this.y0 + Math.PI * this.R * Math.tan(0.5 * u) : o = this.y0 + Math.PI * this.R * -Math.tan(0.5 * u));
    var c = 0.5 * Math.abs(Math.PI / i - i / Math.PI), p = c * c, y = Math.sin(u), _ = Math.cos(u), S = _ / (y + _ - 1), b = S * S, T = S * (2 / y - 1), O = T * T, N = Math.PI * this.R * (c * (S - O) + Math.sqrt(p * (S - O) * (S - O) - (O + p) * (b - O))) / (O + p);
    i < 0 && (N = -N), a = this.x0 + N;
    var D = p + S;
    return N = Math.PI * this.R * (T * D - c * Math.sqrt((O + p) * (p + 1) - D * D)) / (O + p), t >= 0 ? o = this.y0 + N : o = this.y0 - N, n.x = a, n.y = o, n;
  }
  function WG(n) {
    var e, t, i, a, o, u, c, p, y, _, S, b, T;
    return n.x -= this.x0, n.y -= this.y0, S = Math.PI * this.R, i = n.x / S, a = n.y / S, o = i * i + a * a, u = -Math.abs(a) * (1 + o), c = u - 2 * a * a + i * i, p = -2 * u + 1 + 2 * a * a + o * o, T = a * a / p + (2 * c * c * c / p / p / p - 9 * u * c / p / p) / 27, y = (u - c * c / 3 / p) / p, _ = 2 * Math.sqrt(-y / 3), S = 3 * T / y / _, Math.abs(S) > 1 && (S >= 0 ? S = 1 : S = -1), b = Math.acos(S) / 3, n.y >= 0 ? t = (-_ * Math.cos(b + Math.PI / 3) - c / 3 / p) * Math.PI : t = -(-_ * Math.cos(b + Math.PI / 3) - c / 3 / p) * Math.PI, Math.abs(i) < dt ? e = this.long0 : e = wt(this.long0 + Math.PI * (o - 1 + Math.sqrt(1 + 2 * (i * i - a * a) + o * o)) / 2 / i), n.x = e, n.y = t, n;
  }
  var GG = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
  const YG = {
    init: VG,
    forward: HG,
    inverse: WG,
    names: GG
  };
  function qG() {
    this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0);
  }
  function XG(n) {
    var e = n.x, t = n.y, i = Math.sin(n.y), a = Math.cos(n.y), o = wt(e - this.long0), u, c, p, y, _, S, b, T, O, N, D, k, $, B, V, z, G, ie, ue, Re, Oe, $e, Ee;
    return this.sphere ? Math.abs(this.sin_p12 - 1) <= dt ? (n.x = this.x0 + this.a * (it - t) * Math.sin(o), n.y = this.y0 - this.a * (it - t) * Math.cos(o), n) : Math.abs(this.sin_p12 + 1) <= dt ? (n.x = this.x0 + this.a * (it + t) * Math.sin(o), n.y = this.y0 + this.a * (it + t) * Math.cos(o), n) : (ie = this.sin_p12 * i + this.cos_p12 * a * Math.cos(o), z = Math.acos(ie), G = z ? z / Math.sin(z) : 1, n.x = this.x0 + this.a * G * a * Math.sin(o), n.y = this.y0 + this.a * G * (this.cos_p12 * i - this.sin_p12 * a * Math.cos(o)), n) : (u = JE(this.es), c = eS(this.es), p = tS(this.es), y = nS(this.es), Math.abs(this.sin_p12 - 1) <= dt ? (_ = this.a * Qo(u, c, p, y, it), S = this.a * Qo(u, c, p, y, t), n.x = this.x0 + (_ - S) * Math.sin(o), n.y = this.y0 - (_ - S) * Math.cos(o), n) : Math.abs(this.sin_p12 + 1) <= dt ? (_ = this.a * Qo(u, c, p, y, it), S = this.a * Qo(u, c, p, y, t), n.x = this.x0 + (_ + S) * Math.sin(o), n.y = this.y0 + (_ + S) * Math.cos(o), n) : (b = i / a, T = Q0(this.a, this.e, this.sin_p12), O = Q0(this.a, this.e, i), N = Math.atan((1 - this.es) * b + this.es * T * this.sin_p12 / (O * a)), D = Math.atan2(Math.sin(o), this.cos_p12 * Math.tan(N) - this.sin_p12 * Math.cos(o)), D === 0 ? ue = Math.asin(this.cos_p12 * Math.sin(N) - this.sin_p12 * Math.cos(N)) : Math.abs(Math.abs(D) - Math.PI) <= dt ? ue = -Math.asin(this.cos_p12 * Math.sin(N) - this.sin_p12 * Math.cos(N)) : ue = Math.asin(Math.sin(o) * Math.cos(N) / Math.sin(D)), k = this.e * this.sin_p12 / Math.sqrt(1 - this.es), $ = this.e * this.cos_p12 * Math.cos(D) / Math.sqrt(1 - this.es), B = k * $, V = $ * $, Re = ue * ue, Oe = Re * ue, $e = Oe * ue, Ee = $e * ue, z = T * ue * (1 - Re * V * (1 - V) / 6 + Oe / 8 * B * (1 - 2 * V) + $e / 120 * (V * (4 - 7 * V) - 3 * k * k * (1 - 7 * V)) - Ee / 48 * B), n.x = this.x0 + z * Math.sin(D), n.y = this.y0 + z * Math.cos(D), n));
  }
  function KG(n) {
    n.x -= this.x0, n.y -= this.y0;
    var e, t, i, a, o, u, c, p, y, _, S, b, T, O, N, D, k, $, B, V, z, G, ie, ue;
    return this.sphere ? (e = Math.sqrt(n.x * n.x + n.y * n.y), e > 2 * it * this.a ? void 0 : (t = e / this.a, i = Math.sin(t), a = Math.cos(t), o = this.long0, Math.abs(e) <= dt ? u = this.lat0 : (u = em(a * this.sin_p12 + n.y * i * this.cos_p12 / e), c = Math.abs(this.lat0) - it, Math.abs(c) <= dt ? this.lat0 >= 0 ? o = wt(this.long0 + Math.atan2(n.x, -n.y)) : o = wt(this.long0 - Math.atan2(-n.x, n.y)) : o = wt(this.long0 + Math.atan2(n.x * i, e * this.cos_p12 * a - n.y * this.sin_p12 * i))), n.x = o, n.y = u, n)) : (p = JE(this.es), y = eS(this.es), _ = tS(this.es), S = nS(this.es), Math.abs(this.sin_p12 - 1) <= dt ? (b = this.a * Qo(p, y, _, S, it), e = Math.sqrt(n.x * n.x + n.y * n.y), T = b - e, u = Qb(T / this.a, p, y, _, S), o = wt(this.long0 + Math.atan2(n.x, -1 * n.y)), n.x = o, n.y = u, n) : Math.abs(this.sin_p12 + 1) <= dt ? (b = this.a * Qo(p, y, _, S, it), e = Math.sqrt(n.x * n.x + n.y * n.y), T = e - b, u = Qb(T / this.a, p, y, _, S), o = wt(this.long0 + Math.atan2(n.x, n.y)), n.x = o, n.y = u, n) : (e = Math.sqrt(n.x * n.x + n.y * n.y), D = Math.atan2(n.x, n.y), O = Q0(this.a, this.e, this.sin_p12), k = Math.cos(D), $ = this.e * this.cos_p12 * k, B = -$ * $ / (1 - this.es), V = 3 * this.es * (1 - B) * this.sin_p12 * this.cos_p12 * k / (1 - this.es), z = e / O, G = z - B * (1 + B) * Math.pow(z, 3) / 6 - V * (1 + 3 * B) * Math.pow(z, 4) / 24, ie = 1 - B * G * G / 2 - z * G * G * G / 6, N = Math.asin(this.sin_p12 * Math.cos(G) + this.cos_p12 * Math.sin(G) * k), o = wt(this.long0 + Math.asin(Math.sin(D) * Math.sin(G) / Math.cos(N))), ue = Math.sin(N), u = Math.atan2((ue - this.es * ie * this.sin_p12) * Math.tan(N), ue * (1 - this.es)), n.x = o, n.y = u, n));
  }
  var ZG = ["Azimuthal_Equidistant", "aeqd"];
  const QG = {
    init: qG,
    forward: XG,
    inverse: KG,
    names: ZG
  };
  function JG() {
    this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0);
  }
  function e9(n) {
    var e, t, i, a, o, u, c, p, y = n.x, _ = n.y;
    return i = wt(y - this.long0), e = Math.sin(_), t = Math.cos(_), a = Math.cos(i), u = this.sin_p14 * e + this.cos_p14 * t * a, o = 1, (u > 0 || Math.abs(u) <= dt) && (c = this.a * o * t * Math.sin(i), p = this.y0 + this.a * o * (this.cos_p14 * e - this.sin_p14 * t * a)), n.x = c, n.y = p, n;
  }
  function t9(n) {
    var e, t, i, a, o, u, c;
    return n.x -= this.x0, n.y -= this.y0, e = Math.sqrt(n.x * n.x + n.y * n.y), t = em(e / this.a), i = Math.sin(t), a = Math.cos(t), u = this.long0, Math.abs(e) <= dt ? (c = this.lat0, n.x = u, n.y = c, n) : (c = em(a * this.sin_p14 + n.y * i * this.cos_p14 / e), o = Math.abs(this.lat0) - it, Math.abs(o) <= dt ? (this.lat0 >= 0 ? u = wt(this.long0 + Math.atan2(n.x, -n.y)) : u = wt(this.long0 - Math.atan2(-n.x, n.y)), n.x = u, n.y = c, n) : (u = wt(this.long0 + Math.atan2(n.x * i, e * this.cos_p14 * a - n.y * this.sin_p14 * i)), n.x = u, n.y = c, n));
  }
  var n9 = ["ortho"];
  const i9 = {
    init: JG,
    forward: e9,
    inverse: t9,
    names: n9
  };
  var aa = {
    FRONT: 1,
    RIGHT: 2,
    BACK: 3,
    LEFT: 4,
    TOP: 5,
    BOTTOM: 6
  }, Yi = {
    AREA_0: 1,
    AREA_1: 2,
    AREA_2: 3,
    AREA_3: 4
  };
  function r9() {
    this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= it - Gi / 2 ? this.face = aa.TOP : this.lat0 <= -(it - Gi / 2) ? this.face = aa.BOTTOM : Math.abs(this.long0) <= Gi ? this.face = aa.FRONT : Math.abs(this.long0) <= it + Gi ? this.face = this.long0 > 0 ? aa.RIGHT : aa.LEFT : this.face = aa.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f);
  }
  function a9(n) {
    var e = { x: 0, y: 0 }, t, i, a, o, u, c, p = { value: 0 };
    if (n.x -= this.long0, this.es !== 0 ? t = Math.atan(this.one_minus_f_squared * Math.tan(n.y)) : t = n.y, i = n.x, this.face === aa.TOP)
      o = it - t, i >= Gi && i <= it + Gi ? (p.value = Yi.AREA_0, a = i - it) : i > it + Gi || i <= -(it + Gi) ? (p.value = Yi.AREA_1, a = i > 0 ? i - ba : i + ba) : i > -(it + Gi) && i <= -Gi ? (p.value = Yi.AREA_2, a = i + it) : (p.value = Yi.AREA_3, a = i);
    else if (this.face === aa.BOTTOM)
      o = it + t, i >= Gi && i <= it + Gi ? (p.value = Yi.AREA_0, a = -i + it) : i < Gi && i >= -Gi ? (p.value = Yi.AREA_1, a = -i) : i < -Gi && i >= -(it + Gi) ? (p.value = Yi.AREA_2, a = -i - it) : (p.value = Yi.AREA_3, a = i > 0 ? -i + ba : -i - ba);
    else {
      var y, _, S, b, T, O, N;
      this.face === aa.RIGHT ? i = W0(i, +it) : this.face === aa.BACK ? i = W0(i, +ba) : this.face === aa.LEFT && (i = W0(i, -it)), b = Math.sin(t), T = Math.cos(t), O = Math.sin(i), N = Math.cos(i), y = T * N, _ = T * O, S = b, this.face === aa.FRONT ? (o = Math.acos(y), a = lb(o, S, _, p)) : this.face === aa.RIGHT ? (o = Math.acos(_), a = lb(o, S, -y, p)) : this.face === aa.BACK ? (o = Math.acos(-y), a = lb(o, S, -_, p)) : this.face === aa.LEFT ? (o = Math.acos(-_), a = lb(o, S, y, p)) : (o = a = 0, p.value = Yi.AREA_0);
    }
    return c = Math.atan(12 / ba * (a + Math.acos(Math.sin(a) * Math.cos(Gi)) - it)), u = Math.sqrt((1 - Math.cos(o)) / (Math.cos(c) * Math.cos(c)) / (1 - Math.cos(Math.atan(1 / Math.cos(a))))), p.value === Yi.AREA_1 ? c += it : p.value === Yi.AREA_2 ? c += ba : p.value === Yi.AREA_3 && (c += 1.5 * ba), e.x = u * Math.cos(c), e.y = u * Math.sin(c), e.x = e.x * this.a + this.x0, e.y = e.y * this.a + this.y0, n.x = e.x, n.y = e.y, n;
  }
  function s9(n) {
    var e = { lam: 0, phi: 0 }, t, i, a, o, u, c, p, y, _, S = { value: 0 };
    if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, i = Math.atan(Math.sqrt(n.x * n.x + n.y * n.y)), t = Math.atan2(n.y, n.x), n.x >= 0 && n.x >= Math.abs(n.y) ? S.value = Yi.AREA_0 : n.y >= 0 && n.y >= Math.abs(n.x) ? (S.value = Yi.AREA_1, t -= it) : n.x < 0 && -n.x >= Math.abs(n.y) ? (S.value = Yi.AREA_2, t = t < 0 ? t + ba : t - ba) : (S.value = Yi.AREA_3, t += it), _ = ba / 12 * Math.tan(t), u = Math.sin(_) / (Math.cos(_) - 1 / Math.sqrt(2)), c = Math.atan(u), a = Math.cos(t), o = Math.tan(i), p = 1 - a * a * o * o * (1 - Math.cos(Math.atan(1 / Math.cos(c)))), p < -1 ? p = -1 : p > 1 && (p = 1), this.face === aa.TOP)
      y = Math.acos(p), e.phi = it - y, S.value === Yi.AREA_0 ? e.lam = c + it : S.value === Yi.AREA_1 ? e.lam = c < 0 ? c + ba : c - ba : S.value === Yi.AREA_2 ? e.lam = c - it : e.lam = c;
    else if (this.face === aa.BOTTOM)
      y = Math.acos(p), e.phi = y - it, S.value === Yi.AREA_0 ? e.lam = -c + it : S.value === Yi.AREA_1 ? e.lam = -c : S.value === Yi.AREA_2 ? e.lam = -c - it : e.lam = c < 0 ? -c - ba : -c + ba;
    else {
      var b, T, O;
      b = p, _ = b * b, _ >= 1 ? O = 0 : O = Math.sqrt(1 - _) * Math.sin(c), _ += O * O, _ >= 1 ? T = 0 : T = Math.sqrt(1 - _), S.value === Yi.AREA_1 ? (_ = T, T = -O, O = _) : S.value === Yi.AREA_2 ? (T = -T, O = -O) : S.value === Yi.AREA_3 && (_ = T, T = O, O = -_), this.face === aa.RIGHT ? (_ = b, b = -T, T = _) : this.face === aa.BACK ? (b = -b, T = -T) : this.face === aa.LEFT && (_ = b, b = T, T = -_), e.phi = Math.acos(-O) - it, e.lam = Math.atan2(T, b), this.face === aa.RIGHT ? e.lam = W0(e.lam, -it) : this.face === aa.BACK ? e.lam = W0(e.lam, -ba) : this.face === aa.LEFT && (e.lam = W0(e.lam, +it));
    }
    if (this.es !== 0) {
      var N, D, k;
      N = e.phi < 0 ? 1 : 0, D = Math.tan(e.phi), k = this.b / Math.sqrt(D * D + this.one_minus_f_squared), e.phi = Math.atan(Math.sqrt(this.a * this.a - k * k) / (this.one_minus_f * k)), N && (e.phi = -e.phi);
    }
    return e.lam += this.long0, n.x = e.lam, n.y = e.phi, n;
  }
  function lb(n, e, t, i) {
    var a;
    return n < dt ? (i.value = Yi.AREA_0, a = 0) : (a = Math.atan2(e, t), Math.abs(a) <= Gi ? i.value = Yi.AREA_0 : a > Gi && a <= it + Gi ? (i.value = Yi.AREA_1, a -= it) : a > it + Gi || a <= -(it + Gi) ? (i.value = Yi.AREA_2, a = a >= 0 ? a - ba : a + ba) : (i.value = Yi.AREA_3, a += it)), a;
  }
  function W0(n, e) {
    var t = n + e;
    return t < -ba ? t += OE : t > +ba && (t -= OE), t;
  }
  var o9 = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
  const l9 = {
    init: r9,
    forward: a9,
    inverse: s9,
    names: o9
  };
  var lA = [
    [1, 22199e-21, -715515e-10, 31103e-10],
    [0.9986, -482243e-9, -24897e-9, -13309e-10],
    [0.9954, -83103e-8, -448605e-10, -986701e-12],
    [0.99, -135364e-8, -59661e-9, 36777e-10],
    [0.9822, -167442e-8, -449547e-11, -572411e-11],
    [0.973, -214868e-8, -903571e-10, 18736e-12],
    [0.96, -305085e-8, -900761e-10, 164917e-11],
    [0.9427, -382792e-8, -653386e-10, -26154e-10],
    [0.9216, -467746e-8, -10457e-8, 481243e-11],
    [0.8962, -536223e-8, -323831e-10, -543432e-11],
    [0.8679, -609363e-8, -113898e-9, 332484e-11],
    [0.835, -698325e-8, -640253e-10, 934959e-12],
    [0.7986, -755338e-8, -500009e-10, 935324e-12],
    [0.7597, -798324e-8, -35971e-9, -227626e-11],
    [0.7186, -851367e-8, -701149e-10, -86303e-10],
    [0.6732, -986209e-8, -199569e-9, 191974e-10],
    [0.6213, -0.010418, 883923e-10, 624051e-11],
    [0.5722, -906601e-8, 182e-6, 624051e-11],
    [0.5322, -677797e-8, 275608e-9, 624051e-11]
  ], hE = [
    [-520417e-23, 0.0124, 121431e-23, -845284e-16],
    [0.062, 0.0124, -126793e-14, 422642e-15],
    [0.124, 0.0124, 507171e-14, -160604e-14],
    [0.186, 0.0123999, -190189e-13, 600152e-14],
    [0.248, 0.0124002, 710039e-13, -224e-10],
    [0.31, 0.0123992, -264997e-12, 835986e-13],
    [0.372, 0.0124029, 988983e-12, -311994e-12],
    [0.434, 0.0123893, -369093e-11, -435621e-12],
    [0.4958, 0.0123198, -102252e-10, -345523e-12],
    [0.5571, 0.0121916, -154081e-10, -582288e-12],
    [0.6176, 0.0119938, -241424e-10, -525327e-12],
    [0.6769, 0.011713, -320223e-10, -516405e-12],
    [0.7346, 0.0113541, -397684e-10, -609052e-12],
    [0.7903, 0.0109107, -489042e-10, -104739e-11],
    [0.8435, 0.0103431, -64615e-9, -140374e-14],
    [0.8936, 969686e-8, -64636e-9, -8547e-9],
    [0.9394, 840947e-8, -192841e-9, -42106e-10],
    [0.9761, 616527e-8, -256e-6, -42106e-10],
    [1, 328947e-8, -319159e-9, -42106e-10]
  ], bF = 0.8487, wF = 1.3523, CF = Uh / 5, u9 = 1 / CF, z0 = 18, Jb = function(n, e) {
    return n[0] + e * (n[1] + e * (n[2] + e * n[3]));
  }, c9 = function(n, e) {
    return n[1] + e * (2 * n[2] + e * 3 * n[3]);
  };
  function f9(n, e, t, i) {
    for (var a = e; i; --i) {
      var o = n(a);
      if (a -= o, Math.abs(o) < t)
        break;
    }
    return a;
  }
  function h9() {
    this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson";
  }
  function d9(n) {
    var e = wt(n.x - this.long0), t = Math.abs(n.y), i = Math.floor(t * CF);
    i < 0 ? i = 0 : i >= z0 && (i = z0 - 1), t = Uh * (t - u9 * i);
    var a = {
      x: Jb(lA[i], t) * e,
      y: Jb(hE[i], t)
    };
    return n.y < 0 && (a.y = -a.y), a.x = a.x * this.a * bF + this.x0, a.y = a.y * this.a * wF + this.y0, a;
  }
  function p9(n) {
    var e = {
      x: (n.x - this.x0) / (this.a * bF),
      y: Math.abs(n.y - this.y0) / (this.a * wF)
    };
    if (e.y >= 1)
      e.x /= lA[z0][0], e.y = n.y < 0 ? -it : it;
    else {
      var t = Math.floor(e.y * z0);
      for (t < 0 ? t = 0 : t >= z0 && (t = z0 - 1); ; )
        if (hE[t][0] > e.y)
          --t;
        else if (hE[t + 1][0] <= e.y)
          ++t;
        else
          break;
      var i = hE[t], a = 5 * (e.y - i[0]) / (hE[t + 1][0] - i[0]);
      a = f9(function(o) {
        return (Jb(i, o) - e.y) / c9(i, o);
      }, a, dt, 100), e.x /= Jb(lA[t], a), e.y = (5 * t + a) * Qs, n.y < 0 && (e.y = -e.y);
    }
    return e.x = wt(e.x + this.long0), e;
  }
  var g9 = ["Robinson", "robin"];
  const m9 = {
    init: h9,
    forward: d9,
    inverse: p9,
    names: g9
  };
  function v9() {
    this.name = "geocent";
  }
  function y9(n) {
    var e = cF(n, this.es, this.a);
    return e;
  }
  function _9(n) {
    var e = fF(n, this.es, this.a, this.b);
    return e;
  }
  var E9 = ["Geocentric", "geocentric", "geocent", "Geocent"];
  const S9 = {
    init: v9,
    forward: y9,
    inverse: _9,
    names: E9
  };
  var To = {
    N_POLE: 0,
    S_POLE: 1,
    EQUIT: 2,
    OBLIQ: 3
  }, tE = {
    h: { def: 1e5, num: !0 },
    // default is Karman line, no default in PROJ.7
    azi: { def: 0, num: !0, degrees: !0 },
    // default is North
    tilt: { def: 0, num: !0, degrees: !0 },
    // default is Nadir
    long0: { def: 0, num: !0 },
    // default is Greenwich, conversion to rad is automatic
    lat0: { def: 0, num: !0 }
    // default is Equator, conversion to rad is automatic
  };
  function x9() {
    if (Object.keys(tE).forEach((function(t) {
      if (typeof this[t] > "u")
        this[t] = tE[t].def;
      else {
        if (tE[t].num && isNaN(this[t]))
          throw new Error("Invalid parameter value, must be numeric " + t + " = " + this[t]);
        tE[t].num && (this[t] = parseFloat(this[t]));
      }
      tE[t].degrees && (this[t] = this[t] * Qs);
    }).bind(this)), Math.abs(Math.abs(this.lat0) - it) < dt ? this.mode = this.lat0 < 0 ? To.S_POLE : To.N_POLE : Math.abs(this.lat0) < dt ? this.mode = To.EQUIT : (this.mode = To.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10)
      throw new Error("Invalid height");
    this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0;
    var n = this.tilt, e = this.azi;
    this.cg = Math.cos(e), this.sg = Math.sin(e), this.cw = Math.cos(n), this.sw = Math.sin(n);
  }
  function b9(n) {
    n.x -= this.long0;
    var e = Math.sin(n.y), t = Math.cos(n.y), i = Math.cos(n.x), a, o;
    switch (this.mode) {
      case To.OBLIQ:
        o = this.sinph0 * e + this.cosph0 * t * i;
        break;
      case To.EQUIT:
        o = t * i;
        break;
      case To.S_POLE:
        o = -e;
        break;
      case To.N_POLE:
        o = e;
        break;
    }
    switch (o = this.pn1 / (this.p - o), a = o * t * Math.sin(n.x), this.mode) {
      case To.OBLIQ:
        o *= this.cosph0 * e - this.sinph0 * t * i;
        break;
      case To.EQUIT:
        o *= e;
        break;
      case To.N_POLE:
        o *= -(t * i);
        break;
      case To.S_POLE:
        o *= t * i;
        break;
    }
    var u, c;
    return u = o * this.cg + a * this.sg, c = 1 / (u * this.sw * this.h1 + this.cw), a = (a * this.cg - o * this.sg) * this.cw * c, o = u * c, n.x = a * this.a, n.y = o * this.a, n;
  }
  function w9(n) {
    n.x /= this.a, n.y /= this.a;
    var e = { x: n.x, y: n.y }, t, i, a;
    a = 1 / (this.pn1 - n.y * this.sw), t = this.pn1 * n.x * a, i = this.pn1 * n.y * this.cw * a, n.x = t * this.cg + i * this.sg, n.y = i * this.cg - t * this.sg;
    var o = Sf(n.x, n.y);
    if (Math.abs(o) < dt)
      e.x = 0, e.y = n.y;
    else {
      var u, c;
      switch (c = 1 - o * o * this.pfact, c = (this.p - Math.sqrt(c)) / (this.pn1 / o + o / this.pn1), u = Math.sqrt(1 - c * c), this.mode) {
        case To.OBLIQ:
          e.y = Math.asin(u * this.sinph0 + n.y * c * this.cosph0 / o), n.y = (u - this.sinph0 * Math.sin(e.y)) * o, n.x *= c * this.cosph0;
          break;
        case To.EQUIT:
          e.y = Math.asin(n.y * c / o), n.y = u * o, n.x *= c;
          break;
        case To.N_POLE:
          e.y = Math.asin(u), n.y = -n.y;
          break;
        case To.S_POLE:
          e.y = -Math.asin(u);
          break;
      }
      e.x = Math.atan2(n.x, n.y);
    }
    return n.x = e.x + this.long0, n.y = e.y, n;
  }
  var C9 = ["Tilted_Perspective", "tpers"];
  const T9 = {
    init: x9,
    forward: b9,
    inverse: w9,
    names: C9
  };
  function R9() {
    if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10)
      throw new Error();
    if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) {
      var n = 1 - this.es, e = 1 / n;
      this.radius_p = Math.sqrt(n), this.radius_p2 = n, this.radius_p_inv2 = e, this.shape = "ellipse";
    } else
      this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere";
    this.title || (this.title = "Geostationary Satellite View");
  }
  function M9(n) {
    var e = n.x, t = n.y, i, a, o, u;
    if (e = e - this.long0, this.shape === "ellipse") {
      t = Math.atan(this.radius_p2 * Math.tan(t));
      var c = this.radius_p / Sf(this.radius_p * Math.cos(t), Math.sin(t));
      if (a = c * Math.cos(e) * Math.cos(t), o = c * Math.sin(e) * Math.cos(t), u = c * Math.sin(t), (this.radius_g - a) * a - o * o - u * u * this.radius_p_inv2 < 0)
        return n.x = Number.NaN, n.y = Number.NaN, n;
      i = this.radius_g - a, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(o / Sf(u, i)), n.y = this.radius_g_1 * Math.atan(u / i)) : (n.x = this.radius_g_1 * Math.atan(o / i), n.y = this.radius_g_1 * Math.atan(u / Sf(o, i)));
    } else
      this.shape === "sphere" && (i = Math.cos(t), a = Math.cos(e) * i, o = Math.sin(e) * i, u = Math.sin(t), i = this.radius_g - a, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(o / Sf(u, i)), n.y = this.radius_g_1 * Math.atan(u / i)) : (n.x = this.radius_g_1 * Math.atan(o / i), n.y = this.radius_g_1 * Math.atan(u / Sf(o, i))));
    return n.x = n.x * this.a, n.y = n.y * this.a, n;
  }
  function O9(n) {
    var e = -1, t = 0, i = 0, a, o, u, c;
    if (n.x = n.x / this.a, n.y = n.y / this.a, this.shape === "ellipse") {
      this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), t = Math.tan(n.x / this.radius_g_1) * Sf(1, i)) : (t = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Sf(1, t));
      var p = i / this.radius_p;
      if (a = t * t + p * p + e * e, o = 2 * this.radius_g * e, u = o * o - 4 * a * this.C, u < 0)
        return n.x = Number.NaN, n.y = Number.NaN, n;
      c = (-o - Math.sqrt(u)) / (2 * a), e = this.radius_g + c * e, t *= c, i *= c, n.x = Math.atan2(t, e), n.y = Math.atan(i * Math.cos(n.x) / e), n.y = Math.atan(this.radius_p_inv2 * Math.tan(n.y));
    } else if (this.shape === "sphere") {
      if (this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), t = Math.tan(n.x / this.radius_g_1) * Math.sqrt(1 + i * i)) : (t = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Math.sqrt(1 + t * t)), a = t * t + i * i + e * e, o = 2 * this.radius_g * e, u = o * o - 4 * a * this.C, u < 0)
        return n.x = Number.NaN, n.y = Number.NaN, n;
      c = (-o - Math.sqrt(u)) / (2 * a), e = this.radius_g + c * e, t *= c, i *= c, n.x = Math.atan2(t, e), n.y = Math.atan(i * Math.cos(n.x) / e);
    }
    return n.x = n.x + this.long0, n;
  }
  var A9 = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"];
  const L9 = {
    init: R9,
    forward: M9,
    inverse: O9,
    names: A9
  };
  function N9(n) {
    n.Proj.projections.add(Db), n.Proj.projections.add(Ib), n.Proj.projections.add(jH), n.Proj.projections.add(qH), n.Proj.projections.add(eW), n.Proj.projections.add(aW), n.Proj.projections.add(fW), n.Proj.projections.add(mW), n.Proj.projections.add(SW), n.Proj.projections.add(TW), n.Proj.projections.add(VW), n.Proj.projections.add(XW), n.Proj.projections.add(eG), n.Proj.projections.add(sG), n.Proj.projections.add(fG), n.Proj.projections.add(mG), n.Proj.projections.add(SG), n.Proj.projections.add(TG), n.Proj.projections.add(NG), n.Proj.projections.add(FG), n.Proj.projections.add(BG), n.Proj.projections.add(YG), n.Proj.projections.add(QG), n.Proj.projections.add(i9), n.Proj.projections.add(l9), n.Proj.projections.add(m9), n.Proj.projections.add(S9), n.Proj.projections.add(T9), n.Proj.projections.add(L9);
  }
  Pl.defaultDatum = "WGS84";
  Pl.Proj = $h;
  Pl.WGS84 = new Pl.Proj("WGS84");
  Pl.Point = Z0;
  Pl.toPoint = hF;
  Pl.defs = Xo;
  Pl.nadgrid = zV;
  Pl.transform = Zb;
  Pl.mgrs = nH;
  Pl.version = "__VERSION__";
  N9(Pl);
  var uA = { exports: {} }, Tl = {}, ub = { exports: {} }, XM = {}, mk;
  function D9() {
    return mk || (mk = 1, function(n) {
      var e = {};
      /**
       * @license React
       * scheduler.development.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.
       */
      e.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 t = !1, i = !1, a = 5;
        function o(at, Tt) {
          var nn = at.length;
          at.push(Tt), p(at, Tt, nn);
        }
        function u(at) {
          return at.length === 0 ? null : at[0];
        }
        function c(at) {
          if (at.length === 0)
            return null;
          var Tt = at[0], nn = at.pop();
          return nn !== Tt && (at[0] = nn, y(at, nn, 0)), Tt;
        }
        function p(at, Tt, nn) {
          for (var kn = nn; kn > 0; ) {
            var Mn = kn - 1 >>> 1, Oi = at[Mn];
            if (_(Oi, Tt) > 0)
              at[Mn] = Tt, at[kn] = Oi, kn = Mn;
            else
              return;
          }
        }
        function y(at, Tt, nn) {
          for (var kn = nn, Mn = at.length, Oi = Mn >>> 1; kn < Oi; ) {
            var ki = (kn + 1) * 2 - 1, Gr = at[ki], Fn = ki + 1, Ki = at[Fn];
            if (_(Gr, Tt) < 0)
              Fn < Mn && _(Ki, Gr) < 0 ? (at[kn] = Ki, at[Fn] = Tt, kn = Fn) : (at[kn] = Gr, at[ki] = Tt, kn = ki);
            else if (Fn < Mn && _(Ki, Tt) < 0)
              at[kn] = Ki, at[Fn] = Tt, kn = Fn;
            else
              return;
          }
        }
        function _(at, Tt) {
          var nn = at.sortIndex - Tt.sortIndex;
          return nn !== 0 ? nn : at.id - Tt.id;
        }
        var S = 1, b = 2, T = 3, O = 4, N = 5;
        function D(at, Tt) {
        }
        var k = typeof performance == "object" && typeof performance.now == "function";
        if (k) {
          var $ = performance;
          n.unstable_now = function() {
            return $.now();
          };
        } else {
          var B = Date, V = B.now();
          n.unstable_now = function() {
            return B.now() - V;
          };
        }
        var z = 1073741823, G = -1, ie = 250, ue = 5e3, Re = 1e4, Oe = z, $e = [], Ee = [], Fe = 1, Ne = null, Q = T, ae = !1, le = !1, se = !1, Ae = typeof setTimeout == "function" ? setTimeout : null, q = typeof clearTimeout == "function" ? clearTimeout : null, Z = typeof setImmediate < "u" ? setImmediate : null;
        typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
        function ee(at) {
          for (var Tt = u(Ee); Tt !== null; ) {
            if (Tt.callback === null)
              c(Ee);
            else if (Tt.startTime <= at)
              c(Ee), Tt.sortIndex = Tt.expirationTime, o($e, Tt);
            else
              return;
            Tt = u(Ee);
          }
        }
        function Le(at) {
          if (se = !1, ee(at), !le)
            if (u($e) !== null)
              le = !0, ci(Me);
            else {
              var Tt = u(Ee);
              Tt !== null && dn(Le, Tt.startTime - at);
            }
        }
        function Me(at, Tt) {
          le = !1, se && (se = !1, xr()), ae = !0;
          var nn = Q;
          try {
            var kn;
            if (!i)
              return De(at, Tt);
          } finally {
            Ne = null, Q = nn, ae = !1;
          }
        }
        function De(at, Tt) {
          var nn = Tt;
          for (ee(nn), Ne = u($e); Ne !== null && !t && !(Ne.expirationTime > nn && (!at || In())); ) {
            var kn = Ne.callback;
            if (typeof kn == "function") {
              Ne.callback = null, Q = Ne.priorityLevel;
              var Mn = Ne.expirationTime <= nn, Oi = kn(Mn);
              nn = n.unstable_now(), typeof Oi == "function" ? Ne.callback = Oi : Ne === u($e) && c($e), ee(nn);
            } else
              c($e);
            Ne = u($e);
          }
          if (Ne !== null)
            return !0;
          var ki = u(Ee);
          return ki !== null && dn(Le, ki.startTime - nn), !1;
        }
        function Ye(at, Tt) {
          switch (at) {
            case S:
            case b:
            case T:
            case O:
            case N:
              break;
            default:
              at = T;
          }
          var nn = Q;
          Q = at;
          try {
            return Tt();
          } finally {
            Q = nn;
          }
        }
        function Ze(at) {
          var Tt;
          switch (Q) {
            case S:
            case b:
            case T:
              Tt = T;
              break;
            default:
              Tt = Q;
              break;
          }
          var nn = Q;
          Q = Tt;
          try {
            return at();
          } finally {
            Q = nn;
          }
        }
        function Xe(at) {
          var Tt = Q;
          return function() {
            var nn = Q;
            Q = Tt;
            try {
              return at.apply(this, arguments);
            } finally {
              Q = nn;
            }
          };
        }
        function lt(at, Tt, nn) {
          var kn = n.unstable_now(), Mn;
          if (typeof nn == "object" && nn !== null) {
            var Oi = nn.delay;
            typeof Oi == "number" && Oi > 0 ? Mn = kn + Oi : Mn = kn;
          } else
            Mn = kn;
          var ki;
          switch (at) {
            case S:
              ki = G;
              break;
            case b:
              ki = ie;
              break;
            case N:
              ki = Oe;
              break;
            case O:
              ki = Re;
              break;
            case T:
            default:
              ki = ue;
              break;
          }
          var Gr = Mn + ki, Fn = {
            id: Fe++,
            callback: Tt,
            priorityLevel: at,
            startTime: Mn,
            expirationTime: Gr,
            sortIndex: -1
          };
          return Mn > kn ? (Fn.sortIndex = Mn, o(Ee, Fn), u($e) === null && Fn === u(Ee) && (se ? xr() : se = !0, dn(Le, Mn - kn))) : (Fn.sortIndex = Gr, o($e, Fn), !le && !ae && (le = !0, ci(Me))), Fn;
        }
        function Dt() {
        }
        function Ct() {
          !le && !ae && (le = !0, ci(Me));
        }
        function hn() {
          return u($e);
        }
        function Je(at) {
          at.callback = null;
        }
        function Pt() {
          return Q;
        }
        var Vn = !1, Hn = null, Nn = -1, Si = a, Sr = -1;
        function In() {
          var at = n.unstable_now() - Sr;
          return !(at < Si);
        }
        function Tn() {
        }
        function Pn(at) {
          if (at < 0 || at > 125) {
            console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");
            return;
          }
          at > 0 ? Si = Math.floor(1e3 / at) : Si = a;
        }
        var Qn = function() {
          if (Hn !== null) {
            var at = n.unstable_now();
            Sr = at;
            var Tt = !0, nn = !0;
            try {
              nn = Hn(Tt, at);
            } finally {
              nn ? Jn() : (Vn = !1, Hn = null);
            }
          } else
            Vn = !1;
        }, Jn;
        if (typeof Z == "function")
          Jn = function() {
            Z(Qn);
          };
        else if (typeof MessageChannel < "u") {
          var ui = new MessageChannel(), Mi = ui.port2;
          ui.port1.onmessage = Qn, Jn = function() {
            Mi.postMessage(null);
          };
        } else
          Jn = function() {
            Ae(Qn, 0);
          };
        function ci(at) {
          Hn = at, Vn || (Vn = !0, Jn());
        }
        function dn(at, Tt) {
          Nn = Ae(function() {
            at(n.unstable_now());
          }, Tt);
        }
        function xr() {
          q(Nn), Nn = -1;
        }
        var Wr = Tn, ai = null;
        n.unstable_IdlePriority = N, n.unstable_ImmediatePriority = S, n.unstable_LowPriority = O, n.unstable_NormalPriority = T, n.unstable_Profiling = ai, n.unstable_UserBlockingPriority = b, n.unstable_cancelCallback = Je, n.unstable_continueExecution = Ct, n.unstable_forceFrameRate = Pn, n.unstable_getCurrentPriorityLevel = Pt, n.unstable_getFirstCallbackNode = hn, n.unstable_next = Ze, n.unstable_pauseExecution = Dt, n.unstable_requestPaint = Wr, n.unstable_runWithPriority = Ye, n.unstable_scheduleCallback = lt, n.unstable_shouldYield = In, n.unstable_wrapCallback = Xe, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
      }();
    }(XM)), XM;
  }
  var KM = {};
  /**
   * @license React
   * scheduler.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 vk;
  function I9() {
    return vk || (vk = 1, function(n) {
      function e(se, Ae) {
        var q = se.length;
        se.push(Ae);
        e:
          for (; 0 < q; ) {
            var Z = q - 1 >>> 1, ee = se[Z];
            if (0 < a(ee, Ae))
              se[Z] = Ae, se[q] = ee, q = Z;
            else
              break e;
          }
      }
      function t(se) {
        return se.length === 0 ? null : se[0];
      }
      function i(se) {
        if (se.length === 0)
          return null;
        var Ae = se[0], q = se.pop();
        if (q !== Ae) {
          se[0] = q;
          e:
            for (var Z = 0, ee = se.length, Le = ee >>> 1; Z < Le; ) {
              var Me = 2 * (Z + 1) - 1, De = se[Me], Ye = Me + 1, Ze = se[Ye];
              if (0 > a(De, q))
                Ye < ee && 0 > a(Ze, De) ? (se[Z] = Ze, se[Ye] = q, Z = Ye) : (se[Z] = De, se[Me] = q, Z = Me);
              else if (Ye < ee && 0 > a(Ze, q))
                se[Z] = Ze, se[Ye] = q, Z = Ye;
              else
                break e;
            }
        }
        return Ae;
      }
      function a(se, Ae) {
        var q = se.sortIndex - Ae.sortIndex;
        return q !== 0 ? q : se.id - Ae.id;
      }
      if (typeof performance == "object" && typeof performance.now == "function") {
        var o = performance;
        n.unstable_now = function() {
          return o.now();
        };
      } else {
        var u = Date, c = u.now();
        n.unstable_now = function() {
          return u.now() - c;
        };
      }
      var p = [], y = [], _ = 1, S = null, b = 3, T = !1, O = !1, N = !1, D = typeof setTimeout == "function" ? setTimeout : null, k = typeof clearTimeout == "function" ? clearTimeout : null, $ = typeof setImmediate < "u" ? setImmediate : null;
      typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
      function B(se) {
        for (var Ae = t(y); Ae !== null; ) {
          if (Ae.callback === null)
            i(y);
          else if (Ae.startTime <= se)
            i(y), Ae.sortIndex = Ae.expirationTime, e(p, Ae);
          else
            break;
          Ae = t(y);
        }
      }
      function V(se) {
        if (N = !1, B(se), !O)
          if (t(p) !== null)
            O = !0, ae(z);
          else {
            var Ae = t(y);
            Ae !== null && le(V, Ae.startTime - se);
          }
      }
      function z(se, Ae) {
        O = !1, N && (N = !1, k(ue), ue = -1), T = !0;
        var q = b;
        try {
          for (B(Ae), S = t(p); S !== null && (!(S.expirationTime > Ae) || se && !$e()); ) {
            var Z = S.callback;
            if (typeof Z == "function") {
              S.callback = null, b = S.priorityLevel;
              var ee = Z(S.expirationTime <= Ae);
              Ae = n.unstable_now(), typeof ee == "function" ? S.callback = ee : S === t(p) && i(p), B(Ae);
            } else
              i(p);
            S = t(p);
          }
          if (S !== null)
            var Le = !0;
          else {
            var Me = t(y);
            Me !== null && le(V, Me.startTime - Ae), Le = !1;
          }
          return Le;
        } finally {
          S = null, b = q, T = !1;
        }
      }
      var G = !1, ie = null, ue = -1, Re = 5, Oe = -1;
      function $e() {
        return !(n.unstable_now() - Oe < Re);
      }
      function Ee() {
        if (ie !== null) {
          var se = n.unstable_now();
          Oe = se;
          var Ae = !0;
          try {
            Ae = ie(!0, se);
          } finally {
            Ae ? Fe() : (G = !1, ie = null);
          }
        } else
          G = !1;
      }
      var Fe;
      if (typeof $ == "function")
        Fe = function() {
          $(Ee);
        };
      else if (typeof MessageChannel < "u") {
        var Ne = new MessageChannel(), Q = Ne.port2;
        Ne.port1.onmessage = Ee, Fe = function() {
          Q.postMessage(null);
        };
      } else
        Fe = function() {
          D(Ee, 0);
        };
      function ae(se) {
        ie = se, G || (G = !0, Fe());
      }
      function le(se, Ae) {
        ue = D(function() {
          se(n.unstable_now());
        }, Ae);
      }
      n.unstable_IdlePriority = 5, n.unstable_ImmediatePriority = 1, n.unstable_LowPriority = 4, n.unstable_NormalPriority = 3, n.unstable_Profiling = null, n.unstable_UserBlockingPriority = 2, n.unstable_cancelCallback = function(se) {
        se.callback = null;
      }, n.unstable_continueExecution = function() {
        O || T || (O = !0, ae(z));
      }, n.unstable_forceFrameRate = function(se) {
        0 > se || 125 < se ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : Re = 0 < se ? Math.floor(1e3 / se) : 5;
      }, n.unstable_getCurrentPriorityLevel = function() {
        return b;
      }, n.unstable_getFirstCallbackNode = function() {
        return t(p);
      }, n.unstable_next = function(se) {
        switch (b) {
          case 1:
          case 2:
          case 3:
            var Ae = 3;
            break;
          default:
            Ae = b;
        }
        var q = b;
        b = Ae;
        try {
          return se();
        } finally {
          b = q;
        }
      }, n.unstable_pauseExecution = function() {
      }, n.unstable_requestPaint = function() {
      }, n.unstable_runWithPriority = function(se, Ae) {
        switch (se) {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            break;
          default:
            se = 3;
        }
        var q = b;
        b = se;
        try {
          return Ae();
        } finally {
          b = q;
        }
      }, n.unstable_scheduleCallback = function(se, Ae, q) {
        var Z = n.unstable_now();
        switch (typeof q == "object" && q !== null ? (q = q.delay, q = typeof q == "number" && 0 < q ? Z + q : Z) : q = Z, se) {
          case 1:
            var ee = -1;
            break;
          case 2:
            ee = 250;
            break;
          case 5:
            ee = 1073741823;
            break;
          case 4:
            ee = 1e4;
            break;
          default:
            ee = 5e3;
        }
        return ee = q + ee, se = { id: _++, callback: Ae, priorityLevel: se, startTime: q, expirationTime: ee, sortIndex: -1 }, q > Z ? (se.sortIndex = q, e(y, se), t(p) === null && se === t(y) && (N ? (k(ue), ue = -1) : N = !0, le(V, q - Z))) : (se.sortIndex = ee, e(p, se), O || T || (O = !0, ae(z))), se;
      }, n.unstable_shouldYield = $e, n.unstable_wrapCallback = function(se) {
        var Ae = b;
        return function() {
          var q = b;
          b = Ae;
          try {
            return se.apply(this, arguments);
          } finally {
            b = q;
          }
        };
      };
    }(KM)), KM;
  }
  var yk;
  function TF() {
    if (yk)
      return ub.exports;
    yk = 1;
    var n = {};
    return n.NODE_ENV === "production" ? ub.exports = I9() : ub.exports = D9(), ub.exports;
  }
  var _k;
  function P9() {
    if (_k)
      return Tl;
    _k = 1;
    var n = {};
    /**
     * @license React
     * react-dom.development.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.
     */
    return n.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 e = Kt, t = TF(), i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, a = !1;
      function o(r) {
        a = r;
      }
      function u(r) {
        if (!a) {
          for (var s = arguments.length, h = new Array(s > 1 ? s - 1 : 0), g = 1; g < s; g++)
            h[g - 1] = arguments[g];
          p("warn", r, h);
        }
      }
      function c(r) {
        if (!a) {
          for (var s = arguments.length, h = new Array(s > 1 ? s - 1 : 0), g = 1; g < s; g++)
            h[g - 1] = arguments[g];
          p("error", r, h);
        }
      }
      function p(r, s, h) {
        {
          var g = i.ReactDebugCurrentFrame, E = g.getStackAddendum();
          E !== "" && (s += "%s", h = h.concat([E]));
          var C = h.map(function(M) {
            return String(M);
          });
          C.unshift("Warning: " + s), Function.prototype.apply.call(console[r], console, C);
        }
      }
      var y = 0, _ = 1, S = 2, b = 3, T = 4, O = 5, N = 6, D = 7, k = 8, $ = 9, B = 10, V = 11, z = 12, G = 13, ie = 14, ue = 15, Re = 16, Oe = 17, $e = 18, Ee = 19, Fe = 21, Ne = 22, Q = 23, ae = 24, le = 25, se = !0, Ae = !1, q = !1, Z = !1, ee = !1, Le = !0, Me = !1, De = !1, Ye = !0, Ze = !0, Xe = !0, lt = /* @__PURE__ */ new Set(), Dt = {}, Ct = {};
      function hn(r, s) {
        Je(r, s), Je(r + "Capture", s);
      }
      function Je(r, s) {
        Dt[r] && c("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", r), Dt[r] = s;
        {
          var h = r.toLowerCase();
          Ct[h] = r, r === "onDoubleClick" && (Ct.ondblclick = r);
        }
        for (var g = 0; g < s.length; g++)
          lt.add(s[g]);
      }
      var Pt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Vn = Object.prototype.hasOwnProperty;
      function Hn(r) {
        {
          var s = typeof Symbol == "function" && Symbol.toStringTag, h = s && r[Symbol.toStringTag] || r.constructor.name || "Object";
          return h;
        }
      }
      function Nn(r) {
        try {
          return Si(r), !1;
        } catch {
          return !0;
        }
      }
      function Si(r) {
        return "" + r;
      }
      function Sr(r, s) {
        if (Nn(r))
          return c("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", s, Hn(r)), Si(r);
      }
      function In(r) {
        if (Nn(r))
          return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Hn(r)), Si(r);
      }
      function Tn(r, s) {
        if (Nn(r))
          return c("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", s, Hn(r)), Si(r);
      }
      function Pn(r, s) {
        if (Nn(r))
          return c("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", s, Hn(r)), Si(r);
      }
      function Qn(r) {
        if (Nn(r))
          return c("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", Hn(r)), Si(r);
      }
      function Jn(r) {
        if (Nn(r))
          return c("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", Hn(r)), Si(r);
      }
      var ui = 0, Mi = 1, ci = 2, dn = 3, xr = 4, Wr = 5, ai = 6, at = ":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", Tt = at + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", nn = new RegExp("^[" + at + "][" + Tt + "]*$"), kn = {}, Mn = {};
      function Oi(r) {
        return Vn.call(Mn, r) ? !0 : Vn.call(kn, r) ? !1 : nn.test(r) ? (Mn[r] = !0, !0) : (kn[r] = !0, c("Invalid attribute name: `%s`", r), !1);
      }
      function ki(r, s, h) {
        return s !== null ? s.type === ui : h ? !1 : r.length > 2 && (r[0] === "o" || r[0] === "O") && (r[1] === "n" || r[1] === "N");
      }
      function Gr(r, s, h, g) {
        if (h !== null && h.type === ui)
          return !1;
        switch (typeof s) {
          case "function":
          case "symbol":
            return !0;
          case "boolean": {
            if (g)
              return !1;
            if (h !== null)
              return !h.acceptsBooleans;
            var E = r.toLowerCase().slice(0, 5);
            return E !== "data-" && E !== "aria-";
          }
          default:
            return !1;
        }
      }
      function Fn(r, s, h, g) {
        if (s === null || typeof s > "u" || Gr(r, s, h, g))
          return !0;
        if (g)
          return !1;
        if (h !== null)
          switch (h.type) {
            case dn:
              return !s;
            case xr:
              return s === !1;
            case Wr:
              return isNaN(s);
            case ai:
              return isNaN(s) || s < 1;
          }
        return !1;
      }
      function Ki(r) {
        return gi.hasOwnProperty(r) ? gi[r] : null;
      }
      function On(r, s, h, g, E, C, M) {
        this.acceptsBooleans = s === ci || s === dn || s === xr, this.attributeName = g, this.attributeNamespace = E, this.mustUseProperty = h, this.propertyName = r, this.type = s, this.sanitizeURL = C, this.removeEmptyString = M;
      }
      var gi = {}, ls = [
        "children",
        "dangerouslySetInnerHTML",
        // TODO: This prevents the assignment of defaultValue to regular
        // elements (not just inputs). Now that ReactDOMInput assigns to the
        // defaultValue property -- do we need this?
        "defaultValue",
        "defaultChecked",
        "innerHTML",
        "suppressContentEditableWarning",
        "suppressHydrationWarning",
        "style"
      ];
      ls.forEach(function(r) {
        gi[r] = new On(
          r,
          ui,
          !1,
          // mustUseProperty
          r,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(r) {
        var s = r[0], h = r[1];
        gi[s] = new On(
          s,
          Mi,
          !1,
          // mustUseProperty
          h,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(r) {
        gi[r] = new On(
          r,
          ci,
          !1,
          // mustUseProperty
          r.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(r) {
        gi[r] = new On(
          r,
          ci,
          !1,
          // mustUseProperty
          r,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "allowFullScreen",
        "async",
        // Note: there is a special case that prevents it from being written to the DOM
        // on the client side because the browsers are inconsistent. Instead we call focus().
        "autoFocus",
        "autoPlay",
        "controls",
        "default",
        "defer",
        "disabled",
        "disablePictureInPicture",
        "disableRemotePlayback",
        "formNoValidate",
        "hidden",
        "loop",
        "noModule",
        "noValidate",
        "open",
        "playsInline",
        "readOnly",
        "required",
        "reversed",
        "scoped",
        "seamless",
        // Microdata
        "itemScope"
      ].forEach(function(r) {
        gi[r] = new On(
          r,
          dn,
          !1,
          // mustUseProperty
          r.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "checked",
        // Note: `option.selected` is not updated if `select.multiple` is
        // disabled with `removeAttribute`. We have special logic for handling this.
        "multiple",
        "muted",
        "selected"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        gi[r] = new On(
          r,
          dn,
          !0,
          // mustUseProperty
          r,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "capture",
        "download"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        gi[r] = new On(
          r,
          xr,
          !1,
          // mustUseProperty
          r,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "cols",
        "rows",
        "size",
        "span"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        gi[r] = new On(
          r,
          ai,
          !1,
          // mustUseProperty
          r,
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), ["rowSpan", "start"].forEach(function(r) {
        gi[r] = new On(
          r,
          Wr,
          !1,
          // mustUseProperty
          r.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      });
      var Fi = /[\-\:]([a-z])/g, za = function(r) {
        return r[1].toUpperCase();
      };
      [
        "accent-height",
        "alignment-baseline",
        "arabic-form",
        "baseline-shift",
        "cap-height",
        "clip-path",
        "clip-rule",
        "color-interpolation",
        "color-interpolation-filters",
        "color-profile",
        "color-rendering",
        "dominant-baseline",
        "enable-background",
        "fill-opacity",
        "fill-rule",
        "flood-color",
        "flood-opacity",
        "font-family",
        "font-size",
        "font-size-adjust",
        "font-stretch",
        "font-style",
        "font-variant",
        "font-weight",
        "glyph-name",
        "glyph-orientation-horizontal",
        "glyph-orientation-vertical",
        "horiz-adv-x",
        "horiz-origin-x",
        "image-rendering",
        "letter-spacing",
        "lighting-color",
        "marker-end",
        "marker-mid",
        "marker-start",
        "overline-position",
        "overline-thickness",
        "paint-order",
        "panose-1",
        "pointer-events",
        "rendering-intent",
        "shape-rendering",
        "stop-color",
        "stop-opacity",
        "strikethrough-position",
        "strikethrough-thickness",
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width",
        "text-anchor",
        "text-decoration",
        "text-rendering",
        "underline-position",
        "underline-thickness",
        "unicode-bidi",
        "unicode-range",
        "units-per-em",
        "v-alphabetic",
        "v-hanging",
        "v-ideographic",
        "v-mathematical",
        "vector-effect",
        "vert-adv-y",
        "vert-origin-x",
        "vert-origin-y",
        "word-spacing",
        "writing-mode",
        "xmlns:xlink",
        "x-height"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        var s = r.replace(Fi, za);
        gi[s] = new On(
          s,
          Mi,
          !1,
          // mustUseProperty
          r,
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "xlink:actuate",
        "xlink:arcrole",
        "xlink:role",
        "xlink:show",
        "xlink:title",
        "xlink:type"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        var s = r.replace(Fi, za);
        gi[s] = new On(
          s,
          Mi,
          !1,
          // mustUseProperty
          r,
          "http://www.w3.org/1999/xlink",
          !1,
          // sanitizeURL
          !1
        );
      }), [
        "xml:base",
        "xml:lang",
        "xml:space"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach(function(r) {
        var s = r.replace(Fi, za);
        gi[s] = new On(
          s,
          Mi,
          !1,
          // mustUseProperty
          r,
          "http://www.w3.org/XML/1998/namespace",
          !1,
          // sanitizeURL
          !1
        );
      }), ["tabIndex", "crossOrigin"].forEach(function(r) {
        gi[r] = new On(
          r,
          Mi,
          !1,
          // mustUseProperty
          r.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          !1,
          // sanitizeURL
          !1
        );
      });
      var Ar = "xlinkHref";
      gi[Ar] = new On(
        "xlinkHref",
        Mi,
        !1,
        // mustUseProperty
        "xlink:href",
        "http://www.w3.org/1999/xlink",
        !0,
        // sanitizeURL
        !1
      ), ["src", "href", "action", "formAction"].forEach(function(r) {
        gi[r] = new On(
          r,
          Mi,
          !1,
          // mustUseProperty
          r.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          !0,
          // sanitizeURL
          !0
        );
      });
      var ga = /^[\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, br = !1;
      function Ca(r) {
        !br && ga.test(r) && (br = !0, c("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(r)));
      }
      function sa(r, s, h, g) {
        if (g.mustUseProperty) {
          var E = g.propertyName;
          return r[E];
        } else {
          Sr(h, s), g.sanitizeURL && Ca("" + h);
          var C = g.attributeName, M = null;
          if (g.type === xr) {
            if (r.hasAttribute(C)) {
              var I = r.getAttribute(C);
              return I === "" ? !0 : Fn(s, h, g, !1) ? I : I === "" + h ? h : I;
            }
          } else if (r.hasAttribute(C)) {
            if (Fn(s, h, g, !1))
              return r.getAttribute(C);
            if (g.type === dn)
              return h;
            M = r.getAttribute(C);
          }
          return Fn(s, h, g, !1) ? M === null ? h : M : M === "" + h ? h : M;
        }
      }
      function Ai(r, s, h, g) {
        {
          if (!Oi(s))
            return;
          if (!r.hasAttribute(s))
            return h === void 0 ? void 0 : null;
          var E = r.getAttribute(s);
          return Sr(h, s), E === "" + h ? h : E;
        }
      }
      function ir(r, s, h, g) {
        var E = Ki(s);
        if (!ki(s, E, g)) {
          if (Fn(s, h, E, g) && (h = null), g || E === null) {
            if (Oi(s)) {
              var C = s;
              h === null ? r.removeAttribute(C) : (Sr(h, s), r.setAttribute(C, "" + h));
            }
            return;
          }
          var M = E.mustUseProperty;
          if (M) {
            var I = E.propertyName;
            if (h === null) {
              var P = E.type;
              r[I] = P === dn ? !1 : "";
            } else
              r[I] = h;
            return;
          }
          var W = E.attributeName, X = E.attributeNamespace;
          if (h === null)
            r.removeAttribute(W);
          else {
            var de = E.type, he;
            de === dn || de === xr && h === !0 ? he = "" : (Sr(h, W), he = "" + h, E.sanitizeURL && Ca(he.toString())), X ? r.setAttributeNS(X, W, he) : r.setAttribute(W, he);
          }
        }
      }
      var rr = Symbol.for("react.element"), Ta = Symbol.for("react.portal"), Ms = Symbol.for("react.fragment"), Ul = Symbol.for("react.strict_mode"), re = Symbol.for("react.profiler"), We = Symbol.for("react.provider"), st = Symbol.for("react.context"), ct = Symbol.for("react.forward_ref"), Sn = Symbol.for("react.suspense"), jn = Symbol.for("react.suspense_list"), un = Symbol.for("react.memo"), It = Symbol.for("react.lazy"), Yr = Symbol.for("react.scope"), ji = Symbol.for("react.debug_trace_mode"), Ui = Symbol.for("react.offscreen"), Zr = Symbol.for("react.legacy_hidden"), nl = Symbol.for("react.cache"), mi = Symbol.for("react.tracing_marker"), us = Symbol.iterator, Zh = "@@iterator";
      function il(r) {
        if (r === null || typeof r != "object")
          return null;
        var s = us && r[us] || r[Zh];
        return typeof s == "function" ? s : null;
      }
      var cn = Object.assign, Ru = 0, rl, Mu, cs, Qh, $a, Af, Lf;
      function Nf() {
      }
      Nf.__reactDisabledLog = !0;
      function zl() {
        {
          if (Ru === 0) {
            rl = console.log, Mu = console.info, cs = console.warn, Qh = console.error, $a = console.group, Af = console.groupCollapsed, Lf = console.groupEnd;
            var r = {
              configurable: !0,
              enumerable: !0,
              value: Nf,
              writable: !0
            };
            Object.defineProperties(console, {
              info: r,
              log: r,
              warn: r,
              error: r,
              group: r,
              groupCollapsed: r,
              groupEnd: r
            });
          }
          Ru++;
        }
      }
      function Df() {
        {
          if (Ru--, Ru === 0) {
            var r = {
              configurable: !0,
              enumerable: !0,
              writable: !0
            };
            Object.defineProperties(console, {
              log: cn({}, r, {
                value: rl
              }),
              info: cn({}, r, {
                value: Mu
              }),
              warn: cn({}, r, {
                value: cs
              }),
              error: cn({}, r, {
                value: Qh
              }),
              group: cn({}, r, {
                value: $a
              }),
              groupCollapsed: cn({}, r, {
                value: Af
              }),
              groupEnd: cn({}, r, {
                value: Lf
              })
            });
          }
          Ru < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
        }
      }
      var al = i.ReactCurrentDispatcher, Os;
      function As(r, s, h) {
        {
          if (Os === void 0)
            try {
              throw Error();
            } catch (E) {
              var g = E.stack.trim().match(/\n( *(at )?)/);
              Os = g && g[1] || "";
            }
          return `
` + Os + r;
        }
      }
      var Ou = !1, Oo;
      {
        var Au = typeof WeakMap == "function" ? WeakMap : Map;
        Oo = new Au();
      }
      function $l(r, s) {
        if (!r || Ou)
          return "";
        {
          var h = Oo.get(r);
          if (h !== void 0)
            return h;
        }
        var g;
        Ou = !0;
        var E = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        var C;
        C = al.current, al.current = null, zl();
        try {
          if (s) {
            var M = function() {
              throw Error();
            };
            if (Object.defineProperty(M.prototype, "props", {
              set: function() {
                throw Error();
              }
            }), typeof Reflect == "object" && Reflect.construct) {
              try {
                Reflect.construct(M, []);
              } catch (Ce) {
                g = Ce;
              }
              Reflect.construct(r, [], M);
            } else {
              try {
                M.call();
              } catch (Ce) {
                g = Ce;
              }
              r.call(M.prototype);
            }
          } else {
            try {
              throw Error();
            } catch (Ce) {
              g = Ce;
            }
            r();
          }
        } catch (Ce) {
          if (Ce && g && typeof Ce.stack == "string") {
            for (var I = Ce.stack.split(`
`), P = g.stack.split(`
`), W = I.length - 1, X = P.length - 1; W >= 1 && X >= 0 && I[W] !== P[X]; )
              X--;
            for (; W >= 1 && X >= 0; W--, X--)
              if (I[W] !== P[X]) {
                if (W !== 1 || X !== 1)
                  do
                    if (W--, X--, X < 0 || I[W] !== P[X]) {
                      var de = `
` + I[W].replace(" at new ", " at ");
                      return r.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", r.displayName)), typeof r == "function" && Oo.set(r, de), de;
                    }
                  while (W >= 1 && X >= 0);
                break;
              }
          }
        } finally {
          Ou = !1, al.current = C, Df(), Error.prepareStackTrace = E;
        }
        var he = r ? r.displayName || r.name : "", we = he ? As(he) : "";
        return typeof r == "function" && Oo.set(r, we), we;
      }
      function Lu(r, s, h) {
        return $l(r, !0);
      }
      function If(r, s, h) {
        return $l(r, !1);
      }
      function wc(r) {
        var s = r.prototype;
        return !!(s && s.isReactComponent);
      }
      function Rn(r, s, h) {
        if (r == null)
          return "";
        if (typeof r == "function")
          return $l(r, wc(r));
        if (typeof r == "string")
          return As(r);
        switch (r) {
          case Sn:
            return As("Suspense");
          case jn:
            return As("SuspenseList");
        }
        if (typeof r == "object")
          switch (r.$$typeof) {
            case ct:
              return If(r.render);
            case un:
              return Rn(r.type, s, h);
            case It: {
              var g = r, E = g._payload, C = g._init;
              try {
                return Rn(C(E), s, h);
              } catch {
              }
            }
          }
        return "";
      }
      function sl(r) {
        switch (r._debugOwner && r._debugOwner.type, r._debugSource, r.tag) {
          case O:
            return As(r.type);
          case Re:
            return As("Lazy");
          case G:
            return As("Suspense");
          case Ee:
            return As("SuspenseList");
          case y:
          case S:
          case ue:
            return If(r.type);
          case V:
            return If(r.type.render);
          case _:
            return Lu(r.type);
          default:
            return "";
        }
      }
      function Cc(r) {
        try {
          var s = "", h = r;
          do
            s += sl(h), h = h.return;
          while (h);
          return s;
        } catch (g) {
          return `
Error generating stack: ` + g.message + `
` + g.stack;
        }
      }
      function Bl(r, s, h) {
        var g = r.displayName;
        if (g)
          return g;
        var E = s.displayName || s.name || "";
        return E !== "" ? h + "(" + E + ")" : h;
      }
      function Jh(r) {
        return r.displayName || "Context";
      }
      function Un(r) {
        if (r == null)
          return null;
        if (typeof r.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
          return r.displayName || r.name || null;
        if (typeof r == "string")
          return r;
        switch (r) {
          case Ms:
            return "Fragment";
          case Ta:
            return "Portal";
          case re:
            return "Profiler";
          case Ul:
            return "StrictMode";
          case Sn:
            return "Suspense";
          case jn:
            return "SuspenseList";
        }
        if (typeof r == "object")
          switch (r.$$typeof) {
            case st:
              var s = r;
              return Jh(s) + ".Consumer";
            case We:
              var h = r;
              return Jh(h._context) + ".Provider";
            case ct:
              return Bl(r, r.render, "ForwardRef");
            case un:
              var g = r.displayName || null;
              return g !== null ? g : Un(r.type) || "Memo";
            case It: {
              var E = r, C = E._payload, M = E._init;
              try {
                return Un(M(C));
              } catch {
                return null;
              }
            }
          }
        return null;
      }
      function Tc(r, s, h) {
        var g = s.displayName || s.name || "";
        return r.displayName || (g !== "" ? h + "(" + g + ")" : h);
      }
      function Nu(r) {
        return r.displayName || "Context";
      }
      function Qt(r) {
        var s = r.tag, h = r.type;
        switch (s) {
          case ae:
            return "Cache";
          case $:
            var g = h;
            return Nu(g) + ".Consumer";
          case B:
            var E = h;
            return Nu(E._context) + ".Provider";
          case $e:
            return "DehydratedFragment";
          case V:
            return Tc(h, h.render, "ForwardRef");
          case D:
            return "Fragment";
          case O:
            return h;
          case T:
            return "Portal";
          case b:
            return "Root";
          case N:
            return "Text";
          case Re:
            return Un(h);
          case k:
            return h === Ul ? "StrictMode" : "Mode";
          case Ne:
            return "Offscreen";
          case z:
            return "Profiler";
          case Fe:
            return "Scope";
          case G:
            return "Suspense";
          case Ee:
            return "SuspenseList";
          case le:
            return "TracingMarker";
          case _:
          case y:
          case Oe:
          case S:
          case ie:
          case ue:
            if (typeof h == "function")
              return h.displayName || h.name || null;
            if (typeof h == "string")
              return h;
            break;
        }
        return null;
      }
      var Ao = i.ReactDebugCurrentFrame, cr = null, fs = !1;
      function Ls() {
        {
          if (cr === null)
            return null;
          var r = cr._debugOwner;
          if (r !== null && typeof r < "u")
            return Qt(r);
        }
        return null;
      }
      function Du() {
        return cr === null ? "" : Cc(cr);
      }
      function Zi() {
        Ao.getCurrentStack = null, cr = null, fs = !1;
      }
      function fr(r) {
        Ao.getCurrentStack = r === null ? null : Du, cr = r, fs = !1;
      }
      function ed() {
        return cr;
      }
      function Qr(r) {
        fs = r;
      }
      function hs(r) {
        return "" + r;
      }
      function Lo(r) {
        switch (typeof r) {
          case "boolean":
          case "number":
          case "string":
          case "undefined":
            return r;
          case "object":
            return Jn(r), r;
          default:
            return "";
        }
      }
      var Pf = {
        button: !0,
        checkbox: !0,
        image: !0,
        hidden: !0,
        radio: !0,
        reset: !0,
        submit: !0
      };
      function Rc(r, s) {
        Pf[s.type] || s.onChange || s.onInput || s.readOnly || s.disabled || s.value == null || c("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."), s.onChange || s.readOnly || s.disabled || s.checked == null || c("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
      }
      function Mc(r) {
        var s = r.type, h = r.nodeName;
        return h && h.toLowerCase() === "input" && (s === "checkbox" || s === "radio");
      }
      function ei(r) {
        return r._valueTracker;
      }
      function An(r) {
        r._valueTracker = null;
      }
      function Vl(r) {
        var s = "";
        return r && (Mc(r) ? s = r.checked ? "true" : "false" : s = r.value), s;
      }
      function kf(r) {
        var s = Mc(r) ? "checked" : "value", h = Object.getOwnPropertyDescriptor(r.constructor.prototype, s);
        Jn(r[s]);
        var g = "" + r[s];
        if (!(r.hasOwnProperty(s) || typeof h > "u" || typeof h.get != "function" || typeof h.set != "function")) {
          var E = h.get, C = h.set;
          Object.defineProperty(r, s, {
            configurable: !0,
            get: function() {
              return E.call(this);
            },
            set: function(I) {
              Jn(I), g = "" + I, C.call(this, I);
            }
          }), Object.defineProperty(r, s, {
            enumerable: h.enumerable
          });
          var M = {
            getValue: function() {
              return g;
            },
            setValue: function(I) {
              Jn(I), g = "" + I;
            },
            stopTracking: function() {
              An(r), delete r[s];
            }
          };
          return M;
        }
      }
      function Hl(r) {
        ei(r) || (r._valueTracker = kf(r));
      }
      function Ff(r) {
        if (!r)
          return !1;
        var s = ei(r);
        if (!s)
          return !0;
        var h = s.getValue(), g = Vl(r);
        return g !== h ? (s.setValue(g), !0) : !1;
      }
      function ol(r) {
        if (r = r || (typeof document < "u" ? document : void 0), typeof r > "u")
          return null;
        try {
          return r.activeElement || r.body;
        } catch {
          return r.body;
        }
      }
      var Wl = !1, Oc = !1, td = !1, Li = !1;
      function Iu(r) {
        var s = r.type === "checkbox" || r.type === "radio";
        return s ? r.checked != null : r.value != null;
      }
      function F(r, s) {
        var h = r, g = s.checked, E = cn({}, s, {
          defaultChecked: void 0,
          defaultValue: void 0,
          value: void 0,
          checked: g ?? h._wrapperState.initialChecked
        });
        return E;
      }
      function ne(r, s) {
        Rc("input", s), s.checked !== void 0 && s.defaultChecked !== void 0 && !Oc && (c("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", Ls() || "A component", s.type), Oc = !0), s.value !== void 0 && s.defaultValue !== void 0 && !Wl && (c("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", Ls() || "A component", s.type), Wl = !0);
        var h = r, g = s.defaultValue == null ? "" : s.defaultValue;
        h._wrapperState = {
          initialChecked: s.checked != null ? s.checked : s.defaultChecked,
          initialValue: Lo(s.value != null ? s.value : g),
          controlled: Iu(s)
        };
      }
      function Se(r, s) {
        var h = r, g = s.checked;
        g != null && ir(h, "checked", g, !1);
      }
      function Te(r, s) {
        var h = r;
        {
          var g = Iu(s);
          !h._wrapperState.controlled && g && !Li && (c("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"), Li = !0), h._wrapperState.controlled && !g && !td && (c("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"), td = !0);
        }
        Se(r, s);
        var E = Lo(s.value), C = s.type;
        if (E != null)
          C === "number" ? (E === 0 && h.value === "" || // We explicitly want to coerce to number here if possible.
          // eslint-disable-next-line
          h.value != E) && (h.value = hs(E)) : h.value !== hs(E) && (h.value = hs(E));
        else if (C === "submit" || C === "reset") {
          h.removeAttribute("value");
          return;
        }
        s.hasOwnProperty("value") ? Wt(h, s.type, E) : s.hasOwnProperty("defaultValue") && Wt(h, s.type, Lo(s.defaultValue)), s.checked == null && s.defaultChecked != null && (h.defaultChecked = !!s.defaultChecked);
      }
      function tt(r, s, h) {
        var g = r;
        if (s.hasOwnProperty("value") || s.hasOwnProperty("defaultValue")) {
          var E = s.type, C = E === "submit" || E === "reset";
          if (C && (s.value === void 0 || s.value === null))
            return;
          var M = hs(g._wrapperState.initialValue);
          h || M !== g.value && (g.value = M), g.defaultValue = M;
        }
        var I = g.name;
        I !== "" && (g.name = ""), g.defaultChecked = !g.defaultChecked, g.defaultChecked = !!g._wrapperState.initialChecked, I !== "" && (g.name = I);
      }
      function bt(r, s) {
        var h = r;
        Te(h, s), pt(h, s);
      }
      function pt(r, s) {
        var h = s.name;
        if (s.type === "radio" && h != null) {
          for (var g = r; g.parentNode; )
            g = g.parentNode;
          Sr(h, "name");
          for (var E = g.querySelectorAll("input[name=" + JSON.stringify("" + h) + '][type="radio"]'), C = 0; C < E.length; C++) {
            var M = E[C];
            if (!(M === r || M.form !== r.form)) {
              var I = yn(M);
              if (!I)
                throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");
              Ff(M), Te(M, I);
            }
          }
        }
      }
      function Wt(r, s, h) {
        // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
        (s !== "number" || ol(r.ownerDocument) !== r) && (h == null ? r.defaultValue = hs(r._wrapperState.initialValue) : r.defaultValue !== hs(h) && (r.defaultValue = hs(h)));
      }
      var fn = !1, si = !1, pn = !1;
      function vi(r, s) {
        s.value == null && (typeof s.children == "object" && s.children !== null ? e.Children.forEach(s.children, function(h) {
          h != null && (typeof h == "string" || typeof h == "number" || si || (si = !0, c("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")));
        }) : s.dangerouslySetInnerHTML != null && (pn || (pn = !0, c("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))), s.selected != null && !fn && (c("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."), fn = !0);
      }
      function xn(r, s) {
        s.value != null && r.setAttribute("value", hs(Lo(s.value)));
      }
      var Qi = Array.isArray;
      function zn(r) {
        return Qi(r);
      }
      var Ba;
      Ba = !1;
      function Gl() {
        var r = Ls();
        return r ? `

Check the render method of \`` + r + "`." : "";
      }
      var Ac = ["value", "defaultValue"];
      function xi(r) {
        {
          Rc("select", r);
          for (var s = 0; s < Ac.length; s++) {
            var h = Ac[s];
            if (r[h] != null) {
              var g = zn(r[h]);
              r.multiple && !g ? c("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s", h, Gl()) : !r.multiple && g && c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s", h, Gl());
            }
          }
        }
      }
      function Ra(r, s, h, g) {
        var E = r.options;
        if (s) {
          for (var C = h, M = {}, I = 0; I < C.length; I++)
            M["$" + C[I]] = !0;
          for (var P = 0; P < E.length; P++) {
            var W = M.hasOwnProperty("$" + E[P].value);
            E[P].selected !== W && (E[P].selected = W), W && g && (E[P].defaultSelected = !0);
          }
        } else {
          for (var X = hs(Lo(h)), de = null, he = 0; he < E.length; he++) {
            if (E[he].value === X) {
              E[he].selected = !0, g && (E[he].defaultSelected = !0);
              return;
            }
            de === null && !E[he].disabled && (de = E[he]);
          }
          de !== null && (de.selected = !0);
        }
      }
      function Lc(r, s) {
        return cn({}, s, {
          value: void 0
        });
      }
      function nd(r, s) {
        var h = r;
        xi(s), h._wrapperState = {
          wasMultiple: !!s.multiple
        }, s.value !== void 0 && s.defaultValue !== void 0 && !Ba && (c("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"), Ba = !0);
      }
      function id(r, s) {
        var h = r;
        h.multiple = !!s.multiple;
        var g = s.value;
        g != null ? Ra(h, !!s.multiple, g, !1) : s.defaultValue != null && Ra(h, !!s.multiple, s.defaultValue, !0);
      }
      function T_(r, s) {
        var h = r, g = h._wrapperState.wasMultiple;
        h._wrapperState.wasMultiple = !!s.multiple;
        var E = s.value;
        E != null ? Ra(h, !!s.multiple, E, !1) : g !== !!s.multiple && (s.defaultValue != null ? Ra(h, !!s.multiple, s.defaultValue, !0) : Ra(h, !!s.multiple, s.multiple ? [] : "", !1));
      }
      function ey(r, s) {
        var h = r, g = s.value;
        g != null && Ra(h, !!s.multiple, g, !1);
      }
      var ty = !1;
      function Lp(r, s) {
        var h = r;
        if (s.dangerouslySetInnerHTML != null)
          throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
        var g = cn({}, s, {
          value: void 0,
          defaultValue: void 0,
          children: hs(h._wrapperState.initialValue)
        });
        return g;
      }
      function rd(r, s) {
        var h = r;
        Rc("textarea", s), s.value !== void 0 && s.defaultValue !== void 0 && !ty && (c("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components", Ls() || "A component"), ty = !0);
        var g = s.value;
        if (g == null) {
          var E = s.children, C = s.defaultValue;
          if (E != null) {
            c("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");
            {
              if (C != null)
                throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
              if (zn(E)) {
                if (E.length > 1)
                  throw new Error("<textarea> can only have at most one child.");
                E = E[0];
              }
              C = E;
            }
          }
          C == null && (C = ""), g = C;
        }
        h._wrapperState = {
          initialValue: Lo(g)
        };
      }
      function Nc(r, s) {
        var h = r, g = Lo(s.value), E = Lo(s.defaultValue);
        if (g != null) {
          var C = hs(g);
          C !== h.value && (h.value = C), s.defaultValue == null && h.defaultValue !== C && (h.defaultValue = C);
        }
        E != null && (h.defaultValue = hs(E));
      }
      function Np(r, s) {
        var h = r, g = h.textContent;
        g === h._wrapperState.initialValue && g !== "" && g !== null && (h.value = g);
      }
      function ny(r, s) {
        Nc(r, s);
      }
      var ll = "http://www.w3.org/1999/xhtml", pm = "http://www.w3.org/1998/Math/MathML", jf = "http://www.w3.org/2000/svg";
      function Dp(r) {
        switch (r) {
          case "svg":
            return jf;
          case "math":
            return pm;
          default:
            return ll;
        }
      }
      function gm(r, s) {
        return r == null || r === ll ? Dp(s) : r === jf && s === "foreignObject" ? ll : r;
      }
      var mm = function(r) {
        return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(s, h, g, E) {
          MSApp.execUnsafeLocalFunction(function() {
            return r(s, h, g, E);
          });
        } : r;
      }, Uf, iy = mm(function(r, s) {
        if (r.namespaceURI === jf && !("innerHTML" in r)) {
          Uf = Uf || document.createElement("div"), Uf.innerHTML = "<svg>" + s.valueOf().toString() + "</svg>";
          for (var h = Uf.firstChild; r.firstChild; )
            r.removeChild(r.firstChild);
          for (; h.firstChild; )
            r.appendChild(h.firstChild);
          return;
        }
        r.innerHTML = s;
      }), Va = 1, Lr = 3, ar = 8, ma = 9, Ip = 11, zf = function(r, s) {
        if (s) {
          var h = r.firstChild;
          if (h && h === r.lastChild && h.nodeType === Lr) {
            h.nodeValue = s;
            return;
          }
        }
        r.textContent = s;
      }, ry = {
        animation: ["animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationName", "animationPlayState", "animationTimingFunction"],
        background: ["backgroundAttachment", "backgroundClip", "backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPositionX", "backgroundPositionY", "backgroundRepeat", "backgroundSize"],
        backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
        border: ["borderBottomColor", "borderBottomStyle", "borderBottomWidth", "borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderTopColor", "borderTopStyle", "borderTopWidth"],
        borderBlockEnd: ["borderBlockEndColor", "borderBlockEndStyle", "borderBlockEndWidth"],
        borderBlockStart: ["borderBlockStartColor", "borderBlockStartStyle", "borderBlockStartWidth"],
        borderBottom: ["borderBottomColor", "borderBottomStyle", "borderBottomWidth"],
        borderColor: ["borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor"],
        borderImage: ["borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth"],
        borderInlineEnd: ["borderInlineEndColor", "borderInlineEndStyle", "borderInlineEndWidth"],
        borderInlineStart: ["borderInlineStartColor", "borderInlineStartStyle", "borderInlineStartWidth"],
        borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
        borderRadius: ["borderBottomLeftRadius", "borderBottomRightRadius", "borderTopLeftRadius", "borderTopRightRadius"],
        borderRight: ["borderRightColor", "borderRightStyle", "borderRightWidth"],
        borderStyle: ["borderBottomStyle", "borderLeftStyle", "borderRightStyle", "borderTopStyle"],
        borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
        borderWidth: ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth"],
        columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
        columns: ["columnCount", "columnWidth"],
        flex: ["flexBasis", "flexGrow", "flexShrink"],
        flexFlow: ["flexDirection", "flexWrap"],
        font: ["fontFamily", "fontFeatureSettings", "fontKerning", "fontLanguageOverride", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", "fontWeight", "lineHeight"],
        fontVariant: ["fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition"],
        gap: ["columnGap", "rowGap"],
        grid: ["gridAutoColumns", "gridAutoFlow", "gridAutoRows", "gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"],
        gridArea: ["gridColumnEnd", "gridColumnStart", "gridRowEnd", "gridRowStart"],
        gridColumn: ["gridColumnEnd", "gridColumnStart"],
        gridColumnGap: ["columnGap"],
        gridGap: ["columnGap", "rowGap"],
        gridRow: ["gridRowEnd", "gridRowStart"],
        gridRowGap: ["rowGap"],
        gridTemplate: ["gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"],
        listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
        margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
        marker: ["markerEnd", "markerMid", "markerStart"],
        mask: ["maskClip", "maskComposite", "maskImage", "maskMode", "maskOrigin", "maskPositionX", "maskPositionY", "maskRepeat", "maskSize"],
        maskPosition: ["maskPositionX", "maskPositionY"],
        outline: ["outlineColor", "outlineStyle", "outlineWidth"],
        overflow: ["overflowX", "overflowY"],
        padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
        placeContent: ["alignContent", "justifyContent"],
        placeItems: ["alignItems", "justifyItems"],
        placeSelf: ["alignSelf", "justifySelf"],
        textDecoration: ["textDecorationColor", "textDecorationLine", "textDecorationStyle"],
        textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
        transition: ["transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction"],
        wordWrap: ["overflowWrap"]
      }, $f = {
        animationIterationCount: !0,
        aspectRatio: !0,
        borderImageOutset: !0,
        borderImageSlice: !0,
        borderImageWidth: !0,
        boxFlex: !0,
        boxFlexGroup: !0,
        boxOrdinalGroup: !0,
        columnCount: !0,
        columns: !0,
        flex: !0,
        flexGrow: !0,
        flexPositive: !0,
        flexShrink: !0,
        flexNegative: !0,
        flexOrder: !0,
        gridArea: !0,
        gridRow: !0,
        gridRowEnd: !0,
        gridRowSpan: !0,
        gridRowStart: !0,
        gridColumn: !0,
        gridColumnEnd: !0,
        gridColumnSpan: !0,
        gridColumnStart: !0,
        fontWeight: !0,
        lineClamp: !0,
        lineHeight: !0,
        opacity: !0,
        order: !0,
        orphans: !0,
        tabSize: !0,
        widows: !0,
        zIndex: !0,
        zoom: !0,
        // SVG-related properties
        fillOpacity: !0,
        floodOpacity: !0,
        stopOpacity: !0,
        strokeDasharray: !0,
        strokeDashoffset: !0,
        strokeMiterlimit: !0,
        strokeOpacity: !0,
        strokeWidth: !0
      };
      function ay(r, s) {
        return r + s.charAt(0).toUpperCase() + s.substring(1);
      }
      var sy = ["Webkit", "ms", "Moz", "O"];
      Object.keys($f).forEach(function(r) {
        sy.forEach(function(s) {
          $f[ay(s, r)] = $f[r];
        });
      });
      function Pu(r, s, h) {
        var g = s == null || typeof s == "boolean" || s === "";
        return g ? "" : !h && typeof s == "number" && s !== 0 && !($f.hasOwnProperty(r) && $f[r]) ? s + "px" : (Pn(s, r), ("" + s).trim());
      }
      var Bf = /([A-Z])/g, R_ = /^ms-/;
      function M_(r) {
        return r.replace(Bf, "-$1").toLowerCase().replace(R_, "-ms-");
      }
      var ad = function() {
      };
      {
        var vm = /^(?:webkit|moz|o)[A-Z]/, eo = /^-ms-/, ku = /-(.)/g, oy = /;\s*$/, Yl = {}, ym = {}, Fu = !1, ds = !1, Pp = function(r) {
          return r.replace(ku, function(s, h) {
            return h.toUpperCase();
          });
        }, ly = function(r) {
          Yl.hasOwnProperty(r) && Yl[r] || (Yl[r] = !0, c(
            "Unsupported style property %s. Did you mean %s?",
            r,
            // As Andi Smith suggests
            // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
            // is converted to lowercase `ms`.
            Pp(r.replace(eo, "ms-"))
          ));
        }, uy = function(r) {
          Yl.hasOwnProperty(r) && Yl[r] || (Yl[r] = !0, c("Unsupported vendor-prefixed style property %s. Did you mean %s?", r, r.charAt(0).toUpperCase() + r.slice(1)));
        }, cy = function(r, s) {
          ym.hasOwnProperty(s) && ym[s] || (ym[s] = !0, c(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, r, s.replace(oy, "")));
        }, O_ = function(r, s) {
          Fu || (Fu = !0, c("`NaN` is an invalid value for the `%s` css style property.", r));
        }, A_ = function(r, s) {
          ds || (ds = !0, c("`Infinity` is an invalid value for the `%s` css style property.", r));
        };
        ad = function(r, s) {
          r.indexOf("-") > -1 ? ly(r) : vm.test(r) ? uy(r) : oy.test(s) && cy(r, s), typeof s == "number" && (isNaN(s) ? O_(r, s) : isFinite(s) || A_(r, s));
        };
      }
      var Vf = ad;
      function pe(r) {
        {
          var s = "", h = "";
          for (var g in r)
            if (r.hasOwnProperty(g)) {
              var E = r[g];
              if (E != null) {
                var C = g.indexOf("--") === 0;
                s += h + (C ? g : M_(g)) + ":", s += Pu(g, E, C), h = ";";
              }
            }
          return s || null;
        }
      }
      function Ie(r, s) {
        var h = r.style;
        for (var g in s)
          if (s.hasOwnProperty(g)) {
            var E = g.indexOf("--") === 0;
            E || Vf(g, s[g]);
            var C = Pu(g, s[g], E);
            g === "float" && (g = "cssFloat"), E ? h.setProperty(g, C) : h[g] = C;
          }
      }
      function xe(r) {
        return r == null || typeof r == "boolean" || r === "";
      }
      function ft(r) {
        var s = {};
        for (var h in r)
          for (var g = ry[h] || [h], E = 0; E < g.length; E++)
            s[g[E]] = h;
        return s;
      }
      function rn(r, s) {
        {
          if (!s)
            return;
          var h = ft(r), g = ft(s), E = {};
          for (var C in h) {
            var M = h[C], I = g[C];
            if (I && M !== I) {
              var P = M + "," + I;
              if (E[P])
                continue;
              E[P] = !0, c("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.", xe(r[M]) ? "Removing" : "Updating", M, I);
            }
          }
        }
      }
      var ti = {
        area: !0,
        base: !0,
        br: !0,
        col: !0,
        embed: !0,
        hr: !0,
        img: !0,
        input: !0,
        keygen: !0,
        link: !0,
        meta: !0,
        param: !0,
        source: !0,
        track: !0,
        wbr: !0
        // NOTE: menuitem's close tag should be omitted, but that causes problems.
      }, qr = cn({
        menuitem: !0
      }, ti), bi = "__html";
      function Dc(r, s) {
        if (s) {
          if (qr[r] && (s.children != null || s.dangerouslySetInnerHTML != null))
            throw new Error(r + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
          if (s.dangerouslySetInnerHTML != null) {
            if (s.children != null)
              throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
            if (typeof s.dangerouslySetInnerHTML != "object" || !(bi in s.dangerouslySetInnerHTML))
              throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");
          }
          if (!s.suppressContentEditableWarning && s.contentEditable && s.children != null && c("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."), s.style != null && typeof s.style != "object")
            throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
        }
      }
      function Ic(r, s) {
        if (r.indexOf("-") === -1)
          return typeof s.is == "string";
        switch (r) {
          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 Ha = {
        // HTML
        accept: "accept",
        acceptcharset: "acceptCharset",
        "accept-charset": "acceptCharset",
        accesskey: "accessKey",
        action: "action",
        allowfullscreen: "allowFullScreen",
        alt: "alt",
        as: "as",
        async: "async",
        autocapitalize: "autoCapitalize",
        autocomplete: "autoComplete",
        autocorrect: "autoCorrect",
        autofocus: "autoFocus",
        autoplay: "autoPlay",
        autosave: "autoSave",
        capture: "capture",
        cellpadding: "cellPadding",
        cellspacing: "cellSpacing",
        challenge: "challenge",
        charset: "charSet",
        checked: "checked",
        children: "children",
        cite: "cite",
        class: "className",
        classid: "classID",
        classname: "className",
        cols: "cols",
        colspan: "colSpan",
        content: "content",
        contenteditable: "contentEditable",
        contextmenu: "contextMenu",
        controls: "controls",
        controlslist: "controlsList",
        coords: "coords",
        crossorigin: "crossOrigin",
        dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
        data: "data",
        datetime: "dateTime",
        default: "default",
        defaultchecked: "defaultChecked",
        defaultvalue: "defaultValue",
        defer: "defer",
        dir: "dir",
        disabled: "disabled",
        disablepictureinpicture: "disablePictureInPicture",
        disableremoteplayback: "disableRemotePlayback",
        download: "download",
        draggable: "draggable",
        enctype: "encType",
        enterkeyhint: "enterKeyHint",
        for: "htmlFor",
        form: "form",
        formmethod: "formMethod",
        formaction: "formAction",
        formenctype: "formEncType",
        formnovalidate: "formNoValidate",
        formtarget: "formTarget",
        frameborder: "frameBorder",
        headers: "headers",
        height: "height",
        hidden: "hidden",
        high: "high",
        href: "href",
        hreflang: "hrefLang",
        htmlfor: "htmlFor",
        httpequiv: "httpEquiv",
        "http-equiv": "httpEquiv",
        icon: "icon",
        id: "id",
        imagesizes: "imageSizes",
        imagesrcset: "imageSrcSet",
        innerhtml: "innerHTML",
        inputmode: "inputMode",
        integrity: "integrity",
        is: "is",
        itemid: "itemID",
        itemprop: "itemProp",
        itemref: "itemRef",
        itemscope: "itemScope",
        itemtype: "itemType",
        keyparams: "keyParams",
        keytype: "keyType",
        kind: "kind",
        label: "label",
        lang: "lang",
        list: "list",
        loop: "loop",
        low: "low",
        manifest: "manifest",
        marginwidth: "marginWidth",
        marginheight: "marginHeight",
        max: "max",
        maxlength: "maxLength",
        media: "media",
        mediagroup: "mediaGroup",
        method: "method",
        min: "min",
        minlength: "minLength",
        multiple: "multiple",
        muted: "muted",
        name: "name",
        nomodule: "noModule",
        nonce: "nonce",
        novalidate: "noValidate",
        open: "open",
        optimum: "optimum",
        pattern: "pattern",
        placeholder: "placeholder",
        playsinline: "playsInline",
        poster: "poster",
        preload: "preload",
        profile: "profile",
        radiogroup: "radioGroup",
        readonly: "readOnly",
        referrerpolicy: "referrerPolicy",
        rel: "rel",
        required: "required",
        reversed: "reversed",
        role: "role",
        rows: "rows",
        rowspan: "rowSpan",
        sandbox: "sandbox",
        scope: "scope",
        scoped: "scoped",
        scrolling: "scrolling",
        seamless: "seamless",
        selected: "selected",
        shape: "shape",
        size: "size",
        sizes: "sizes",
        span: "span",
        spellcheck: "spellCheck",
        src: "src",
        srcdoc: "srcDoc",
        srclang: "srcLang",
        srcset: "srcSet",
        start: "start",
        step: "step",
        style: "style",
        summary: "summary",
        tabindex: "tabIndex",
        target: "target",
        title: "title",
        type: "type",
        usemap: "useMap",
        value: "value",
        width: "width",
        wmode: "wmode",
        wrap: "wrap",
        // SVG
        about: "about",
        accentheight: "accentHeight",
        "accent-height": "accentHeight",
        accumulate: "accumulate",
        additive: "additive",
        alignmentbaseline: "alignmentBaseline",
        "alignment-baseline": "alignmentBaseline",
        allowreorder: "allowReorder",
        alphabetic: "alphabetic",
        amplitude: "amplitude",
        arabicform: "arabicForm",
        "arabic-form": "arabicForm",
        ascent: "ascent",
        attributename: "attributeName",
        attributetype: "attributeType",
        autoreverse: "autoReverse",
        azimuth: "azimuth",
        basefrequency: "baseFrequency",
        baselineshift: "baselineShift",
        "baseline-shift": "baselineShift",
        baseprofile: "baseProfile",
        bbox: "bbox",
        begin: "begin",
        bias: "bias",
        by: "by",
        calcmode: "calcMode",
        capheight: "capHeight",
        "cap-height": "capHeight",
        clip: "clip",
        clippath: "clipPath",
        "clip-path": "clipPath",
        clippathunits: "clipPathUnits",
        cliprule: "clipRule",
        "clip-rule": "clipRule",
        color: "color",
        colorinterpolation: "colorInterpolation",
        "color-interpolation": "colorInterpolation",
        colorinterpolationfilters: "colorInterpolationFilters",
        "color-interpolation-filters": "colorInterpolationFilters",
        colorprofile: "colorProfile",
        "color-profile": "colorProfile",
        colorrendering: "colorRendering",
        "color-rendering": "colorRendering",
        contentscripttype: "contentScriptType",
        contentstyletype: "contentStyleType",
        cursor: "cursor",
        cx: "cx",
        cy: "cy",
        d: "d",
        datatype: "datatype",
        decelerate: "decelerate",
        descent: "descent",
        diffuseconstant: "diffuseConstant",
        direction: "direction",
        display: "display",
        divisor: "divisor",
        dominantbaseline: "dominantBaseline",
        "dominant-baseline": "dominantBaseline",
        dur: "dur",
        dx: "dx",
        dy: "dy",
        edgemode: "edgeMode",
        elevation: "elevation",
        enablebackground: "enableBackground",
        "enable-background": "enableBackground",
        end: "end",
        exponent: "exponent",
        externalresourcesrequired: "externalResourcesRequired",
        fill: "fill",
        fillopacity: "fillOpacity",
        "fill-opacity": "fillOpacity",
        fillrule: "fillRule",
        "fill-rule": "fillRule",
        filter: "filter",
        filterres: "filterRes",
        filterunits: "filterUnits",
        floodopacity: "floodOpacity",
        "flood-opacity": "floodOpacity",
        floodcolor: "floodColor",
        "flood-color": "floodColor",
        focusable: "focusable",
        fontfamily: "fontFamily",
        "font-family": "fontFamily",
        fontsize: "fontSize",
        "font-size": "fontSize",
        fontsizeadjust: "fontSizeAdjust",
        "font-size-adjust": "fontSizeAdjust",
        fontstretch: "fontStretch",
        "font-stretch": "fontStretch",
        fontstyle: "fontStyle",
        "font-style": "fontStyle",
        fontvariant: "fontVariant",
        "font-variant": "fontVariant",
        fontweight: "fontWeight",
        "font-weight": "fontWeight",
        format: "format",
        from: "from",
        fx: "fx",
        fy: "fy",
        g1: "g1",
        g2: "g2",
        glyphname: "glyphName",
        "glyph-name": "glyphName",
        glyphorientationhorizontal: "glyphOrientationHorizontal",
        "glyph-orientation-horizontal": "glyphOrientationHorizontal",
        glyphorientationvertical: "glyphOrientationVertical",
        "glyph-orientation-vertical": "glyphOrientationVertical",
        glyphref: "glyphRef",
        gradienttransform: "gradientTransform",
        gradientunits: "gradientUnits",
        hanging: "hanging",
        horizadvx: "horizAdvX",
        "horiz-adv-x": "horizAdvX",
        horizoriginx: "horizOriginX",
        "horiz-origin-x": "horizOriginX",
        ideographic: "ideographic",
        imagerendering: "imageRendering",
        "image-rendering": "imageRendering",
        in2: "in2",
        in: "in",
        inlist: "inlist",
        intercept: "intercept",
        k1: "k1",
        k2: "k2",
        k3: "k3",
        k4: "k4",
        k: "k",
        kernelmatrix: "kernelMatrix",
        kernelunitlength: "kernelUnitLength",
        kerning: "kerning",
        keypoints: "keyPoints",
        keysplines: "keySplines",
        keytimes: "keyTimes",
        lengthadjust: "lengthAdjust",
        letterspacing: "letterSpacing",
        "letter-spacing": "letterSpacing",
        lightingcolor: "lightingColor",
        "lighting-color": "lightingColor",
        limitingconeangle: "limitingConeAngle",
        local: "local",
        markerend: "markerEnd",
        "marker-end": "markerEnd",
        markerheight: "markerHeight",
        markermid: "markerMid",
        "marker-mid": "markerMid",
        markerstart: "markerStart",
        "marker-start": "markerStart",
        markerunits: "markerUnits",
        markerwidth: "markerWidth",
        mask: "mask",
        maskcontentunits: "maskContentUnits",
        maskunits: "maskUnits",
        mathematical: "mathematical",
        mode: "mode",
        numoctaves: "numOctaves",
        offset: "offset",
        opacity: "opacity",
        operator: "operator",
        order: "order",
        orient: "orient",
        orientation: "orientation",
        origin: "origin",
        overflow: "overflow",
        overlineposition: "overlinePosition",
        "overline-position": "overlinePosition",
        overlinethickness: "overlineThickness",
        "overline-thickness": "overlineThickness",
        paintorder: "paintOrder",
        "paint-order": "paintOrder",
        panose1: "panose1",
        "panose-1": "panose1",
        pathlength: "pathLength",
        patterncontentunits: "patternContentUnits",
        patterntransform: "patternTransform",
        patternunits: "patternUnits",
        pointerevents: "pointerEvents",
        "pointer-events": "pointerEvents",
        points: "points",
        pointsatx: "pointsAtX",
        pointsaty: "pointsAtY",
        pointsatz: "pointsAtZ",
        prefix: "prefix",
        preservealpha: "preserveAlpha",
        preserveaspectratio: "preserveAspectRatio",
        primitiveunits: "primitiveUnits",
        property: "property",
        r: "r",
        radius: "radius",
        refx: "refX",
        refy: "refY",
        renderingintent: "renderingIntent",
        "rendering-intent": "renderingIntent",
        repeatcount: "repeatCount",
        repeatdur: "repeatDur",
        requiredextensions: "requiredExtensions",
        requiredfeatures: "requiredFeatures",
        resource: "resource",
        restart: "restart",
        result: "result",
        results: "results",
        rotate: "rotate",
        rx: "rx",
        ry: "ry",
        scale: "scale",
        security: "security",
        seed: "seed",
        shaperendering: "shapeRendering",
        "shape-rendering": "shapeRendering",
        slope: "slope",
        spacing: "spacing",
        specularconstant: "specularConstant",
        specularexponent: "specularExponent",
        speed: "speed",
        spreadmethod: "spreadMethod",
        startoffset: "startOffset",
        stddeviation: "stdDeviation",
        stemh: "stemh",
        stemv: "stemv",
        stitchtiles: "stitchTiles",
        stopcolor: "stopColor",
        "stop-color": "stopColor",
        stopopacity: "stopOpacity",
        "stop-opacity": "stopOpacity",
        strikethroughposition: "strikethroughPosition",
        "strikethrough-position": "strikethroughPosition",
        strikethroughthickness: "strikethroughThickness",
        "strikethrough-thickness": "strikethroughThickness",
        string: "string",
        stroke: "stroke",
        strokedasharray: "strokeDasharray",
        "stroke-dasharray": "strokeDasharray",
        strokedashoffset: "strokeDashoffset",
        "stroke-dashoffset": "strokeDashoffset",
        strokelinecap: "strokeLinecap",
        "stroke-linecap": "strokeLinecap",
        strokelinejoin: "strokeLinejoin",
        "stroke-linejoin": "strokeLinejoin",
        strokemiterlimit: "strokeMiterlimit",
        "stroke-miterlimit": "strokeMiterlimit",
        strokewidth: "strokeWidth",
        "stroke-width": "strokeWidth",
        strokeopacity: "strokeOpacity",
        "stroke-opacity": "strokeOpacity",
        suppresscontenteditablewarning: "suppressContentEditableWarning",
        suppresshydrationwarning: "suppressHydrationWarning",
        surfacescale: "surfaceScale",
        systemlanguage: "systemLanguage",
        tablevalues: "tableValues",
        targetx: "targetX",
        targety: "targetY",
        textanchor: "textAnchor",
        "text-anchor": "textAnchor",
        textdecoration: "textDecoration",
        "text-decoration": "textDecoration",
        textlength: "textLength",
        textrendering: "textRendering",
        "text-rendering": "textRendering",
        to: "to",
        transform: "transform",
        typeof: "typeof",
        u1: "u1",
        u2: "u2",
        underlineposition: "underlinePosition",
        "underline-position": "underlinePosition",
        underlinethickness: "underlineThickness",
        "underline-thickness": "underlineThickness",
        unicode: "unicode",
        unicodebidi: "unicodeBidi",
        "unicode-bidi": "unicodeBidi",
        unicoderange: "unicodeRange",
        "unicode-range": "unicodeRange",
        unitsperem: "unitsPerEm",
        "units-per-em": "unitsPerEm",
        unselectable: "unselectable",
        valphabetic: "vAlphabetic",
        "v-alphabetic": "vAlphabetic",
        values: "values",
        vectoreffect: "vectorEffect",
        "vector-effect": "vectorEffect",
        version: "version",
        vertadvy: "vertAdvY",
        "vert-adv-y": "vertAdvY",
        vertoriginx: "vertOriginX",
        "vert-origin-x": "vertOriginX",
        vertoriginy: "vertOriginY",
        "vert-origin-y": "vertOriginY",
        vhanging: "vHanging",
        "v-hanging": "vHanging",
        videographic: "vIdeographic",
        "v-ideographic": "vIdeographic",
        viewbox: "viewBox",
        viewtarget: "viewTarget",
        visibility: "visibility",
        vmathematical: "vMathematical",
        "v-mathematical": "vMathematical",
        vocab: "vocab",
        widths: "widths",
        wordspacing: "wordSpacing",
        "word-spacing": "wordSpacing",
        writingmode: "writingMode",
        "writing-mode": "writingMode",
        x1: "x1",
        x2: "x2",
        x: "x",
        xchannelselector: "xChannelSelector",
        xheight: "xHeight",
        "x-height": "xHeight",
        xlinkactuate: "xlinkActuate",
        "xlink:actuate": "xlinkActuate",
        xlinkarcrole: "xlinkArcrole",
        "xlink:arcrole": "xlinkArcrole",
        xlinkhref: "xlinkHref",
        "xlink:href": "xlinkHref",
        xlinkrole: "xlinkRole",
        "xlink:role": "xlinkRole",
        xlinkshow: "xlinkShow",
        "xlink:show": "xlinkShow",
        xlinktitle: "xlinkTitle",
        "xlink:title": "xlinkTitle",
        xlinktype: "xlinkType",
        "xlink:type": "xlinkType",
        xmlbase: "xmlBase",
        "xml:base": "xmlBase",
        xmllang: "xmlLang",
        "xml:lang": "xmlLang",
        xmlns: "xmlns",
        "xml:space": "xmlSpace",
        xmlnsxlink: "xmlnsXlink",
        "xmlns:xlink": "xmlnsXlink",
        xmlspace: "xmlSpace",
        y1: "y1",
        y2: "y2",
        y: "y",
        ychannelselector: "yChannelSelector",
        z: "z",
        zoomandpan: "zoomAndPan"
      }, ul = {
        "aria-current": 0,
        // state
        "aria-description": 0,
        "aria-details": 0,
        "aria-disabled": 0,
        // state
        "aria-hidden": 0,
        // state
        "aria-invalid": 0,
        // state
        "aria-keyshortcuts": 0,
        "aria-label": 0,
        "aria-roledescription": 0,
        // Widget Attributes
        "aria-autocomplete": 0,
        "aria-checked": 0,
        "aria-expanded": 0,
        "aria-haspopup": 0,
        "aria-level": 0,
        "aria-modal": 0,
        "aria-multiline": 0,
        "aria-multiselectable": 0,
        "aria-orientation": 0,
        "aria-placeholder": 0,
        "aria-pressed": 0,
        "aria-readonly": 0,
        "aria-required": 0,
        "aria-selected": 0,
        "aria-sort": 0,
        "aria-valuemax": 0,
        "aria-valuemin": 0,
        "aria-valuenow": 0,
        "aria-valuetext": 0,
        // Live Region Attributes
        "aria-atomic": 0,
        "aria-busy": 0,
        "aria-live": 0,
        "aria-relevant": 0,
        // Drag-and-Drop Attributes
        "aria-dropeffect": 0,
        "aria-grabbed": 0,
        // Relationship Attributes
        "aria-activedescendant": 0,
        "aria-colcount": 0,
        "aria-colindex": 0,
        "aria-colspan": 0,
        "aria-controls": 0,
        "aria-describedby": 0,
        "aria-errormessage": 0,
        "aria-flowto": 0,
        "aria-labelledby": 0,
        "aria-owns": 0,
        "aria-posinset": 0,
        "aria-rowcount": 0,
        "aria-rowindex": 0,
        "aria-rowspan": 0,
        "aria-setsize": 0
      }, ju = {}, cl = new RegExp("^(aria)-[" + Tt + "]*$"), Hf = new RegExp("^(aria)[A-Z][" + Tt + "]*$");
      function sd(r, s) {
        {
          if (Vn.call(ju, s) && ju[s])
            return !0;
          if (Hf.test(s)) {
            var h = "aria-" + s.slice(4).toLowerCase(), g = ul.hasOwnProperty(h) ? h : null;
            if (g == null)
              return c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", s), ju[s] = !0, !0;
            if (s !== g)
              return c("Invalid ARIA attribute `%s`. Did you mean `%s`?", s, g), ju[s] = !0, !0;
          }
          if (cl.test(s)) {
            var E = s.toLowerCase(), C = ul.hasOwnProperty(E) ? E : null;
            if (C == null)
              return ju[s] = !0, !1;
            if (s !== C)
              return c("Unknown ARIA attribute `%s`. Did you mean `%s`?", s, C), ju[s] = !0, !0;
          }
        }
        return !0;
      }
      function ni(r, s) {
        {
          var h = [];
          for (var g in s) {
            var E = sd(r, g);
            E || h.push(g);
          }
          var C = h.map(function(M) {
            return "`" + M + "`";
          }).join(", ");
          h.length === 1 ? c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", C, r) : h.length > 1 && c("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", C, r);
        }
      }
      function Wf(r, s) {
        Ic(r, s) || ni(r, s);
      }
      var od = !1;
      function ld(r, s) {
        {
          if (r !== "input" && r !== "textarea" && r !== "select")
            return;
          s != null && s.value === null && !od && (od = !0, r === "select" && s.multiple ? c("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.", r) : c("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.", r));
        }
      }
      var ud = function() {
      };
      {
        var Ma = {}, _m = /^on./, cd = /^on[^A-Z]/, ql = new RegExp("^(aria)-[" + Tt + "]*$"), fd = new RegExp("^(aria)[A-Z][" + Tt + "]*$");
        ud = function(r, s, h, g) {
          if (Vn.call(Ma, s) && Ma[s])
            return !0;
          var E = s.toLowerCase();
          if (E === "onfocusin" || E === "onfocusout")
            return c("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."), Ma[s] = !0, !0;
          if (g != null) {
            var C = g.registrationNameDependencies, M = g.possibleRegistrationNames;
            if (C.hasOwnProperty(s))
              return !0;
            var I = M.hasOwnProperty(E) ? M[E] : null;
            if (I != null)
              return c("Invalid event handler property `%s`. Did you mean `%s`?", s, I), Ma[s] = !0, !0;
            if (_m.test(s))
              return c("Unknown event handler property `%s`. It will be ignored.", s), Ma[s] = !0, !0;
          } else if (_m.test(s))
            return cd.test(s) && c("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.", s), Ma[s] = !0, !0;
          if (ql.test(s) || fd.test(s))
            return !0;
          if (E === "innerhtml")
            return c("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."), Ma[s] = !0, !0;
          if (E === "aria")
            return c("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."), Ma[s] = !0, !0;
          if (E === "is" && h !== null && h !== void 0 && typeof h != "string")
            return c("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", typeof h), Ma[s] = !0, !0;
          if (typeof h == "number" && isNaN(h))
            return c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", s), Ma[s] = !0, !0;
          var P = Ki(s), W = P !== null && P.type === ui;
          if (Ha.hasOwnProperty(E)) {
            var X = Ha[E];
            if (X !== s)
              return c("Invalid DOM property `%s`. Did you mean `%s`?", s, X), Ma[s] = !0, !0;
          } else if (!W && s !== E)
            return c("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.", s, E), Ma[s] = !0, !0;
          return typeof h == "boolean" && Gr(s, h, P, !1) ? (h ? c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.', h, s, s, h, s) : c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.', h, s, s, h, s, s, s), Ma[s] = !0, !0) : W ? !0 : Gr(s, h, P, !1) ? (Ma[s] = !0, !1) : ((h === "false" || h === "true") && P !== null && P.type === dn && (c("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", h, s, h === "false" ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".', s, h), Ma[s] = !0), !0);
        };
      }
      var Em = function(r, s, h) {
        {
          var g = [];
          for (var E in s) {
            var C = ud(r, E, s[E], h);
            C || g.push(E);
          }
          var M = g.map(function(I) {
            return "`" + I + "`";
          }).join(", ");
          g.length === 1 ? c("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", M, r) : g.length > 1 && c("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", M, r);
        }
      };
      function No(r, s, h) {
        Ic(r, s) || Em(r, s, h);
      }
      var hd = 1, Gf = 2, Uu = 4, fy = hd | Gf | Uu, Ns = null;
      function Pc(r) {
        Ns !== null && c("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."), Ns = r;
      }
      function dd() {
        Ns === null && c("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."), Ns = null;
      }
      function hy(r) {
        return r === Ns;
      }
      function Ni(r) {
        var s = r.target || r.srcElement || window;
        return s.correspondingUseElement && (s = s.correspondingUseElement), s.nodeType === Lr ? s.parentNode : s;
      }
      var pd = null, to = null, Ds = null;
      function gd(r) {
        var s = xt(r);
        if (s) {
          if (typeof pd != "function")
            throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");
          var h = s.stateNode;
          if (h) {
            var g = yn(h);
            pd(s.stateNode, s.type, g);
          }
        }
      }
      function Sm(r) {
        pd = r;
      }
      function kc(r) {
        to ? Ds ? Ds.push(r) : Ds = [r] : to = r;
      }
      function kp() {
        return to !== null || Ds !== null;
      }
      function Fc() {
        if (to) {
          var r = to, s = Ds;
          if (to = null, Ds = null, gd(r), s)
            for (var h = 0; h < s.length; h++)
              gd(s[h]);
        }
      }
      var Nr = function(r, s) {
        return r(s);
      }, va = function() {
      }, xm = !1;
      function dy() {
        var r = kp();
        r && (va(), Fc());
      }
      function Yf(r, s, h) {
        if (xm)
          return r(s, h);
        xm = !0;
        try {
          return Nr(r, s, h);
        } finally {
          xm = !1, dy();
        }
      }
      function Fp(r, s, h) {
        Nr = r, va = h;
      }
      function md(r) {
        return r === "button" || r === "input" || r === "select" || r === "textarea";
      }
      function jc(r, s, h) {
        switch (r) {
          case "onClick":
          case "onClickCapture":
          case "onDoubleClick":
          case "onDoubleClickCapture":
          case "onMouseDown":
          case "onMouseDownCapture":
          case "onMouseMove":
          case "onMouseMoveCapture":
          case "onMouseUp":
          case "onMouseUpCapture":
          case "onMouseEnter":
            return !!(h.disabled && md(s));
          default:
            return !1;
        }
      }
      function Xl(r, s) {
        var h = r.stateNode;
        if (h === null)
          return null;
        var g = yn(h);
        if (g === null)
          return null;
        var E = g[s];
        if (jc(s, r.type, g))
          return null;
        if (E && typeof E != "function")
          throw new Error("Expected `" + s + "` listener to be a function, instead got a value of `" + typeof E + "` type.");
        return E;
      }
      var fl = !1;
      if (Pt)
        try {
          var Kl = {};
          Object.defineProperty(Kl, "passive", {
            get: function() {
              fl = !0;
            }
          }), window.addEventListener("test", Kl, Kl), window.removeEventListener("test", Kl, Kl);
        } catch {
          fl = !1;
        }
      function Uc(r, s, h, g, E, C, M, I, P) {
        var W = Array.prototype.slice.call(arguments, 3);
        try {
          s.apply(h, W);
        } catch (X) {
          this.onError(X);
        }
      }
      var vd = Uc;
      if (typeof window < "u" && typeof window.dispatchEvent == "function" && typeof document < "u" && typeof document.createEvent == "function") {
        var zu = document.createElement("react");
        vd = function(s, h, g, E, C, M, I, P, W) {
          if (typeof document > "u" || document === null)
            throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");
          var X = document.createEvent("Event"), de = !1, he = !0, we = window.event, Ce = Object.getOwnPropertyDescriptor(window, "event");
          function Pe() {
            zu.removeEventListener(ke, Vt, !1), typeof window.event < "u" && window.hasOwnProperty("event") && (window.event = we);
          }
          var yt = Array.prototype.slice.call(arguments, 3);
          function Vt() {
            de = !0, Pe(), h.apply(g, yt), he = !1;
          }
          var Nt, Kn = !1, Bn = !1;
          function ye(_e) {
            if (Nt = _e.error, Kn = !0, Nt === null && _e.colno === 0 && _e.lineno === 0 && (Bn = !0), _e.defaultPrevented && Nt != null && typeof Nt == "object")
              try {
                Nt._suppressLogging = !0;
              } catch {
              }
          }
          var ke = "react-" + (s || "invokeguardedcallback");
          if (window.addEventListener("error", ye), zu.addEventListener(ke, Vt, !1), X.initEvent(ke, !1, !1), zu.dispatchEvent(X), Ce && Object.defineProperty(window, "event", Ce), de && he && (Kn ? Bn && (Nt = new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")) : Nt = new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`), this.onError(Nt)), window.removeEventListener("error", ye), !de)
            return Pe(), Uc.apply(this, arguments);
        };
      }
      var bm = vd, Is = !1, yd = null, Zl = !1, no = null, $u = {
        onError: function(r) {
          Is = !0, yd = r;
        }
      };
      function Wa(r, s, h, g, E, C, M, I, P) {
        Is = !1, yd = null, bm.apply($u, arguments);
      }
      function jp(r, s, h, g, E, C, M, I, P) {
        if (Wa.apply(this, arguments), Is) {
          var W = io();
          Zl || (Zl = !0, no = W);
        }
      }
      function H() {
        if (Zl) {
          var r = no;
          throw Zl = !1, no = null, r;
        }
      }
      function qf() {
        return Is;
      }
      function io() {
        if (Is) {
          var r = yd;
          return Is = !1, yd = null, r;
        } else
          throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");
      }
      function Dr(r) {
        return r._reactInternals;
      }
      function gn(r) {
        return r._reactInternals !== void 0;
      }
      function Up(r, s) {
        r._reactInternals = s;
      }
      var kt = (
        /*                      */
        0
      ), Do = (
        /*                */
        1
      ), qn = (
        /*                    */
        2
      ), At = (
        /*                       */
        4
      ), ii = (
        /*                */
        16
      ), ro = (
        /*                 */
        32
      ), oa = (
        /*                     */
        64
      ), tn = (
        /*                   */
        128
      ), hr = (
        /*            */
        256
      ), Ps = (
        /*                          */
        512
      ), Xr = (
        /*                     */
        1024
      ), ps = (
        /*                      */
        2048
      ), hl = (
        /*                    */
        4096
      ), Bu = (
        /*                   */
        8192
      ), Ga = (
        /*             */
        16384
      ), py = ps | At | oa | Ps | Xr | Ga, Ql = (
        /*               */
        32767
      ), Vu = (
        /*                   */
        32768
      ), ya = (
        /*                */
        65536
      ), zp = (
        /* */
        131072
      ), Hu = (
        /*                       */
        1048576
      ), dl = (
        /*                    */
        2097152
      ), ao = (
        /*                 */
        4194304
      ), la = (
        /*                */
        8388608
      ), so = (
        /*               */
        16777216
      ), zc = (
        /*              */
        33554432
      ), gs = (
        // TODO: Remove Update flag from before mutation phase by re-landing Visibility
        // flag logic (see #20043)
        At | Xr | 0
      ), ms = qn | At | ii | ro | Ps | hl | Bu, Io = At | oa | Ps | Bu, Ya = ps | ii, ua = ao | la | dl, $c = i.ReactCurrentOwner;
      function Wu(r) {
        var s = r, h = r;
        if (r.alternate)
          for (; s.return; )
            s = s.return;
        else {
          var g = s;
          do
            s = g, (s.flags & (qn | hl)) !== kt && (h = s.return), g = s.return;
          while (g);
        }
        return s.tag === b ? h : null;
      }
      function Xf(r) {
        if (r.tag === G) {
          var s = r.memoizedState;
          if (s === null) {
            var h = r.alternate;
            h !== null && (s = h.memoizedState);
          }
          if (s !== null)
            return s.dehydrated;
        }
        return null;
      }
      function Gu(r) {
        return r.tag === b ? r.stateNode.containerInfo : null;
      }
      function Oa(r) {
        return Wu(r) === r;
      }
      function ks(r) {
        {
          var s = $c.current;
          if (s !== null && s.tag === _) {
            var h = s, g = h.stateNode;
            g._warnedAboutRefsInRender || c("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", Qt(h) || "A component"), g._warnedAboutRefsInRender = !0;
          }
        }
        var E = Dr(r);
        return E ? Wu(E) === E : !1;
      }
      function zi(r) {
        if (Wu(r) !== r)
          throw new Error("Unable to find node on an unmounted component.");
      }
      function oo(r) {
        var s = r.alternate;
        if (!s) {
          var h = Wu(r);
          if (h === null)
            throw new Error("Unable to find node on an unmounted component.");
          return h !== r ? null : r;
        }
        for (var g = r, E = s; ; ) {
          var C = g.return;
          if (C === null)
            break;
          var M = C.alternate;
          if (M === null) {
            var I = C.return;
            if (I !== null) {
              g = E = I;
              continue;
            }
            break;
          }
          if (C.child === M.child) {
            for (var P = C.child; P; ) {
              if (P === g)
                return zi(C), r;
              if (P === E)
                return zi(C), s;
              P = P.sibling;
            }
            throw new Error("Unable to find node on an unmounted component.");
          }
          if (g.return !== E.return)
            g = C, E = M;
          else {
            for (var W = !1, X = C.child; X; ) {
              if (X === g) {
                W = !0, g = C, E = M;
                break;
              }
              if (X === E) {
                W = !0, E = C, g = M;
                break;
              }
              X = X.sibling;
            }
            if (!W) {
              for (X = M.child; X; ) {
                if (X === g) {
                  W = !0, g = M, E = C;
                  break;
                }
                if (X === E) {
                  W = !0, E = M, g = C;
                  break;
                }
                X = X.sibling;
              }
              if (!W)
                throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.");
            }
          }
          if (g.alternate !== E)
            throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.");
        }
        if (g.tag !== b)
          throw new Error("Unable to find node on an unmounted component.");
        return g.stateNode.current === g ? r : s;
      }
      function Po(r) {
        var s = oo(r);
        return s !== null ? _d(s) : null;
      }
      function _d(r) {
        if (r.tag === O || r.tag === N)
          return r;
        for (var s = r.child; s !== null; ) {
          var h = _d(s);
          if (h !== null)
            return h;
          s = s.sibling;
        }
        return null;
      }
      function Jl(r) {
        var s = oo(r);
        return s !== null ? qa(s) : null;
      }
      function qa(r) {
        if (r.tag === O || r.tag === N)
          return r;
        for (var s = r.child; s !== null; ) {
          if (s.tag !== T) {
            var h = qa(s);
            if (h !== null)
              return h;
          }
          s = s.sibling;
        }
        return null;
      }
      var wm = t.unstable_scheduleCallback, Ed = t.unstable_cancelCallback, Cm = t.unstable_shouldYield, pl = t.unstable_requestPaint, Di = t.unstable_now, gy = t.unstable_getCurrentPriorityLevel, vs = t.unstable_ImmediatePriority, eu = t.unstable_UserBlockingPriority, gl = t.unstable_NormalPriority, Bc = t.unstable_LowPriority, Ir = t.unstable_IdlePriority, Sd = t.unstable_yieldValue, $p = t.unstable_setDisableYieldValue, _a = null, dr = null, rt = null, wr = !1, ys = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u";
      function Aa(r) {
        if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u")
          return !1;
        var s = __REACT_DEVTOOLS_GLOBAL_HOOK__;
        if (s.isDisabled)
          return !0;
        if (!s.supportsFiber)
          return c("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"), !0;
        try {
          Ye && (r = cn({}, r, {
            getLaneLabelMap: Xu,
            injectProfilingHooks: qu
          })), _a = s.inject(r), dr = s;
        } catch (h) {
          c("React instrumentation encountered an error: %s.", h);
        }
        return !!s.checkDCE;
      }
      function ko(r, s) {
        if (dr && typeof dr.onScheduleFiberRoot == "function")
          try {
            dr.onScheduleFiberRoot(_a, r, s);
          } catch (h) {
            wr || (wr = !0, c("React instrumentation encountered an error: %s", h));
          }
      }
      function Yu(r, s) {
        if (dr && typeof dr.onCommitFiberRoot == "function")
          try {
            var h = (r.current.flags & tn) === tn;
            if (Ze) {
              var g;
              switch (s) {
                case Cr:
                  g = vs;
                  break;
                case or:
                  g = eu;
                  break;
                case vl:
                  g = gl;
                  break;
                case hh:
                  g = Ir;
                  break;
                default:
                  g = gl;
                  break;
              }
              dr.onCommitFiberRoot(_a, r, g, h);
            }
          } catch (E) {
            wr || (wr = !0, c("React instrumentation encountered an error: %s", E));
          }
      }
      function Tm(r) {
        if (dr && typeof dr.onPostCommitFiberRoot == "function")
          try {
            dr.onPostCommitFiberRoot(_a, r);
          } catch (s) {
            wr || (wr = !0, c("React instrumentation encountered an error: %s", s));
          }
      }
      function my(r) {
        if (dr && typeof dr.onCommitFiberUnmount == "function")
          try {
            dr.onCommitFiberUnmount(_a, r);
          } catch (s) {
            wr || (wr = !0, c("React instrumentation encountered an error: %s", s));
          }
      }
      function wi(r) {
        if (typeof Sd == "function" && ($p(r), o(r)), dr && typeof dr.setStrictMode == "function")
          try {
            dr.setStrictMode(_a, r);
          } catch (s) {
            wr || (wr = !0, c("React instrumentation encountered an error: %s", s));
          }
      }
      function qu(r) {
        rt = r;
      }
      function Xu() {
        {
          for (var r = /* @__PURE__ */ new Map(), s = 1, h = 0; h < Ji; h++) {
            var g = Ld(s);
            r.set(s, g), s *= 2;
          }
          return r;
        }
      }
      function Rm(r) {
        rt !== null && typeof rt.markCommitStarted == "function" && rt.markCommitStarted(r);
      }
      function xd() {
        rt !== null && typeof rt.markCommitStopped == "function" && rt.markCommitStopped();
      }
      function Kf(r) {
        rt !== null && typeof rt.markComponentRenderStarted == "function" && rt.markComponentRenderStarted(r);
      }
      function Fo() {
        rt !== null && typeof rt.markComponentRenderStopped == "function" && rt.markComponentRenderStopped();
      }
      function Mm(r) {
        rt !== null && typeof rt.markComponentPassiveEffectMountStarted == "function" && rt.markComponentPassiveEffectMountStarted(r);
      }
      function Bp() {
        rt !== null && typeof rt.markComponentPassiveEffectMountStopped == "function" && rt.markComponentPassiveEffectMountStopped();
      }
      function Vp(r) {
        rt !== null && typeof rt.markComponentPassiveEffectUnmountStarted == "function" && rt.markComponentPassiveEffectUnmountStarted(r);
      }
      function Om() {
        rt !== null && typeof rt.markComponentPassiveEffectUnmountStopped == "function" && rt.markComponentPassiveEffectUnmountStopped();
      }
      function vy(r) {
        rt !== null && typeof rt.markComponentLayoutEffectMountStarted == "function" && rt.markComponentLayoutEffectMountStarted(r);
      }
      function Am() {
        rt !== null && typeof rt.markComponentLayoutEffectMountStopped == "function" && rt.markComponentLayoutEffectMountStopped();
      }
      function Zf(r) {
        rt !== null && typeof rt.markComponentLayoutEffectUnmountStarted == "function" && rt.markComponentLayoutEffectUnmountStarted(r);
      }
      function Qf() {
        rt !== null && typeof rt.markComponentLayoutEffectUnmountStopped == "function" && rt.markComponentLayoutEffectUnmountStopped();
      }
      function Hp(r, s, h) {
        rt !== null && typeof rt.markComponentErrored == "function" && rt.markComponentErrored(r, s, h);
      }
      function yy(r, s, h) {
        rt !== null && typeof rt.markComponentSuspended == "function" && rt.markComponentSuspended(r, s, h);
      }
      function Ku(r) {
        rt !== null && typeof rt.markLayoutEffectsStarted == "function" && rt.markLayoutEffectsStarted(r);
      }
      function Lm() {
        rt !== null && typeof rt.markLayoutEffectsStopped == "function" && rt.markLayoutEffectsStopped();
      }
      function Jf(r) {
        rt !== null && typeof rt.markPassiveEffectsStarted == "function" && rt.markPassiveEffectsStarted(r);
      }
      function jo() {
        rt !== null && typeof rt.markPassiveEffectsStopped == "function" && rt.markPassiveEffectsStopped();
      }
      function tu(r) {
        rt !== null && typeof rt.markRenderStarted == "function" && rt.markRenderStarted(r);
      }
      function bd() {
        rt !== null && typeof rt.markRenderYielded == "function" && rt.markRenderYielded();
      }
      function nu() {
        rt !== null && typeof rt.markRenderStopped == "function" && rt.markRenderStopped();
      }
      function Wp(r) {
        rt !== null && typeof rt.markRenderScheduled == "function" && rt.markRenderScheduled(r);
      }
      function eh(r, s) {
        rt !== null && typeof rt.markForceUpdateScheduled == "function" && rt.markForceUpdateScheduled(r, s);
      }
      function wd(r, s) {
        rt !== null && typeof rt.markStateUpdateScheduled == "function" && rt.markStateUpdateScheduled(r, s);
      }
      var Ft = (
        /*                         */
        0
      ), Ot = (
        /*                 */
        1
      ), Wn = (
        /*                    */
        2
      ), sr = (
        /*               */
        8
      ), lo = (
        /*              */
        16
      ), Vc = Math.clz32 ? Math.clz32 : pr, mn = Math.log, Hc = Math.LN2;
      function pr(r) {
        var s = r >>> 0;
        return s === 0 ? 32 : 31 - (mn(s) / Hc | 0) | 0;
      }
      var Ji = 31, je = (
        /*                        */
        0
      ), Pr = (
        /*                          */
        0
      ), Bt = (
        /*                        */
        1
      ), kr = (
        /*    */
        2
      ), iu = (
        /*             */
        4
      ), er = (
        /*            */
        8
      ), _s = (
        /*                     */
        16
      ), Zu = (
        /*                */
        32
      ), ru = (
        /*                       */
        4194240
      ), $i = (
        /*                        */
        64
      ), Fr = (
        /*                        */
        128
      ), au = (
        /*                        */
        256
      ), th = (
        /*                        */
        512
      ), Qu = (
        /*                        */
        1024
      ), Cd = (
        /*                        */
        2048
      ), nh = (
        /*                        */
        4096
      ), Td = (
        /*                        */
        8192
      ), ih = (
        /*                        */
        16384
      ), rh = (
        /*                       */
        32768
      ), Uo = (
        /*                       */
        65536
      ), Gp = (
        /*                       */
        131072
      ), zo = (
        /*                       */
        262144
      ), Ju = (
        /*                       */
        524288
      ), Rd = (
        /*                       */
        1048576
      ), ec = (
        /*                       */
        2097152
      ), Wc = (
        /*                            */
        130023424
      ), Gc = (
        /*                             */
        4194304
      ), Md = (
        /*                             */
        8388608
      ), Od = (
        /*                             */
        16777216
      ), Ad = (
        /*                             */
        33554432
      ), Yp = (
        /*                             */
        67108864
      ), qp = Gc, tc = (
        /*          */
        134217728
      ), La = (
        /*                          */
        268435455
      ), Xa = (
        /*               */
        268435456
      ), nc = (
        /*                        */
        536870912
      ), Fs = (
        /*                   */
        1073741824
      );
      function Ld(r) {
        {
          if (r & Bt)
            return "Sync";
          if (r & kr)
            return "InputContinuousHydration";
          if (r & iu)
            return "InputContinuous";
          if (r & er)
            return "DefaultHydration";
          if (r & _s)
            return "Default";
          if (r & Zu)
            return "TransitionHydration";
          if (r & ru)
            return "Transition";
          if (r & Wc)
            return "Retry";
          if (r & tc)
            return "SelectiveHydration";
          if (r & Xa)
            return "IdleHydration";
          if (r & nc)
            return "Idle";
          if (r & Fs)
            return "Offscreen";
        }
      }
      var oi = -1, Nd = $i, ah = Gc;
      function sh(r) {
        switch (jr(r)) {
          case Bt:
            return Bt;
          case kr:
            return kr;
          case iu:
            return iu;
          case er:
            return er;
          case _s:
            return _s;
          case Zu:
            return Zu;
          case $i:
          case Fr:
          case au:
          case th:
          case Qu:
          case Cd:
          case nh:
          case Td:
          case ih:
          case rh:
          case Uo:
          case Gp:
          case zo:
          case Ju:
          case Rd:
          case ec:
            return r & ru;
          case Gc:
          case Md:
          case Od:
          case Ad:
          case Yp:
            return r & Wc;
          case tc:
            return tc;
          case Xa:
            return Xa;
          case nc:
            return nc;
          case Fs:
            return Fs;
          default:
            return c("Should have found matching lanes. This is a bug in React."), r;
        }
      }
      function oh(r, s) {
        var h = r.pendingLanes;
        if (h === je)
          return je;
        var g = je, E = r.suspendedLanes, C = r.pingedLanes, M = h & La;
        if (M !== je) {
          var I = M & ~E;
          if (I !== je)
            g = sh(I);
          else {
            var P = M & C;
            P !== je && (g = sh(P));
          }
        } else {
          var W = h & ~E;
          W !== je ? g = sh(W) : C !== je && (g = sh(C));
        }
        if (g === je)
          return je;
        if (s !== je && s !== g && // If we already suspended with a delay, then interrupting is fine. Don't
        // bother waiting until the root is complete.
        (s & E) === je) {
          var X = jr(g), de = jr(s);
          if (
            // Tests whether the next lane is equal or lower priority than the wip
            // one. This works because the bits decrease in priority as you go left.
            X >= de || // Default priority updates should not interrupt transition updates. The
            // only difference between default updates and transition updates is that
            // default updates do not support refresh transitions.
            X === _s && (de & ru) !== je
          )
            return s;
        }
        (g & iu) !== je && (g |= h & _s);
        var he = r.entangledLanes;
        if (he !== je)
          for (var we = r.entanglements, Ce = g & he; Ce > 0; ) {
            var Pe = Da(Ce), yt = 1 << Pe;
            g |= we[Pe], Ce &= ~yt;
          }
        return g;
      }
      function su(r, s) {
        for (var h = r.eventTimes, g = oi; s > 0; ) {
          var E = Da(s), C = 1 << E, M = h[E];
          M > g && (g = M), s &= ~C;
        }
        return g;
      }
      function Dd(r, s) {
        switch (r) {
          case Bt:
          case kr:
          case iu:
            return s + 250;
          case er:
          case _s:
          case Zu:
          case $i:
          case Fr:
          case au:
          case th:
          case Qu:
          case Cd:
          case nh:
          case Td:
          case ih:
          case rh:
          case Uo:
          case Gp:
          case zo:
          case Ju:
          case Rd:
          case ec:
            return s + 5e3;
          case Gc:
          case Md:
          case Od:
          case Ad:
          case Yp:
            return oi;
          case tc:
          case Xa:
          case nc:
          case Fs:
            return oi;
          default:
            return c("Should have found matching lanes. This is a bug in React."), oi;
        }
      }
      function L_(r, s) {
        for (var h = r.pendingLanes, g = r.suspendedLanes, E = r.pingedLanes, C = r.expirationTimes, M = h; M > 0; ) {
          var I = Da(M), P = 1 << I, W = C[I];
          W === oi ? ((P & g) === je || (P & E) !== je) && (C[I] = Dd(P, s)) : W <= s && (r.expiredLanes |= P), M &= ~P;
        }
      }
      function _y(r) {
        return sh(r.pendingLanes);
      }
      function ou(r) {
        var s = r.pendingLanes & ~Fs;
        return s !== je ? s : s & Fs ? Fs : je;
      }
      function lh(r) {
        return (r & Bt) !== je;
      }
      function uh(r) {
        return (r & La) !== je;
      }
      function Id(r) {
        return (r & Wc) === r;
      }
      function Xp(r) {
        var s = Bt | iu | _s;
        return (r & s) === je;
      }
      function Pd(r) {
        return (r & ru) === r;
      }
      function kd(r, s) {
        var h = kr | iu | er | _s;
        return (s & h) !== je;
      }
      function Nm(r, s) {
        return (s & r.expiredLanes) !== je;
      }
      function ch(r) {
        return (r & ru) !== je;
      }
      function Dm() {
        var r = Nd;
        return Nd <<= 1, (Nd & ru) === je && (Nd = $i), r;
      }
      function Na() {
        var r = ah;
        return ah <<= 1, (ah & Wc) === je && (ah = Gc), r;
      }
      function jr(r) {
        return r & -r;
      }
      function Yc(r) {
        return jr(r);
      }
      function Da(r) {
        return 31 - Vc(r);
      }
      function Fd(r) {
        return Da(r);
      }
      function Ka(r, s) {
        return (r & s) !== je;
      }
      function qc(r, s) {
        return (r & s) === s;
      }
      function an(r, s) {
        return r | s;
      }
      function jd(r, s) {
        return r & ~s;
      }
      function Kp(r, s) {
        return r & s;
      }
      function lu(r) {
        return r;
      }
      function Zp(r, s) {
        return r !== Pr && r < s ? r : s;
      }
      function Xc(r) {
        for (var s = [], h = 0; h < Ji; h++)
          s.push(r);
        return s;
      }
      function uu(r, s, h) {
        r.pendingLanes |= s, s !== nc && (r.suspendedLanes = je, r.pingedLanes = je);
        var g = r.eventTimes, E = Fd(s);
        g[E] = h;
      }
      function Ud(r, s) {
        r.suspendedLanes |= s, r.pingedLanes &= ~s;
        for (var h = r.expirationTimes, g = s; g > 0; ) {
          var E = Da(g), C = 1 << E;
          h[E] = oi, g &= ~C;
        }
      }
      function cu(r, s, h) {
        r.pingedLanes |= r.suspendedLanes & s;
      }
      function jt(r, s) {
        var h = r.pendingLanes & ~s;
        r.pendingLanes = s, r.suspendedLanes = je, r.pingedLanes = je, r.expiredLanes &= s, r.mutableReadLanes &= s, r.entangledLanes &= s;
        for (var g = r.entanglements, E = r.eventTimes, C = r.expirationTimes, M = h; M > 0; ) {
          var I = Da(M), P = 1 << I;
          g[I] = je, E[I] = oi, C[I] = oi, M &= ~P;
        }
      }
      function fh(r, s) {
        for (var h = r.entangledLanes |= s, g = r.entanglements, E = h; E; ) {
          var C = Da(E), M = 1 << C;
          // Is this one of the newly entangled lanes?
          M & s | // Is this lane transitively entangled with the newly entangled lanes?
          g[C] & s && (g[C] |= s), E &= ~M;
        }
      }
      function Qp(r, s) {
        var h = jr(s), g;
        switch (h) {
          case iu:
            g = kr;
            break;
          case _s:
            g = er;
            break;
          case $i:
          case Fr:
          case au:
          case th:
          case Qu:
          case Cd:
          case nh:
          case Td:
          case ih:
          case rh:
          case Uo:
          case Gp:
          case zo:
          case Ju:
          case Rd:
          case ec:
          case Gc:
          case Md:
          case Od:
          case Ad:
          case Yp:
            g = Zu;
            break;
          case nc:
            g = Xa;
            break;
          default:
            g = Pr;
            break;
        }
        return (g & (r.suspendedLanes | s)) !== Pr ? Pr : g;
      }
      function ml(r, s, h) {
        if (ys)
          for (var g = r.pendingUpdatersLaneMap; h > 0; ) {
            var E = Fd(h), C = 1 << E, M = g[E];
            M.add(s), h &= ~C;
          }
      }
      function Im(r, s) {
        if (ys)
          for (var h = r.pendingUpdatersLaneMap, g = r.memoizedUpdaters; s > 0; ) {
            var E = Fd(s), C = 1 << E, M = h[E];
            M.size > 0 && (M.forEach(function(I) {
              var P = I.alternate;
              (P === null || !g.has(P)) && g.add(I);
            }), M.clear()), s &= ~C;
          }
      }
      function Kc(r, s) {
        return null;
      }
      var Cr = Bt, or = iu, vl = _s, hh = nc, Zc = Pr;
      function uo() {
        return Zc;
      }
      function gr(r) {
        Zc = r;
      }
      function Ia(r, s) {
        var h = Zc;
        try {
          return Zc = r, s();
        } finally {
          Zc = h;
        }
      }
      function N_(r, s) {
        return r !== 0 && r < s ? r : s;
      }
      function D_(r, s) {
        return r === 0 || r > s ? r : s;
      }
      function Es(r, s) {
        return r !== 0 && r < s;
      }
      function li(r) {
        var s = jr(r);
        return Es(Cr, s) ? Es(or, s) ? uh(s) ? vl : hh : or : Cr;
      }
      function dh(r) {
        var s = r.current.memoizedState;
        return s.isDehydrated;
      }
      var vt;
      function ic(r) {
        vt = r;
      }
      function Pm(r) {
        vt(r);
      }
      var Jp;
      function zd(r) {
        Jp = r;
      }
      var Qc;
      function $d(r) {
        Qc = r;
      }
      var eg;
      function Ey(r) {
        eg = r;
      }
      var km;
      function Sy(r) {
        km = r;
      }
      var ph = !1, Jc = [], lr = null, Kr = null, Pa = null, yl = /* @__PURE__ */ new Map(), rc = /* @__PURE__ */ new Map(), Jr = [], Fm = [
        "mousedown",
        "mouseup",
        "touchcancel",
        "touchend",
        "touchstart",
        "auxclick",
        "dblclick",
        "pointercancel",
        "pointerdown",
        "pointerup",
        "dragend",
        "dragstart",
        "drop",
        "compositionend",
        "compositionstart",
        "keydown",
        "keypress",
        "keyup",
        "input",
        "textInput",
        // Intentionally camelCase
        "copy",
        "cut",
        "paste",
        "click",
        "change",
        "contextmenu",
        "reset",
        "submit"
      ];
      function js(r) {
        return Fm.indexOf(r) > -1;
      }
      function xy(r, s, h, g, E) {
        return {
          blockedOn: r,
          domEventName: s,
          eventSystemFlags: h,
          nativeEvent: E,
          targetContainers: [g]
        };
      }
      function co(r, s) {
        switch (r) {
          case "focusin":
          case "focusout":
            lr = null;
            break;
          case "dragenter":
          case "dragleave":
            Kr = null;
            break;
          case "mouseover":
          case "mouseout":
            Pa = null;
            break;
          case "pointerover":
          case "pointerout": {
            var h = s.pointerId;
            yl.delete(h);
            break;
          }
          case "gotpointercapture":
          case "lostpointercapture": {
            var g = s.pointerId;
            rc.delete(g);
            break;
          }
        }
      }
      function fo(r, s, h, g, E, C) {
        if (r === null || r.nativeEvent !== C) {
          var M = xy(s, h, g, E, C);
          if (s !== null) {
            var I = xt(s);
            I !== null && Jp(I);
          }
          return M;
        }
        r.eventSystemFlags |= g;
        var P = r.targetContainers;
        return E !== null && P.indexOf(E) === -1 && P.push(E), r;
      }
      function by(r, s, h, g, E) {
        switch (s) {
          case "focusin": {
            var C = E;
            return lr = fo(lr, r, s, h, g, C), !0;
          }
          case "dragenter": {
            var M = E;
            return Kr = fo(Kr, r, s, h, g, M), !0;
          }
          case "mouseover": {
            var I = E;
            return Pa = fo(Pa, r, s, h, g, I), !0;
          }
          case "pointerover": {
            var P = E, W = P.pointerId;
            return yl.set(W, fo(yl.get(W) || null, r, s, h, g, P)), !0;
          }
          case "gotpointercapture": {
            var X = E, de = X.pointerId;
            return rc.set(de, fo(rc.get(de) || null, r, s, h, g, X)), !0;
          }
        }
        return !1;
      }
      function tg(r) {
        var s = ot(r.target);
        if (s !== null) {
          var h = Wu(s);
          if (h !== null) {
            var g = h.tag;
            if (g === G) {
              var E = Xf(h);
              if (E !== null) {
                r.blockedOn = E, km(r.priority, function() {
                  Qc(h);
                });
                return;
              }
            } else if (g === b) {
              var C = h.stateNode;
              if (dh(C)) {
                r.blockedOn = Gu(h);
                return;
              }
            }
          }
        }
        r.blockedOn = null;
      }
      function I_(r) {
        for (var s = eg(), h = {
          blockedOn: null,
          target: r,
          priority: s
        }, g = 0; g < Jr.length && Es(s, Jr[g].priority); g++)
          ;
        Jr.splice(g, 0, h), g === 0 && tg(h);
      }
      function ef(r) {
        if (r.blockedOn !== null)
          return !1;
        for (var s = r.targetContainers; s.length > 0; ) {
          var h = s[0], g = ka(r.domEventName, r.eventSystemFlags, h, r.nativeEvent);
          if (g === null) {
            var E = r.nativeEvent, C = new E.constructor(E.type, E);
            Pc(C), E.target.dispatchEvent(C), dd();
          } else {
            var M = xt(g);
            return M !== null && Jp(M), r.blockedOn = g, !1;
          }
          s.shift();
        }
        return !0;
      }
      function ng(r, s, h) {
        ef(r) && h.delete(s);
      }
      function ho() {
        ph = !1, lr !== null && ef(lr) && (lr = null), Kr !== null && ef(Kr) && (Kr = null), Pa !== null && ef(Pa) && (Pa = null), yl.forEach(ng), rc.forEach(ng);
      }
      function Ln(r, s) {
        r.blockedOn === s && (r.blockedOn = null, ph || (ph = !0, t.unstable_scheduleCallback(t.unstable_NormalPriority, ho)));
      }
      function Tr(r) {
        if (Jc.length > 0) {
          Ln(Jc[0], r);
          for (var s = 1; s < Jc.length; s++) {
            var h = Jc[s];
            h.blockedOn === r && (h.blockedOn = null);
          }
        }
        lr !== null && Ln(lr, r), Kr !== null && Ln(Kr, r), Pa !== null && Ln(Pa, r);
        var g = function(I) {
          return Ln(I, r);
        };
        yl.forEach(g), rc.forEach(g);
        for (var E = 0; E < Jr.length; E++) {
          var C = Jr[E];
          C.blockedOn === r && (C.blockedOn = null);
        }
        for (; Jr.length > 0; ) {
          var M = Jr[0];
          if (M.blockedOn !== null)
            break;
          tg(M), M.blockedOn === null && Jr.shift();
        }
      }
      var tr = i.ReactCurrentBatchConfig, ea = !0;
      function Ss(r) {
        ea = !!r;
      }
      function gh() {
        return ea;
      }
      function ta(r, s, h) {
        var g = Bd(s), E;
        switch (g) {
          case Cr:
            E = mh;
            break;
          case or:
            E = ac;
            break;
          case vl:
          default:
            E = tf;
            break;
        }
        return E.bind(null, s, h, r);
      }
      function mh(r, s, h, g) {
        var E = uo(), C = tr.transition;
        tr.transition = null;
        try {
          gr(Cr), tf(r, s, h, g);
        } finally {
          gr(E), tr.transition = C;
        }
      }
      function ac(r, s, h, g) {
        var E = uo(), C = tr.transition;
        tr.transition = null;
        try {
          gr(or), tf(r, s, h, g);
        } finally {
          gr(E), tr.transition = C;
        }
      }
      function tf(r, s, h, g) {
        ea && jm(r, s, h, g);
      }
      function jm(r, s, h, g) {
        var E = ka(r, s, h, g);
        if (E === null) {
          Fy(r, s, g, sc, h), co(r, g);
          return;
        }
        if (by(E, r, s, h, g)) {
          g.stopPropagation();
          return;
        }
        if (co(r, g), s & Uu && js(r)) {
          for (; E !== null; ) {
            var C = xt(E);
            C !== null && Pm(C);
            var M = ka(r, s, h, g);
            if (M === null && Fy(r, s, g, sc, h), M === E)
              break;
            E = M;
          }
          E !== null && g.stopPropagation();
          return;
        }
        Fy(r, s, g, null, h);
      }
      var sc = null;
      function ka(r, s, h, g) {
        sc = null;
        var E = Ni(g), C = ot(E);
        if (C !== null) {
          var M = Wu(C);
          if (M === null)
            C = null;
          else {
            var I = M.tag;
            if (I === G) {
              var P = Xf(M);
              if (P !== null)
                return P;
              C = null;
            } else if (I === b) {
              var W = M.stateNode;
              if (dh(W))
                return Gu(M);
              C = null;
            } else
              M !== C && (C = null);
          }
        }
        return sc = C, null;
      }
      function Bd(r) {
        switch (r) {
          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 "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 Cr;
          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 "toggle":
          case "touchmove":
          case "wheel":
          case "mouseenter":
          case "mouseleave":
          case "pointerenter":
          case "pointerleave":
            return or;
          case "message": {
            var s = gy();
            switch (s) {
              case vs:
                return Cr;
              case eu:
                return or;
              case gl:
              case Bc:
                return vl;
              case Ir:
                return hh;
              default:
                return vl;
            }
          }
          default:
            return vl;
        }
      }
      function vh(r, s, h) {
        return r.addEventListener(s, h, !1), h;
      }
      function fu(r, s, h) {
        return r.addEventListener(s, h, !0), h;
      }
      function ig(r, s, h, g) {
        return r.addEventListener(s, h, {
          capture: !0,
          passive: g
        }), h;
      }
      function Um(r, s, h, g) {
        return r.addEventListener(s, h, {
          passive: g
        }), h;
      }
      var po = null, yh = null, mr = null;
      function rg(r) {
        return po = r, yh = _h(), !0;
      }
      function Vd() {
        po = null, yh = null, mr = null;
      }
      function ag() {
        if (mr)
          return mr;
        var r, s = yh, h = s.length, g, E = _h(), C = E.length;
        for (r = 0; r < h && s[r] === E[r]; r++)
          ;
        var M = h - r;
        for (g = 1; g <= M && s[h - g] === E[C - g]; g++)
          ;
        var I = g > 1 ? 1 - g : void 0;
        return mr = E.slice(r, I), mr;
      }
      function _h() {
        return "value" in po ? po.value : po.textContent;
      }
      function nf(r) {
        var s, h = r.keyCode;
        return "charCode" in r ? (s = r.charCode, s === 0 && h === 13 && (s = 13)) : s = h, s === 10 && (s = 13), s >= 32 || s === 13 ? s : 0;
      }
      function ca() {
        return !0;
      }
      function hu() {
        return !1;
      }
      function vr(r) {
        function s(h, g, E, C, M) {
          this._reactName = h, this._targetInst = E, this.type = g, this.nativeEvent = C, this.target = M, this.currentTarget = null;
          for (var I in r)
            if (r.hasOwnProperty(I)) {
              var P = r[I];
              P ? this[I] = P(C) : this[I] = C[I];
            }
          var W = C.defaultPrevented != null ? C.defaultPrevented : C.returnValue === !1;
          return W ? this.isDefaultPrevented = ca : this.isDefaultPrevented = hu, this.isPropagationStopped = hu, this;
        }
        return cn(s.prototype, {
          preventDefault: function() {
            this.defaultPrevented = !0;
            var h = this.nativeEvent;
            h && (h.preventDefault ? h.preventDefault() : typeof h.returnValue != "unknown" && (h.returnValue = !1), this.isDefaultPrevented = ca);
          },
          stopPropagation: function() {
            var h = this.nativeEvent;
            h && (h.stopPropagation ? h.stopPropagation() : typeof h.cancelBubble != "unknown" && (h.cancelBubble = !0), this.isPropagationStopped = ca);
          },
          /**
           * We release all dispatched `SyntheticEvent`s after each event loop, adding
           * them back into the pool. This allows a way to hold onto a reference that
           * won't be added back into the pool.
           */
          persist: function() {
          },
          /**
           * Checks if this event should be released back into the pool.
           *
           * @return {boolean} True if this should not be released, false otherwise.
           */
          isPersistent: ca
        }), s;
      }
      var Ur = {
        eventPhase: 0,
        bubbles: 0,
        cancelable: 0,
        timeStamp: function(r) {
          return r.timeStamp || Date.now();
        },
        defaultPrevented: 0,
        isTrusted: 0
      }, sg = vr(Ur), rf = cn({}, Ur, {
        view: 0,
        detail: 0
      }), zm = vr(rf), $m, _l, Eh;
      function Bm(r) {
        r !== Eh && (Eh && r.type === "mousemove" ? ($m = r.screenX - Eh.screenX, _l = r.screenY - Eh.screenY) : ($m = 0, _l = 0), Eh = r);
      }
      var El = cn({}, rf, {
        screenX: 0,
        screenY: 0,
        clientX: 0,
        clientY: 0,
        pageX: 0,
        pageY: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        getModifierState: Hm,
        button: 0,
        buttons: 0,
        relatedTarget: function(r) {
          return r.relatedTarget === void 0 ? r.fromElement === r.srcElement ? r.toElement : r.fromElement : r.relatedTarget;
        },
        movementX: function(r) {
          return "movementX" in r ? r.movementX : (Bm(r), $m);
        },
        movementY: function(r) {
          return "movementY" in r ? r.movementY : _l;
        }
      }), og = vr(El), af = cn({}, El, {
        dataTransfer: 0
      }), wy = vr(af), Cy = cn({}, rf, {
        relatedTarget: 0
      }), Hd = vr(Cy), lg = cn({}, Ur, {
        animationName: 0,
        elapsedTime: 0,
        pseudoElement: 0
      }), P_ = vr(lg), k_ = cn({}, Ur, {
        clipboardData: function(r) {
          return "clipboardData" in r ? r.clipboardData : window.clipboardData;
        }
      }), Ty = vr(k_), Ry = cn({}, Ur, {
        data: 0
      }), oc = vr(Ry), F_ = oc, lc = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified"
      }, Vm = {
        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"
      };
      function Rr(r) {
        if (r.key) {
          var s = lc[r.key] || r.key;
          if (s !== "Unidentified")
            return s;
        }
        if (r.type === "keypress") {
          var h = nf(r);
          return h === 13 ? "Enter" : String.fromCharCode(h);
        }
        return r.type === "keydown" || r.type === "keyup" ? Vm[r.keyCode] || "Unidentified" : "";
      }
      var j_ = {
        Alt: "altKey",
        Control: "ctrlKey",
        Meta: "metaKey",
        Shift: "shiftKey"
      };
      function My(r) {
        var s = this, h = s.nativeEvent;
        if (h.getModifierState)
          return h.getModifierState(r);
        var g = j_[r];
        return g ? !!h[g] : !1;
      }
      function Hm(r) {
        return My;
      }
      var U_ = cn({}, rf, {
        key: Rr,
        code: 0,
        location: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        repeat: 0,
        locale: 0,
        getModifierState: Hm,
        // Legacy Interface
        charCode: function(r) {
          return r.type === "keypress" ? nf(r) : 0;
        },
        keyCode: function(r) {
          return r.type === "keydown" || r.type === "keyup" ? r.keyCode : 0;
        },
        which: function(r) {
          return r.type === "keypress" ? nf(r) : r.type === "keydown" || r.type === "keyup" ? r.keyCode : 0;
        }
      }), Oy = vr(U_), Ay = cn({}, El, {
        pointerId: 0,
        width: 0,
        height: 0,
        pressure: 0,
        tangentialPressure: 0,
        tiltX: 0,
        tiltY: 0,
        twist: 0,
        pointerType: 0,
        isPrimary: 0
      }), Ly = vr(Ay), Us = cn({}, rf, {
        touches: 0,
        targetTouches: 0,
        changedTouches: 0,
        altKey: 0,
        metaKey: 0,
        ctrlKey: 0,
        shiftKey: 0,
        getModifierState: Hm
      }), Wm = vr(Us), ug = cn({}, Ur, {
        propertyName: 0,
        elapsedTime: 0,
        pseudoElement: 0
      }), uc = vr(ug), cg = cn({}, El, {
        deltaX: function(r) {
          return "deltaX" in r ? r.deltaX : (
            // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
            "wheelDeltaX" in r ? -r.wheelDeltaX : 0
          );
        },
        deltaY: function(r) {
          return "deltaY" in r ? r.deltaY : (
            // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
            "wheelDeltaY" in r ? -r.wheelDeltaY : (
              // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
              "wheelDelta" in r ? -r.wheelDelta : 0
            )
          );
        },
        deltaZ: 0,
        // Browsers without "deltaMode" is reporting in raw wheel delta where one
        // notch on the scroll is always +/- 120, roughly equivalent to pixels.
        // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
        // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
        deltaMode: 0
      }), sf = vr(cg), fg = [9, 13, 27, 32], hg = 229, Wd = Pt && "CompositionEvent" in window, Gd = null;
      Pt && "documentMode" in document && (Gd = document.documentMode);
      var Gm = Pt && "TextEvent" in window && !Gd, Ny = Pt && (!Wd || Gd && Gd > 8 && Gd <= 11), Ym = 32, qm = String.fromCharCode(Ym);
      function dg() {
        hn("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]), hn("onCompositionEnd", ["compositionend", "focusout", "keydown", "keypress", "keyup", "mousedown"]), hn("onCompositionStart", ["compositionstart", "focusout", "keydown", "keypress", "keyup", "mousedown"]), hn("onCompositionUpdate", ["compositionupdate", "focusout", "keydown", "keypress", "keyup", "mousedown"]);
      }
      var Yd = !1;
      function Dy(r) {
        return (r.ctrlKey || r.altKey || r.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
        !(r.ctrlKey && r.altKey);
      }
      function Xm(r) {
        switch (r) {
          case "compositionstart":
            return "onCompositionStart";
          case "compositionend":
            return "onCompositionEnd";
          case "compositionupdate":
            return "onCompositionUpdate";
        }
      }
      function z_(r, s) {
        return r === "keydown" && s.keyCode === hg;
      }
      function pg(r, s) {
        switch (r) {
          case "keyup":
            return fg.indexOf(s.keyCode) !== -1;
          case "keydown":
            return s.keyCode !== hg;
          case "keypress":
          case "mousedown":
          case "focusout":
            return !0;
          default:
            return !1;
        }
      }
      function qd(r) {
        var s = r.detail;
        return typeof s == "object" && "data" in s ? s.data : null;
      }
      function Xd(r) {
        return r.locale === "ko";
      }
      var cc = !1;
      function gg(r, s, h, g, E) {
        var C, M;
        if (Wd ? C = Xm(s) : cc ? pg(s, g) && (C = "onCompositionEnd") : z_(s, g) && (C = "onCompositionStart"), !C)
          return null;
        Ny && !Xd(g) && (!cc && C === "onCompositionStart" ? cc = rg(E) : C === "onCompositionEnd" && cc && (M = ag()));
        var I = Jm(h, C);
        if (I.length > 0) {
          var P = new oc(C, s, null, g, E);
          if (r.push({
            event: P,
            listeners: I
          }), M)
            P.data = M;
          else {
            var W = qd(g);
            W !== null && (P.data = W);
          }
        }
      }
      function Iy(r, s) {
        switch (r) {
          case "compositionend":
            return qd(s);
          case "keypress":
            var h = s.which;
            return h !== Ym ? null : (Yd = !0, qm);
          case "textInput":
            var g = s.data;
            return g === qm && Yd ? null : g;
          default:
            return null;
        }
      }
      function mg(r, s) {
        if (cc) {
          if (r === "compositionend" || !Wd && pg(r, s)) {
            var h = ag();
            return Vd(), cc = !1, h;
          }
          return null;
        }
        switch (r) {
          case "paste":
            return null;
          case "keypress":
            if (!Dy(s)) {
              if (s.char && s.char.length > 1)
                return s.char;
              if (s.which)
                return String.fromCharCode(s.which);
            }
            return null;
          case "compositionend":
            return Ny && !Xd(s) ? null : s.data;
          default:
            return null;
        }
      }
      function vg(r, s, h, g, E) {
        var C;
        if (Gm ? C = Iy(s, g) : C = mg(s, g), !C)
          return null;
        var M = Jm(h, "onBeforeInput");
        if (M.length > 0) {
          var I = new F_("onBeforeInput", "beforeinput", null, g, E);
          r.push({
            event: I,
            listeners: M
          }), I.data = C;
        }
      }
      function $_(r, s, h, g, E, C, M) {
        gg(r, s, h, g, E), vg(r, s, h, g, E);
      }
      var Kd = {
        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 Py(r) {
        var s = r && r.nodeName && r.nodeName.toLowerCase();
        return s === "input" ? !!Kd[r.type] : s === "textarea";
      }
      /**
       * Checks if an event is supported in the current execution environment.
       *
       * NOTE: This will not work correctly for non-generic events such as `change`,
       * `reset`, `load`, `error`, and `select`.
       *
       * Borrows from Modernizr.
       *
       * @param {string} eventNameSuffix Event name, e.g. "click".
       * @return {boolean} True if the event is supported.
       * @internal
       * @license Modernizr 3.0.0pre (Custom Build) | MIT
       */
      function yg(r) {
        if (!Pt)
          return !1;
        var s = "on" + r, h = s in document;
        if (!h) {
          var g = document.createElement("div");
          g.setAttribute(s, "return;"), h = typeof g[s] == "function";
        }
        return h;
      }
      function l() {
        hn("onChange", ["change", "click", "focusin", "focusout", "input", "keydown", "keyup", "selectionchange"]);
      }
      function f(r, s, h, g) {
        kc(g);
        var E = Jm(s, "onChange");
        if (E.length > 0) {
          var C = new sg("onChange", "change", null, h, g);
          r.push({
            event: C,
            listeners: E
          });
        }
      }
      var v = null, x = null;
      function R(r) {
        var s = r.nodeName && r.nodeName.toLowerCase();
        return s === "select" || s === "input" && r.type === "file";
      }
      function L(r) {
        var s = [];
        f(s, x, r, Ni(r)), Yf(U, s);
      }
      function U(r) {
        Zm(r, 0);
      }
      function J(r) {
        var s = $t(r);
        if (Ff(s))
          return r;
      }
      function oe(r, s) {
        if (r === "change")
          return s;
      }
      var be = !1;
      Pt && (be = yg("input") && (!document.documentMode || document.documentMode > 9));
      function Ge(r, s) {
        v = r, x = s, v.attachEvent("onpropertychange", Ve);
      }
      function Ke() {
        v && (v.detachEvent("onpropertychange", Ve), v = null, x = null);
      }
      function Ve(r) {
        r.propertyName === "value" && J(x) && L(r);
      }
      function ht(r, s, h) {
        r === "focusin" ? (Ke(), Ge(s, h)) : r === "focusout" && Ke();
      }
      function Et(r, s) {
        if (r === "selectionchange" || r === "keyup" || r === "keydown")
          return J(x);
      }
      function Rt(r) {
        var s = r.nodeName;
        return s && s.toLowerCase() === "input" && (r.type === "checkbox" || r.type === "radio");
      }
      function zr(r, s) {
        if (r === "click")
          return J(s);
      }
      function me(r, s) {
        if (r === "input" || r === "change")
          return J(s);
      }
      function fe(r) {
        var s = r._wrapperState;
        !s || !s.controlled || r.type !== "number" || Wt(r, "number", r.value);
      }
      function ve(r, s, h, g, E, C, M) {
        var I = h ? $t(h) : window, P, W;
        if (R(I) ? P = oe : Py(I) ? be ? P = me : (P = Et, W = ht) : Rt(I) && (P = zr), P) {
          var X = P(s, h);
          if (X) {
            f(r, X, g, E);
            return;
          }
        }
        W && W(s, I, h), s === "focusout" && fe(I);
      }
      function nt() {
        Je("onMouseEnter", ["mouseout", "mouseover"]), Je("onMouseLeave", ["mouseout", "mouseover"]), Je("onPointerEnter", ["pointerout", "pointerover"]), Je("onPointerLeave", ["pointerout", "pointerover"]);
      }
      function Lt(r, s, h, g, E, C, M) {
        var I = s === "mouseover" || s === "pointerover", P = s === "mouseout" || s === "pointerout";
        if (I && !hy(g)) {
          var W = g.relatedTarget || g.fromElement;
          if (W && (ot(W) || He(W)))
            return;
        }
        if (!(!P && !I)) {
          var X;
          if (E.window === E)
            X = E;
          else {
            var de = E.ownerDocument;
            de ? X = de.defaultView || de.parentWindow : X = window;
          }
          var he, we;
          if (P) {
            var Ce = g.relatedTarget || g.toElement;
            if (he = h, we = Ce ? ot(Ce) : null, we !== null) {
              var Pe = Wu(we);
              (we !== Pe || we.tag !== O && we.tag !== N) && (we = null);
            }
          } else
            he = null, we = h;
          if (he !== we) {
            var yt = og, Vt = "onMouseLeave", Nt = "onMouseEnter", Kn = "mouse";
            (s === "pointerout" || s === "pointerover") && (yt = Ly, Vt = "onPointerLeave", Nt = "onPointerEnter", Kn = "pointer");
            var Bn = he == null ? X : $t(he), ye = we == null ? X : $t(we), ke = new yt(Vt, Kn + "leave", he, g, E);
            ke.target = Bn, ke.relatedTarget = ye;
            var _e = null, et = ot(E);
            if (et === h) {
              var _t = new yt(Nt, Kn + "enter", we, g, E);
              _t.target = ye, _t.relatedTarget = Bn, _e = _t;
            }
            Ti(r, ke, _e, he, we);
          }
        }
      }
      function Ut(r, s) {
        return r === s && (r !== 0 || 1 / r === 1 / s) || r !== r && s !== s;
      }
      var St = typeof Object.is == "function" ? Object.is : Ut;
      function Gt(r, s) {
        if (St(r, s))
          return !0;
        if (typeof r != "object" || r === null || typeof s != "object" || s === null)
          return !1;
        var h = Object.keys(r), g = Object.keys(s);
        if (h.length !== g.length)
          return !1;
        for (var E = 0; E < h.length; E++) {
          var C = h[E];
          if (!Vn.call(s, C) || !St(r[C], s[C]))
            return !1;
        }
        return !0;
      }
      function na(r) {
        for (; r && r.firstChild; )
          r = r.firstChild;
        return r;
      }
      function ri(r) {
        for (; r; ) {
          if (r.nextSibling)
            return r.nextSibling;
          r = r.parentNode;
        }
      }
      function du(r, s) {
        for (var h = na(r), g = 0, E = 0; h; ) {
          if (h.nodeType === Lr) {
            if (E = g + h.textContent.length, g <= s && E >= s)
              return {
                node: h,
                offset: s - g
              };
            g = E;
          }
          h = na(ri(h));
        }
      }
      function B_(r) {
        var s = r.ownerDocument, h = s && s.defaultView || window, g = h.getSelection && h.getSelection();
        if (!g || g.rangeCount === 0)
          return null;
        var E = g.anchorNode, C = g.anchorOffset, M = g.focusNode, I = g.focusOffset;
        try {
          E.nodeType, M.nodeType;
        } catch {
          return null;
        }
        return iC(r, E, C, M, I);
      }
      function iC(r, s, h, g, E) {
        var C = 0, M = -1, I = -1, P = 0, W = 0, X = r, de = null;
        e:
          for (; ; ) {
            for (var he = null; X === s && (h === 0 || X.nodeType === Lr) && (M = C + h), X === g && (E === 0 || X.nodeType === Lr) && (I = C + E), X.nodeType === Lr && (C += X.nodeValue.length), (he = X.firstChild) !== null; )
              de = X, X = he;
            for (; ; ) {
              if (X === r)
                break e;
              if (de === s && ++P === h && (M = C), de === g && ++W === E && (I = C), (he = X.nextSibling) !== null)
                break;
              X = de, de = X.parentNode;
            }
            X = he;
          }
        return M === -1 || I === -1 ? null : {
          start: M,
          end: I
        };
      }
      function rC(r, s) {
        var h = r.ownerDocument || document, g = h && h.defaultView || window;
        if (g.getSelection) {
          var E = g.getSelection(), C = r.textContent.length, M = Math.min(s.start, C), I = s.end === void 0 ? M : Math.min(s.end, C);
          if (!E.extend && M > I) {
            var P = I;
            I = M, M = P;
          }
          var W = du(r, M), X = du(r, I);
          if (W && X) {
            if (E.rangeCount === 1 && E.anchorNode === W.node && E.anchorOffset === W.offset && E.focusNode === X.node && E.focusOffset === X.offset)
              return;
            var de = h.createRange();
            de.setStart(W.node, W.offset), E.removeAllRanges(), M > I ? (E.addRange(de), E.extend(X.node, X.offset)) : (de.setEnd(X.node, X.offset), E.addRange(de));
          }
        }
      }
      function ES(r) {
        return r && r.nodeType === Lr;
      }
      function SS(r, s) {
        return !r || !s ? !1 : r === s ? !0 : ES(r) ? !1 : ES(s) ? SS(r, s.parentNode) : "contains" in r ? r.contains(s) : r.compareDocumentPosition ? !!(r.compareDocumentPosition(s) & 16) : !1;
      }
      function aC(r) {
        return r && r.ownerDocument && SS(r.ownerDocument.documentElement, r);
      }
      function sC(r) {
        try {
          return typeof r.contentWindow.location.href == "string";
        } catch {
          return !1;
        }
      }
      function xS() {
        for (var r = window, s = ol(); s instanceof r.HTMLIFrameElement; ) {
          if (sC(s))
            r = s.contentWindow;
          else
            return s;
          s = ol(r.document);
        }
        return s;
      }
      function $o(r) {
        var s = r && r.nodeName && r.nodeName.toLowerCase();
        return s && (s === "input" && (r.type === "text" || r.type === "search" || r.type === "tel" || r.type === "url" || r.type === "password") || s === "textarea" || r.contentEditable === "true");
      }
      function oC() {
        var r = xS();
        return {
          focusedElem: r,
          selectionRange: $o(r) ? Zd(r) : null
        };
      }
      function lC(r) {
        var s = xS(), h = r.focusedElem, g = r.selectionRange;
        if (s !== h && aC(h)) {
          g !== null && $o(h) && vn(h, g);
          for (var E = [], C = h; C = C.parentNode; )
            C.nodeType === Va && E.push({
              element: C,
              left: C.scrollLeft,
              top: C.scrollTop
            });
          typeof h.focus == "function" && h.focus();
          for (var M = 0; M < E.length; M++) {
            var I = E[M];
            I.element.scrollLeft = I.left, I.element.scrollTop = I.top;
          }
        }
      }
      function Zd(r) {
        var s;
        return "selectionStart" in r ? s = {
          start: r.selectionStart,
          end: r.selectionEnd
        } : s = B_(r), s || {
          start: 0,
          end: 0
        };
      }
      function vn(r, s) {
        var h = s.start, g = s.end;
        g === void 0 && (g = h), "selectionStart" in r ? (r.selectionStart = h, r.selectionEnd = Math.min(g, r.value.length)) : rC(r, s);
      }
      var uC = Pt && "documentMode" in document && document.documentMode <= 11;
      function go() {
        hn("onSelect", ["focusout", "contextmenu", "dragend", "focusin", "keydown", "keyup", "mousedown", "mouseup", "selectionchange"]);
      }
      var ur = null, V_ = null, Sl = null, H_ = !1;
      function cC(r) {
        if ("selectionStart" in r && $o(r))
          return {
            start: r.selectionStart,
            end: r.selectionEnd
          };
        var s = r.ownerDocument && r.ownerDocument.defaultView || window, h = s.getSelection();
        return {
          anchorNode: h.anchorNode,
          anchorOffset: h.anchorOffset,
          focusNode: h.focusNode,
          focusOffset: h.focusOffset
        };
      }
      function fC(r) {
        return r.window === r ? r.document : r.nodeType === ma ? r : r.ownerDocument;
      }
      function bS(r, s, h) {
        var g = fC(h);
        if (!(H_ || ur == null || ur !== ol(g))) {
          var E = cC(ur);
          if (!Sl || !Gt(Sl, E)) {
            Sl = E;
            var C = Jm(V_, "onSelect");
            if (C.length > 0) {
              var M = new sg("onSelect", "select", null, s, h);
              r.push({
                event: M,
                listeners: C
              }), M.target = ur;
            }
          }
        }
      }
      function hC(r, s, h, g, E, C, M) {
        var I = h ? $t(h) : window;
        switch (s) {
          case "focusin":
            (Py(I) || I.contentEditable === "true") && (ur = I, V_ = h, Sl = null);
            break;
          case "focusout":
            ur = null, V_ = null, Sl = null;
            break;
          case "mousedown":
            H_ = !0;
            break;
          case "contextmenu":
          case "mouseup":
          case "dragend":
            H_ = !1, bS(r, g, E);
            break;
          case "selectionchange":
            if (uC)
              break;
          case "keydown":
          case "keyup":
            bS(r, g, E);
        }
      }
      function _g(r, s) {
        var h = {};
        return h[r.toLowerCase()] = s.toLowerCase(), h["Webkit" + r] = "webkit" + s, h["Moz" + r] = "moz" + s, h;
      }
      var Eg = {
        animationend: _g("Animation", "AnimationEnd"),
        animationiteration: _g("Animation", "AnimationIteration"),
        animationstart: _g("Animation", "AnimationStart"),
        transitionend: _g("Transition", "TransitionEnd")
      }, pu = {}, W_ = {};
      Pt && (W_ = document.createElement("div").style, "AnimationEvent" in window || (delete Eg.animationend.animation, delete Eg.animationiteration.animation, delete Eg.animationstart.animation), "TransitionEvent" in window || delete Eg.transitionend.transition);
      function Qd(r) {
        if (pu[r])
          return pu[r];
        if (!Eg[r])
          return r;
        var s = Eg[r];
        for (var h in s)
          if (s.hasOwnProperty(h) && h in W_)
            return pu[r] = s[h];
        return r;
      }
      var Mr = Qd("animationend"), $r = Qd("animationiteration"), G_ = Qd("animationstart"), wS = Qd("transitionend"), CS = /* @__PURE__ */ new Map(), TS = ["abort", "auxClick", "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"];
      function Sh(r, s) {
        CS.set(r, s), hn(s, [r]);
      }
      function dC() {
        for (var r = 0; r < TS.length; r++) {
          var s = TS[r], h = s.toLowerCase(), g = s[0].toUpperCase() + s.slice(1);
          Sh(h, "on" + g);
        }
        Sh(Mr, "onAnimationEnd"), Sh($r, "onAnimationIteration"), Sh(G_, "onAnimationStart"), Sh("dblclick", "onDoubleClick"), Sh("focusin", "onFocus"), Sh("focusout", "onBlur"), Sh(wS, "onTransitionEnd");
      }
      function pC(r, s, h, g, E, C, M) {
        var I = CS.get(s);
        if (I !== void 0) {
          var P = sg, W = s;
          switch (s) {
            case "keypress":
              if (nf(g) === 0)
                return;
            case "keydown":
            case "keyup":
              P = Oy;
              break;
            case "focusin":
              W = "focus", P = Hd;
              break;
            case "focusout":
              W = "blur", P = Hd;
              break;
            case "beforeblur":
            case "afterblur":
              P = Hd;
              break;
            case "click":
              if (g.button === 2)
                return;
            case "auxclick":
            case "dblclick":
            case "mousedown":
            case "mousemove":
            case "mouseup":
            case "mouseout":
            case "mouseover":
            case "contextmenu":
              P = og;
              break;
            case "drag":
            case "dragend":
            case "dragenter":
            case "dragexit":
            case "dragleave":
            case "dragover":
            case "dragstart":
            case "drop":
              P = wy;
              break;
            case "touchcancel":
            case "touchend":
            case "touchmove":
            case "touchstart":
              P = Wm;
              break;
            case Mr:
            case $r:
            case G_:
              P = P_;
              break;
            case wS:
              P = uc;
              break;
            case "scroll":
              P = zm;
              break;
            case "wheel":
              P = sf;
              break;
            case "copy":
            case "cut":
            case "paste":
              P = Ty;
              break;
            case "gotpointercapture":
            case "lostpointercapture":
            case "pointercancel":
            case "pointerdown":
            case "pointermove":
            case "pointerout":
            case "pointerover":
            case "pointerup":
              P = Ly;
              break;
          }
          var X = (C & Uu) !== 0;
          {
            var de = !X && // TODO: ideally, we'd eventually add all events from
            // nonDelegatedEvents list in DOMPluginEventSystem.
            // Then we can remove this special list.
            // This is a breaking change that can wait until React 18.
            s === "scroll", he = bn(h, I, g.type, X, de);
            if (he.length > 0) {
              var we = new P(I, W, null, g, E);
              r.push({
                event: we,
                listeners: he
              });
            }
          }
        }
      }
      dC(), nt(), l(), go(), dg();
      function RS(r, s, h, g, E, C, M) {
        pC(r, s, h, g, E, C);
        var I = (C & fy) === 0;
        I && (Lt(r, s, h, g, E), ve(r, s, h, g, E), hC(r, s, h, g, E), $_(r, s, h, g, E));
      }
      var of = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "encrypted", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "pause", "play", "playing", "progress", "ratechange", "resize", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"], Km = new Set(["cancel", "close", "invalid", "load", "scroll", "toggle"].concat(of));
      function MS(r, s, h) {
        var g = r.type || "unknown-event";
        r.currentTarget = h, jp(g, s, void 0, r), r.currentTarget = null;
      }
      function OS(r, s, h) {
        var g;
        if (h)
          for (var E = s.length - 1; E >= 0; E--) {
            var C = s[E], M = C.instance, I = C.currentTarget, P = C.listener;
            if (M !== g && r.isPropagationStopped())
              return;
            MS(r, P, I), g = M;
          }
        else
          for (var W = 0; W < s.length; W++) {
            var X = s[W], de = X.instance, he = X.currentTarget, we = X.listener;
            if (de !== g && r.isPropagationStopped())
              return;
            MS(r, we, he), g = de;
          }
      }
      function Zm(r, s) {
        for (var h = (s & Uu) !== 0, g = 0; g < r.length; g++) {
          var E = r[g], C = E.event, M = E.listeners;
          OS(C, M, h);
        }
        H();
      }
      function Bo(r, s, h, g, E) {
        var C = Ni(h), M = [];
        RS(M, r, g, h, C, s), Zm(M, s);
      }
      function Ci(r, s) {
        Km.has(r) || c('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.', r);
        var h = !1, g = $n(s), E = gC(r, h);
        g.has(E) || (AS(s, r, Gf, h), g.add(E));
      }
      function Y_(r, s, h) {
        Km.has(r) && !s && c('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.', r);
        var g = 0;
        s && (g |= Uu), AS(h, r, g, s);
      }
      var ky = "_reactListening" + Math.random().toString(36).slice(2);
      function Qm(r) {
        if (!r[ky]) {
          r[ky] = !0, lt.forEach(function(h) {
            h !== "selectionchange" && (Km.has(h) || Y_(h, !1, r), Y_(h, !0, r));
          });
          var s = r.nodeType === ma ? r : r.ownerDocument;
          s !== null && (s[ky] || (s[ky] = !0, Y_("selectionchange", !1, s)));
        }
      }
      function AS(r, s, h, g, E) {
        var C = ta(r, s, h), M = void 0;
        fl && (s === "touchstart" || s === "touchmove" || s === "wheel") && (M = !0), r = r, g ? M !== void 0 ? ig(r, s, C, M) : fu(r, s, C) : M !== void 0 ? Um(r, s, C, M) : vh(r, s, C);
      }
      function LS(r, s) {
        return r === s || r.nodeType === ar && r.parentNode === s;
      }
      function Fy(r, s, h, g, E) {
        var C = g;
        if (!(s & hd) && !(s & Gf)) {
          var M = E;
          if (g !== null) {
            var I = g;
            e:
              for (; ; ) {
                if (I === null)
                  return;
                var P = I.tag;
                if (P === b || P === T) {
                  var W = I.stateNode.containerInfo;
                  if (LS(W, M))
                    break;
                  if (P === T)
                    for (var X = I.return; X !== null; ) {
                      var de = X.tag;
                      if (de === b || de === T) {
                        var he = X.stateNode.containerInfo;
                        if (LS(he, M))
                          return;
                      }
                      X = X.return;
                    }
                  for (; W !== null; ) {
                    var we = ot(W);
                    if (we === null)
                      return;
                    var Ce = we.tag;
                    if (Ce === O || Ce === N) {
                      I = C = we;
                      continue e;
                    }
                    W = W.parentNode;
                  }
                }
                I = I.return;
              }
          }
        }
        Yf(function() {
          return Bo(r, s, h, C);
        });
      }
      function Vo(r, s, h) {
        return {
          instance: r,
          listener: s,
          currentTarget: h
        };
      }
      function bn(r, s, h, g, E, C) {
        for (var M = s !== null ? s + "Capture" : null, I = g ? M : s, P = [], W = r, X = null; W !== null; ) {
          var de = W, he = de.stateNode, we = de.tag;
          if (we === O && he !== null && (X = he, I !== null)) {
            var Ce = Xl(W, I);
            Ce != null && P.push(Vo(W, Ce, X));
          }
          if (E)
            break;
          W = W.return;
        }
        return P;
      }
      function Jm(r, s) {
        for (var h = s + "Capture", g = [], E = r; E !== null; ) {
          var C = E, M = C.stateNode, I = C.tag;
          if (I === O && M !== null) {
            var P = M, W = Xl(E, h);
            W != null && g.unshift(Vo(E, W, P));
            var X = Xl(E, s);
            X != null && g.push(Vo(E, X, P));
          }
          E = E.return;
        }
        return g;
      }
      function Za(r) {
        if (r === null)
          return null;
        do
          r = r.return;
        while (r && r.tag !== O);
        return r || null;
      }
      function NS(r, s) {
        for (var h = r, g = s, E = 0, C = h; C; C = Za(C))
          E++;
        for (var M = 0, I = g; I; I = Za(I))
          M++;
        for (; E - M > 0; )
          h = Za(h), E--;
        for (; M - E > 0; )
          g = Za(g), M--;
        for (var P = E; P--; ) {
          if (h === g || g !== null && h === g.alternate)
            return h;
          h = Za(h), g = Za(g);
        }
        return null;
      }
      function DS(r, s, h, g, E) {
        for (var C = s._reactName, M = [], I = h; I !== null && I !== g; ) {
          var P = I, W = P.alternate, X = P.stateNode, de = P.tag;
          if (W !== null && W === g)
            break;
          if (de === O && X !== null) {
            var he = X;
            if (E) {
              var we = Xl(I, C);
              we != null && M.unshift(Vo(I, we, he));
            } else if (!E) {
              var Ce = Xl(I, C);
              Ce != null && M.push(Vo(I, Ce, he));
            }
          }
          I = I.return;
        }
        M.length !== 0 && r.push({
          event: s,
          listeners: M
        });
      }
      function Ti(r, s, h, g, E) {
        var C = g && E ? NS(g, E) : null;
        g !== null && DS(r, s, g, C, !1), E !== null && h !== null && DS(r, h, E, C, !0);
      }
      function gC(r, s) {
        return r + "__" + (s ? "capture" : "bubble");
      }
      var zs = !1, xh = "dangerouslySetInnerHTML", jy = "suppressContentEditableWarning", bh = "suppressHydrationWarning", IS = "autoFocus", Jd = "children", ep = "style", Uy = "__html", q_, zy, ev, PS, $y, kS, FS;
      q_ = {
        // There are working polyfills for <dialog>. Let people use it.
        dialog: !0,
        // Electron ships a custom <webview> tag to display external web content in
        // an isolated frame and process.
        // This tag is not present in non Electron environments such as JSDom which
        // is often used for testing purposes.
        // @see https://electronjs.org/docs/api/webview-tag
        webview: !0
      }, zy = function(r, s) {
        Wf(r, s), ld(r, s), No(r, s, {
          registrationNameDependencies: Dt,
          possibleRegistrationNames: Ct
        });
      }, kS = Pt && !document.documentMode, ev = function(r, s, h) {
        if (!zs) {
          var g = Sg(h), E = Sg(s);
          E !== g && (zs = !0, c("Prop `%s` did not match. Server: %s Client: %s", r, JSON.stringify(E), JSON.stringify(g)));
        }
      }, PS = function(r) {
        if (!zs) {
          zs = !0;
          var s = [];
          r.forEach(function(h) {
            s.push(h);
          }), c("Extra attributes from the server: %s", s);
        }
      }, $y = function(r, s) {
        s === !1 ? c("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.", r, r, r) : c("Expected `%s` listener to be a function, instead got a value of `%s` type.", r, typeof s);
      }, FS = function(r, s) {
        var h = r.namespaceURI === ll ? r.ownerDocument.createElement(r.tagName) : r.ownerDocument.createElementNS(r.namespaceURI, r.tagName);
        return h.innerHTML = s, h.innerHTML;
      };
      var X_ = /\r\n?/g, mC = /\u0000|\uFFFD/g;
      function Sg(r) {
        Qn(r);
        var s = typeof r == "string" ? r : "" + r;
        return s.replace(X_, `
`).replace(mC, "");
      }
      function By(r, s, h, g) {
        var E = Sg(s), C = Sg(r);
        if (C !== E && (g && (zs || (zs = !0, c('Text content did not match. Server: "%s" Client: "%s"', C, E))), h && se))
          throw new Error("Text content does not match server-rendered HTML.");
      }
      function jS(r) {
        return r.nodeType === ma ? r : r.ownerDocument;
      }
      function vC() {
      }
      function ia(r) {
        r.onclick = vC;
      }
      function mo(r, s, h, g, E) {
        for (var C in g)
          if (g.hasOwnProperty(C)) {
            var M = g[C];
            if (C === ep)
              M && Object.freeze(M), Ie(s, M);
            else if (C === xh) {
              var I = M ? M[Uy] : void 0;
              I != null && iy(s, I);
            } else if (C === Jd)
              if (typeof M == "string") {
                var P = r !== "textarea" || M !== "";
                P && zf(s, M);
              } else
                typeof M == "number" && zf(s, "" + M);
            else
              C === jy || C === bh || C === IS || (Dt.hasOwnProperty(C) ? M != null && (typeof M != "function" && $y(C, M), C === "onScroll" && Ci("scroll", s)) : M != null && ir(s, C, M, E));
          }
      }
      function yC(r, s, h, g) {
        for (var E = 0; E < s.length; E += 2) {
          var C = s[E], M = s[E + 1];
          C === ep ? Ie(r, M) : C === xh ? iy(r, M) : C === Jd ? zf(r, M) : ir(r, C, M, g);
        }
      }
      function _C(r, s, h, g) {
        var E, C = jS(h), M, I = g;
        if (I === ll && (I = Dp(r)), I === ll) {
          if (E = Ic(r, s), !E && r !== r.toLowerCase() && c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", r), r === "script") {
            var P = C.createElement("div");
            P.innerHTML = "<script><\/script>";
            var W = P.firstChild;
            M = P.removeChild(W);
          } else if (typeof s.is == "string")
            M = C.createElement(r, {
              is: s.is
            });
          else if (M = C.createElement(r), r === "select") {
            var X = M;
            s.multiple ? X.multiple = !0 : s.size && (X.size = s.size);
          }
        } else
          M = C.createElementNS(I, r);
        return I === ll && !E && Object.prototype.toString.call(M) === "[object HTMLUnknownElement]" && !Vn.call(q_, r) && (q_[r] = !0, c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.", r)), M;
      }
      function EC(r, s) {
        return jS(s).createTextNode(r);
      }
      function US(r, s, h, g) {
        var E = Ic(s, h);
        zy(s, h);
        var C;
        switch (s) {
          case "dialog":
            Ci("cancel", r), Ci("close", r), C = h;
            break;
          case "iframe":
          case "object":
          case "embed":
            Ci("load", r), C = h;
            break;
          case "video":
          case "audio":
            for (var M = 0; M < of.length; M++)
              Ci(of[M], r);
            C = h;
            break;
          case "source":
            Ci("error", r), C = h;
            break;
          case "img":
          case "image":
          case "link":
            Ci("error", r), Ci("load", r), C = h;
            break;
          case "details":
            Ci("toggle", r), C = h;
            break;
          case "input":
            ne(r, h), C = F(r, h), Ci("invalid", r);
            break;
          case "option":
            vi(r, h), C = h;
            break;
          case "select":
            nd(r, h), C = Lc(r, h), Ci("invalid", r);
            break;
          case "textarea":
            rd(r, h), C = Lp(r, h), Ci("invalid", r);
            break;
          default:
            C = h;
        }
        switch (Dc(s, C), mo(s, r, g, C, E), s) {
          case "input":
            Hl(r), tt(r, h, !1);
            break;
          case "textarea":
            Hl(r), Np(r);
            break;
          case "option":
            xn(r, h);
            break;
          case "select":
            id(r, h);
            break;
          default:
            typeof C.onClick == "function" && ia(r);
            break;
        }
      }
      function SC(r, s, h, g, E) {
        zy(s, g);
        var C = null, M, I;
        switch (s) {
          case "input":
            M = F(r, h), I = F(r, g), C = [];
            break;
          case "select":
            M = Lc(r, h), I = Lc(r, g), C = [];
            break;
          case "textarea":
            M = Lp(r, h), I = Lp(r, g), C = [];
            break;
          default:
            M = h, I = g, typeof M.onClick != "function" && typeof I.onClick == "function" && ia(r);
            break;
        }
        Dc(s, I);
        var P, W, X = null;
        for (P in M)
          if (!(I.hasOwnProperty(P) || !M.hasOwnProperty(P) || M[P] == null))
            if (P === ep) {
              var de = M[P];
              for (W in de)
                de.hasOwnProperty(W) && (X || (X = {}), X[W] = "");
            } else
              P === xh || P === Jd || P === jy || P === bh || P === IS || (Dt.hasOwnProperty(P) ? C || (C = []) : (C = C || []).push(P, null));
        for (P in I) {
          var he = I[P], we = M != null ? M[P] : void 0;
          if (!(!I.hasOwnProperty(P) || he === we || he == null && we == null))
            if (P === ep)
              if (he && Object.freeze(he), we) {
                for (W in we)
                  we.hasOwnProperty(W) && (!he || !he.hasOwnProperty(W)) && (X || (X = {}), X[W] = "");
                for (W in he)
                  he.hasOwnProperty(W) && we[W] !== he[W] && (X || (X = {}), X[W] = he[W]);
              } else
                X || (C || (C = []), C.push(P, X)), X = he;
            else if (P === xh) {
              var Ce = he ? he[Uy] : void 0, Pe = we ? we[Uy] : void 0;
              Ce != null && Pe !== Ce && (C = C || []).push(P, Ce);
            } else
              P === Jd ? (typeof he == "string" || typeof he == "number") && (C = C || []).push(P, "" + he) : P === jy || P === bh || (Dt.hasOwnProperty(P) ? (he != null && (typeof he != "function" && $y(P, he), P === "onScroll" && Ci("scroll", r)), !C && we !== he && (C = [])) : (C = C || []).push(P, he));
        }
        return X && (rn(X, I[ep]), (C = C || []).push(ep, X)), C;
      }
      function xC(r, s, h, g, E) {
        h === "input" && E.type === "radio" && E.name != null && Se(r, E);
        var C = Ic(h, g), M = Ic(h, E);
        switch (yC(r, s, C, M), h) {
          case "input":
            Te(r, E);
            break;
          case "textarea":
            Nc(r, E);
            break;
          case "select":
            T_(r, E);
            break;
        }
      }
      function bC(r) {
        {
          var s = r.toLowerCase();
          return Ha.hasOwnProperty(s) && Ha[s] || null;
        }
      }
      function zS(r, s, h, g, E, C, M) {
        var I, P;
        switch (I = Ic(s, h), zy(s, h), s) {
          case "dialog":
            Ci("cancel", r), Ci("close", r);
            break;
          case "iframe":
          case "object":
          case "embed":
            Ci("load", r);
            break;
          case "video":
          case "audio":
            for (var W = 0; W < of.length; W++)
              Ci(of[W], r);
            break;
          case "source":
            Ci("error", r);
            break;
          case "img":
          case "image":
          case "link":
            Ci("error", r), Ci("load", r);
            break;
          case "details":
            Ci("toggle", r);
            break;
          case "input":
            ne(r, h), Ci("invalid", r);
            break;
          case "option":
            vi(r, h);
            break;
          case "select":
            nd(r, h), Ci("invalid", r);
            break;
          case "textarea":
            rd(r, h), Ci("invalid", r);
            break;
        }
        Dc(s, h);
        {
          P = /* @__PURE__ */ new Set();
          for (var X = r.attributes, de = 0; de < X.length; de++) {
            var he = X[de].name.toLowerCase();
            switch (he) {
              case "value":
                break;
              case "checked":
                break;
              case "selected":
                break;
              default:
                P.add(X[de].name);
            }
          }
        }
        var we = null;
        for (var Ce in h)
          if (h.hasOwnProperty(Ce)) {
            var Pe = h[Ce];
            if (Ce === Jd)
              typeof Pe == "string" ? r.textContent !== Pe && (h[bh] !== !0 && By(r.textContent, Pe, C, M), we = [Jd, Pe]) : typeof Pe == "number" && r.textContent !== "" + Pe && (h[bh] !== !0 && By(r.textContent, Pe, C, M), we = [Jd, "" + Pe]);
            else if (Dt.hasOwnProperty(Ce))
              Pe != null && (typeof Pe != "function" && $y(Ce, Pe), Ce === "onScroll" && Ci("scroll", r));
            else if (M && // Convince Flow we've calculated it (it's DEV-only in this method.)
            typeof I == "boolean") {
              var yt = void 0, Vt = I && Me ? null : Ki(Ce);
              if (h[bh] !== !0) {
                if (!(Ce === jy || Ce === bh || // Controlled attributes are not validated
                // TODO: Only ignore them on controlled tags.
                Ce === "value" || Ce === "checked" || Ce === "selected")) {
                  if (Ce === xh) {
                    var Nt = r.innerHTML, Kn = Pe ? Pe[Uy] : void 0;
                    if (Kn != null) {
                      var Bn = FS(r, Kn);
                      Bn !== Nt && ev(Ce, Nt, Bn);
                    }
                  } else if (Ce === ep) {
                    if (P.delete(Ce), kS) {
                      var ye = pe(Pe);
                      yt = r.getAttribute("style"), ye !== yt && ev(Ce, yt, ye);
                    }
                  } else if (I && !Me)
                    P.delete(Ce.toLowerCase()), yt = Ai(r, Ce, Pe), Pe !== yt && ev(Ce, yt, Pe);
                  else if (!ki(Ce, Vt, I) && !Fn(Ce, Pe, Vt, I)) {
                    var ke = !1;
                    if (Vt !== null)
                      P.delete(Vt.attributeName), yt = sa(r, Ce, Pe, Vt);
                    else {
                      var _e = g;
                      if (_e === ll && (_e = Dp(s)), _e === ll)
                        P.delete(Ce.toLowerCase());
                      else {
                        var et = bC(Ce);
                        et !== null && et !== Ce && (ke = !0, P.delete(et)), P.delete(Ce);
                      }
                      yt = Ai(r, Ce, Pe);
                    }
                    var _t = Me;
                    !_t && Pe !== yt && !ke && ev(Ce, yt, Pe);
                  }
                }
              }
            }
          }
        switch (M && // $FlowFixMe - Should be inferred as not undefined.
        P.size > 0 && h[bh] !== !0 && PS(P), s) {
          case "input":
            Hl(r), tt(r, h, !0);
            break;
          case "textarea":
            Hl(r), Np(r);
            break;
          case "select":
          case "option":
            break;
          default:
            typeof h.onClick == "function" && ia(r);
            break;
        }
        return we;
      }
      function wC(r, s, h) {
        var g = r.nodeValue !== s;
        return g;
      }
      function K_(r, s) {
        {
          if (zs)
            return;
          zs = !0, c("Did not expect server HTML to contain a <%s> in <%s>.", s.nodeName.toLowerCase(), r.nodeName.toLowerCase());
        }
      }
      function Z_(r, s) {
        {
          if (zs)
            return;
          zs = !0, c('Did not expect server HTML to contain the text node "%s" in <%s>.', s.nodeValue, r.nodeName.toLowerCase());
        }
      }
      function Vy(r, s, h) {
        {
          if (zs)
            return;
          zs = !0, c("Expected server HTML to contain a matching <%s> in <%s>.", s, r.nodeName.toLowerCase());
        }
      }
      function Hy(r, s) {
        {
          if (s === "" || zs)
            return;
          zs = !0, c('Expected server HTML to contain a matching text node for "%s" in <%s>.', s, r.nodeName.toLowerCase());
        }
      }
      function CC(r, s, h) {
        switch (s) {
          case "input":
            bt(r, h);
            return;
          case "textarea":
            ny(r, h);
            return;
          case "select":
            ey(r, h);
            return;
        }
      }
      var tv = function() {
      }, nv = function() {
      };
      {
        var TC = ["address", "applet", "area", "article", "aside", "base", "basefont", "bgsound", "blockquote", "body", "br", "button", "caption", "center", "col", "colgroup", "dd", "details", "dir", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "isindex", "li", "link", "listing", "main", "marquee", "menu", "menuitem", "meta", "nav", "noembed", "noframes", "noscript", "object", "ol", "p", "param", "plaintext", "pre", "script", "section", "select", "source", "style", "summary", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "title", "tr", "track", "ul", "wbr", "xmp"], tp = [
          "applet",
          "caption",
          "html",
          "table",
          "td",
          "th",
          "marquee",
          "object",
          "template",
          // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
          // TODO: Distinguish by namespace here -- for <title>, including it here
          // errs on the side of fewer warnings
          "foreignObject",
          "desc",
          "title"
        ], RC = tp.concat(["button"]), MC = ["dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"], $S = {
          current: null,
          formTag: null,
          aTagInScope: null,
          buttonTagInScope: null,
          nobrTagInScope: null,
          pTagInButtonScope: null,
          listItemTagAutoclosing: null,
          dlItemTagAutoclosing: null
        };
        nv = function(r, s) {
          var h = cn({}, r || $S), g = {
            tag: s
          };
          return tp.indexOf(s) !== -1 && (h.aTagInScope = null, h.buttonTagInScope = null, h.nobrTagInScope = null), RC.indexOf(s) !== -1 && (h.pTagInButtonScope = null), TC.indexOf(s) !== -1 && s !== "address" && s !== "div" && s !== "p" && (h.listItemTagAutoclosing = null, h.dlItemTagAutoclosing = null), h.current = g, s === "form" && (h.formTag = g), s === "a" && (h.aTagInScope = g), s === "button" && (h.buttonTagInScope = g), s === "nobr" && (h.nobrTagInScope = g), s === "p" && (h.pTagInButtonScope = g), s === "li" && (h.listItemTagAutoclosing = g), (s === "dd" || s === "dt") && (h.dlItemTagAutoclosing = g), h;
        };
        var OC = function(r, s) {
          switch (s) {
            case "select":
              return r === "option" || r === "optgroup" || r === "#text";
            case "optgroup":
              return r === "option" || r === "#text";
            case "option":
              return r === "#text";
            case "tr":
              return r === "th" || r === "td" || r === "style" || r === "script" || r === "template";
            case "tbody":
            case "thead":
            case "tfoot":
              return r === "tr" || r === "style" || r === "script" || r === "template";
            case "colgroup":
              return r === "col" || r === "template";
            case "table":
              return r === "caption" || r === "colgroup" || r === "tbody" || r === "tfoot" || r === "thead" || r === "style" || r === "script" || r === "template";
            case "head":
              return r === "base" || r === "basefont" || r === "bgsound" || r === "link" || r === "meta" || r === "title" || r === "noscript" || r === "noframes" || r === "style" || r === "script" || r === "template";
            case "html":
              return r === "head" || r === "body" || r === "frameset";
            case "frameset":
              return r === "frame";
            case "#document":
              return r === "html";
          }
          switch (r) {
            case "h1":
            case "h2":
            case "h3":
            case "h4":
            case "h5":
            case "h6":
              return s !== "h1" && s !== "h2" && s !== "h3" && s !== "h4" && s !== "h5" && s !== "h6";
            case "rp":
            case "rt":
              return MC.indexOf(s) === -1;
            case "body":
            case "caption":
            case "col":
            case "colgroup":
            case "frameset":
            case "frame":
            case "head":
            case "html":
            case "tbody":
            case "td":
            case "tfoot":
            case "th":
            case "thead":
            case "tr":
              return s == null;
          }
          return !0;
        }, AC = function(r, s) {
          switch (r) {
            case "address":
            case "article":
            case "aside":
            case "blockquote":
            case "center":
            case "details":
            case "dialog":
            case "dir":
            case "div":
            case "dl":
            case "fieldset":
            case "figcaption":
            case "figure":
            case "footer":
            case "header":
            case "hgroup":
            case "main":
            case "menu":
            case "nav":
            case "ol":
            case "p":
            case "section":
            case "summary":
            case "ul":
            case "pre":
            case "listing":
            case "table":
            case "hr":
            case "xmp":
            case "h1":
            case "h2":
            case "h3":
            case "h4":
            case "h5":
            case "h6":
              return s.pTagInButtonScope;
            case "form":
              return s.formTag || s.pTagInButtonScope;
            case "li":
              return s.listItemTagAutoclosing;
            case "dd":
            case "dt":
              return s.dlItemTagAutoclosing;
            case "button":
              return s.buttonTagInScope;
            case "a":
              return s.aTagInScope;
            case "nobr":
              return s.nobrTagInScope;
          }
          return null;
        }, Q_ = {};
        tv = function(r, s, h) {
          h = h || $S;
          var g = h.current, E = g && g.tag;
          s != null && (r != null && c("validateDOMNesting: when childText is passed, childTag should be null"), r = "#text");
          var C = OC(r, E) ? null : g, M = C ? null : AC(r, h), I = C || M;
          if (I) {
            var P = I.tag, W = !!C + "|" + r + "|" + P;
            if (!Q_[W]) {
              Q_[W] = !0;
              var X = r, de = "";
              if (r === "#text" ? /\S/.test(s) ? X = "Text nodes" : (X = "Whitespace text nodes", de = " Make sure you don't have any extra whitespace between tags on each line of your source code.") : X = "<" + r + ">", C) {
                var he = "";
                P === "table" && r === "tr" && (he += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s", X, P, de, he);
              } else
                c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.", X, P);
            }
          }
        };
      }
      var iv = "suppressHydrationWarning", Wy = "$", Gy = "/$", rv = "$?", av = "$!", LC = "style", J_ = null, e1 = null;
      function NC(r) {
        var s, h, g = r.nodeType;
        switch (g) {
          case ma:
          case Ip: {
            s = g === ma ? "#document" : "#fragment";
            var E = r.documentElement;
            h = E ? E.namespaceURI : gm(null, "");
            break;
          }
          default: {
            var C = g === ar ? r.parentNode : r, M = C.namespaceURI || null;
            s = C.tagName, h = gm(M, s);
            break;
          }
        }
        {
          var I = s.toLowerCase(), P = nv(null, I);
          return {
            namespace: h,
            ancestorInfo: P
          };
        }
      }
      function DC(r, s, h) {
        {
          var g = r, E = gm(g.namespace, s), C = nv(g.ancestorInfo, s);
          return {
            namespace: E,
            ancestorInfo: C
          };
        }
      }
      function pN(r) {
        return r;
      }
      function IC(r) {
        J_ = gh(), e1 = oC();
        var s = null;
        return Ss(!1), s;
      }
      function PC(r) {
        lC(e1), Ss(J_), J_ = null, e1 = null;
      }
      function kC(r, s, h, g, E) {
        var C;
        {
          var M = g;
          if (tv(r, null, M.ancestorInfo), typeof s.children == "string" || typeof s.children == "number") {
            var I = "" + s.children, P = nv(M.ancestorInfo, r);
            tv(null, I, P);
          }
          C = M.namespace;
        }
        var W = _C(r, s, h, C);
        return ge(E, W), Xt(W, s), W;
      }
      function FC(r, s) {
        r.appendChild(s);
      }
      function jC(r, s, h, g, E) {
        switch (US(r, s, h, g), s) {
          case "button":
          case "input":
          case "select":
          case "textarea":
            return !!h.autoFocus;
          case "img":
            return !0;
          default:
            return !1;
        }
      }
      function UC(r, s, h, g, E, C) {
        {
          var M = C;
          if (typeof g.children != typeof h.children && (typeof g.children == "string" || typeof g.children == "number")) {
            var I = "" + g.children, P = nv(M.ancestorInfo, s);
            tv(null, I, P);
          }
        }
        return SC(r, s, h, g);
      }
      function t1(r, s) {
        return r === "textarea" || r === "noscript" || typeof s.children == "string" || typeof s.children == "number" || typeof s.dangerouslySetInnerHTML == "object" && s.dangerouslySetInnerHTML !== null && s.dangerouslySetInnerHTML.__html != null;
      }
      function zC(r, s, h, g) {
        {
          var E = h;
          tv(null, r, E.ancestorInfo);
        }
        var C = EC(r, s);
        return ge(g, C), C;
      }
      function $C() {
        var r = window.event;
        return r === void 0 ? vl : Bd(r.type);
      }
      var n1 = typeof setTimeout == "function" ? setTimeout : void 0, BC = typeof clearTimeout == "function" ? clearTimeout : void 0, i1 = -1, BS = typeof Promise == "function" ? Promise : void 0, VC = typeof queueMicrotask == "function" ? queueMicrotask : typeof BS < "u" ? function(r) {
        return BS.resolve(null).then(r).catch(HC);
      } : n1;
      function HC(r) {
        setTimeout(function() {
          throw r;
        });
      }
      function r1(r, s, h, g) {
        switch (s) {
          case "button":
          case "input":
          case "select":
          case "textarea":
            h.autoFocus && r.focus();
            return;
          case "img": {
            h.src && (r.src = h.src);
            return;
          }
        }
      }
      function VS(r, s, h, g, E, C) {
        xC(r, s, h, g, E), Xt(r, E);
      }
      function a1(r) {
        zf(r, "");
      }
      function WC(r, s, h) {
        r.nodeValue = h;
      }
      function GC(r, s) {
        r.appendChild(s);
      }
      function YC(r, s) {
        var h;
        r.nodeType === ar ? (h = r.parentNode, h.insertBefore(s, r)) : (h = r, h.appendChild(s));
        var g = r._reactRootContainer;
        g == null && h.onclick === null && ia(h);
      }
      function s1(r, s, h) {
        r.insertBefore(s, h);
      }
      function qC(r, s, h) {
        r.nodeType === ar ? r.parentNode.insertBefore(s, h) : r.insertBefore(s, h);
      }
      function XC(r, s) {
        r.removeChild(s);
      }
      function KC(r, s) {
        r.nodeType === ar ? r.parentNode.removeChild(s) : r.removeChild(s);
      }
      function xs(r, s) {
        var h = s, g = 0;
        do {
          var E = h.nextSibling;
          if (r.removeChild(h), E && E.nodeType === ar) {
            var C = E.data;
            if (C === Gy)
              if (g === 0) {
                r.removeChild(E), Tr(s);
                return;
              } else
                g--;
            else
              (C === Wy || C === rv || C === av) && g++;
          }
          h = E;
        } while (h);
        Tr(s);
      }
      function o1(r, s) {
        r.nodeType === ar ? xs(r.parentNode, s) : r.nodeType === Va && xs(r, s), Tr(r);
      }
      function ZC(r) {
        r = r;
        var s = r.style;
        typeof s.setProperty == "function" ? s.setProperty("display", "none", "important") : s.display = "none";
      }
      function QC(r) {
        r.nodeValue = "";
      }
      function JC(r, s) {
        r = r;
        var h = s[LC], g = h != null && h.hasOwnProperty("display") ? h.display : null;
        r.style.display = Pu("display", g);
      }
      function eT(r, s) {
        r.nodeValue = s;
      }
      function l1(r) {
        r.nodeType === Va ? r.textContent = "" : r.nodeType === ma && r.documentElement && r.removeChild(r.documentElement);
      }
      function tT(r, s, h) {
        return r.nodeType !== Va || s.toLowerCase() !== r.nodeName.toLowerCase() ? null : r;
      }
      function u1(r, s) {
        return s === "" || r.nodeType !== Lr ? null : r;
      }
      function nT(r) {
        return r.nodeType !== ar ? null : r;
      }
      function HS(r) {
        return r.data === rv;
      }
      function c1(r) {
        return r.data === av;
      }
      function iT(r) {
        var s = r.nextSibling && r.nextSibling.dataset, h, g, E;
        return s && (h = s.dgst, g = s.msg, E = s.stck), {
          message: g,
          digest: h,
          stack: E
        };
      }
      function WS(r, s) {
        r._reactRetry = s;
      }
      function Yy(r) {
        for (; r != null; r = r.nextSibling) {
          var s = r.nodeType;
          if (s === Va || s === Lr)
            break;
          if (s === ar) {
            var h = r.data;
            if (h === Wy || h === av || h === rv)
              break;
            if (h === Gy)
              return null;
          }
        }
        return r;
      }
      function sv(r) {
        return Yy(r.nextSibling);
      }
      function rT(r) {
        return Yy(r.firstChild);
      }
      function f1(r) {
        return Yy(r.firstChild);
      }
      function h1(r) {
        return Yy(r.nextSibling);
      }
      function aT(r, s, h, g, E, C, M) {
        ge(C, r), Xt(r, h);
        var I;
        {
          var P = E;
          I = P.namespace;
        }
        var W = (C.mode & Ot) !== Ft;
        return zS(r, s, h, I, g, W, M);
      }
      function sT(r, s, h, g) {
        return ge(h, r), h.mode & Ot, wC(r, s);
      }
      function oT(r, s) {
        ge(s, r);
      }
      function lT(r) {
        for (var s = r.nextSibling, h = 0; s; ) {
          if (s.nodeType === ar) {
            var g = s.data;
            if (g === Gy) {
              if (h === 0)
                return sv(s);
              h--;
            } else
              (g === Wy || g === av || g === rv) && h++;
          }
          s = s.nextSibling;
        }
        return null;
      }
      function GS(r) {
        for (var s = r.previousSibling, h = 0; s; ) {
          if (s.nodeType === ar) {
            var g = s.data;
            if (g === Wy || g === av || g === rv) {
              if (h === 0)
                return s;
              h--;
            } else
              g === Gy && h++;
          }
          s = s.previousSibling;
        }
        return null;
      }
      function uT(r) {
        Tr(r);
      }
      function cT(r) {
        Tr(r);
      }
      function fT(r) {
        return r !== "head" && r !== "body";
      }
      function hT(r, s, h, g) {
        var E = !0;
        By(s.nodeValue, h, g, E);
      }
      function dT(r, s, h, g, E, C) {
        if (s[iv] !== !0) {
          var M = !0;
          By(g.nodeValue, E, C, M);
        }
      }
      function pT(r, s) {
        s.nodeType === Va ? K_(r, s) : s.nodeType === ar || Z_(r, s);
      }
      function gT(r, s) {
        {
          var h = r.parentNode;
          h !== null && (s.nodeType === Va ? K_(h, s) : s.nodeType === ar || Z_(h, s));
        }
      }
      function mT(r, s, h, g, E) {
        (E || s[iv] !== !0) && (g.nodeType === Va ? K_(h, g) : g.nodeType === ar || Z_(h, g));
      }
      function vT(r, s, h) {
        Vy(r, s);
      }
      function yT(r, s) {
        Hy(r, s);
      }
      function _T(r, s, h) {
        {
          var g = r.parentNode;
          g !== null && Vy(g, s);
        }
      }
      function ET(r, s) {
        {
          var h = r.parentNode;
          h !== null && Hy(h, s);
        }
      }
      function ST(r, s, h, g, E, C) {
        (C || s[iv] !== !0) && Vy(h, g);
      }
      function xT(r, s, h, g, E) {
        (E || s[iv] !== !0) && Hy(h, g);
      }
      function bT(r) {
        c("An error occurred during hydration. The server HTML was replaced with client content in <%s>.", r.nodeName.toLowerCase());
      }
      function wT(r) {
        Qm(r);
      }
      var d = Math.random().toString(36).slice(2), m = "__reactFiber$" + d, w = "__reactProps$" + d, A = "__reactContainer$" + d, j = "__reactEvents$" + d, Y = "__reactListeners$" + d, te = "__reactHandles$" + d;
      function ce(r) {
        delete r[m], delete r[w], delete r[j], delete r[Y], delete r[te];
      }
      function ge(r, s) {
        s[m] = r;
      }
      function Ue(r, s) {
        s[A] = r;
      }
      function Be(r) {
        r[A] = null;
      }
      function He(r) {
        return !!r[A];
      }
      function ot(r) {
        var s = r[m];
        if (s)
          return s;
        for (var h = r.parentNode; h; ) {
          if (s = h[A] || h[m], s) {
            var g = s.alternate;
            if (s.child !== null || g !== null && g.child !== null)
              for (var E = GS(r); E !== null; ) {
                var C = E[m];
                if (C)
                  return C;
                E = GS(E);
              }
            return s;
          }
          r = h, h = r.parentNode;
        }
        return null;
      }
      function xt(r) {
        var s = r[m] || r[A];
        return s && (s.tag === O || s.tag === N || s.tag === G || s.tag === b) ? s : null;
      }
      function $t(r) {
        if (r.tag === O || r.tag === N)
          return r.stateNode;
        throw new Error("getNodeFromInstance: Invalid argument.");
      }
      function yn(r) {
        return r[w] || null;
      }
      function Xt(r, s) {
        r[w] = s;
      }
      function $n(r) {
        var s = r[j];
        return s === void 0 && (s = r[j] = /* @__PURE__ */ new Set()), s;
      }
      var Gn = {}, vo = i.ReactDebugCurrentFrame;
      function Fa(r) {
        if (r) {
          var s = r._owner, h = Rn(r.type, r._source, s ? s.type : null);
          vo.setExtraStackFrame(h);
        } else
          vo.setExtraStackFrame(null);
      }
      function Br(r, s, h, g, E) {
        {
          var C = Function.call.bind(Vn);
          for (var M in r)
            if (C(r, M)) {
              var I = void 0;
              try {
                if (typeof r[M] != "function") {
                  var P = Error((g || "React class") + ": " + h + " type `" + M + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[M] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                  throw P.name = "Invariant Violation", P;
                }
                I = r[M](s, M, g, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
              } catch (W) {
                I = W;
              }
              I && !(I instanceof Error) && (Fa(E), c("%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).", g || "React class", h, M, typeof I), Fa(null)), I instanceof Error && !(I.message in Gn) && (Gn[I.message] = !0, Fa(E), c("Failed %s type: %s", h, I.message), Fa(null));
            }
        }
      }
      var Vr = [], yo;
      yo = [];
      var Qa = -1;
      function lf(r) {
        return {
          current: r
        };
      }
      function _o(r, s) {
        if (Qa < 0) {
          c("Unexpected pop.");
          return;
        }
        s !== yo[Qa] && c("Unexpected Fiber popped."), r.current = Vr[Qa], Vr[Qa] = null, yo[Qa] = null, Qa--;
      }
      function Eo(r, s, h) {
        Qa++, Vr[Qa] = r.current, yo[Qa] = h, r.current = s;
      }
      var CT;
      CT = {};
      var gu = {};
      Object.freeze(gu);
      var np = lf(gu), wh = lf(!1), TT = gu;
      function qy(r, s, h) {
        return h && Ch(s) ? TT : np.current;
      }
      function gN(r, s, h) {
        {
          var g = r.stateNode;
          g.__reactInternalMemoizedUnmaskedChildContext = s, g.__reactInternalMemoizedMaskedChildContext = h;
        }
      }
      function Xy(r, s) {
        {
          var h = r.type, g = h.contextTypes;
          if (!g)
            return gu;
          var E = r.stateNode;
          if (E && E.__reactInternalMemoizedUnmaskedChildContext === s)
            return E.__reactInternalMemoizedMaskedChildContext;
          var C = {};
          for (var M in g)
            C[M] = s[M];
          {
            var I = Qt(r) || "Unknown";
            Br(g, C, "context", I);
          }
          return E && gN(r, s, C), C;
        }
      }
      function YS() {
        return wh.current;
      }
      function Ch(r) {
        {
          var s = r.childContextTypes;
          return s != null;
        }
      }
      function qS(r) {
        _o(wh, r), _o(np, r);
      }
      function RT(r) {
        _o(wh, r), _o(np, r);
      }
      function mN(r, s, h) {
        {
          if (np.current !== gu)
            throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");
          Eo(np, s, r), Eo(wh, h, r);
        }
      }
      function vN(r, s, h) {
        {
          var g = r.stateNode, E = s.childContextTypes;
          if (typeof g.getChildContext != "function") {
            {
              var C = Qt(r) || "Unknown";
              CT[C] || (CT[C] = !0, c("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.", C, C));
            }
            return h;
          }
          var M = g.getChildContext();
          for (var I in M)
            if (!(I in E))
              throw new Error((Qt(r) || "Unknown") + '.getChildContext(): key "' + I + '" is not defined in childContextTypes.');
          {
            var P = Qt(r) || "Unknown";
            Br(E, M, "child context", P);
          }
          return cn({}, h, M);
        }
      }
      function XS(r) {
        {
          var s = r.stateNode, h = s && s.__reactInternalMemoizedMergedChildContext || gu;
          return TT = np.current, Eo(np, h, r), Eo(wh, wh.current, r), !0;
        }
      }
      function yN(r, s, h) {
        {
          var g = r.stateNode;
          if (!g)
            throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");
          if (h) {
            var E = vN(r, s, TT);
            g.__reactInternalMemoizedMergedChildContext = E, _o(wh, r), _o(np, r), Eo(np, E, r), Eo(wh, h, r);
          } else
            _o(wh, r), Eo(wh, h, r);
        }
      }
      function hz(r) {
        {
          if (!Oa(r) || r.tag !== _)
            throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");
          var s = r;
          do {
            switch (s.tag) {
              case b:
                return s.stateNode.context;
              case _: {
                var h = s.type;
                if (Ch(h))
                  return s.stateNode.__reactInternalMemoizedMergedChildContext;
                break;
              }
            }
            s = s.return;
          } while (s !== null);
          throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.");
        }
      }
      var xg = 0, KS = 1, ip = null, MT = !1, OT = !1;
      function _N(r) {
        ip === null ? ip = [r] : ip.push(r);
      }
      function dz(r) {
        MT = !0, _N(r);
      }
      function EN() {
        MT && bg();
      }
      function bg() {
        if (!OT && ip !== null) {
          OT = !0;
          var r = 0, s = uo();
          try {
            var h = !0, g = ip;
            for (gr(Cr); r < g.length; r++) {
              var E = g[r];
              do
                E = E(h);
              while (E !== null);
            }
            ip = null, MT = !1;
          } catch (C) {
            throw ip !== null && (ip = ip.slice(r + 1)), wm(vs, bg), C;
          } finally {
            gr(s), OT = !1;
          }
        }
        return null;
      }
      var Ky = [], Zy = 0, ZS = null, QS = 0, fc = [], hc = 0, ov = null, rp = 1, ap = "";
      function pz(r) {
        return uv(), (r.flags & Hu) !== kt;
      }
      function gz(r) {
        return uv(), QS;
      }
      function mz() {
        var r = ap, s = rp, h = s & ~vz(s);
        return h.toString(32) + r;
      }
      function lv(r, s) {
        uv(), Ky[Zy++] = QS, Ky[Zy++] = ZS, ZS = r, QS = s;
      }
      function SN(r, s, h) {
        uv(), fc[hc++] = rp, fc[hc++] = ap, fc[hc++] = ov, ov = r;
        var g = rp, E = ap, C = JS(g) - 1, M = g & ~(1 << C), I = h + 1, P = JS(s) + C;
        if (P > 30) {
          var W = C - C % 5, X = (1 << W) - 1, de = (M & X).toString(32), he = M >> W, we = C - W, Ce = JS(s) + we, Pe = I << we, yt = Pe | he, Vt = de + E;
          rp = 1 << Ce | yt, ap = Vt;
        } else {
          var Nt = I << C, Kn = Nt | M, Bn = E;
          rp = 1 << P | Kn, ap = Bn;
        }
      }
      function AT(r) {
        uv();
        var s = r.return;
        if (s !== null) {
          var h = 1, g = 0;
          lv(r, h), SN(r, h, g);
        }
      }
      function JS(r) {
        return 32 - Vc(r);
      }
      function vz(r) {
        return 1 << JS(r) - 1;
      }
      function LT(r) {
        for (; r === ZS; )
          ZS = Ky[--Zy], Ky[Zy] = null, QS = Ky[--Zy], Ky[Zy] = null;
        for (; r === ov; )
          ov = fc[--hc], fc[hc] = null, ap = fc[--hc], fc[hc] = null, rp = fc[--hc], fc[hc] = null;
      }
      function yz() {
        return uv(), ov !== null ? {
          id: rp,
          overflow: ap
        } : null;
      }
      function _z(r, s) {
        uv(), fc[hc++] = rp, fc[hc++] = ap, fc[hc++] = ov, rp = s.id, ap = s.overflow, ov = r;
      }
      function uv() {
        Bs() || c("Expected to be hydrating. This is a bug in React. Please file an issue.");
      }
      var $s = null, dc = null, uf = !1, cv = !1, wg = null;
      function Ez() {
        uf && c("We should not be hydrating here. This is a bug in React. Please file a bug.");
      }
      function xN() {
        cv = !0;
      }
      function Sz() {
        return cv;
      }
      function xz(r) {
        var s = r.stateNode.containerInfo;
        return dc = f1(s), $s = r, uf = !0, wg = null, cv = !1, !0;
      }
      function bz(r, s, h) {
        return dc = h1(s), $s = r, uf = !0, wg = null, cv = !1, h !== null && _z(r, h), !0;
      }
      function bN(r, s) {
        switch (r.tag) {
          case b: {
            pT(r.stateNode.containerInfo, s);
            break;
          }
          case O: {
            var h = (r.mode & Ot) !== Ft;
            mT(
              r.type,
              r.memoizedProps,
              r.stateNode,
              s,
              // TODO: Delete this argument when we remove the legacy root API.
              h
            );
            break;
          }
          case G: {
            var g = r.memoizedState;
            g.dehydrated !== null && gT(g.dehydrated, s);
            break;
          }
        }
      }
      function wN(r, s) {
        bN(r, s);
        var h = T$();
        h.stateNode = s, h.return = r;
        var g = r.deletions;
        g === null ? (r.deletions = [h], r.flags |= ii) : g.push(h);
      }
      function NT(r, s) {
        {
          if (cv)
            return;
          switch (r.tag) {
            case b: {
              var h = r.stateNode.containerInfo;
              switch (s.tag) {
                case O:
                  var g = s.type;
                  s.pendingProps, vT(h, g);
                  break;
                case N:
                  var E = s.pendingProps;
                  yT(h, E);
                  break;
              }
              break;
            }
            case O: {
              var C = r.type, M = r.memoizedProps, I = r.stateNode;
              switch (s.tag) {
                case O: {
                  var P = s.type, W = s.pendingProps, X = (r.mode & Ot) !== Ft;
                  ST(
                    C,
                    M,
                    I,
                    P,
                    W,
                    // TODO: Delete this argument when we remove the legacy root API.
                    X
                  );
                  break;
                }
                case N: {
                  var de = s.pendingProps, he = (r.mode & Ot) !== Ft;
                  xT(
                    C,
                    M,
                    I,
                    de,
                    // TODO: Delete this argument when we remove the legacy root API.
                    he
                  );
                  break;
                }
              }
              break;
            }
            case G: {
              var we = r.memoizedState, Ce = we.dehydrated;
              if (Ce !== null)
                switch (s.tag) {
                  case O:
                    var Pe = s.type;
                    s.pendingProps, _T(Ce, Pe);
                    break;
                  case N:
                    var yt = s.pendingProps;
                    ET(Ce, yt);
                    break;
                }
              break;
            }
            default:
              return;
          }
        }
      }
      function CN(r, s) {
        s.flags = s.flags & ~hl | qn, NT(r, s);
      }
      function TN(r, s) {
        switch (r.tag) {
          case O: {
            var h = r.type;
            r.pendingProps;
            var g = tT(s, h);
            return g !== null ? (r.stateNode = g, $s = r, dc = rT(g), !0) : !1;
          }
          case N: {
            var E = r.pendingProps, C = u1(s, E);
            return C !== null ? (r.stateNode = C, $s = r, dc = null, !0) : !1;
          }
          case G: {
            var M = nT(s);
            if (M !== null) {
              var I = {
                dehydrated: M,
                treeContext: yz(),
                retryLane: Fs
              };
              r.memoizedState = I;
              var P = R$(M);
              return P.return = r, r.child = P, $s = r, dc = null, !0;
            }
            return !1;
          }
          default:
            return !1;
        }
      }
      function DT(r) {
        return (r.mode & Ot) !== Ft && (r.flags & tn) === kt;
      }
      function IT(r) {
        throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.");
      }
      function PT(r) {
        if (uf) {
          var s = dc;
          if (!s) {
            DT(r) && (NT($s, r), IT()), CN($s, r), uf = !1, $s = r;
            return;
          }
          var h = s;
          if (!TN(r, s)) {
            DT(r) && (NT($s, r), IT()), s = sv(h);
            var g = $s;
            if (!s || !TN(r, s)) {
              CN($s, r), uf = !1, $s = r;
              return;
            }
            wN(g, h);
          }
        }
      }
      function wz(r, s, h) {
        var g = r.stateNode, E = !cv, C = aT(g, r.type, r.memoizedProps, s, h, r, E);
        return r.updateQueue = C, C !== null;
      }
      function Cz(r) {
        var s = r.stateNode, h = r.memoizedProps, g = sT(s, h, r);
        if (g) {
          var E = $s;
          if (E !== null)
            switch (E.tag) {
              case b: {
                var C = E.stateNode.containerInfo, M = (E.mode & Ot) !== Ft;
                hT(
                  C,
                  s,
                  h,
                  // TODO: Delete this argument when we remove the legacy root API.
                  M
                );
                break;
              }
              case O: {
                var I = E.type, P = E.memoizedProps, W = E.stateNode, X = (E.mode & Ot) !== Ft;
                dT(
                  I,
                  P,
                  W,
                  s,
                  h,
                  // TODO: Delete this argument when we remove the legacy root API.
                  X
                );
                break;
              }
            }
        }
        return g;
      }
      function Tz(r) {
        var s = r.memoizedState, h = s !== null ? s.dehydrated : null;
        if (!h)
          throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
        oT(h, r);
      }
      function Rz(r) {
        var s = r.memoizedState, h = s !== null ? s.dehydrated : null;
        if (!h)
          throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
        return lT(h);
      }
      function RN(r) {
        for (var s = r.return; s !== null && s.tag !== O && s.tag !== b && s.tag !== G; )
          s = s.return;
        $s = s;
      }
      function ex(r) {
        if (r !== $s)
          return !1;
        if (!uf)
          return RN(r), uf = !0, !1;
        if (r.tag !== b && (r.tag !== O || fT(r.type) && !t1(r.type, r.memoizedProps))) {
          var s = dc;
          if (s)
            if (DT(r))
              MN(r), IT();
            else
              for (; s; )
                wN(r, s), s = sv(s);
        }
        return RN(r), r.tag === G ? dc = Rz(r) : dc = $s ? sv(r.stateNode) : null, !0;
      }
      function Mz() {
        return uf && dc !== null;
      }
      function MN(r) {
        for (var s = dc; s; )
          bN(r, s), s = sv(s);
      }
      function Qy() {
        $s = null, dc = null, uf = !1, cv = !1;
      }
      function ON() {
        wg !== null && (bI(wg), wg = null);
      }
      function Bs() {
        return uf;
      }
      function kT(r) {
        wg === null ? wg = [r] : wg.push(r);
      }
      var Oz = i.ReactCurrentBatchConfig, Az = null;
      function Lz() {
        return Oz.transition;
      }
      var cf = {
        recordUnsafeLifecycleWarnings: function(r, s) {
        },
        flushPendingUnsafeLifecycleWarnings: function() {
        },
        recordLegacyContextWarning: function(r, s) {
        },
        flushLegacyContextWarning: function() {
        },
        discardPendingWarnings: function() {
        }
      };
      {
        var Nz = function(r) {
          for (var s = null, h = r; h !== null; )
            h.mode & sr && (s = h), h = h.return;
          return s;
        }, fv = function(r) {
          var s = [];
          return r.forEach(function(h) {
            s.push(h);
          }), s.sort().join(", ");
        }, d1 = [], p1 = [], g1 = [], m1 = [], v1 = [], y1 = [], hv = /* @__PURE__ */ new Set();
        cf.recordUnsafeLifecycleWarnings = function(r, s) {
          hv.has(r.type) || (typeof s.componentWillMount == "function" && // Don't warn about react-lifecycles-compat polyfilled components.
          s.componentWillMount.__suppressDeprecationWarning !== !0 && d1.push(r), r.mode & sr && typeof s.UNSAFE_componentWillMount == "function" && p1.push(r), typeof s.componentWillReceiveProps == "function" && s.componentWillReceiveProps.__suppressDeprecationWarning !== !0 && g1.push(r), r.mode & sr && typeof s.UNSAFE_componentWillReceiveProps == "function" && m1.push(r), typeof s.componentWillUpdate == "function" && s.componentWillUpdate.__suppressDeprecationWarning !== !0 && v1.push(r), r.mode & sr && typeof s.UNSAFE_componentWillUpdate == "function" && y1.push(r));
        }, cf.flushPendingUnsafeLifecycleWarnings = function() {
          var r = /* @__PURE__ */ new Set();
          d1.length > 0 && (d1.forEach(function(he) {
            r.add(Qt(he) || "Component"), hv.add(he.type);
          }), d1 = []);
          var s = /* @__PURE__ */ new Set();
          p1.length > 0 && (p1.forEach(function(he) {
            s.add(Qt(he) || "Component"), hv.add(he.type);
          }), p1 = []);
          var h = /* @__PURE__ */ new Set();
          g1.length > 0 && (g1.forEach(function(he) {
            h.add(Qt(he) || "Component"), hv.add(he.type);
          }), g1 = []);
          var g = /* @__PURE__ */ new Set();
          m1.length > 0 && (m1.forEach(function(he) {
            g.add(Qt(he) || "Component"), hv.add(he.type);
          }), m1 = []);
          var E = /* @__PURE__ */ new Set();
          v1.length > 0 && (v1.forEach(function(he) {
            E.add(Qt(he) || "Component"), hv.add(he.type);
          }), v1 = []);
          var C = /* @__PURE__ */ new Set();
          if (y1.length > 0 && (y1.forEach(function(he) {
            C.add(Qt(he) || "Component"), hv.add(he.type);
          }), y1 = []), s.size > 0) {
            var M = fv(s);
            c(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: %s`, M);
          }
          if (g.size > 0) {
            var I = fv(g);
            c(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state

Please update the following components: %s`, I);
          }
          if (C.size > 0) {
            var P = fv(C);
            c(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.

Please update the following components: %s`, P);
          }
          if (r.size > 0) {
            var W = fv(r);
            u(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`, W);
          }
          if (h.size > 0) {
            var X = fv(h);
            u(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`, X);
          }
          if (E.size > 0) {
            var de = fv(E);
            u(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`, de);
          }
        };
        var tx = /* @__PURE__ */ new Map(), AN = /* @__PURE__ */ new Set();
        cf.recordLegacyContextWarning = function(r, s) {
          var h = Nz(r);
          if (h === null) {
            c("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");
            return;
          }
          if (!AN.has(r.type)) {
            var g = tx.get(h);
            (r.type.contextTypes != null || r.type.childContextTypes != null || s !== null && typeof s.getChildContext == "function") && (g === void 0 && (g = [], tx.set(h, g)), g.push(r));
          }
        }, cf.flushLegacyContextWarning = function() {
          tx.forEach(function(r, s) {
            if (r.length !== 0) {
              var h = r[0], g = /* @__PURE__ */ new Set();
              r.forEach(function(C) {
                g.add(Qt(C) || "Component"), AN.add(C.type);
              });
              var E = fv(g);
              try {
                fr(h), c(`Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: %s

Learn more about this warning here: https://reactjs.org/link/legacy-context`, E);
              } finally {
                Zi();
              }
            }
          });
        }, cf.discardPendingWarnings = function() {
          d1 = [], p1 = [], g1 = [], m1 = [], v1 = [], y1 = [], tx = /* @__PURE__ */ new Map();
        };
      }
      function ff(r, s) {
        if (r && r.defaultProps) {
          var h = cn({}, s), g = r.defaultProps;
          for (var E in g)
            h[E] === void 0 && (h[E] = g[E]);
          return h;
        }
        return s;
      }
      var FT = lf(null), jT;
      jT = {};
      var nx = null, Jy = null, UT = null, ix = !1;
      function rx() {
        nx = null, Jy = null, UT = null, ix = !1;
      }
      function LN() {
        ix = !0;
      }
      function NN() {
        ix = !1;
      }
      function DN(r, s, h) {
        Eo(FT, s._currentValue, r), s._currentValue = h, s._currentRenderer !== void 0 && s._currentRenderer !== null && s._currentRenderer !== jT && c("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."), s._currentRenderer = jT;
      }
      function zT(r, s) {
        var h = FT.current;
        _o(FT, s), r._currentValue = h;
      }
      function $T(r, s, h) {
        for (var g = r; g !== null; ) {
          var E = g.alternate;
          if (qc(g.childLanes, s) ? E !== null && !qc(E.childLanes, s) && (E.childLanes = an(E.childLanes, s)) : (g.childLanes = an(g.childLanes, s), E !== null && (E.childLanes = an(E.childLanes, s))), g === h)
            break;
          g = g.return;
        }
        g !== h && c("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.");
      }
      function Dz(r, s, h) {
        Iz(r, s, h);
      }
      function Iz(r, s, h) {
        var g = r.child;
        for (g !== null && (g.return = r); g !== null; ) {
          var E = void 0, C = g.dependencies;
          if (C !== null) {
            E = g.child;
            for (var M = C.firstContext; M !== null; ) {
              if (M.context === s) {
                if (g.tag === _) {
                  var I = Yc(h), P = sp(oi, I);
                  P.tag = sx;
                  var W = g.updateQueue;
                  if (W !== null) {
                    var X = W.shared, de = X.pending;
                    de === null ? P.next = P : (P.next = de.next, de.next = P), X.pending = P;
                  }
                }
                g.lanes = an(g.lanes, h);
                var he = g.alternate;
                he !== null && (he.lanes = an(he.lanes, h)), $T(g.return, h, r), C.lanes = an(C.lanes, h);
                break;
              }
              M = M.next;
            }
          } else if (g.tag === B)
            E = g.type === r.type ? null : g.child;
          else if (g.tag === $e) {
            var we = g.return;
            if (we === null)
              throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");
            we.lanes = an(we.lanes, h);
            var Ce = we.alternate;
            Ce !== null && (Ce.lanes = an(Ce.lanes, h)), $T(we, h, r), E = g.sibling;
          } else
            E = g.child;
          if (E !== null)
            E.return = g;
          else
            for (E = g; E !== null; ) {
              if (E === r) {
                E = null;
                break;
              }
              var Pe = E.sibling;
              if (Pe !== null) {
                Pe.return = E.return, E = Pe;
                break;
              }
              E = E.return;
            }
          g = E;
        }
      }
      function e0(r, s) {
        nx = r, Jy = null, UT = null;
        var h = r.dependencies;
        if (h !== null) {
          var g = h.firstContext;
          g !== null && (Ka(h.lanes, s) && N1(), h.firstContext = null);
        }
      }
      function ja(r) {
        ix && c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
        var s = r._currentValue;
        if (UT !== r) {
          var h = {
            context: r,
            memoizedValue: s,
            next: null
          };
          if (Jy === null) {
            if (nx === null)
              throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
            Jy = h, nx.dependencies = {
              lanes: je,
              firstContext: h
            };
          } else
            Jy = Jy.next = h;
        }
        return s;
      }
      var dv = null;
      function BT(r) {
        dv === null ? dv = [r] : dv.push(r);
      }
      function Pz() {
        if (dv !== null) {
          for (var r = 0; r < dv.length; r++) {
            var s = dv[r], h = s.interleaved;
            if (h !== null) {
              s.interleaved = null;
              var g = h.next, E = s.pending;
              if (E !== null) {
                var C = E.next;
                E.next = g, h.next = C;
              }
              s.pending = h;
            }
          }
          dv = null;
        }
      }
      function IN(r, s, h, g) {
        var E = s.interleaved;
        return E === null ? (h.next = h, BT(s)) : (h.next = E.next, E.next = h), s.interleaved = h, ax(r, g);
      }
      function kz(r, s, h, g) {
        var E = s.interleaved;
        E === null ? (h.next = h, BT(s)) : (h.next = E.next, E.next = h), s.interleaved = h;
      }
      function Fz(r, s, h, g) {
        var E = s.interleaved;
        return E === null ? (h.next = h, BT(s)) : (h.next = E.next, E.next = h), s.interleaved = h, ax(r, g);
      }
      function xl(r, s) {
        return ax(r, s);
      }
      var jz = ax;
      function ax(r, s) {
        r.lanes = an(r.lanes, s);
        var h = r.alternate;
        h !== null && (h.lanes = an(h.lanes, s)), h === null && (r.flags & (qn | hl)) !== kt && PI(r);
        for (var g = r, E = r.return; E !== null; )
          E.childLanes = an(E.childLanes, s), h = E.alternate, h !== null ? h.childLanes = an(h.childLanes, s) : (E.flags & (qn | hl)) !== kt && PI(r), g = E, E = E.return;
        if (g.tag === b) {
          var C = g.stateNode;
          return C;
        } else
          return null;
      }
      var PN = 0, kN = 1, sx = 2, VT = 3, ox = !1, HT, lx;
      HT = !1, lx = null;
      function WT(r) {
        var s = {
          baseState: r.memoizedState,
          firstBaseUpdate: null,
          lastBaseUpdate: null,
          shared: {
            pending: null,
            interleaved: null,
            lanes: je
          },
          effects: null
        };
        r.updateQueue = s;
      }
      function FN(r, s) {
        var h = s.updateQueue, g = r.updateQueue;
        if (h === g) {
          var E = {
            baseState: g.baseState,
            firstBaseUpdate: g.firstBaseUpdate,
            lastBaseUpdate: g.lastBaseUpdate,
            shared: g.shared,
            effects: g.effects
          };
          s.updateQueue = E;
        }
      }
      function sp(r, s) {
        var h = {
          eventTime: r,
          lane: s,
          tag: PN,
          payload: null,
          callback: null,
          next: null
        };
        return h;
      }
      function Cg(r, s, h) {
        var g = r.updateQueue;
        if (g === null)
          return null;
        var E = g.shared;
        if (lx === E && !HT && (c("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."), HT = !0), j6()) {
          var C = E.pending;
          return C === null ? s.next = s : (s.next = C.next, C.next = s), E.pending = s, jz(r, h);
        } else
          return Fz(r, E, s, h);
      }
      function ux(r, s, h) {
        var g = s.updateQueue;
        if (g !== null) {
          var E = g.shared;
          if (ch(h)) {
            var C = E.lanes;
            C = Kp(C, r.pendingLanes);
            var M = an(C, h);
            E.lanes = M, fh(r, M);
          }
        }
      }
      function GT(r, s) {
        var h = r.updateQueue, g = r.alternate;
        if (g !== null) {
          var E = g.updateQueue;
          if (h === E) {
            var C = null, M = null, I = h.firstBaseUpdate;
            if (I !== null) {
              var P = I;
              do {
                var W = {
                  eventTime: P.eventTime,
                  lane: P.lane,
                  tag: P.tag,
                  payload: P.payload,
                  callback: P.callback,
                  next: null
                };
                M === null ? C = M = W : (M.next = W, M = W), P = P.next;
              } while (P !== null);
              M === null ? C = M = s : (M.next = s, M = s);
            } else
              C = M = s;
            h = {
              baseState: E.baseState,
              firstBaseUpdate: C,
              lastBaseUpdate: M,
              shared: E.shared,
              effects: E.effects
            }, r.updateQueue = h;
            return;
          }
        }
        var X = h.lastBaseUpdate;
        X === null ? h.firstBaseUpdate = s : X.next = s, h.lastBaseUpdate = s;
      }
      function Uz(r, s, h, g, E, C) {
        switch (h.tag) {
          case kN: {
            var M = h.payload;
            if (typeof M == "function") {
              LN();
              var I = M.call(C, g, E);
              {
                if (r.mode & sr) {
                  wi(!0);
                  try {
                    M.call(C, g, E);
                  } finally {
                    wi(!1);
                  }
                }
                NN();
              }
              return I;
            }
            return M;
          }
          case VT:
            r.flags = r.flags & ~ya | tn;
          case PN: {
            var P = h.payload, W;
            if (typeof P == "function") {
              LN(), W = P.call(C, g, E);
              {
                if (r.mode & sr) {
                  wi(!0);
                  try {
                    P.call(C, g, E);
                  } finally {
                    wi(!1);
                  }
                }
                NN();
              }
            } else
              W = P;
            return W == null ? g : cn({}, g, W);
          }
          case sx:
            return ox = !0, g;
        }
        return g;
      }
      function cx(r, s, h, g) {
        var E = r.updateQueue;
        ox = !1, lx = E.shared;
        var C = E.firstBaseUpdate, M = E.lastBaseUpdate, I = E.shared.pending;
        if (I !== null) {
          E.shared.pending = null;
          var P = I, W = P.next;
          P.next = null, M === null ? C = W : M.next = W, M = P;
          var X = r.alternate;
          if (X !== null) {
            var de = X.updateQueue, he = de.lastBaseUpdate;
            he !== M && (he === null ? de.firstBaseUpdate = W : he.next = W, de.lastBaseUpdate = P);
          }
        }
        if (C !== null) {
          var we = E.baseState, Ce = je, Pe = null, yt = null, Vt = null, Nt = C;
          do {
            var Kn = Nt.lane, Bn = Nt.eventTime;
            if (qc(g, Kn)) {
              if (Vt !== null) {
                var ke = {
                  eventTime: Bn,
                  // This update is going to be committed so we never want uncommit
                  // it. Using NoLane works because 0 is a subset of all bitmasks, so
                  // this will never be skipped by the check above.
                  lane: Pr,
                  tag: Nt.tag,
                  payload: Nt.payload,
                  callback: Nt.callback,
                  next: null
                };
                Vt = Vt.next = ke;
              }
              we = Uz(r, E, Nt, we, s, h);
              var _e = Nt.callback;
              if (_e !== null && // If the update was already committed, we should not queue its
              // callback again.
              Nt.lane !== Pr) {
                r.flags |= oa;
                var et = E.effects;
                et === null ? E.effects = [Nt] : et.push(Nt);
              }
            } else {
              var ye = {
                eventTime: Bn,
                lane: Kn,
                tag: Nt.tag,
                payload: Nt.payload,
                callback: Nt.callback,
                next: null
              };
              Vt === null ? (yt = Vt = ye, Pe = we) : Vt = Vt.next = ye, Ce = an(Ce, Kn);
            }
            if (Nt = Nt.next, Nt === null) {
              if (I = E.shared.pending, I === null)
                break;
              var _t = I, gt = _t.next;
              _t.next = null, Nt = gt, E.lastBaseUpdate = _t, E.shared.pending = null;
            }
          } while (!0);
          Vt === null && (Pe = we), E.baseState = Pe, E.firstBaseUpdate = yt, E.lastBaseUpdate = Vt;
          var en = E.shared.interleaved;
          if (en !== null) {
            var ln = en;
            do
              Ce = an(Ce, ln.lane), ln = ln.next;
            while (ln !== en);
          } else
            C === null && (E.shared.lanes = je);
          H1(Ce), r.lanes = Ce, r.memoizedState = we;
        }
        lx = null;
      }
      function zz(r, s) {
        if (typeof r != "function")
          throw new Error("Invalid argument passed as callback. Expected a function. Instead " + ("received: " + r));
        r.call(s);
      }
      function jN() {
        ox = !1;
      }
      function fx() {
        return ox;
      }
      function UN(r, s, h) {
        var g = s.effects;
        if (s.effects = null, g !== null)
          for (var E = 0; E < g.length; E++) {
            var C = g[E], M = C.callback;
            M !== null && (C.callback = null, zz(M, h));
          }
      }
      var YT = {}, zN = new e.Component().refs, qT, XT, KT, ZT, QT, $N, hx, JT, eR, tR;
      {
        qT = /* @__PURE__ */ new Set(), XT = /* @__PURE__ */ new Set(), KT = /* @__PURE__ */ new Set(), ZT = /* @__PURE__ */ new Set(), JT = /* @__PURE__ */ new Set(), QT = /* @__PURE__ */ new Set(), eR = /* @__PURE__ */ new Set(), tR = /* @__PURE__ */ new Set();
        var BN = /* @__PURE__ */ new Set();
        hx = function(r, s) {
          if (!(r === null || typeof r == "function")) {
            var h = s + "_" + r;
            BN.has(h) || (BN.add(h), c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", s, r));
          }
        }, $N = function(r, s) {
          if (s === void 0) {
            var h = Un(r) || "Component";
            QT.has(h) || (QT.add(h), c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", h));
          }
        }, Object.defineProperty(YT, "_processChildContext", {
          enumerable: !1,
          value: function() {
            throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).");
          }
        }), Object.freeze(YT);
      }
      function nR(r, s, h, g) {
        var E = r.memoizedState, C = h(g, E);
        {
          if (r.mode & sr) {
            wi(!0);
            try {
              C = h(g, E);
            } finally {
              wi(!1);
            }
          }
          $N(s, C);
        }
        var M = C == null ? E : cn({}, E, C);
        if (r.memoizedState = M, r.lanes === je) {
          var I = r.updateQueue;
          I.baseState = M;
        }
      }
      var iR = {
        isMounted: ks,
        enqueueSetState: function(r, s, h) {
          var g = Dr(r), E = Go(), C = Dg(g), M = sp(E, C);
          M.payload = s, h != null && (hx(h, "setState"), M.callback = h);
          var I = Cg(g, M, C);
          I !== null && (ss(I, g, C, E), ux(I, g, C)), wd(g, C);
        },
        enqueueReplaceState: function(r, s, h) {
          var g = Dr(r), E = Go(), C = Dg(g), M = sp(E, C);
          M.tag = kN, M.payload = s, h != null && (hx(h, "replaceState"), M.callback = h);
          var I = Cg(g, M, C);
          I !== null && (ss(I, g, C, E), ux(I, g, C)), wd(g, C);
        },
        enqueueForceUpdate: function(r, s) {
          var h = Dr(r), g = Go(), E = Dg(h), C = sp(g, E);
          C.tag = sx, s != null && (hx(s, "forceUpdate"), C.callback = s);
          var M = Cg(h, C, E);
          M !== null && (ss(M, h, E, g), ux(M, h, E)), eh(h, E);
        }
      };
      function VN(r, s, h, g, E, C, M) {
        var I = r.stateNode;
        if (typeof I.shouldComponentUpdate == "function") {
          var P = I.shouldComponentUpdate(g, C, M);
          {
            if (r.mode & sr) {
              wi(!0);
              try {
                P = I.shouldComponentUpdate(g, C, M);
              } finally {
                wi(!1);
              }
            }
            P === void 0 && c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", Un(s) || "Component");
          }
          return P;
        }
        return s.prototype && s.prototype.isPureReactComponent ? !Gt(h, g) || !Gt(E, C) : !0;
      }
      function $z(r, s, h) {
        var g = r.stateNode;
        {
          var E = Un(s) || "Component", C = g.render;
          C || (s.prototype && typeof s.prototype.render == "function" ? c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?", E) : c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.", E)), g.getInitialState && !g.getInitialState.isReactClassApproved && !g.state && c("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", E), g.getDefaultProps && !g.getDefaultProps.isReactClassApproved && c("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", E), g.propTypes && c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.", E), g.contextType && c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", E), g.contextTypes && c("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", E), s.contextType && s.contextTypes && !eR.has(s) && (eR.add(s), c("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", E)), typeof g.componentShouldUpdate == "function" && c("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", E), s.prototype && s.prototype.isPureReactComponent && typeof g.shouldComponentUpdate < "u" && c("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", Un(s) || "A pure component"), typeof g.componentDidUnmount == "function" && c("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", E), typeof g.componentDidReceiveProps == "function" && c("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", E), typeof g.componentWillRecieveProps == "function" && c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", E), typeof g.UNSAFE_componentWillRecieveProps == "function" && c("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", E);
          var M = g.props !== h;
          g.props !== void 0 && M && c("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", E, E), g.defaultProps && c("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", E, E), typeof g.getSnapshotBeforeUpdate == "function" && typeof g.componentDidUpdate != "function" && !KT.has(s) && (KT.add(s), c("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", Un(s))), typeof g.getDerivedStateFromProps == "function" && c("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", E), typeof g.getDerivedStateFromError == "function" && c("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", E), typeof s.getSnapshotBeforeUpdate == "function" && c("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", E);
          var I = g.state;
          I && (typeof I != "object" || zn(I)) && c("%s.state: must be set to an object or null", E), typeof g.getChildContext == "function" && typeof s.childContextTypes != "object" && c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", E);
        }
      }
      function HN(r, s) {
        s.updater = iR, r.stateNode = s, Up(s, r), s._reactInternalInstance = YT;
      }
      function WN(r, s, h) {
        var g = !1, E = gu, C = gu, M = s.contextType;
        if ("contextType" in s) {
          var I = (
            // Allow null for conditional declaration
            M === null || M !== void 0 && M.$$typeof === st && M._context === void 0
          );
          if (!I && !tR.has(s)) {
            tR.add(s);
            var P = "";
            M === void 0 ? P = " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : typeof M != "object" ? P = " However, it is set to a " + typeof M + "." : M.$$typeof === We ? P = " Did you accidentally pass the Context.Provider instead?" : M._context !== void 0 ? P = " Did you accidentally pass the Context.Consumer instead?" : P = " However, it is set to an object with keys {" + Object.keys(M).join(", ") + "}.", c("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", Un(s) || "Component", P);
          }
        }
        if (typeof M == "object" && M !== null)
          C = ja(M);
        else {
          E = qy(r, s, !0);
          var W = s.contextTypes;
          g = W != null, C = g ? Xy(r, E) : gu;
        }
        var X = new s(h, C);
        if (r.mode & sr) {
          wi(!0);
          try {
            X = new s(h, C);
          } finally {
            wi(!1);
          }
        }
        var de = r.memoizedState = X.state !== null && X.state !== void 0 ? X.state : null;
        HN(r, X);
        {
          if (typeof s.getDerivedStateFromProps == "function" && de === null) {
            var he = Un(s) || "Component";
            XT.has(he) || (XT.add(he), c("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", he, X.state === null ? "null" : "undefined", he));
          }
          if (typeof s.getDerivedStateFromProps == "function" || typeof X.getSnapshotBeforeUpdate == "function") {
            var we = null, Ce = null, Pe = null;
            if (typeof X.componentWillMount == "function" && X.componentWillMount.__suppressDeprecationWarning !== !0 ? we = "componentWillMount" : typeof X.UNSAFE_componentWillMount == "function" && (we = "UNSAFE_componentWillMount"), typeof X.componentWillReceiveProps == "function" && X.componentWillReceiveProps.__suppressDeprecationWarning !== !0 ? Ce = "componentWillReceiveProps" : typeof X.UNSAFE_componentWillReceiveProps == "function" && (Ce = "UNSAFE_componentWillReceiveProps"), typeof X.componentWillUpdate == "function" && X.componentWillUpdate.__suppressDeprecationWarning !== !0 ? Pe = "componentWillUpdate" : typeof X.UNSAFE_componentWillUpdate == "function" && (Pe = "UNSAFE_componentWillUpdate"), we !== null || Ce !== null || Pe !== null) {
              var yt = Un(s) || "Component", Vt = typeof s.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
              ZT.has(yt) || (ZT.add(yt), c(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://reactjs.org/link/unsafe-component-lifecycles`, yt, Vt, we !== null ? `
  ` + we : "", Ce !== null ? `
  ` + Ce : "", Pe !== null ? `
  ` + Pe : ""));
            }
          }
        }
        return g && gN(r, E, C), X;
      }
      function Bz(r, s) {
        var h = s.state;
        typeof s.componentWillMount == "function" && s.componentWillMount(), typeof s.UNSAFE_componentWillMount == "function" && s.UNSAFE_componentWillMount(), h !== s.state && (c("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", Qt(r) || "Component"), iR.enqueueReplaceState(s, s.state, null));
      }
      function GN(r, s, h, g) {
        var E = s.state;
        if (typeof s.componentWillReceiveProps == "function" && s.componentWillReceiveProps(h, g), typeof s.UNSAFE_componentWillReceiveProps == "function" && s.UNSAFE_componentWillReceiveProps(h, g), s.state !== E) {
          {
            var C = Qt(r) || "Component";
            qT.has(C) || (qT.add(C), c("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", C));
          }
          iR.enqueueReplaceState(s, s.state, null);
        }
      }
      function rR(r, s, h, g) {
        $z(r, s, h);
        var E = r.stateNode;
        E.props = h, E.state = r.memoizedState, E.refs = zN, WT(r);
        var C = s.contextType;
        if (typeof C == "object" && C !== null)
          E.context = ja(C);
        else {
          var M = qy(r, s, !0);
          E.context = Xy(r, M);
        }
        {
          if (E.state === h) {
            var I = Un(s) || "Component";
            JT.has(I) || (JT.add(I), c("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", I));
          }
          r.mode & sr && cf.recordLegacyContextWarning(r, E), cf.recordUnsafeLifecycleWarnings(r, E);
        }
        E.state = r.memoizedState;
        var P = s.getDerivedStateFromProps;
        if (typeof P == "function" && (nR(r, s, P, h), E.state = r.memoizedState), typeof s.getDerivedStateFromProps != "function" && typeof E.getSnapshotBeforeUpdate != "function" && (typeof E.UNSAFE_componentWillMount == "function" || typeof E.componentWillMount == "function") && (Bz(r, E), cx(r, h, E, g), E.state = r.memoizedState), typeof E.componentDidMount == "function") {
          var W = At;
          W |= ao, (r.mode & lo) !== Ft && (W |= so), r.flags |= W;
        }
      }
      function Vz(r, s, h, g) {
        var E = r.stateNode, C = r.memoizedProps;
        E.props = C;
        var M = E.context, I = s.contextType, P = gu;
        if (typeof I == "object" && I !== null)
          P = ja(I);
        else {
          var W = qy(r, s, !0);
          P = Xy(r, W);
        }
        var X = s.getDerivedStateFromProps, de = typeof X == "function" || typeof E.getSnapshotBeforeUpdate == "function";
        !de && (typeof E.UNSAFE_componentWillReceiveProps == "function" || typeof E.componentWillReceiveProps == "function") && (C !== h || M !== P) && GN(r, E, h, P), jN();
        var he = r.memoizedState, we = E.state = he;
        if (cx(r, h, E, g), we = r.memoizedState, C === h && he === we && !YS() && !fx()) {
          if (typeof E.componentDidMount == "function") {
            var Ce = At;
            Ce |= ao, (r.mode & lo) !== Ft && (Ce |= so), r.flags |= Ce;
          }
          return !1;
        }
        typeof X == "function" && (nR(r, s, X, h), we = r.memoizedState);
        var Pe = fx() || VN(r, s, C, h, he, we, P);
        if (Pe) {
          if (!de && (typeof E.UNSAFE_componentWillMount == "function" || typeof E.componentWillMount == "function") && (typeof E.componentWillMount == "function" && E.componentWillMount(), typeof E.UNSAFE_componentWillMount == "function" && E.UNSAFE_componentWillMount()), typeof E.componentDidMount == "function") {
            var yt = At;
            yt |= ao, (r.mode & lo) !== Ft && (yt |= so), r.flags |= yt;
          }
        } else {
          if (typeof E.componentDidMount == "function") {
            var Vt = At;
            Vt |= ao, (r.mode & lo) !== Ft && (Vt |= so), r.flags |= Vt;
          }
          r.memoizedProps = h, r.memoizedState = we;
        }
        return E.props = h, E.state = we, E.context = P, Pe;
      }
      function Hz(r, s, h, g, E) {
        var C = s.stateNode;
        FN(r, s);
        var M = s.memoizedProps, I = s.type === s.elementType ? M : ff(s.type, M);
        C.props = I;
        var P = s.pendingProps, W = C.context, X = h.contextType, de = gu;
        if (typeof X == "object" && X !== null)
          de = ja(X);
        else {
          var he = qy(s, h, !0);
          de = Xy(s, he);
        }
        var we = h.getDerivedStateFromProps, Ce = typeof we == "function" || typeof C.getSnapshotBeforeUpdate == "function";
        !Ce && (typeof C.UNSAFE_componentWillReceiveProps == "function" || typeof C.componentWillReceiveProps == "function") && (M !== P || W !== de) && GN(s, C, g, de), jN();
        var Pe = s.memoizedState, yt = C.state = Pe;
        if (cx(s, g, C, E), yt = s.memoizedState, M === P && Pe === yt && !YS() && !fx() && !q)
          return typeof C.componentDidUpdate == "function" && (M !== r.memoizedProps || Pe !== r.memoizedState) && (s.flags |= At), typeof C.getSnapshotBeforeUpdate == "function" && (M !== r.memoizedProps || Pe !== r.memoizedState) && (s.flags |= Xr), !1;
        typeof we == "function" && (nR(s, h, we, g), yt = s.memoizedState);
        var Vt = fx() || VN(s, h, I, g, Pe, yt, de) || // TODO: In some cases, we'll end up checking if context has changed twice,
        // both before and after `shouldComponentUpdate` has been called. Not ideal,
        // but I'm loath to refactor this function. This only happens for memoized
        // components so it's not that common.
        q;
        return Vt ? (!Ce && (typeof C.UNSAFE_componentWillUpdate == "function" || typeof C.componentWillUpdate == "function") && (typeof C.componentWillUpdate == "function" && C.componentWillUpdate(g, yt, de), typeof C.UNSAFE_componentWillUpdate == "function" && C.UNSAFE_componentWillUpdate(g, yt, de)), typeof C.componentDidUpdate == "function" && (s.flags |= At), typeof C.getSnapshotBeforeUpdate == "function" && (s.flags |= Xr)) : (typeof C.componentDidUpdate == "function" && (M !== r.memoizedProps || Pe !== r.memoizedState) && (s.flags |= At), typeof C.getSnapshotBeforeUpdate == "function" && (M !== r.memoizedProps || Pe !== r.memoizedState) && (s.flags |= Xr), s.memoizedProps = g, s.memoizedState = yt), C.props = g, C.state = yt, C.context = de, Vt;
      }
      var aR, sR, oR, lR, uR, YN = function(r, s) {
      };
      aR = !1, sR = !1, oR = {}, lR = {}, uR = {}, YN = function(r, s) {
        if (!(r === null || typeof r != "object") && !(!r._store || r._store.validated || r.key != null)) {
          if (typeof r._store != "object")
            throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");
          r._store.validated = !0;
          var h = Qt(s) || "Component";
          lR[h] || (lR[h] = !0, c('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'));
        }
      };
      function _1(r, s, h) {
        var g = h.ref;
        if (g !== null && typeof g != "function" && typeof g != "object") {
          if ((r.mode & sr || De) && // We warn in ReactElement.js if owner and self are equal for string refs
          // because these cannot be automatically converted to an arrow function
          // using a codemod. Therefore, we don't have to warn about string refs again.
          !(h._owner && h._self && h._owner.stateNode !== h._self)) {
            var E = Qt(r) || "Component";
            oR[E] || (c('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', g), oR[E] = !0);
          }
          if (h._owner) {
            var C = h._owner, M;
            if (C) {
              var I = C;
              if (I.tag !== _)
                throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");
              M = I.stateNode;
            }
            if (!M)
              throw new Error("Missing owner for string ref " + g + ". This error is likely caused by a bug in React. Please file an issue.");
            var P = M;
            Tn(g, "ref");
            var W = "" + g;
            if (s !== null && s.ref !== null && typeof s.ref == "function" && s.ref._stringRef === W)
              return s.ref;
            var X = function(de) {
              var he = P.refs;
              he === zN && (he = P.refs = {}), de === null ? delete he[W] : he[W] = de;
            };
            return X._stringRef = W, X;
          } else {
            if (typeof g != "string")
              throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");
            if (!h._owner)
              throw new Error("Element ref was specified as a string (" + g + `) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
See https://reactjs.org/link/refs-must-have-owner for more information.`);
          }
        }
        return g;
      }
      function dx(r, s) {
        var h = Object.prototype.toString.call(s);
        throw new Error("Objects are not valid as a React child (found: " + (h === "[object Object]" ? "object with keys {" + Object.keys(s).join(", ") + "}" : h) + "). If you meant to render a collection of children, use an array instead.");
      }
      function px(r) {
        {
          var s = Qt(r) || "Component";
          if (uR[s])
            return;
          uR[s] = !0, c("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.");
        }
      }
      function qN(r) {
        var s = r._payload, h = r._init;
        return h(s);
      }
      function XN(r) {
        function s(ye, ke) {
          if (r) {
            var _e = ye.deletions;
            _e === null ? (ye.deletions = [ke], ye.flags |= ii) : _e.push(ke);
          }
        }
        function h(ye, ke) {
          if (!r)
            return null;
          for (var _e = ke; _e !== null; )
            s(ye, _e), _e = _e.sibling;
          return null;
        }
        function g(ye, ke) {
          for (var _e = /* @__PURE__ */ new Map(), et = ke; et !== null; )
            et.key !== null ? _e.set(et.key, et) : _e.set(et.index, et), et = et.sibling;
          return _e;
        }
        function E(ye, ke) {
          var _e = Sv(ye, ke);
          return _e.index = 0, _e.sibling = null, _e;
        }
        function C(ye, ke, _e) {
          if (ye.index = _e, !r)
            return ye.flags |= Hu, ke;
          var et = ye.alternate;
          if (et !== null) {
            var _t = et.index;
            return _t < ke ? (ye.flags |= qn, ke) : _t;
          } else
            return ye.flags |= qn, ke;
        }
        function M(ye) {
          return r && ye.alternate === null && (ye.flags |= qn), ye;
        }
        function I(ye, ke, _e, et) {
          if (ke === null || ke.tag !== N) {
            var _t = kM(_e, ye.mode, et);
            return _t.return = ye, _t;
          } else {
            var gt = E(ke, _e);
            return gt.return = ye, gt;
          }
        }
        function P(ye, ke, _e, et) {
          var _t = _e.type;
          if (_t === Ms)
            return X(ye, ke, _e.props.children, et, _e.key);
          if (ke !== null && (ke.elementType === _t || // Keep this check inline so it only runs on the false path:
          UI(ke, _e) || // Lazy types should reconcile their resolved type.
          // We need to do this after the Hot Reloading check above,
          // because hot reloading has different semantics than prod because
          // it doesn't resuspend. So we can't let the call below suspend.
          typeof _t == "object" && _t !== null && _t.$$typeof === It && qN(_t) === ke.type)) {
            var gt = E(ke, _e.props);
            return gt.ref = _1(ye, ke, _e), gt.return = ye, gt._debugSource = _e._source, gt._debugOwner = _e._owner, gt;
          }
          var en = PM(_e, ye.mode, et);
          return en.ref = _1(ye, ke, _e), en.return = ye, en;
        }
        function W(ye, ke, _e, et) {
          if (ke === null || ke.tag !== T || ke.stateNode.containerInfo !== _e.containerInfo || ke.stateNode.implementation !== _e.implementation) {
            var _t = FM(_e, ye.mode, et);
            return _t.return = ye, _t;
          } else {
            var gt = E(ke, _e.children || []);
            return gt.return = ye, gt;
          }
        }
        function X(ye, ke, _e, et, _t) {
          if (ke === null || ke.tag !== D) {
            var gt = Pg(_e, ye.mode, et, _t);
            return gt.return = ye, gt;
          } else {
            var en = E(ke, _e);
            return en.return = ye, en;
          }
        }
        function de(ye, ke, _e) {
          if (typeof ke == "string" && ke !== "" || typeof ke == "number") {
            var et = kM("" + ke, ye.mode, _e);
            return et.return = ye, et;
          }
          if (typeof ke == "object" && ke !== null) {
            switch (ke.$$typeof) {
              case rr: {
                var _t = PM(ke, ye.mode, _e);
                return _t.ref = _1(ye, null, ke), _t.return = ye, _t;
              }
              case Ta: {
                var gt = FM(ke, ye.mode, _e);
                return gt.return = ye, gt;
              }
              case It: {
                var en = ke._payload, ln = ke._init;
                return de(ye, ln(en), _e);
              }
            }
            if (zn(ke) || il(ke)) {
              var Vi = Pg(ke, ye.mode, _e, null);
              return Vi.return = ye, Vi;
            }
            dx(ye, ke);
          }
          return typeof ke == "function" && px(ye), null;
        }
        function he(ye, ke, _e, et) {
          var _t = ke !== null ? ke.key : null;
          if (typeof _e == "string" && _e !== "" || typeof _e == "number")
            return _t !== null ? null : I(ye, ke, "" + _e, et);
          if (typeof _e == "object" && _e !== null) {
            switch (_e.$$typeof) {
              case rr:
                return _e.key === _t ? P(ye, ke, _e, et) : null;
              case Ta:
                return _e.key === _t ? W(ye, ke, _e, et) : null;
              case It: {
                var gt = _e._payload, en = _e._init;
                return he(ye, ke, en(gt), et);
              }
            }
            if (zn(_e) || il(_e))
              return _t !== null ? null : X(ye, ke, _e, et, null);
            dx(ye, _e);
          }
          return typeof _e == "function" && px(ye), null;
        }
        function we(ye, ke, _e, et, _t) {
          if (typeof et == "string" && et !== "" || typeof et == "number") {
            var gt = ye.get(_e) || null;
            return I(ke, gt, "" + et, _t);
          }
          if (typeof et == "object" && et !== null) {
            switch (et.$$typeof) {
              case rr: {
                var en = ye.get(et.key === null ? _e : et.key) || null;
                return P(ke, en, et, _t);
              }
              case Ta: {
                var ln = ye.get(et.key === null ? _e : et.key) || null;
                return W(ke, ln, et, _t);
              }
              case It:
                var Vi = et._payload, fi = et._init;
                return we(ye, ke, _e, fi(Vi), _t);
            }
            if (zn(et) || il(et)) {
              var Ea = ye.get(_e) || null;
              return X(ke, Ea, et, _t, null);
            }
            dx(ke, et);
          }
          return typeof et == "function" && px(ke), null;
        }
        function Ce(ye, ke, _e) {
          {
            if (typeof ye != "object" || ye === null)
              return ke;
            switch (ye.$$typeof) {
              case rr:
              case Ta:
                YN(ye, _e);
                var et = ye.key;
                if (typeof et != "string")
                  break;
                if (ke === null) {
                  ke = /* @__PURE__ */ new Set(), ke.add(et);
                  break;
                }
                if (!ke.has(et)) {
                  ke.add(et);
                  break;
                }
                c("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.", et);
                break;
              case It:
                var _t = ye._payload, gt = ye._init;
                Ce(gt(_t), ke, _e);
                break;
            }
          }
          return ke;
        }
        function Pe(ye, ke, _e, et) {
          for (var _t = null, gt = 0; gt < _e.length; gt++) {
            var en = _e[gt];
            _t = Ce(en, _t, ye);
          }
          for (var ln = null, Vi = null, fi = ke, Ea = 0, hi = 0, fa = null; fi !== null && hi < _e.length; hi++) {
            fi.index > hi ? (fa = fi, fi = null) : fa = fi.sibling;
            var xo = he(ye, fi, _e[hi], et);
            if (xo === null) {
              fi === null && (fi = fa);
              break;
            }
            r && fi && xo.alternate === null && s(ye, fi), Ea = C(xo, Ea, hi), Vi === null ? ln = xo : Vi.sibling = xo, Vi = xo, fi = fa;
          }
          if (hi === _e.length) {
            if (h(ye, fi), Bs()) {
              var Xs = hi;
              lv(ye, Xs);
            }
            return ln;
          }
          if (fi === null) {
            for (; hi < _e.length; hi++) {
              var vu = de(ye, _e[hi], et);
              vu !== null && (Ea = C(vu, Ea, hi), Vi === null ? ln = vu : Vi.sibling = vu, Vi = vu);
            }
            if (Bs()) {
              var Yo = hi;
              lv(ye, Yo);
            }
            return ln;
          }
          for (var qo = g(ye, fi); hi < _e.length; hi++) {
            var bo = we(qo, ye, hi, _e[hi], et);
            bo !== null && (r && bo.alternate !== null && qo.delete(bo.key === null ? hi : bo.key), Ea = C(bo, Ea, hi), Vi === null ? ln = bo : Vi.sibling = bo, Vi = bo);
          }
          if (r && qo.forEach(function(v0) {
            return s(ye, v0);
          }), Bs()) {
            var hp = hi;
            lv(ye, hp);
          }
          return ln;
        }
        function yt(ye, ke, _e, et) {
          var _t = il(_e);
          if (typeof _t != "function")
            throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");
          {
            typeof Symbol == "function" && // $FlowFixMe Flow doesn't know about toStringTag
            _e[Symbol.toStringTag] === "Generator" && (sR || c("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."), sR = !0), _e.entries === _t && (aR || c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), aR = !0);
            var gt = _t.call(_e);
            if (gt)
              for (var en = null, ln = gt.next(); !ln.done; ln = gt.next()) {
                var Vi = ln.value;
                en = Ce(Vi, en, ye);
              }
          }
          var fi = _t.call(_e);
          if (fi == null)
            throw new Error("An iterable object provided no iterator.");
          for (var Ea = null, hi = null, fa = ke, xo = 0, Xs = 0, vu = null, Yo = fi.next(); fa !== null && !Yo.done; Xs++, Yo = fi.next()) {
            fa.index > Xs ? (vu = fa, fa = null) : vu = fa.sibling;
            var qo = he(ye, fa, Yo.value, et);
            if (qo === null) {
              fa === null && (fa = vu);
              break;
            }
            r && fa && qo.alternate === null && s(ye, fa), xo = C(qo, xo, Xs), hi === null ? Ea = qo : hi.sibling = qo, hi = qo, fa = vu;
          }
          if (Yo.done) {
            if (h(ye, fa), Bs()) {
              var bo = Xs;
              lv(ye, bo);
            }
            return Ea;
          }
          if (fa === null) {
            for (; !Yo.done; Xs++, Yo = fi.next()) {
              var hp = de(ye, Yo.value, et);
              hp !== null && (xo = C(hp, xo, Xs), hi === null ? Ea = hp : hi.sibling = hp, hi = hp);
            }
            if (Bs()) {
              var v0 = Xs;
              lv(ye, v0);
            }
            return Ea;
          }
          for (var X1 = g(ye, fa); !Yo.done; Xs++, Yo = fi.next()) {
            var Dh = we(X1, ye, Xs, Yo.value, et);
            Dh !== null && (r && Dh.alternate !== null && X1.delete(Dh.key === null ? Xs : Dh.key), xo = C(Dh, xo, Xs), hi === null ? Ea = Dh : hi.sibling = Dh, hi = Dh);
          }
          if (r && X1.forEach(function(r8) {
            return s(ye, r8);
          }), Bs()) {
            var i8 = Xs;
            lv(ye, i8);
          }
          return Ea;
        }
        function Vt(ye, ke, _e, et) {
          if (ke !== null && ke.tag === N) {
            h(ye, ke.sibling);
            var _t = E(ke, _e);
            return _t.return = ye, _t;
          }
          h(ye, ke);
          var gt = kM(_e, ye.mode, et);
          return gt.return = ye, gt;
        }
        function Nt(ye, ke, _e, et) {
          for (var _t = _e.key, gt = ke; gt !== null; ) {
            if (gt.key === _t) {
              var en = _e.type;
              if (en === Ms) {
                if (gt.tag === D) {
                  h(ye, gt.sibling);
                  var ln = E(gt, _e.props.children);
                  return ln.return = ye, ln._debugSource = _e._source, ln._debugOwner = _e._owner, ln;
                }
              } else if (gt.elementType === en || // Keep this check inline so it only runs on the false path:
              UI(gt, _e) || // Lazy types should reconcile their resolved type.
              // We need to do this after the Hot Reloading check above,
              // because hot reloading has different semantics than prod because
              // it doesn't resuspend. So we can't let the call below suspend.
              typeof en == "object" && en !== null && en.$$typeof === It && qN(en) === gt.type) {
                h(ye, gt.sibling);
                var Vi = E(gt, _e.props);
                return Vi.ref = _1(ye, gt, _e), Vi.return = ye, Vi._debugSource = _e._source, Vi._debugOwner = _e._owner, Vi;
              }
              h(ye, gt);
              break;
            } else
              s(ye, gt);
            gt = gt.sibling;
          }
          if (_e.type === Ms) {
            var fi = Pg(_e.props.children, ye.mode, et, _e.key);
            return fi.return = ye, fi;
          } else {
            var Ea = PM(_e, ye.mode, et);
            return Ea.ref = _1(ye, ke, _e), Ea.return = ye, Ea;
          }
        }
        function Kn(ye, ke, _e, et) {
          for (var _t = _e.key, gt = ke; gt !== null; ) {
            if (gt.key === _t)
              if (gt.tag === T && gt.stateNode.containerInfo === _e.containerInfo && gt.stateNode.implementation === _e.implementation) {
                h(ye, gt.sibling);
                var en = E(gt, _e.children || []);
                return en.return = ye, en;
              } else {
                h(ye, gt);
                break;
              }
            else
              s(ye, gt);
            gt = gt.sibling;
          }
          var ln = FM(_e, ye.mode, et);
          return ln.return = ye, ln;
        }
        function Bn(ye, ke, _e, et) {
          var _t = typeof _e == "object" && _e !== null && _e.type === Ms && _e.key === null;
          if (_t && (_e = _e.props.children), typeof _e == "object" && _e !== null) {
            switch (_e.$$typeof) {
              case rr:
                return M(Nt(ye, ke, _e, et));
              case Ta:
                return M(Kn(ye, ke, _e, et));
              case It:
                var gt = _e._payload, en = _e._init;
                return Bn(ye, ke, en(gt), et);
            }
            if (zn(_e))
              return Pe(ye, ke, _e, et);
            if (il(_e))
              return yt(ye, ke, _e, et);
            dx(ye, _e);
          }
          return typeof _e == "string" && _e !== "" || typeof _e == "number" ? M(Vt(ye, ke, "" + _e, et)) : (typeof _e == "function" && px(ye), h(ye, ke));
        }
        return Bn;
      }
      var t0 = XN(!0), KN = XN(!1);
      function Wz(r, s) {
        if (r !== null && s.child !== r.child)
          throw new Error("Resuming work not yet implemented.");
        if (s.child !== null) {
          var h = s.child, g = Sv(h, h.pendingProps);
          for (s.child = g, g.return = s; h.sibling !== null; )
            h = h.sibling, g = g.sibling = Sv(h, h.pendingProps), g.return = s;
          g.sibling = null;
        }
      }
      function Gz(r, s) {
        for (var h = r.child; h !== null; )
          S$(h, s), h = h.sibling;
      }
      var E1 = {}, Tg = lf(E1), S1 = lf(E1), gx = lf(E1);
      function mx(r) {
        if (r === E1)
          throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");
        return r;
      }
      function ZN() {
        var r = mx(gx.current);
        return r;
      }
      function cR(r, s) {
        Eo(gx, s, r), Eo(S1, r, r), Eo(Tg, E1, r);
        var h = NC(s);
        _o(Tg, r), Eo(Tg, h, r);
      }
      function n0(r) {
        _o(Tg, r), _o(S1, r), _o(gx, r);
      }
      function fR() {
        var r = mx(Tg.current);
        return r;
      }
      function QN(r) {
        mx(gx.current);
        var s = mx(Tg.current), h = DC(s, r.type);
        s !== h && (Eo(S1, r, r), Eo(Tg, h, r));
      }
      function hR(r) {
        S1.current === r && (_o(Tg, r), _o(S1, r));
      }
      var Yz = 0, JN = 1, eD = 1, x1 = 2, hf = lf(Yz);
      function dR(r, s) {
        return (r & s) !== 0;
      }
      function i0(r) {
        return r & JN;
      }
      function pR(r, s) {
        return r & JN | s;
      }
      function qz(r, s) {
        return r | s;
      }
      function Rg(r, s) {
        Eo(hf, s, r);
      }
      function r0(r) {
        _o(hf, r);
      }
      function Xz(r, s) {
        var h = r.memoizedState;
        return h !== null ? h.dehydrated !== null : (r.memoizedProps, !0);
      }
      function vx(r) {
        for (var s = r; s !== null; ) {
          if (s.tag === G) {
            var h = s.memoizedState;
            if (h !== null) {
              var g = h.dehydrated;
              if (g === null || HS(g) || c1(g))
                return s;
            }
          } else if (s.tag === Ee && // revealOrder undefined can't be trusted because it don't
          // keep track of whether it suspended or not.
          s.memoizedProps.revealOrder !== void 0) {
            var E = (s.flags & tn) !== kt;
            if (E)
              return s;
          } else if (s.child !== null) {
            s.child.return = s, s = s.child;
            continue;
          }
          if (s === r)
            return null;
          for (; s.sibling === null; ) {
            if (s.return === null || s.return === r)
              return null;
            s = s.return;
          }
          s.sibling.return = s.return, s = s.sibling;
        }
        return null;
      }
      var bl = (
        /*   */
        0
      ), Ja = (
        /* */
        1
      ), Th = (
        /*  */
        2
      ), es = (
        /*    */
        4
      ), Vs = (
        /*   */
        8
      ), gR = [];
      function mR() {
        for (var r = 0; r < gR.length; r++) {
          var s = gR[r];
          s._workInProgressVersionPrimary = null;
        }
        gR.length = 0;
      }
      function Kz(r, s) {
        var h = s._getVersion, g = h(s._source);
        r.mutableSourceEagerHydrationData == null ? r.mutableSourceEagerHydrationData = [s, g] : r.mutableSourceEagerHydrationData.push(s, g);
      }
      var mt = i.ReactCurrentDispatcher, b1 = i.ReactCurrentBatchConfig, vR, a0;
      vR = /* @__PURE__ */ new Set();
      var pv = je, Bi = null, ts = null, ns = null, yx = !1, w1 = !1, C1 = 0, Zz = 0, Qz = 25, ze = null, pc = null, Mg = -1, yR = !1;
      function Ri() {
        {
          var r = ze;
          pc === null ? pc = [r] : pc.push(r);
        }
      }
      function ut() {
        {
          var r = ze;
          pc !== null && (Mg++, pc[Mg] !== r && Jz(r));
        }
      }
      function s0(r) {
        r != null && !zn(r) && c("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", ze, typeof r);
      }
      function Jz(r) {
        {
          var s = Qt(Bi);
          if (!vR.has(s) && (vR.add(s), pc !== null)) {
            for (var h = "", g = 30, E = 0; E <= Mg; E++) {
              for (var C = pc[E], M = E === Mg ? r : C, I = E + 1 + ". " + C; I.length < g; )
                I += " ";
              I += M + `
`, h += I;
            }
            c(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
%s   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`, s, h);
          }
        }
      }
      function So() {
        throw new Error(`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.`);
      }
      function _R(r, s) {
        if (yR)
          return !1;
        if (s === null)
          return c("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", ze), !1;
        r.length !== s.length && c(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`, ze, "[" + s.join(", ") + "]", "[" + r.join(", ") + "]");
        for (var h = 0; h < s.length && h < r.length; h++)
          if (!St(r[h], s[h]))
            return !1;
        return !0;
      }
      function o0(r, s, h, g, E, C) {
        pv = C, Bi = s, pc = r !== null ? r._debugHookTypes : null, Mg = -1, yR = r !== null && r.type !== s.type, s.memoizedState = null, s.updateQueue = null, s.lanes = je, r !== null && r.memoizedState !== null ? mt.current = xD : pc !== null ? mt.current = SD : mt.current = ED;
        var M = h(g, E);
        if (w1) {
          var I = 0;
          do {
            if (w1 = !1, C1 = 0, I >= Qz)
              throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
            I += 1, yR = !1, ts = null, ns = null, s.updateQueue = null, Mg = -1, mt.current = bD, M = h(g, E);
          } while (w1);
        }
        mt.current = Lx, s._debugHookTypes = pc;
        var P = ts !== null && ts.next !== null;
        if (pv = je, Bi = null, ts = null, ns = null, ze = null, pc = null, Mg = -1, r !== null && (r.flags & ua) !== (s.flags & ua) && // Disable this warning in legacy mode, because legacy Suspense is weird
        // and creates false positives. To make this work in legacy mode, we'd
        // need to mark fibers that commit in an incomplete state, somehow. For
        // now I'll disable the warning that most of the bugs that would trigger
        // it are either exclusive to concurrent mode or exist in both.
        (r.mode & Ot) !== Ft && c("Internal React error: Expected static flag was missing. Please notify the React team."), yx = !1, P)
          throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");
        return M;
      }
      function l0() {
        var r = C1 !== 0;
        return C1 = 0, r;
      }
      function tD(r, s, h) {
        s.updateQueue = r.updateQueue, (s.mode & lo) !== Ft ? s.flags &= ~(zc | so | ps | At) : s.flags &= ~(ps | At), r.lanes = jd(r.lanes, h);
      }
      function nD() {
        if (mt.current = Lx, yx) {
          for (var r = Bi.memoizedState; r !== null; ) {
            var s = r.queue;
            s !== null && (s.pending = null), r = r.next;
          }
          yx = !1;
        }
        pv = je, Bi = null, ts = null, ns = null, pc = null, Mg = -1, ze = null, gD = !1, w1 = !1, C1 = 0;
      }
      function Rh() {
        var r = {
          memoizedState: null,
          baseState: null,
          baseQueue: null,
          queue: null,
          next: null
        };
        return ns === null ? Bi.memoizedState = ns = r : ns = ns.next = r, ns;
      }
      function gc() {
        var r;
        if (ts === null) {
          var s = Bi.alternate;
          s !== null ? r = s.memoizedState : r = null;
        } else
          r = ts.next;
        var h;
        if (ns === null ? h = Bi.memoizedState : h = ns.next, h !== null)
          ns = h, h = ns.next, ts = r;
        else {
          if (r === null)
            throw new Error("Rendered more hooks than during the previous render.");
          ts = r;
          var g = {
            memoizedState: ts.memoizedState,
            baseState: ts.baseState,
            baseQueue: ts.baseQueue,
            queue: ts.queue,
            next: null
          };
          ns === null ? Bi.memoizedState = ns = g : ns = ns.next = g;
        }
        return ns;
      }
      function iD() {
        return {
          lastEffect: null,
          stores: null
        };
      }
      function ER(r, s) {
        return typeof s == "function" ? s(r) : s;
      }
      function SR(r, s, h) {
        var g = Rh(), E;
        h !== void 0 ? E = h(s) : E = s, g.memoizedState = g.baseState = E;
        var C = {
          pending: null,
          interleaved: null,
          lanes: je,
          dispatch: null,
          lastRenderedReducer: r,
          lastRenderedState: E
        };
        g.queue = C;
        var M = C.dispatch = i4.bind(null, Bi, C);
        return [g.memoizedState, M];
      }
      function xR(r, s, h) {
        var g = gc(), E = g.queue;
        if (E === null)
          throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
        E.lastRenderedReducer = r;
        var C = ts, M = C.baseQueue, I = E.pending;
        if (I !== null) {
          if (M !== null) {
            var P = M.next, W = I.next;
            M.next = W, I.next = P;
          }
          C.baseQueue !== M && c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."), C.baseQueue = M = I, E.pending = null;
        }
        if (M !== null) {
          var X = M.next, de = C.baseState, he = null, we = null, Ce = null, Pe = X;
          do {
            var yt = Pe.lane;
            if (qc(pv, yt)) {
              if (Ce !== null) {
                var Nt = {
                  // This update is going to be committed so we never want uncommit
                  // it. Using NoLane works because 0 is a subset of all bitmasks, so
                  // this will never be skipped by the check above.
                  lane: Pr,
                  action: Pe.action,
                  hasEagerState: Pe.hasEagerState,
                  eagerState: Pe.eagerState,
                  next: null
                };
                Ce = Ce.next = Nt;
              }
              if (Pe.hasEagerState)
                de = Pe.eagerState;
              else {
                var Kn = Pe.action;
                de = r(de, Kn);
              }
            } else {
              var Vt = {
                lane: yt,
                action: Pe.action,
                hasEagerState: Pe.hasEagerState,
                eagerState: Pe.eagerState,
                next: null
              };
              Ce === null ? (we = Ce = Vt, he = de) : Ce = Ce.next = Vt, Bi.lanes = an(Bi.lanes, yt), H1(yt);
            }
            Pe = Pe.next;
          } while (Pe !== null && Pe !== X);
          Ce === null ? he = de : Ce.next = we, St(de, g.memoizedState) || N1(), g.memoizedState = de, g.baseState = he, g.baseQueue = Ce, E.lastRenderedState = de;
        }
        var Bn = E.interleaved;
        if (Bn !== null) {
          var ye = Bn;
          do {
            var ke = ye.lane;
            Bi.lanes = an(Bi.lanes, ke), H1(ke), ye = ye.next;
          } while (ye !== Bn);
        } else
          M === null && (E.lanes = je);
        var _e = E.dispatch;
        return [g.memoizedState, _e];
      }
      function bR(r, s, h) {
        var g = gc(), E = g.queue;
        if (E === null)
          throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
        E.lastRenderedReducer = r;
        var C = E.dispatch, M = E.pending, I = g.memoizedState;
        if (M !== null) {
          E.pending = null;
          var P = M.next, W = P;
          do {
            var X = W.action;
            I = r(I, X), W = W.next;
          } while (W !== P);
          St(I, g.memoizedState) || N1(), g.memoizedState = I, g.baseQueue === null && (g.baseState = I), E.lastRenderedState = I;
        }
        return [I, C];
      }
      function dse(r, s, h) {
      }
      function pse(r, s, h) {
      }
      function wR(r, s, h) {
        var g = Bi, E = Rh(), C, M = Bs();
        if (M) {
          if (h === void 0)
            throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
          C = h(), a0 || C !== h() && (c("The result of getServerSnapshot should be cached to avoid an infinite loop"), a0 = !0);
        } else {
          if (C = s(), !a0) {
            var I = s();
            St(C, I) || (c("The result of getSnapshot should be cached to avoid an infinite loop"), a0 = !0);
          }
          var P = Xx();
          if (P === null)
            throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
          kd(P, pv) || rD(g, s, C);
        }
        E.memoizedState = C;
        var W = {
          value: C,
          getSnapshot: s
        };
        return E.queue = W, bx(sD.bind(null, g, W, r), [r]), g.flags |= ps, T1(Ja | Vs, aD.bind(null, g, W, C, s), void 0, null), C;
      }
      function _x(r, s, h) {
        var g = Bi, E = gc(), C = s();
        if (!a0) {
          var M = s();
          St(C, M) || (c("The result of getSnapshot should be cached to avoid an infinite loop"), a0 = !0);
        }
        var I = E.memoizedState, P = !St(I, C);
        P && (E.memoizedState = C, N1());
        var W = E.queue;
        if (M1(sD.bind(null, g, W, r), [r]), W.getSnapshot !== s || P || // Check if the susbcribe function changed. We can save some memory by
        // checking whether we scheduled a subscription effect above.
        ns !== null && ns.memoizedState.tag & Ja) {
          g.flags |= ps, T1(Ja | Vs, aD.bind(null, g, W, C, s), void 0, null);
          var X = Xx();
          if (X === null)
            throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
          kd(X, pv) || rD(g, s, C);
        }
        return C;
      }
      function rD(r, s, h) {
        r.flags |= Ga;
        var g = {
          getSnapshot: s,
          value: h
        }, E = Bi.updateQueue;
        if (E === null)
          E = iD(), Bi.updateQueue = E, E.stores = [g];
        else {
          var C = E.stores;
          C === null ? E.stores = [g] : C.push(g);
        }
      }
      function aD(r, s, h, g) {
        s.value = h, s.getSnapshot = g, oD(s) && lD(r);
      }
      function sD(r, s, h) {
        var g = function() {
          oD(s) && lD(r);
        };
        return h(g);
      }
      function oD(r) {
        var s = r.getSnapshot, h = r.value;
        try {
          var g = s();
          return !St(h, g);
        } catch {
          return !0;
        }
      }
      function lD(r) {
        var s = xl(r, Bt);
        s !== null && ss(s, r, Bt, oi);
      }
      function Ex(r) {
        var s = Rh();
        typeof r == "function" && (r = r()), s.memoizedState = s.baseState = r;
        var h = {
          pending: null,
          interleaved: null,
          lanes: je,
          dispatch: null,
          lastRenderedReducer: ER,
          lastRenderedState: r
        };
        s.queue = h;
        var g = h.dispatch = r4.bind(null, Bi, h);
        return [s.memoizedState, g];
      }
      function CR(r) {
        return xR(ER);
      }
      function TR(r) {
        return bR(ER);
      }
      function T1(r, s, h, g) {
        var E = {
          tag: r,
          create: s,
          destroy: h,
          deps: g,
          // Circular
          next: null
        }, C = Bi.updateQueue;
        if (C === null)
          C = iD(), Bi.updateQueue = C, C.lastEffect = E.next = E;
        else {
          var M = C.lastEffect;
          if (M === null)
            C.lastEffect = E.next = E;
          else {
            var I = M.next;
            M.next = E, E.next = I, C.lastEffect = E;
          }
        }
        return E;
      }
      function RR(r) {
        var s = Rh();
        {
          var h = {
            current: r
          };
          return s.memoizedState = h, h;
        }
      }
      function Sx(r) {
        var s = gc();
        return s.memoizedState;
      }
      function R1(r, s, h, g) {
        var E = Rh(), C = g === void 0 ? null : g;
        Bi.flags |= r, E.memoizedState = T1(Ja | s, h, void 0, C);
      }
      function xx(r, s, h, g) {
        var E = gc(), C = g === void 0 ? null : g, M = void 0;
        if (ts !== null) {
          var I = ts.memoizedState;
          if (M = I.destroy, C !== null) {
            var P = I.deps;
            if (_R(C, P)) {
              E.memoizedState = T1(s, h, M, C);
              return;
            }
          }
        }
        Bi.flags |= r, E.memoizedState = T1(Ja | s, h, M, C);
      }
      function bx(r, s) {
        return (Bi.mode & lo) !== Ft ? R1(zc | ps | la, Vs, r, s) : R1(ps | la, Vs, r, s);
      }
      function M1(r, s) {
        return xx(ps, Vs, r, s);
      }
      function MR(r, s) {
        return R1(At, Th, r, s);
      }
      function wx(r, s) {
        return xx(At, Th, r, s);
      }
      function OR(r, s) {
        var h = At;
        return h |= ao, (Bi.mode & lo) !== Ft && (h |= so), R1(h, es, r, s);
      }
      function Cx(r, s) {
        return xx(At, es, r, s);
      }
      function uD(r, s) {
        if (typeof s == "function") {
          var h = s, g = r();
          return h(g), function() {
            h(null);
          };
        } else if (s != null) {
          var E = s;
          E.hasOwnProperty("current") || c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(E).join(", ") + "}");
          var C = r();
          return E.current = C, function() {
            E.current = null;
          };
        }
      }
      function AR(r, s, h) {
        typeof s != "function" && c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", s !== null ? typeof s : "null");
        var g = h != null ? h.concat([r]) : null, E = At;
        return E |= ao, (Bi.mode & lo) !== Ft && (E |= so), R1(E, es, uD.bind(null, s, r), g);
      }
      function Tx(r, s, h) {
        typeof s != "function" && c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", s !== null ? typeof s : "null");
        var g = h != null ? h.concat([r]) : null;
        return xx(At, es, uD.bind(null, s, r), g);
      }
      function e4(r, s) {
      }
      var Rx = e4;
      function LR(r, s) {
        var h = Rh(), g = s === void 0 ? null : s;
        return h.memoizedState = [r, g], r;
      }
      function Mx(r, s) {
        var h = gc(), g = s === void 0 ? null : s, E = h.memoizedState;
        if (E !== null && g !== null) {
          var C = E[1];
          if (_R(g, C))
            return E[0];
        }
        return h.memoizedState = [r, g], r;
      }
      function NR(r, s) {
        var h = Rh(), g = s === void 0 ? null : s, E = r();
        return h.memoizedState = [E, g], E;
      }
      function Ox(r, s) {
        var h = gc(), g = s === void 0 ? null : s, E = h.memoizedState;
        if (E !== null && g !== null) {
          var C = E[1];
          if (_R(g, C))
            return E[0];
        }
        var M = r();
        return h.memoizedState = [M, g], M;
      }
      function DR(r) {
        var s = Rh();
        return s.memoizedState = r, r;
      }
      function cD(r) {
        var s = gc(), h = ts, g = h.memoizedState;
        return hD(s, g, r);
      }
      function fD(r) {
        var s = gc();
        if (ts === null)
          return s.memoizedState = r, r;
        var h = ts.memoizedState;
        return hD(s, h, r);
      }
      function hD(r, s, h) {
        var g = !Xp(pv);
        if (g) {
          if (!St(h, s)) {
            var E = Dm();
            Bi.lanes = an(Bi.lanes, E), H1(E), r.baseState = !0;
          }
          return s;
        } else
          return r.baseState && (r.baseState = !1, N1()), r.memoizedState = h, h;
      }
      function t4(r, s, h) {
        var g = uo();
        gr(N_(g, or)), r(!0);
        var E = b1.transition;
        b1.transition = {};
        var C = b1.transition;
        b1.transition._updatedFibers = /* @__PURE__ */ new Set();
        try {
          r(!1), s();
        } finally {
          if (gr(g), b1.transition = E, E === null && C._updatedFibers) {
            var M = C._updatedFibers.size;
            M > 10 && u("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."), C._updatedFibers.clear();
          }
        }
      }
      function IR() {
        var r = Ex(!1), s = r[0], h = r[1], g = t4.bind(null, h), E = Rh();
        return E.memoizedState = g, [s, g];
      }
      function dD() {
        var r = CR(), s = r[0], h = gc(), g = h.memoizedState;
        return [s, g];
      }
      function pD() {
        var r = TR(), s = r[0], h = gc(), g = h.memoizedState;
        return [s, g];
      }
      var gD = !1;
      function n4() {
        return gD;
      }
      function PR() {
        var r = Rh(), s = Xx(), h = s.identifierPrefix, g;
        if (Bs()) {
          var E = mz();
          g = ":" + h + "R" + E;
          var C = C1++;
          C > 0 && (g += "H" + C.toString(32)), g += ":";
        } else {
          var M = Zz++;
          g = ":" + h + "r" + M.toString(32) + ":";
        }
        return r.memoizedState = g, g;
      }
      function Ax() {
        var r = gc(), s = r.memoizedState;
        return s;
      }
      function i4(r, s, h) {
        typeof arguments[3] == "function" && c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
        var g = Dg(r), E = {
          lane: g,
          action: h,
          hasEagerState: !1,
          eagerState: null,
          next: null
        };
        if (mD(r))
          vD(s, E);
        else {
          var C = IN(r, s, E, g);
          if (C !== null) {
            var M = Go();
            ss(C, r, g, M), yD(C, s, g);
          }
        }
        _D(r, g);
      }
      function r4(r, s, h) {
        typeof arguments[3] == "function" && c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
        var g = Dg(r), E = {
          lane: g,
          action: h,
          hasEagerState: !1,
          eagerState: null,
          next: null
        };
        if (mD(r))
          vD(s, E);
        else {
          var C = r.alternate;
          if (r.lanes === je && (C === null || C.lanes === je)) {
            var M = s.lastRenderedReducer;
            if (M !== null) {
              var I;
              I = mt.current, mt.current = df;
              try {
                var P = s.lastRenderedState, W = M(P, h);
                if (E.hasEagerState = !0, E.eagerState = W, St(W, P)) {
                  kz(r, s, E, g);
                  return;
                }
              } catch {
              } finally {
                mt.current = I;
              }
            }
          }
          var X = IN(r, s, E, g);
          if (X !== null) {
            var de = Go();
            ss(X, r, g, de), yD(X, s, g);
          }
        }
        _D(r, g);
      }
      function mD(r) {
        var s = r.alternate;
        return r === Bi || s !== null && s === Bi;
      }
      function vD(r, s) {
        w1 = yx = !0;
        var h = r.pending;
        h === null ? s.next = s : (s.next = h.next, h.next = s), r.pending = s;
      }
      function yD(r, s, h) {
        if (ch(h)) {
          var g = s.lanes;
          g = Kp(g, r.pendingLanes);
          var E = an(g, h);
          s.lanes = E, fh(r, E);
        }
      }
      function _D(r, s, h) {
        wd(r, s);
      }
      var Lx = {
        readContext: ja,
        useCallback: So,
        useContext: So,
        useEffect: So,
        useImperativeHandle: So,
        useInsertionEffect: So,
        useLayoutEffect: So,
        useMemo: So,
        useReducer: So,
        useRef: So,
        useState: So,
        useDebugValue: So,
        useDeferredValue: So,
        useTransition: So,
        useMutableSource: So,
        useSyncExternalStore: So,
        useId: So,
        unstable_isNewReconciler: Ae
      }, ED = null, SD = null, xD = null, bD = null, Mh = null, df = null, Nx = null;
      {
        var kR = function() {
          c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
        }, on = function() {
          c("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks");
        };
        ED = {
          readContext: function(r) {
            return ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", Ri(), s0(s), LR(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", Ri(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", Ri(), s0(s), bx(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", Ri(), s0(h), AR(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", Ri(), s0(s), MR(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", Ri(), s0(s), OR(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", Ri(), s0(s);
            var h = mt.current;
            mt.current = Mh;
            try {
              return NR(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", Ri();
            var g = mt.current;
            mt.current = Mh;
            try {
              return SR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", Ri(), RR(r);
          },
          useState: function(r) {
            ze = "useState", Ri();
            var s = mt.current;
            mt.current = Mh;
            try {
              return Ex(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", Ri(), void 0;
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", Ri(), DR(r);
          },
          useTransition: function() {
            return ze = "useTransition", Ri(), IR();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", Ri(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", Ri(), wR(r, s, h);
          },
          useId: function() {
            return ze = "useId", Ri(), PR();
          },
          unstable_isNewReconciler: Ae
        }, SD = {
          readContext: function(r) {
            return ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", ut(), LR(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", ut(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", ut(), bx(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", ut(), AR(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", ut(), MR(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", ut(), OR(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", ut();
            var h = mt.current;
            mt.current = Mh;
            try {
              return NR(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", ut();
            var g = mt.current;
            mt.current = Mh;
            try {
              return SR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", ut(), RR(r);
          },
          useState: function(r) {
            ze = "useState", ut();
            var s = mt.current;
            mt.current = Mh;
            try {
              return Ex(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", ut(), void 0;
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", ut(), DR(r);
          },
          useTransition: function() {
            return ze = "useTransition", ut(), IR();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", ut(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", ut(), wR(r, s, h);
          },
          useId: function() {
            return ze = "useId", ut(), PR();
          },
          unstable_isNewReconciler: Ae
        }, xD = {
          readContext: function(r) {
            return ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", ut(), Mx(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", ut(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", ut(), M1(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", ut(), Tx(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", ut(), wx(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", ut(), Cx(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", ut();
            var h = mt.current;
            mt.current = df;
            try {
              return Ox(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", ut();
            var g = mt.current;
            mt.current = df;
            try {
              return xR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", ut(), Sx();
          },
          useState: function(r) {
            ze = "useState", ut();
            var s = mt.current;
            mt.current = df;
            try {
              return CR(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", ut(), Rx();
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", ut(), cD(r);
          },
          useTransition: function() {
            return ze = "useTransition", ut(), dD();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", ut(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", ut(), _x(r, s);
          },
          useId: function() {
            return ze = "useId", ut(), Ax();
          },
          unstable_isNewReconciler: Ae
        }, bD = {
          readContext: function(r) {
            return ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", ut(), Mx(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", ut(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", ut(), M1(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", ut(), Tx(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", ut(), wx(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", ut(), Cx(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", ut();
            var h = mt.current;
            mt.current = Nx;
            try {
              return Ox(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", ut();
            var g = mt.current;
            mt.current = Nx;
            try {
              return bR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", ut(), Sx();
          },
          useState: function(r) {
            ze = "useState", ut();
            var s = mt.current;
            mt.current = Nx;
            try {
              return TR(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", ut(), Rx();
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", ut(), fD(r);
          },
          useTransition: function() {
            return ze = "useTransition", ut(), pD();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", ut(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", ut(), _x(r, s);
          },
          useId: function() {
            return ze = "useId", ut(), Ax();
          },
          unstable_isNewReconciler: Ae
        }, Mh = {
          readContext: function(r) {
            return kR(), ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", on(), Ri(), LR(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", on(), Ri(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", on(), Ri(), bx(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", on(), Ri(), AR(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", on(), Ri(), MR(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", on(), Ri(), OR(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", on(), Ri();
            var h = mt.current;
            mt.current = Mh;
            try {
              return NR(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", on(), Ri();
            var g = mt.current;
            mt.current = Mh;
            try {
              return SR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", on(), Ri(), RR(r);
          },
          useState: function(r) {
            ze = "useState", on(), Ri();
            var s = mt.current;
            mt.current = Mh;
            try {
              return Ex(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", on(), Ri(), void 0;
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", on(), Ri(), DR(r);
          },
          useTransition: function() {
            return ze = "useTransition", on(), Ri(), IR();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", on(), Ri(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", on(), Ri(), wR(r, s, h);
          },
          useId: function() {
            return ze = "useId", on(), Ri(), PR();
          },
          unstable_isNewReconciler: Ae
        }, df = {
          readContext: function(r) {
            return kR(), ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", on(), ut(), Mx(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", on(), ut(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", on(), ut(), M1(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", on(), ut(), Tx(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", on(), ut(), wx(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", on(), ut(), Cx(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", on(), ut();
            var h = mt.current;
            mt.current = df;
            try {
              return Ox(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", on(), ut();
            var g = mt.current;
            mt.current = df;
            try {
              return xR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", on(), ut(), Sx();
          },
          useState: function(r) {
            ze = "useState", on(), ut();
            var s = mt.current;
            mt.current = df;
            try {
              return CR(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", on(), ut(), Rx();
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", on(), ut(), cD(r);
          },
          useTransition: function() {
            return ze = "useTransition", on(), ut(), dD();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", on(), ut(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", on(), ut(), _x(r, s);
          },
          useId: function() {
            return ze = "useId", on(), ut(), Ax();
          },
          unstable_isNewReconciler: Ae
        }, Nx = {
          readContext: function(r) {
            return kR(), ja(r);
          },
          useCallback: function(r, s) {
            return ze = "useCallback", on(), ut(), Mx(r, s);
          },
          useContext: function(r) {
            return ze = "useContext", on(), ut(), ja(r);
          },
          useEffect: function(r, s) {
            return ze = "useEffect", on(), ut(), M1(r, s);
          },
          useImperativeHandle: function(r, s, h) {
            return ze = "useImperativeHandle", on(), ut(), Tx(r, s, h);
          },
          useInsertionEffect: function(r, s) {
            return ze = "useInsertionEffect", on(), ut(), wx(r, s);
          },
          useLayoutEffect: function(r, s) {
            return ze = "useLayoutEffect", on(), ut(), Cx(r, s);
          },
          useMemo: function(r, s) {
            ze = "useMemo", on(), ut();
            var h = mt.current;
            mt.current = df;
            try {
              return Ox(r, s);
            } finally {
              mt.current = h;
            }
          },
          useReducer: function(r, s, h) {
            ze = "useReducer", on(), ut();
            var g = mt.current;
            mt.current = df;
            try {
              return bR(r, s, h);
            } finally {
              mt.current = g;
            }
          },
          useRef: function(r) {
            return ze = "useRef", on(), ut(), Sx();
          },
          useState: function(r) {
            ze = "useState", on(), ut();
            var s = mt.current;
            mt.current = df;
            try {
              return TR(r);
            } finally {
              mt.current = s;
            }
          },
          useDebugValue: function(r, s) {
            return ze = "useDebugValue", on(), ut(), Rx();
          },
          useDeferredValue: function(r) {
            return ze = "useDeferredValue", on(), ut(), fD(r);
          },
          useTransition: function() {
            return ze = "useTransition", on(), ut(), pD();
          },
          useMutableSource: function(r, s, h) {
            return ze = "useMutableSource", on(), ut(), void 0;
          },
          useSyncExternalStore: function(r, s, h) {
            return ze = "useSyncExternalStore", on(), ut(), _x(r, s);
          },
          useId: function() {
            return ze = "useId", on(), ut(), Ax();
          },
          unstable_isNewReconciler: Ae
        };
      }
      var Og = t.unstable_now, wD = 0, Dx = -1, O1 = -1, Ix = -1, FR = !1, Px = !1;
      function CD() {
        return FR;
      }
      function a4() {
        Px = !0;
      }
      function s4() {
        FR = !1, Px = !1;
      }
      function o4() {
        FR = Px, Px = !1;
      }
      function TD() {
        return wD;
      }
      function RD() {
        wD = Og();
      }
      function jR(r) {
        O1 = Og(), r.actualStartTime < 0 && (r.actualStartTime = Og());
      }
      function MD(r) {
        O1 = -1;
      }
      function kx(r, s) {
        if (O1 >= 0) {
          var h = Og() - O1;
          r.actualDuration += h, s && (r.selfBaseDuration = h), O1 = -1;
        }
      }
      function Oh(r) {
        if (Dx >= 0) {
          var s = Og() - Dx;
          Dx = -1;
          for (var h = r.return; h !== null; ) {
            switch (h.tag) {
              case b:
                var g = h.stateNode;
                g.effectDuration += s;
                return;
              case z:
                var E = h.stateNode;
                E.effectDuration += s;
                return;
            }
            h = h.return;
          }
        }
      }
      function UR(r) {
        if (Ix >= 0) {
          var s = Og() - Ix;
          Ix = -1;
          for (var h = r.return; h !== null; ) {
            switch (h.tag) {
              case b:
                var g = h.stateNode;
                g !== null && (g.passiveEffectDuration += s);
                return;
              case z:
                var E = h.stateNode;
                E !== null && (E.passiveEffectDuration += s);
                return;
            }
            h = h.return;
          }
        }
      }
      function Ah() {
        Dx = Og();
      }
      function zR() {
        Ix = Og();
      }
      function $R(r) {
        for (var s = r.child; s; )
          r.actualDuration += s.actualDuration, s = s.sibling;
      }
      function gv(r, s) {
        return {
          value: r,
          source: s,
          stack: Cc(s),
          digest: null
        };
      }
      function BR(r, s, h) {
        return {
          value: r,
          source: null,
          stack: h ?? null,
          digest: s ?? null
        };
      }
      function l4(r, s) {
        return !0;
      }
      function VR(r, s) {
        try {
          var h = l4(r, s);
          if (h === !1)
            return;
          var g = s.value, E = s.source, C = s.stack, M = C !== null ? C : "";
          if (g != null && g._suppressLogging) {
            if (r.tag === _)
              return;
            console.error(g);
          }
          var I = E ? Qt(E) : null, P = I ? "The above error occurred in the <" + I + "> component:" : "The above error occurred in one of your React components:", W;
          if (r.tag === b)
            W = `Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;
          else {
            var X = Qt(r) || "Anonymous";
            W = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + X + ".");
          }
          var de = P + `
` + M + `

` + ("" + W);
          console.error(de);
        } catch (he) {
          setTimeout(function() {
            throw he;
          });
        }
      }
      var u4 = typeof WeakMap == "function" ? WeakMap : Map;
      function OD(r, s, h) {
        var g = sp(oi, h);
        g.tag = VT, g.payload = {
          element: null
        };
        var E = s.value;
        return g.callback = function() {
          t$(E), VR(r, s);
        }, g;
      }
      function HR(r, s, h) {
        var g = sp(oi, h);
        g.tag = VT;
        var E = r.type.getDerivedStateFromError;
        if (typeof E == "function") {
          var C = s.value;
          g.payload = function() {
            return E(C);
          }, g.callback = function() {
            zI(r), VR(r, s);
          };
        }
        var M = r.stateNode;
        return M !== null && typeof M.componentDidCatch == "function" && (g.callback = function() {
          zI(r), VR(r, s), typeof E != "function" && J6(this);
          var P = s.value, W = s.stack;
          this.componentDidCatch(P, {
            componentStack: W !== null ? W : ""
          }), typeof E != "function" && (Ka(r.lanes, Bt) || c("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", Qt(r) || "Unknown"));
        }), g;
      }
      function AD(r, s, h) {
        var g = r.pingCache, E;
        if (g === null ? (g = r.pingCache = new u4(), E = /* @__PURE__ */ new Set(), g.set(s, E)) : (E = g.get(s), E === void 0 && (E = /* @__PURE__ */ new Set(), g.set(s, E))), !E.has(h)) {
          E.add(h);
          var C = n$.bind(null, r, s, h);
          ys && W1(r, h), s.then(C, C);
        }
      }
      function c4(r, s, h, g) {
        var E = r.updateQueue;
        if (E === null) {
          var C = /* @__PURE__ */ new Set();
          C.add(h), r.updateQueue = C;
        } else
          E.add(h);
      }
      function f4(r, s) {
        var h = r.tag;
        if ((r.mode & Ot) === Ft && (h === y || h === V || h === ue)) {
          var g = r.alternate;
          g ? (r.updateQueue = g.updateQueue, r.memoizedState = g.memoizedState, r.lanes = g.lanes) : (r.updateQueue = null, r.memoizedState = null);
        }
      }
      function LD(r) {
        var s = r;
        do {
          if (s.tag === G && Xz(s))
            return s;
          s = s.return;
        } while (s !== null);
        return null;
      }
      function ND(r, s, h, g, E) {
        if ((r.mode & Ot) === Ft) {
          if (r === s)
            r.flags |= ya;
          else {
            if (r.flags |= tn, h.flags |= zp, h.flags &= ~(py | Vu), h.tag === _) {
              var C = h.alternate;
              if (C === null)
                h.tag = Oe;
              else {
                var M = sp(oi, Bt);
                M.tag = sx, Cg(h, M, Bt);
              }
            }
            h.lanes = an(h.lanes, Bt);
          }
          return r;
        }
        return r.flags |= ya, r.lanes = E, r;
      }
      function h4(r, s, h, g, E) {
        if (h.flags |= Vu, ys && W1(r, E), g !== null && typeof g == "object" && typeof g.then == "function") {
          var C = g;
          f4(h), Bs() && h.mode & Ot && xN();
          var M = LD(s);
          if (M !== null) {
            M.flags &= ~hr, ND(M, s, h, r, E), M.mode & Ot && AD(r, C, E), c4(M, r, C);
            return;
          } else {
            if (!lh(E)) {
              AD(r, C, E), bM();
              return;
            }
            var I = new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");
            g = I;
          }
        } else if (Bs() && h.mode & Ot) {
          xN();
          var P = LD(s);
          if (P !== null) {
            (P.flags & ya) === kt && (P.flags |= hr), ND(P, s, h, r, E), kT(gv(g, h));
            return;
          }
        }
        g = gv(g, h), W6(g);
        var W = s;
        do {
          switch (W.tag) {
            case b: {
              var X = g;
              W.flags |= ya;
              var de = Yc(E);
              W.lanes = an(W.lanes, de);
              var he = OD(W, X, de);
              GT(W, he);
              return;
            }
            case _:
              var we = g, Ce = W.type, Pe = W.stateNode;
              if ((W.flags & tn) === kt && (typeof Ce.getDerivedStateFromError == "function" || Pe !== null && typeof Pe.componentDidCatch == "function" && !LI(Pe))) {
                W.flags |= ya;
                var yt = Yc(E);
                W.lanes = an(W.lanes, yt);
                var Vt = HR(W, we, yt);
                GT(W, Vt);
                return;
              }
              break;
          }
          W = W.return;
        } while (W !== null);
      }
      function d4() {
        return null;
      }
      var A1 = i.ReactCurrentOwner, pf = !1, WR, L1, GR, YR, qR, mv, XR, Fx;
      WR = {}, L1 = {}, GR = {}, YR = {}, qR = {}, mv = !1, XR = {}, Fx = {};
      function Ho(r, s, h, g) {
        r === null ? s.child = KN(s, null, h, g) : s.child = t0(s, r.child, h, g);
      }
      function p4(r, s, h, g) {
        s.child = t0(s, r.child, null, g), s.child = t0(s, null, h, g);
      }
      function DD(r, s, h, g, E) {
        if (s.type !== s.elementType) {
          var C = h.propTypes;
          C && Br(
            C,
            g,
            // Resolved props
            "prop",
            Un(h)
          );
        }
        var M = h.render, I = s.ref, P, W;
        e0(s, E), Kf(s);
        {
          if (A1.current = s, Qr(!0), P = o0(r, s, M, g, I, E), W = l0(), s.mode & sr) {
            wi(!0);
            try {
              P = o0(r, s, M, g, I, E), W = l0();
            } finally {
              wi(!1);
            }
          }
          Qr(!1);
        }
        return Fo(), r !== null && !pf ? (tD(r, s, E), op(r, s, E)) : (Bs() && W && AT(s), s.flags |= Do, Ho(r, s, P, E), s.child);
      }
      function ID(r, s, h, g, E) {
        if (r === null) {
          var C = h.type;
          if (_$(C) && h.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
          h.defaultProps === void 0) {
            var M = C;
            return M = m0(C), s.tag = ue, s.type = M, QR(s, C), PD(r, s, M, g, E);
          }
          {
            var I = C.propTypes;
            I && Br(
              I,
              g,
              // Resolved props
              "prop",
              Un(C)
            );
          }
          var P = IM(h.type, null, g, s, s.mode, E);
          return P.ref = s.ref, P.return = s, s.child = P, P;
        }
        {
          var W = h.type, X = W.propTypes;
          X && Br(
            X,
            g,
            // Resolved props
            "prop",
            Un(W)
          );
        }
        var de = r.child, he = rM(r, E);
        if (!he) {
          var we = de.memoizedProps, Ce = h.compare;
          if (Ce = Ce !== null ? Ce : Gt, Ce(we, g) && r.ref === s.ref)
            return op(r, s, E);
        }
        s.flags |= Do;
        var Pe = Sv(de, g);
        return Pe.ref = s.ref, Pe.return = s, s.child = Pe, Pe;
      }
      function PD(r, s, h, g, E) {
        if (s.type !== s.elementType) {
          var C = s.elementType;
          if (C.$$typeof === It) {
            var M = C, I = M._payload, P = M._init;
            try {
              C = P(I);
            } catch {
              C = null;
            }
            var W = C && C.propTypes;
            W && Br(
              W,
              g,
              // Resolved (SimpleMemoComponent has no defaultProps)
              "prop",
              Un(C)
            );
          }
        }
        if (r !== null) {
          var X = r.memoizedProps;
          if (Gt(X, g) && r.ref === s.ref && // Prevent bailout if the implementation changed due to hot reload.
          s.type === r.type)
            if (pf = !1, s.pendingProps = g = X, rM(r, E))
              (r.flags & zp) !== kt && (pf = !0);
            else
              return s.lanes = r.lanes, op(r, s, E);
        }
        return KR(r, s, h, g, E);
      }
      function kD(r, s, h) {
        var g = s.pendingProps, E = g.children, C = r !== null ? r.memoizedState : null;
        if (g.mode === "hidden" || Z)
          if ((s.mode & Ot) === Ft) {
            var M = {
              baseLanes: je,
              cachePool: null,
              transitions: null
            };
            s.memoizedState = M, Kx(s, h);
          } else if (Ka(h, Fs)) {
            var de = {
              baseLanes: je,
              cachePool: null,
              transitions: null
            };
            s.memoizedState = de;
            var he = C !== null ? C.baseLanes : h;
            Kx(s, he);
          } else {
            var I = null, P;
            if (C !== null) {
              var W = C.baseLanes;
              P = an(W, h);
            } else
              P = h;
            s.lanes = s.childLanes = Fs;
            var X = {
              baseLanes: P,
              cachePool: I,
              transitions: null
            };
            return s.memoizedState = X, s.updateQueue = null, Kx(s, P), null;
          }
        else {
          var we;
          C !== null ? (we = an(C.baseLanes, h), s.memoizedState = null) : we = h, Kx(s, we);
        }
        return Ho(r, s, E, h), s.child;
      }
      function g4(r, s, h) {
        var g = s.pendingProps;
        return Ho(r, s, g, h), s.child;
      }
      function m4(r, s, h) {
        var g = s.pendingProps.children;
        return Ho(r, s, g, h), s.child;
      }
      function v4(r, s, h) {
        {
          s.flags |= At;
          {
            var g = s.stateNode;
            g.effectDuration = 0, g.passiveEffectDuration = 0;
          }
        }
        var E = s.pendingProps, C = E.children;
        return Ho(r, s, C, h), s.child;
      }
      function FD(r, s) {
        var h = s.ref;
        (r === null && h !== null || r !== null && r.ref !== h) && (s.flags |= Ps, s.flags |= dl);
      }
      function KR(r, s, h, g, E) {
        if (s.type !== s.elementType) {
          var C = h.propTypes;
          C && Br(
            C,
            g,
            // Resolved props
            "prop",
            Un(h)
          );
        }
        var M;
        {
          var I = qy(s, h, !0);
          M = Xy(s, I);
        }
        var P, W;
        e0(s, E), Kf(s);
        {
          if (A1.current = s, Qr(!0), P = o0(r, s, h, g, M, E), W = l0(), s.mode & sr) {
            wi(!0);
            try {
              P = o0(r, s, h, g, M, E), W = l0();
            } finally {
              wi(!1);
            }
          }
          Qr(!1);
        }
        return Fo(), r !== null && !pf ? (tD(r, s, E), op(r, s, E)) : (Bs() && W && AT(s), s.flags |= Do, Ho(r, s, P, E), s.child);
      }
      function jD(r, s, h, g, E) {
        {
          switch (I$(s)) {
            case !1: {
              var C = s.stateNode, M = s.type, I = new M(s.memoizedProps, C.context), P = I.state;
              C.updater.enqueueSetState(C, P, null);
              break;
            }
            case !0: {
              s.flags |= tn, s.flags |= ya;
              var W = new Error("Simulated error coming from DevTools"), X = Yc(E);
              s.lanes = an(s.lanes, X);
              var de = HR(s, gv(W, s), X);
              GT(s, de);
              break;
            }
          }
          if (s.type !== s.elementType) {
            var he = h.propTypes;
            he && Br(
              he,
              g,
              // Resolved props
              "prop",
              Un(h)
            );
          }
        }
        var we;
        Ch(h) ? (we = !0, XS(s)) : we = !1, e0(s, E);
        var Ce = s.stateNode, Pe;
        Ce === null ? (Ux(r, s), WN(s, h, g), rR(s, h, g, E), Pe = !0) : r === null ? Pe = Vz(s, h, g, E) : Pe = Hz(r, s, h, g, E);
        var yt = ZR(r, s, h, Pe, we, E);
        {
          var Vt = s.stateNode;
          Pe && Vt.props !== g && (mv || c("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", Qt(s) || "a component"), mv = !0);
        }
        return yt;
      }
      function ZR(r, s, h, g, E, C) {
        FD(r, s);
        var M = (s.flags & tn) !== kt;
        if (!g && !M)
          return E && yN(s, h, !1), op(r, s, C);
        var I = s.stateNode;
        A1.current = s;
        var P;
        if (M && typeof h.getDerivedStateFromError != "function")
          P = null, MD();
        else {
          Kf(s);
          {
            if (Qr(!0), P = I.render(), s.mode & sr) {
              wi(!0);
              try {
                I.render();
              } finally {
                wi(!1);
              }
            }
            Qr(!1);
          }
          Fo();
        }
        return s.flags |= Do, r !== null && M ? p4(r, s, P, C) : Ho(r, s, P, C), s.memoizedState = I.state, E && yN(s, h, !0), s.child;
      }
      function UD(r) {
        var s = r.stateNode;
        s.pendingContext ? mN(r, s.pendingContext, s.pendingContext !== s.context) : s.context && mN(r, s.context, !1), cR(r, s.containerInfo);
      }
      function y4(r, s, h) {
        if (UD(s), r === null)
          throw new Error("Should have a current fiber. This is a bug in React.");
        var g = s.pendingProps, E = s.memoizedState, C = E.element;
        FN(r, s), cx(s, g, null, h);
        var M = s.memoizedState;
        s.stateNode;
        var I = M.element;
        if (E.isDehydrated) {
          var P = {
            element: I,
            isDehydrated: !1,
            cache: M.cache,
            pendingSuspenseBoundaries: M.pendingSuspenseBoundaries,
            transitions: M.transitions
          }, W = s.updateQueue;
          if (W.baseState = P, s.memoizedState = P, s.flags & hr) {
            var X = gv(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."), s);
            return zD(r, s, I, h, X);
          } else if (I !== C) {
            var de = gv(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."), s);
            return zD(r, s, I, h, de);
          } else {
            xz(s);
            var he = KN(s, null, I, h);
            s.child = he;
            for (var we = he; we; )
              we.flags = we.flags & ~qn | hl, we = we.sibling;
          }
        } else {
          if (Qy(), I === C)
            return op(r, s, h);
          Ho(r, s, I, h);
        }
        return s.child;
      }
      function zD(r, s, h, g, E) {
        return Qy(), kT(E), s.flags |= hr, Ho(r, s, h, g), s.child;
      }
      function _4(r, s, h) {
        QN(s), r === null && PT(s);
        var g = s.type, E = s.pendingProps, C = r !== null ? r.memoizedProps : null, M = E.children, I = t1(g, E);
        return I ? M = null : C !== null && t1(g, C) && (s.flags |= ro), FD(r, s), Ho(r, s, M, h), s.child;
      }
      function E4(r, s) {
        return r === null && PT(s), null;
      }
      function S4(r, s, h, g) {
        Ux(r, s);
        var E = s.pendingProps, C = h, M = C._payload, I = C._init, P = I(M);
        s.type = P;
        var W = s.tag = E$(P), X = ff(P, E), de;
        switch (W) {
          case y:
            return QR(s, P), s.type = P = m0(P), de = KR(null, s, P, X, g), de;
          case _:
            return s.type = P = MM(P), de = jD(null, s, P, X, g), de;
          case V:
            return s.type = P = OM(P), de = DD(null, s, P, X, g), de;
          case ie: {
            if (s.type !== s.elementType) {
              var he = P.propTypes;
              he && Br(
                he,
                X,
                // Resolved for outer only
                "prop",
                Un(P)
              );
            }
            return de = ID(
              null,
              s,
              P,
              ff(P.type, X),
              // The inner type can have defaults too
              g
            ), de;
          }
        }
        var we = "";
        throw P !== null && typeof P == "object" && P.$$typeof === It && (we = " Did you wrap a component in React.lazy() more than once?"), new Error("Element type is invalid. Received a promise that resolves to: " + P + ". " + ("Lazy element type must resolve to a class or function." + we));
      }
      function x4(r, s, h, g, E) {
        Ux(r, s), s.tag = _;
        var C;
        return Ch(h) ? (C = !0, XS(s)) : C = !1, e0(s, E), WN(s, h, g), rR(s, h, g, E), ZR(null, s, h, !0, C, E);
      }
      function b4(r, s, h, g) {
        Ux(r, s);
        var E = s.pendingProps, C;
        {
          var M = qy(s, h, !1);
          C = Xy(s, M);
        }
        e0(s, g);
        var I, P;
        Kf(s);
        {
          if (h.prototype && typeof h.prototype.render == "function") {
            var W = Un(h) || "Unknown";
            WR[W] || (c("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", W, W), WR[W] = !0);
          }
          s.mode & sr && cf.recordLegacyContextWarning(s, null), Qr(!0), A1.current = s, I = o0(null, s, h, E, C, g), P = l0(), Qr(!1);
        }
        if (Fo(), s.flags |= Do, typeof I == "object" && I !== null && typeof I.render == "function" && I.$$typeof === void 0) {
          var X = Un(h) || "Unknown";
          L1[X] || (c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", X, X, X), L1[X] = !0);
        }
        if (
          // Run these checks in production only if the flag is off.
          // Eventually we'll delete this branch altogether.
          typeof I == "object" && I !== null && typeof I.render == "function" && I.$$typeof === void 0
        ) {
          {
            var de = Un(h) || "Unknown";
            L1[de] || (c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", de, de, de), L1[de] = !0);
          }
          s.tag = _, s.memoizedState = null, s.updateQueue = null;
          var he = !1;
          return Ch(h) ? (he = !0, XS(s)) : he = !1, s.memoizedState = I.state !== null && I.state !== void 0 ? I.state : null, WT(s), HN(s, I), rR(s, h, E, g), ZR(null, s, h, !0, he, g);
        } else {
          if (s.tag = y, s.mode & sr) {
            wi(!0);
            try {
              I = o0(null, s, h, E, C, g), P = l0();
            } finally {
              wi(!1);
            }
          }
          return Bs() && P && AT(s), Ho(null, s, I, g), QR(s, h), s.child;
        }
      }
      function QR(r, s) {
        {
          if (s && s.childContextTypes && c("%s(...): childContextTypes cannot be defined on a function component.", s.displayName || s.name || "Component"), r.ref !== null) {
            var h = "", g = Ls();
            g && (h += `

Check the render method of \`` + g + "`.");
            var E = g || "", C = r._debugSource;
            C && (E = C.fileName + ":" + C.lineNumber), qR[E] || (qR[E] = !0, c("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s", h));
          }
          if (typeof s.getDerivedStateFromProps == "function") {
            var M = Un(s) || "Unknown";
            YR[M] || (c("%s: Function components do not support getDerivedStateFromProps.", M), YR[M] = !0);
          }
          if (typeof s.contextType == "object" && s.contextType !== null) {
            var I = Un(s) || "Unknown";
            GR[I] || (c("%s: Function components do not support contextType.", I), GR[I] = !0);
          }
        }
      }
      var JR = {
        dehydrated: null,
        treeContext: null,
        retryLane: Pr
      };
      function eM(r) {
        return {
          baseLanes: r,
          cachePool: d4(),
          transitions: null
        };
      }
      function w4(r, s) {
        var h = null;
        return {
          baseLanes: an(r.baseLanes, s),
          cachePool: h,
          transitions: r.transitions
        };
      }
      function C4(r, s, h, g) {
        if (s !== null) {
          var E = s.memoizedState;
          if (E === null)
            return !1;
        }
        return dR(r, x1);
      }
      function T4(r, s) {
        return jd(r.childLanes, s);
      }
      function $D(r, s, h) {
        var g = s.pendingProps;
        P$(s) && (s.flags |= tn);
        var E = hf.current, C = !1, M = (s.flags & tn) !== kt;
        if (M || C4(E, r) ? (C = !0, s.flags &= ~tn) : (r === null || r.memoizedState !== null) && (E = qz(E, eD)), E = i0(E), Rg(s, E), r === null) {
          PT(s);
          var I = s.memoizedState;
          if (I !== null) {
            var P = I.dehydrated;
            if (P !== null)
              return L4(s, P);
          }
          var W = g.children, X = g.fallback;
          if (C) {
            var de = R4(s, W, X, h), he = s.child;
            return he.memoizedState = eM(h), s.memoizedState = JR, de;
          } else
            return tM(s, W);
        } else {
          var we = r.memoizedState;
          if (we !== null) {
            var Ce = we.dehydrated;
            if (Ce !== null)
              return N4(r, s, M, g, Ce, we, h);
          }
          if (C) {
            var Pe = g.fallback, yt = g.children, Vt = O4(r, s, yt, Pe, h), Nt = s.child, Kn = r.child.memoizedState;
            return Nt.memoizedState = Kn === null ? eM(h) : w4(Kn, h), Nt.childLanes = T4(r, h), s.memoizedState = JR, Vt;
          } else {
            var Bn = g.children, ye = M4(r, s, Bn, h);
            return s.memoizedState = null, ye;
          }
        }
      }
      function tM(r, s, h) {
        var g = r.mode, E = {
          mode: "visible",
          children: s
        }, C = nM(E, g);
        return C.return = r, r.child = C, C;
      }
      function R4(r, s, h, g) {
        var E = r.mode, C = r.child, M = {
          mode: "hidden",
          children: s
        }, I, P;
        return (E & Ot) === Ft && C !== null ? (I = C, I.childLanes = je, I.pendingProps = M, r.mode & Wn && (I.actualDuration = 0, I.actualStartTime = -1, I.selfBaseDuration = 0, I.treeBaseDuration = 0), P = Pg(h, E, g, null)) : (I = nM(M, E), P = Pg(h, E, g, null)), I.return = r, P.return = r, I.sibling = P, r.child = I, P;
      }
      function nM(r, s, h) {
        return BI(r, s, je, null);
      }
      function BD(r, s) {
        return Sv(r, s);
      }
      function M4(r, s, h, g) {
        var E = r.child, C = E.sibling, M = BD(E, {
          mode: "visible",
          children: h
        });
        if ((s.mode & Ot) === Ft && (M.lanes = g), M.return = s, M.sibling = null, C !== null) {
          var I = s.deletions;
          I === null ? (s.deletions = [C], s.flags |= ii) : I.push(C);
        }
        return s.child = M, M;
      }
      function O4(r, s, h, g, E) {
        var C = s.mode, M = r.child, I = M.sibling, P = {
          mode: "hidden",
          children: h
        }, W;
        if (
          // In legacy mode, we commit the primary tree as if it successfully
          // completed, even though it's in an inconsistent state.
          (C & Ot) === Ft && // Make sure we're on the second pass, i.e. the primary child fragment was
          // already cloned. In legacy mode, the only case where this isn't true is
          // when DevTools forces us to display a fallback; we skip the first render
          // pass entirely and go straight to rendering the fallback. (In Concurrent
          // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
          // only codepath.)
          s.child !== M
        ) {
          var X = s.child;
          W = X, W.childLanes = je, W.pendingProps = P, s.mode & Wn && (W.actualDuration = 0, W.actualStartTime = -1, W.selfBaseDuration = M.selfBaseDuration, W.treeBaseDuration = M.treeBaseDuration), s.deletions = null;
        } else
          W = BD(M, P), W.subtreeFlags = M.subtreeFlags & ua;
        var de;
        return I !== null ? de = Sv(I, g) : (de = Pg(g, C, E, null), de.flags |= qn), de.return = s, W.return = s, W.sibling = de, s.child = W, de;
      }
      function jx(r, s, h, g) {
        g !== null && kT(g), t0(s, r.child, null, h);
        var E = s.pendingProps, C = E.children, M = tM(s, C);
        return M.flags |= qn, s.memoizedState = null, M;
      }
      function A4(r, s, h, g, E) {
        var C = s.mode, M = {
          mode: "visible",
          children: h
        }, I = nM(M, C), P = Pg(g, C, E, null);
        return P.flags |= qn, I.return = s, P.return = s, I.sibling = P, s.child = I, (s.mode & Ot) !== Ft && t0(s, r.child, null, E), P;
      }
      function L4(r, s, h) {
        return (r.mode & Ot) === Ft ? (c("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."), r.lanes = Bt) : c1(s) ? r.lanes = er : r.lanes = Fs, null;
      }
      function N4(r, s, h, g, E, C, M) {
        if (h)
          if (s.flags & hr) {
            s.flags &= ~hr;
            var ye = BR(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));
            return jx(r, s, M, ye);
          } else {
            if (s.memoizedState !== null)
              return s.child = r.child, s.flags |= tn, null;
            var ke = g.children, _e = g.fallback, et = A4(r, s, ke, _e, M), _t = s.child;
            return _t.memoizedState = eM(M), s.memoizedState = JR, et;
          }
        else {
          if (Ez(), (s.mode & Ot) === Ft)
            return jx(
              r,
              s,
              M,
              // TODO: When we delete legacy mode, we should make this error argument
              // required — every concurrent mode path that causes hydration to
              // de-opt to client rendering should have an error message.
              null
            );
          if (c1(E)) {
            var I, P, W;
            {
              var X = iT(E);
              I = X.digest, P = X.message, W = X.stack;
            }
            var de;
            P ? de = new Error(P) : de = new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");
            var he = BR(de, I, W);
            return jx(r, s, M, he);
          }
          var we = Ka(M, r.childLanes);
          if (pf || we) {
            var Ce = Xx();
            if (Ce !== null) {
              var Pe = Qp(Ce, M);
              if (Pe !== Pr && Pe !== C.retryLane) {
                C.retryLane = Pe;
                var yt = oi;
                xl(r, Pe), ss(Ce, r, Pe, yt);
              }
            }
            bM();
            var Vt = BR(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));
            return jx(r, s, M, Vt);
          } else if (HS(E)) {
            s.flags |= tn, s.child = r.child;
            var Nt = i$.bind(null, r);
            return WS(E, Nt), null;
          } else {
            bz(s, E, C.treeContext);
            var Kn = g.children, Bn = tM(s, Kn);
            return Bn.flags |= hl, Bn;
          }
        }
      }
      function VD(r, s, h) {
        r.lanes = an(r.lanes, s);
        var g = r.alternate;
        g !== null && (g.lanes = an(g.lanes, s)), $T(r.return, s, h);
      }
      function D4(r, s, h) {
        for (var g = s; g !== null; ) {
          if (g.tag === G) {
            var E = g.memoizedState;
            E !== null && VD(g, h, r);
          } else if (g.tag === Ee)
            VD(g, h, r);
          else if (g.child !== null) {
            g.child.return = g, g = g.child;
            continue;
          }
          if (g === r)
            return;
          for (; g.sibling === null; ) {
            if (g.return === null || g.return === r)
              return;
            g = g.return;
          }
          g.sibling.return = g.return, g = g.sibling;
        }
      }
      function I4(r) {
        for (var s = r, h = null; s !== null; ) {
          var g = s.alternate;
          g !== null && vx(g) === null && (h = s), s = s.sibling;
        }
        return h;
      }
      function P4(r) {
        if (r !== void 0 && r !== "forwards" && r !== "backwards" && r !== "together" && !XR[r])
          if (XR[r] = !0, typeof r == "string")
            switch (r.toLowerCase()) {
              case "together":
              case "forwards":
              case "backwards": {
                c('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.', r, r.toLowerCase());
                break;
              }
              case "forward":
              case "backward": {
                c('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.', r, r.toLowerCase());
                break;
              }
              default:
                c('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', r);
                break;
            }
          else
            c('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', r);
      }
      function k4(r, s) {
        r !== void 0 && !Fx[r] && (r !== "collapsed" && r !== "hidden" ? (Fx[r] = !0, c('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?', r)) : s !== "forwards" && s !== "backwards" && (Fx[r] = !0, c('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', r)));
      }
      function HD(r, s) {
        {
          var h = zn(r), g = !h && typeof il(r) == "function";
          if (h || g) {
            var E = h ? "array" : "iterable";
            return c("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>", E, s, E), !1;
          }
        }
        return !0;
      }
      function F4(r, s) {
        if ((s === "forwards" || s === "backwards") && r !== void 0 && r !== null && r !== !1)
          if (zn(r)) {
            for (var h = 0; h < r.length; h++)
              if (!HD(r[h], h))
                return;
          } else {
            var g = il(r);
            if (typeof g == "function") {
              var E = g.call(r);
              if (E)
                for (var C = E.next(), M = 0; !C.done; C = E.next()) {
                  if (!HD(C.value, M))
                    return;
                  M++;
                }
            } else
              c('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', s);
          }
      }
      function iM(r, s, h, g, E) {
        var C = r.memoizedState;
        C === null ? r.memoizedState = {
          isBackwards: s,
          rendering: null,
          renderingStartTime: 0,
          last: g,
          tail: h,
          tailMode: E
        } : (C.isBackwards = s, C.rendering = null, C.renderingStartTime = 0, C.last = g, C.tail = h, C.tailMode = E);
      }
      function WD(r, s, h) {
        var g = s.pendingProps, E = g.revealOrder, C = g.tail, M = g.children;
        P4(E), k4(C, E), F4(M, E), Ho(r, s, M, h);
        var I = hf.current, P = dR(I, x1);
        if (P)
          I = pR(I, x1), s.flags |= tn;
        else {
          var W = r !== null && (r.flags & tn) !== kt;
          W && D4(s, s.child, h), I = i0(I);
        }
        if (Rg(s, I), (s.mode & Ot) === Ft)
          s.memoizedState = null;
        else
          switch (E) {
            case "forwards": {
              var X = I4(s.child), de;
              X === null ? (de = s.child, s.child = null) : (de = X.sibling, X.sibling = null), iM(
                s,
                !1,
                // isBackwards
                de,
                X,
                C
              );
              break;
            }
            case "backwards": {
              var he = null, we = s.child;
              for (s.child = null; we !== null; ) {
                var Ce = we.alternate;
                if (Ce !== null && vx(Ce) === null) {
                  s.child = we;
                  break;
                }
                var Pe = we.sibling;
                we.sibling = he, he = we, we = Pe;
              }
              iM(
                s,
                !0,
                // isBackwards
                he,
                null,
                // last
                C
              );
              break;
            }
            case "together": {
              iM(
                s,
                !1,
                // isBackwards
                null,
                // tail
                null,
                // last
                void 0
              );
              break;
            }
            default:
              s.memoizedState = null;
          }
        return s.child;
      }
      function j4(r, s, h) {
        cR(s, s.stateNode.containerInfo);
        var g = s.pendingProps;
        return r === null ? s.child = t0(s, null, g, h) : Ho(r, s, g, h), s.child;
      }
      var GD = !1;
      function U4(r, s, h) {
        var g = s.type, E = g._context, C = s.pendingProps, M = s.memoizedProps, I = C.value;
        {
          "value" in C || GD || (GD = !0, c("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));
          var P = s.type.propTypes;
          P && Br(P, C, "prop", "Context.Provider");
        }
        if (DN(s, E, I), M !== null) {
          var W = M.value;
          if (St(W, I)) {
            if (M.children === C.children && !YS())
              return op(r, s, h);
          } else
            Dz(s, E, h);
        }
        var X = C.children;
        return Ho(r, s, X, h), s.child;
      }
      var YD = !1;
      function z4(r, s, h) {
        var g = s.type;
        g._context === void 0 ? g !== g.Consumer && (YD || (YD = !0, c("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))) : g = g._context;
        var E = s.pendingProps, C = E.children;
        typeof C != "function" && c("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."), e0(s, h);
        var M = ja(g);
        Kf(s);
        var I;
        return A1.current = s, Qr(!0), I = C(M), Qr(!1), Fo(), s.flags |= Do, Ho(r, s, I, h), s.child;
      }
      function N1() {
        pf = !0;
      }
      function Ux(r, s) {
        (s.mode & Ot) === Ft && r !== null && (r.alternate = null, s.alternate = null, s.flags |= qn);
      }
      function op(r, s, h) {
        return r !== null && (s.dependencies = r.dependencies), MD(), H1(s.lanes), Ka(h, s.childLanes) ? (Wz(r, s), s.child) : null;
      }
      function $4(r, s, h) {
        {
          var g = s.return;
          if (g === null)
            throw new Error("Cannot swap the root fiber.");
          if (r.alternate = null, s.alternate = null, h.index = s.index, h.sibling = s.sibling, h.return = s.return, h.ref = s.ref, s === g.child)
            g.child = h;
          else {
            var E = g.child;
            if (E === null)
              throw new Error("Expected parent to have a child.");
            for (; E.sibling !== s; )
              if (E = E.sibling, E === null)
                throw new Error("Expected to find the previous sibling.");
            E.sibling = h;
          }
          var C = g.deletions;
          return C === null ? (g.deletions = [r], g.flags |= ii) : C.push(r), h.flags |= qn, h;
        }
      }
      function rM(r, s) {
        var h = r.lanes;
        return !!Ka(h, s);
      }
      function B4(r, s, h) {
        switch (s.tag) {
          case b:
            UD(s), s.stateNode, Qy();
            break;
          case O:
            QN(s);
            break;
          case _: {
            var g = s.type;
            Ch(g) && XS(s);
            break;
          }
          case T:
            cR(s, s.stateNode.containerInfo);
            break;
          case B: {
            var E = s.memoizedProps.value, C = s.type._context;
            DN(s, C, E);
            break;
          }
          case z:
            {
              var M = Ka(h, s.childLanes);
              M && (s.flags |= At);
              {
                var I = s.stateNode;
                I.effectDuration = 0, I.passiveEffectDuration = 0;
              }
            }
            break;
          case G: {
            var P = s.memoizedState;
            if (P !== null) {
              if (P.dehydrated !== null)
                return Rg(s, i0(hf.current)), s.flags |= tn, null;
              var W = s.child, X = W.childLanes;
              if (Ka(h, X))
                return $D(r, s, h);
              Rg(s, i0(hf.current));
              var de = op(r, s, h);
              return de !== null ? de.sibling : null;
            } else
              Rg(s, i0(hf.current));
            break;
          }
          case Ee: {
            var he = (r.flags & tn) !== kt, we = Ka(h, s.childLanes);
            if (he) {
              if (we)
                return WD(r, s, h);
              s.flags |= tn;
            }
            var Ce = s.memoizedState;
            if (Ce !== null && (Ce.rendering = null, Ce.tail = null, Ce.lastEffect = null), Rg(s, hf.current), we)
              break;
            return null;
          }
          case Ne:
          case Q:
            return s.lanes = je, kD(r, s, h);
        }
        return op(r, s, h);
      }
      function qD(r, s, h) {
        if (s._debugNeedsRemount && r !== null)
          return $4(r, s, IM(s.type, s.key, s.pendingProps, s._debugOwner || null, s.mode, s.lanes));
        if (r !== null) {
          var g = r.memoizedProps, E = s.pendingProps;
          if (g !== E || YS() || // Force a re-render if the implementation changed due to hot reload:
          s.type !== r.type)
            pf = !0;
          else {
            var C = rM(r, h);
            if (!C && // If this is the second pass of an error or suspense boundary, there
            // may not be work scheduled on `current`, so we check for this flag.
            (s.flags & tn) === kt)
              return pf = !1, B4(r, s, h);
            (r.flags & zp) !== kt ? pf = !0 : pf = !1;
          }
        } else if (pf = !1, Bs() && pz(s)) {
          var M = s.index, I = gz();
          SN(s, I, M);
        }
        switch (s.lanes = je, s.tag) {
          case S:
            return b4(r, s, s.type, h);
          case Re: {
            var P = s.elementType;
            return S4(r, s, P, h);
          }
          case y: {
            var W = s.type, X = s.pendingProps, de = s.elementType === W ? X : ff(W, X);
            return KR(r, s, W, de, h);
          }
          case _: {
            var he = s.type, we = s.pendingProps, Ce = s.elementType === he ? we : ff(he, we);
            return jD(r, s, he, Ce, h);
          }
          case b:
            return y4(r, s, h);
          case O:
            return _4(r, s, h);
          case N:
            return E4(r, s);
          case G:
            return $D(r, s, h);
          case T:
            return j4(r, s, h);
          case V: {
            var Pe = s.type, yt = s.pendingProps, Vt = s.elementType === Pe ? yt : ff(Pe, yt);
            return DD(r, s, Pe, Vt, h);
          }
          case D:
            return g4(r, s, h);
          case k:
            return m4(r, s, h);
          case z:
            return v4(r, s, h);
          case B:
            return U4(r, s, h);
          case $:
            return z4(r, s, h);
          case ie: {
            var Nt = s.type, Kn = s.pendingProps, Bn = ff(Nt, Kn);
            if (s.type !== s.elementType) {
              var ye = Nt.propTypes;
              ye && Br(
                ye,
                Bn,
                // Resolved for outer only
                "prop",
                Un(Nt)
              );
            }
            return Bn = ff(Nt.type, Bn), ID(r, s, Nt, Bn, h);
          }
          case ue:
            return PD(r, s, s.type, s.pendingProps, h);
          case Oe: {
            var ke = s.type, _e = s.pendingProps, et = s.elementType === ke ? _e : ff(ke, _e);
            return x4(r, s, ke, et, h);
          }
          case Ee:
            return WD(r, s, h);
          case Fe:
            break;
          case Ne:
            return kD(r, s, h);
        }
        throw new Error("Unknown unit of work tag (" + s.tag + "). This error is likely caused by a bug in React. Please file an issue.");
      }
      function u0(r) {
        r.flags |= At;
      }
      function XD(r) {
        r.flags |= Ps, r.flags |= dl;
      }
      var KD, aM, ZD, QD;
      KD = function(r, s, h, g) {
        for (var E = s.child; E !== null; ) {
          if (E.tag === O || E.tag === N)
            FC(r, E.stateNode);
          else if (E.tag !== T) {
            if (E.child !== null) {
              E.child.return = E, E = E.child;
              continue;
            }
          }
          if (E === s)
            return;
          for (; E.sibling === null; ) {
            if (E.return === null || E.return === s)
              return;
            E = E.return;
          }
          E.sibling.return = E.return, E = E.sibling;
        }
      }, aM = function(r, s) {
      }, ZD = function(r, s, h, g, E) {
        var C = r.memoizedProps;
        if (C !== g) {
          var M = s.stateNode, I = fR(), P = UC(M, h, C, g, E, I);
          s.updateQueue = P, P && u0(s);
        }
      }, QD = function(r, s, h, g) {
        h !== g && u0(s);
      };
      function D1(r, s) {
        if (!Bs())
          switch (r.tailMode) {
            case "hidden": {
              for (var h = r.tail, g = null; h !== null; )
                h.alternate !== null && (g = h), h = h.sibling;
              g === null ? r.tail = null : g.sibling = null;
              break;
            }
            case "collapsed": {
              for (var E = r.tail, C = null; E !== null; )
                E.alternate !== null && (C = E), E = E.sibling;
              C === null ? !s && r.tail !== null ? r.tail.sibling = null : r.tail = null : C.sibling = null;
              break;
            }
          }
      }
      function Hs(r) {
        var s = r.alternate !== null && r.alternate.child === r.child, h = je, g = kt;
        if (s) {
          if ((r.mode & Wn) !== Ft) {
            for (var P = r.selfBaseDuration, W = r.child; W !== null; )
              h = an(h, an(W.lanes, W.childLanes)), g |= W.subtreeFlags & ua, g |= W.flags & ua, P += W.treeBaseDuration, W = W.sibling;
            r.treeBaseDuration = P;
          } else
            for (var X = r.child; X !== null; )
              h = an(h, an(X.lanes, X.childLanes)), g |= X.subtreeFlags & ua, g |= X.flags & ua, X.return = r, X = X.sibling;
          r.subtreeFlags |= g;
        } else {
          if ((r.mode & Wn) !== Ft) {
            for (var E = r.actualDuration, C = r.selfBaseDuration, M = r.child; M !== null; )
              h = an(h, an(M.lanes, M.childLanes)), g |= M.subtreeFlags, g |= M.flags, E += M.actualDuration, C += M.treeBaseDuration, M = M.sibling;
            r.actualDuration = E, r.treeBaseDuration = C;
          } else
            for (var I = r.child; I !== null; )
              h = an(h, an(I.lanes, I.childLanes)), g |= I.subtreeFlags, g |= I.flags, I.return = r, I = I.sibling;
          r.subtreeFlags |= g;
        }
        return r.childLanes = h, s;
      }
      function V4(r, s, h) {
        if (Mz() && (s.mode & Ot) !== Ft && (s.flags & tn) === kt)
          return MN(s), Qy(), s.flags |= hr | Vu | ya, !1;
        var g = ex(s);
        if (h !== null && h.dehydrated !== null)
          if (r === null) {
            if (!g)
              throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");
            if (Tz(s), Hs(s), (s.mode & Wn) !== Ft) {
              var E = h !== null;
              if (E) {
                var C = s.child;
                C !== null && (s.treeBaseDuration -= C.treeBaseDuration);
              }
            }
            return !1;
          } else {
            if (Qy(), (s.flags & tn) === kt && (s.memoizedState = null), s.flags |= At, Hs(s), (s.mode & Wn) !== Ft) {
              var M = h !== null;
              if (M) {
                var I = s.child;
                I !== null && (s.treeBaseDuration -= I.treeBaseDuration);
              }
            }
            return !1;
          }
        else
          return ON(), !0;
      }
      function JD(r, s, h) {
        var g = s.pendingProps;
        switch (LT(s), s.tag) {
          case S:
          case Re:
          case ue:
          case y:
          case V:
          case D:
          case k:
          case z:
          case $:
          case ie:
            return Hs(s), null;
          case _: {
            var E = s.type;
            return Ch(E) && qS(s), Hs(s), null;
          }
          case b: {
            var C = s.stateNode;
            if (n0(s), RT(s), mR(), C.pendingContext && (C.context = C.pendingContext, C.pendingContext = null), r === null || r.child === null) {
              var M = ex(s);
              if (M)
                u0(s);
              else if (r !== null) {
                var I = r.memoizedState;
                // Check if this is a client root
                (!I.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)
                (s.flags & hr) !== kt) && (s.flags |= Xr, ON());
              }
            }
            return aM(r, s), Hs(s), null;
          }
          case O: {
            hR(s);
            var P = ZN(), W = s.type;
            if (r !== null && s.stateNode != null)
              ZD(r, s, W, g, P), r.ref !== s.ref && XD(s);
            else {
              if (!g) {
                if (s.stateNode === null)
                  throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
                return Hs(s), null;
              }
              var X = fR(), de = ex(s);
              if (de)
                wz(s, P, X) && u0(s);
              else {
                var he = kC(W, g, P, X, s);
                KD(he, s, !1, !1), s.stateNode = he, jC(he, W, g, P) && u0(s);
              }
              s.ref !== null && XD(s);
            }
            return Hs(s), null;
          }
          case N: {
            var we = g;
            if (r && s.stateNode != null) {
              var Ce = r.memoizedProps;
              QD(r, s, Ce, we);
            } else {
              if (typeof we != "string" && s.stateNode === null)
                throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
              var Pe = ZN(), yt = fR(), Vt = ex(s);
              Vt ? Cz(s) && u0(s) : s.stateNode = zC(we, Pe, yt, s);
            }
            return Hs(s), null;
          }
          case G: {
            r0(s);
            var Nt = s.memoizedState;
            if (r === null || r.memoizedState !== null && r.memoizedState.dehydrated !== null) {
              var Kn = V4(r, s, Nt);
              if (!Kn)
                return s.flags & ya ? s : null;
            }
            if ((s.flags & tn) !== kt)
              return s.lanes = h, (s.mode & Wn) !== Ft && $R(s), s;
            var Bn = Nt !== null, ye = r !== null && r.memoizedState !== null;
            if (Bn !== ye && Bn) {
              var ke = s.child;
              if (ke.flags |= Bu, (s.mode & Ot) !== Ft) {
                var _e = r === null && (s.memoizedProps.unstable_avoidThisFallback !== !0 || !ee);
                _e || dR(hf.current, eD) ? H6() : bM();
              }
            }
            var et = s.updateQueue;
            if (et !== null && (s.flags |= At), Hs(s), (s.mode & Wn) !== Ft && Bn) {
              var _t = s.child;
              _t !== null && (s.treeBaseDuration -= _t.treeBaseDuration);
            }
            return null;
          }
          case T:
            return n0(s), aM(r, s), r === null && wT(s.stateNode.containerInfo), Hs(s), null;
          case B:
            var gt = s.type._context;
            return zT(gt, s), Hs(s), null;
          case Oe: {
            var en = s.type;
            return Ch(en) && qS(s), Hs(s), null;
          }
          case Ee: {
            r0(s);
            var ln = s.memoizedState;
            if (ln === null)
              return Hs(s), null;
            var Vi = (s.flags & tn) !== kt, fi = ln.rendering;
            if (fi === null)
              if (Vi)
                D1(ln, !1);
              else {
                var Ea = G6() && (r === null || (r.flags & tn) === kt);
                if (!Ea)
                  for (var hi = s.child; hi !== null; ) {
                    var fa = vx(hi);
                    if (fa !== null) {
                      Vi = !0, s.flags |= tn, D1(ln, !1);
                      var xo = fa.updateQueue;
                      return xo !== null && (s.updateQueue = xo, s.flags |= At), s.subtreeFlags = kt, Gz(s, h), Rg(s, pR(hf.current, x1)), s.child;
                    }
                    hi = hi.sibling;
                  }
                ln.tail !== null && Di() > EI() && (s.flags |= tn, Vi = !0, D1(ln, !1), s.lanes = qp);
              }
            else {
              if (!Vi) {
                var Xs = vx(fi);
                if (Xs !== null) {
                  s.flags |= tn, Vi = !0;
                  var vu = Xs.updateQueue;
                  if (vu !== null && (s.updateQueue = vu, s.flags |= At), D1(ln, !0), ln.tail === null && ln.tailMode === "hidden" && !fi.alternate && !Bs())
                    return Hs(s), null;
                } else
                  // The time it took to render last row is greater than the remaining
                  // time we have to render. So rendering one more row would likely
                  // exceed it.
                  Di() * 2 - ln.renderingStartTime > EI() && h !== Fs && (s.flags |= tn, Vi = !0, D1(ln, !1), s.lanes = qp);
              }
              if (ln.isBackwards)
                fi.sibling = s.child, s.child = fi;
              else {
                var Yo = ln.last;
                Yo !== null ? Yo.sibling = fi : s.child = fi, ln.last = fi;
              }
            }
            if (ln.tail !== null) {
              var qo = ln.tail;
              ln.rendering = qo, ln.tail = qo.sibling, ln.renderingStartTime = Di(), qo.sibling = null;
              var bo = hf.current;
              return Vi ? bo = pR(bo, x1) : bo = i0(bo), Rg(s, bo), qo;
            }
            return Hs(s), null;
          }
          case Fe:
            break;
          case Ne:
          case Q: {
            xM(s);
            var hp = s.memoizedState, v0 = hp !== null;
            if (r !== null) {
              var X1 = r.memoizedState, Dh = X1 !== null;
              Dh !== v0 && // LegacyHidden doesn't do any hiding — it only pre-renders.
              !Z && (s.flags |= Bu);
            }
            return !v0 || (s.mode & Ot) === Ft ? Hs(s) : Ka(Nh, Fs) && (Hs(s), s.subtreeFlags & (qn | At) && (s.flags |= Bu)), null;
          }
          case ae:
            return null;
          case le:
            return null;
        }
        throw new Error("Unknown unit of work tag (" + s.tag + "). This error is likely caused by a bug in React. Please file an issue.");
      }
      function H4(r, s, h) {
        switch (LT(s), s.tag) {
          case _: {
            var g = s.type;
            Ch(g) && qS(s);
            var E = s.flags;
            return E & ya ? (s.flags = E & ~ya | tn, (s.mode & Wn) !== Ft && $R(s), s) : null;
          }
          case b: {
            s.stateNode, n0(s), RT(s), mR();
            var C = s.flags;
            return (C & ya) !== kt && (C & tn) === kt ? (s.flags = C & ~ya | tn, s) : null;
          }
          case O:
            return hR(s), null;
          case G: {
            r0(s);
            var M = s.memoizedState;
            if (M !== null && M.dehydrated !== null) {
              if (s.alternate === null)
                throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");
              Qy();
            }
            var I = s.flags;
            return I & ya ? (s.flags = I & ~ya | tn, (s.mode & Wn) !== Ft && $R(s), s) : null;
          }
          case Ee:
            return r0(s), null;
          case T:
            return n0(s), null;
          case B:
            var P = s.type._context;
            return zT(P, s), null;
          case Ne:
          case Q:
            return xM(s), null;
          case ae:
            return null;
          default:
            return null;
        }
      }
      function eI(r, s, h) {
        switch (LT(s), s.tag) {
          case _: {
            var g = s.type.childContextTypes;
            g != null && qS(s);
            break;
          }
          case b: {
            s.stateNode, n0(s), RT(s), mR();
            break;
          }
          case O: {
            hR(s);
            break;
          }
          case T:
            n0(s);
            break;
          case G:
            r0(s);
            break;
          case Ee:
            r0(s);
            break;
          case B:
            var E = s.type._context;
            zT(E, s);
            break;
          case Ne:
          case Q:
            xM(s);
            break;
        }
      }
      var tI = null;
      tI = /* @__PURE__ */ new Set();
      var zx = !1, Ws = !1, W4 = typeof WeakSet == "function" ? WeakSet : Set, Mt = null, c0 = null, f0 = null;
      function G4(r) {
        Wa(null, function() {
          throw r;
        }), io();
      }
      var Y4 = function(r, s) {
        if (s.props = r.memoizedProps, s.state = r.memoizedState, r.mode & Wn)
          try {
            Ah(), s.componentWillUnmount();
          } finally {
            Oh(r);
          }
        else
          s.componentWillUnmount();
      };
      function nI(r, s) {
        try {
          Ag(es, r);
        } catch (h) {
          yr(r, s, h);
        }
      }
      function sM(r, s, h) {
        try {
          Y4(r, h);
        } catch (g) {
          yr(r, s, g);
        }
      }
      function q4(r, s, h) {
        try {
          h.componentDidMount();
        } catch (g) {
          yr(r, s, g);
        }
      }
      function iI(r, s) {
        try {
          aI(r);
        } catch (h) {
          yr(r, s, h);
        }
      }
      function h0(r, s) {
        var h = r.ref;
        if (h !== null)
          if (typeof h == "function") {
            var g;
            try {
              if (Ze && Xe && r.mode & Wn)
                try {
                  Ah(), g = h(null);
                } finally {
                  Oh(r);
                }
              else
                g = h(null);
            } catch (E) {
              yr(r, s, E);
            }
            typeof g == "function" && c("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", Qt(r));
          } else
            h.current = null;
      }
      function $x(r, s, h) {
        try {
          h();
        } catch (g) {
          yr(r, s, g);
        }
      }
      var rI = !1;
      function X4(r, s) {
        IC(r.containerInfo), Mt = s, K4();
        var h = rI;
        return rI = !1, h;
      }
      function K4() {
        for (; Mt !== null; ) {
          var r = Mt, s = r.child;
          (r.subtreeFlags & gs) !== kt && s !== null ? (s.return = r, Mt = s) : Z4();
        }
      }
      function Z4() {
        for (; Mt !== null; ) {
          var r = Mt;
          fr(r);
          try {
            Q4(r);
          } catch (h) {
            yr(r, r.return, h);
          }
          Zi();
          var s = r.sibling;
          if (s !== null) {
            s.return = r.return, Mt = s;
            return;
          }
          Mt = r.return;
        }
      }
      function Q4(r) {
        var s = r.alternate, h = r.flags;
        if ((h & Xr) !== kt) {
          switch (fr(r), r.tag) {
            case y:
            case V:
            case ue:
              break;
            case _: {
              if (s !== null) {
                var g = s.memoizedProps, E = s.memoizedState, C = r.stateNode;
                r.type === r.elementType && !mv && (C.props !== r.memoizedProps && c("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", Qt(r) || "instance"), C.state !== r.memoizedState && c("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", Qt(r) || "instance"));
                var M = C.getSnapshotBeforeUpdate(r.elementType === r.type ? g : ff(r.type, g), E);
                {
                  var I = tI;
                  M === void 0 && !I.has(r.type) && (I.add(r.type), c("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", Qt(r)));
                }
                C.__reactInternalSnapshotBeforeUpdate = M;
              }
              break;
            }
            case b: {
              {
                var P = r.stateNode;
                l1(P.containerInfo);
              }
              break;
            }
            case O:
            case N:
            case T:
            case Oe:
              break;
            default:
              throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
          }
          Zi();
        }
      }
      function gf(r, s, h) {
        var g = s.updateQueue, E = g !== null ? g.lastEffect : null;
        if (E !== null) {
          var C = E.next, M = C;
          do {
            if ((M.tag & r) === r) {
              var I = M.destroy;
              M.destroy = void 0, I !== void 0 && ((r & Vs) !== bl ? Vp(s) : (r & es) !== bl && Zf(s), (r & Th) !== bl && G1(!0), $x(s, h, I), (r & Th) !== bl && G1(!1), (r & Vs) !== bl ? Om() : (r & es) !== bl && Qf());
            }
            M = M.next;
          } while (M !== C);
        }
      }
      function Ag(r, s) {
        var h = s.updateQueue, g = h !== null ? h.lastEffect : null;
        if (g !== null) {
          var E = g.next, C = E;
          do {
            if ((C.tag & r) === r) {
              (r & Vs) !== bl ? Mm(s) : (r & es) !== bl && vy(s);
              var M = C.create;
              (r & Th) !== bl && G1(!0), C.destroy = M(), (r & Th) !== bl && G1(!1), (r & Vs) !== bl ? Bp() : (r & es) !== bl && Am();
              {
                var I = C.destroy;
                if (I !== void 0 && typeof I != "function") {
                  var P = void 0;
                  (C.tag & es) !== kt ? P = "useLayoutEffect" : (C.tag & Th) !== kt ? P = "useInsertionEffect" : P = "useEffect";
                  var W = void 0;
                  I === null ? W = " You returned null. If your effect does not require clean up, return undefined (or nothing)." : typeof I.then == "function" ? W = `

It looks like you wrote ` + P + `(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:

` + P + `(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching` : W = " You returned: " + I, c("%s must not return anything besides a function, which is used for clean-up.%s", P, W);
                }
              }
            }
            C = C.next;
          } while (C !== E);
        }
      }
      function J4(r, s) {
        if ((s.flags & At) !== kt)
          switch (s.tag) {
            case z: {
              var h = s.stateNode.passiveEffectDuration, g = s.memoizedProps, E = g.id, C = g.onPostCommit, M = TD(), I = s.alternate === null ? "mount" : "update";
              CD() && (I = "nested-update"), typeof C == "function" && C(E, I, h, M);
              var P = s.return;
              e:
                for (; P !== null; ) {
                  switch (P.tag) {
                    case b:
                      var W = P.stateNode;
                      W.passiveEffectDuration += h;
                      break e;
                    case z:
                      var X = P.stateNode;
                      X.passiveEffectDuration += h;
                      break e;
                  }
                  P = P.return;
                }
              break;
            }
          }
      }
      function e6(r, s, h, g) {
        if ((h.flags & Io) !== kt)
          switch (h.tag) {
            case y:
            case V:
            case ue: {
              if (!Ws)
                if (h.mode & Wn)
                  try {
                    Ah(), Ag(es | Ja, h);
                  } finally {
                    Oh(h);
                  }
                else
                  Ag(es | Ja, h);
              break;
            }
            case _: {
              var E = h.stateNode;
              if (h.flags & At && !Ws)
                if (s === null)
                  if (h.type === h.elementType && !mv && (E.props !== h.memoizedProps && c("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", Qt(h) || "instance"), E.state !== h.memoizedState && c("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", Qt(h) || "instance")), h.mode & Wn)
                    try {
                      Ah(), E.componentDidMount();
                    } finally {
                      Oh(h);
                    }
                  else
                    E.componentDidMount();
                else {
                  var C = h.elementType === h.type ? s.memoizedProps : ff(h.type, s.memoizedProps), M = s.memoizedState;
                  if (h.type === h.elementType && !mv && (E.props !== h.memoizedProps && c("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", Qt(h) || "instance"), E.state !== h.memoizedState && c("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", Qt(h) || "instance")), h.mode & Wn)
                    try {
                      Ah(), E.componentDidUpdate(C, M, E.__reactInternalSnapshotBeforeUpdate);
                    } finally {
                      Oh(h);
                    }
                  else
                    E.componentDidUpdate(C, M, E.__reactInternalSnapshotBeforeUpdate);
                }
              var I = h.updateQueue;
              I !== null && (h.type === h.elementType && !mv && (E.props !== h.memoizedProps && c("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", Qt(h) || "instance"), E.state !== h.memoizedState && c("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", Qt(h) || "instance")), UN(h, I, E));
              break;
            }
            case b: {
              var P = h.updateQueue;
              if (P !== null) {
                var W = null;
                if (h.child !== null)
                  switch (h.child.tag) {
                    case O:
                      W = h.child.stateNode;
                      break;
                    case _:
                      W = h.child.stateNode;
                      break;
                  }
                UN(h, P, W);
              }
              break;
            }
            case O: {
              var X = h.stateNode;
              if (s === null && h.flags & At) {
                var de = h.type, he = h.memoizedProps;
                r1(X, de, he);
              }
              break;
            }
            case N:
              break;
            case T:
              break;
            case z: {
              {
                var we = h.memoizedProps, Ce = we.onCommit, Pe = we.onRender, yt = h.stateNode.effectDuration, Vt = TD(), Nt = s === null ? "mount" : "update";
                CD() && (Nt = "nested-update"), typeof Pe == "function" && Pe(h.memoizedProps.id, Nt, h.actualDuration, h.treeBaseDuration, h.actualStartTime, Vt);
                {
                  typeof Ce == "function" && Ce(h.memoizedProps.id, Nt, yt, Vt), Z6(h);
                  var Kn = h.return;
                  e:
                    for (; Kn !== null; ) {
                      switch (Kn.tag) {
                        case b:
                          var Bn = Kn.stateNode;
                          Bn.effectDuration += yt;
                          break e;
                        case z:
                          var ye = Kn.stateNode;
                          ye.effectDuration += yt;
                          break e;
                      }
                      Kn = Kn.return;
                    }
                }
              }
              break;
            }
            case G: {
              l6(r, h);
              break;
            }
            case Ee:
            case Oe:
            case Fe:
            case Ne:
            case Q:
            case le:
              break;
            default:
              throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
          }
        Ws || h.flags & Ps && aI(h);
      }
      function t6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            if (r.mode & Wn)
              try {
                Ah(), nI(r, r.return);
              } finally {
                Oh(r);
              }
            else
              nI(r, r.return);
            break;
          }
          case _: {
            var s = r.stateNode;
            typeof s.componentDidMount == "function" && q4(r, r.return, s), iI(r, r.return);
            break;
          }
          case O: {
            iI(r, r.return);
            break;
          }
        }
      }
      function n6(r, s) {
        for (var h = null, g = r; ; ) {
          if (g.tag === O) {
            if (h === null) {
              h = g;
              try {
                var E = g.stateNode;
                s ? ZC(E) : JC(g.stateNode, g.memoizedProps);
              } catch (M) {
                yr(r, r.return, M);
              }
            }
          } else if (g.tag === N) {
            if (h === null)
              try {
                var C = g.stateNode;
                s ? QC(C) : eT(C, g.memoizedProps);
              } catch (M) {
                yr(r, r.return, M);
              }
          } else if (!((g.tag === Ne || g.tag === Q) && g.memoizedState !== null && g !== r)) {
            if (g.child !== null) {
              g.child.return = g, g = g.child;
              continue;
            }
          }
          if (g === r)
            return;
          for (; g.sibling === null; ) {
            if (g.return === null || g.return === r)
              return;
            h === g && (h = null), g = g.return;
          }
          h === g && (h = null), g.sibling.return = g.return, g = g.sibling;
        }
      }
      function aI(r) {
        var s = r.ref;
        if (s !== null) {
          var h = r.stateNode, g;
          switch (r.tag) {
            case O:
              g = h;
              break;
            default:
              g = h;
          }
          if (typeof s == "function") {
            var E;
            if (r.mode & Wn)
              try {
                Ah(), E = s(g);
              } finally {
                Oh(r);
              }
            else
              E = s(g);
            typeof E == "function" && c("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", Qt(r));
          } else
            s.hasOwnProperty("current") || c("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", Qt(r)), s.current = g;
        }
      }
      function i6(r) {
        var s = r.alternate;
        s !== null && (s.return = null), r.return = null;
      }
      function sI(r) {
        var s = r.alternate;
        s !== null && (r.alternate = null, sI(s));
        {
          if (r.child = null, r.deletions = null, r.sibling = null, r.tag === O) {
            var h = r.stateNode;
            h !== null && ce(h);
          }
          r.stateNode = null, r._debugOwner = null, r.return = null, r.dependencies = null, r.memoizedProps = null, r.memoizedState = null, r.pendingProps = null, r.stateNode = null, r.updateQueue = null;
        }
      }
      function r6(r) {
        for (var s = r.return; s !== null; ) {
          if (oI(s))
            return s;
          s = s.return;
        }
        throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
      }
      function oI(r) {
        return r.tag === O || r.tag === b || r.tag === T;
      }
      function lI(r) {
        var s = r;
        e:
          for (; ; ) {
            for (; s.sibling === null; ) {
              if (s.return === null || oI(s.return))
                return null;
              s = s.return;
            }
            for (s.sibling.return = s.return, s = s.sibling; s.tag !== O && s.tag !== N && s.tag !== $e; ) {
              if (s.flags & qn || s.child === null || s.tag === T)
                continue e;
              s.child.return = s, s = s.child;
            }
            if (!(s.flags & qn))
              return s.stateNode;
          }
      }
      function a6(r) {
        var s = r6(r);
        switch (s.tag) {
          case O: {
            var h = s.stateNode;
            s.flags & ro && (a1(h), s.flags &= ~ro);
            var g = lI(r);
            lM(r, g, h);
            break;
          }
          case b:
          case T: {
            var E = s.stateNode.containerInfo, C = lI(r);
            oM(r, C, E);
            break;
          }
          default:
            throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");
        }
      }
      function oM(r, s, h) {
        var g = r.tag, E = g === O || g === N;
        if (E) {
          var C = r.stateNode;
          s ? qC(h, C, s) : YC(h, C);
        } else if (g !== T) {
          var M = r.child;
          if (M !== null) {
            oM(M, s, h);
            for (var I = M.sibling; I !== null; )
              oM(I, s, h), I = I.sibling;
          }
        }
      }
      function lM(r, s, h) {
        var g = r.tag, E = g === O || g === N;
        if (E) {
          var C = r.stateNode;
          s ? s1(h, C, s) : GC(h, C);
        } else if (g !== T) {
          var M = r.child;
          if (M !== null) {
            lM(M, s, h);
            for (var I = M.sibling; I !== null; )
              lM(I, s, h), I = I.sibling;
          }
        }
      }
      var Gs = null, mf = !1;
      function s6(r, s, h) {
        {
          var g = s;
          e:
            for (; g !== null; ) {
              switch (g.tag) {
                case O: {
                  Gs = g.stateNode, mf = !1;
                  break e;
                }
                case b: {
                  Gs = g.stateNode.containerInfo, mf = !0;
                  break e;
                }
                case T: {
                  Gs = g.stateNode.containerInfo, mf = !0;
                  break e;
                }
              }
              g = g.return;
            }
          if (Gs === null)
            throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
          uI(r, s, h), Gs = null, mf = !1;
        }
        i6(h);
      }
      function Lg(r, s, h) {
        for (var g = h.child; g !== null; )
          uI(r, s, g), g = g.sibling;
      }
      function uI(r, s, h) {
        switch (my(h), h.tag) {
          case O:
            Ws || h0(h, s);
          case N: {
            {
              var g = Gs, E = mf;
              Gs = null, Lg(r, s, h), Gs = g, mf = E, Gs !== null && (mf ? KC(Gs, h.stateNode) : XC(Gs, h.stateNode));
            }
            return;
          }
          case $e: {
            Gs !== null && (mf ? o1(Gs, h.stateNode) : xs(Gs, h.stateNode));
            return;
          }
          case T: {
            {
              var C = Gs, M = mf;
              Gs = h.stateNode.containerInfo, mf = !0, Lg(r, s, h), Gs = C, mf = M;
            }
            return;
          }
          case y:
          case V:
          case ie:
          case ue: {
            if (!Ws) {
              var I = h.updateQueue;
              if (I !== null) {
                var P = I.lastEffect;
                if (P !== null) {
                  var W = P.next, X = W;
                  do {
                    var de = X, he = de.destroy, we = de.tag;
                    he !== void 0 && ((we & Th) !== bl ? $x(h, s, he) : (we & es) !== bl && (Zf(h), h.mode & Wn ? (Ah(), $x(h, s, he), Oh(h)) : $x(h, s, he), Qf())), X = X.next;
                  } while (X !== W);
                }
              }
            }
            Lg(r, s, h);
            return;
          }
          case _: {
            if (!Ws) {
              h0(h, s);
              var Ce = h.stateNode;
              typeof Ce.componentWillUnmount == "function" && sM(h, s, Ce);
            }
            Lg(r, s, h);
            return;
          }
          case Fe: {
            Lg(r, s, h);
            return;
          }
          case Ne: {
            if (
              // TODO: Remove this dead flag
              h.mode & Ot
            ) {
              var Pe = Ws;
              Ws = Pe || h.memoizedState !== null, Lg(r, s, h), Ws = Pe;
            } else
              Lg(r, s, h);
            break;
          }
          default: {
            Lg(r, s, h);
            return;
          }
        }
      }
      function o6(r) {
        r.memoizedState;
      }
      function l6(r, s) {
        var h = s.memoizedState;
        if (h === null) {
          var g = s.alternate;
          if (g !== null) {
            var E = g.memoizedState;
            if (E !== null) {
              var C = E.dehydrated;
              C !== null && cT(C);
            }
          }
        }
      }
      function cI(r) {
        var s = r.updateQueue;
        if (s !== null) {
          r.updateQueue = null;
          var h = r.stateNode;
          h === null && (h = r.stateNode = new W4()), s.forEach(function(g) {
            var E = r$.bind(null, r, g);
            if (!h.has(g)) {
              if (h.add(g), ys)
                if (c0 !== null && f0 !== null)
                  W1(f0, c0);
                else
                  throw Error("Expected finished root and lanes to be set. This is a bug in React.");
              g.then(E, E);
            }
          });
        }
      }
      function u6(r, s, h) {
        c0 = h, f0 = r, fr(s), fI(s, r), fr(s), c0 = null, f0 = null;
      }
      function vf(r, s, h) {
        var g = s.deletions;
        if (g !== null)
          for (var E = 0; E < g.length; E++) {
            var C = g[E];
            try {
              s6(r, s, C);
            } catch (P) {
              yr(C, s, P);
            }
          }
        var M = ed();
        if (s.subtreeFlags & ms)
          for (var I = s.child; I !== null; )
            fr(I), fI(I, r), I = I.sibling;
        fr(M);
      }
      function fI(r, s, h) {
        var g = r.alternate, E = r.flags;
        switch (r.tag) {
          case y:
          case V:
          case ie:
          case ue: {
            if (vf(s, r), Lh(r), E & At) {
              try {
                gf(Th | Ja, r, r.return), Ag(Th | Ja, r);
              } catch (en) {
                yr(r, r.return, en);
              }
              if (r.mode & Wn) {
                try {
                  Ah(), gf(es | Ja, r, r.return);
                } catch (en) {
                  yr(r, r.return, en);
                }
                Oh(r);
              } else
                try {
                  gf(es | Ja, r, r.return);
                } catch (en) {
                  yr(r, r.return, en);
                }
            }
            return;
          }
          case _: {
            vf(s, r), Lh(r), E & Ps && g !== null && h0(g, g.return);
            return;
          }
          case O: {
            vf(s, r), Lh(r), E & Ps && g !== null && h0(g, g.return);
            {
              if (r.flags & ro) {
                var C = r.stateNode;
                try {
                  a1(C);
                } catch (en) {
                  yr(r, r.return, en);
                }
              }
              if (E & At) {
                var M = r.stateNode;
                if (M != null) {
                  var I = r.memoizedProps, P = g !== null ? g.memoizedProps : I, W = r.type, X = r.updateQueue;
                  if (r.updateQueue = null, X !== null)
                    try {
                      VS(M, X, W, P, I, r);
                    } catch (en) {
                      yr(r, r.return, en);
                    }
                }
              }
            }
            return;
          }
          case N: {
            if (vf(s, r), Lh(r), E & At) {
              if (r.stateNode === null)
                throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");
              var de = r.stateNode, he = r.memoizedProps, we = g !== null ? g.memoizedProps : he;
              try {
                WC(de, we, he);
              } catch (en) {
                yr(r, r.return, en);
              }
            }
            return;
          }
          case b: {
            if (vf(s, r), Lh(r), E & At && g !== null) {
              var Ce = g.memoizedState;
              if (Ce.isDehydrated)
                try {
                  uT(s.containerInfo);
                } catch (en) {
                  yr(r, r.return, en);
                }
            }
            return;
          }
          case T: {
            vf(s, r), Lh(r);
            return;
          }
          case G: {
            vf(s, r), Lh(r);
            var Pe = r.child;
            if (Pe.flags & Bu) {
              var yt = Pe.stateNode, Vt = Pe.memoizedState, Nt = Vt !== null;
              if (yt.isHidden = Nt, Nt) {
                var Kn = Pe.alternate !== null && Pe.alternate.memoizedState !== null;
                Kn || V6();
              }
            }
            if (E & At) {
              try {
                o6(r);
              } catch (en) {
                yr(r, r.return, en);
              }
              cI(r);
            }
            return;
          }
          case Ne: {
            var Bn = g !== null && g.memoizedState !== null;
            if (
              // TODO: Remove this dead flag
              r.mode & Ot
            ) {
              var ye = Ws;
              Ws = ye || Bn, vf(s, r), Ws = ye;
            } else
              vf(s, r);
            if (Lh(r), E & Bu) {
              var ke = r.stateNode, _e = r.memoizedState, et = _e !== null, _t = r;
              if (ke.isHidden = et, et && !Bn && (_t.mode & Ot) !== Ft) {
                Mt = _t;
                for (var gt = _t.child; gt !== null; )
                  Mt = gt, f6(gt), gt = gt.sibling;
              }
              n6(_t, et);
            }
            return;
          }
          case Ee: {
            vf(s, r), Lh(r), E & At && cI(r);
            return;
          }
          case Fe:
            return;
          default: {
            vf(s, r), Lh(r);
            return;
          }
        }
      }
      function Lh(r) {
        var s = r.flags;
        if (s & qn) {
          try {
            a6(r);
          } catch (h) {
            yr(r, r.return, h);
          }
          r.flags &= ~qn;
        }
        s & hl && (r.flags &= ~hl);
      }
      function c6(r, s, h) {
        c0 = h, f0 = s, Mt = r, hI(r, s, h), c0 = null, f0 = null;
      }
      function hI(r, s, h) {
        for (var g = (r.mode & Ot) !== Ft; Mt !== null; ) {
          var E = Mt, C = E.child;
          if (E.tag === Ne && g) {
            var M = E.memoizedState !== null, I = M || zx;
            if (I) {
              uM(r, s, h);
              continue;
            } else {
              var P = E.alternate, W = P !== null && P.memoizedState !== null, X = W || Ws, de = zx, he = Ws;
              zx = I, Ws = X, Ws && !he && (Mt = E, h6(E));
              for (var we = C; we !== null; )
                Mt = we, hI(
                  we,
                  // New root; bubble back up to here and stop.
                  s,
                  h
                ), we = we.sibling;
              Mt = E, zx = de, Ws = he, uM(r, s, h);
              continue;
            }
          }
          (E.subtreeFlags & Io) !== kt && C !== null ? (C.return = E, Mt = C) : uM(r, s, h);
        }
      }
      function uM(r, s, h) {
        for (; Mt !== null; ) {
          var g = Mt;
          if ((g.flags & Io) !== kt) {
            var E = g.alternate;
            fr(g);
            try {
              e6(s, E, g, h);
            } catch (M) {
              yr(g, g.return, M);
            }
            Zi();
          }
          if (g === r) {
            Mt = null;
            return;
          }
          var C = g.sibling;
          if (C !== null) {
            C.return = g.return, Mt = C;
            return;
          }
          Mt = g.return;
        }
      }
      function f6(r) {
        for (; Mt !== null; ) {
          var s = Mt, h = s.child;
          switch (s.tag) {
            case y:
            case V:
            case ie:
            case ue: {
              if (s.mode & Wn)
                try {
                  Ah(), gf(es, s, s.return);
                } finally {
                  Oh(s);
                }
              else
                gf(es, s, s.return);
              break;
            }
            case _: {
              h0(s, s.return);
              var g = s.stateNode;
              typeof g.componentWillUnmount == "function" && sM(s, s.return, g);
              break;
            }
            case O: {
              h0(s, s.return);
              break;
            }
            case Ne: {
              var E = s.memoizedState !== null;
              if (E) {
                dI(r);
                continue;
              }
              break;
            }
          }
          h !== null ? (h.return = s, Mt = h) : dI(r);
        }
      }
      function dI(r) {
        for (; Mt !== null; ) {
          var s = Mt;
          if (s === r) {
            Mt = null;
            return;
          }
          var h = s.sibling;
          if (h !== null) {
            h.return = s.return, Mt = h;
            return;
          }
          Mt = s.return;
        }
      }
      function h6(r) {
        for (; Mt !== null; ) {
          var s = Mt, h = s.child;
          if (s.tag === Ne) {
            var g = s.memoizedState !== null;
            if (g) {
              pI(r);
              continue;
            }
          }
          h !== null ? (h.return = s, Mt = h) : pI(r);
        }
      }
      function pI(r) {
        for (; Mt !== null; ) {
          var s = Mt;
          fr(s);
          try {
            t6(s);
          } catch (g) {
            yr(s, s.return, g);
          }
          if (Zi(), s === r) {
            Mt = null;
            return;
          }
          var h = s.sibling;
          if (h !== null) {
            h.return = s.return, Mt = h;
            return;
          }
          Mt = s.return;
        }
      }
      function d6(r, s, h, g) {
        Mt = s, p6(s, r, h, g);
      }
      function p6(r, s, h, g) {
        for (; Mt !== null; ) {
          var E = Mt, C = E.child;
          (E.subtreeFlags & Ya) !== kt && C !== null ? (C.return = E, Mt = C) : g6(r, s, h, g);
        }
      }
      function g6(r, s, h, g) {
        for (; Mt !== null; ) {
          var E = Mt;
          if ((E.flags & ps) !== kt) {
            fr(E);
            try {
              m6(s, E, h, g);
            } catch (M) {
              yr(E, E.return, M);
            }
            Zi();
          }
          if (E === r) {
            Mt = null;
            return;
          }
          var C = E.sibling;
          if (C !== null) {
            C.return = E.return, Mt = C;
            return;
          }
          Mt = E.return;
        }
      }
      function m6(r, s, h, g) {
        switch (s.tag) {
          case y:
          case V:
          case ue: {
            if (s.mode & Wn) {
              zR();
              try {
                Ag(Vs | Ja, s);
              } finally {
                UR(s);
              }
            } else
              Ag(Vs | Ja, s);
            break;
          }
        }
      }
      function v6(r) {
        Mt = r, y6();
      }
      function y6() {
        for (; Mt !== null; ) {
          var r = Mt, s = r.child;
          if ((Mt.flags & ii) !== kt) {
            var h = r.deletions;
            if (h !== null) {
              for (var g = 0; g < h.length; g++) {
                var E = h[g];
                Mt = E, S6(E, r);
              }
              {
                var C = r.alternate;
                if (C !== null) {
                  var M = C.child;
                  if (M !== null) {
                    C.child = null;
                    do {
                      var I = M.sibling;
                      M.sibling = null, M = I;
                    } while (M !== null);
                  }
                }
              }
              Mt = r;
            }
          }
          (r.subtreeFlags & Ya) !== kt && s !== null ? (s.return = r, Mt = s) : _6();
        }
      }
      function _6() {
        for (; Mt !== null; ) {
          var r = Mt;
          (r.flags & ps) !== kt && (fr(r), E6(r), Zi());
          var s = r.sibling;
          if (s !== null) {
            s.return = r.return, Mt = s;
            return;
          }
          Mt = r.return;
        }
      }
      function E6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            r.mode & Wn ? (zR(), gf(Vs | Ja, r, r.return), UR(r)) : gf(Vs | Ja, r, r.return);
            break;
          }
        }
      }
      function S6(r, s) {
        for (; Mt !== null; ) {
          var h = Mt;
          fr(h), b6(h, s), Zi();
          var g = h.child;
          g !== null ? (g.return = h, Mt = g) : x6(r);
        }
      }
      function x6(r) {
        for (; Mt !== null; ) {
          var s = Mt, h = s.sibling, g = s.return;
          if (sI(s), s === r) {
            Mt = null;
            return;
          }
          if (h !== null) {
            h.return = g, Mt = h;
            return;
          }
          Mt = g;
        }
      }
      function b6(r, s) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            r.mode & Wn ? (zR(), gf(Vs, r, s), UR(r)) : gf(Vs, r, s);
            break;
          }
        }
      }
      function w6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            try {
              Ag(es | Ja, r);
            } catch (h) {
              yr(r, r.return, h);
            }
            break;
          }
          case _: {
            var s = r.stateNode;
            try {
              s.componentDidMount();
            } catch (h) {
              yr(r, r.return, h);
            }
            break;
          }
        }
      }
      function C6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            try {
              Ag(Vs | Ja, r);
            } catch (s) {
              yr(r, r.return, s);
            }
            break;
          }
        }
      }
      function T6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue: {
            try {
              gf(es | Ja, r, r.return);
            } catch (h) {
              yr(r, r.return, h);
            }
            break;
          }
          case _: {
            var s = r.stateNode;
            typeof s.componentWillUnmount == "function" && sM(r, r.return, s);
            break;
          }
        }
      }
      function R6(r) {
        switch (r.tag) {
          case y:
          case V:
          case ue:
            try {
              gf(Vs | Ja, r, r.return);
            } catch (s) {
              yr(r, r.return, s);
            }
        }
      }
      if (typeof Symbol == "function" && Symbol.for) {
        var I1 = Symbol.for;
        I1("selector.component"), I1("selector.has_pseudo_class"), I1("selector.role"), I1("selector.test_id"), I1("selector.text");
      }
      var M6 = [];
      function O6() {
        M6.forEach(function(r) {
          return r();
        });
      }
      var A6 = i.ReactCurrentActQueue;
      function L6(r) {
        {
          var s = (
            // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
            typeof IS_REACT_ACT_ENVIRONMENT < "u" ? IS_REACT_ACT_ENVIRONMENT : void 0
          ), h = typeof jest < "u";
          return h && s !== !1;
        }
      }
      function gI() {
        {
          var r = (
            // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
            typeof IS_REACT_ACT_ENVIRONMENT < "u" ? IS_REACT_ACT_ENVIRONMENT : void 0
          );
          return !r && A6.current !== null && c("The current testing environment is not configured to support act(...)"), r;
        }
      }
      var N6 = Math.ceil, cM = i.ReactCurrentDispatcher, fM = i.ReactCurrentOwner, Ys = i.ReactCurrentBatchConfig, yf = i.ReactCurrentActQueue, is = (
        /*             */
        0
      ), mI = (
        /*               */
        1
      ), qs = (
        /*                */
        2
      ), mc = (
        /*                */
        4
      ), lp = 0, P1 = 1, vv = 2, Bx = 3, k1 = 4, vI = 5, hM = 6, Xn = is, Wo = null, ra = null, rs = je, Nh = je, dM = lf(je), as = lp, F1 = null, Vx = je, j1 = je, Hx = je, U1 = null, wl = null, pM = 0, yI = 500, _I = 1 / 0, D6 = 500, up = null;
      function z1() {
        _I = Di() + D6;
      }
      function EI() {
        return _I;
      }
      var Wx = !1, gM = null, d0 = null, yv = !1, Ng = null, $1 = je, mM = [], vM = null, I6 = 50, B1 = 0, yM = null, _M = !1, Gx = !1, P6 = 50, p0 = 0, Yx = null, V1 = oi, qx = je, SI = !1;
      function Xx() {
        return Wo;
      }
      function Go() {
        return (Xn & (qs | mc)) !== is ? Di() : (V1 !== oi || (V1 = Di()), V1);
      }
      function Dg(r) {
        var s = r.mode;
        if ((s & Ot) === Ft)
          return Bt;
        if ((Xn & qs) !== is && rs !== je)
          return Yc(rs);
        var h = Lz() !== Az;
        if (h) {
          if (Ys.transition !== null) {
            var g = Ys.transition;
            g._updatedFibers || (g._updatedFibers = /* @__PURE__ */ new Set()), g._updatedFibers.add(r);
          }
          return qx === Pr && (qx = Dm()), qx;
        }
        var E = uo();
        if (E !== Pr)
          return E;
        var C = $C();
        return C;
      }
      function k6(r) {
        var s = r.mode;
        return (s & Ot) === Ft ? Bt : Na();
      }
      function ss(r, s, h, g) {
        s$(), SI && c("useInsertionEffect must not schedule updates."), _M && (Gx = !0), uu(r, h, g), (Xn & qs) !== je && r === Wo ? u$(s) : (ys && ml(r, s, h), c$(s), r === Wo && ((Xn & qs) === is && (j1 = an(j1, h)), as === k1 && Ig(r, rs)), Cl(r, g), h === Bt && Xn === is && (s.mode & Ot) === Ft && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
        !yf.isBatchingLegacy && (z1(), EN()));
      }
      function F6(r, s, h) {
        var g = r.current;
        g.lanes = s, uu(r, s, h), Cl(r, h);
      }
      function j6(r) {
        return (
          // TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
          // decided not to enable it.
          (Xn & qs) !== is
        );
      }
      function Cl(r, s) {
        var h = r.callbackNode;
        L_(r, s);
        var g = oh(r, r === Wo ? rs : je);
        if (g === je) {
          h !== null && FI(h), r.callbackNode = null, r.callbackPriority = Pr;
          return;
        }
        var E = jr(g), C = r.callbackPriority;
        if (C === E && // Special case related to `act`. If the currently scheduled task is a
        // Scheduler task, rather than an `act` task, cancel it and re-scheduled
        // on the `act` queue.
        !(yf.current !== null && h !== TM)) {
          h == null && C !== Bt && c("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");
          return;
        }
        h != null && FI(h);
        var M;
        if (E === Bt)
          r.tag === xg ? (yf.isBatchingLegacy !== null && (yf.didScheduleLegacyUpdate = !0), dz(wI.bind(null, r))) : _N(wI.bind(null, r)), yf.current !== null ? yf.current.push(bg) : VC(function() {
            (Xn & (qs | mc)) === is && bg();
          }), M = null;
        else {
          var I;
          switch (li(g)) {
            case Cr:
              I = vs;
              break;
            case or:
              I = eu;
              break;
            case vl:
              I = gl;
              break;
            case hh:
              I = Ir;
              break;
            default:
              I = gl;
              break;
          }
          M = RM(I, xI.bind(null, r));
        }
        r.callbackPriority = E, r.callbackNode = M;
      }
      function xI(r, s) {
        if (s4(), V1 = oi, qx = je, (Xn & (qs | mc)) !== is)
          throw new Error("Should not already be working.");
        var h = r.callbackNode, g = fp();
        if (g && r.callbackNode !== h)
          return null;
        var E = oh(r, r === Wo ? rs : je);
        if (E === je)
          return null;
        var C = !kd(r, E) && !Nm(r, E) && !s, M = C ? q6(r, E) : Zx(r, E);
        if (M !== lp) {
          if (M === vv) {
            var I = ou(r);
            I !== je && (E = I, M = EM(r, I));
          }
          if (M === P1) {
            var P = F1;
            throw _v(r, je), Ig(r, E), Cl(r, Di()), P;
          }
          if (M === hM)
            Ig(r, E);
          else {
            var W = !kd(r, E), X = r.current.alternate;
            if (W && !z6(X)) {
              if (M = Zx(r, E), M === vv) {
                var de = ou(r);
                de !== je && (E = de, M = EM(r, de));
              }
              if (M === P1) {
                var he = F1;
                throw _v(r, je), Ig(r, E), Cl(r, Di()), he;
              }
            }
            r.finishedWork = X, r.finishedLanes = E, U6(r, M, E);
          }
        }
        return Cl(r, Di()), r.callbackNode === h ? xI.bind(null, r) : null;
      }
      function EM(r, s) {
        var h = U1;
        if (dh(r)) {
          var g = _v(r, s);
          g.flags |= hr, bT(r.containerInfo);
        }
        var E = Zx(r, s);
        if (E !== vv) {
          var C = wl;
          wl = h, C !== null && bI(C);
        }
        return E;
      }
      function bI(r) {
        wl === null ? wl = r : wl.push.apply(wl, r);
      }
      function U6(r, s, h) {
        switch (s) {
          case lp:
          case P1:
            throw new Error("Root did not complete. This is a bug in React.");
          case vv: {
            Ev(r, wl, up);
            break;
          }
          case Bx: {
            if (Ig(r, h), Id(h) && // do not delay if we're inside an act() scope
            !jI()) {
              var g = pM + yI - Di();
              if (g > 10) {
                var E = oh(r, je);
                if (E !== je)
                  break;
                var C = r.suspendedLanes;
                if (!qc(C, h)) {
                  Go(), cu(r, C);
                  break;
                }
                r.timeoutHandle = n1(Ev.bind(null, r, wl, up), g);
                break;
              }
            }
            Ev(r, wl, up);
            break;
          }
          case k1: {
            if (Ig(r, h), Pd(h))
              break;
            if (!jI()) {
              var M = su(r, h), I = M, P = Di() - I, W = a$(P) - P;
              if (W > 10) {
                r.timeoutHandle = n1(Ev.bind(null, r, wl, up), W);
                break;
              }
            }
            Ev(r, wl, up);
            break;
          }
          case vI: {
            Ev(r, wl, up);
            break;
          }
          default:
            throw new Error("Unknown root exit status.");
        }
      }
      function z6(r) {
        for (var s = r; ; ) {
          if (s.flags & Ga) {
            var h = s.updateQueue;
            if (h !== null) {
              var g = h.stores;
              if (g !== null)
                for (var E = 0; E < g.length; E++) {
                  var C = g[E], M = C.getSnapshot, I = C.value;
                  try {
                    if (!St(M(), I))
                      return !1;
                  } catch {
                    return !1;
                  }
                }
            }
          }
          var P = s.child;
          if (s.subtreeFlags & Ga && P !== null) {
            P.return = s, s = P;
            continue;
          }
          if (s === r)
            return !0;
          for (; s.sibling === null; ) {
            if (s.return === null || s.return === r)
              return !0;
            s = s.return;
          }
          s.sibling.return = s.return, s = s.sibling;
        }
        return !0;
      }
      function Ig(r, s) {
        s = jd(s, Hx), s = jd(s, j1), Ud(r, s);
      }
      function wI(r) {
        if (o4(), (Xn & (qs | mc)) !== is)
          throw new Error("Should not already be working.");
        fp();
        var s = oh(r, je);
        if (!Ka(s, Bt))
          return Cl(r, Di()), null;
        var h = Zx(r, s);
        if (r.tag !== xg && h === vv) {
          var g = ou(r);
          g !== je && (s = g, h = EM(r, g));
        }
        if (h === P1) {
          var E = F1;
          throw _v(r, je), Ig(r, s), Cl(r, Di()), E;
        }
        if (h === hM)
          throw new Error("Root did not complete. This is a bug in React.");
        var C = r.current.alternate;
        return r.finishedWork = C, r.finishedLanes = s, Ev(r, wl, up), Cl(r, Di()), null;
      }
      function $6(r, s) {
        s !== je && (fh(r, an(s, Bt)), Cl(r, Di()), (Xn & (qs | mc)) === is && (z1(), bg()));
      }
      function SM(r, s) {
        var h = Xn;
        Xn |= mI;
        try {
          return r(s);
        } finally {
          Xn = h, Xn === is && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
          !yf.isBatchingLegacy && (z1(), EN());
        }
      }
      function B6(r, s, h, g, E) {
        var C = uo(), M = Ys.transition;
        try {
          return Ys.transition = null, gr(Cr), r(s, h, g, E);
        } finally {
          gr(C), Ys.transition = M, Xn === is && z1();
        }
      }
      function cp(r) {
        Ng !== null && Ng.tag === xg && (Xn & (qs | mc)) === is && fp();
        var s = Xn;
        Xn |= mI;
        var h = Ys.transition, g = uo();
        try {
          return Ys.transition = null, gr(Cr), r ? r() : void 0;
        } finally {
          gr(g), Ys.transition = h, Xn = s, (Xn & (qs | mc)) === is && bg();
        }
      }
      function CI() {
        return (Xn & (qs | mc)) !== is;
      }
      function Kx(r, s) {
        Eo(dM, Nh, r), Nh = an(Nh, s);
      }
      function xM(r) {
        Nh = dM.current, _o(dM, r);
      }
      function _v(r, s) {
        r.finishedWork = null, r.finishedLanes = je;
        var h = r.timeoutHandle;
        if (h !== i1 && (r.timeoutHandle = i1, BC(h)), ra !== null)
          for (var g = ra.return; g !== null; ) {
            var E = g.alternate;
            eI(E, g), g = g.return;
          }
        Wo = r;
        var C = Sv(r.current, null);
        return ra = C, rs = Nh = s, as = lp, F1 = null, Vx = je, j1 = je, Hx = je, U1 = null, wl = null, Pz(), cf.discardPendingWarnings(), C;
      }
      function TI(r, s) {
        do {
          var h = ra;
          try {
            if (rx(), nD(), Zi(), fM.current = null, h === null || h.return === null) {
              as = P1, F1 = s, ra = null;
              return;
            }
            if (Ze && h.mode & Wn && kx(h, !0), Ye)
              if (Fo(), s !== null && typeof s == "object" && typeof s.then == "function") {
                var g = s;
                yy(h, g, rs);
              } else
                Hp(h, s, rs);
            h4(r, h.return, h, s, rs), AI(h);
          } catch (E) {
            s = E, ra === h && h !== null ? (h = h.return, ra = h) : h = ra;
            continue;
          }
          return;
        } while (!0);
      }
      function RI() {
        var r = cM.current;
        return cM.current = Lx, r === null ? Lx : r;
      }
      function MI(r) {
        cM.current = r;
      }
      function V6() {
        pM = Di();
      }
      function H1(r) {
        Vx = an(r, Vx);
      }
      function H6() {
        as === lp && (as = Bx);
      }
      function bM() {
        (as === lp || as === Bx || as === vv) && (as = k1), Wo !== null && (uh(Vx) || uh(j1)) && Ig(Wo, rs);
      }
      function W6(r) {
        as !== k1 && (as = vv), U1 === null ? U1 = [r] : U1.push(r);
      }
      function G6() {
        return as === lp;
      }
      function Zx(r, s) {
        var h = Xn;
        Xn |= qs;
        var g = RI();
        if (Wo !== r || rs !== s) {
          if (ys) {
            var E = r.memoizedUpdaters;
            E.size > 0 && (W1(r, rs), E.clear()), Im(r, s);
          }
          up = Kc(), _v(r, s);
        }
        tu(s);
        do
          try {
            Y6();
            break;
          } catch (C) {
            TI(r, C);
          }
        while (!0);
        if (rx(), Xn = h, MI(g), ra !== null)
          throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");
        return nu(), Wo = null, rs = je, as;
      }
      function Y6() {
        for (; ra !== null; )
          OI(ra);
      }
      function q6(r, s) {
        var h = Xn;
        Xn |= qs;
        var g = RI();
        if (Wo !== r || rs !== s) {
          if (ys) {
            var E = r.memoizedUpdaters;
            E.size > 0 && (W1(r, rs), E.clear()), Im(r, s);
          }
          up = Kc(), z1(), _v(r, s);
        }
        tu(s);
        do
          try {
            X6();
            break;
          } catch (C) {
            TI(r, C);
          }
        while (!0);
        return rx(), MI(g), Xn = h, ra !== null ? (bd(), lp) : (nu(), Wo = null, rs = je, as);
      }
      function X6() {
        for (; ra !== null && !Cm(); )
          OI(ra);
      }
      function OI(r) {
        var s = r.alternate;
        fr(r);
        var h;
        (r.mode & Wn) !== Ft ? (jR(r), h = wM(s, r, Nh), kx(r, !0)) : h = wM(s, r, Nh), Zi(), r.memoizedProps = r.pendingProps, h === null ? AI(r) : ra = h, fM.current = null;
      }
      function AI(r) {
        var s = r;
        do {
          var h = s.alternate, g = s.return;
          if ((s.flags & Vu) === kt) {
            fr(s);
            var E = void 0;
            if ((s.mode & Wn) === Ft ? E = JD(h, s, Nh) : (jR(s), E = JD(h, s, Nh), kx(s, !1)), Zi(), E !== null) {
              ra = E;
              return;
            }
          } else {
            var C = H4(h, s);
            if (C !== null) {
              C.flags &= Ql, ra = C;
              return;
            }
            if ((s.mode & Wn) !== Ft) {
              kx(s, !1);
              for (var M = s.actualDuration, I = s.child; I !== null; )
                M += I.actualDuration, I = I.sibling;
              s.actualDuration = M;
            }
            if (g !== null)
              g.flags |= Vu, g.subtreeFlags = kt, g.deletions = null;
            else {
              as = hM, ra = null;
              return;
            }
          }
          var P = s.sibling;
          if (P !== null) {
            ra = P;
            return;
          }
          s = g, ra = s;
        } while (s !== null);
        as === lp && (as = vI);
      }
      function Ev(r, s, h) {
        var g = uo(), E = Ys.transition;
        try {
          Ys.transition = null, gr(Cr), K6(r, s, h, g);
        } finally {
          Ys.transition = E, gr(g);
        }
        return null;
      }
      function K6(r, s, h, g) {
        do
          fp();
        while (Ng !== null);
        if (o$(), (Xn & (qs | mc)) !== is)
          throw new Error("Should not already be working.");
        var E = r.finishedWork, C = r.finishedLanes;
        if (Rm(C), E === null)
          return xd(), null;
        if (C === je && c("root.finishedLanes should not be empty during a commit. This is a bug in React."), r.finishedWork = null, r.finishedLanes = je, E === r.current)
          throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");
        r.callbackNode = null, r.callbackPriority = Pr;
        var M = an(E.lanes, E.childLanes);
        jt(r, M), r === Wo && (Wo = null, ra = null, rs = je), ((E.subtreeFlags & Ya) !== kt || (E.flags & Ya) !== kt) && (yv || (yv = !0, vM = h, RM(gl, function() {
          return fp(), null;
        })));
        var I = (E.subtreeFlags & (gs | ms | Io | Ya)) !== kt, P = (E.flags & (gs | ms | Io | Ya)) !== kt;
        if (I || P) {
          var W = Ys.transition;
          Ys.transition = null;
          var X = uo();
          gr(Cr);
          var de = Xn;
          Xn |= mc, fM.current = null, X4(r, E), RD(), u6(r, E, C), PC(r.containerInfo), r.current = E, Ku(C), c6(E, r, C), Lm(), pl(), Xn = de, gr(X), Ys.transition = W;
        } else
          r.current = E, RD();
        var he = yv;
        if (yv ? (yv = !1, Ng = r, $1 = C) : (p0 = 0, Yx = null), M = r.pendingLanes, M === je && (d0 = null), he || II(r.current, !1), Yu(E.stateNode, g), ys && r.memoizedUpdaters.clear(), O6(), Cl(r, Di()), s !== null)
          for (var we = r.onRecoverableError, Ce = 0; Ce < s.length; Ce++) {
            var Pe = s[Ce], yt = Pe.stack, Vt = Pe.digest;
            we(Pe.value, {
              componentStack: yt,
              digest: Vt
            });
          }
        if (Wx) {
          Wx = !1;
          var Nt = gM;
          throw gM = null, Nt;
        }
        return Ka($1, Bt) && r.tag !== xg && fp(), M = r.pendingLanes, Ka(M, Bt) ? (a4(), r === yM ? B1++ : (B1 = 0, yM = r)) : B1 = 0, bg(), xd(), null;
      }
      function fp() {
        if (Ng !== null) {
          var r = li($1), s = D_(vl, r), h = Ys.transition, g = uo();
          try {
            return Ys.transition = null, gr(s), Q6();
          } finally {
            gr(g), Ys.transition = h;
          }
        }
        return !1;
      }
      function Z6(r) {
        mM.push(r), yv || (yv = !0, RM(gl, function() {
          return fp(), null;
        }));
      }
      function Q6() {
        if (Ng === null)
          return !1;
        var r = vM;
        vM = null;
        var s = Ng, h = $1;
        if (Ng = null, $1 = je, (Xn & (qs | mc)) !== is)
          throw new Error("Cannot flush passive effects while already rendering.");
        _M = !0, Gx = !1, Jf(h);
        var g = Xn;
        Xn |= mc, v6(s.current), d6(s, s.current, h, r);
        {
          var E = mM;
          mM = [];
          for (var C = 0; C < E.length; C++) {
            var M = E[C];
            J4(s, M);
          }
        }
        jo(), II(s.current, !0), Xn = g, bg(), Gx ? s === Yx ? p0++ : (p0 = 0, Yx = s) : p0 = 0, _M = !1, Gx = !1, Tm(s);
        {
          var I = s.current.stateNode;
          I.effectDuration = 0, I.passiveEffectDuration = 0;
        }
        return !0;
      }
      function LI(r) {
        return d0 !== null && d0.has(r);
      }
      function J6(r) {
        d0 === null ? d0 = /* @__PURE__ */ new Set([r]) : d0.add(r);
      }
      function e$(r) {
        Wx || (Wx = !0, gM = r);
      }
      var t$ = e$;
      function NI(r, s, h) {
        var g = gv(h, s), E = OD(r, g, Bt), C = Cg(r, E, Bt), M = Go();
        C !== null && (uu(C, Bt, M), Cl(C, M));
      }
      function yr(r, s, h) {
        if (G4(h), G1(!1), r.tag === b) {
          NI(r, r, h);
          return;
        }
        var g = null;
        for (g = s; g !== null; ) {
          if (g.tag === b) {
            NI(g, r, h);
            return;
          } else if (g.tag === _) {
            var E = g.type, C = g.stateNode;
            if (typeof E.getDerivedStateFromError == "function" || typeof C.componentDidCatch == "function" && !LI(C)) {
              var M = gv(h, r), I = HR(g, M, Bt), P = Cg(g, I, Bt), W = Go();
              P !== null && (uu(P, Bt, W), Cl(P, W));
              return;
            }
          }
          g = g.return;
        }
        c(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.

Error message:

%s`, h);
      }
      function n$(r, s, h) {
        var g = r.pingCache;
        g !== null && g.delete(s);
        var E = Go();
        cu(r, h), f$(r), Wo === r && qc(rs, h) && (as === k1 || as === Bx && Id(rs) && Di() - pM < yI ? _v(r, je) : Hx = an(Hx, h)), Cl(r, E);
      }
      function DI(r, s) {
        s === Pr && (s = k6(r));
        var h = Go(), g = xl(r, s);
        g !== null && (uu(g, s, h), Cl(g, h));
      }
      function i$(r) {
        var s = r.memoizedState, h = Pr;
        s !== null && (h = s.retryLane), DI(r, h);
      }
      function r$(r, s) {
        var h = Pr, g;
        switch (r.tag) {
          case G:
            g = r.stateNode;
            var E = r.memoizedState;
            E !== null && (h = E.retryLane);
            break;
          case Ee:
            g = r.stateNode;
            break;
          default:
            throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.");
        }
        g !== null && g.delete(s), DI(r, h);
      }
      function a$(r) {
        return r < 120 ? 120 : r < 480 ? 480 : r < 1080 ? 1080 : r < 1920 ? 1920 : r < 3e3 ? 3e3 : r < 4320 ? 4320 : N6(r / 1960) * 1960;
      }
      function s$() {
        if (B1 > I6)
          throw B1 = 0, yM = null, new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");
        p0 > P6 && (p0 = 0, Yx = null, c("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."));
      }
      function o$() {
        cf.flushLegacyContextWarning(), cf.flushPendingUnsafeLifecycleWarnings();
      }
      function II(r, s) {
        fr(r), Qx(r, so, T6), s && Qx(r, zc, R6), Qx(r, so, w6), s && Qx(r, zc, C6), Zi();
      }
      function Qx(r, s, h) {
        for (var g = r, E = null; g !== null; ) {
          var C = g.subtreeFlags & s;
          g !== E && g.child !== null && C !== kt ? g = g.child : ((g.flags & s) !== kt && h(g), g.sibling !== null ? g = g.sibling : g = E = g.return);
        }
      }
      var Jx = null;
      function PI(r) {
        {
          if ((Xn & qs) !== is || !(r.mode & Ot))
            return;
          var s = r.tag;
          if (s !== S && s !== b && s !== _ && s !== y && s !== V && s !== ie && s !== ue)
            return;
          var h = Qt(r) || "ReactComponent";
          if (Jx !== null) {
            if (Jx.has(h))
              return;
            Jx.add(h);
          } else
            Jx = /* @__PURE__ */ new Set([h]);
          var g = cr;
          try {
            fr(r), c("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.");
          } finally {
            g ? fr(r) : Zi();
          }
        }
      }
      var wM;
      {
        var l$ = null;
        wM = function(r, s, h) {
          var g = VI(l$, s);
          try {
            return qD(r, s, h);
          } catch (C) {
            if (Sz() || C !== null && typeof C == "object" && typeof C.then == "function")
              throw C;
            if (rx(), nD(), eI(r, s), VI(s, g), s.mode & Wn && jR(s), Wa(null, qD, null, r, s, h), qf()) {
              var E = io();
              typeof E == "object" && E !== null && E._suppressLogging && typeof C == "object" && C !== null && !C._suppressLogging && (C._suppressLogging = !0);
            }
            throw C;
          }
        };
      }
      var kI = !1, CM;
      CM = /* @__PURE__ */ new Set();
      function u$(r) {
        if (fs && !n4())
          switch (r.tag) {
            case y:
            case V:
            case ue: {
              var s = ra && Qt(ra) || "Unknown", h = s;
              if (!CM.has(h)) {
                CM.add(h);
                var g = Qt(r) || "Unknown";
                c("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render", g, s, s);
              }
              break;
            }
            case _: {
              kI || (c("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."), kI = !0);
              break;
            }
          }
      }
      function W1(r, s) {
        if (ys) {
          var h = r.memoizedUpdaters;
          h.forEach(function(g) {
            ml(r, g, s);
          });
        }
      }
      var TM = {};
      function RM(r, s) {
        {
          var h = yf.current;
          return h !== null ? (h.push(s), TM) : wm(r, s);
        }
      }
      function FI(r) {
        if (r !== TM)
          return Ed(r);
      }
      function jI() {
        return yf.current !== null;
      }
      function c$(r) {
        {
          if (r.mode & Ot) {
            if (!gI())
              return;
          } else if (!L6() || Xn !== is || r.tag !== y && r.tag !== V && r.tag !== ue)
            return;
          if (yf.current === null) {
            var s = cr;
            try {
              fr(r), c(`An update to %s inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`, Qt(r));
            } finally {
              s ? fr(r) : Zi();
            }
          }
        }
      }
      function f$(r) {
        r.tag !== xg && gI() && yf.current === null && c(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).

When testing, code that resolves suspended data should be wrapped into act(...):

act(() => {
  /* finish loading suspended data */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`);
      }
      function G1(r) {
        SI = r;
      }
      var vc = null, g0 = null, h$ = function(r) {
        vc = r;
      };
      function m0(r) {
        {
          if (vc === null)
            return r;
          var s = vc(r);
          return s === void 0 ? r : s.current;
        }
      }
      function MM(r) {
        return m0(r);
      }
      function OM(r) {
        {
          if (vc === null)
            return r;
          var s = vc(r);
          if (s === void 0) {
            if (r != null && typeof r.render == "function") {
              var h = m0(r.render);
              if (r.render !== h) {
                var g = {
                  $$typeof: ct,
                  render: h
                };
                return r.displayName !== void 0 && (g.displayName = r.displayName), g;
              }
            }
            return r;
          }
          return s.current;
        }
      }
      function UI(r, s) {
        {
          if (vc === null)
            return !1;
          var h = r.elementType, g = s.type, E = !1, C = typeof g == "object" && g !== null ? g.$$typeof : null;
          switch (r.tag) {
            case _: {
              typeof g == "function" && (E = !0);
              break;
            }
            case y: {
              (typeof g == "function" || C === It) && (E = !0);
              break;
            }
            case V: {
              (C === ct || C === It) && (E = !0);
              break;
            }
            case ie:
            case ue: {
              (C === un || C === It) && (E = !0);
              break;
            }
            default:
              return !1;
          }
          if (E) {
            var M = vc(h);
            if (M !== void 0 && M === vc(g))
              return !0;
          }
          return !1;
        }
      }
      function zI(r) {
        {
          if (vc === null || typeof WeakSet != "function")
            return;
          g0 === null && (g0 = /* @__PURE__ */ new WeakSet()), g0.add(r);
        }
      }
      var d$ = function(r, s) {
        {
          if (vc === null)
            return;
          var h = s.staleFamilies, g = s.updatedFamilies;
          fp(), cp(function() {
            AM(r.current, g, h);
          });
        }
      }, p$ = function(r, s) {
        {
          if (r.context !== gu)
            return;
          fp(), cp(function() {
            Y1(s, r, null, null);
          });
        }
      };
      function AM(r, s, h) {
        {
          var g = r.alternate, E = r.child, C = r.sibling, M = r.tag, I = r.type, P = null;
          switch (M) {
            case y:
            case ue:
            case _:
              P = I;
              break;
            case V:
              P = I.render;
              break;
          }
          if (vc === null)
            throw new Error("Expected resolveFamily to be set during hot reload.");
          var W = !1, X = !1;
          if (P !== null) {
            var de = vc(P);
            de !== void 0 && (h.has(de) ? X = !0 : s.has(de) && (M === _ ? X = !0 : W = !0));
          }
          if (g0 !== null && (g0.has(r) || g !== null && g0.has(g)) && (X = !0), X && (r._debugNeedsRemount = !0), X || W) {
            var he = xl(r, Bt);
            he !== null && ss(he, r, Bt, oi);
          }
          E !== null && !X && AM(E, s, h), C !== null && AM(C, s, h);
        }
      }
      var g$ = function(r, s) {
        {
          var h = /* @__PURE__ */ new Set(), g = new Set(s.map(function(E) {
            return E.current;
          }));
          return LM(r.current, g, h), h;
        }
      };
      function LM(r, s, h) {
        {
          var g = r.child, E = r.sibling, C = r.tag, M = r.type, I = null;
          switch (C) {
            case y:
            case ue:
            case _:
              I = M;
              break;
            case V:
              I = M.render;
              break;
          }
          var P = !1;
          I !== null && s.has(I) && (P = !0), P ? m$(r, h) : g !== null && LM(g, s, h), E !== null && LM(E, s, h);
        }
      }
      function m$(r, s) {
        {
          var h = v$(r, s);
          if (h)
            return;
          for (var g = r; ; ) {
            switch (g.tag) {
              case O:
                s.add(g.stateNode);
                return;
              case T:
                s.add(g.stateNode.containerInfo);
                return;
              case b:
                s.add(g.stateNode.containerInfo);
                return;
            }
            if (g.return === null)
              throw new Error("Expected to reach root first.");
            g = g.return;
          }
        }
      }
      function v$(r, s) {
        for (var h = r, g = !1; ; ) {
          if (h.tag === O)
            g = !0, s.add(h.stateNode);
          else if (h.child !== null) {
            h.child.return = h, h = h.child;
            continue;
          }
          if (h === r)
            return g;
          for (; h.sibling === null; ) {
            if (h.return === null || h.return === r)
              return g;
            h = h.return;
          }
          h.sibling.return = h.return, h = h.sibling;
        }
        return !1;
      }
      var NM;
      {
        NM = !1;
        try {
          var $I = Object.preventExtensions({});
        } catch {
          NM = !0;
        }
      }
      function y$(r, s, h, g) {
        this.tag = r, this.key = h, this.elementType = null, this.type = null, this.stateNode = null, this.return = null, this.child = null, this.sibling = null, this.index = 0, this.ref = null, this.pendingProps = s, this.memoizedProps = null, this.updateQueue = null, this.memoizedState = null, this.dependencies = null, this.mode = g, this.flags = kt, this.subtreeFlags = kt, this.deletions = null, this.lanes = je, this.childLanes = je, this.alternate = null, this.actualDuration = Number.NaN, this.actualStartTime = Number.NaN, this.selfBaseDuration = Number.NaN, this.treeBaseDuration = Number.NaN, this.actualDuration = 0, this.actualStartTime = -1, this.selfBaseDuration = 0, this.treeBaseDuration = 0, this._debugSource = null, this._debugOwner = null, this._debugNeedsRemount = !1, this._debugHookTypes = null, !NM && typeof Object.preventExtensions == "function" && Object.preventExtensions(this);
      }
      var mu = function(r, s, h, g) {
        return new y$(r, s, h, g);
      };
      function DM(r) {
        var s = r.prototype;
        return !!(s && s.isReactComponent);
      }
      function _$(r) {
        return typeof r == "function" && !DM(r) && r.defaultProps === void 0;
      }
      function E$(r) {
        if (typeof r == "function")
          return DM(r) ? _ : y;
        if (r != null) {
          var s = r.$$typeof;
          if (s === ct)
            return V;
          if (s === un)
            return ie;
        }
        return S;
      }
      function Sv(r, s) {
        var h = r.alternate;
        h === null ? (h = mu(r.tag, s, r.key, r.mode), h.elementType = r.elementType, h.type = r.type, h.stateNode = r.stateNode, h._debugSource = r._debugSource, h._debugOwner = r._debugOwner, h._debugHookTypes = r._debugHookTypes, h.alternate = r, r.alternate = h) : (h.pendingProps = s, h.type = r.type, h.flags = kt, h.subtreeFlags = kt, h.deletions = null, h.actualDuration = 0, h.actualStartTime = -1), h.flags = r.flags & ua, h.childLanes = r.childLanes, h.lanes = r.lanes, h.child = r.child, h.memoizedProps = r.memoizedProps, h.memoizedState = r.memoizedState, h.updateQueue = r.updateQueue;
        var g = r.dependencies;
        switch (h.dependencies = g === null ? null : {
          lanes: g.lanes,
          firstContext: g.firstContext
        }, h.sibling = r.sibling, h.index = r.index, h.ref = r.ref, h.selfBaseDuration = r.selfBaseDuration, h.treeBaseDuration = r.treeBaseDuration, h._debugNeedsRemount = r._debugNeedsRemount, h.tag) {
          case S:
          case y:
          case ue:
            h.type = m0(r.type);
            break;
          case _:
            h.type = MM(r.type);
            break;
          case V:
            h.type = OM(r.type);
            break;
        }
        return h;
      }
      function S$(r, s) {
        r.flags &= ua | qn;
        var h = r.alternate;
        if (h === null)
          r.childLanes = je, r.lanes = s, r.child = null, r.subtreeFlags = kt, r.memoizedProps = null, r.memoizedState = null, r.updateQueue = null, r.dependencies = null, r.stateNode = null, r.selfBaseDuration = 0, r.treeBaseDuration = 0;
        else {
          r.childLanes = h.childLanes, r.lanes = h.lanes, r.child = h.child, r.subtreeFlags = kt, r.deletions = null, r.memoizedProps = h.memoizedProps, r.memoizedState = h.memoizedState, r.updateQueue = h.updateQueue, r.type = h.type;
          var g = h.dependencies;
          r.dependencies = g === null ? null : {
            lanes: g.lanes,
            firstContext: g.firstContext
          }, r.selfBaseDuration = h.selfBaseDuration, r.treeBaseDuration = h.treeBaseDuration;
        }
        return r;
      }
      function x$(r, s, h) {
        var g;
        return r === KS ? (g = Ot, s === !0 && (g |= sr, g |= lo)) : g = Ft, ys && (g |= Wn), mu(b, null, null, g);
      }
      function IM(r, s, h, g, E, C) {
        var M = S, I = r;
        if (typeof r == "function")
          DM(r) ? (M = _, I = MM(I)) : I = m0(I);
        else if (typeof r == "string")
          M = O;
        else
          e:
            switch (r) {
              case Ms:
                return Pg(h.children, E, C, s);
              case Ul:
                M = k, E |= sr, (E & Ot) !== Ft && (E |= lo);
                break;
              case re:
                return b$(h, E, C, s);
              case Sn:
                return w$(h, E, C, s);
              case jn:
                return C$(h, E, C, s);
              case Ui:
                return BI(h, E, C, s);
              case Zr:
              case Yr:
              case nl:
              case mi:
              case ji:
              default: {
                if (typeof r == "object" && r !== null)
                  switch (r.$$typeof) {
                    case We:
                      M = B;
                      break e;
                    case st:
                      M = $;
                      break e;
                    case ct:
                      M = V, I = OM(I);
                      break e;
                    case un:
                      M = ie;
                      break e;
                    case It:
                      M = Re, I = null;
                      break e;
                  }
                var P = "";
                {
                  (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (P += " 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 W = g ? Qt(g) : null;
                  W && (P += `

Check the render method of \`` + W + "`.");
                }
                throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) " + ("but got: " + (r == null ? r : typeof r) + "." + P));
              }
            }
        var X = mu(M, h, s, E);
        return X.elementType = r, X.type = I, X.lanes = C, X._debugOwner = g, X;
      }
      function PM(r, s, h) {
        var g = null;
        g = r._owner;
        var E = r.type, C = r.key, M = r.props, I = IM(E, C, M, g, s, h);
        return I._debugSource = r._source, I._debugOwner = r._owner, I;
      }
      function Pg(r, s, h, g) {
        var E = mu(D, r, g, s);
        return E.lanes = h, E;
      }
      function b$(r, s, h, g) {
        typeof r.id != "string" && c('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof r.id);
        var E = mu(z, r, g, s | Wn);
        return E.elementType = re, E.lanes = h, E.stateNode = {
          effectDuration: 0,
          passiveEffectDuration: 0
        }, E;
      }
      function w$(r, s, h, g) {
        var E = mu(G, r, g, s);
        return E.elementType = Sn, E.lanes = h, E;
      }
      function C$(r, s, h, g) {
        var E = mu(Ee, r, g, s);
        return E.elementType = jn, E.lanes = h, E;
      }
      function BI(r, s, h, g) {
        var E = mu(Ne, r, g, s);
        E.elementType = Ui, E.lanes = h;
        var C = {
          isHidden: !1
        };
        return E.stateNode = C, E;
      }
      function kM(r, s, h) {
        var g = mu(N, r, null, s);
        return g.lanes = h, g;
      }
      function T$() {
        var r = mu(O, null, null, Ft);
        return r.elementType = "DELETED", r;
      }
      function R$(r) {
        var s = mu($e, null, null, Ft);
        return s.stateNode = r, s;
      }
      function FM(r, s, h) {
        var g = r.children !== null ? r.children : [], E = mu(T, g, r.key, s);
        return E.lanes = h, E.stateNode = {
          containerInfo: r.containerInfo,
          pendingChildren: null,
          // Used by persistent updates
          implementation: r.implementation
        }, E;
      }
      function VI(r, s) {
        return r === null && (r = mu(S, null, null, Ft)), r.tag = s.tag, r.key = s.key, r.elementType = s.elementType, r.type = s.type, r.stateNode = s.stateNode, r.return = s.return, r.child = s.child, r.sibling = s.sibling, r.index = s.index, r.ref = s.ref, r.pendingProps = s.pendingProps, r.memoizedProps = s.memoizedProps, r.updateQueue = s.updateQueue, r.memoizedState = s.memoizedState, r.dependencies = s.dependencies, r.mode = s.mode, r.flags = s.flags, r.subtreeFlags = s.subtreeFlags, r.deletions = s.deletions, r.lanes = s.lanes, r.childLanes = s.childLanes, r.alternate = s.alternate, r.actualDuration = s.actualDuration, r.actualStartTime = s.actualStartTime, r.selfBaseDuration = s.selfBaseDuration, r.treeBaseDuration = s.treeBaseDuration, r._debugSource = s._debugSource, r._debugOwner = s._debugOwner, r._debugNeedsRemount = s._debugNeedsRemount, r._debugHookTypes = s._debugHookTypes, r;
      }
      function M$(r, s, h, g, E) {
        this.tag = s, this.containerInfo = r, this.pendingChildren = null, this.current = null, this.pingCache = null, this.finishedWork = null, this.timeoutHandle = i1, this.context = null, this.pendingContext = null, this.callbackNode = null, this.callbackPriority = Pr, this.eventTimes = Xc(je), this.expirationTimes = Xc(oi), this.pendingLanes = je, this.suspendedLanes = je, this.pingedLanes = je, this.expiredLanes = je, this.mutableReadLanes = je, this.finishedLanes = je, this.entangledLanes = je, this.entanglements = Xc(je), this.identifierPrefix = g, this.onRecoverableError = E, this.mutableSourceEagerHydrationData = null, this.effectDuration = 0, this.passiveEffectDuration = 0;
        {
          this.memoizedUpdaters = /* @__PURE__ */ new Set();
          for (var C = this.pendingUpdatersLaneMap = [], M = 0; M < Ji; M++)
            C.push(/* @__PURE__ */ new Set());
        }
        switch (s) {
          case KS:
            this._debugRootType = h ? "hydrateRoot()" : "createRoot()";
            break;
          case xg:
            this._debugRootType = h ? "hydrate()" : "render()";
            break;
        }
      }
      function HI(r, s, h, g, E, C, M, I, P, W) {
        var X = new M$(r, s, h, I, P), de = x$(s, C);
        X.current = de, de.stateNode = X;
        {
          var he = {
            element: g,
            isDehydrated: h,
            cache: null,
            // not enabled yet
            transitions: null,
            pendingSuspenseBoundaries: null
          };
          de.memoizedState = he;
        }
        return WT(de), X;
      }
      var jM = "18.2.0";
      function O$(r, s, h) {
        var g = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
        return In(g), {
          // This tag allow us to uniquely identify this as a React Portal
          $$typeof: Ta,
          key: g == null ? null : "" + g,
          children: r,
          containerInfo: s,
          implementation: h
        };
      }
      var UM, zM;
      UM = !1, zM = {};
      function WI(r) {
        if (!r)
          return gu;
        var s = Dr(r), h = hz(s);
        if (s.tag === _) {
          var g = s.type;
          if (Ch(g))
            return vN(s, g, h);
        }
        return h;
      }
      function A$(r, s) {
        {
          var h = Dr(r);
          if (h === void 0) {
            if (typeof r.render == "function")
              throw new Error("Unable to find node on an unmounted component.");
            var g = Object.keys(r).join(",");
            throw new Error("Argument appears to not be a ReactComponent. Keys: " + g);
          }
          var E = Po(h);
          if (E === null)
            return null;
          if (E.mode & sr) {
            var C = Qt(h) || "Component";
            if (!zM[C]) {
              zM[C] = !0;
              var M = cr;
              try {
                fr(E), h.mode & sr ? c("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", s, s, C) : c("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", s, s, C);
              } finally {
                M ? fr(M) : Zi();
              }
            }
          }
          return E.stateNode;
        }
      }
      function GI(r, s, h, g, E, C, M, I) {
        var P = !1, W = null;
        return HI(r, s, P, W, h, g, E, C, M);
      }
      function YI(r, s, h, g, E, C, M, I, P, W) {
        var X = !0, de = HI(h, g, X, r, E, C, M, I, P);
        de.context = WI(null);
        var he = de.current, we = Go(), Ce = Dg(he), Pe = sp(we, Ce);
        return Pe.callback = s ?? null, Cg(he, Pe, Ce), F6(de, Ce, we), de;
      }
      function Y1(r, s, h, g) {
        ko(s, r);
        var E = s.current, C = Go(), M = Dg(E);
        Wp(M);
        var I = WI(h);
        s.context === null ? s.context = I : s.pendingContext = I, fs && cr !== null && !UM && (UM = !0, c(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.

Check the render method of %s.`, Qt(cr) || "Unknown"));
        var P = sp(C, M);
        P.payload = {
          element: r
        }, g = g === void 0 ? null : g, g !== null && (typeof g != "function" && c("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", g), P.callback = g);
        var W = Cg(E, P, M);
        return W !== null && (ss(W, E, M, C), ux(W, E, M)), M;
      }
      function eb(r) {
        var s = r.current;
        if (!s.child)
          return null;
        switch (s.child.tag) {
          case O:
            return s.child.stateNode;
          default:
            return s.child.stateNode;
        }
      }
      function L$(r) {
        switch (r.tag) {
          case b: {
            var s = r.stateNode;
            if (dh(s)) {
              var h = _y(s);
              $6(s, h);
            }
            break;
          }
          case G: {
            cp(function() {
              var E = xl(r, Bt);
              if (E !== null) {
                var C = Go();
                ss(E, r, Bt, C);
              }
            });
            var g = Bt;
            $M(r, g);
            break;
          }
        }
      }
      function qI(r, s) {
        var h = r.memoizedState;
        h !== null && h.dehydrated !== null && (h.retryLane = Zp(h.retryLane, s));
      }
      function $M(r, s) {
        qI(r, s);
        var h = r.alternate;
        h && qI(h, s);
      }
      function N$(r) {
        if (r.tag === G) {
          var s = tc, h = xl(r, s);
          if (h !== null) {
            var g = Go();
            ss(h, r, s, g);
          }
          $M(r, s);
        }
      }
      function D$(r) {
        if (r.tag === G) {
          var s = Dg(r), h = xl(r, s);
          if (h !== null) {
            var g = Go();
            ss(h, r, s, g);
          }
          $M(r, s);
        }
      }
      function XI(r) {
        var s = Jl(r);
        return s === null ? null : s.stateNode;
      }
      var KI = function(r) {
        return null;
      };
      function I$(r) {
        return KI(r);
      }
      var ZI = function(r) {
        return !1;
      };
      function P$(r) {
        return ZI(r);
      }
      var QI = null, JI = null, eP = null, tP = null, nP = null, iP = null, rP = null, aP = null, sP = null;
      {
        var oP = function(r, s, h) {
          var g = s[h], E = zn(r) ? r.slice() : cn({}, r);
          return h + 1 === s.length ? (zn(E) ? E.splice(g, 1) : delete E[g], E) : (E[g] = oP(r[g], s, h + 1), E);
        }, lP = function(r, s) {
          return oP(r, s, 0);
        }, uP = function(r, s, h, g) {
          var E = s[g], C = zn(r) ? r.slice() : cn({}, r);
          if (g + 1 === s.length) {
            var M = h[g];
            C[M] = C[E], zn(C) ? C.splice(E, 1) : delete C[E];
          } else
            C[E] = uP(
              // $FlowFixMe number or string is fine here
              r[E],
              s,
              h,
              g + 1
            );
          return C;
        }, cP = function(r, s, h) {
          if (s.length !== h.length) {
            u("copyWithRename() expects paths of the same length");
            return;
          } else
            for (var g = 0; g < h.length - 1; g++)
              if (s[g] !== h[g]) {
                u("copyWithRename() expects paths to be the same except for the deepest key");
                return;
              }
          return uP(r, s, h, 0);
        }, fP = function(r, s, h, g) {
          if (h >= s.length)
            return g;
          var E = s[h], C = zn(r) ? r.slice() : cn({}, r);
          return C[E] = fP(r[E], s, h + 1, g), C;
        }, hP = function(r, s, h) {
          return fP(r, s, 0, h);
        }, BM = function(r, s) {
          for (var h = r.memoizedState; h !== null && s > 0; )
            h = h.next, s--;
          return h;
        };
        QI = function(r, s, h, g) {
          var E = BM(r, s);
          if (E !== null) {
            var C = hP(E.memoizedState, h, g);
            E.memoizedState = C, E.baseState = C, r.memoizedProps = cn({}, r.memoizedProps);
            var M = xl(r, Bt);
            M !== null && ss(M, r, Bt, oi);
          }
        }, JI = function(r, s, h) {
          var g = BM(r, s);
          if (g !== null) {
            var E = lP(g.memoizedState, h);
            g.memoizedState = E, g.baseState = E, r.memoizedProps = cn({}, r.memoizedProps);
            var C = xl(r, Bt);
            C !== null && ss(C, r, Bt, oi);
          }
        }, eP = function(r, s, h, g) {
          var E = BM(r, s);
          if (E !== null) {
            var C = cP(E.memoizedState, h, g);
            E.memoizedState = C, E.baseState = C, r.memoizedProps = cn({}, r.memoizedProps);
            var M = xl(r, Bt);
            M !== null && ss(M, r, Bt, oi);
          }
        }, tP = function(r, s, h) {
          r.pendingProps = hP(r.memoizedProps, s, h), r.alternate && (r.alternate.pendingProps = r.pendingProps);
          var g = xl(r, Bt);
          g !== null && ss(g, r, Bt, oi);
        }, nP = function(r, s) {
          r.pendingProps = lP(r.memoizedProps, s), r.alternate && (r.alternate.pendingProps = r.pendingProps);
          var h = xl(r, Bt);
          h !== null && ss(h, r, Bt, oi);
        }, iP = function(r, s, h) {
          r.pendingProps = cP(r.memoizedProps, s, h), r.alternate && (r.alternate.pendingProps = r.pendingProps);
          var g = xl(r, Bt);
          g !== null && ss(g, r, Bt, oi);
        }, rP = function(r) {
          var s = xl(r, Bt);
          s !== null && ss(s, r, Bt, oi);
        }, aP = function(r) {
          KI = r;
        }, sP = function(r) {
          ZI = r;
        };
      }
      function k$(r) {
        var s = Po(r);
        return s === null ? null : s.stateNode;
      }
      function F$(r) {
        return null;
      }
      function j$() {
        return cr;
      }
      function U$(r) {
        var s = r.findFiberByHostInstance, h = i.ReactCurrentDispatcher;
        return Aa({
          bundleType: r.bundleType,
          version: r.version,
          rendererPackageName: r.rendererPackageName,
          rendererConfig: r.rendererConfig,
          overrideHookState: QI,
          overrideHookStateDeletePath: JI,
          overrideHookStateRenamePath: eP,
          overrideProps: tP,
          overridePropsDeletePath: nP,
          overridePropsRenamePath: iP,
          setErrorHandler: aP,
          setSuspenseHandler: sP,
          scheduleUpdate: rP,
          currentDispatcherRef: h,
          findHostInstanceByFiber: k$,
          findFiberByHostInstance: s || F$,
          // React Refresh
          findHostInstancesForRefresh: g$,
          scheduleRefresh: d$,
          scheduleRoot: p$,
          setRefreshHandler: h$,
          // Enables DevTools to append owner stacks to error messages in DEV mode.
          getCurrentFiber: j$,
          // Enables DevTools to detect reconciler version rather than renderer version
          // which may not match for third party renderers.
          reconcilerVersion: jM
        });
      }
      var dP = typeof reportError == "function" ? (
        // In modern browsers, reportError will dispatch an error event,
        // emulating an uncaught JavaScript error.
        reportError
      ) : function(r) {
        console.error(r);
      };
      function VM(r) {
        this._internalRoot = r;
      }
      tb.prototype.render = VM.prototype.render = function(r) {
        var s = this._internalRoot;
        if (s === null)
          throw new Error("Cannot update an unmounted root.");
        {
          typeof arguments[1] == "function" ? c("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().") : nb(arguments[1]) ? c("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.") : typeof arguments[1] < "u" && c("You passed a second argument to root.render(...) but it only accepts one argument.");
          var h = s.containerInfo;
          if (h.nodeType !== ar) {
            var g = XI(s.current);
            g && g.parentNode !== h && c("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.");
          }
        }
        Y1(r, s, null, null);
      }, tb.prototype.unmount = VM.prototype.unmount = function() {
        typeof arguments[0] == "function" && c("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");
        var r = this._internalRoot;
        if (r !== null) {
          this._internalRoot = null;
          var s = r.containerInfo;
          CI() && c("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."), cp(function() {
            Y1(null, r, null, null);
          }), Be(s);
        }
      };
      function z$(r, s) {
        if (!nb(r))
          throw new Error("createRoot(...): Target container is not a DOM element.");
        pP(r);
        var h = !1, g = !1, E = "", C = dP;
        s != null && (s.hydrate ? u("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.") : typeof s == "object" && s !== null && s.$$typeof === rr && c(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:

  let root = createRoot(domContainer);
  root.render(<App />);`), s.unstable_strictMode === !0 && (h = !0), s.identifierPrefix !== void 0 && (E = s.identifierPrefix), s.onRecoverableError !== void 0 && (C = s.onRecoverableError), s.transitionCallbacks !== void 0 && s.transitionCallbacks);
        var M = GI(r, KS, null, h, g, E, C);
        Ue(M.current, r);
        var I = r.nodeType === ar ? r.parentNode : r;
        return Qm(I), new VM(M);
      }
      function tb(r) {
        this._internalRoot = r;
      }
      function $$(r) {
        r && I_(r);
      }
      tb.prototype.unstable_scheduleHydration = $$;
      function B$(r, s, h) {
        if (!nb(r))
          throw new Error("hydrateRoot(...): Target container is not a DOM element.");
        pP(r), s === void 0 && c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");
        var g = h ?? null, E = h != null && h.hydratedSources || null, C = !1, M = !1, I = "", P = dP;
        h != null && (h.unstable_strictMode === !0 && (C = !0), h.identifierPrefix !== void 0 && (I = h.identifierPrefix), h.onRecoverableError !== void 0 && (P = h.onRecoverableError));
        var W = YI(s, null, r, KS, g, C, M, I, P);
        if (Ue(W.current, r), Qm(r), E)
          for (var X = 0; X < E.length; X++) {
            var de = E[X];
            Kz(W, de);
          }
        return new tb(W);
      }
      function nb(r) {
        return !!(r && (r.nodeType === Va || r.nodeType === ma || r.nodeType === Ip || !Le));
      }
      function q1(r) {
        return !!(r && (r.nodeType === Va || r.nodeType === ma || r.nodeType === Ip || r.nodeType === ar && r.nodeValue === " react-mount-point-unstable "));
      }
      function pP(r) {
        r.nodeType === Va && r.tagName && r.tagName.toUpperCase() === "BODY" && c("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."), He(r) && (r._reactRootContainer ? c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.") : c("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."));
      }
      var V$ = i.ReactCurrentOwner, gP;
      gP = function(r) {
        if (r._reactRootContainer && r.nodeType !== ar) {
          var s = XI(r._reactRootContainer.current);
          s && s.parentNode !== r && c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.");
        }
        var h = !!r._reactRootContainer, g = HM(r), E = !!(g && xt(g));
        E && !h && c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."), r.nodeType === Va && r.tagName && r.tagName.toUpperCase() === "BODY" && c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.");
      };
      function HM(r) {
        return r ? r.nodeType === ma ? r.documentElement : r.firstChild : null;
      }
      function mP() {
      }
      function H$(r, s, h, g, E) {
        if (E) {
          if (typeof g == "function") {
            var C = g;
            g = function() {
              var he = eb(M);
              C.call(he);
            };
          }
          var M = YI(
            s,
            g,
            r,
            xg,
            null,
            // hydrationCallbacks
            !1,
            // isStrictMode
            !1,
            // concurrentUpdatesByDefaultOverride,
            "",
            // identifierPrefix
            mP
          );
          r._reactRootContainer = M, Ue(M.current, r);
          var I = r.nodeType === ar ? r.parentNode : r;
          return Qm(I), cp(), M;
        } else {
          for (var P; P = r.lastChild; )
            r.removeChild(P);
          if (typeof g == "function") {
            var W = g;
            g = function() {
              var he = eb(X);
              W.call(he);
            };
          }
          var X = GI(
            r,
            xg,
            null,
            // hydrationCallbacks
            !1,
            // isStrictMode
            !1,
            // concurrentUpdatesByDefaultOverride,
            "",
            // identifierPrefix
            mP
          );
          r._reactRootContainer = X, Ue(X.current, r);
          var de = r.nodeType === ar ? r.parentNode : r;
          return Qm(de), cp(function() {
            Y1(s, X, h, g);
          }), X;
        }
      }
      function W$(r, s) {
        r !== null && typeof r != "function" && c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", s, r);
      }
      function ib(r, s, h, g, E) {
        gP(h), W$(E === void 0 ? null : E, "render");
        var C = h._reactRootContainer, M;
        if (!C)
          M = H$(h, s, r, E, g);
        else {
          if (M = C, typeof E == "function") {
            var I = E;
            E = function() {
              var P = eb(M);
              I.call(P);
            };
          }
          Y1(s, M, r, E);
        }
        return eb(M);
      }
      function G$(r) {
        {
          var s = V$.current;
          if (s !== null && s.stateNode !== null) {
            var h = s.stateNode._warnedAboutRefsInRender;
            h || c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", Un(s.type) || "A component"), s.stateNode._warnedAboutRefsInRender = !0;
          }
        }
        return r == null ? null : r.nodeType === Va ? r : A$(r, "findDOMNode");
      }
      function Y$(r, s, h) {
        if (c("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"), !q1(s))
          throw new Error("Target container is not a DOM element.");
        {
          var g = He(s) && s._reactRootContainer === void 0;
          g && c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?");
        }
        return ib(null, r, s, !0, h);
      }
      function q$(r, s, h) {
        if (c("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"), !q1(s))
          throw new Error("Target container is not a DOM element.");
        {
          var g = He(s) && s._reactRootContainer === void 0;
          g && c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?");
        }
        return ib(null, r, s, !1, h);
      }
      function X$(r, s, h, g) {
        if (c("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"), !q1(h))
          throw new Error("Target container is not a DOM element.");
        if (r == null || !gn(r))
          throw new Error("parentComponent must be a valid React Component");
        return ib(r, s, h, !1, g);
      }
      function K$(r) {
        if (!q1(r))
          throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");
        {
          var s = He(r) && r._reactRootContainer === void 0;
          s && c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?");
        }
        if (r._reactRootContainer) {
          {
            var h = HM(r), g = h && !xt(h);
            g && c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.");
          }
          return cp(function() {
            ib(null, null, r, !1, function() {
              r._reactRootContainer = null, Be(r);
            });
          }), !0;
        } else {
          {
            var E = HM(r), C = !!(E && xt(E)), M = r.nodeType === Va && q1(r.parentNode) && !!r.parentNode._reactRootContainer;
            C && c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s", M ? "You may have accidentally passed in a React root node instead of its container." : "Instead, have the parent component update its state and rerender in order to remove this component.");
          }
          return !1;
        }
      }
      ic(L$), zd(N$), $d(D$), Ey(uo), Sy(Ia), (typeof Map != "function" || // $FlowIssue Flow incorrectly thinks Map has no prototype
      Map.prototype == null || typeof Map.prototype.forEach != "function" || typeof Set != "function" || // $FlowIssue Flow incorrectly thinks Set has no prototype
      Set.prototype == null || typeof Set.prototype.clear != "function" || typeof Set.prototype.forEach != "function") && c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"), Sm(CC), Fp(SM, B6, cp);
      function Z$(r, s) {
        var h = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
        if (!nb(s))
          throw new Error("Target container is not a DOM element.");
        return O$(r, s, null, h);
      }
      function Q$(r, s, h, g) {
        return X$(r, s, h, g);
      }
      var WM = {
        usingClientEntryPoint: !1,
        // Keep in sync with ReactTestUtils.js.
        // This is an array for better minification.
        Events: [xt, $t, yn, kc, Fc, SM]
      };
      function J$(r, s) {
        return WM.usingClientEntryPoint || c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'), z$(r, s);
      }
      function e8(r, s, h) {
        return WM.usingClientEntryPoint || c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'), B$(r, s, h);
      }
      function t8(r) {
        return CI() && c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."), cp(r);
      }
      var n8 = U$({
        findFiberByHostInstance: ot,
        bundleType: 1,
        version: jM,
        rendererPackageName: "react-dom"
      });
      if (!n8 && Pt && window.top === window.self && (navigator.userAgent.indexOf("Chrome") > -1 && navigator.userAgent.indexOf("Edge") === -1 || navigator.userAgent.indexOf("Firefox") > -1)) {
        var vP = window.location.protocol;
        /^(https?|file):$/.test(vP) && console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools" + (vP === "file:" ? `
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq` : ""), "font-weight:bold");
      }
      Tl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = WM, Tl.createPortal = Z$, Tl.createRoot = J$, Tl.findDOMNode = G$, Tl.flushSync = t8, Tl.hydrate = Y$, Tl.hydrateRoot = e8, Tl.render = q$, Tl.unmountComponentAtNode = K$, Tl.unstable_batchedUpdates = SM, Tl.unstable_renderSubtreeIntoContainer = Q$, Tl.version = jM, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
    }(), Tl;
  }
  var Rl = {};
  /**
   * @license React
   * react-dom.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 Ek;
  function k9() {
    if (Ek)
      return Rl;
    Ek = 1;
    var n = Kt, e = TF();
    function t(l) {
      for (var f = "https://reactjs.org/docs/error-decoder.html?invariant=" + l, v = 1; v < arguments.length; v++)
        f += "&args[]=" + encodeURIComponent(arguments[v]);
      return "Minified React error #" + l + "; visit " + f + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
    }
    var i = /* @__PURE__ */ new Set(), a = {};
    function o(l, f) {
      u(l, f), u(l + "Capture", f);
    }
    function u(l, f) {
      for (a[l] = f, l = 0; l < f.length; l++)
        i.add(f[l]);
    }
    var c = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), p = Object.prototype.hasOwnProperty, y = /^[: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]*$/, _ = {}, S = {};
    function b(l) {
      return p.call(S, l) ? !0 : p.call(_, l) ? !1 : y.test(l) ? S[l] = !0 : (_[l] = !0, !1);
    }
    function T(l, f, v, x) {
      if (v !== null && v.type === 0)
        return !1;
      switch (typeof f) {
        case "function":
        case "symbol":
          return !0;
        case "boolean":
          return x ? !1 : v !== null ? !v.acceptsBooleans : (l = l.toLowerCase().slice(0, 5), l !== "data-" && l !== "aria-");
        default:
          return !1;
      }
    }
    function O(l, f, v, x) {
      if (f === null || typeof f > "u" || T(l, f, v, x))
        return !0;
      if (x)
        return !1;
      if (v !== null)
        switch (v.type) {
          case 3:
            return !f;
          case 4:
            return f === !1;
          case 5:
            return isNaN(f);
          case 6:
            return isNaN(f) || 1 > f;
        }
      return !1;
    }
    function N(l, f, v, x, R, L, U) {
      this.acceptsBooleans = f === 2 || f === 3 || f === 4, this.attributeName = x, this.attributeNamespace = R, this.mustUseProperty = v, this.propertyName = l, this.type = f, this.sanitizeURL = L, this.removeEmptyString = U;
    }
    var D = {};
    "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l) {
      D[l] = new N(l, 0, !1, l, null, !1, !1);
    }), [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(l) {
      var f = l[0];
      D[f] = new N(f, 1, !1, l[1], null, !1, !1);
    }), ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(l) {
      D[l] = new N(l, 2, !1, l.toLowerCase(), null, !1, !1);
    }), ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(l) {
      D[l] = new N(l, 2, !1, l, null, !1, !1);
    }), "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l) {
      D[l] = new N(l, 3, !1, l.toLowerCase(), null, !1, !1);
    }), ["checked", "multiple", "muted", "selected"].forEach(function(l) {
      D[l] = new N(l, 3, !0, l, null, !1, !1);
    }), ["capture", "download"].forEach(function(l) {
      D[l] = new N(l, 4, !1, l, null, !1, !1);
    }), ["cols", "rows", "size", "span"].forEach(function(l) {
      D[l] = new N(l, 6, !1, l, null, !1, !1);
    }), ["rowSpan", "start"].forEach(function(l) {
      D[l] = new N(l, 5, !1, l.toLowerCase(), null, !1, !1);
    });
    var k = /[\-:]([a-z])/g;
    function $(l) {
      return l[1].toUpperCase();
    }
    "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l) {
      var f = l.replace(
        k,
        $
      );
      D[f] = new N(f, 1, !1, l, null, !1, !1);
    }), "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l) {
      var f = l.replace(k, $);
      D[f] = new N(f, 1, !1, l, "http://www.w3.org/1999/xlink", !1, !1);
    }), ["xml:base", "xml:lang", "xml:space"].forEach(function(l) {
      var f = l.replace(k, $);
      D[f] = new N(f, 1, !1, l, "http://www.w3.org/XML/1998/namespace", !1, !1);
    }), ["tabIndex", "crossOrigin"].forEach(function(l) {
      D[l] = new N(l, 1, !1, l.toLowerCase(), null, !1, !1);
    }), D.xlinkHref = new N("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1), ["src", "href", "action", "formAction"].forEach(function(l) {
      D[l] = new N(l, 1, !1, l.toLowerCase(), null, !0, !0);
    });
    function B(l, f, v, x) {
      var R = D.hasOwnProperty(f) ? D[f] : null;
      (R !== null ? R.type !== 0 : x || !(2 < f.length) || f[0] !== "o" && f[0] !== "O" || f[1] !== "n" && f[1] !== "N") && (O(f, v, R, x) && (v = null), x || R === null ? b(f) && (v === null ? l.removeAttribute(f) : l.setAttribute(f, "" + v)) : R.mustUseProperty ? l[R.propertyName] = v === null ? R.type === 3 ? !1 : "" : v : (f = R.attributeName, x = R.attributeNamespace, v === null ? l.removeAttribute(f) : (R = R.type, v = R === 3 || R === 4 && v === !0 ? "" : "" + v, x ? l.setAttributeNS(x, f, v) : l.setAttribute(f, v))));
    }
    var V = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, z = Symbol.for("react.element"), G = Symbol.for("react.portal"), ie = Symbol.for("react.fragment"), ue = Symbol.for("react.strict_mode"), Re = Symbol.for("react.profiler"), Oe = Symbol.for("react.provider"), $e = Symbol.for("react.context"), Ee = Symbol.for("react.forward_ref"), Fe = Symbol.for("react.suspense"), Ne = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), ae = Symbol.for("react.lazy"), le = Symbol.for("react.offscreen"), se = Symbol.iterator;
    function Ae(l) {
      return l === null || typeof l != "object" ? null : (l = se && l[se] || l["@@iterator"], typeof l == "function" ? l : null);
    }
    var q = Object.assign, Z;
    function ee(l) {
      if (Z === void 0)
        try {
          throw Error();
        } catch (v) {
          var f = v.stack.trim().match(/\n( *(at )?)/);
          Z = f && f[1] || "";
        }
      return `
` + Z + l;
    }
    var Le = !1;
    function Me(l, f) {
      if (!l || Le)
        return "";
      Le = !0;
      var v = Error.prepareStackTrace;
      Error.prepareStackTrace = void 0;
      try {
        if (f)
          if (f = function() {
            throw Error();
          }, Object.defineProperty(f.prototype, "props", { set: function() {
            throw Error();
          } }), typeof Reflect == "object" && Reflect.construct) {
            try {
              Reflect.construct(f, []);
            } catch (be) {
              var x = be;
            }
            Reflect.construct(l, [], f);
          } else {
            try {
              f.call();
            } catch (be) {
              x = be;
            }
            l.call(f.prototype);
          }
        else {
          try {
            throw Error();
          } catch (be) {
            x = be;
          }
          l();
        }
      } catch (be) {
        if (be && x && typeof be.stack == "string") {
          for (var R = be.stack.split(`
`), L = x.stack.split(`
`), U = R.length - 1, J = L.length - 1; 1 <= U && 0 <= J && R[U] !== L[J]; )
            J--;
          for (; 1 <= U && 0 <= J; U--, J--)
            if (R[U] !== L[J]) {
              if (U !== 1 || J !== 1)
                do
                  if (U--, J--, 0 > J || R[U] !== L[J]) {
                    var oe = `
` + R[U].replace(" at new ", " at ");
                    return l.displayName && oe.includes("<anonymous>") && (oe = oe.replace("<anonymous>", l.displayName)), oe;
                  }
                while (1 <= U && 0 <= J);
              break;
            }
        }
      } finally {
        Le = !1, Error.prepareStackTrace = v;
      }
      return (l = l ? l.displayName || l.name : "") ? ee(l) : "";
    }
    function De(l) {
      switch (l.tag) {
        case 5:
          return ee(l.type);
        case 16:
          return ee("Lazy");
        case 13:
          return ee("Suspense");
        case 19:
          return ee("SuspenseList");
        case 0:
        case 2:
        case 15:
          return l = Me(l.type, !1), l;
        case 11:
          return l = Me(l.type.render, !1), l;
        case 1:
          return l = Me(l.type, !0), l;
        default:
          return "";
      }
    }
    function Ye(l) {
      if (l == null)
        return null;
      if (typeof l == "function")
        return l.displayName || l.name || null;
      if (typeof l == "string")
        return l;
      switch (l) {
        case ie:
          return "Fragment";
        case G:
          return "Portal";
        case Re:
          return "Profiler";
        case ue:
          return "StrictMode";
        case Fe:
          return "Suspense";
        case Ne:
          return "SuspenseList";
      }
      if (typeof l == "object")
        switch (l.$$typeof) {
          case $e:
            return (l.displayName || "Context") + ".Consumer";
          case Oe:
            return (l._context.displayName || "Context") + ".Provider";
          case Ee:
            var f = l.render;
            return l = l.displayName, l || (l = f.displayName || f.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
          case Q:
            return f = l.displayName || null, f !== null ? f : Ye(l.type) || "Memo";
          case ae:
            f = l._payload, l = l._init;
            try {
              return Ye(l(f));
            } catch {
            }
        }
      return null;
    }
    function Ze(l) {
      var f = l.type;
      switch (l.tag) {
        case 24:
          return "Cache";
        case 9:
          return (f.displayName || "Context") + ".Consumer";
        case 10:
          return (f._context.displayName || "Context") + ".Provider";
        case 18:
          return "DehydratedFragment";
        case 11:
          return l = f.render, l = l.displayName || l.name || "", f.displayName || (l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef");
        case 7:
          return "Fragment";
        case 5:
          return f;
        case 4:
          return "Portal";
        case 3:
          return "Root";
        case 6:
          return "Text";
        case 16:
          return Ye(f);
        case 8:
          return f === ue ? "StrictMode" : "Mode";
        case 22:
          return "Offscreen";
        case 12:
          return "Profiler";
        case 21:
          return "Scope";
        case 13:
          return "Suspense";
        case 19:
          return "SuspenseList";
        case 25:
          return "TracingMarker";
        case 1:
        case 0:
        case 17:
        case 2:
        case 14:
        case 15:
          if (typeof f == "function")
            return f.displayName || f.name || null;
          if (typeof f == "string")
            return f;
      }
      return null;
    }
    function Xe(l) {
      switch (typeof l) {
        case "boolean":
        case "number":
        case "string":
        case "undefined":
          return l;
        case "object":
          return l;
        default:
          return "";
      }
    }
    function lt(l) {
      var f = l.type;
      return (l = l.nodeName) && l.toLowerCase() === "input" && (f === "checkbox" || f === "radio");
    }
    function Dt(l) {
      var f = lt(l) ? "checked" : "value", v = Object.getOwnPropertyDescriptor(l.constructor.prototype, f), x = "" + l[f];
      if (!l.hasOwnProperty(f) && typeof v < "u" && typeof v.get == "function" && typeof v.set == "function") {
        var R = v.get, L = v.set;
        return Object.defineProperty(l, f, { configurable: !0, get: function() {
          return R.call(this);
        }, set: function(U) {
          x = "" + U, L.call(this, U);
        } }), Object.defineProperty(l, f, { enumerable: v.enumerable }), { getValue: function() {
          return x;
        }, setValue: function(U) {
          x = "" + U;
        }, stopTracking: function() {
          l._valueTracker = null, delete l[f];
        } };
      }
    }
    function Ct(l) {
      l._valueTracker || (l._valueTracker = Dt(l));
    }
    function hn(l) {
      if (!l)
        return !1;
      var f = l._valueTracker;
      if (!f)
        return !0;
      var v = f.getValue(), x = "";
      return l && (x = lt(l) ? l.checked ? "true" : "false" : l.value), l = x, l !== v ? (f.setValue(l), !0) : !1;
    }
    function Je(l) {
      if (l = l || (typeof document < "u" ? document : void 0), typeof l > "u")
        return null;
      try {
        return l.activeElement || l.body;
      } catch {
        return l.body;
      }
    }
    function Pt(l, f) {
      var v = f.checked;
      return q({}, f, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: v ?? l._wrapperState.initialChecked });
    }
    function Vn(l, f) {
      var v = f.defaultValue == null ? "" : f.defaultValue, x = f.checked != null ? f.checked : f.defaultChecked;
      v = Xe(f.value != null ? f.value : v), l._wrapperState = { initialChecked: x, initialValue: v, controlled: f.type === "checkbox" || f.type === "radio" ? f.checked != null : f.value != null };
    }
    function Hn(l, f) {
      f = f.checked, f != null && B(l, "checked", f, !1);
    }
    function Nn(l, f) {
      Hn(l, f);
      var v = Xe(f.value), x = f.type;
      if (v != null)
        x === "number" ? (v === 0 && l.value === "" || l.value != v) && (l.value = "" + v) : l.value !== "" + v && (l.value = "" + v);
      else if (x === "submit" || x === "reset") {
        l.removeAttribute("value");
        return;
      }
      f.hasOwnProperty("value") ? Sr(l, f.type, v) : f.hasOwnProperty("defaultValue") && Sr(l, f.type, Xe(f.defaultValue)), f.checked == null && f.defaultChecked != null && (l.defaultChecked = !!f.defaultChecked);
    }
    function Si(l, f, v) {
      if (f.hasOwnProperty("value") || f.hasOwnProperty("defaultValue")) {
        var x = f.type;
        if (!(x !== "submit" && x !== "reset" || f.value !== void 0 && f.value !== null))
          return;
        f = "" + l._wrapperState.initialValue, v || f === l.value || (l.value = f), l.defaultValue = f;
      }
      v = l.name, v !== "" && (l.name = ""), l.defaultChecked = !!l._wrapperState.initialChecked, v !== "" && (l.name = v);
    }
    function Sr(l, f, v) {
      (f !== "number" || Je(l.ownerDocument) !== l) && (v == null ? l.defaultValue = "" + l._wrapperState.initialValue : l.defaultValue !== "" + v && (l.defaultValue = "" + v));
    }
    var In = Array.isArray;
    function Tn(l, f, v, x) {
      if (l = l.options, f) {
        f = {};
        for (var R = 0; R < v.length; R++)
          f["$" + v[R]] = !0;
        for (v = 0; v < l.length; v++)
          R = f.hasOwnProperty("$" + l[v].value), l[v].selected !== R && (l[v].selected = R), R && x && (l[v].defaultSelected = !0);
      } else {
        for (v = "" + Xe(v), f = null, R = 0; R < l.length; R++) {
          if (l[R].value === v) {
            l[R].selected = !0, x && (l[R].defaultSelected = !0);
            return;
          }
          f !== null || l[R].disabled || (f = l[R]);
        }
        f !== null && (f.selected = !0);
      }
    }
    function Pn(l, f) {
      if (f.dangerouslySetInnerHTML != null)
        throw Error(t(91));
      return q({}, f, { value: void 0, defaultValue: void 0, children: "" + l._wrapperState.initialValue });
    }
    function Qn(l, f) {
      var v = f.value;
      if (v == null) {
        if (v = f.children, f = f.defaultValue, v != null) {
          if (f != null)
            throw Error(t(92));
          if (In(v)) {
            if (1 < v.length)
              throw Error(t(93));
            v = v[0];
          }
          f = v;
        }
        f == null && (f = ""), v = f;
      }
      l._wrapperState = { initialValue: Xe(v) };
    }
    function Jn(l, f) {
      var v = Xe(f.value), x = Xe(f.defaultValue);
      v != null && (v = "" + v, v !== l.value && (l.value = v), f.defaultValue == null && l.defaultValue !== v && (l.defaultValue = v)), x != null && (l.defaultValue = "" + x);
    }
    function ui(l) {
      var f = l.textContent;
      f === l._wrapperState.initialValue && f !== "" && f !== null && (l.value = f);
    }
    function Mi(l) {
      switch (l) {
        case "svg":
          return "http://www.w3.org/2000/svg";
        case "math":
          return "http://www.w3.org/1998/Math/MathML";
        default:
          return "http://www.w3.org/1999/xhtml";
      }
    }
    function ci(l, f) {
      return l == null || l === "http://www.w3.org/1999/xhtml" ? Mi(f) : l === "http://www.w3.org/2000/svg" && f === "foreignObject" ? "http://www.w3.org/1999/xhtml" : l;
    }
    var dn, xr = function(l) {
      return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(f, v, x, R) {
        MSApp.execUnsafeLocalFunction(function() {
          return l(f, v, x, R);
        });
      } : l;
    }(function(l, f) {
      if (l.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in l)
        l.innerHTML = f;
      else {
        for (dn = dn || document.createElement("div"), dn.innerHTML = "<svg>" + f.valueOf().toString() + "</svg>", f = dn.firstChild; l.firstChild; )
          l.removeChild(l.firstChild);
        for (; f.firstChild; )
          l.appendChild(f.firstChild);
      }
    });
    function Wr(l, f) {
      if (f) {
        var v = l.firstChild;
        if (v && v === l.lastChild && v.nodeType === 3) {
          v.nodeValue = f;
          return;
        }
      }
      l.textContent = f;
    }
    var ai = {
      animationIterationCount: !0,
      aspectRatio: !0,
      borderImageOutset: !0,
      borderImageSlice: !0,
      borderImageWidth: !0,
      boxFlex: !0,
      boxFlexGroup: !0,
      boxOrdinalGroup: !0,
      columnCount: !0,
      columns: !0,
      flex: !0,
      flexGrow: !0,
      flexPositive: !0,
      flexShrink: !0,
      flexNegative: !0,
      flexOrder: !0,
      gridArea: !0,
      gridRow: !0,
      gridRowEnd: !0,
      gridRowSpan: !0,
      gridRowStart: !0,
      gridColumn: !0,
      gridColumnEnd: !0,
      gridColumnSpan: !0,
      gridColumnStart: !0,
      fontWeight: !0,
      lineClamp: !0,
      lineHeight: !0,
      opacity: !0,
      order: !0,
      orphans: !0,
      tabSize: !0,
      widows: !0,
      zIndex: !0,
      zoom: !0,
      fillOpacity: !0,
      floodOpacity: !0,
      stopOpacity: !0,
      strokeDasharray: !0,
      strokeDashoffset: !0,
      strokeMiterlimit: !0,
      strokeOpacity: !0,
      strokeWidth: !0
    }, at = ["Webkit", "ms", "Moz", "O"];
    Object.keys(ai).forEach(function(l) {
      at.forEach(function(f) {
        f = f + l.charAt(0).toUpperCase() + l.substring(1), ai[f] = ai[l];
      });
    });
    function Tt(l, f, v) {
      return f == null || typeof f == "boolean" || f === "" ? "" : v || typeof f != "number" || f === 0 || ai.hasOwnProperty(l) && ai[l] ? ("" + f).trim() : f + "px";
    }
    function nn(l, f) {
      l = l.style;
      for (var v in f)
        if (f.hasOwnProperty(v)) {
          var x = v.indexOf("--") === 0, R = Tt(v, f[v], x);
          v === "float" && (v = "cssFloat"), x ? l.setProperty(v, R) : l[v] = R;
        }
    }
    var kn = q({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 });
    function Mn(l, f) {
      if (f) {
        if (kn[l] && (f.children != null || f.dangerouslySetInnerHTML != null))
          throw Error(t(137, l));
        if (f.dangerouslySetInnerHTML != null) {
          if (f.children != null)
            throw Error(t(60));
          if (typeof f.dangerouslySetInnerHTML != "object" || !("__html" in f.dangerouslySetInnerHTML))
            throw Error(t(61));
        }
        if (f.style != null && typeof f.style != "object")
          throw Error(t(62));
      }
    }
    function Oi(l, f) {
      if (l.indexOf("-") === -1)
        return typeof f.is == "string";
      switch (l) {
        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 ki = null;
    function Gr(l) {
      return l = l.target || l.srcElement || window, l.correspondingUseElement && (l = l.correspondingUseElement), l.nodeType === 3 ? l.parentNode : l;
    }
    var Fn = null, Ki = null, On = null;
    function gi(l) {
      if (l = Dr(l)) {
        if (typeof Fn != "function")
          throw Error(t(280));
        var f = l.stateNode;
        f && (f = Up(f), Fn(l.stateNode, l.type, f));
      }
    }
    function ls(l) {
      Ki ? On ? On.push(l) : On = [l] : Ki = l;
    }
    function Fi() {
      if (Ki) {
        var l = Ki, f = On;
        if (On = Ki = null, gi(l), f)
          for (l = 0; l < f.length; l++)
            gi(f[l]);
      }
    }
    function za(l, f) {
      return l(f);
    }
    function Ar() {
    }
    var ga = !1;
    function br(l, f, v) {
      if (ga)
        return l(f, v);
      ga = !0;
      try {
        return za(l, f, v);
      } finally {
        ga = !1, (Ki !== null || On !== null) && (Ar(), Fi());
      }
    }
    function Ca(l, f) {
      var v = l.stateNode;
      if (v === null)
        return null;
      var x = Up(v);
      if (x === null)
        return null;
      v = x[f];
      e:
        switch (f) {
          case "onClick":
          case "onClickCapture":
          case "onDoubleClick":
          case "onDoubleClickCapture":
          case "onMouseDown":
          case "onMouseDownCapture":
          case "onMouseMove":
          case "onMouseMoveCapture":
          case "onMouseUp":
          case "onMouseUpCapture":
          case "onMouseEnter":
            (x = !x.disabled) || (l = l.type, x = !(l === "button" || l === "input" || l === "select" || l === "textarea")), l = !x;
            break e;
          default:
            l = !1;
        }
      if (l)
        return null;
      if (v && typeof v != "function")
        throw Error(t(231, f, typeof v));
      return v;
    }
    var sa = !1;
    if (c)
      try {
        var Ai = {};
        Object.defineProperty(Ai, "passive", { get: function() {
          sa = !0;
        } }), window.addEventListener("test", Ai, Ai), window.removeEventListener("test", Ai, Ai);
      } catch {
        sa = !1;
      }
    function ir(l, f, v, x, R, L, U, J, oe) {
      var be = Array.prototype.slice.call(arguments, 3);
      try {
        f.apply(v, be);
      } catch (Ge) {
        this.onError(Ge);
      }
    }
    var rr = !1, Ta = null, Ms = !1, Ul = null, re = { onError: function(l) {
      rr = !0, Ta = l;
    } };
    function We(l, f, v, x, R, L, U, J, oe) {
      rr = !1, Ta = null, ir.apply(re, arguments);
    }
    function st(l, f, v, x, R, L, U, J, oe) {
      if (We.apply(this, arguments), rr) {
        if (rr) {
          var be = Ta;
          rr = !1, Ta = null;
        } else
          throw Error(t(198));
        Ms || (Ms = !0, Ul = be);
      }
    }
    function ct(l) {
      var f = l, v = l;
      if (l.alternate)
        for (; f.return; )
          f = f.return;
      else {
        l = f;
        do
          f = l, f.flags & 4098 && (v = f.return), l = f.return;
        while (l);
      }
      return f.tag === 3 ? v : null;
    }
    function Sn(l) {
      if (l.tag === 13) {
        var f = l.memoizedState;
        if (f === null && (l = l.alternate, l !== null && (f = l.memoizedState)), f !== null)
          return f.dehydrated;
      }
      return null;
    }
    function jn(l) {
      if (ct(l) !== l)
        throw Error(t(188));
    }
    function un(l) {
      var f = l.alternate;
      if (!f) {
        if (f = ct(l), f === null)
          throw Error(t(188));
        return f !== l ? null : l;
      }
      for (var v = l, x = f; ; ) {
        var R = v.return;
        if (R === null)
          break;
        var L = R.alternate;
        if (L === null) {
          if (x = R.return, x !== null) {
            v = x;
            continue;
          }
          break;
        }
        if (R.child === L.child) {
          for (L = R.child; L; ) {
            if (L === v)
              return jn(R), l;
            if (L === x)
              return jn(R), f;
            L = L.sibling;
          }
          throw Error(t(188));
        }
        if (v.return !== x.return)
          v = R, x = L;
        else {
          for (var U = !1, J = R.child; J; ) {
            if (J === v) {
              U = !0, v = R, x = L;
              break;
            }
            if (J === x) {
              U = !0, x = R, v = L;
              break;
            }
            J = J.sibling;
          }
          if (!U) {
            for (J = L.child; J; ) {
              if (J === v) {
                U = !0, v = L, x = R;
                break;
              }
              if (J === x) {
                U = !0, x = L, v = R;
                break;
              }
              J = J.sibling;
            }
            if (!U)
              throw Error(t(189));
          }
        }
        if (v.alternate !== x)
          throw Error(t(190));
      }
      if (v.tag !== 3)
        throw Error(t(188));
      return v.stateNode.current === v ? l : f;
    }
    function It(l) {
      return l = un(l), l !== null ? Yr(l) : null;
    }
    function Yr(l) {
      if (l.tag === 5 || l.tag === 6)
        return l;
      for (l = l.child; l !== null; ) {
        var f = Yr(l);
        if (f !== null)
          return f;
        l = l.sibling;
      }
      return null;
    }
    var ji = e.unstable_scheduleCallback, Ui = e.unstable_cancelCallback, Zr = e.unstable_shouldYield, nl = e.unstable_requestPaint, mi = e.unstable_now, us = e.unstable_getCurrentPriorityLevel, Zh = e.unstable_ImmediatePriority, il = e.unstable_UserBlockingPriority, cn = e.unstable_NormalPriority, Ru = e.unstable_LowPriority, rl = e.unstable_IdlePriority, Mu = null, cs = null;
    function Qh(l) {
      if (cs && typeof cs.onCommitFiberRoot == "function")
        try {
          cs.onCommitFiberRoot(Mu, l, void 0, (l.current.flags & 128) === 128);
        } catch {
        }
    }
    var $a = Math.clz32 ? Math.clz32 : Nf, Af = Math.log, Lf = Math.LN2;
    function Nf(l) {
      return l >>>= 0, l === 0 ? 32 : 31 - (Af(l) / Lf | 0) | 0;
    }
    var zl = 64, Df = 4194304;
    function al(l) {
      switch (l & -l) {
        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:
        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 l & 4194240;
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
        case 67108864:
          return l & 130023424;
        case 134217728:
          return 134217728;
        case 268435456:
          return 268435456;
        case 536870912:
          return 536870912;
        case 1073741824:
          return 1073741824;
        default:
          return l;
      }
    }
    function Os(l, f) {
      var v = l.pendingLanes;
      if (v === 0)
        return 0;
      var x = 0, R = l.suspendedLanes, L = l.pingedLanes, U = v & 268435455;
      if (U !== 0) {
        var J = U & ~R;
        J !== 0 ? x = al(J) : (L &= U, L !== 0 && (x = al(L)));
      } else
        U = v & ~R, U !== 0 ? x = al(U) : L !== 0 && (x = al(L));
      if (x === 0)
        return 0;
      if (f !== 0 && f !== x && !(f & R) && (R = x & -x, L = f & -f, R >= L || R === 16 && (L & 4194240) !== 0))
        return f;
      if (x & 4 && (x |= v & 16), f = l.entangledLanes, f !== 0)
        for (l = l.entanglements, f &= x; 0 < f; )
          v = 31 - $a(f), R = 1 << v, x |= l[v], f &= ~R;
      return x;
    }
    function As(l, f) {
      switch (l) {
        case 1:
        case 2:
        case 4:
          return f + 250;
        case 8:
        case 16:
        case 32:
        case 64:
        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 f + 5e3;
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
        case 67108864:
          return -1;
        case 134217728:
        case 268435456:
        case 536870912:
        case 1073741824:
          return -1;
        default:
          return -1;
      }
    }
    function Ou(l, f) {
      for (var v = l.suspendedLanes, x = l.pingedLanes, R = l.expirationTimes, L = l.pendingLanes; 0 < L; ) {
        var U = 31 - $a(L), J = 1 << U, oe = R[U];
        oe === -1 ? (!(J & v) || J & x) && (R[U] = As(J, f)) : oe <= f && (l.expiredLanes |= J), L &= ~J;
      }
    }
    function Oo(l) {
      return l = l.pendingLanes & -1073741825, l !== 0 ? l : l & 1073741824 ? 1073741824 : 0;
    }
    function Au() {
      var l = zl;
      return zl <<= 1, !(zl & 4194240) && (zl = 64), l;
    }
    function $l(l) {
      for (var f = [], v = 0; 31 > v; v++)
        f.push(l);
      return f;
    }
    function Lu(l, f, v) {
      l.pendingLanes |= f, f !== 536870912 && (l.suspendedLanes = 0, l.pingedLanes = 0), l = l.eventTimes, f = 31 - $a(f), l[f] = v;
    }
    function If(l, f) {
      var v = l.pendingLanes & ~f;
      l.pendingLanes = f, l.suspendedLanes = 0, l.pingedLanes = 0, l.expiredLanes &= f, l.mutableReadLanes &= f, l.entangledLanes &= f, f = l.entanglements;
      var x = l.eventTimes;
      for (l = l.expirationTimes; 0 < v; ) {
        var R = 31 - $a(v), L = 1 << R;
        f[R] = 0, x[R] = -1, l[R] = -1, v &= ~L;
      }
    }
    function wc(l, f) {
      var v = l.entangledLanes |= f;
      for (l = l.entanglements; v; ) {
        var x = 31 - $a(v), R = 1 << x;
        R & f | l[x] & f && (l[x] |= f), v &= ~R;
      }
    }
    var Rn = 0;
    function sl(l) {
      return l &= -l, 1 < l ? 4 < l ? l & 268435455 ? 16 : 536870912 : 4 : 1;
    }
    var Cc, Bl, Jh, Un, Tc, Nu = !1, Qt = [], Ao = null, cr = null, fs = null, Ls = /* @__PURE__ */ new Map(), Du = /* @__PURE__ */ new Map(), Zi = [], fr = "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 submit".split(" ");
    function ed(l, f) {
      switch (l) {
        case "focusin":
        case "focusout":
          Ao = null;
          break;
        case "dragenter":
        case "dragleave":
          cr = null;
          break;
        case "mouseover":
        case "mouseout":
          fs = null;
          break;
        case "pointerover":
        case "pointerout":
          Ls.delete(f.pointerId);
          break;
        case "gotpointercapture":
        case "lostpointercapture":
          Du.delete(f.pointerId);
      }
    }
    function Qr(l, f, v, x, R, L) {
      return l === null || l.nativeEvent !== L ? (l = { blockedOn: f, domEventName: v, eventSystemFlags: x, nativeEvent: L, targetContainers: [R] }, f !== null && (f = Dr(f), f !== null && Bl(f)), l) : (l.eventSystemFlags |= x, f = l.targetContainers, R !== null && f.indexOf(R) === -1 && f.push(R), l);
    }
    function hs(l, f, v, x, R) {
      switch (f) {
        case "focusin":
          return Ao = Qr(Ao, l, f, v, x, R), !0;
        case "dragenter":
          return cr = Qr(cr, l, f, v, x, R), !0;
        case "mouseover":
          return fs = Qr(fs, l, f, v, x, R), !0;
        case "pointerover":
          var L = R.pointerId;
          return Ls.set(L, Qr(Ls.get(L) || null, l, f, v, x, R)), !0;
        case "gotpointercapture":
          return L = R.pointerId, Du.set(L, Qr(Du.get(L) || null, l, f, v, x, R)), !0;
      }
      return !1;
    }
    function Lo(l) {
      var f = io(l.target);
      if (f !== null) {
        var v = ct(f);
        if (v !== null) {
          if (f = v.tag, f === 13) {
            if (f = Sn(v), f !== null) {
              l.blockedOn = f, Tc(l.priority, function() {
                Jh(v);
              });
              return;
            }
          } else if (f === 3 && v.stateNode.current.memoizedState.isDehydrated) {
            l.blockedOn = v.tag === 3 ? v.stateNode.containerInfo : null;
            return;
          }
        }
      }
      l.blockedOn = null;
    }
    function Pf(l) {
      if (l.blockedOn !== null)
        return !1;
      for (var f = l.targetContainers; 0 < f.length; ) {
        var v = Oc(l.domEventName, l.eventSystemFlags, f[0], l.nativeEvent);
        if (v === null) {
          v = l.nativeEvent;
          var x = new v.constructor(v.type, v);
          ki = x, v.target.dispatchEvent(x), ki = null;
        } else
          return f = Dr(v), f !== null && Bl(f), l.blockedOn = v, !1;
        f.shift();
      }
      return !0;
    }
    function Rc(l, f, v) {
      Pf(l) && v.delete(f);
    }
    function Mc() {
      Nu = !1, Ao !== null && Pf(Ao) && (Ao = null), cr !== null && Pf(cr) && (cr = null), fs !== null && Pf(fs) && (fs = null), Ls.forEach(Rc), Du.forEach(Rc);
    }
    function ei(l, f) {
      l.blockedOn === f && (l.blockedOn = null, Nu || (Nu = !0, e.unstable_scheduleCallback(e.unstable_NormalPriority, Mc)));
    }
    function An(l) {
      function f(R) {
        return ei(R, l);
      }
      if (0 < Qt.length) {
        ei(Qt[0], l);
        for (var v = 1; v < Qt.length; v++) {
          var x = Qt[v];
          x.blockedOn === l && (x.blockedOn = null);
        }
      }
      for (Ao !== null && ei(Ao, l), cr !== null && ei(cr, l), fs !== null && ei(fs, l), Ls.forEach(f), Du.forEach(f), v = 0; v < Zi.length; v++)
        x = Zi[v], x.blockedOn === l && (x.blockedOn = null);
      for (; 0 < Zi.length && (v = Zi[0], v.blockedOn === null); )
        Lo(v), v.blockedOn === null && Zi.shift();
    }
    var Vl = V.ReactCurrentBatchConfig, kf = !0;
    function Hl(l, f, v, x) {
      var R = Rn, L = Vl.transition;
      Vl.transition = null;
      try {
        Rn = 1, ol(l, f, v, x);
      } finally {
        Rn = R, Vl.transition = L;
      }
    }
    function Ff(l, f, v, x) {
      var R = Rn, L = Vl.transition;
      Vl.transition = null;
      try {
        Rn = 4, ol(l, f, v, x);
      } finally {
        Rn = R, Vl.transition = L;
      }
    }
    function ol(l, f, v, x) {
      if (kf) {
        var R = Oc(l, f, v, x);
        if (R === null)
          Sm(l, f, x, Wl, v), ed(l, x);
        else if (hs(R, l, f, v, x))
          x.stopPropagation();
        else if (ed(l, x), f & 4 && -1 < fr.indexOf(l)) {
          for (; R !== null; ) {
            var L = Dr(R);
            if (L !== null && Cc(L), L = Oc(l, f, v, x), L === null && Sm(l, f, x, Wl, v), L === R)
              break;
            R = L;
          }
          R !== null && x.stopPropagation();
        } else
          Sm(l, f, x, null, v);
      }
    }
    var Wl = null;
    function Oc(l, f, v, x) {
      if (Wl = null, l = Gr(x), l = io(l), l !== null)
        if (f = ct(l), f === null)
          l = null;
        else if (v = f.tag, v === 13) {
          if (l = Sn(f), l !== null)
            return l;
          l = null;
        } else if (v === 3) {
          if (f.stateNode.current.memoizedState.isDehydrated)
            return f.tag === 3 ? f.stateNode.containerInfo : null;
          l = null;
        } else
          f !== l && (l = null);
      return Wl = l, null;
    }
    function td(l) {
      switch (l) {
        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 "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 1;
        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 "toggle":
        case "touchmove":
        case "wheel":
        case "mouseenter":
        case "mouseleave":
        case "pointerenter":
        case "pointerleave":
          return 4;
        case "message":
          switch (us()) {
            case Zh:
              return 1;
            case il:
              return 4;
            case cn:
            case Ru:
              return 16;
            case rl:
              return 536870912;
            default:
              return 16;
          }
        default:
          return 16;
      }
    }
    var Li = null, Iu = null, F = null;
    function ne() {
      if (F)
        return F;
      var l, f = Iu, v = f.length, x, R = "value" in Li ? Li.value : Li.textContent, L = R.length;
      for (l = 0; l < v && f[l] === R[l]; l++)
        ;
      var U = v - l;
      for (x = 1; x <= U && f[v - x] === R[L - x]; x++)
        ;
      return F = R.slice(l, 1 < x ? 1 - x : void 0);
    }
    function Se(l) {
      var f = l.keyCode;
      return "charCode" in l ? (l = l.charCode, l === 0 && f === 13 && (l = 13)) : l = f, l === 10 && (l = 13), 32 <= l || l === 13 ? l : 0;
    }
    function Te() {
      return !0;
    }
    function tt() {
      return !1;
    }
    function bt(l) {
      function f(v, x, R, L, U) {
        this._reactName = v, this._targetInst = R, this.type = x, this.nativeEvent = L, this.target = U, this.currentTarget = null;
        for (var J in l)
          l.hasOwnProperty(J) && (v = l[J], this[J] = v ? v(L) : L[J]);
        return this.isDefaultPrevented = (L.defaultPrevented != null ? L.defaultPrevented : L.returnValue === !1) ? Te : tt, this.isPropagationStopped = tt, this;
      }
      return q(f.prototype, { preventDefault: function() {
        this.defaultPrevented = !0;
        var v = this.nativeEvent;
        v && (v.preventDefault ? v.preventDefault() : typeof v.returnValue != "unknown" && (v.returnValue = !1), this.isDefaultPrevented = Te);
      }, stopPropagation: function() {
        var v = this.nativeEvent;
        v && (v.stopPropagation ? v.stopPropagation() : typeof v.cancelBubble != "unknown" && (v.cancelBubble = !0), this.isPropagationStopped = Te);
      }, persist: function() {
      }, isPersistent: Te }), f;
    }
    var pt = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(l) {
      return l.timeStamp || Date.now();
    }, defaultPrevented: 0, isTrusted: 0 }, Wt = bt(pt), fn = q({}, pt, { view: 0, detail: 0 }), si = bt(fn), pn, vi, xn, Qi = q({}, fn, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: Np, button: 0, buttons: 0, relatedTarget: function(l) {
      return l.relatedTarget === void 0 ? l.fromElement === l.srcElement ? l.toElement : l.fromElement : l.relatedTarget;
    }, movementX: function(l) {
      return "movementX" in l ? l.movementX : (l !== xn && (xn && l.type === "mousemove" ? (pn = l.screenX - xn.screenX, vi = l.screenY - xn.screenY) : vi = pn = 0, xn = l), pn);
    }, movementY: function(l) {
      return "movementY" in l ? l.movementY : vi;
    } }), zn = bt(Qi), Ba = q({}, Qi, { dataTransfer: 0 }), Gl = bt(Ba), Ac = q({}, fn, { relatedTarget: 0 }), xi = bt(Ac), Ra = q({}, pt, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Lc = bt(Ra), nd = q({}, pt, { clipboardData: function(l) {
      return "clipboardData" in l ? l.clipboardData : window.clipboardData;
    } }), id = bt(nd), T_ = q({}, pt, { data: 0 }), ey = bt(T_), ty = {
      Esc: "Escape",
      Spacebar: " ",
      Left: "ArrowLeft",
      Up: "ArrowUp",
      Right: "ArrowRight",
      Down: "ArrowDown",
      Del: "Delete",
      Win: "OS",
      Menu: "ContextMenu",
      Apps: "ContextMenu",
      Scroll: "ScrollLock",
      MozPrintableKey: "Unidentified"
    }, Lp = {
      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"
    }, rd = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
    function Nc(l) {
      var f = this.nativeEvent;
      return f.getModifierState ? f.getModifierState(l) : (l = rd[l]) ? !!f[l] : !1;
    }
    function Np() {
      return Nc;
    }
    var ny = q({}, fn, { key: function(l) {
      if (l.key) {
        var f = ty[l.key] || l.key;
        if (f !== "Unidentified")
          return f;
      }
      return l.type === "keypress" ? (l = Se(l), l === 13 ? "Enter" : String.fromCharCode(l)) : l.type === "keydown" || l.type === "keyup" ? Lp[l.keyCode] || "Unidentified" : "";
    }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: Np, charCode: function(l) {
      return l.type === "keypress" ? Se(l) : 0;
    }, keyCode: function(l) {
      return l.type === "keydown" || l.type === "keyup" ? l.keyCode : 0;
    }, which: function(l) {
      return l.type === "keypress" ? Se(l) : l.type === "keydown" || l.type === "keyup" ? l.keyCode : 0;
    } }), ll = bt(ny), pm = q({}, Qi, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), jf = bt(pm), Dp = q({}, fn, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: Np }), gm = bt(Dp), mm = q({}, pt, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Uf = bt(mm), iy = q({}, Qi, {
      deltaX: function(l) {
        return "deltaX" in l ? l.deltaX : "wheelDeltaX" in l ? -l.wheelDeltaX : 0;
      },
      deltaY: function(l) {
        return "deltaY" in l ? l.deltaY : "wheelDeltaY" in l ? -l.wheelDeltaY : "wheelDelta" in l ? -l.wheelDelta : 0;
      },
      deltaZ: 0,
      deltaMode: 0
    }), Va = bt(iy), Lr = [9, 13, 27, 32], ar = c && "CompositionEvent" in window, ma = null;
    c && "documentMode" in document && (ma = document.documentMode);
    var Ip = c && "TextEvent" in window && !ma, zf = c && (!ar || ma && 8 < ma && 11 >= ma), ry = " ", $f = !1;
    function ay(l, f) {
      switch (l) {
        case "keyup":
          return Lr.indexOf(f.keyCode) !== -1;
        case "keydown":
          return f.keyCode !== 229;
        case "keypress":
        case "mousedown":
        case "focusout":
          return !0;
        default:
          return !1;
      }
    }
    function sy(l) {
      return l = l.detail, typeof l == "object" && "data" in l ? l.data : null;
    }
    var Pu = !1;
    function Bf(l, f) {
      switch (l) {
        case "compositionend":
          return sy(f);
        case "keypress":
          return f.which !== 32 ? null : ($f = !0, ry);
        case "textInput":
          return l = f.data, l === ry && $f ? null : l;
        default:
          return null;
      }
    }
    function R_(l, f) {
      if (Pu)
        return l === "compositionend" || !ar && ay(l, f) ? (l = ne(), F = Iu = Li = null, Pu = !1, l) : null;
      switch (l) {
        case "paste":
          return null;
        case "keypress":
          if (!(f.ctrlKey || f.altKey || f.metaKey) || f.ctrlKey && f.altKey) {
            if (f.char && 1 < f.char.length)
              return f.char;
            if (f.which)
              return String.fromCharCode(f.which);
          }
          return null;
        case "compositionend":
          return zf && f.locale !== "ko" ? null : f.data;
        default:
          return null;
      }
    }
    var M_ = { 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 ad(l) {
      var f = l && l.nodeName && l.nodeName.toLowerCase();
      return f === "input" ? !!M_[l.type] : f === "textarea";
    }
    function vm(l, f, v, x) {
      ls(x), f = kp(f, "onChange"), 0 < f.length && (v = new Wt("onChange", "change", null, v, x), l.push({ event: v, listeners: f }));
    }
    var eo = null, ku = null;
    function oy(l) {
      hy(l, 0);
    }
    function Yl(l) {
      var f = gn(l);
      if (hn(f))
        return l;
    }
    function ym(l, f) {
      if (l === "change")
        return f;
    }
    var Fu = !1;
    if (c) {
      var ds;
      if (c) {
        var Pp = "oninput" in document;
        if (!Pp) {
          var ly = document.createElement("div");
          ly.setAttribute("oninput", "return;"), Pp = typeof ly.oninput == "function";
        }
        ds = Pp;
      } else
        ds = !1;
      Fu = ds && (!document.documentMode || 9 < document.documentMode);
    }
    function uy() {
      eo && (eo.detachEvent("onpropertychange", cy), ku = eo = null);
    }
    function cy(l) {
      if (l.propertyName === "value" && Yl(ku)) {
        var f = [];
        vm(f, ku, l, Gr(l)), br(oy, f);
      }
    }
    function O_(l, f, v) {
      l === "focusin" ? (uy(), eo = f, ku = v, eo.attachEvent("onpropertychange", cy)) : l === "focusout" && uy();
    }
    function A_(l) {
      if (l === "selectionchange" || l === "keyup" || l === "keydown")
        return Yl(ku);
    }
    function Vf(l, f) {
      if (l === "click")
        return Yl(f);
    }
    function pe(l, f) {
      if (l === "input" || l === "change")
        return Yl(f);
    }
    function Ie(l, f) {
      return l === f && (l !== 0 || 1 / l === 1 / f) || l !== l && f !== f;
    }
    var xe = typeof Object.is == "function" ? Object.is : Ie;
    function ft(l, f) {
      if (xe(l, f))
        return !0;
      if (typeof l != "object" || l === null || typeof f != "object" || f === null)
        return !1;
      var v = Object.keys(l), x = Object.keys(f);
      if (v.length !== x.length)
        return !1;
      for (x = 0; x < v.length; x++) {
        var R = v[x];
        if (!p.call(f, R) || !xe(l[R], f[R]))
          return !1;
      }
      return !0;
    }
    function rn(l) {
      for (; l && l.firstChild; )
        l = l.firstChild;
      return l;
    }
    function ti(l, f) {
      var v = rn(l);
      l = 0;
      for (var x; v; ) {
        if (v.nodeType === 3) {
          if (x = l + v.textContent.length, l <= f && x >= f)
            return { node: v, offset: f - l };
          l = x;
        }
        e: {
          for (; v; ) {
            if (v.nextSibling) {
              v = v.nextSibling;
              break e;
            }
            v = v.parentNode;
          }
          v = void 0;
        }
        v = rn(v);
      }
    }
    function qr(l, f) {
      return l && f ? l === f ? !0 : l && l.nodeType === 3 ? !1 : f && f.nodeType === 3 ? qr(l, f.parentNode) : "contains" in l ? l.contains(f) : l.compareDocumentPosition ? !!(l.compareDocumentPosition(f) & 16) : !1 : !1;
    }
    function bi() {
      for (var l = window, f = Je(); f instanceof l.HTMLIFrameElement; ) {
        try {
          var v = typeof f.contentWindow.location.href == "string";
        } catch {
          v = !1;
        }
        if (v)
          l = f.contentWindow;
        else
          break;
        f = Je(l.document);
      }
      return f;
    }
    function Dc(l) {
      var f = l && l.nodeName && l.nodeName.toLowerCase();
      return f && (f === "input" && (l.type === "text" || l.type === "search" || l.type === "tel" || l.type === "url" || l.type === "password") || f === "textarea" || l.contentEditable === "true");
    }
    function Ic(l) {
      var f = bi(), v = l.focusedElem, x = l.selectionRange;
      if (f !== v && v && v.ownerDocument && qr(v.ownerDocument.documentElement, v)) {
        if (x !== null && Dc(v)) {
          if (f = x.start, l = x.end, l === void 0 && (l = f), "selectionStart" in v)
            v.selectionStart = f, v.selectionEnd = Math.min(l, v.value.length);
          else if (l = (f = v.ownerDocument || document) && f.defaultView || window, l.getSelection) {
            l = l.getSelection();
            var R = v.textContent.length, L = Math.min(x.start, R);
            x = x.end === void 0 ? L : Math.min(x.end, R), !l.extend && L > x && (R = x, x = L, L = R), R = ti(v, L);
            var U = ti(
              v,
              x
            );
            R && U && (l.rangeCount !== 1 || l.anchorNode !== R.node || l.anchorOffset !== R.offset || l.focusNode !== U.node || l.focusOffset !== U.offset) && (f = f.createRange(), f.setStart(R.node, R.offset), l.removeAllRanges(), L > x ? (l.addRange(f), l.extend(U.node, U.offset)) : (f.setEnd(U.node, U.offset), l.addRange(f)));
          }
        }
        for (f = [], l = v; l = l.parentNode; )
          l.nodeType === 1 && f.push({ element: l, left: l.scrollLeft, top: l.scrollTop });
        for (typeof v.focus == "function" && v.focus(), v = 0; v < f.length; v++)
          l = f[v], l.element.scrollLeft = l.left, l.element.scrollTop = l.top;
      }
    }
    var Ha = c && "documentMode" in document && 11 >= document.documentMode, ul = null, ju = null, cl = null, Hf = !1;
    function sd(l, f, v) {
      var x = v.window === v ? v.document : v.nodeType === 9 ? v : v.ownerDocument;
      Hf || ul == null || ul !== Je(x) || (x = ul, "selectionStart" in x && Dc(x) ? x = { start: x.selectionStart, end: x.selectionEnd } : (x = (x.ownerDocument && x.ownerDocument.defaultView || window).getSelection(), x = { anchorNode: x.anchorNode, anchorOffset: x.anchorOffset, focusNode: x.focusNode, focusOffset: x.focusOffset }), cl && ft(cl, x) || (cl = x, x = kp(ju, "onSelect"), 0 < x.length && (f = new Wt("onSelect", "select", null, f, v), l.push({ event: f, listeners: x }), f.target = ul)));
    }
    function ni(l, f) {
      var v = {};
      return v[l.toLowerCase()] = f.toLowerCase(), v["Webkit" + l] = "webkit" + f, v["Moz" + l] = "moz" + f, v;
    }
    var Wf = { animationend: ni("Animation", "AnimationEnd"), animationiteration: ni("Animation", "AnimationIteration"), animationstart: ni("Animation", "AnimationStart"), transitionend: ni("Transition", "TransitionEnd") }, od = {}, ld = {};
    c && (ld = document.createElement("div").style, "AnimationEvent" in window || (delete Wf.animationend.animation, delete Wf.animationiteration.animation, delete Wf.animationstart.animation), "TransitionEvent" in window || delete Wf.transitionend.transition);
    function ud(l) {
      if (od[l])
        return od[l];
      if (!Wf[l])
        return l;
      var f = Wf[l], v;
      for (v in f)
        if (f.hasOwnProperty(v) && v in ld)
          return od[l] = f[v];
      return l;
    }
    var Ma = ud("animationend"), _m = ud("animationiteration"), cd = ud("animationstart"), ql = ud("transitionend"), fd = /* @__PURE__ */ new Map(), Em = "abort auxClick 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(" ");
    function No(l, f) {
      fd.set(l, f), o(f, [l]);
    }
    for (var hd = 0; hd < Em.length; hd++) {
      var Gf = Em[hd], Uu = Gf.toLowerCase(), fy = Gf[0].toUpperCase() + Gf.slice(1);
      No(Uu, "on" + fy);
    }
    No(Ma, "onAnimationEnd"), No(_m, "onAnimationIteration"), No(cd, "onAnimationStart"), No("dblclick", "onDoubleClick"), No("focusin", "onFocus"), No("focusout", "onBlur"), No(ql, "onTransitionEnd"), u("onMouseEnter", ["mouseout", "mouseover"]), u("onMouseLeave", ["mouseout", "mouseover"]), u("onPointerEnter", ["pointerout", "pointerover"]), u("onPointerLeave", ["pointerout", "pointerover"]), o("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")), o("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")), o("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]), o("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")), o("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")), o("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
    var Ns = "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(" "), Pc = new Set("cancel close invalid load scroll toggle".split(" ").concat(Ns));
    function dd(l, f, v) {
      var x = l.type || "unknown-event";
      l.currentTarget = v, st(x, f, void 0, l), l.currentTarget = null;
    }
    function hy(l, f) {
      f = (f & 4) !== 0;
      for (var v = 0; v < l.length; v++) {
        var x = l[v], R = x.event;
        x = x.listeners;
        e: {
          var L = void 0;
          if (f)
            for (var U = x.length - 1; 0 <= U; U--) {
              var J = x[U], oe = J.instance, be = J.currentTarget;
              if (J = J.listener, oe !== L && R.isPropagationStopped())
                break e;
              dd(R, J, be), L = oe;
            }
          else
            for (U = 0; U < x.length; U++) {
              if (J = x[U], oe = J.instance, be = J.currentTarget, J = J.listener, oe !== L && R.isPropagationStopped())
                break e;
              dd(R, J, be), L = oe;
            }
        }
      }
      if (Ms)
        throw l = Ul, Ms = !1, Ul = null, l;
    }
    function Ni(l, f) {
      var v = f[jp];
      v === void 0 && (v = f[jp] = /* @__PURE__ */ new Set());
      var x = l + "__bubble";
      v.has(x) || (gd(f, l, 2, !1), v.add(x));
    }
    function pd(l, f, v) {
      var x = 0;
      f && (x |= 4), gd(v, l, x, f);
    }
    var to = "_reactListening" + Math.random().toString(36).slice(2);
    function Ds(l) {
      if (!l[to]) {
        l[to] = !0, i.forEach(function(v) {
          v !== "selectionchange" && (Pc.has(v) || pd(v, !1, l), pd(v, !0, l));
        });
        var f = l.nodeType === 9 ? l : l.ownerDocument;
        f === null || f[to] || (f[to] = !0, pd("selectionchange", !1, f));
      }
    }
    function gd(l, f, v, x) {
      switch (td(f)) {
        case 1:
          var R = Hl;
          break;
        case 4:
          R = Ff;
          break;
        default:
          R = ol;
      }
      v = R.bind(null, f, v, l), R = void 0, !sa || f !== "touchstart" && f !== "touchmove" && f !== "wheel" || (R = !0), x ? R !== void 0 ? l.addEventListener(f, v, { capture: !0, passive: R }) : l.addEventListener(f, v, !0) : R !== void 0 ? l.addEventListener(f, v, { passive: R }) : l.addEventListener(f, v, !1);
    }
    function Sm(l, f, v, x, R) {
      var L = x;
      if (!(f & 1) && !(f & 2) && x !== null)
        e:
          for (; ; ) {
            if (x === null)
              return;
            var U = x.tag;
            if (U === 3 || U === 4) {
              var J = x.stateNode.containerInfo;
              if (J === R || J.nodeType === 8 && J.parentNode === R)
                break;
              if (U === 4)
                for (U = x.return; U !== null; ) {
                  var oe = U.tag;
                  if ((oe === 3 || oe === 4) && (oe = U.stateNode.containerInfo, oe === R || oe.nodeType === 8 && oe.parentNode === R))
                    return;
                  U = U.return;
                }
              for (; J !== null; ) {
                if (U = io(J), U === null)
                  return;
                if (oe = U.tag, oe === 5 || oe === 6) {
                  x = L = U;
                  continue e;
                }
                J = J.parentNode;
              }
            }
            x = x.return;
          }
      br(function() {
        var be = L, Ge = Gr(v), Ke = [];
        e: {
          var Ve = fd.get(l);
          if (Ve !== void 0) {
            var ht = Wt, Et = l;
            switch (l) {
              case "keypress":
                if (Se(v) === 0)
                  break e;
              case "keydown":
              case "keyup":
                ht = ll;
                break;
              case "focusin":
                Et = "focus", ht = xi;
                break;
              case "focusout":
                Et = "blur", ht = xi;
                break;
              case "beforeblur":
              case "afterblur":
                ht = xi;
                break;
              case "click":
                if (v.button === 2)
                  break e;
              case "auxclick":
              case "dblclick":
              case "mousedown":
              case "mousemove":
              case "mouseup":
              case "mouseout":
              case "mouseover":
              case "contextmenu":
                ht = zn;
                break;
              case "drag":
              case "dragend":
              case "dragenter":
              case "dragexit":
              case "dragleave":
              case "dragover":
              case "dragstart":
              case "drop":
                ht = Gl;
                break;
              case "touchcancel":
              case "touchend":
              case "touchmove":
              case "touchstart":
                ht = gm;
                break;
              case Ma:
              case _m:
              case cd:
                ht = Lc;
                break;
              case ql:
                ht = Uf;
                break;
              case "scroll":
                ht = si;
                break;
              case "wheel":
                ht = Va;
                break;
              case "copy":
              case "cut":
              case "paste":
                ht = id;
                break;
              case "gotpointercapture":
              case "lostpointercapture":
              case "pointercancel":
              case "pointerdown":
              case "pointermove":
              case "pointerout":
              case "pointerover":
              case "pointerup":
                ht = jf;
            }
            var Rt = (f & 4) !== 0, zr = !Rt && l === "scroll", me = Rt ? Ve !== null ? Ve + "Capture" : null : Ve;
            Rt = [];
            for (var fe = be, ve; fe !== null; ) {
              ve = fe;
              var nt = ve.stateNode;
              if (ve.tag === 5 && nt !== null && (ve = nt, me !== null && (nt = Ca(fe, me), nt != null && Rt.push(kc(fe, nt, ve)))), zr)
                break;
              fe = fe.return;
            }
            0 < Rt.length && (Ve = new ht(Ve, Et, null, v, Ge), Ke.push({ event: Ve, listeners: Rt }));
          }
        }
        if (!(f & 7)) {
          e: {
            if (Ve = l === "mouseover" || l === "pointerover", ht = l === "mouseout" || l === "pointerout", Ve && v !== ki && (Et = v.relatedTarget || v.fromElement) && (io(Et) || Et[Wa]))
              break e;
            if ((ht || Ve) && (Ve = Ge.window === Ge ? Ge : (Ve = Ge.ownerDocument) ? Ve.defaultView || Ve.parentWindow : window, ht ? (Et = v.relatedTarget || v.toElement, ht = be, Et = Et ? io(Et) : null, Et !== null && (zr = ct(Et), Et !== zr || Et.tag !== 5 && Et.tag !== 6) && (Et = null)) : (ht = null, Et = be), ht !== Et)) {
              if (Rt = zn, nt = "onMouseLeave", me = "onMouseEnter", fe = "mouse", (l === "pointerout" || l === "pointerover") && (Rt = jf, nt = "onPointerLeave", me = "onPointerEnter", fe = "pointer"), zr = ht == null ? Ve : gn(ht), ve = Et == null ? Ve : gn(Et), Ve = new Rt(nt, fe + "leave", ht, v, Ge), Ve.target = zr, Ve.relatedTarget = ve, nt = null, io(Ge) === be && (Rt = new Rt(me, fe + "enter", Et, v, Ge), Rt.target = ve, Rt.relatedTarget = zr, nt = Rt), zr = nt, ht && Et)
                t: {
                  for (Rt = ht, me = Et, fe = 0, ve = Rt; ve; ve = Fc(ve))
                    fe++;
                  for (ve = 0, nt = me; nt; nt = Fc(nt))
                    ve++;
                  for (; 0 < fe - ve; )
                    Rt = Fc(Rt), fe--;
                  for (; 0 < ve - fe; )
                    me = Fc(me), ve--;
                  for (; fe--; ) {
                    if (Rt === me || me !== null && Rt === me.alternate)
                      break t;
                    Rt = Fc(Rt), me = Fc(me);
                  }
                  Rt = null;
                }
              else
                Rt = null;
              ht !== null && Nr(Ke, Ve, ht, Rt, !1), Et !== null && zr !== null && Nr(Ke, zr, Et, Rt, !0);
            }
          }
          e: {
            if (Ve = be ? gn(be) : window, ht = Ve.nodeName && Ve.nodeName.toLowerCase(), ht === "select" || ht === "input" && Ve.type === "file")
              var Lt = ym;
            else if (ad(Ve))
              if (Fu)
                Lt = pe;
              else {
                Lt = A_;
                var Ut = O_;
              }
            else
              (ht = Ve.nodeName) && ht.toLowerCase() === "input" && (Ve.type === "checkbox" || Ve.type === "radio") && (Lt = Vf);
            if (Lt && (Lt = Lt(l, be))) {
              vm(Ke, Lt, v, Ge);
              break e;
            }
            Ut && Ut(l, Ve, be), l === "focusout" && (Ut = Ve._wrapperState) && Ut.controlled && Ve.type === "number" && Sr(Ve, "number", Ve.value);
          }
          switch (Ut = be ? gn(be) : window, l) {
            case "focusin":
              (ad(Ut) || Ut.contentEditable === "true") && (ul = Ut, ju = be, cl = null);
              break;
            case "focusout":
              cl = ju = ul = null;
              break;
            case "mousedown":
              Hf = !0;
              break;
            case "contextmenu":
            case "mouseup":
            case "dragend":
              Hf = !1, sd(Ke, v, Ge);
              break;
            case "selectionchange":
              if (Ha)
                break;
            case "keydown":
            case "keyup":
              sd(Ke, v, Ge);
          }
          var St;
          if (ar)
            e: {
              switch (l) {
                case "compositionstart":
                  var Gt = "onCompositionStart";
                  break e;
                case "compositionend":
                  Gt = "onCompositionEnd";
                  break e;
                case "compositionupdate":
                  Gt = "onCompositionUpdate";
                  break e;
              }
              Gt = void 0;
            }
          else
            Pu ? ay(l, v) && (Gt = "onCompositionEnd") : l === "keydown" && v.keyCode === 229 && (Gt = "onCompositionStart");
          Gt && (zf && v.locale !== "ko" && (Pu || Gt !== "onCompositionStart" ? Gt === "onCompositionEnd" && Pu && (St = ne()) : (Li = Ge, Iu = "value" in Li ? Li.value : Li.textContent, Pu = !0)), Ut = kp(be, Gt), 0 < Ut.length && (Gt = new ey(Gt, l, null, v, Ge), Ke.push({ event: Gt, listeners: Ut }), St ? Gt.data = St : (St = sy(v), St !== null && (Gt.data = St)))), (St = Ip ? Bf(l, v) : R_(l, v)) && (be = kp(be, "onBeforeInput"), 0 < be.length && (Ge = new ey("onBeforeInput", "beforeinput", null, v, Ge), Ke.push({ event: Ge, listeners: be }), Ge.data = St));
        }
        hy(Ke, f);
      });
    }
    function kc(l, f, v) {
      return { instance: l, listener: f, currentTarget: v };
    }
    function kp(l, f) {
      for (var v = f + "Capture", x = []; l !== null; ) {
        var R = l, L = R.stateNode;
        R.tag === 5 && L !== null && (R = L, L = Ca(l, v), L != null && x.unshift(kc(l, L, R)), L = Ca(l, f), L != null && x.push(kc(l, L, R))), l = l.return;
      }
      return x;
    }
    function Fc(l) {
      if (l === null)
        return null;
      do
        l = l.return;
      while (l && l.tag !== 5);
      return l || null;
    }
    function Nr(l, f, v, x, R) {
      for (var L = f._reactName, U = []; v !== null && v !== x; ) {
        var J = v, oe = J.alternate, be = J.stateNode;
        if (oe !== null && oe === x)
          break;
        J.tag === 5 && be !== null && (J = be, R ? (oe = Ca(v, L), oe != null && U.unshift(kc(v, oe, J))) : R || (oe = Ca(v, L), oe != null && U.push(kc(v, oe, J)))), v = v.return;
      }
      U.length !== 0 && l.push({ event: f, listeners: U });
    }
    var va = /\r\n?/g, xm = /\u0000|\uFFFD/g;
    function dy(l) {
      return (typeof l == "string" ? l : "" + l).replace(va, `
`).replace(xm, "");
    }
    function Yf(l, f, v) {
      if (f = dy(f), dy(l) !== f && v)
        throw Error(t(425));
    }
    function Fp() {
    }
    var md = null, jc = null;
    function Xl(l, f) {
      return l === "textarea" || l === "noscript" || typeof f.children == "string" || typeof f.children == "number" || typeof f.dangerouslySetInnerHTML == "object" && f.dangerouslySetInnerHTML !== null && f.dangerouslySetInnerHTML.__html != null;
    }
    var fl = typeof setTimeout == "function" ? setTimeout : void 0, Kl = typeof clearTimeout == "function" ? clearTimeout : void 0, Uc = typeof Promise == "function" ? Promise : void 0, vd = typeof queueMicrotask == "function" ? queueMicrotask : typeof Uc < "u" ? function(l) {
      return Uc.resolve(null).then(l).catch(zu);
    } : fl;
    function zu(l) {
      setTimeout(function() {
        throw l;
      });
    }
    function bm(l, f) {
      var v = f, x = 0;
      do {
        var R = v.nextSibling;
        if (l.removeChild(v), R && R.nodeType === 8)
          if (v = R.data, v === "/$") {
            if (x === 0) {
              l.removeChild(R), An(f);
              return;
            }
            x--;
          } else
            v !== "$" && v !== "$?" && v !== "$!" || x++;
        v = R;
      } while (v);
      An(f);
    }
    function Is(l) {
      for (; l != null; l = l.nextSibling) {
        var f = l.nodeType;
        if (f === 1 || f === 3)
          break;
        if (f === 8) {
          if (f = l.data, f === "$" || f === "$!" || f === "$?")
            break;
          if (f === "/$")
            return null;
        }
      }
      return l;
    }
    function yd(l) {
      l = l.previousSibling;
      for (var f = 0; l; ) {
        if (l.nodeType === 8) {
          var v = l.data;
          if (v === "$" || v === "$!" || v === "$?") {
            if (f === 0)
              return l;
            f--;
          } else
            v === "/$" && f++;
        }
        l = l.previousSibling;
      }
      return null;
    }
    var Zl = Math.random().toString(36).slice(2), no = "__reactFiber$" + Zl, $u = "__reactProps$" + Zl, Wa = "__reactContainer$" + Zl, jp = "__reactEvents$" + Zl, H = "__reactListeners$" + Zl, qf = "__reactHandles$" + Zl;
    function io(l) {
      var f = l[no];
      if (f)
        return f;
      for (var v = l.parentNode; v; ) {
        if (f = v[Wa] || v[no]) {
          if (v = f.alternate, f.child !== null || v !== null && v.child !== null)
            for (l = yd(l); l !== null; ) {
              if (v = l[no])
                return v;
              l = yd(l);
            }
          return f;
        }
        l = v, v = l.parentNode;
      }
      return null;
    }
    function Dr(l) {
      return l = l[no] || l[Wa], !l || l.tag !== 5 && l.tag !== 6 && l.tag !== 13 && l.tag !== 3 ? null : l;
    }
    function gn(l) {
      if (l.tag === 5 || l.tag === 6)
        return l.stateNode;
      throw Error(t(33));
    }
    function Up(l) {
      return l[$u] || null;
    }
    var kt = [], Do = -1;
    function qn(l) {
      return { current: l };
    }
    function At(l) {
      0 > Do || (l.current = kt[Do], kt[Do] = null, Do--);
    }
    function ii(l, f) {
      Do++, kt[Do] = l.current, l.current = f;
    }
    var ro = {}, oa = qn(ro), tn = qn(!1), hr = ro;
    function Ps(l, f) {
      var v = l.type.contextTypes;
      if (!v)
        return ro;
      var x = l.stateNode;
      if (x && x.__reactInternalMemoizedUnmaskedChildContext === f)
        return x.__reactInternalMemoizedMaskedChildContext;
      var R = {}, L;
      for (L in v)
        R[L] = f[L];
      return x && (l = l.stateNode, l.__reactInternalMemoizedUnmaskedChildContext = f, l.__reactInternalMemoizedMaskedChildContext = R), R;
    }
    function Xr(l) {
      return l = l.childContextTypes, l != null;
    }
    function ps() {
      At(tn), At(oa);
    }
    function hl(l, f, v) {
      if (oa.current !== ro)
        throw Error(t(168));
      ii(oa, f), ii(tn, v);
    }
    function Bu(l, f, v) {
      var x = l.stateNode;
      if (f = f.childContextTypes, typeof x.getChildContext != "function")
        return v;
      x = x.getChildContext();
      for (var R in x)
        if (!(R in f))
          throw Error(t(108, Ze(l) || "Unknown", R));
      return q({}, v, x);
    }
    function Ga(l) {
      return l = (l = l.stateNode) && l.__reactInternalMemoizedMergedChildContext || ro, hr = oa.current, ii(oa, l), ii(tn, tn.current), !0;
    }
    function py(l, f, v) {
      var x = l.stateNode;
      if (!x)
        throw Error(t(169));
      v ? (l = Bu(l, f, hr), x.__reactInternalMemoizedMergedChildContext = l, At(tn), At(oa), ii(oa, l)) : At(tn), ii(tn, v);
    }
    var Ql = null, Vu = !1, ya = !1;
    function zp(l) {
      Ql === null ? Ql = [l] : Ql.push(l);
    }
    function Hu(l) {
      Vu = !0, zp(l);
    }
    function dl() {
      if (!ya && Ql !== null) {
        ya = !0;
        var l = 0, f = Rn;
        try {
          var v = Ql;
          for (Rn = 1; l < v.length; l++) {
            var x = v[l];
            do
              x = x(!0);
            while (x !== null);
          }
          Ql = null, Vu = !1;
        } catch (R) {
          throw Ql !== null && (Ql = Ql.slice(l + 1)), ji(Zh, dl), R;
        } finally {
          Rn = f, ya = !1;
        }
      }
      return null;
    }
    var ao = [], la = 0, so = null, zc = 0, gs = [], ms = 0, Io = null, Ya = 1, ua = "";
    function $c(l, f) {
      ao[la++] = zc, ao[la++] = so, so = l, zc = f;
    }
    function Wu(l, f, v) {
      gs[ms++] = Ya, gs[ms++] = ua, gs[ms++] = Io, Io = l;
      var x = Ya;
      l = ua;
      var R = 32 - $a(x) - 1;
      x &= ~(1 << R), v += 1;
      var L = 32 - $a(f) + R;
      if (30 < L) {
        var U = R - R % 5;
        L = (x & (1 << U) - 1).toString(32), x >>= U, R -= U, Ya = 1 << 32 - $a(f) + R | v << R | x, ua = L + l;
      } else
        Ya = 1 << L | v << R | x, ua = l;
    }
    function Xf(l) {
      l.return !== null && ($c(l, 1), Wu(l, 1, 0));
    }
    function Gu(l) {
      for (; l === so; )
        so = ao[--la], ao[la] = null, zc = ao[--la], ao[la] = null;
      for (; l === Io; )
        Io = gs[--ms], gs[ms] = null, ua = gs[--ms], gs[ms] = null, Ya = gs[--ms], gs[ms] = null;
    }
    var Oa = null, ks = null, zi = !1, oo = null;
    function Po(l, f) {
      var v = Us(5, null, null, 0);
      v.elementType = "DELETED", v.stateNode = f, v.return = l, f = l.deletions, f === null ? (l.deletions = [v], l.flags |= 16) : f.push(v);
    }
    function _d(l, f) {
      switch (l.tag) {
        case 5:
          var v = l.type;
          return f = f.nodeType !== 1 || v.toLowerCase() !== f.nodeName.toLowerCase() ? null : f, f !== null ? (l.stateNode = f, Oa = l, ks = Is(f.firstChild), !0) : !1;
        case 6:
          return f = l.pendingProps === "" || f.nodeType !== 3 ? null : f, f !== null ? (l.stateNode = f, Oa = l, ks = null, !0) : !1;
        case 13:
          return f = f.nodeType !== 8 ? null : f, f !== null ? (v = Io !== null ? { id: Ya, overflow: ua } : null, l.memoizedState = { dehydrated: f, treeContext: v, retryLane: 1073741824 }, v = Us(18, null, null, 0), v.stateNode = f, v.return = l, l.child = v, Oa = l, ks = null, !0) : !1;
        default:
          return !1;
      }
    }
    function Jl(l) {
      return (l.mode & 1) !== 0 && (l.flags & 128) === 0;
    }
    function qa(l) {
      if (zi) {
        var f = ks;
        if (f) {
          var v = f;
          if (!_d(l, f)) {
            if (Jl(l))
              throw Error(t(418));
            f = Is(v.nextSibling);
            var x = Oa;
            f && _d(l, f) ? Po(x, v) : (l.flags = l.flags & -4097 | 2, zi = !1, Oa = l);
          }
        } else {
          if (Jl(l))
            throw Error(t(418));
          l.flags = l.flags & -4097 | 2, zi = !1, Oa = l;
        }
      }
    }
    function wm(l) {
      for (l = l.return; l !== null && l.tag !== 5 && l.tag !== 3 && l.tag !== 13; )
        l = l.return;
      Oa = l;
    }
    function Ed(l) {
      if (l !== Oa)
        return !1;
      if (!zi)
        return wm(l), zi = !0, !1;
      var f;
      if ((f = l.tag !== 3) && !(f = l.tag !== 5) && (f = l.type, f = f !== "head" && f !== "body" && !Xl(l.type, l.memoizedProps)), f && (f = ks)) {
        if (Jl(l))
          throw Cm(), Error(t(418));
        for (; f; )
          Po(l, f), f = Is(f.nextSibling);
      }
      if (wm(l), l.tag === 13) {
        if (l = l.memoizedState, l = l !== null ? l.dehydrated : null, !l)
          throw Error(t(317));
        e: {
          for (l = l.nextSibling, f = 0; l; ) {
            if (l.nodeType === 8) {
              var v = l.data;
              if (v === "/$") {
                if (f === 0) {
                  ks = Is(l.nextSibling);
                  break e;
                }
                f--;
              } else
                v !== "$" && v !== "$!" && v !== "$?" || f++;
            }
            l = l.nextSibling;
          }
          ks = null;
        }
      } else
        ks = Oa ? Is(l.stateNode.nextSibling) : null;
      return !0;
    }
    function Cm() {
      for (var l = ks; l; )
        l = Is(l.nextSibling);
    }
    function pl() {
      ks = Oa = null, zi = !1;
    }
    function Di(l) {
      oo === null ? oo = [l] : oo.push(l);
    }
    var gy = V.ReactCurrentBatchConfig;
    function vs(l, f) {
      if (l && l.defaultProps) {
        f = q({}, f), l = l.defaultProps;
        for (var v in l)
          f[v] === void 0 && (f[v] = l[v]);
        return f;
      }
      return f;
    }
    var eu = qn(null), gl = null, Bc = null, Ir = null;
    function Sd() {
      Ir = Bc = gl = null;
    }
    function $p(l) {
      var f = eu.current;
      At(eu), l._currentValue = f;
    }
    function _a(l, f, v) {
      for (; l !== null; ) {
        var x = l.alternate;
        if ((l.childLanes & f) !== f ? (l.childLanes |= f, x !== null && (x.childLanes |= f)) : x !== null && (x.childLanes & f) !== f && (x.childLanes |= f), l === v)
          break;
        l = l.return;
      }
    }
    function dr(l, f) {
      gl = l, Ir = Bc = null, l = l.dependencies, l !== null && l.firstContext !== null && (l.lanes & f && (Na = !0), l.firstContext = null);
    }
    function rt(l) {
      var f = l._currentValue;
      if (Ir !== l)
        if (l = { context: l, memoizedValue: f, next: null }, Bc === null) {
          if (gl === null)
            throw Error(t(308));
          Bc = l, gl.dependencies = { lanes: 0, firstContext: l };
        } else
          Bc = Bc.next = l;
      return f;
    }
    var wr = null;
    function ys(l) {
      wr === null ? wr = [l] : wr.push(l);
    }
    function Aa(l, f, v, x) {
      var R = f.interleaved;
      return R === null ? (v.next = v, ys(f)) : (v.next = R.next, R.next = v), f.interleaved = v, ko(l, x);
    }
    function ko(l, f) {
      l.lanes |= f;
      var v = l.alternate;
      for (v !== null && (v.lanes |= f), v = l, l = l.return; l !== null; )
        l.childLanes |= f, v = l.alternate, v !== null && (v.childLanes |= f), v = l, l = l.return;
      return v.tag === 3 ? v.stateNode : null;
    }
    var Yu = !1;
    function Tm(l) {
      l.updateQueue = { baseState: l.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
    }
    function my(l, f) {
      l = l.updateQueue, f.updateQueue === l && (f.updateQueue = { baseState: l.baseState, firstBaseUpdate: l.firstBaseUpdate, lastBaseUpdate: l.lastBaseUpdate, shared: l.shared, effects: l.effects });
    }
    function wi(l, f) {
      return { eventTime: l, lane: f, tag: 0, payload: null, callback: null, next: null };
    }
    function qu(l, f, v) {
      var x = l.updateQueue;
      if (x === null)
        return null;
      if (x = x.shared, Ln & 2) {
        var R = x.pending;
        return R === null ? f.next = f : (f.next = R.next, R.next = f), x.pending = f, ko(l, v);
      }
      return R = x.interleaved, R === null ? (f.next = f, ys(x)) : (f.next = R.next, R.next = f), x.interleaved = f, ko(l, v);
    }
    function Xu(l, f, v) {
      if (f = f.updateQueue, f !== null && (f = f.shared, (v & 4194240) !== 0)) {
        var x = f.lanes;
        x &= l.pendingLanes, v |= x, f.lanes = v, wc(l, v);
      }
    }
    function Rm(l, f) {
      var v = l.updateQueue, x = l.alternate;
      if (x !== null && (x = x.updateQueue, v === x)) {
        var R = null, L = null;
        if (v = v.firstBaseUpdate, v !== null) {
          do {
            var U = { eventTime: v.eventTime, lane: v.lane, tag: v.tag, payload: v.payload, callback: v.callback, next: null };
            L === null ? R = L = U : L = L.next = U, v = v.next;
          } while (v !== null);
          L === null ? R = L = f : L = L.next = f;
        } else
          R = L = f;
        v = { baseState: x.baseState, firstBaseUpdate: R, lastBaseUpdate: L, shared: x.shared, effects: x.effects }, l.updateQueue = v;
        return;
      }
      l = v.lastBaseUpdate, l === null ? v.firstBaseUpdate = f : l.next = f, v.lastBaseUpdate = f;
    }
    function xd(l, f, v, x) {
      var R = l.updateQueue;
      Yu = !1;
      var L = R.firstBaseUpdate, U = R.lastBaseUpdate, J = R.shared.pending;
      if (J !== null) {
        R.shared.pending = null;
        var oe = J, be = oe.next;
        oe.next = null, U === null ? L = be : U.next = be, U = oe;
        var Ge = l.alternate;
        Ge !== null && (Ge = Ge.updateQueue, J = Ge.lastBaseUpdate, J !== U && (J === null ? Ge.firstBaseUpdate = be : J.next = be, Ge.lastBaseUpdate = oe));
      }
      if (L !== null) {
        var Ke = R.baseState;
        U = 0, Ge = be = oe = null, J = L;
        do {
          var Ve = J.lane, ht = J.eventTime;
          if ((x & Ve) === Ve) {
            Ge !== null && (Ge = Ge.next = {
              eventTime: ht,
              lane: 0,
              tag: J.tag,
              payload: J.payload,
              callback: J.callback,
              next: null
            });
            e: {
              var Et = l, Rt = J;
              switch (Ve = f, ht = v, Rt.tag) {
                case 1:
                  if (Et = Rt.payload, typeof Et == "function") {
                    Ke = Et.call(ht, Ke, Ve);
                    break e;
                  }
                  Ke = Et;
                  break e;
                case 3:
                  Et.flags = Et.flags & -65537 | 128;
                case 0:
                  if (Et = Rt.payload, Ve = typeof Et == "function" ? Et.call(ht, Ke, Ve) : Et, Ve == null)
                    break e;
                  Ke = q({}, Ke, Ve);
                  break e;
                case 2:
                  Yu = !0;
              }
            }
            J.callback !== null && J.lane !== 0 && (l.flags |= 64, Ve = R.effects, Ve === null ? R.effects = [J] : Ve.push(J));
          } else
            ht = { eventTime: ht, lane: Ve, tag: J.tag, payload: J.payload, callback: J.callback, next: null }, Ge === null ? (be = Ge = ht, oe = Ke) : Ge = Ge.next = ht, U |= Ve;
          if (J = J.next, J === null) {
            if (J = R.shared.pending, J === null)
              break;
            Ve = J, J = Ve.next, Ve.next = null, R.lastBaseUpdate = Ve, R.shared.pending = null;
          }
        } while (!0);
        if (Ge === null && (oe = Ke), R.baseState = oe, R.firstBaseUpdate = be, R.lastBaseUpdate = Ge, f = R.shared.interleaved, f !== null) {
          R = f;
          do
            U |= R.lane, R = R.next;
          while (R !== f);
        } else
          L === null && (R.shared.lanes = 0);
        ac |= U, l.lanes = U, l.memoizedState = Ke;
      }
    }
    function Kf(l, f, v) {
      if (l = f.effects, f.effects = null, l !== null)
        for (f = 0; f < l.length; f++) {
          var x = l[f], R = x.callback;
          if (R !== null) {
            if (x.callback = null, x = v, typeof R != "function")
              throw Error(t(191, R));
            R.call(x);
          }
        }
    }
    var Fo = new n.Component().refs;
    function Mm(l, f, v, x) {
      f = l.memoizedState, v = v(x, f), v = v == null ? f : q({}, f, v), l.memoizedState = v, l.lanes === 0 && (l.updateQueue.baseState = v);
    }
    var Bp = { isMounted: function(l) {
      return (l = l._reactInternals) ? ct(l) === l : !1;
    }, enqueueSetState: function(l, f, v) {
      l = l._reactInternals;
      var x = ca(), R = hu(l), L = wi(x, R);
      L.payload = f, v != null && (L.callback = v), f = qu(l, L, R), f !== null && (vr(f, l, R, x), Xu(f, l, R));
    }, enqueueReplaceState: function(l, f, v) {
      l = l._reactInternals;
      var x = ca(), R = hu(l), L = wi(x, R);
      L.tag = 1, L.payload = f, v != null && (L.callback = v), f = qu(l, L, R), f !== null && (vr(f, l, R, x), Xu(f, l, R));
    }, enqueueForceUpdate: function(l, f) {
      l = l._reactInternals;
      var v = ca(), x = hu(l), R = wi(v, x);
      R.tag = 2, f != null && (R.callback = f), f = qu(l, R, x), f !== null && (vr(f, l, x, v), Xu(f, l, x));
    } };
    function Vp(l, f, v, x, R, L, U) {
      return l = l.stateNode, typeof l.shouldComponentUpdate == "function" ? l.shouldComponentUpdate(x, L, U) : f.prototype && f.prototype.isPureReactComponent ? !ft(v, x) || !ft(R, L) : !0;
    }
    function Om(l, f, v) {
      var x = !1, R = ro, L = f.contextType;
      return typeof L == "object" && L !== null ? L = rt(L) : (R = Xr(f) ? hr : oa.current, x = f.contextTypes, L = (x = x != null) ? Ps(l, R) : ro), f = new f(v, L), l.memoizedState = f.state !== null && f.state !== void 0 ? f.state : null, f.updater = Bp, l.stateNode = f, f._reactInternals = l, x && (l = l.stateNode, l.__reactInternalMemoizedUnmaskedChildContext = R, l.__reactInternalMemoizedMaskedChildContext = L), f;
    }
    function vy(l, f, v, x) {
      l = f.state, typeof f.componentWillReceiveProps == "function" && f.componentWillReceiveProps(v, x), typeof f.UNSAFE_componentWillReceiveProps == "function" && f.UNSAFE_componentWillReceiveProps(v, x), f.state !== l && Bp.enqueueReplaceState(f, f.state, null);
    }
    function Am(l, f, v, x) {
      var R = l.stateNode;
      R.props = v, R.state = l.memoizedState, R.refs = Fo, Tm(l);
      var L = f.contextType;
      typeof L == "object" && L !== null ? R.context = rt(L) : (L = Xr(f) ? hr : oa.current, R.context = Ps(l, L)), R.state = l.memoizedState, L = f.getDerivedStateFromProps, typeof L == "function" && (Mm(l, f, L, v), R.state = l.memoizedState), typeof f.getDerivedStateFromProps == "function" || typeof R.getSnapshotBeforeUpdate == "function" || typeof R.UNSAFE_componentWillMount != "function" && typeof R.componentWillMount != "function" || (f = R.state, typeof R.componentWillMount == "function" && R.componentWillMount(), typeof R.UNSAFE_componentWillMount == "function" && R.UNSAFE_componentWillMount(), f !== R.state && Bp.enqueueReplaceState(R, R.state, null), xd(l, v, R, x), R.state = l.memoizedState), typeof R.componentDidMount == "function" && (l.flags |= 4194308);
    }
    function Zf(l, f, v) {
      if (l = v.ref, l !== null && typeof l != "function" && typeof l != "object") {
        if (v._owner) {
          if (v = v._owner, v) {
            if (v.tag !== 1)
              throw Error(t(309));
            var x = v.stateNode;
          }
          if (!x)
            throw Error(t(147, l));
          var R = x, L = "" + l;
          return f !== null && f.ref !== null && typeof f.ref == "function" && f.ref._stringRef === L ? f.ref : (f = function(U) {
            var J = R.refs;
            J === Fo && (J = R.refs = {}), U === null ? delete J[L] : J[L] = U;
          }, f._stringRef = L, f);
        }
        if (typeof l != "string")
          throw Error(t(284));
        if (!v._owner)
          throw Error(t(290, l));
      }
      return l;
    }
    function Qf(l, f) {
      throw l = Object.prototype.toString.call(f), Error(t(31, l === "[object Object]" ? "object with keys {" + Object.keys(f).join(", ") + "}" : l));
    }
    function Hp(l) {
      var f = l._init;
      return f(l._payload);
    }
    function yy(l) {
      function f(me, fe) {
        if (l) {
          var ve = me.deletions;
          ve === null ? (me.deletions = [fe], me.flags |= 16) : ve.push(fe);
        }
      }
      function v(me, fe) {
        if (!l)
          return null;
        for (; fe !== null; )
          f(me, fe), fe = fe.sibling;
        return null;
      }
      function x(me, fe) {
        for (me = /* @__PURE__ */ new Map(); fe !== null; )
          fe.key !== null ? me.set(fe.key, fe) : me.set(fe.index, fe), fe = fe.sibling;
        return me;
      }
      function R(me, fe) {
        return me = uc(me, fe), me.index = 0, me.sibling = null, me;
      }
      function L(me, fe, ve) {
        return me.index = ve, l ? (ve = me.alternate, ve !== null ? (ve = ve.index, ve < fe ? (me.flags |= 2, fe) : ve) : (me.flags |= 2, fe)) : (me.flags |= 1048576, fe);
      }
      function U(me) {
        return l && me.alternate === null && (me.flags |= 2), me;
      }
      function J(me, fe, ve, nt) {
        return fe === null || fe.tag !== 6 ? (fe = hg(ve, me.mode, nt), fe.return = me, fe) : (fe = R(fe, ve), fe.return = me, fe);
      }
      function oe(me, fe, ve, nt) {
        var Lt = ve.type;
        return Lt === ie ? Ge(me, fe, ve.props.children, nt, ve.key) : fe !== null && (fe.elementType === Lt || typeof Lt == "object" && Lt !== null && Lt.$$typeof === ae && Hp(Lt) === fe.type) ? (nt = R(fe, ve.props), nt.ref = Zf(me, fe, ve), nt.return = me, nt) : (nt = cg(ve.type, ve.key, ve.props, null, me.mode, nt), nt.ref = Zf(me, fe, ve), nt.return = me, nt);
      }
      function be(me, fe, ve, nt) {
        return fe === null || fe.tag !== 4 || fe.stateNode.containerInfo !== ve.containerInfo || fe.stateNode.implementation !== ve.implementation ? (fe = Wd(ve, me.mode, nt), fe.return = me, fe) : (fe = R(fe, ve.children || []), fe.return = me, fe);
      }
      function Ge(me, fe, ve, nt, Lt) {
        return fe === null || fe.tag !== 7 ? (fe = sf(ve, me.mode, nt, Lt), fe.return = me, fe) : (fe = R(fe, ve), fe.return = me, fe);
      }
      function Ke(me, fe, ve) {
        if (typeof fe == "string" && fe !== "" || typeof fe == "number")
          return fe = hg("" + fe, me.mode, ve), fe.return = me, fe;
        if (typeof fe == "object" && fe !== null) {
          switch (fe.$$typeof) {
            case z:
              return ve = cg(fe.type, fe.key, fe.props, null, me.mode, ve), ve.ref = Zf(me, null, fe), ve.return = me, ve;
            case G:
              return fe = Wd(fe, me.mode, ve), fe.return = me, fe;
            case ae:
              var nt = fe._init;
              return Ke(me, nt(fe._payload), ve);
          }
          if (In(fe) || Ae(fe))
            return fe = sf(fe, me.mode, ve, null), fe.return = me, fe;
          Qf(me, fe);
        }
        return null;
      }
      function Ve(me, fe, ve, nt) {
        var Lt = fe !== null ? fe.key : null;
        if (typeof ve == "string" && ve !== "" || typeof ve == "number")
          return Lt !== null ? null : J(me, fe, "" + ve, nt);
        if (typeof ve == "object" && ve !== null) {
          switch (ve.$$typeof) {
            case z:
              return ve.key === Lt ? oe(me, fe, ve, nt) : null;
            case G:
              return ve.key === Lt ? be(me, fe, ve, nt) : null;
            case ae:
              return Lt = ve._init, Ve(
                me,
                fe,
                Lt(ve._payload),
                nt
              );
          }
          if (In(ve) || Ae(ve))
            return Lt !== null ? null : Ge(me, fe, ve, nt, null);
          Qf(me, ve);
        }
        return null;
      }
      function ht(me, fe, ve, nt, Lt) {
        if (typeof nt == "string" && nt !== "" || typeof nt == "number")
          return me = me.get(ve) || null, J(fe, me, "" + nt, Lt);
        if (typeof nt == "object" && nt !== null) {
          switch (nt.$$typeof) {
            case z:
              return me = me.get(nt.key === null ? ve : nt.key) || null, oe(fe, me, nt, Lt);
            case G:
              return me = me.get(nt.key === null ? ve : nt.key) || null, be(fe, me, nt, Lt);
            case ae:
              var Ut = nt._init;
              return ht(me, fe, ve, Ut(nt._payload), Lt);
          }
          if (In(nt) || Ae(nt))
            return me = me.get(ve) || null, Ge(fe, me, nt, Lt, null);
          Qf(fe, nt);
        }
        return null;
      }
      function Et(me, fe, ve, nt) {
        for (var Lt = null, Ut = null, St = fe, Gt = fe = 0, na = null; St !== null && Gt < ve.length; Gt++) {
          St.index > Gt ? (na = St, St = null) : na = St.sibling;
          var ri = Ve(me, St, ve[Gt], nt);
          if (ri === null) {
            St === null && (St = na);
            break;
          }
          l && St && ri.alternate === null && f(me, St), fe = L(ri, fe, Gt), Ut === null ? Lt = ri : Ut.sibling = ri, Ut = ri, St = na;
        }
        if (Gt === ve.length)
          return v(me, St), zi && $c(me, Gt), Lt;
        if (St === null) {
          for (; Gt < ve.length; Gt++)
            St = Ke(me, ve[Gt], nt), St !== null && (fe = L(St, fe, Gt), Ut === null ? Lt = St : Ut.sibling = St, Ut = St);
          return zi && $c(me, Gt), Lt;
        }
        for (St = x(me, St); Gt < ve.length; Gt++)
          na = ht(St, me, Gt, ve[Gt], nt), na !== null && (l && na.alternate !== null && St.delete(na.key === null ? Gt : na.key), fe = L(na, fe, Gt), Ut === null ? Lt = na : Ut.sibling = na, Ut = na);
        return l && St.forEach(function(du) {
          return f(me, du);
        }), zi && $c(me, Gt), Lt;
      }
      function Rt(me, fe, ve, nt) {
        var Lt = Ae(ve);
        if (typeof Lt != "function")
          throw Error(t(150));
        if (ve = Lt.call(ve), ve == null)
          throw Error(t(151));
        for (var Ut = Lt = null, St = fe, Gt = fe = 0, na = null, ri = ve.next(); St !== null && !ri.done; Gt++, ri = ve.next()) {
          St.index > Gt ? (na = St, St = null) : na = St.sibling;
          var du = Ve(me, St, ri.value, nt);
          if (du === null) {
            St === null && (St = na);
            break;
          }
          l && St && du.alternate === null && f(me, St), fe = L(du, fe, Gt), Ut === null ? Lt = du : Ut.sibling = du, Ut = du, St = na;
        }
        if (ri.done)
          return v(
            me,
            St
          ), zi && $c(me, Gt), Lt;
        if (St === null) {
          for (; !ri.done; Gt++, ri = ve.next())
            ri = Ke(me, ri.value, nt), ri !== null && (fe = L(ri, fe, Gt), Ut === null ? Lt = ri : Ut.sibling = ri, Ut = ri);
          return zi && $c(me, Gt), Lt;
        }
        for (St = x(me, St); !ri.done; Gt++, ri = ve.next())
          ri = ht(St, me, Gt, ri.value, nt), ri !== null && (l && ri.alternate !== null && St.delete(ri.key === null ? Gt : ri.key), fe = L(ri, fe, Gt), Ut === null ? Lt = ri : Ut.sibling = ri, Ut = ri);
        return l && St.forEach(function(B_) {
          return f(me, B_);
        }), zi && $c(me, Gt), Lt;
      }
      function zr(me, fe, ve, nt) {
        if (typeof ve == "object" && ve !== null && ve.type === ie && ve.key === null && (ve = ve.props.children), typeof ve == "object" && ve !== null) {
          switch (ve.$$typeof) {
            case z:
              e: {
                for (var Lt = ve.key, Ut = fe; Ut !== null; ) {
                  if (Ut.key === Lt) {
                    if (Lt = ve.type, Lt === ie) {
                      if (Ut.tag === 7) {
                        v(me, Ut.sibling), fe = R(Ut, ve.props.children), fe.return = me, me = fe;
                        break e;
                      }
                    } else if (Ut.elementType === Lt || typeof Lt == "object" && Lt !== null && Lt.$$typeof === ae && Hp(Lt) === Ut.type) {
                      v(me, Ut.sibling), fe = R(Ut, ve.props), fe.ref = Zf(me, Ut, ve), fe.return = me, me = fe;
                      break e;
                    }
                    v(me, Ut);
                    break;
                  } else
                    f(me, Ut);
                  Ut = Ut.sibling;
                }
                ve.type === ie ? (fe = sf(ve.props.children, me.mode, nt, ve.key), fe.return = me, me = fe) : (nt = cg(ve.type, ve.key, ve.props, null, me.mode, nt), nt.ref = Zf(me, fe, ve), nt.return = me, me = nt);
              }
              return U(me);
            case G:
              e: {
                for (Ut = ve.key; fe !== null; ) {
                  if (fe.key === Ut)
                    if (fe.tag === 4 && fe.stateNode.containerInfo === ve.containerInfo && fe.stateNode.implementation === ve.implementation) {
                      v(me, fe.sibling), fe = R(fe, ve.children || []), fe.return = me, me = fe;
                      break e;
                    } else {
                      v(me, fe);
                      break;
                    }
                  else
                    f(me, fe);
                  fe = fe.sibling;
                }
                fe = Wd(ve, me.mode, nt), fe.return = me, me = fe;
              }
              return U(me);
            case ae:
              return Ut = ve._init, zr(me, fe, Ut(ve._payload), nt);
          }
          if (In(ve))
            return Et(me, fe, ve, nt);
          if (Ae(ve))
            return Rt(me, fe, ve, nt);
          Qf(me, ve);
        }
        return typeof ve == "string" && ve !== "" || typeof ve == "number" ? (ve = "" + ve, fe !== null && fe.tag === 6 ? (v(me, fe.sibling), fe = R(fe, ve), fe.return = me, me = fe) : (v(me, fe), fe = hg(ve, me.mode, nt), fe.return = me, me = fe), U(me)) : v(me, fe);
      }
      return zr;
    }
    var Ku = yy(!0), Lm = yy(!1), Jf = {}, jo = qn(Jf), tu = qn(Jf), bd = qn(Jf);
    function nu(l) {
      if (l === Jf)
        throw Error(t(174));
      return l;
    }
    function Wp(l, f) {
      switch (ii(bd, f), ii(tu, l), ii(jo, Jf), l = f.nodeType, l) {
        case 9:
        case 11:
          f = (f = f.documentElement) ? f.namespaceURI : ci(null, "");
          break;
        default:
          l = l === 8 ? f.parentNode : f, f = l.namespaceURI || null, l = l.tagName, f = ci(f, l);
      }
      At(jo), ii(jo, f);
    }
    function eh() {
      At(jo), At(tu), At(bd);
    }
    function wd(l) {
      nu(bd.current);
      var f = nu(jo.current), v = ci(f, l.type);
      f !== v && (ii(tu, l), ii(jo, v));
    }
    function Ft(l) {
      tu.current === l && (At(jo), At(tu));
    }
    var Ot = qn(0);
    function Wn(l) {
      for (var f = l; f !== null; ) {
        if (f.tag === 13) {
          var v = f.memoizedState;
          if (v !== null && (v = v.dehydrated, v === null || v.data === "$?" || v.data === "$!"))
            return f;
        } else if (f.tag === 19 && f.memoizedProps.revealOrder !== void 0) {
          if (f.flags & 128)
            return f;
        } else if (f.child !== null) {
          f.child.return = f, f = f.child;
          continue;
        }
        if (f === l)
          break;
        for (; f.sibling === null; ) {
          if (f.return === null || f.return === l)
            return null;
          f = f.return;
        }
        f.sibling.return = f.return, f = f.sibling;
      }
      return null;
    }
    var sr = [];
    function lo() {
      for (var l = 0; l < sr.length; l++)
        sr[l]._workInProgressVersionPrimary = null;
      sr.length = 0;
    }
    var Vc = V.ReactCurrentDispatcher, mn = V.ReactCurrentBatchConfig, Hc = 0, pr = null, Ji = null, je = null, Pr = !1, Bt = !1, kr = 0, iu = 0;
    function er() {
      throw Error(t(321));
    }
    function _s(l, f) {
      if (f === null)
        return !1;
      for (var v = 0; v < f.length && v < l.length; v++)
        if (!xe(l[v], f[v]))
          return !1;
      return !0;
    }
    function Zu(l, f, v, x, R, L) {
      if (Hc = L, pr = f, f.memoizedState = null, f.updateQueue = null, f.lanes = 0, Vc.current = l === null || l.memoizedState === null ? Dd : L_, l = v(x, R), Bt) {
        L = 0;
        do {
          if (Bt = !1, kr = 0, 25 <= L)
            throw Error(t(301));
          L += 1, je = Ji = null, f.updateQueue = null, Vc.current = _y, l = v(x, R);
        } while (Bt);
      }
      if (Vc.current = su, f = Ji !== null && Ji.next !== null, Hc = 0, je = Ji = pr = null, Pr = !1, f)
        throw Error(t(300));
      return l;
    }
    function ru() {
      var l = kr !== 0;
      return kr = 0, l;
    }
    function $i() {
      var l = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
      return je === null ? pr.memoizedState = je = l : je = je.next = l, je;
    }
    function Fr() {
      if (Ji === null) {
        var l = pr.alternate;
        l = l !== null ? l.memoizedState : null;
      } else
        l = Ji.next;
      var f = je === null ? pr.memoizedState : je.next;
      if (f !== null)
        je = f, Ji = l;
      else {
        if (l === null)
          throw Error(t(310));
        Ji = l, l = { memoizedState: Ji.memoizedState, baseState: Ji.baseState, baseQueue: Ji.baseQueue, queue: Ji.queue, next: null }, je === null ? pr.memoizedState = je = l : je = je.next = l;
      }
      return je;
    }
    function au(l, f) {
      return typeof f == "function" ? f(l) : f;
    }
    function th(l) {
      var f = Fr(), v = f.queue;
      if (v === null)
        throw Error(t(311));
      v.lastRenderedReducer = l;
      var x = Ji, R = x.baseQueue, L = v.pending;
      if (L !== null) {
        if (R !== null) {
          var U = R.next;
          R.next = L.next, L.next = U;
        }
        x.baseQueue = R = L, v.pending = null;
      }
      if (R !== null) {
        L = R.next, x = x.baseState;
        var J = U = null, oe = null, be = L;
        do {
          var Ge = be.lane;
          if ((Hc & Ge) === Ge)
            oe !== null && (oe = oe.next = { lane: 0, action: be.action, hasEagerState: be.hasEagerState, eagerState: be.eagerState, next: null }), x = be.hasEagerState ? be.eagerState : l(x, be.action);
          else {
            var Ke = {
              lane: Ge,
              action: be.action,
              hasEagerState: be.hasEagerState,
              eagerState: be.eagerState,
              next: null
            };
            oe === null ? (J = oe = Ke, U = x) : oe = oe.next = Ke, pr.lanes |= Ge, ac |= Ge;
          }
          be = be.next;
        } while (be !== null && be !== L);
        oe === null ? U = x : oe.next = J, xe(x, f.memoizedState) || (Na = !0), f.memoizedState = x, f.baseState = U, f.baseQueue = oe, v.lastRenderedState = x;
      }
      if (l = v.interleaved, l !== null) {
        R = l;
        do
          L = R.lane, pr.lanes |= L, ac |= L, R = R.next;
        while (R !== l);
      } else
        R === null && (v.lanes = 0);
      return [f.memoizedState, v.dispatch];
    }
    function Qu(l) {
      var f = Fr(), v = f.queue;
      if (v === null)
        throw Error(t(311));
      v.lastRenderedReducer = l;
      var x = v.dispatch, R = v.pending, L = f.memoizedState;
      if (R !== null) {
        v.pending = null;
        var U = R = R.next;
        do
          L = l(L, U.action), U = U.next;
        while (U !== R);
        xe(L, f.memoizedState) || (Na = !0), f.memoizedState = L, f.baseQueue === null && (f.baseState = L), v.lastRenderedState = L;
      }
      return [L, x];
    }
    function Cd() {
    }
    function nh(l, f) {
      var v = pr, x = Fr(), R = f(), L = !xe(x.memoizedState, R);
      if (L && (x.memoizedState = R, Na = !0), x = x.queue, Md(rh.bind(null, v, x, l), [l]), x.getSnapshot !== f || L || je !== null && je.memoizedState.tag & 1) {
        if (v.flags |= 2048, Ju(9, ih.bind(null, v, x, R, f), void 0, null), Tr === null)
          throw Error(t(349));
        Hc & 30 || Td(v, f, R);
      }
      return R;
    }
    function Td(l, f, v) {
      l.flags |= 16384, l = { getSnapshot: f, value: v }, f = pr.updateQueue, f === null ? (f = { lastEffect: null, stores: null }, pr.updateQueue = f, f.stores = [l]) : (v = f.stores, v === null ? f.stores = [l] : v.push(l));
    }
    function ih(l, f, v, x) {
      f.value = v, f.getSnapshot = x, Uo(f) && Gp(l);
    }
    function rh(l, f, v) {
      return v(function() {
        Uo(f) && Gp(l);
      });
    }
    function Uo(l) {
      var f = l.getSnapshot;
      l = l.value;
      try {
        var v = f();
        return !xe(l, v);
      } catch {
        return !0;
      }
    }
    function Gp(l) {
      var f = ko(l, 1);
      f !== null && vr(f, l, 1, -1);
    }
    function zo(l) {
      var f = $i();
      return typeof l == "function" && (l = l()), f.memoizedState = f.baseState = l, l = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: au, lastRenderedState: l }, f.queue = l, l = l.dispatch = Nd.bind(null, pr, l), [f.memoizedState, l];
    }
    function Ju(l, f, v, x) {
      return l = { tag: l, create: f, destroy: v, deps: x, next: null }, f = pr.updateQueue, f === null ? (f = { lastEffect: null, stores: null }, pr.updateQueue = f, f.lastEffect = l.next = l) : (v = f.lastEffect, v === null ? f.lastEffect = l.next = l : (x = v.next, v.next = l, l.next = x, f.lastEffect = l)), l;
    }
    function Rd() {
      return Fr().memoizedState;
    }
    function ec(l, f, v, x) {
      var R = $i();
      pr.flags |= l, R.memoizedState = Ju(1 | f, v, void 0, x === void 0 ? null : x);
    }
    function Wc(l, f, v, x) {
      var R = Fr();
      x = x === void 0 ? null : x;
      var L = void 0;
      if (Ji !== null) {
        var U = Ji.memoizedState;
        if (L = U.destroy, x !== null && _s(x, U.deps)) {
          R.memoizedState = Ju(f, v, L, x);
          return;
        }
      }
      pr.flags |= l, R.memoizedState = Ju(1 | f, v, L, x);
    }
    function Gc(l, f) {
      return ec(8390656, 8, l, f);
    }
    function Md(l, f) {
      return Wc(2048, 8, l, f);
    }
    function Od(l, f) {
      return Wc(4, 2, l, f);
    }
    function Ad(l, f) {
      return Wc(4, 4, l, f);
    }
    function Yp(l, f) {
      if (typeof f == "function")
        return l = l(), f(l), function() {
          f(null);
        };
      if (f != null)
        return l = l(), f.current = l, function() {
          f.current = null;
        };
    }
    function qp(l, f, v) {
      return v = v != null ? v.concat([l]) : null, Wc(4, 4, Yp.bind(null, f, l), v);
    }
    function tc() {
    }
    function La(l, f) {
      var v = Fr();
      f = f === void 0 ? null : f;
      var x = v.memoizedState;
      return x !== null && f !== null && _s(f, x[1]) ? x[0] : (v.memoizedState = [l, f], l);
    }
    function Xa(l, f) {
      var v = Fr();
      f = f === void 0 ? null : f;
      var x = v.memoizedState;
      return x !== null && f !== null && _s(f, x[1]) ? x[0] : (l = l(), v.memoizedState = [l, f], l);
    }
    function nc(l, f, v) {
      return Hc & 21 ? (xe(v, f) || (v = Au(), pr.lanes |= v, ac |= v, l.baseState = !0), f) : (l.baseState && (l.baseState = !1, Na = !0), l.memoizedState = v);
    }
    function Fs(l, f) {
      var v = Rn;
      Rn = v !== 0 && 4 > v ? v : 4, l(!0);
      var x = mn.transition;
      mn.transition = {};
      try {
        l(!1), f();
      } finally {
        Rn = v, mn.transition = x;
      }
    }
    function Ld() {
      return Fr().memoizedState;
    }
    function oi(l, f, v) {
      var x = hu(l);
      if (v = { lane: x, action: v, hasEagerState: !1, eagerState: null, next: null }, ah(l))
        sh(f, v);
      else if (v = Aa(l, f, v, x), v !== null) {
        var R = ca();
        vr(v, l, x, R), oh(v, f, x);
      }
    }
    function Nd(l, f, v) {
      var x = hu(l), R = { lane: x, action: v, hasEagerState: !1, eagerState: null, next: null };
      if (ah(l))
        sh(f, R);
      else {
        var L = l.alternate;
        if (l.lanes === 0 && (L === null || L.lanes === 0) && (L = f.lastRenderedReducer, L !== null))
          try {
            var U = f.lastRenderedState, J = L(U, v);
            if (R.hasEagerState = !0, R.eagerState = J, xe(J, U)) {
              var oe = f.interleaved;
              oe === null ? (R.next = R, ys(f)) : (R.next = oe.next, oe.next = R), f.interleaved = R;
              return;
            }
          } catch {
          } finally {
          }
        v = Aa(l, f, R, x), v !== null && (R = ca(), vr(v, l, x, R), oh(v, f, x));
      }
    }
    function ah(l) {
      var f = l.alternate;
      return l === pr || f !== null && f === pr;
    }
    function sh(l, f) {
      Bt = Pr = !0;
      var v = l.pending;
      v === null ? f.next = f : (f.next = v.next, v.next = f), l.pending = f;
    }
    function oh(l, f, v) {
      if (v & 4194240) {
        var x = f.lanes;
        x &= l.pendingLanes, v |= x, f.lanes = v, wc(l, v);
      }
    }
    var su = { readContext: rt, useCallback: er, useContext: er, useEffect: er, useImperativeHandle: er, useInsertionEffect: er, useLayoutEffect: er, useMemo: er, useReducer: er, useRef: er, useState: er, useDebugValue: er, useDeferredValue: er, useTransition: er, useMutableSource: er, useSyncExternalStore: er, useId: er, unstable_isNewReconciler: !1 }, Dd = { readContext: rt, useCallback: function(l, f) {
      return $i().memoizedState = [l, f === void 0 ? null : f], l;
    }, useContext: rt, useEffect: Gc, useImperativeHandle: function(l, f, v) {
      return v = v != null ? v.concat([l]) : null, ec(
        4194308,
        4,
        Yp.bind(null, f, l),
        v
      );
    }, useLayoutEffect: function(l, f) {
      return ec(4194308, 4, l, f);
    }, useInsertionEffect: function(l, f) {
      return ec(4, 2, l, f);
    }, useMemo: function(l, f) {
      var v = $i();
      return f = f === void 0 ? null : f, l = l(), v.memoizedState = [l, f], l;
    }, useReducer: function(l, f, v) {
      var x = $i();
      return f = v !== void 0 ? v(f) : f, x.memoizedState = x.baseState = f, l = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: l, lastRenderedState: f }, x.queue = l, l = l.dispatch = oi.bind(null, pr, l), [x.memoizedState, l];
    }, useRef: function(l) {
      var f = $i();
      return l = { current: l }, f.memoizedState = l;
    }, useState: zo, useDebugValue: tc, useDeferredValue: function(l) {
      return $i().memoizedState = l;
    }, useTransition: function() {
      var l = zo(!1), f = l[0];
      return l = Fs.bind(null, l[1]), $i().memoizedState = l, [f, l];
    }, useMutableSource: function() {
    }, useSyncExternalStore: function(l, f, v) {
      var x = pr, R = $i();
      if (zi) {
        if (v === void 0)
          throw Error(t(407));
        v = v();
      } else {
        if (v = f(), Tr === null)
          throw Error(t(349));
        Hc & 30 || Td(x, f, v);
      }
      R.memoizedState = v;
      var L = { value: v, getSnapshot: f };
      return R.queue = L, Gc(rh.bind(
        null,
        x,
        L,
        l
      ), [l]), x.flags |= 2048, Ju(9, ih.bind(null, x, L, v, f), void 0, null), v;
    }, useId: function() {
      var l = $i(), f = Tr.identifierPrefix;
      if (zi) {
        var v = ua, x = Ya;
        v = (x & ~(1 << 32 - $a(x) - 1)).toString(32) + v, f = ":" + f + "R" + v, v = kr++, 0 < v && (f += "H" + v.toString(32)), f += ":";
      } else
        v = iu++, f = ":" + f + "r" + v.toString(32) + ":";
      return l.memoizedState = f;
    }, unstable_isNewReconciler: !1 }, L_ = {
      readContext: rt,
      useCallback: La,
      useContext: rt,
      useEffect: Md,
      useImperativeHandle: qp,
      useInsertionEffect: Od,
      useLayoutEffect: Ad,
      useMemo: Xa,
      useReducer: th,
      useRef: Rd,
      useState: function() {
        return th(au);
      },
      useDebugValue: tc,
      useDeferredValue: function(l) {
        var f = Fr();
        return nc(f, Ji.memoizedState, l);
      },
      useTransition: function() {
        var l = th(au)[0], f = Fr().memoizedState;
        return [l, f];
      },
      useMutableSource: Cd,
      useSyncExternalStore: nh,
      useId: Ld,
      unstable_isNewReconciler: !1
    }, _y = { readContext: rt, useCallback: La, useContext: rt, useEffect: Md, useImperativeHandle: qp, useInsertionEffect: Od, useLayoutEffect: Ad, useMemo: Xa, useReducer: Qu, useRef: Rd, useState: function() {
      return Qu(au);
    }, useDebugValue: tc, useDeferredValue: function(l) {
      var f = Fr();
      return Ji === null ? f.memoizedState = l : nc(f, Ji.memoizedState, l);
    }, useTransition: function() {
      var l = Qu(au)[0], f = Fr().memoizedState;
      return [l, f];
    }, useMutableSource: Cd, useSyncExternalStore: nh, useId: Ld, unstable_isNewReconciler: !1 };
    function ou(l, f) {
      try {
        var v = "", x = f;
        do
          v += De(x), x = x.return;
        while (x);
        var R = v;
      } catch (L) {
        R = `
Error generating stack: ` + L.message + `
` + L.stack;
      }
      return { value: l, source: f, stack: R, digest: null };
    }
    function lh(l, f, v) {
      return { value: l, source: null, stack: v ?? null, digest: f ?? null };
    }
    function uh(l, f) {
      try {
        console.error(f.value);
      } catch (v) {
        setTimeout(function() {
          throw v;
        });
      }
    }
    var Id = typeof WeakMap == "function" ? WeakMap : Map;
    function Xp(l, f, v) {
      v = wi(-1, v), v.tag = 3, v.payload = { element: null };
      var x = f.value;
      return v.callback = function() {
        ig || (ig = !0, Um = x), uh(l, f);
      }, v;
    }
    function Pd(l, f, v) {
      v = wi(-1, v), v.tag = 3;
      var x = l.type.getDerivedStateFromError;
      if (typeof x == "function") {
        var R = f.value;
        v.payload = function() {
          return x(R);
        }, v.callback = function() {
          uh(l, f);
        };
      }
      var L = l.stateNode;
      return L !== null && typeof L.componentDidCatch == "function" && (v.callback = function() {
        uh(l, f), typeof x != "function" && (po === null ? po = /* @__PURE__ */ new Set([this]) : po.add(this));
        var U = f.stack;
        this.componentDidCatch(f.value, { componentStack: U !== null ? U : "" });
      }), v;
    }
    function kd(l, f, v) {
      var x = l.pingCache;
      if (x === null) {
        x = l.pingCache = new Id();
        var R = /* @__PURE__ */ new Set();
        x.set(f, R);
      } else
        R = x.get(f), R === void 0 && (R = /* @__PURE__ */ new Set(), x.set(f, R));
      R.has(v) || (R.add(v), l = j_.bind(null, l, f, v), f.then(l, l));
    }
    function Nm(l) {
      do {
        var f;
        if ((f = l.tag === 13) && (f = l.memoizedState, f = f !== null ? f.dehydrated !== null : !0), f)
          return l;
        l = l.return;
      } while (l !== null);
      return null;
    }
    function ch(l, f, v, x, R) {
      return l.mode & 1 ? (l.flags |= 65536, l.lanes = R, l) : (l === f ? l.flags |= 65536 : (l.flags |= 128, v.flags |= 131072, v.flags &= -52805, v.tag === 1 && (v.alternate === null ? v.tag = 17 : (f = wi(-1, 1), f.tag = 2, qu(v, f, 1))), v.lanes |= 1), l);
    }
    var Dm = V.ReactCurrentOwner, Na = !1;
    function jr(l, f, v, x) {
      f.child = l === null ? Lm(f, null, v, x) : Ku(f, l.child, v, x);
    }
    function Yc(l, f, v, x, R) {
      v = v.render;
      var L = f.ref;
      return dr(f, R), x = Zu(l, f, v, x, L, R), v = ru(), l !== null && !Na ? (f.updateQueue = l.updateQueue, f.flags &= -2053, l.lanes &= ~R, Cr(l, f, R)) : (zi && v && Xf(f), f.flags |= 1, jr(l, f, x, R), f.child);
    }
    function Da(l, f, v, x, R) {
      if (l === null) {
        var L = v.type;
        return typeof L == "function" && !Wm(L) && L.defaultProps === void 0 && v.compare === null && v.defaultProps === void 0 ? (f.tag = 15, f.type = L, Fd(l, f, L, x, R)) : (l = cg(v.type, null, x, f, f.mode, R), l.ref = f.ref, l.return = f, f.child = l);
      }
      if (L = l.child, !(l.lanes & R)) {
        var U = L.memoizedProps;
        if (v = v.compare, v = v !== null ? v : ft, v(U, x) && l.ref === f.ref)
          return Cr(l, f, R);
      }
      return f.flags |= 1, l = uc(L, x), l.ref = f.ref, l.return = f, f.child = l;
    }
    function Fd(l, f, v, x, R) {
      if (l !== null) {
        var L = l.memoizedProps;
        if (ft(L, x) && l.ref === f.ref)
          if (Na = !1, f.pendingProps = x = L, (l.lanes & R) !== 0)
            l.flags & 131072 && (Na = !0);
          else
            return f.lanes = l.lanes, Cr(l, f, R);
      }
      return an(l, f, v, x, R);
    }
    function Ka(l, f, v) {
      var x = f.pendingProps, R = x.children, L = l !== null ? l.memoizedState : null;
      if (x.mode === "hidden")
        if (!(f.mode & 1))
          f.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, ii(gh, Ss), Ss |= v;
        else {
          if (!(v & 1073741824))
            return l = L !== null ? L.baseLanes | v : v, f.lanes = f.childLanes = 1073741824, f.memoizedState = { baseLanes: l, cachePool: null, transitions: null }, f.updateQueue = null, ii(gh, Ss), Ss |= l, null;
          f.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, x = L !== null ? L.baseLanes : v, ii(gh, Ss), Ss |= x;
        }
      else
        L !== null ? (x = L.baseLanes | v, f.memoizedState = null) : x = v, ii(gh, Ss), Ss |= x;
      return jr(l, f, R, v), f.child;
    }
    function qc(l, f) {
      var v = f.ref;
      (l === null && v !== null || l !== null && l.ref !== v) && (f.flags |= 512, f.flags |= 2097152);
    }
    function an(l, f, v, x, R) {
      var L = Xr(v) ? hr : oa.current;
      return L = Ps(f, L), dr(f, R), v = Zu(l, f, v, x, L, R), x = ru(), l !== null && !Na ? (f.updateQueue = l.updateQueue, f.flags &= -2053, l.lanes &= ~R, Cr(l, f, R)) : (zi && x && Xf(f), f.flags |= 1, jr(l, f, v, R), f.child);
    }
    function jd(l, f, v, x, R) {
      if (Xr(v)) {
        var L = !0;
        Ga(f);
      } else
        L = !1;
      if (dr(f, R), f.stateNode === null)
        Kc(l, f), Om(f, v, x), Am(f, v, x, R), x = !0;
      else if (l === null) {
        var U = f.stateNode, J = f.memoizedProps;
        U.props = J;
        var oe = U.context, be = v.contextType;
        typeof be == "object" && be !== null ? be = rt(be) : (be = Xr(v) ? hr : oa.current, be = Ps(f, be));
        var Ge = v.getDerivedStateFromProps, Ke = typeof Ge == "function" || typeof U.getSnapshotBeforeUpdate == "function";
        Ke || typeof U.UNSAFE_componentWillReceiveProps != "function" && typeof U.componentWillReceiveProps != "function" || (J !== x || oe !== be) && vy(f, U, x, be), Yu = !1;
        var Ve = f.memoizedState;
        U.state = Ve, xd(f, x, U, R), oe = f.memoizedState, J !== x || Ve !== oe || tn.current || Yu ? (typeof Ge == "function" && (Mm(f, v, Ge, x), oe = f.memoizedState), (J = Yu || Vp(f, v, J, x, Ve, oe, be)) ? (Ke || typeof U.UNSAFE_componentWillMount != "function" && typeof U.componentWillMount != "function" || (typeof U.componentWillMount == "function" && U.componentWillMount(), typeof U.UNSAFE_componentWillMount == "function" && U.UNSAFE_componentWillMount()), typeof U.componentDidMount == "function" && (f.flags |= 4194308)) : (typeof U.componentDidMount == "function" && (f.flags |= 4194308), f.memoizedProps = x, f.memoizedState = oe), U.props = x, U.state = oe, U.context = be, x = J) : (typeof U.componentDidMount == "function" && (f.flags |= 4194308), x = !1);
      } else {
        U = f.stateNode, my(l, f), J = f.memoizedProps, be = f.type === f.elementType ? J : vs(f.type, J), U.props = be, Ke = f.pendingProps, Ve = U.context, oe = v.contextType, typeof oe == "object" && oe !== null ? oe = rt(oe) : (oe = Xr(v) ? hr : oa.current, oe = Ps(f, oe));
        var ht = v.getDerivedStateFromProps;
        (Ge = typeof ht == "function" || typeof U.getSnapshotBeforeUpdate == "function") || typeof U.UNSAFE_componentWillReceiveProps != "function" && typeof U.componentWillReceiveProps != "function" || (J !== Ke || Ve !== oe) && vy(f, U, x, oe), Yu = !1, Ve = f.memoizedState, U.state = Ve, xd(f, x, U, R);
        var Et = f.memoizedState;
        J !== Ke || Ve !== Et || tn.current || Yu ? (typeof ht == "function" && (Mm(f, v, ht, x), Et = f.memoizedState), (be = Yu || Vp(f, v, be, x, Ve, Et, oe) || !1) ? (Ge || typeof U.UNSAFE_componentWillUpdate != "function" && typeof U.componentWillUpdate != "function" || (typeof U.componentWillUpdate == "function" && U.componentWillUpdate(x, Et, oe), typeof U.UNSAFE_componentWillUpdate == "function" && U.UNSAFE_componentWillUpdate(x, Et, oe)), typeof U.componentDidUpdate == "function" && (f.flags |= 4), typeof U.getSnapshotBeforeUpdate == "function" && (f.flags |= 1024)) : (typeof U.componentDidUpdate != "function" || J === l.memoizedProps && Ve === l.memoizedState || (f.flags |= 4), typeof U.getSnapshotBeforeUpdate != "function" || J === l.memoizedProps && Ve === l.memoizedState || (f.flags |= 1024), f.memoizedProps = x, f.memoizedState = Et), U.props = x, U.state = Et, U.context = oe, x = be) : (typeof U.componentDidUpdate != "function" || J === l.memoizedProps && Ve === l.memoizedState || (f.flags |= 4), typeof U.getSnapshotBeforeUpdate != "function" || J === l.memoizedProps && Ve === l.memoizedState || (f.flags |= 1024), x = !1);
      }
      return Kp(l, f, v, x, L, R);
    }
    function Kp(l, f, v, x, R, L) {
      qc(l, f);
      var U = (f.flags & 128) !== 0;
      if (!x && !U)
        return R && py(f, v, !1), Cr(l, f, L);
      x = f.stateNode, Dm.current = f;
      var J = U && typeof v.getDerivedStateFromError != "function" ? null : x.render();
      return f.flags |= 1, l !== null && U ? (f.child = Ku(f, l.child, null, L), f.child = Ku(f, null, J, L)) : jr(l, f, J, L), f.memoizedState = x.state, R && py(f, v, !0), f.child;
    }
    function lu(l) {
      var f = l.stateNode;
      f.pendingContext ? hl(l, f.pendingContext, f.pendingContext !== f.context) : f.context && hl(l, f.context, !1), Wp(l, f.containerInfo);
    }
    function Zp(l, f, v, x, R) {
      return pl(), Di(R), f.flags |= 256, jr(l, f, v, x), f.child;
    }
    var Xc = { dehydrated: null, treeContext: null, retryLane: 0 };
    function uu(l) {
      return { baseLanes: l, cachePool: null, transitions: null };
    }
    function Ud(l, f, v) {
      var x = f.pendingProps, R = Ot.current, L = !1, U = (f.flags & 128) !== 0, J;
      if ((J = U) || (J = l !== null && l.memoizedState === null ? !1 : (R & 2) !== 0), J ? (L = !0, f.flags &= -129) : (l === null || l.memoizedState !== null) && (R |= 1), ii(Ot, R & 1), l === null)
        return qa(f), l = f.memoizedState, l !== null && (l = l.dehydrated, l !== null) ? (f.mode & 1 ? l.data === "$!" ? f.lanes = 8 : f.lanes = 1073741824 : f.lanes = 1, null) : (U = x.children, l = x.fallback, L ? (x = f.mode, L = f.child, U = { mode: "hidden", children: U }, !(x & 1) && L !== null ? (L.childLanes = 0, L.pendingProps = U) : L = fg(U, x, 0, null), l = sf(l, x, v, null), L.return = f, l.return = f, L.sibling = l, f.child = L, f.child.memoizedState = uu(v), f.memoizedState = Xc, l) : cu(f, U));
      if (R = l.memoizedState, R !== null && (J = R.dehydrated, J !== null))
        return fh(l, f, U, x, J, R, v);
      if (L) {
        L = x.fallback, U = f.mode, R = l.child, J = R.sibling;
        var oe = { mode: "hidden", children: x.children };
        return !(U & 1) && f.child !== R ? (x = f.child, x.childLanes = 0, x.pendingProps = oe, f.deletions = null) : (x = uc(R, oe), x.subtreeFlags = R.subtreeFlags & 14680064), J !== null ? L = uc(J, L) : (L = sf(L, U, v, null), L.flags |= 2), L.return = f, x.return = f, x.sibling = L, f.child = x, x = L, L = f.child, U = l.child.memoizedState, U = U === null ? uu(v) : { baseLanes: U.baseLanes | v, cachePool: null, transitions: U.transitions }, L.memoizedState = U, L.childLanes = l.childLanes & ~v, f.memoizedState = Xc, x;
      }
      return L = l.child, l = L.sibling, x = uc(L, { mode: "visible", children: x.children }), !(f.mode & 1) && (x.lanes = v), x.return = f, x.sibling = null, l !== null && (v = f.deletions, v === null ? (f.deletions = [l], f.flags |= 16) : v.push(l)), f.child = x, f.memoizedState = null, x;
    }
    function cu(l, f) {
      return f = fg({ mode: "visible", children: f }, l.mode, 0, null), f.return = l, l.child = f;
    }
    function jt(l, f, v, x) {
      return x !== null && Di(x), Ku(f, l.child, null, v), l = cu(f, f.pendingProps.children), l.flags |= 2, f.memoizedState = null, l;
    }
    function fh(l, f, v, x, R, L, U) {
      if (v)
        return f.flags & 256 ? (f.flags &= -257, x = lh(Error(t(422))), jt(l, f, U, x)) : f.memoizedState !== null ? (f.child = l.child, f.flags |= 128, null) : (L = x.fallback, R = f.mode, x = fg({ mode: "visible", children: x.children }, R, 0, null), L = sf(L, R, U, null), L.flags |= 2, x.return = f, L.return = f, x.sibling = L, f.child = x, f.mode & 1 && Ku(f, l.child, null, U), f.child.memoizedState = uu(U), f.memoizedState = Xc, L);
      if (!(f.mode & 1))
        return jt(l, f, U, null);
      if (R.data === "$!") {
        if (x = R.nextSibling && R.nextSibling.dataset, x)
          var J = x.dgst;
        return x = J, L = Error(t(419)), x = lh(L, x, void 0), jt(l, f, U, x);
      }
      if (J = (U & l.childLanes) !== 0, Na || J) {
        if (x = Tr, x !== null) {
          switch (U & -U) {
            case 4:
              R = 2;
              break;
            case 16:
              R = 8;
              break;
            case 64:
            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:
            case 4194304:
            case 8388608:
            case 16777216:
            case 33554432:
            case 67108864:
              R = 32;
              break;
            case 536870912:
              R = 268435456;
              break;
            default:
              R = 0;
          }
          R = R & (x.suspendedLanes | U) ? 0 : R, R !== 0 && R !== L.retryLane && (L.retryLane = R, ko(l, R), vr(x, l, R, -1));
        }
        return Hd(), x = lh(Error(t(421))), jt(l, f, U, x);
      }
      return R.data === "$?" ? (f.flags |= 128, f.child = l.child, f = Hm.bind(null, l), R._reactRetry = f, null) : (l = L.treeContext, ks = Is(R.nextSibling), Oa = f, zi = !0, oo = null, l !== null && (gs[ms++] = Ya, gs[ms++] = ua, gs[ms++] = Io, Ya = l.id, ua = l.overflow, Io = f), f = cu(f, x.children), f.flags |= 4096, f);
    }
    function Qp(l, f, v) {
      l.lanes |= f;
      var x = l.alternate;
      x !== null && (x.lanes |= f), _a(l.return, f, v);
    }
    function ml(l, f, v, x, R) {
      var L = l.memoizedState;
      L === null ? l.memoizedState = { isBackwards: f, rendering: null, renderingStartTime: 0, last: x, tail: v, tailMode: R } : (L.isBackwards = f, L.rendering = null, L.renderingStartTime = 0, L.last = x, L.tail = v, L.tailMode = R);
    }
    function Im(l, f, v) {
      var x = f.pendingProps, R = x.revealOrder, L = x.tail;
      if (jr(l, f, x.children, v), x = Ot.current, x & 2)
        x = x & 1 | 2, f.flags |= 128;
      else {
        if (l !== null && l.flags & 128)
          e:
            for (l = f.child; l !== null; ) {
              if (l.tag === 13)
                l.memoizedState !== null && Qp(l, v, f);
              else if (l.tag === 19)
                Qp(l, v, f);
              else if (l.child !== null) {
                l.child.return = l, l = l.child;
                continue;
              }
              if (l === f)
                break e;
              for (; l.sibling === null; ) {
                if (l.return === null || l.return === f)
                  break e;
                l = l.return;
              }
              l.sibling.return = l.return, l = l.sibling;
            }
        x &= 1;
      }
      if (ii(Ot, x), !(f.mode & 1))
        f.memoizedState = null;
      else
        switch (R) {
          case "forwards":
            for (v = f.child, R = null; v !== null; )
              l = v.alternate, l !== null && Wn(l) === null && (R = v), v = v.sibling;
            v = R, v === null ? (R = f.child, f.child = null) : (R = v.sibling, v.sibling = null), ml(f, !1, R, v, L);
            break;
          case "backwards":
            for (v = null, R = f.child, f.child = null; R !== null; ) {
              if (l = R.alternate, l !== null && Wn(l) === null) {
                f.child = R;
                break;
              }
              l = R.sibling, R.sibling = v, v = R, R = l;
            }
            ml(f, !0, v, null, L);
            break;
          case "together":
            ml(f, !1, null, null, void 0);
            break;
          default:
            f.memoizedState = null;
        }
      return f.child;
    }
    function Kc(l, f) {
      !(f.mode & 1) && l !== null && (l.alternate = null, f.alternate = null, f.flags |= 2);
    }
    function Cr(l, f, v) {
      if (l !== null && (f.dependencies = l.dependencies), ac |= f.lanes, !(v & f.childLanes))
        return null;
      if (l !== null && f.child !== l.child)
        throw Error(t(153));
      if (f.child !== null) {
        for (l = f.child, v = uc(l, l.pendingProps), f.child = v, v.return = f; l.sibling !== null; )
          l = l.sibling, v = v.sibling = uc(l, l.pendingProps), v.return = f;
        v.sibling = null;
      }
      return f.child;
    }
    function or(l, f, v) {
      switch (f.tag) {
        case 3:
          lu(f), pl();
          break;
        case 5:
          wd(f);
          break;
        case 1:
          Xr(f.type) && Ga(f);
          break;
        case 4:
          Wp(f, f.stateNode.containerInfo);
          break;
        case 10:
          var x = f.type._context, R = f.memoizedProps.value;
          ii(eu, x._currentValue), x._currentValue = R;
          break;
        case 13:
          if (x = f.memoizedState, x !== null)
            return x.dehydrated !== null ? (ii(Ot, Ot.current & 1), f.flags |= 128, null) : v & f.child.childLanes ? Ud(l, f, v) : (ii(Ot, Ot.current & 1), l = Cr(l, f, v), l !== null ? l.sibling : null);
          ii(Ot, Ot.current & 1);
          break;
        case 19:
          if (x = (v & f.childLanes) !== 0, l.flags & 128) {
            if (x)
              return Im(l, f, v);
            f.flags |= 128;
          }
          if (R = f.memoizedState, R !== null && (R.rendering = null, R.tail = null, R.lastEffect = null), ii(Ot, Ot.current), x)
            break;
          return null;
        case 22:
        case 23:
          return f.lanes = 0, Ka(l, f, v);
      }
      return Cr(l, f, v);
    }
    var vl, hh, Zc, uo;
    vl = function(l, f) {
      for (var v = f.child; v !== null; ) {
        if (v.tag === 5 || v.tag === 6)
          l.appendChild(v.stateNode);
        else if (v.tag !== 4 && v.child !== null) {
          v.child.return = v, v = v.child;
          continue;
        }
        if (v === f)
          break;
        for (; v.sibling === null; ) {
          if (v.return === null || v.return === f)
            return;
          v = v.return;
        }
        v.sibling.return = v.return, v = v.sibling;
      }
    }, hh = function() {
    }, Zc = function(l, f, v, x) {
      var R = l.memoizedProps;
      if (R !== x) {
        l = f.stateNode, nu(jo.current);
        var L = null;
        switch (v) {
          case "input":
            R = Pt(l, R), x = Pt(l, x), L = [];
            break;
          case "select":
            R = q({}, R, { value: void 0 }), x = q({}, x, { value: void 0 }), L = [];
            break;
          case "textarea":
            R = Pn(l, R), x = Pn(l, x), L = [];
            break;
          default:
            typeof R.onClick != "function" && typeof x.onClick == "function" && (l.onclick = Fp);
        }
        Mn(v, x);
        var U;
        v = null;
        for (be in R)
          if (!x.hasOwnProperty(be) && R.hasOwnProperty(be) && R[be] != null)
            if (be === "style") {
              var J = R[be];
              for (U in J)
                J.hasOwnProperty(U) && (v || (v = {}), v[U] = "");
            } else
              be !== "dangerouslySetInnerHTML" && be !== "children" && be !== "suppressContentEditableWarning" && be !== "suppressHydrationWarning" && be !== "autoFocus" && (a.hasOwnProperty(be) ? L || (L = []) : (L = L || []).push(be, null));
        for (be in x) {
          var oe = x[be];
          if (J = R != null ? R[be] : void 0, x.hasOwnProperty(be) && oe !== J && (oe != null || J != null))
            if (be === "style")
              if (J) {
                for (U in J)
                  !J.hasOwnProperty(U) || oe && oe.hasOwnProperty(U) || (v || (v = {}), v[U] = "");
                for (U in oe)
                  oe.hasOwnProperty(U) && J[U] !== oe[U] && (v || (v = {}), v[U] = oe[U]);
              } else
                v || (L || (L = []), L.push(
                  be,
                  v
                )), v = oe;
            else
              be === "dangerouslySetInnerHTML" ? (oe = oe ? oe.__html : void 0, J = J ? J.__html : void 0, oe != null && J !== oe && (L = L || []).push(be, oe)) : be === "children" ? typeof oe != "string" && typeof oe != "number" || (L = L || []).push(be, "" + oe) : be !== "suppressContentEditableWarning" && be !== "suppressHydrationWarning" && (a.hasOwnProperty(be) ? (oe != null && be === "onScroll" && Ni("scroll", l), L || J === oe || (L = [])) : (L = L || []).push(be, oe));
        }
        v && (L = L || []).push("style", v);
        var be = L;
        (f.updateQueue = be) && (f.flags |= 4);
      }
    }, uo = function(l, f, v, x) {
      v !== x && (f.flags |= 4);
    };
    function gr(l, f) {
      if (!zi)
        switch (l.tailMode) {
          case "hidden":
            f = l.tail;
            for (var v = null; f !== null; )
              f.alternate !== null && (v = f), f = f.sibling;
            v === null ? l.tail = null : v.sibling = null;
            break;
          case "collapsed":
            v = l.tail;
            for (var x = null; v !== null; )
              v.alternate !== null && (x = v), v = v.sibling;
            x === null ? f || l.tail === null ? l.tail = null : l.tail.sibling = null : x.sibling = null;
        }
    }
    function Ia(l) {
      var f = l.alternate !== null && l.alternate.child === l.child, v = 0, x = 0;
      if (f)
        for (var R = l.child; R !== null; )
          v |= R.lanes | R.childLanes, x |= R.subtreeFlags & 14680064, x |= R.flags & 14680064, R.return = l, R = R.sibling;
      else
        for (R = l.child; R !== null; )
          v |= R.lanes | R.childLanes, x |= R.subtreeFlags, x |= R.flags, R.return = l, R = R.sibling;
      return l.subtreeFlags |= x, l.childLanes = v, f;
    }
    function N_(l, f, v) {
      var x = f.pendingProps;
      switch (Gu(f), f.tag) {
        case 2:
        case 16:
        case 15:
        case 0:
        case 11:
        case 7:
        case 8:
        case 12:
        case 9:
        case 14:
          return Ia(f), null;
        case 1:
          return Xr(f.type) && ps(), Ia(f), null;
        case 3:
          return x = f.stateNode, eh(), At(tn), At(oa), lo(), x.pendingContext && (x.context = x.pendingContext, x.pendingContext = null), (l === null || l.child === null) && (Ed(f) ? f.flags |= 4 : l === null || l.memoizedState.isDehydrated && !(f.flags & 256) || (f.flags |= 1024, oo !== null && (zm(oo), oo = null))), hh(l, f), Ia(f), null;
        case 5:
          Ft(f);
          var R = nu(bd.current);
          if (v = f.type, l !== null && f.stateNode != null)
            Zc(l, f, v, x, R), l.ref !== f.ref && (f.flags |= 512, f.flags |= 2097152);
          else {
            if (!x) {
              if (f.stateNode === null)
                throw Error(t(166));
              return Ia(f), null;
            }
            if (l = nu(jo.current), Ed(f)) {
              x = f.stateNode, v = f.type;
              var L = f.memoizedProps;
              switch (x[no] = f, x[$u] = L, l = (f.mode & 1) !== 0, v) {
                case "dialog":
                  Ni("cancel", x), Ni("close", x);
                  break;
                case "iframe":
                case "object":
                case "embed":
                  Ni("load", x);
                  break;
                case "video":
                case "audio":
                  for (R = 0; R < Ns.length; R++)
                    Ni(Ns[R], x);
                  break;
                case "source":
                  Ni("error", x);
                  break;
                case "img":
                case "image":
                case "link":
                  Ni(
                    "error",
                    x
                  ), Ni("load", x);
                  break;
                case "details":
                  Ni("toggle", x);
                  break;
                case "input":
                  Vn(x, L), Ni("invalid", x);
                  break;
                case "select":
                  x._wrapperState = { wasMultiple: !!L.multiple }, Ni("invalid", x);
                  break;
                case "textarea":
                  Qn(x, L), Ni("invalid", x);
              }
              Mn(v, L), R = null;
              for (var U in L)
                if (L.hasOwnProperty(U)) {
                  var J = L[U];
                  U === "children" ? typeof J == "string" ? x.textContent !== J && (L.suppressHydrationWarning !== !0 && Yf(x.textContent, J, l), R = ["children", J]) : typeof J == "number" && x.textContent !== "" + J && (L.suppressHydrationWarning !== !0 && Yf(
                    x.textContent,
                    J,
                    l
                  ), R = ["children", "" + J]) : a.hasOwnProperty(U) && J != null && U === "onScroll" && Ni("scroll", x);
                }
              switch (v) {
                case "input":
                  Ct(x), Si(x, L, !0);
                  break;
                case "textarea":
                  Ct(x), ui(x);
                  break;
                case "select":
                case "option":
                  break;
                default:
                  typeof L.onClick == "function" && (x.onclick = Fp);
              }
              x = R, f.updateQueue = x, x !== null && (f.flags |= 4);
            } else {
              U = R.nodeType === 9 ? R : R.ownerDocument, l === "http://www.w3.org/1999/xhtml" && (l = Mi(v)), l === "http://www.w3.org/1999/xhtml" ? v === "script" ? (l = U.createElement("div"), l.innerHTML = "<script><\/script>", l = l.removeChild(l.firstChild)) : typeof x.is == "string" ? l = U.createElement(v, { is: x.is }) : (l = U.createElement(v), v === "select" && (U = l, x.multiple ? U.multiple = !0 : x.size && (U.size = x.size))) : l = U.createElementNS(l, v), l[no] = f, l[$u] = x, vl(l, f, !1, !1), f.stateNode = l;
              e: {
                switch (U = Oi(v, x), v) {
                  case "dialog":
                    Ni("cancel", l), Ni("close", l), R = x;
                    break;
                  case "iframe":
                  case "object":
                  case "embed":
                    Ni("load", l), R = x;
                    break;
                  case "video":
                  case "audio":
                    for (R = 0; R < Ns.length; R++)
                      Ni(Ns[R], l);
                    R = x;
                    break;
                  case "source":
                    Ni("error", l), R = x;
                    break;
                  case "img":
                  case "image":
                  case "link":
                    Ni(
                      "error",
                      l
                    ), Ni("load", l), R = x;
                    break;
                  case "details":
                    Ni("toggle", l), R = x;
                    break;
                  case "input":
                    Vn(l, x), R = Pt(l, x), Ni("invalid", l);
                    break;
                  case "option":
                    R = x;
                    break;
                  case "select":
                    l._wrapperState = { wasMultiple: !!x.multiple }, R = q({}, x, { value: void 0 }), Ni("invalid", l);
                    break;
                  case "textarea":
                    Qn(l, x), R = Pn(l, x), Ni("invalid", l);
                    break;
                  default:
                    R = x;
                }
                Mn(v, R), J = R;
                for (L in J)
                  if (J.hasOwnProperty(L)) {
                    var oe = J[L];
                    L === "style" ? nn(l, oe) : L === "dangerouslySetInnerHTML" ? (oe = oe ? oe.__html : void 0, oe != null && xr(l, oe)) : L === "children" ? typeof oe == "string" ? (v !== "textarea" || oe !== "") && Wr(l, oe) : typeof oe == "number" && Wr(l, "" + oe) : L !== "suppressContentEditableWarning" && L !== "suppressHydrationWarning" && L !== "autoFocus" && (a.hasOwnProperty(L) ? oe != null && L === "onScroll" && Ni("scroll", l) : oe != null && B(l, L, oe, U));
                  }
                switch (v) {
                  case "input":
                    Ct(l), Si(l, x, !1);
                    break;
                  case "textarea":
                    Ct(l), ui(l);
                    break;
                  case "option":
                    x.value != null && l.setAttribute("value", "" + Xe(x.value));
                    break;
                  case "select":
                    l.multiple = !!x.multiple, L = x.value, L != null ? Tn(l, !!x.multiple, L, !1) : x.defaultValue != null && Tn(
                      l,
                      !!x.multiple,
                      x.defaultValue,
                      !0
                    );
                    break;
                  default:
                    typeof R.onClick == "function" && (l.onclick = Fp);
                }
                switch (v) {
                  case "button":
                  case "input":
                  case "select":
                  case "textarea":
                    x = !!x.autoFocus;
                    break e;
                  case "img":
                    x = !0;
                    break e;
                  default:
                    x = !1;
                }
              }
              x && (f.flags |= 4);
            }
            f.ref !== null && (f.flags |= 512, f.flags |= 2097152);
          }
          return Ia(f), null;
        case 6:
          if (l && f.stateNode != null)
            uo(l, f, l.memoizedProps, x);
          else {
            if (typeof x != "string" && f.stateNode === null)
              throw Error(t(166));
            if (v = nu(bd.current), nu(jo.current), Ed(f)) {
              if (x = f.stateNode, v = f.memoizedProps, x[no] = f, (L = x.nodeValue !== v) && (l = Oa, l !== null))
                switch (l.tag) {
                  case 3:
                    Yf(x.nodeValue, v, (l.mode & 1) !== 0);
                    break;
                  case 5:
                    l.memoizedProps.suppressHydrationWarning !== !0 && Yf(x.nodeValue, v, (l.mode & 1) !== 0);
                }
              L && (f.flags |= 4);
            } else
              x = (v.nodeType === 9 ? v : v.ownerDocument).createTextNode(x), x[no] = f, f.stateNode = x;
          }
          return Ia(f), null;
        case 13:
          if (At(Ot), x = f.memoizedState, l === null || l.memoizedState !== null && l.memoizedState.dehydrated !== null) {
            if (zi && ks !== null && f.mode & 1 && !(f.flags & 128))
              Cm(), pl(), f.flags |= 98560, L = !1;
            else if (L = Ed(f), x !== null && x.dehydrated !== null) {
              if (l === null) {
                if (!L)
                  throw Error(t(318));
                if (L = f.memoizedState, L = L !== null ? L.dehydrated : null, !L)
                  throw Error(t(317));
                L[no] = f;
              } else
                pl(), !(f.flags & 128) && (f.memoizedState = null), f.flags |= 4;
              Ia(f), L = !1;
            } else
              oo !== null && (zm(oo), oo = null), L = !0;
            if (!L)
              return f.flags & 65536 ? f : null;
          }
          return f.flags & 128 ? (f.lanes = v, f) : (x = x !== null, x !== (l !== null && l.memoizedState !== null) && x && (f.child.flags |= 8192, f.mode & 1 && (l === null || Ot.current & 1 ? ta === 0 && (ta = 3) : Hd())), f.updateQueue !== null && (f.flags |= 4), Ia(f), null);
        case 4:
          return eh(), hh(l, f), l === null && Ds(f.stateNode.containerInfo), Ia(f), null;
        case 10:
          return $p(f.type._context), Ia(f), null;
        case 17:
          return Xr(f.type) && ps(), Ia(f), null;
        case 19:
          if (At(Ot), L = f.memoizedState, L === null)
            return Ia(f), null;
          if (x = (f.flags & 128) !== 0, U = L.rendering, U === null)
            if (x)
              gr(L, !1);
            else {
              if (ta !== 0 || l !== null && l.flags & 128)
                for (l = f.child; l !== null; ) {
                  if (U = Wn(l), U !== null) {
                    for (f.flags |= 128, gr(L, !1), x = U.updateQueue, x !== null && (f.updateQueue = x, f.flags |= 4), f.subtreeFlags = 0, x = v, v = f.child; v !== null; )
                      L = v, l = x, L.flags &= 14680066, U = L.alternate, U === null ? (L.childLanes = 0, L.lanes = l, L.child = null, L.subtreeFlags = 0, L.memoizedProps = null, L.memoizedState = null, L.updateQueue = null, L.dependencies = null, L.stateNode = null) : (L.childLanes = U.childLanes, L.lanes = U.lanes, L.child = U.child, L.subtreeFlags = 0, L.deletions = null, L.memoizedProps = U.memoizedProps, L.memoizedState = U.memoizedState, L.updateQueue = U.updateQueue, L.type = U.type, l = U.dependencies, L.dependencies = l === null ? null : { lanes: l.lanes, firstContext: l.firstContext }), v = v.sibling;
                    return ii(Ot, Ot.current & 1 | 2), f.child;
                  }
                  l = l.sibling;
                }
              L.tail !== null && mi() > vh && (f.flags |= 128, x = !0, gr(L, !1), f.lanes = 4194304);
            }
          else {
            if (!x)
              if (l = Wn(U), l !== null) {
                if (f.flags |= 128, x = !0, v = l.updateQueue, v !== null && (f.updateQueue = v, f.flags |= 4), gr(L, !0), L.tail === null && L.tailMode === "hidden" && !U.alternate && !zi)
                  return Ia(f), null;
              } else
                2 * mi() - L.renderingStartTime > vh && v !== 1073741824 && (f.flags |= 128, x = !0, gr(L, !1), f.lanes = 4194304);
            L.isBackwards ? (U.sibling = f.child, f.child = U) : (v = L.last, v !== null ? v.sibling = U : f.child = U, L.last = U);
          }
          return L.tail !== null ? (f = L.tail, L.rendering = f, L.tail = f.sibling, L.renderingStartTime = mi(), f.sibling = null, v = Ot.current, ii(Ot, x ? v & 1 | 2 : v & 1), f) : (Ia(f), null);
        case 22:
        case 23:
          return og(), x = f.memoizedState !== null, l !== null && l.memoizedState !== null !== x && (f.flags |= 8192), x && f.mode & 1 ? Ss & 1073741824 && (Ia(f), f.subtreeFlags & 6 && (f.flags |= 8192)) : Ia(f), null;
        case 24:
          return null;
        case 25:
          return null;
      }
      throw Error(t(156, f.tag));
    }
    function D_(l, f) {
      switch (Gu(f), f.tag) {
        case 1:
          return Xr(f.type) && ps(), l = f.flags, l & 65536 ? (f.flags = l & -65537 | 128, f) : null;
        case 3:
          return eh(), At(tn), At(oa), lo(), l = f.flags, l & 65536 && !(l & 128) ? (f.flags = l & -65537 | 128, f) : null;
        case 5:
          return Ft(f), null;
        case 13:
          if (At(Ot), l = f.memoizedState, l !== null && l.dehydrated !== null) {
            if (f.alternate === null)
              throw Error(t(340));
            pl();
          }
          return l = f.flags, l & 65536 ? (f.flags = l & -65537 | 128, f) : null;
        case 19:
          return At(Ot), null;
        case 4:
          return eh(), null;
        case 10:
          return $p(f.type._context), null;
        case 22:
        case 23:
          return og(), null;
        case 24:
          return null;
        default:
          return null;
      }
    }
    var Es = !1, li = !1, dh = typeof WeakSet == "function" ? WeakSet : Set, vt = null;
    function ic(l, f) {
      var v = l.ref;
      if (v !== null)
        if (typeof v == "function")
          try {
            v(null);
          } catch (x) {
            Rr(l, f, x);
          }
        else
          v.current = null;
    }
    function Pm(l, f, v) {
      try {
        v();
      } catch (x) {
        Rr(l, f, x);
      }
    }
    var Jp = !1;
    function zd(l, f) {
      if (md = kf, l = bi(), Dc(l)) {
        if ("selectionStart" in l)
          var v = { start: l.selectionStart, end: l.selectionEnd };
        else
          e: {
            v = (v = l.ownerDocument) && v.defaultView || window;
            var x = v.getSelection && v.getSelection();
            if (x && x.rangeCount !== 0) {
              v = x.anchorNode;
              var R = x.anchorOffset, L = x.focusNode;
              x = x.focusOffset;
              try {
                v.nodeType, L.nodeType;
              } catch {
                v = null;
                break e;
              }
              var U = 0, J = -1, oe = -1, be = 0, Ge = 0, Ke = l, Ve = null;
              t:
                for (; ; ) {
                  for (var ht; Ke !== v || R !== 0 && Ke.nodeType !== 3 || (J = U + R), Ke !== L || x !== 0 && Ke.nodeType !== 3 || (oe = U + x), Ke.nodeType === 3 && (U += Ke.nodeValue.length), (ht = Ke.firstChild) !== null; )
                    Ve = Ke, Ke = ht;
                  for (; ; ) {
                    if (Ke === l)
                      break t;
                    if (Ve === v && ++be === R && (J = U), Ve === L && ++Ge === x && (oe = U), (ht = Ke.nextSibling) !== null)
                      break;
                    Ke = Ve, Ve = Ke.parentNode;
                  }
                  Ke = ht;
                }
              v = J === -1 || oe === -1 ? null : { start: J, end: oe };
            } else
              v = null;
          }
        v = v || { start: 0, end: 0 };
      } else
        v = null;
      for (jc = { focusedElem: l, selectionRange: v }, kf = !1, vt = f; vt !== null; )
        if (f = vt, l = f.child, (f.subtreeFlags & 1028) !== 0 && l !== null)
          l.return = f, vt = l;
        else
          for (; vt !== null; ) {
            f = vt;
            try {
              var Et = f.alternate;
              if (f.flags & 1024)
                switch (f.tag) {
                  case 0:
                  case 11:
                  case 15:
                    break;
                  case 1:
                    if (Et !== null) {
                      var Rt = Et.memoizedProps, zr = Et.memoizedState, me = f.stateNode, fe = me.getSnapshotBeforeUpdate(f.elementType === f.type ? Rt : vs(f.type, Rt), zr);
                      me.__reactInternalSnapshotBeforeUpdate = fe;
                    }
                    break;
                  case 3:
                    var ve = f.stateNode.containerInfo;
                    ve.nodeType === 1 ? ve.textContent = "" : ve.nodeType === 9 && ve.documentElement && ve.removeChild(ve.documentElement);
                    break;
                  case 5:
                  case 6:
                  case 4:
                  case 17:
                    break;
                  default:
                    throw Error(t(163));
                }
            } catch (nt) {
              Rr(f, f.return, nt);
            }
            if (l = f.sibling, l !== null) {
              l.return = f.return, vt = l;
              break;
            }
            vt = f.return;
          }
      return Et = Jp, Jp = !1, Et;
    }
    function Qc(l, f, v) {
      var x = f.updateQueue;
      if (x = x !== null ? x.lastEffect : null, x !== null) {
        var R = x = x.next;
        do {
          if ((R.tag & l) === l) {
            var L = R.destroy;
            R.destroy = void 0, L !== void 0 && Pm(f, v, L);
          }
          R = R.next;
        } while (R !== x);
      }
    }
    function $d(l, f) {
      if (f = f.updateQueue, f = f !== null ? f.lastEffect : null, f !== null) {
        var v = f = f.next;
        do {
          if ((v.tag & l) === l) {
            var x = v.create;
            v.destroy = x();
          }
          v = v.next;
        } while (v !== f);
      }
    }
    function eg(l) {
      var f = l.ref;
      if (f !== null) {
        var v = l.stateNode;
        switch (l.tag) {
          case 5:
            l = v;
            break;
          default:
            l = v;
        }
        typeof f == "function" ? f(l) : f.current = l;
      }
    }
    function Ey(l) {
      var f = l.alternate;
      f !== null && (l.alternate = null, Ey(f)), l.child = null, l.deletions = null, l.sibling = null, l.tag === 5 && (f = l.stateNode, f !== null && (delete f[no], delete f[$u], delete f[jp], delete f[H], delete f[qf])), l.stateNode = null, l.return = null, l.dependencies = null, l.memoizedProps = null, l.memoizedState = null, l.pendingProps = null, l.stateNode = null, l.updateQueue = null;
    }
    function km(l) {
      return l.tag === 5 || l.tag === 3 || l.tag === 4;
    }
    function Sy(l) {
      e:
        for (; ; ) {
          for (; l.sibling === null; ) {
            if (l.return === null || km(l.return))
              return null;
            l = l.return;
          }
          for (l.sibling.return = l.return, l = l.sibling; l.tag !== 5 && l.tag !== 6 && l.tag !== 18; ) {
            if (l.flags & 2 || l.child === null || l.tag === 4)
              continue e;
            l.child.return = l, l = l.child;
          }
          if (!(l.flags & 2))
            return l.stateNode;
        }
    }
    function ph(l, f, v) {
      var x = l.tag;
      if (x === 5 || x === 6)
        l = l.stateNode, f ? v.nodeType === 8 ? v.parentNode.insertBefore(l, f) : v.insertBefore(l, f) : (v.nodeType === 8 ? (f = v.parentNode, f.insertBefore(l, v)) : (f = v, f.appendChild(l)), v = v._reactRootContainer, v != null || f.onclick !== null || (f.onclick = Fp));
      else if (x !== 4 && (l = l.child, l !== null))
        for (ph(l, f, v), l = l.sibling; l !== null; )
          ph(l, f, v), l = l.sibling;
    }
    function Jc(l, f, v) {
      var x = l.tag;
      if (x === 5 || x === 6)
        l = l.stateNode, f ? v.insertBefore(l, f) : v.appendChild(l);
      else if (x !== 4 && (l = l.child, l !== null))
        for (Jc(l, f, v), l = l.sibling; l !== null; )
          Jc(l, f, v), l = l.sibling;
    }
    var lr = null, Kr = !1;
    function Pa(l, f, v) {
      for (v = v.child; v !== null; )
        yl(l, f, v), v = v.sibling;
    }
    function yl(l, f, v) {
      if (cs && typeof cs.onCommitFiberUnmount == "function")
        try {
          cs.onCommitFiberUnmount(Mu, v);
        } catch {
        }
      switch (v.tag) {
        case 5:
          li || ic(v, f);
        case 6:
          var x = lr, R = Kr;
          lr = null, Pa(l, f, v), lr = x, Kr = R, lr !== null && (Kr ? (l = lr, v = v.stateNode, l.nodeType === 8 ? l.parentNode.removeChild(v) : l.removeChild(v)) : lr.removeChild(v.stateNode));
          break;
        case 18:
          lr !== null && (Kr ? (l = lr, v = v.stateNode, l.nodeType === 8 ? bm(l.parentNode, v) : l.nodeType === 1 && bm(l, v), An(l)) : bm(lr, v.stateNode));
          break;
        case 4:
          x = lr, R = Kr, lr = v.stateNode.containerInfo, Kr = !0, Pa(l, f, v), lr = x, Kr = R;
          break;
        case 0:
        case 11:
        case 14:
        case 15:
          if (!li && (x = v.updateQueue, x !== null && (x = x.lastEffect, x !== null))) {
            R = x = x.next;
            do {
              var L = R, U = L.destroy;
              L = L.tag, U !== void 0 && (L & 2 || L & 4) && Pm(v, f, U), R = R.next;
            } while (R !== x);
          }
          Pa(l, f, v);
          break;
        case 1:
          if (!li && (ic(v, f), x = v.stateNode, typeof x.componentWillUnmount == "function"))
            try {
              x.props = v.memoizedProps, x.state = v.memoizedState, x.componentWillUnmount();
            } catch (J) {
              Rr(v, f, J);
            }
          Pa(l, f, v);
          break;
        case 21:
          Pa(l, f, v);
          break;
        case 22:
          v.mode & 1 ? (li = (x = li) || v.memoizedState !== null, Pa(l, f, v), li = x) : Pa(l, f, v);
          break;
        default:
          Pa(l, f, v);
      }
    }
    function rc(l) {
      var f = l.updateQueue;
      if (f !== null) {
        l.updateQueue = null;
        var v = l.stateNode;
        v === null && (v = l.stateNode = new dh()), f.forEach(function(x) {
          var R = U_.bind(null, l, x);
          v.has(x) || (v.add(x), x.then(R, R));
        });
      }
    }
    function Jr(l, f) {
      var v = f.deletions;
      if (v !== null)
        for (var x = 0; x < v.length; x++) {
          var R = v[x];
          try {
            var L = l, U = f, J = U;
            e:
              for (; J !== null; ) {
                switch (J.tag) {
                  case 5:
                    lr = J.stateNode, Kr = !1;
                    break e;
                  case 3:
                    lr = J.stateNode.containerInfo, Kr = !0;
                    break e;
                  case 4:
                    lr = J.stateNode.containerInfo, Kr = !0;
                    break e;
                }
                J = J.return;
              }
            if (lr === null)
              throw Error(t(160));
            yl(L, U, R), lr = null, Kr = !1;
            var oe = R.alternate;
            oe !== null && (oe.return = null), R.return = null;
          } catch (be) {
            Rr(R, f, be);
          }
        }
      if (f.subtreeFlags & 12854)
        for (f = f.child; f !== null; )
          Fm(f, l), f = f.sibling;
    }
    function Fm(l, f) {
      var v = l.alternate, x = l.flags;
      switch (l.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
          if (Jr(f, l), js(l), x & 4) {
            try {
              Qc(3, l, l.return), $d(3, l);
            } catch (Rt) {
              Rr(l, l.return, Rt);
            }
            try {
              Qc(5, l, l.return);
            } catch (Rt) {
              Rr(l, l.return, Rt);
            }
          }
          break;
        case 1:
          Jr(f, l), js(l), x & 512 && v !== null && ic(v, v.return);
          break;
        case 5:
          if (Jr(f, l), js(l), x & 512 && v !== null && ic(v, v.return), l.flags & 32) {
            var R = l.stateNode;
            try {
              Wr(R, "");
            } catch (Rt) {
              Rr(l, l.return, Rt);
            }
          }
          if (x & 4 && (R = l.stateNode, R != null)) {
            var L = l.memoizedProps, U = v !== null ? v.memoizedProps : L, J = l.type, oe = l.updateQueue;
            if (l.updateQueue = null, oe !== null)
              try {
                J === "input" && L.type === "radio" && L.name != null && Hn(R, L), Oi(J, U);
                var be = Oi(J, L);
                for (U = 0; U < oe.length; U += 2) {
                  var Ge = oe[U], Ke = oe[U + 1];
                  Ge === "style" ? nn(R, Ke) : Ge === "dangerouslySetInnerHTML" ? xr(R, Ke) : Ge === "children" ? Wr(R, Ke) : B(R, Ge, Ke, be);
                }
                switch (J) {
                  case "input":
                    Nn(R, L);
                    break;
                  case "textarea":
                    Jn(R, L);
                    break;
                  case "select":
                    var Ve = R._wrapperState.wasMultiple;
                    R._wrapperState.wasMultiple = !!L.multiple;
                    var ht = L.value;
                    ht != null ? Tn(R, !!L.multiple, ht, !1) : Ve !== !!L.multiple && (L.defaultValue != null ? Tn(
                      R,
                      !!L.multiple,
                      L.defaultValue,
                      !0
                    ) : Tn(R, !!L.multiple, L.multiple ? [] : "", !1));
                }
                R[$u] = L;
              } catch (Rt) {
                Rr(l, l.return, Rt);
              }
          }
          break;
        case 6:
          if (Jr(f, l), js(l), x & 4) {
            if (l.stateNode === null)
              throw Error(t(162));
            R = l.stateNode, L = l.memoizedProps;
            try {
              R.nodeValue = L;
            } catch (Rt) {
              Rr(l, l.return, Rt);
            }
          }
          break;
        case 3:
          if (Jr(f, l), js(l), x & 4 && v !== null && v.memoizedState.isDehydrated)
            try {
              An(f.containerInfo);
            } catch (Rt) {
              Rr(l, l.return, Rt);
            }
          break;
        case 4:
          Jr(f, l), js(l);
          break;
        case 13:
          Jr(f, l), js(l), R = l.child, R.flags & 8192 && (L = R.memoizedState !== null, R.stateNode.isHidden = L, !L || R.alternate !== null && R.alternate.memoizedState !== null || (Bd = mi())), x & 4 && rc(l);
          break;
        case 22:
          if (Ge = v !== null && v.memoizedState !== null, l.mode & 1 ? (li = (be = li) || Ge, Jr(f, l), li = be) : Jr(f, l), js(l), x & 8192) {
            if (be = l.memoizedState !== null, (l.stateNode.isHidden = be) && !Ge && l.mode & 1)
              for (vt = l, Ge = l.child; Ge !== null; ) {
                for (Ke = vt = Ge; vt !== null; ) {
                  switch (Ve = vt, ht = Ve.child, Ve.tag) {
                    case 0:
                    case 11:
                    case 14:
                    case 15:
                      Qc(4, Ve, Ve.return);
                      break;
                    case 1:
                      ic(Ve, Ve.return);
                      var Et = Ve.stateNode;
                      if (typeof Et.componentWillUnmount == "function") {
                        x = Ve, v = Ve.return;
                        try {
                          f = x, Et.props = f.memoizedProps, Et.state = f.memoizedState, Et.componentWillUnmount();
                        } catch (Rt) {
                          Rr(x, v, Rt);
                        }
                      }
                      break;
                    case 5:
                      ic(Ve, Ve.return);
                      break;
                    case 22:
                      if (Ve.memoizedState !== null) {
                        by(Ke);
                        continue;
                      }
                  }
                  ht !== null ? (ht.return = Ve, vt = ht) : by(Ke);
                }
                Ge = Ge.sibling;
              }
            e:
              for (Ge = null, Ke = l; ; ) {
                if (Ke.tag === 5) {
                  if (Ge === null) {
                    Ge = Ke;
                    try {
                      R = Ke.stateNode, be ? (L = R.style, typeof L.setProperty == "function" ? L.setProperty("display", "none", "important") : L.display = "none") : (J = Ke.stateNode, oe = Ke.memoizedProps.style, U = oe != null && oe.hasOwnProperty("display") ? oe.display : null, J.style.display = Tt("display", U));
                    } catch (Rt) {
                      Rr(l, l.return, Rt);
                    }
                  }
                } else if (Ke.tag === 6) {
                  if (Ge === null)
                    try {
                      Ke.stateNode.nodeValue = be ? "" : Ke.memoizedProps;
                    } catch (Rt) {
                      Rr(l, l.return, Rt);
                    }
                } else if ((Ke.tag !== 22 && Ke.tag !== 23 || Ke.memoizedState === null || Ke === l) && Ke.child !== null) {
                  Ke.child.return = Ke, Ke = Ke.child;
                  continue;
                }
                if (Ke === l)
                  break e;
                for (; Ke.sibling === null; ) {
                  if (Ke.return === null || Ke.return === l)
                    break e;
                  Ge === Ke && (Ge = null), Ke = Ke.return;
                }
                Ge === Ke && (Ge = null), Ke.sibling.return = Ke.return, Ke = Ke.sibling;
              }
          }
          break;
        case 19:
          Jr(f, l), js(l), x & 4 && rc(l);
          break;
        case 21:
          break;
        default:
          Jr(
            f,
            l
          ), js(l);
      }
    }
    function js(l) {
      var f = l.flags;
      if (f & 2) {
        try {
          e: {
            for (var v = l.return; v !== null; ) {
              if (km(v)) {
                var x = v;
                break e;
              }
              v = v.return;
            }
            throw Error(t(160));
          }
          switch (x.tag) {
            case 5:
              var R = x.stateNode;
              x.flags & 32 && (Wr(R, ""), x.flags &= -33);
              var L = Sy(l);
              Jc(l, L, R);
              break;
            case 3:
            case 4:
              var U = x.stateNode.containerInfo, J = Sy(l);
              ph(l, J, U);
              break;
            default:
              throw Error(t(161));
          }
        } catch (oe) {
          Rr(l, l.return, oe);
        }
        l.flags &= -3;
      }
      f & 4096 && (l.flags &= -4097);
    }
    function xy(l, f, v) {
      vt = l, co(l);
    }
    function co(l, f, v) {
      for (var x = (l.mode & 1) !== 0; vt !== null; ) {
        var R = vt, L = R.child;
        if (R.tag === 22 && x) {
          var U = R.memoizedState !== null || Es;
          if (!U) {
            var J = R.alternate, oe = J !== null && J.memoizedState !== null || li;
            J = Es;
            var be = li;
            if (Es = U, (li = oe) && !be)
              for (vt = R; vt !== null; )
                U = vt, oe = U.child, U.tag === 22 && U.memoizedState !== null ? tg(R) : oe !== null ? (oe.return = U, vt = oe) : tg(R);
            for (; L !== null; )
              vt = L, co(L), L = L.sibling;
            vt = R, Es = J, li = be;
          }
          fo(l);
        } else
          R.subtreeFlags & 8772 && L !== null ? (L.return = R, vt = L) : fo(l);
      }
    }
    function fo(l) {
      for (; vt !== null; ) {
        var f = vt;
        if (f.flags & 8772) {
          var v = f.alternate;
          try {
            if (f.flags & 8772)
              switch (f.tag) {
                case 0:
                case 11:
                case 15:
                  li || $d(5, f);
                  break;
                case 1:
                  var x = f.stateNode;
                  if (f.flags & 4 && !li)
                    if (v === null)
                      x.componentDidMount();
                    else {
                      var R = f.elementType === f.type ? v.memoizedProps : vs(f.type, v.memoizedProps);
                      x.componentDidUpdate(R, v.memoizedState, x.__reactInternalSnapshotBeforeUpdate);
                    }
                  var L = f.updateQueue;
                  L !== null && Kf(f, L, x);
                  break;
                case 3:
                  var U = f.updateQueue;
                  if (U !== null) {
                    if (v = null, f.child !== null)
                      switch (f.child.tag) {
                        case 5:
                          v = f.child.stateNode;
                          break;
                        case 1:
                          v = f.child.stateNode;
                      }
                    Kf(f, U, v);
                  }
                  break;
                case 5:
                  var J = f.stateNode;
                  if (v === null && f.flags & 4) {
                    v = J;
                    var oe = f.memoizedProps;
                    switch (f.type) {
                      case "button":
                      case "input":
                      case "select":
                      case "textarea":
                        oe.autoFocus && v.focus();
                        break;
                      case "img":
                        oe.src && (v.src = oe.src);
                    }
                  }
                  break;
                case 6:
                  break;
                case 4:
                  break;
                case 12:
                  break;
                case 13:
                  if (f.memoizedState === null) {
                    var be = f.alternate;
                    if (be !== null) {
                      var Ge = be.memoizedState;
                      if (Ge !== null) {
                        var Ke = Ge.dehydrated;
                        Ke !== null && An(Ke);
                      }
                    }
                  }
                  break;
                case 19:
                case 17:
                case 21:
                case 22:
                case 23:
                case 25:
                  break;
                default:
                  throw Error(t(163));
              }
            li || f.flags & 512 && eg(f);
          } catch (Ve) {
            Rr(f, f.return, Ve);
          }
        }
        if (f === l) {
          vt = null;
          break;
        }
        if (v = f.sibling, v !== null) {
          v.return = f.return, vt = v;
          break;
        }
        vt = f.return;
      }
    }
    function by(l) {
      for (; vt !== null; ) {
        var f = vt;
        if (f === l) {
          vt = null;
          break;
        }
        var v = f.sibling;
        if (v !== null) {
          v.return = f.return, vt = v;
          break;
        }
        vt = f.return;
      }
    }
    function tg(l) {
      for (; vt !== null; ) {
        var f = vt;
        try {
          switch (f.tag) {
            case 0:
            case 11:
            case 15:
              var v = f.return;
              try {
                $d(4, f);
              } catch (oe) {
                Rr(f, v, oe);
              }
              break;
            case 1:
              var x = f.stateNode;
              if (typeof x.componentDidMount == "function") {
                var R = f.return;
                try {
                  x.componentDidMount();
                } catch (oe) {
                  Rr(f, R, oe);
                }
              }
              var L = f.return;
              try {
                eg(f);
              } catch (oe) {
                Rr(f, L, oe);
              }
              break;
            case 5:
              var U = f.return;
              try {
                eg(f);
              } catch (oe) {
                Rr(f, U, oe);
              }
          }
        } catch (oe) {
          Rr(f, f.return, oe);
        }
        if (f === l) {
          vt = null;
          break;
        }
        var J = f.sibling;
        if (J !== null) {
          J.return = f.return, vt = J;
          break;
        }
        vt = f.return;
      }
    }
    var I_ = Math.ceil, ef = V.ReactCurrentDispatcher, ng = V.ReactCurrentOwner, ho = V.ReactCurrentBatchConfig, Ln = 0, Tr = null, tr = null, ea = 0, Ss = 0, gh = qn(0), ta = 0, mh = null, ac = 0, tf = 0, jm = 0, sc = null, ka = null, Bd = 0, vh = 1 / 0, fu = null, ig = !1, Um = null, po = null, yh = !1, mr = null, rg = 0, Vd = 0, ag = null, _h = -1, nf = 0;
    function ca() {
      return Ln & 6 ? mi() : _h !== -1 ? _h : _h = mi();
    }
    function hu(l) {
      return l.mode & 1 ? Ln & 2 && ea !== 0 ? ea & -ea : gy.transition !== null ? (nf === 0 && (nf = Au()), nf) : (l = Rn, l !== 0 || (l = window.event, l = l === void 0 ? 16 : td(l.type)), l) : 1;
    }
    function vr(l, f, v, x) {
      if (50 < Vd)
        throw Vd = 0, ag = null, Error(t(185));
      Lu(l, v, x), (!(Ln & 2) || l !== Tr) && (l === Tr && (!(Ln & 2) && (tf |= v), ta === 4 && _l(l, ea)), Ur(l, x), v === 1 && Ln === 0 && !(f.mode & 1) && (vh = mi() + 500, Vu && dl()));
    }
    function Ur(l, f) {
      var v = l.callbackNode;
      Ou(l, f);
      var x = Os(l, l === Tr ? ea : 0);
      if (x === 0)
        v !== null && Ui(v), l.callbackNode = null, l.callbackPriority = 0;
      else if (f = x & -x, l.callbackPriority !== f) {
        if (v != null && Ui(v), f === 1)
          l.tag === 0 ? Hu(Eh.bind(null, l)) : zp(Eh.bind(null, l)), vd(function() {
            !(Ln & 6) && dl();
          }), v = null;
        else {
          switch (sl(x)) {
            case 1:
              v = Zh;
              break;
            case 4:
              v = il;
              break;
            case 16:
              v = cn;
              break;
            case 536870912:
              v = rl;
              break;
            default:
              v = cn;
          }
          v = Ay(v, sg.bind(null, l));
        }
        l.callbackPriority = f, l.callbackNode = v;
      }
    }
    function sg(l, f) {
      if (_h = -1, nf = 0, Ln & 6)
        throw Error(t(327));
      var v = l.callbackNode;
      if (lc() && l.callbackNode !== v)
        return null;
      var x = Os(l, l === Tr ? ea : 0);
      if (x === 0)
        return null;
      if (x & 30 || x & l.expiredLanes || f)
        f = lg(l, x);
      else {
        f = x;
        var R = Ln;
        Ln |= 2;
        var L = Cy();
        (Tr !== l || ea !== f) && (fu = null, vh = mi() + 500, af(l, f));
        do
          try {
            k_();
            break;
          } catch (J) {
            wy(l, J);
          }
        while (!0);
        Sd(), ef.current = L, Ln = R, tr !== null ? f = 0 : (Tr = null, ea = 0, f = ta);
      }
      if (f !== 0) {
        if (f === 2 && (R = Oo(l), R !== 0 && (x = R, f = rf(l, R))), f === 1)
          throw v = mh, af(l, 0), _l(l, x), Ur(l, mi()), v;
        if (f === 6)
          _l(l, x);
        else {
          if (R = l.current.alternate, !(x & 30) && !$m(R) && (f = lg(l, x), f === 2 && (L = Oo(l), L !== 0 && (x = L, f = rf(l, L))), f === 1))
            throw v = mh, af(l, 0), _l(l, x), Ur(l, mi()), v;
          switch (l.finishedWork = R, l.finishedLanes = x, f) {
            case 0:
            case 1:
              throw Error(t(345));
            case 2:
              oc(l, ka, fu);
              break;
            case 3:
              if (_l(l, x), (x & 130023424) === x && (f = Bd + 500 - mi(), 10 < f)) {
                if (Os(l, 0) !== 0)
                  break;
                if (R = l.suspendedLanes, (R & x) !== x) {
                  ca(), l.pingedLanes |= l.suspendedLanes & R;
                  break;
                }
                l.timeoutHandle = fl(oc.bind(null, l, ka, fu), f);
                break;
              }
              oc(l, ka, fu);
              break;
            case 4:
              if (_l(l, x), (x & 4194240) === x)
                break;
              for (f = l.eventTimes, R = -1; 0 < x; ) {
                var U = 31 - $a(x);
                L = 1 << U, U = f[U], U > R && (R = U), x &= ~L;
              }
              if (x = R, x = mi() - x, x = (120 > x ? 120 : 480 > x ? 480 : 1080 > x ? 1080 : 1920 > x ? 1920 : 3e3 > x ? 3e3 : 4320 > x ? 4320 : 1960 * I_(x / 1960)) - x, 10 < x) {
                l.timeoutHandle = fl(oc.bind(null, l, ka, fu), x);
                break;
              }
              oc(l, ka, fu);
              break;
            case 5:
              oc(l, ka, fu);
              break;
            default:
              throw Error(t(329));
          }
        }
      }
      return Ur(l, mi()), l.callbackNode === v ? sg.bind(null, l) : null;
    }
    function rf(l, f) {
      var v = sc;
      return l.current.memoizedState.isDehydrated && (af(l, f).flags |= 256), l = lg(l, f), l !== 2 && (f = ka, ka = v, f !== null && zm(f)), l;
    }
    function zm(l) {
      ka === null ? ka = l : ka.push.apply(ka, l);
    }
    function $m(l) {
      for (var f = l; ; ) {
        if (f.flags & 16384) {
          var v = f.updateQueue;
          if (v !== null && (v = v.stores, v !== null))
            for (var x = 0; x < v.length; x++) {
              var R = v[x], L = R.getSnapshot;
              R = R.value;
              try {
                if (!xe(L(), R))
                  return !1;
              } catch {
                return !1;
              }
            }
        }
        if (v = f.child, f.subtreeFlags & 16384 && v !== null)
          v.return = f, f = v;
        else {
          if (f === l)
            break;
          for (; f.sibling === null; ) {
            if (f.return === null || f.return === l)
              return !0;
            f = f.return;
          }
          f.sibling.return = f.return, f = f.sibling;
        }
      }
      return !0;
    }
    function _l(l, f) {
      for (f &= ~jm, f &= ~tf, l.suspendedLanes |= f, l.pingedLanes &= ~f, l = l.expirationTimes; 0 < f; ) {
        var v = 31 - $a(f), x = 1 << v;
        l[v] = -1, f &= ~x;
      }
    }
    function Eh(l) {
      if (Ln & 6)
        throw Error(t(327));
      lc();
      var f = Os(l, 0);
      if (!(f & 1))
        return Ur(l, mi()), null;
      var v = lg(l, f);
      if (l.tag !== 0 && v === 2) {
        var x = Oo(l);
        x !== 0 && (f = x, v = rf(l, x));
      }
      if (v === 1)
        throw v = mh, af(l, 0), _l(l, f), Ur(l, mi()), v;
      if (v === 6)
        throw Error(t(345));
      return l.finishedWork = l.current.alternate, l.finishedLanes = f, oc(l, ka, fu), Ur(l, mi()), null;
    }
    function Bm(l, f) {
      var v = Ln;
      Ln |= 1;
      try {
        return l(f);
      } finally {
        Ln = v, Ln === 0 && (vh = mi() + 500, Vu && dl());
      }
    }
    function El(l) {
      mr !== null && mr.tag === 0 && !(Ln & 6) && lc();
      var f = Ln;
      Ln |= 1;
      var v = ho.transition, x = Rn;
      try {
        if (ho.transition = null, Rn = 1, l)
          return l();
      } finally {
        Rn = x, ho.transition = v, Ln = f, !(Ln & 6) && dl();
      }
    }
    function og() {
      Ss = gh.current, At(gh);
    }
    function af(l, f) {
      l.finishedWork = null, l.finishedLanes = 0;
      var v = l.timeoutHandle;
      if (v !== -1 && (l.timeoutHandle = -1, Kl(v)), tr !== null)
        for (v = tr.return; v !== null; ) {
          var x = v;
          switch (Gu(x), x.tag) {
            case 1:
              x = x.type.childContextTypes, x != null && ps();
              break;
            case 3:
              eh(), At(tn), At(oa), lo();
              break;
            case 5:
              Ft(x);
              break;
            case 4:
              eh();
              break;
            case 13:
              At(Ot);
              break;
            case 19:
              At(Ot);
              break;
            case 10:
              $p(x.type._context);
              break;
            case 22:
            case 23:
              og();
          }
          v = v.return;
        }
      if (Tr = l, tr = l = uc(l.current, null), ea = Ss = f, ta = 0, mh = null, jm = tf = ac = 0, ka = sc = null, wr !== null) {
        for (f = 0; f < wr.length; f++)
          if (v = wr[f], x = v.interleaved, x !== null) {
            v.interleaved = null;
            var R = x.next, L = v.pending;
            if (L !== null) {
              var U = L.next;
              L.next = R, x.next = U;
            }
            v.pending = x;
          }
        wr = null;
      }
      return l;
    }
    function wy(l, f) {
      do {
        var v = tr;
        try {
          if (Sd(), Vc.current = su, Pr) {
            for (var x = pr.memoizedState; x !== null; ) {
              var R = x.queue;
              R !== null && (R.pending = null), x = x.next;
            }
            Pr = !1;
          }
          if (Hc = 0, je = Ji = pr = null, Bt = !1, kr = 0, ng.current = null, v === null || v.return === null) {
            ta = 1, mh = f, tr = null;
            break;
          }
          e: {
            var L = l, U = v.return, J = v, oe = f;
            if (f = ea, J.flags |= 32768, oe !== null && typeof oe == "object" && typeof oe.then == "function") {
              var be = oe, Ge = J, Ke = Ge.tag;
              if (!(Ge.mode & 1) && (Ke === 0 || Ke === 11 || Ke === 15)) {
                var Ve = Ge.alternate;
                Ve ? (Ge.updateQueue = Ve.updateQueue, Ge.memoizedState = Ve.memoizedState, Ge.lanes = Ve.lanes) : (Ge.updateQueue = null, Ge.memoizedState = null);
              }
              var ht = Nm(U);
              if (ht !== null) {
                ht.flags &= -257, ch(ht, U, J, L, f), ht.mode & 1 && kd(L, be, f), f = ht, oe = be;
                var Et = f.updateQueue;
                if (Et === null) {
                  var Rt = /* @__PURE__ */ new Set();
                  Rt.add(oe), f.updateQueue = Rt;
                } else
                  Et.add(oe);
                break e;
              } else {
                if (!(f & 1)) {
                  kd(L, be, f), Hd();
                  break e;
                }
                oe = Error(t(426));
              }
            } else if (zi && J.mode & 1) {
              var zr = Nm(U);
              if (zr !== null) {
                !(zr.flags & 65536) && (zr.flags |= 256), ch(zr, U, J, L, f), Di(ou(oe, J));
                break e;
              }
            }
            L = oe = ou(oe, J), ta !== 4 && (ta = 2), sc === null ? sc = [L] : sc.push(L), L = U;
            do {
              switch (L.tag) {
                case 3:
                  L.flags |= 65536, f &= -f, L.lanes |= f;
                  var me = Xp(L, oe, f);
                  Rm(L, me);
                  break e;
                case 1:
                  J = oe;
                  var fe = L.type, ve = L.stateNode;
                  if (!(L.flags & 128) && (typeof fe.getDerivedStateFromError == "function" || ve !== null && typeof ve.componentDidCatch == "function" && (po === null || !po.has(ve)))) {
                    L.flags |= 65536, f &= -f, L.lanes |= f;
                    var nt = Pd(L, J, f);
                    Rm(L, nt);
                    break e;
                  }
              }
              L = L.return;
            } while (L !== null);
          }
          Ry(v);
        } catch (Lt) {
          f = Lt, tr === v && v !== null && (tr = v = v.return);
          continue;
        }
        break;
      } while (!0);
    }
    function Cy() {
      var l = ef.current;
      return ef.current = su, l === null ? su : l;
    }
    function Hd() {
      (ta === 0 || ta === 3 || ta === 2) && (ta = 4), Tr === null || !(ac & 268435455) && !(tf & 268435455) || _l(Tr, ea);
    }
    function lg(l, f) {
      var v = Ln;
      Ln |= 2;
      var x = Cy();
      (Tr !== l || ea !== f) && (fu = null, af(l, f));
      do
        try {
          P_();
          break;
        } catch (R) {
          wy(l, R);
        }
      while (!0);
      if (Sd(), Ln = v, ef.current = x, tr !== null)
        throw Error(t(261));
      return Tr = null, ea = 0, ta;
    }
    function P_() {
      for (; tr !== null; )
        Ty(tr);
    }
    function k_() {
      for (; tr !== null && !Zr(); )
        Ty(tr);
    }
    function Ty(l) {
      var f = Oy(l.alternate, l, Ss);
      l.memoizedProps = l.pendingProps, f === null ? Ry(l) : tr = f, ng.current = null;
    }
    function Ry(l) {
      var f = l;
      do {
        var v = f.alternate;
        if (l = f.return, f.flags & 32768) {
          if (v = D_(v, f), v !== null) {
            v.flags &= 32767, tr = v;
            return;
          }
          if (l !== null)
            l.flags |= 32768, l.subtreeFlags = 0, l.deletions = null;
          else {
            ta = 6, tr = null;
            return;
          }
        } else if (v = N_(v, f, Ss), v !== null) {
          tr = v;
          return;
        }
        if (f = f.sibling, f !== null) {
          tr = f;
          return;
        }
        tr = f = l;
      } while (f !== null);
      ta === 0 && (ta = 5);
    }
    function oc(l, f, v) {
      var x = Rn, R = ho.transition;
      try {
        ho.transition = null, Rn = 1, F_(l, f, v, x);
      } finally {
        ho.transition = R, Rn = x;
      }
      return null;
    }
    function F_(l, f, v, x) {
      do
        lc();
      while (mr !== null);
      if (Ln & 6)
        throw Error(t(327));
      v = l.finishedWork;
      var R = l.finishedLanes;
      if (v === null)
        return null;
      if (l.finishedWork = null, l.finishedLanes = 0, v === l.current)
        throw Error(t(177));
      l.callbackNode = null, l.callbackPriority = 0;
      var L = v.lanes | v.childLanes;
      if (If(l, L), l === Tr && (tr = Tr = null, ea = 0), !(v.subtreeFlags & 2064) && !(v.flags & 2064) || yh || (yh = !0, Ay(cn, function() {
        return lc(), null;
      })), L = (v.flags & 15990) !== 0, v.subtreeFlags & 15990 || L) {
        L = ho.transition, ho.transition = null;
        var U = Rn;
        Rn = 1;
        var J = Ln;
        Ln |= 4, ng.current = null, zd(l, v), Fm(v, l), Ic(jc), kf = !!md, jc = md = null, l.current = v, xy(v), nl(), Ln = J, Rn = U, ho.transition = L;
      } else
        l.current = v;
      if (yh && (yh = !1, mr = l, rg = R), L = l.pendingLanes, L === 0 && (po = null), Qh(v.stateNode), Ur(l, mi()), f !== null)
        for (x = l.onRecoverableError, v = 0; v < f.length; v++)
          R = f[v], x(R.value, { componentStack: R.stack, digest: R.digest });
      if (ig)
        throw ig = !1, l = Um, Um = null, l;
      return rg & 1 && l.tag !== 0 && lc(), L = l.pendingLanes, L & 1 ? l === ag ? Vd++ : (Vd = 0, ag = l) : Vd = 0, dl(), null;
    }
    function lc() {
      if (mr !== null) {
        var l = sl(rg), f = ho.transition, v = Rn;
        try {
          if (ho.transition = null, Rn = 16 > l ? 16 : l, mr === null)
            var x = !1;
          else {
            if (l = mr, mr = null, rg = 0, Ln & 6)
              throw Error(t(331));
            var R = Ln;
            for (Ln |= 4, vt = l.current; vt !== null; ) {
              var L = vt, U = L.child;
              if (vt.flags & 16) {
                var J = L.deletions;
                if (J !== null) {
                  for (var oe = 0; oe < J.length; oe++) {
                    var be = J[oe];
                    for (vt = be; vt !== null; ) {
                      var Ge = vt;
                      switch (Ge.tag) {
                        case 0:
                        case 11:
                        case 15:
                          Qc(8, Ge, L);
                      }
                      var Ke = Ge.child;
                      if (Ke !== null)
                        Ke.return = Ge, vt = Ke;
                      else
                        for (; vt !== null; ) {
                          Ge = vt;
                          var Ve = Ge.sibling, ht = Ge.return;
                          if (Ey(Ge), Ge === be) {
                            vt = null;
                            break;
                          }
                          if (Ve !== null) {
                            Ve.return = ht, vt = Ve;
                            break;
                          }
                          vt = ht;
                        }
                    }
                  }
                  var Et = L.alternate;
                  if (Et !== null) {
                    var Rt = Et.child;
                    if (Rt !== null) {
                      Et.child = null;
                      do {
                        var zr = Rt.sibling;
                        Rt.sibling = null, Rt = zr;
                      } while (Rt !== null);
                    }
                  }
                  vt = L;
                }
              }
              if (L.subtreeFlags & 2064 && U !== null)
                U.return = L, vt = U;
              else
                e:
                  for (; vt !== null; ) {
                    if (L = vt, L.flags & 2048)
                      switch (L.tag) {
                        case 0:
                        case 11:
                        case 15:
                          Qc(9, L, L.return);
                      }
                    var me = L.sibling;
                    if (me !== null) {
                      me.return = L.return, vt = me;
                      break e;
                    }
                    vt = L.return;
                  }
            }
            var fe = l.current;
            for (vt = fe; vt !== null; ) {
              U = vt;
              var ve = U.child;
              if (U.subtreeFlags & 2064 && ve !== null)
                ve.return = U, vt = ve;
              else
                e:
                  for (U = fe; vt !== null; ) {
                    if (J = vt, J.flags & 2048)
                      try {
                        switch (J.tag) {
                          case 0:
                          case 11:
                          case 15:
                            $d(9, J);
                        }
                      } catch (Lt) {
                        Rr(J, J.return, Lt);
                      }
                    if (J === U) {
                      vt = null;
                      break e;
                    }
                    var nt = J.sibling;
                    if (nt !== null) {
                      nt.return = J.return, vt = nt;
                      break e;
                    }
                    vt = J.return;
                  }
            }
            if (Ln = R, dl(), cs && typeof cs.onPostCommitFiberRoot == "function")
              try {
                cs.onPostCommitFiberRoot(Mu, l);
              } catch {
              }
            x = !0;
          }
          return x;
        } finally {
          Rn = v, ho.transition = f;
        }
      }
      return !1;
    }
    function Vm(l, f, v) {
      f = ou(v, f), f = Xp(l, f, 1), l = qu(l, f, 1), f = ca(), l !== null && (Lu(l, 1, f), Ur(l, f));
    }
    function Rr(l, f, v) {
      if (l.tag === 3)
        Vm(l, l, v);
      else
        for (; f !== null; ) {
          if (f.tag === 3) {
            Vm(f, l, v);
            break;
          } else if (f.tag === 1) {
            var x = f.stateNode;
            if (typeof f.type.getDerivedStateFromError == "function" || typeof x.componentDidCatch == "function" && (po === null || !po.has(x))) {
              l = ou(v, l), l = Pd(f, l, 1), f = qu(f, l, 1), l = ca(), f !== null && (Lu(f, 1, l), Ur(f, l));
              break;
            }
          }
          f = f.return;
        }
    }
    function j_(l, f, v) {
      var x = l.pingCache;
      x !== null && x.delete(f), f = ca(), l.pingedLanes |= l.suspendedLanes & v, Tr === l && (ea & v) === v && (ta === 4 || ta === 3 && (ea & 130023424) === ea && 500 > mi() - Bd ? af(l, 0) : jm |= v), Ur(l, f);
    }
    function My(l, f) {
      f === 0 && (l.mode & 1 ? (f = Df, Df <<= 1, !(Df & 130023424) && (Df = 4194304)) : f = 1);
      var v = ca();
      l = ko(l, f), l !== null && (Lu(l, f, v), Ur(l, v));
    }
    function Hm(l) {
      var f = l.memoizedState, v = 0;
      f !== null && (v = f.retryLane), My(l, v);
    }
    function U_(l, f) {
      var v = 0;
      switch (l.tag) {
        case 13:
          var x = l.stateNode, R = l.memoizedState;
          R !== null && (v = R.retryLane);
          break;
        case 19:
          x = l.stateNode;
          break;
        default:
          throw Error(t(314));
      }
      x !== null && x.delete(f), My(l, v);
    }
    var Oy;
    Oy = function(l, f, v) {
      if (l !== null)
        if (l.memoizedProps !== f.pendingProps || tn.current)
          Na = !0;
        else {
          if (!(l.lanes & v) && !(f.flags & 128))
            return Na = !1, or(l, f, v);
          Na = !!(l.flags & 131072);
        }
      else
        Na = !1, zi && f.flags & 1048576 && Wu(f, zc, f.index);
      switch (f.lanes = 0, f.tag) {
        case 2:
          var x = f.type;
          Kc(l, f), l = f.pendingProps;
          var R = Ps(f, oa.current);
          dr(f, v), R = Zu(null, f, x, l, R, v);
          var L = ru();
          return f.flags |= 1, typeof R == "object" && R !== null && typeof R.render == "function" && R.$$typeof === void 0 ? (f.tag = 1, f.memoizedState = null, f.updateQueue = null, Xr(x) ? (L = !0, Ga(f)) : L = !1, f.memoizedState = R.state !== null && R.state !== void 0 ? R.state : null, Tm(f), R.updater = Bp, f.stateNode = R, R._reactInternals = f, Am(f, x, l, v), f = Kp(null, f, x, !0, L, v)) : (f.tag = 0, zi && L && Xf(f), jr(null, f, R, v), f = f.child), f;
        case 16:
          x = f.elementType;
          e: {
            switch (Kc(l, f), l = f.pendingProps, R = x._init, x = R(x._payload), f.type = x, R = f.tag = ug(x), l = vs(x, l), R) {
              case 0:
                f = an(null, f, x, l, v);
                break e;
              case 1:
                f = jd(null, f, x, l, v);
                break e;
              case 11:
                f = Yc(null, f, x, l, v);
                break e;
              case 14:
                f = Da(null, f, x, vs(x.type, l), v);
                break e;
            }
            throw Error(t(
              306,
              x,
              ""
            ));
          }
          return f;
        case 0:
          return x = f.type, R = f.pendingProps, R = f.elementType === x ? R : vs(x, R), an(l, f, x, R, v);
        case 1:
          return x = f.type, R = f.pendingProps, R = f.elementType === x ? R : vs(x, R), jd(l, f, x, R, v);
        case 3:
          e: {
            if (lu(f), l === null)
              throw Error(t(387));
            x = f.pendingProps, L = f.memoizedState, R = L.element, my(l, f), xd(f, x, null, v);
            var U = f.memoizedState;
            if (x = U.element, L.isDehydrated)
              if (L = { element: x, isDehydrated: !1, cache: U.cache, pendingSuspenseBoundaries: U.pendingSuspenseBoundaries, transitions: U.transitions }, f.updateQueue.baseState = L, f.memoizedState = L, f.flags & 256) {
                R = ou(Error(t(423)), f), f = Zp(l, f, x, v, R);
                break e;
              } else if (x !== R) {
                R = ou(Error(t(424)), f), f = Zp(l, f, x, v, R);
                break e;
              } else
                for (ks = Is(f.stateNode.containerInfo.firstChild), Oa = f, zi = !0, oo = null, v = Lm(f, null, x, v), f.child = v; v; )
                  v.flags = v.flags & -3 | 4096, v = v.sibling;
            else {
              if (pl(), x === R) {
                f = Cr(l, f, v);
                break e;
              }
              jr(l, f, x, v);
            }
            f = f.child;
          }
          return f;
        case 5:
          return wd(f), l === null && qa(f), x = f.type, R = f.pendingProps, L = l !== null ? l.memoizedProps : null, U = R.children, Xl(x, R) ? U = null : L !== null && Xl(x, L) && (f.flags |= 32), qc(l, f), jr(l, f, U, v), f.child;
        case 6:
          return l === null && qa(f), null;
        case 13:
          return Ud(l, f, v);
        case 4:
          return Wp(f, f.stateNode.containerInfo), x = f.pendingProps, l === null ? f.child = Ku(f, null, x, v) : jr(l, f, x, v), f.child;
        case 11:
          return x = f.type, R = f.pendingProps, R = f.elementType === x ? R : vs(x, R), Yc(l, f, x, R, v);
        case 7:
          return jr(l, f, f.pendingProps, v), f.child;
        case 8:
          return jr(l, f, f.pendingProps.children, v), f.child;
        case 12:
          return jr(l, f, f.pendingProps.children, v), f.child;
        case 10:
          e: {
            if (x = f.type._context, R = f.pendingProps, L = f.memoizedProps, U = R.value, ii(eu, x._currentValue), x._currentValue = U, L !== null)
              if (xe(L.value, U)) {
                if (L.children === R.children && !tn.current) {
                  f = Cr(l, f, v);
                  break e;
                }
              } else
                for (L = f.child, L !== null && (L.return = f); L !== null; ) {
                  var J = L.dependencies;
                  if (J !== null) {
                    U = L.child;
                    for (var oe = J.firstContext; oe !== null; ) {
                      if (oe.context === x) {
                        if (L.tag === 1) {
                          oe = wi(-1, v & -v), oe.tag = 2;
                          var be = L.updateQueue;
                          if (be !== null) {
                            be = be.shared;
                            var Ge = be.pending;
                            Ge === null ? oe.next = oe : (oe.next = Ge.next, Ge.next = oe), be.pending = oe;
                          }
                        }
                        L.lanes |= v, oe = L.alternate, oe !== null && (oe.lanes |= v), _a(
                          L.return,
                          v,
                          f
                        ), J.lanes |= v;
                        break;
                      }
                      oe = oe.next;
                    }
                  } else if (L.tag === 10)
                    U = L.type === f.type ? null : L.child;
                  else if (L.tag === 18) {
                    if (U = L.return, U === null)
                      throw Error(t(341));
                    U.lanes |= v, J = U.alternate, J !== null && (J.lanes |= v), _a(U, v, f), U = L.sibling;
                  } else
                    U = L.child;
                  if (U !== null)
                    U.return = L;
                  else
                    for (U = L; U !== null; ) {
                      if (U === f) {
                        U = null;
                        break;
                      }
                      if (L = U.sibling, L !== null) {
                        L.return = U.return, U = L;
                        break;
                      }
                      U = U.return;
                    }
                  L = U;
                }
            jr(l, f, R.children, v), f = f.child;
          }
          return f;
        case 9:
          return R = f.type, x = f.pendingProps.children, dr(f, v), R = rt(R), x = x(R), f.flags |= 1, jr(l, f, x, v), f.child;
        case 14:
          return x = f.type, R = vs(x, f.pendingProps), R = vs(x.type, R), Da(l, f, x, R, v);
        case 15:
          return Fd(l, f, f.type, f.pendingProps, v);
        case 17:
          return x = f.type, R = f.pendingProps, R = f.elementType === x ? R : vs(x, R), Kc(l, f), f.tag = 1, Xr(x) ? (l = !0, Ga(f)) : l = !1, dr(f, v), Om(f, x, R), Am(f, x, R, v), Kp(null, f, x, !0, l, v);
        case 19:
          return Im(l, f, v);
        case 22:
          return Ka(l, f, v);
      }
      throw Error(t(156, f.tag));
    };
    function Ay(l, f) {
      return ji(l, f);
    }
    function Ly(l, f, v, x) {
      this.tag = l, this.key = v, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = f, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = x, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
    }
    function Us(l, f, v, x) {
      return new Ly(l, f, v, x);
    }
    function Wm(l) {
      return l = l.prototype, !(!l || !l.isReactComponent);
    }
    function ug(l) {
      if (typeof l == "function")
        return Wm(l) ? 1 : 0;
      if (l != null) {
        if (l = l.$$typeof, l === Ee)
          return 11;
        if (l === Q)
          return 14;
      }
      return 2;
    }
    function uc(l, f) {
      var v = l.alternate;
      return v === null ? (v = Us(l.tag, f, l.key, l.mode), v.elementType = l.elementType, v.type = l.type, v.stateNode = l.stateNode, v.alternate = l, l.alternate = v) : (v.pendingProps = f, v.type = l.type, v.flags = 0, v.subtreeFlags = 0, v.deletions = null), v.flags = l.flags & 14680064, v.childLanes = l.childLanes, v.lanes = l.lanes, v.child = l.child, v.memoizedProps = l.memoizedProps, v.memoizedState = l.memoizedState, v.updateQueue = l.updateQueue, f = l.dependencies, v.dependencies = f === null ? null : { lanes: f.lanes, firstContext: f.firstContext }, v.sibling = l.sibling, v.index = l.index, v.ref = l.ref, v;
    }
    function cg(l, f, v, x, R, L) {
      var U = 2;
      if (x = l, typeof l == "function")
        Wm(l) && (U = 1);
      else if (typeof l == "string")
        U = 5;
      else
        e:
          switch (l) {
            case ie:
              return sf(v.children, R, L, f);
            case ue:
              U = 8, R |= 8;
              break;
            case Re:
              return l = Us(12, v, f, R | 2), l.elementType = Re, l.lanes = L, l;
            case Fe:
              return l = Us(13, v, f, R), l.elementType = Fe, l.lanes = L, l;
            case Ne:
              return l = Us(19, v, f, R), l.elementType = Ne, l.lanes = L, l;
            case le:
              return fg(v, R, L, f);
            default:
              if (typeof l == "object" && l !== null)
                switch (l.$$typeof) {
                  case Oe:
                    U = 10;
                    break e;
                  case $e:
                    U = 9;
                    break e;
                  case Ee:
                    U = 11;
                    break e;
                  case Q:
                    U = 14;
                    break e;
                  case ae:
                    U = 16, x = null;
                    break e;
                }
              throw Error(t(130, l == null ? l : typeof l, ""));
          }
      return f = Us(U, v, f, R), f.elementType = l, f.type = x, f.lanes = L, f;
    }
    function sf(l, f, v, x) {
      return l = Us(7, l, x, f), l.lanes = v, l;
    }
    function fg(l, f, v, x) {
      return l = Us(22, l, x, f), l.elementType = le, l.lanes = v, l.stateNode = { isHidden: !1 }, l;
    }
    function hg(l, f, v) {
      return l = Us(6, l, null, f), l.lanes = v, l;
    }
    function Wd(l, f, v) {
      return f = Us(4, l.children !== null ? l.children : [], l.key, f), f.lanes = v, f.stateNode = { containerInfo: l.containerInfo, pendingChildren: null, implementation: l.implementation }, f;
    }
    function Gd(l, f, v, x, R) {
      this.tag = f, this.containerInfo = l, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = $l(0), this.expirationTimes = $l(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = $l(0), this.identifierPrefix = x, this.onRecoverableError = R, this.mutableSourceEagerHydrationData = null;
    }
    function Gm(l, f, v, x, R, L, U, J, oe) {
      return l = new Gd(l, f, v, J, oe), f === 1 ? (f = 1, L === !0 && (f |= 8)) : f = 0, L = Us(3, null, null, f), l.current = L, L.stateNode = l, L.memoizedState = { element: x, isDehydrated: v, cache: null, transitions: null, pendingSuspenseBoundaries: null }, Tm(L), l;
    }
    function Ny(l, f, v) {
      var x = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
      return { $$typeof: G, key: x == null ? null : "" + x, children: l, containerInfo: f, implementation: v };
    }
    function Ym(l) {
      if (!l)
        return ro;
      l = l._reactInternals;
      e: {
        if (ct(l) !== l || l.tag !== 1)
          throw Error(t(170));
        var f = l;
        do {
          switch (f.tag) {
            case 3:
              f = f.stateNode.context;
              break e;
            case 1:
              if (Xr(f.type)) {
                f = f.stateNode.__reactInternalMemoizedMergedChildContext;
                break e;
              }
          }
          f = f.return;
        } while (f !== null);
        throw Error(t(171));
      }
      if (l.tag === 1) {
        var v = l.type;
        if (Xr(v))
          return Bu(l, v, f);
      }
      return f;
    }
    function qm(l, f, v, x, R, L, U, J, oe) {
      return l = Gm(v, x, !0, l, R, L, U, J, oe), l.context = Ym(null), v = l.current, x = ca(), R = hu(v), L = wi(x, R), L.callback = f ?? null, qu(v, L, R), l.current.lanes = R, Lu(l, R, x), Ur(l, x), l;
    }
    function dg(l, f, v, x) {
      var R = f.current, L = ca(), U = hu(R);
      return v = Ym(v), f.context === null ? f.context = v : f.pendingContext = v, f = wi(L, U), f.payload = { element: l }, x = x === void 0 ? null : x, x !== null && (f.callback = x), l = qu(R, f, U), l !== null && (vr(l, R, U, L), Xu(l, R, U)), U;
    }
    function Yd(l) {
      if (l = l.current, !l.child)
        return null;
      switch (l.child.tag) {
        case 5:
          return l.child.stateNode;
        default:
          return l.child.stateNode;
      }
    }
    function Dy(l, f) {
      if (l = l.memoizedState, l !== null && l.dehydrated !== null) {
        var v = l.retryLane;
        l.retryLane = v !== 0 && v < f ? v : f;
      }
    }
    function Xm(l, f) {
      Dy(l, f), (l = l.alternate) && Dy(l, f);
    }
    function z_() {
      return null;
    }
    var pg = typeof reportError == "function" ? reportError : function(l) {
      console.error(l);
    };
    function qd(l) {
      this._internalRoot = l;
    }
    Xd.prototype.render = qd.prototype.render = function(l) {
      var f = this._internalRoot;
      if (f === null)
        throw Error(t(409));
      dg(l, f, null, null);
    }, Xd.prototype.unmount = qd.prototype.unmount = function() {
      var l = this._internalRoot;
      if (l !== null) {
        this._internalRoot = null;
        var f = l.containerInfo;
        El(function() {
          dg(null, l, null, null);
        }), f[Wa] = null;
      }
    };
    function Xd(l) {
      this._internalRoot = l;
    }
    Xd.prototype.unstable_scheduleHydration = function(l) {
      if (l) {
        var f = Un();
        l = { blockedOn: null, target: l, priority: f };
        for (var v = 0; v < Zi.length && f !== 0 && f < Zi[v].priority; v++)
          ;
        Zi.splice(v, 0, l), v === 0 && Lo(l);
      }
    };
    function cc(l) {
      return !(!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11);
    }
    function gg(l) {
      return !(!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11 && (l.nodeType !== 8 || l.nodeValue !== " react-mount-point-unstable "));
    }
    function Iy() {
    }
    function mg(l, f, v, x, R) {
      if (R) {
        if (typeof x == "function") {
          var L = x;
          x = function() {
            var be = Yd(U);
            L.call(be);
          };
        }
        var U = qm(f, x, l, 0, null, !1, !1, "", Iy);
        return l._reactRootContainer = U, l[Wa] = U.current, Ds(l.nodeType === 8 ? l.parentNode : l), El(), U;
      }
      for (; R = l.lastChild; )
        l.removeChild(R);
      if (typeof x == "function") {
        var J = x;
        x = function() {
          var be = Yd(oe);
          J.call(be);
        };
      }
      var oe = Gm(l, 0, !1, null, null, !1, !1, "", Iy);
      return l._reactRootContainer = oe, l[Wa] = oe.current, Ds(l.nodeType === 8 ? l.parentNode : l), El(function() {
        dg(f, oe, v, x);
      }), oe;
    }
    function vg(l, f, v, x, R) {
      var L = v._reactRootContainer;
      if (L) {
        var U = L;
        if (typeof R == "function") {
          var J = R;
          R = function() {
            var oe = Yd(U);
            J.call(oe);
          };
        }
        dg(f, U, l, R);
      } else
        U = mg(v, f, l, R, x);
      return Yd(U);
    }
    Cc = function(l) {
      switch (l.tag) {
        case 3:
          var f = l.stateNode;
          if (f.current.memoizedState.isDehydrated) {
            var v = al(f.pendingLanes);
            v !== 0 && (wc(f, v | 1), Ur(f, mi()), !(Ln & 6) && (vh = mi() + 500, dl()));
          }
          break;
        case 13:
          El(function() {
            var x = ko(l, 1);
            if (x !== null) {
              var R = ca();
              vr(x, l, 1, R);
            }
          }), Xm(l, 1);
      }
    }, Bl = function(l) {
      if (l.tag === 13) {
        var f = ko(l, 134217728);
        if (f !== null) {
          var v = ca();
          vr(f, l, 134217728, v);
        }
        Xm(l, 134217728);
      }
    }, Jh = function(l) {
      if (l.tag === 13) {
        var f = hu(l), v = ko(l, f);
        if (v !== null) {
          var x = ca();
          vr(v, l, f, x);
        }
        Xm(l, f);
      }
    }, Un = function() {
      return Rn;
    }, Tc = function(l, f) {
      var v = Rn;
      try {
        return Rn = l, f();
      } finally {
        Rn = v;
      }
    }, Fn = function(l, f, v) {
      switch (f) {
        case "input":
          if (Nn(l, v), f = v.name, v.type === "radio" && f != null) {
            for (v = l; v.parentNode; )
              v = v.parentNode;
            for (v = v.querySelectorAll("input[name=" + JSON.stringify("" + f) + '][type="radio"]'), f = 0; f < v.length; f++) {
              var x = v[f];
              if (x !== l && x.form === l.form) {
                var R = Up(x);
                if (!R)
                  throw Error(t(90));
                hn(x), Nn(x, R);
              }
            }
          }
          break;
        case "textarea":
          Jn(l, v);
          break;
        case "select":
          f = v.value, f != null && Tn(l, !!v.multiple, f, !1);
      }
    }, za = Bm, Ar = El;
    var $_ = { usingClientEntryPoint: !1, Events: [Dr, gn, Up, ls, Fi, Bm] }, Kd = { findFiberByHostInstance: io, bundleType: 0, version: "18.2.0", rendererPackageName: "react-dom" }, Py = { bundleType: Kd.bundleType, version: Kd.version, rendererPackageName: Kd.rendererPackageName, rendererConfig: Kd.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: V.ReactCurrentDispatcher, findHostInstanceByFiber: function(l) {
      return l = It(l), l === null ? null : l.stateNode;
    }, findFiberByHostInstance: Kd.findFiberByHostInstance || z_, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.2.0-next-9e3b772b8-20220608" };
    if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
      var yg = __REACT_DEVTOOLS_GLOBAL_HOOK__;
      if (!yg.isDisabled && yg.supportsFiber)
        try {
          Mu = yg.inject(Py), cs = yg;
        } catch {
        }
    }
    return Rl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = $_, Rl.createPortal = function(l, f) {
      var v = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
      if (!cc(f))
        throw Error(t(200));
      return Ny(l, f, null, v);
    }, Rl.createRoot = function(l, f) {
      if (!cc(l))
        throw Error(t(299));
      var v = !1, x = "", R = pg;
      return f != null && (f.unstable_strictMode === !0 && (v = !0), f.identifierPrefix !== void 0 && (x = f.identifierPrefix), f.onRecoverableError !== void 0 && (R = f.onRecoverableError)), f = Gm(l, 1, !1, null, null, v, !1, x, R), l[Wa] = f.current, Ds(l.nodeType === 8 ? l.parentNode : l), new qd(f);
    }, Rl.findDOMNode = function(l) {
      if (l == null)
        return null;
      if (l.nodeType === 1)
        return l;
      var f = l._reactInternals;
      if (f === void 0)
        throw typeof l.render == "function" ? Error(t(188)) : (l = Object.keys(l).join(","), Error(t(268, l)));
      return l = It(f), l = l === null ? null : l.stateNode, l;
    }, Rl.flushSync = function(l) {
      return El(l);
    }, Rl.hydrate = function(l, f, v) {
      if (!gg(f))
        throw Error(t(200));
      return vg(null, l, f, !0, v);
    }, Rl.hydrateRoot = function(l, f, v) {
      if (!cc(l))
        throw Error(t(405));
      var x = v != null && v.hydratedSources || null, R = !1, L = "", U = pg;
      if (v != null && (v.unstable_strictMode === !0 && (R = !0), v.identifierPrefix !== void 0 && (L = v.identifierPrefix), v.onRecoverableError !== void 0 && (U = v.onRecoverableError)), f = qm(f, null, l, 1, v ?? null, R, !1, L, U), l[Wa] = f.current, Ds(l), x)
        for (l = 0; l < x.length; l++)
          v = x[l], R = v._getVersion, R = R(v._source), f.mutableSourceEagerHydrationData == null ? f.mutableSourceEagerHydrationData = [v, R] : f.mutableSourceEagerHydrationData.push(
            v,
            R
          );
      return new Xd(f);
    }, Rl.render = function(l, f, v) {
      if (!gg(f))
        throw Error(t(200));
      return vg(null, l, f, !1, v);
    }, Rl.unmountComponentAtNode = function(l) {
      if (!gg(l))
        throw Error(t(40));
      return l._reactRootContainer ? (El(function() {
        vg(null, null, l, !1, function() {
          l._reactRootContainer = null, l[Wa] = null;
        });
      }), !0) : !1;
    }, Rl.unstable_batchedUpdates = Bm, Rl.unstable_renderSubtreeIntoContainer = function(l, f, v, x) {
      if (!gg(v))
        throw Error(t(200));
      if (l == null || l._reactInternals === void 0)
        throw Error(t(38));
      return vg(l, f, v, !1, x);
    }, Rl.version = "18.2.0-next-9e3b772b8-20220608", Rl;
  }
  var RF = {};
  function MF() {
    if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
      if (RF.NODE_ENV !== "production")
        throw new Error("^_^");
      try {
        __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MF);
      } catch (n) {
        console.error(n);
      }
    }
  }
  RF.NODE_ENV === "production" ? (MF(), uA.exports = k9()) : uA.exports = P9();
  var OF = uA.exports, cA, F9 = {}, cb = OF;
  if (F9.NODE_ENV === "production")
    cA = cb.createRoot, cb.hydrateRoot;
  else {
    var Sk = cb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    cA = function(n, e) {
      Sk.usingClientEntryPoint = !0;
      try {
        return cb.createRoot(n, e);
      } finally {
        Sk.usingClientEntryPoint = !1;
      }
    };
  }
  var fA = { exports: {} }, ZM = {}, xk;
  function j9() {
    if (xk)
      return ZM;
    xk = 1;
    var n = {};
    /**
     * @license React
     * use-sync-external-store-with-selector.development.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.
     */
    return n.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 e = Kt;
      function t(_, S) {
        return _ === S && (_ !== 0 || 1 / _ === 1 / S) || _ !== _ && S !== S;
      }
      var i = typeof Object.is == "function" ? Object.is : t, a = e.useSyncExternalStore, o = e.useRef, u = e.useEffect, c = e.useMemo, p = e.useDebugValue;
      function y(_, S, b, T, O) {
        var N = o(null), D;
        N.current === null ? (D = {
          hasValue: !1,
          value: null
        }, N.current = D) : D = N.current;
        var k = c(function() {
          var z = !1, G, ie, ue = function(Ee) {
            if (!z) {
              z = !0, G = Ee;
              var Fe = T(Ee);
              if (O !== void 0 && D.hasValue) {
                var Ne = D.value;
                if (O(Ne, Fe))
                  return ie = Ne, Ne;
              }
              return ie = Fe, Fe;
            }
            var Q = G, ae = ie;
            if (i(Q, Ee))
              return ae;
            var le = T(Ee);
            return O !== void 0 && O(ae, le) ? ae : (G = Ee, ie = le, le);
          }, Re = b === void 0 ? null : b, Oe = function() {
            return ue(S());
          }, $e = Re === null ? void 0 : function() {
            return ue(Re());
          };
          return [Oe, $e];
        }, [S, b, T, O]), $ = k[0], B = k[1], V = a(_, $, B);
        return u(function() {
          D.hasValue = !0, D.value = V;
        }, [V]), p(V), V;
      }
      ZM.useSyncExternalStoreWithSelector = y, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
    }(), ZM;
  }
  var QM = {};
  /**
   * @license React
   * use-sync-external-store-with-selector.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 bk;
  function U9() {
    if (bk)
      return QM;
    bk = 1;
    var n = Kt;
    function e(p, y) {
      return p === y && (p !== 0 || 1 / p === 1 / y) || p !== p && y !== y;
    }
    var t = typeof Object.is == "function" ? Object.is : e, i = n.useSyncExternalStore, a = n.useRef, o = n.useEffect, u = n.useMemo, c = n.useDebugValue;
    return QM.useSyncExternalStoreWithSelector = function(p, y, _, S, b) {
      var T = a(null);
      if (T.current === null) {
        var O = { hasValue: !1, value: null };
        T.current = O;
      } else
        O = T.current;
      T = u(function() {
        function D(z) {
          if (!k) {
            if (k = !0, $ = z, z = S(z), b !== void 0 && O.hasValue) {
              var G = O.value;
              if (b(G, z))
                return B = G;
            }
            return B = z;
          }
          if (G = B, t($, z))
            return G;
          var ie = S(z);
          return b !== void 0 && b(G, ie) ? G : ($ = z, B = ie);
        }
        var k = !1, $, B, V = _ === void 0 ? null : _;
        return [function() {
          return D(y());
        }, V === null ? void 0 : function() {
          return D(V());
        }];
      }, [y, _, S, b]);
      var N = i(p, T[0], T[1]);
      return o(function() {
        O.hasValue = !0, O.value = N;
      }, [N]), c(N), N;
    }, QM;
  }
  var z9 = {};
  z9.NODE_ENV === "production" ? fA.exports = U9() : fA.exports = j9();
  var $9 = fA.exports, ew = {};
  function B9(n) {
    n();
  }
  var AF = B9, V9 = (n) => AF = n, H9 = () => AF, _u = (
    // prettier-ignore
    // @ts-ignore
    "default" in EP ? L2 : EP
  ), wk = Symbol.for("react-redux-context"), Ck = typeof globalThis < "u" ? globalThis : (
    /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
    {}
  );
  function W9() {
    if (!_u.createContext)
      return {};
    const n = Ck[wk] ?? (Ck[wk] = /* @__PURE__ */ new Map());
    let e = n.get(_u.createContext);
    return e || (e = _u.createContext(
      null
    ), ew.NODE_ENV !== "production" && (e.displayName = "ReactRedux"), n.set(_u.createContext, e)), e;
  }
  var tm = /* @__PURE__ */ W9(), G9 = () => {
    throw new Error("uSES not initialized!");
  };
  function iL(n = tm) {
    return function() {
      const t = _u.useContext(n);
      if (ew.NODE_ENV !== "production" && !t)
        throw new Error(
          "could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
        );
      return t;
    };
  }
  var LF = /* @__PURE__ */ iL(), NF = G9, Y9 = (n) => {
    NF = n;
  }, q9 = (n, e) => n === e;
  function X9(n = tm) {
    const e = n === tm ? LF : iL(n);
    return function(i, a = {}) {
      const { equalityFn: o = q9, devModeChecks: u = {} } = typeof a == "function" ? { equalityFn: a } : a;
      if (ew.NODE_ENV !== "production") {
        if (!i)
          throw new Error("You must pass a selector to useSelector");
        if (typeof i != "function")
          throw new Error("You must pass a function as a selector to useSelector");
        if (typeof o != "function")
          throw new Error(
            "You must pass a function as an equality function to useSelector"
          );
      }
      const {
        store: c,
        subscription: p,
        getServerState: y,
        stabilityCheck: _,
        identityFunctionCheck: S
      } = e(), b = _u.useRef(!0), T = _u.useCallback(
        {
          [i.name](N) {
            const D = i(N);
            if (ew.NODE_ENV !== "production") {
              const {
                identityFunctionCheck: k,
                stabilityCheck: $
              } = {
                stabilityCheck: _,
                identityFunctionCheck: S,
                ...u
              };
              if ($ === "always" || $ === "once" && b.current) {
                const B = i(N);
                if (!o(D, B)) {
                  let V;
                  try {
                    throw new Error();
                  } catch (z) {
                    ({ stack: V } = z);
                  }
                  console.warn(
                    "Selector " + (i.name || "unknown") + ` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,
                    {
                      state: N,
                      selected: D,
                      selected2: B,
                      stack: V
                    }
                  );
                }
              }
              if ((k === "always" || k === "once" && b.current) && D === N) {
                let B;
                try {
                  throw new Error();
                } catch (V) {
                  ({ stack: B } = V);
                }
                console.warn(
                  "Selector " + (i.name || "unknown") + ` returned the root state when called. This can lead to unnecessary rerenders.
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,
                  { stack: B }
                );
              }
              b.current && (b.current = !1);
            }
            return D;
          }
        }[i.name],
        [i, _, u.stabilityCheck]
      ), O = NF(
        p.addNestedSub,
        c.getState,
        y || c.getState,
        T,
        o
      );
      return _u.useDebugValue(O), O;
    };
  }
  var zt = /* @__PURE__ */ X9();
  function K9() {
    const n = H9();
    let e = null, t = null;
    return {
      clear() {
        e = null, t = null;
      },
      notify() {
        n(() => {
          let i = e;
          for (; i; )
            i.callback(), i = i.next;
        });
      },
      get() {
        let i = [], a = e;
        for (; a; )
          i.push(a), a = a.next;
        return i;
      },
      subscribe(i) {
        let a = !0, o = t = {
          callback: i,
          next: null,
          prev: t
        };
        return o.prev ? o.prev.next = o : e = o, function() {
          !a || e === null || (a = !1, o.next ? o.next.prev = o.prev : t = o.prev, o.prev ? o.prev.next = o.next : e = o.next);
        };
      }
    };
  }
  var Tk = {
    notify() {
    },
    get: () => []
  };
  function Z9(n, e) {
    let t, i = Tk, a = 0, o = !1;
    function u(N) {
      _();
      const D = i.subscribe(N);
      let k = !1;
      return () => {
        k || (k = !0, D(), S());
      };
    }
    function c() {
      i.notify();
    }
    function p() {
      O.onStateChange && O.onStateChange();
    }
    function y() {
      return o;
    }
    function _() {
      a++, t || (t = e ? e.addNestedSub(p) : n.subscribe(p), i = K9());
    }
    function S() {
      a--, t && a === 0 && (t(), t = void 0, i.clear(), i = Tk);
    }
    function b() {
      o || (o = !0, _());
    }
    function T() {
      o && (o = !1, S());
    }
    const O = {
      addNestedSub: u,
      notifyNestedSubs: c,
      handleChangeWrapper: p,
      isSubscribed: y,
      trySubscribe: b,
      tryUnsubscribe: T,
      getListeners: () => i
    };
    return O;
  }
  var Q9 = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", J9 = Q9 ? _u.useLayoutEffect : _u.useEffect;
  function e7({
    store: n,
    context: e,
    children: t,
    serverState: i,
    stabilityCheck: a = "once",
    identityFunctionCheck: o = "once"
  }) {
    const u = _u.useMemo(() => {
      const y = Z9(n);
      return {
        store: n,
        subscription: y,
        getServerState: i ? () => i : void 0,
        stabilityCheck: a,
        identityFunctionCheck: o
      };
    }, [n, i, a, o]), c = _u.useMemo(() => n.getState(), [n]);
    J9(() => {
      const { subscription: y } = u;
      return y.onStateChange = y.notifyNestedSubs, y.trySubscribe(), c !== n.getState() && y.notifyNestedSubs(), () => {
        y.tryUnsubscribe(), y.onStateChange = void 0;
      };
    }, [u, c]);
    const p = e || tm;
    return /* @__PURE__ */ _u.createElement(p.Provider, { value: u }, t);
  }
  var t7 = e7;
  function DF(n = tm) {
    const e = (
      // @ts-ignore
      n === tm ? LF : (
        // @ts-ignore
        iL(n)
      )
    );
    return function() {
      const { store: i } = e();
      return i;
    };
  }
  var n7 = /* @__PURE__ */ DF();
  function i7(n = tm) {
    const e = (
      // @ts-ignore
      n === tm ? n7 : DF(n)
    );
    return function() {
      return e().dispatch;
    };
  }
  var Fl = /* @__PURE__ */ i7();
  Y9($9.useSyncExternalStoreWithSelector);
  V9(OF.unstable_batchedUpdates);
  var tw = { exports: {} };
  /**
   * @license
   * Lodash <https://lodash.com/>
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */
  tw.exports;
  (function(n, e) {
    (function() {
      var t, i = "4.17.21", a = 200, o = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", u = "Expected a function", c = "Invalid `variable` option passed into `_.template`", p = "__lodash_hash_undefined__", y = 500, _ = "__lodash_placeholder__", S = 1, b = 2, T = 4, O = 1, N = 2, D = 1, k = 2, $ = 4, B = 8, V = 16, z = 32, G = 64, ie = 128, ue = 256, Re = 512, Oe = 30, $e = "...", Ee = 800, Fe = 16, Ne = 1, Q = 2, ae = 3, le = 1 / 0, se = 9007199254740991, Ae = 17976931348623157e292, q = NaN, Z = 4294967295, ee = Z - 1, Le = Z >>> 1, Me = [
        ["ary", ie],
        ["bind", D],
        ["bindKey", k],
        ["curry", B],
        ["curryRight", V],
        ["flip", Re],
        ["partial", z],
        ["partialRight", G],
        ["rearg", ue]
      ], De = "[object Arguments]", Ye = "[object Array]", Ze = "[object AsyncFunction]", Xe = "[object Boolean]", lt = "[object Date]", Dt = "[object DOMException]", Ct = "[object Error]", hn = "[object Function]", Je = "[object GeneratorFunction]", Pt = "[object Map]", Vn = "[object Number]", Hn = "[object Null]", Nn = "[object Object]", Si = "[object Promise]", Sr = "[object Proxy]", In = "[object RegExp]", Tn = "[object Set]", Pn = "[object String]", Qn = "[object Symbol]", Jn = "[object Undefined]", ui = "[object WeakMap]", Mi = "[object WeakSet]", ci = "[object ArrayBuffer]", dn = "[object DataView]", xr = "[object Float32Array]", Wr = "[object Float64Array]", ai = "[object Int8Array]", at = "[object Int16Array]", Tt = "[object Int32Array]", nn = "[object Uint8Array]", kn = "[object Uint8ClampedArray]", Mn = "[object Uint16Array]", Oi = "[object Uint32Array]", ki = /\b__p \+= '';/g, Gr = /\b(__p \+=) '' \+/g, Fn = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Ki = /&(?:amp|lt|gt|quot|#39);/g, On = /[&<>"']/g, gi = RegExp(Ki.source), ls = RegExp(On.source), Fi = /<%-([\s\S]+?)%>/g, za = /<%([\s\S]+?)%>/g, Ar = /<%=([\s\S]+?)%>/g, ga = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, br = /^\w*$/, Ca = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, sa = /[\\^$.*+?()[\]{}|]/g, Ai = RegExp(sa.source), ir = /^\s+/, rr = /\s/, Ta = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ms = /\{\n\/\* \[wrapped with (.+)\] \*/, Ul = /,? & /, re = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, We = /[()=,{}\[\]\/\s]/, st = /\\(\\)?/g, ct = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Sn = /\w*$/, jn = /^[-+]0x[0-9a-f]+$/i, un = /^0b[01]+$/i, It = /^\[object .+?Constructor\]$/, Yr = /^0o[0-7]+$/i, ji = /^(?:0|[1-9]\d*)$/, Ui = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Zr = /($^)/, nl = /['\n\r\u2028\u2029\\]/g, mi = "\\ud800-\\udfff", us = "\\u0300-\\u036f", Zh = "\\ufe20-\\ufe2f", il = "\\u20d0-\\u20ff", cn = us + Zh + il, Ru = "\\u2700-\\u27bf", rl = "a-z\\xdf-\\xf6\\xf8-\\xff", Mu = "\\xac\\xb1\\xd7\\xf7", cs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Qh = "\\u2000-\\u206f", $a = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Af = "A-Z\\xc0-\\xd6\\xd8-\\xde", Lf = "\\ufe0e\\ufe0f", Nf = Mu + cs + Qh + $a, zl = "['’]", Df = "[" + mi + "]", al = "[" + Nf + "]", Os = "[" + cn + "]", As = "\\d+", Ou = "[" + Ru + "]", Oo = "[" + rl + "]", Au = "[^" + mi + Nf + As + Ru + rl + Af + "]", $l = "\\ud83c[\\udffb-\\udfff]", Lu = "(?:" + Os + "|" + $l + ")", If = "[^" + mi + "]", wc = "(?:\\ud83c[\\udde6-\\uddff]){2}", Rn = "[\\ud800-\\udbff][\\udc00-\\udfff]", sl = "[" + Af + "]", Cc = "\\u200d", Bl = "(?:" + Oo + "|" + Au + ")", Jh = "(?:" + sl + "|" + Au + ")", Un = "(?:" + zl + "(?:d|ll|m|re|s|t|ve))?", Tc = "(?:" + zl + "(?:D|LL|M|RE|S|T|VE))?", Nu = Lu + "?", Qt = "[" + Lf + "]?", Ao = "(?:" + Cc + "(?:" + [If, wc, Rn].join("|") + ")" + Qt + Nu + ")*", cr = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", fs = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ls = Qt + Nu + Ao, Du = "(?:" + [Ou, wc, Rn].join("|") + ")" + Ls, Zi = "(?:" + [If + Os + "?", Os, wc, Rn, Df].join("|") + ")", fr = RegExp(zl, "g"), ed = RegExp(Os, "g"), Qr = RegExp($l + "(?=" + $l + ")|" + Zi + Ls, "g"), hs = RegExp([
        sl + "?" + Oo + "+" + Un + "(?=" + [al, sl, "$"].join("|") + ")",
        Jh + "+" + Tc + "(?=" + [al, sl + Bl, "$"].join("|") + ")",
        sl + "?" + Bl + "+" + Un,
        sl + "+" + Tc,
        fs,
        cr,
        As,
        Du
      ].join("|"), "g"), Lo = RegExp("[" + Cc + mi + cn + Lf + "]"), Pf = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Rc = [
        "Array",
        "Buffer",
        "DataView",
        "Date",
        "Error",
        "Float32Array",
        "Float64Array",
        "Function",
        "Int8Array",
        "Int16Array",
        "Int32Array",
        "Map",
        "Math",
        "Object",
        "Promise",
        "RegExp",
        "Set",
        "String",
        "Symbol",
        "TypeError",
        "Uint8Array",
        "Uint8ClampedArray",
        "Uint16Array",
        "Uint32Array",
        "WeakMap",
        "_",
        "clearTimeout",
        "isFinite",
        "parseInt",
        "setTimeout"
      ], Mc = -1, ei = {};
      ei[xr] = ei[Wr] = ei[ai] = ei[at] = ei[Tt] = ei[nn] = ei[kn] = ei[Mn] = ei[Oi] = !0, ei[De] = ei[Ye] = ei[ci] = ei[Xe] = ei[dn] = ei[lt] = ei[Ct] = ei[hn] = ei[Pt] = ei[Vn] = ei[Nn] = ei[In] = ei[Tn] = ei[Pn] = ei[ui] = !1;
      var An = {};
      An[De] = An[Ye] = An[ci] = An[dn] = An[Xe] = An[lt] = An[xr] = An[Wr] = An[ai] = An[at] = An[Tt] = An[Pt] = An[Vn] = An[Nn] = An[In] = An[Tn] = An[Pn] = An[Qn] = An[nn] = An[kn] = An[Mn] = An[Oi] = !0, An[Ct] = An[hn] = An[ui] = !1;
      var Vl = {
        // Latin-1 Supplement block.
        À: "A",
        Á: "A",
        Â: "A",
        Ã: "A",
        Ä: "A",
        Å: "A",
        à: "a",
        á: "a",
        â: "a",
        ã: "a",
        ä: "a",
        å: "a",
        Ç: "C",
        ç: "c",
        Ð: "D",
        ð: "d",
        È: "E",
        É: "E",
        Ê: "E",
        Ë: "E",
        è: "e",
        é: "e",
        ê: "e",
        ë: "e",
        Ì: "I",
        Í: "I",
        Î: "I",
        Ï: "I",
        ì: "i",
        í: "i",
        î: "i",
        ï: "i",
        Ñ: "N",
        ñ: "n",
        Ò: "O",
        Ó: "O",
        Ô: "O",
        Õ: "O",
        Ö: "O",
        Ø: "O",
        ò: "o",
        ó: "o",
        ô: "o",
        õ: "o",
        ö: "o",
        ø: "o",
        Ù: "U",
        Ú: "U",
        Û: "U",
        Ü: "U",
        ù: "u",
        ú: "u",
        û: "u",
        ü: "u",
        Ý: "Y",
        ý: "y",
        ÿ: "y",
        Æ: "Ae",
        æ: "ae",
        Þ: "Th",
        þ: "th",
        ß: "ss",
        // Latin Extended-A block.
        Ā: "A",
        Ă: "A",
        Ą: "A",
        ā: "a",
        ă: "a",
        ą: "a",
        Ć: "C",
        Ĉ: "C",
        Ċ: "C",
        Č: "C",
        ć: "c",
        ĉ: "c",
        ċ: "c",
        č: "c",
        Ď: "D",
        Đ: "D",
        ď: "d",
        đ: "d",
        Ē: "E",
        Ĕ: "E",
        Ė: "E",
        Ę: "E",
        Ě: "E",
        ē: "e",
        ĕ: "e",
        ė: "e",
        ę: "e",
        ě: "e",
        Ĝ: "G",
        Ğ: "G",
        Ġ: "G",
        Ģ: "G",
        ĝ: "g",
        ğ: "g",
        ġ: "g",
        ģ: "g",
        Ĥ: "H",
        Ħ: "H",
        ĥ: "h",
        ħ: "h",
        Ĩ: "I",
        Ī: "I",
        Ĭ: "I",
        Į: "I",
        İ: "I",
        ĩ: "i",
        ī: "i",
        ĭ: "i",
        į: "i",
        ı: "i",
        Ĵ: "J",
        ĵ: "j",
        Ķ: "K",
        ķ: "k",
        ĸ: "k",
        Ĺ: "L",
        Ļ: "L",
        Ľ: "L",
        Ŀ: "L",
        Ł: "L",
        ĺ: "l",
        ļ: "l",
        ľ: "l",
        ŀ: "l",
        ł: "l",
        Ń: "N",
        Ņ: "N",
        Ň: "N",
        Ŋ: "N",
        ń: "n",
        ņ: "n",
        ň: "n",
        ŋ: "n",
        Ō: "O",
        Ŏ: "O",
        Ő: "O",
        ō: "o",
        ŏ: "o",
        ő: "o",
        Ŕ: "R",
        Ŗ: "R",
        Ř: "R",
        ŕ: "r",
        ŗ: "r",
        ř: "r",
        Ś: "S",
        Ŝ: "S",
        Ş: "S",
        Š: "S",
        ś: "s",
        ŝ: "s",
        ş: "s",
        š: "s",
        Ţ: "T",
        Ť: "T",
        Ŧ: "T",
        ţ: "t",
        ť: "t",
        ŧ: "t",
        Ũ: "U",
        Ū: "U",
        Ŭ: "U",
        Ů: "U",
        Ű: "U",
        Ų: "U",
        ũ: "u",
        ū: "u",
        ŭ: "u",
        ů: "u",
        ű: "u",
        ų: "u",
        Ŵ: "W",
        ŵ: "w",
        Ŷ: "Y",
        ŷ: "y",
        Ÿ: "Y",
        Ź: "Z",
        Ż: "Z",
        Ž: "Z",
        ź: "z",
        ż: "z",
        ž: "z",
        Ĳ: "IJ",
        ĳ: "ij",
        Œ: "Oe",
        œ: "oe",
        ŉ: "'n",
        ſ: "s"
      }, kf = {
        "&": "&amp;",
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "'": "&#39;"
      }, Hl = {
        "&amp;": "&",
        "&lt;": "<",
        "&gt;": ">",
        "&quot;": '"',
        "&#39;": "'"
      }, Ff = {
        "\\": "\\",
        "'": "'",
        "\n": "n",
        "\r": "r",
        "\u2028": "u2028",
        "\u2029": "u2029"
      }, ol = parseFloat, Wl = parseInt, Oc = typeof Ko == "object" && Ko && Ko.Object === Object && Ko, td = typeof self == "object" && self && self.Object === Object && self, Li = Oc || td || Function("return this")(), Iu = e && !e.nodeType && e, F = Iu && !0 && n && !n.nodeType && n, ne = F && F.exports === Iu, Se = ne && Oc.process, Te = function() {
        try {
          var pe = F && F.require && F.require("util").types;
          return pe || Se && Se.binding && Se.binding("util");
        } catch {
        }
      }(), tt = Te && Te.isArrayBuffer, bt = Te && Te.isDate, pt = Te && Te.isMap, Wt = Te && Te.isRegExp, fn = Te && Te.isSet, si = Te && Te.isTypedArray;
      function pn(pe, Ie, xe) {
        switch (xe.length) {
          case 0:
            return pe.call(Ie);
          case 1:
            return pe.call(Ie, xe[0]);
          case 2:
            return pe.call(Ie, xe[0], xe[1]);
          case 3:
            return pe.call(Ie, xe[0], xe[1], xe[2]);
        }
        return pe.apply(Ie, xe);
      }
      function vi(pe, Ie, xe, ft) {
        for (var rn = -1, ti = pe == null ? 0 : pe.length; ++rn < ti; ) {
          var qr = pe[rn];
          Ie(ft, qr, xe(qr), pe);
        }
        return ft;
      }
      function xn(pe, Ie) {
        for (var xe = -1, ft = pe == null ? 0 : pe.length; ++xe < ft && Ie(pe[xe], xe, pe) !== !1; )
          ;
        return pe;
      }
      function Qi(pe, Ie) {
        for (var xe = pe == null ? 0 : pe.length; xe-- && Ie(pe[xe], xe, pe) !== !1; )
          ;
        return pe;
      }
      function zn(pe, Ie) {
        for (var xe = -1, ft = pe == null ? 0 : pe.length; ++xe < ft; )
          if (!Ie(pe[xe], xe, pe))
            return !1;
        return !0;
      }
      function Ba(pe, Ie) {
        for (var xe = -1, ft = pe == null ? 0 : pe.length, rn = 0, ti = []; ++xe < ft; ) {
          var qr = pe[xe];
          Ie(qr, xe, pe) && (ti[rn++] = qr);
        }
        return ti;
      }
      function Gl(pe, Ie) {
        var xe = pe == null ? 0 : pe.length;
        return !!xe && Nc(pe, Ie, 0) > -1;
      }
      function Ac(pe, Ie, xe) {
        for (var ft = -1, rn = pe == null ? 0 : pe.length; ++ft < rn; )
          if (xe(Ie, pe[ft]))
            return !0;
        return !1;
      }
      function xi(pe, Ie) {
        for (var xe = -1, ft = pe == null ? 0 : pe.length, rn = Array(ft); ++xe < ft; )
          rn[xe] = Ie(pe[xe], xe, pe);
        return rn;
      }
      function Ra(pe, Ie) {
        for (var xe = -1, ft = Ie.length, rn = pe.length; ++xe < ft; )
          pe[rn + xe] = Ie[xe];
        return pe;
      }
      function Lc(pe, Ie, xe, ft) {
        var rn = -1, ti = pe == null ? 0 : pe.length;
        for (ft && ti && (xe = pe[++rn]); ++rn < ti; )
          xe = Ie(xe, pe[rn], rn, pe);
        return xe;
      }
      function nd(pe, Ie, xe, ft) {
        var rn = pe == null ? 0 : pe.length;
        for (ft && rn && (xe = pe[--rn]); rn--; )
          xe = Ie(xe, pe[rn], rn, pe);
        return xe;
      }
      function id(pe, Ie) {
        for (var xe = -1, ft = pe == null ? 0 : pe.length; ++xe < ft; )
          if (Ie(pe[xe], xe, pe))
            return !0;
        return !1;
      }
      var T_ = pm("length");
      function ey(pe) {
        return pe.split("");
      }
      function ty(pe) {
        return pe.match(re) || [];
      }
      function Lp(pe, Ie, xe) {
        var ft;
        return xe(pe, function(rn, ti, qr) {
          if (Ie(rn, ti, qr))
            return ft = ti, !1;
        }), ft;
      }
      function rd(pe, Ie, xe, ft) {
        for (var rn = pe.length, ti = xe + (ft ? 1 : -1); ft ? ti-- : ++ti < rn; )
          if (Ie(pe[ti], ti, pe))
            return ti;
        return -1;
      }
      function Nc(pe, Ie, xe) {
        return Ie === Ie ? Yl(pe, Ie, xe) : rd(pe, ny, xe);
      }
      function Np(pe, Ie, xe, ft) {
        for (var rn = xe - 1, ti = pe.length; ++rn < ti; )
          if (ft(pe[rn], Ie))
            return rn;
        return -1;
      }
      function ny(pe) {
        return pe !== pe;
      }
      function ll(pe, Ie) {
        var xe = pe == null ? 0 : pe.length;
        return xe ? mm(pe, Ie) / xe : q;
      }
      function pm(pe) {
        return function(Ie) {
          return Ie == null ? t : Ie[pe];
        };
      }
      function jf(pe) {
        return function(Ie) {
          return pe == null ? t : pe[Ie];
        };
      }
      function Dp(pe, Ie, xe, ft, rn) {
        return rn(pe, function(ti, qr, bi) {
          xe = ft ? (ft = !1, ti) : Ie(xe, ti, qr, bi);
        }), xe;
      }
      function gm(pe, Ie) {
        var xe = pe.length;
        for (pe.sort(Ie); xe--; )
          pe[xe] = pe[xe].value;
        return pe;
      }
      function mm(pe, Ie) {
        for (var xe, ft = -1, rn = pe.length; ++ft < rn; ) {
          var ti = Ie(pe[ft]);
          ti !== t && (xe = xe === t ? ti : xe + ti);
        }
        return xe;
      }
      function Uf(pe, Ie) {
        for (var xe = -1, ft = Array(pe); ++xe < pe; )
          ft[xe] = Ie(xe);
        return ft;
      }
      function iy(pe, Ie) {
        return xi(Ie, function(xe) {
          return [xe, pe[xe]];
        });
      }
      function Va(pe) {
        return pe && pe.slice(0, Pp(pe) + 1).replace(ir, "");
      }
      function Lr(pe) {
        return function(Ie) {
          return pe(Ie);
        };
      }
      function ar(pe, Ie) {
        return xi(Ie, function(xe) {
          return pe[xe];
        });
      }
      function ma(pe, Ie) {
        return pe.has(Ie);
      }
      function Ip(pe, Ie) {
        for (var xe = -1, ft = pe.length; ++xe < ft && Nc(Ie, pe[xe], 0) > -1; )
          ;
        return xe;
      }
      function zf(pe, Ie) {
        for (var xe = pe.length; xe-- && Nc(Ie, pe[xe], 0) > -1; )
          ;
        return xe;
      }
      function ry(pe, Ie) {
        for (var xe = pe.length, ft = 0; xe--; )
          pe[xe] === Ie && ++ft;
        return ft;
      }
      var $f = jf(Vl), ay = jf(kf);
      function sy(pe) {
        return "\\" + Ff[pe];
      }
      function Pu(pe, Ie) {
        return pe == null ? t : pe[Ie];
      }
      function Bf(pe) {
        return Lo.test(pe);
      }
      function R_(pe) {
        return Pf.test(pe);
      }
      function M_(pe) {
        for (var Ie, xe = []; !(Ie = pe.next()).done; )
          xe.push(Ie.value);
        return xe;
      }
      function ad(pe) {
        var Ie = -1, xe = Array(pe.size);
        return pe.forEach(function(ft, rn) {
          xe[++Ie] = [rn, ft];
        }), xe;
      }
      function vm(pe, Ie) {
        return function(xe) {
          return pe(Ie(xe));
        };
      }
      function eo(pe, Ie) {
        for (var xe = -1, ft = pe.length, rn = 0, ti = []; ++xe < ft; ) {
          var qr = pe[xe];
          (qr === Ie || qr === _) && (pe[xe] = _, ti[rn++] = xe);
        }
        return ti;
      }
      function ku(pe) {
        var Ie = -1, xe = Array(pe.size);
        return pe.forEach(function(ft) {
          xe[++Ie] = ft;
        }), xe;
      }
      function oy(pe) {
        var Ie = -1, xe = Array(pe.size);
        return pe.forEach(function(ft) {
          xe[++Ie] = [ft, ft];
        }), xe;
      }
      function Yl(pe, Ie, xe) {
        for (var ft = xe - 1, rn = pe.length; ++ft < rn; )
          if (pe[ft] === Ie)
            return ft;
        return -1;
      }
      function ym(pe, Ie, xe) {
        for (var ft = xe + 1; ft--; )
          if (pe[ft] === Ie)
            return ft;
        return ft;
      }
      function Fu(pe) {
        return Bf(pe) ? uy(pe) : T_(pe);
      }
      function ds(pe) {
        return Bf(pe) ? cy(pe) : ey(pe);
      }
      function Pp(pe) {
        for (var Ie = pe.length; Ie-- && rr.test(pe.charAt(Ie)); )
          ;
        return Ie;
      }
      var ly = jf(Hl);
      function uy(pe) {
        for (var Ie = Qr.lastIndex = 0; Qr.test(pe); )
          ++Ie;
        return Ie;
      }
      function cy(pe) {
        return pe.match(Qr) || [];
      }
      function O_(pe) {
        return pe.match(hs) || [];
      }
      var A_ = function pe(Ie) {
        Ie = Ie == null ? Li : Vf.defaults(Li.Object(), Ie, Vf.pick(Li, Rc));
        var xe = Ie.Array, ft = Ie.Date, rn = Ie.Error, ti = Ie.Function, qr = Ie.Math, bi = Ie.Object, Dc = Ie.RegExp, Ic = Ie.String, Ha = Ie.TypeError, ul = xe.prototype, ju = ti.prototype, cl = bi.prototype, Hf = Ie["__core-js_shared__"], sd = ju.toString, ni = cl.hasOwnProperty, Wf = 0, od = function() {
          var d = /[^.]+$/.exec(Hf && Hf.keys && Hf.keys.IE_PROTO || "");
          return d ? "Symbol(src)_1." + d : "";
        }(), ld = cl.toString, ud = sd.call(bi), Ma = Li._, _m = Dc(
          "^" + sd.call(ni).replace(sa, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
        ), cd = ne ? Ie.Buffer : t, ql = Ie.Symbol, fd = Ie.Uint8Array, Em = cd ? cd.allocUnsafe : t, No = vm(bi.getPrototypeOf, bi), hd = bi.create, Gf = cl.propertyIsEnumerable, Uu = ul.splice, fy = ql ? ql.isConcatSpreadable : t, Ns = ql ? ql.iterator : t, Pc = ql ? ql.toStringTag : t, dd = function() {
          try {
            var d = ml(bi, "defineProperty");
            return d({}, "", {}), d;
          } catch {
          }
        }(), hy = Ie.clearTimeout !== Li.clearTimeout && Ie.clearTimeout, Ni = ft && ft.now !== Li.Date.now && ft.now, pd = Ie.setTimeout !== Li.setTimeout && Ie.setTimeout, to = qr.ceil, Ds = qr.floor, gd = bi.getOwnPropertySymbols, Sm = cd ? cd.isBuffer : t, kc = Ie.isFinite, kp = ul.join, Fc = vm(bi.keys, bi), Nr = qr.max, va = qr.min, xm = ft.now, dy = Ie.parseInt, Yf = qr.random, Fp = ul.reverse, md = ml(Ie, "DataView"), jc = ml(Ie, "Map"), Xl = ml(Ie, "Promise"), fl = ml(Ie, "Set"), Kl = ml(Ie, "WeakMap"), Uc = ml(bi, "create"), vd = Kl && new Kl(), zu = {}, bm = fo(md), Is = fo(jc), yd = fo(Xl), Zl = fo(fl), no = fo(Kl), $u = ql ? ql.prototype : t, Wa = $u ? $u.valueOf : t, jp = $u ? $u.toString : t;
        function H(d) {
          if ($r(d) && !vn(d) && !(d instanceof gn)) {
            if (d instanceof Dr)
              return d;
            if (ni.call(d, "__wrapped__"))
              return tg(d);
          }
          return new Dr(d);
        }
        var qf = /* @__PURE__ */ function() {
          function d() {
          }
          return function(m) {
            if (!Mr(m))
              return {};
            if (hd)
              return hd(m);
            d.prototype = m;
            var w = new d();
            return d.prototype = t, w;
          };
        }();
        function io() {
        }
        function Dr(d, m) {
          this.__wrapped__ = d, this.__actions__ = [], this.__chain__ = !!m, this.__index__ = 0, this.__values__ = t;
        }
        H.templateSettings = {
          /**
           * Used to detect `data` property values to be HTML-escaped.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          escape: Fi,
          /**
           * Used to detect code to be evaluated.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          evaluate: za,
          /**
           * Used to detect `data` property values to inject.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          interpolate: Ar,
          /**
           * Used to reference the data object in the template text.
           *
           * @memberOf _.templateSettings
           * @type {string}
           */
          variable: "",
          /**
           * Used to import variables into the compiled template.
           *
           * @memberOf _.templateSettings
           * @type {Object}
           */
          imports: {
            /**
             * A reference to the `lodash` function.
             *
             * @memberOf _.templateSettings.imports
             * @type {Function}
             */
            _: H
          }
        }, H.prototype = io.prototype, H.prototype.constructor = H, Dr.prototype = qf(io.prototype), Dr.prototype.constructor = Dr;
        function gn(d) {
          this.__wrapped__ = d, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Z, this.__views__ = [];
        }
        function Up() {
          var d = new gn(this.__wrapped__);
          return d.__actions__ = La(this.__actions__), d.__dir__ = this.__dir__, d.__filtered__ = this.__filtered__, d.__iteratees__ = La(this.__iteratees__), d.__takeCount__ = this.__takeCount__, d.__views__ = La(this.__views__), d;
        }
        function kt() {
          if (this.__filtered__) {
            var d = new gn(this);
            d.__dir__ = -1, d.__filtered__ = !0;
          } else
            d = this.clone(), d.__dir__ *= -1;
          return d;
        }
        function Do() {
          var d = this.__wrapped__.value(), m = this.__dir__, w = vn(d), A = m < 0, j = w ? d.length : 0, Y = vl(0, j, this.__views__), te = Y.start, ce = Y.end, ge = ce - te, Ue = A ? ce : te - 1, Be = this.__iteratees__, He = Be.length, ot = 0, xt = va(ge, this.__takeCount__);
          if (!w || !A && j == ge && xt == ge)
            return Cd(d, this.__actions__);
          var $t = [];
          e:
            for (; ge-- && ot < xt; ) {
              Ue += m;
              for (var yn = -1, Xt = d[Ue]; ++yn < He; ) {
                var $n = Be[yn], Gn = $n.iteratee, vo = $n.type, Fa = Gn(Xt);
                if (vo == Q)
                  Xt = Fa;
                else if (!Fa) {
                  if (vo == Ne)
                    continue e;
                  break e;
                }
              }
              $t[ot++] = Xt;
            }
          return $t;
        }
        gn.prototype = qf(io.prototype), gn.prototype.constructor = gn;
        function qn(d) {
          var m = -1, w = d == null ? 0 : d.length;
          for (this.clear(); ++m < w; ) {
            var A = d[m];
            this.set(A[0], A[1]);
          }
        }
        function At() {
          this.__data__ = Uc ? Uc(null) : {}, this.size = 0;
        }
        function ii(d) {
          var m = this.has(d) && delete this.__data__[d];
          return this.size -= m ? 1 : 0, m;
        }
        function ro(d) {
          var m = this.__data__;
          if (Uc) {
            var w = m[d];
            return w === p ? t : w;
          }
          return ni.call(m, d) ? m[d] : t;
        }
        function oa(d) {
          var m = this.__data__;
          return Uc ? m[d] !== t : ni.call(m, d);
        }
        function tn(d, m) {
          var w = this.__data__;
          return this.size += this.has(d) ? 0 : 1, w[d] = Uc && m === t ? p : m, this;
        }
        qn.prototype.clear = At, qn.prototype.delete = ii, qn.prototype.get = ro, qn.prototype.has = oa, qn.prototype.set = tn;
        function hr(d) {
          var m = -1, w = d == null ? 0 : d.length;
          for (this.clear(); ++m < w; ) {
            var A = d[m];
            this.set(A[0], A[1]);
          }
        }
        function Ps() {
          this.__data__ = [], this.size = 0;
        }
        function Xr(d) {
          var m = this.__data__, w = Oa(m, d);
          if (w < 0)
            return !1;
          var A = m.length - 1;
          return w == A ? m.pop() : Uu.call(m, w, 1), --this.size, !0;
        }
        function ps(d) {
          var m = this.__data__, w = Oa(m, d);
          return w < 0 ? t : m[w][1];
        }
        function hl(d) {
          return Oa(this.__data__, d) > -1;
        }
        function Bu(d, m) {
          var w = this.__data__, A = Oa(w, d);
          return A < 0 ? (++this.size, w.push([d, m])) : w[A][1] = m, this;
        }
        hr.prototype.clear = Ps, hr.prototype.delete = Xr, hr.prototype.get = ps, hr.prototype.has = hl, hr.prototype.set = Bu;
        function Ga(d) {
          var m = -1, w = d == null ? 0 : d.length;
          for (this.clear(); ++m < w; ) {
            var A = d[m];
            this.set(A[0], A[1]);
          }
        }
        function py() {
          this.size = 0, this.__data__ = {
            hash: new qn(),
            map: new (jc || hr)(),
            string: new qn()
          };
        }
        function Ql(d) {
          var m = fh(this, d).delete(d);
          return this.size -= m ? 1 : 0, m;
        }
        function Vu(d) {
          return fh(this, d).get(d);
        }
        function ya(d) {
          return fh(this, d).has(d);
        }
        function zp(d, m) {
          var w = fh(this, d), A = w.size;
          return w.set(d, m), this.size += w.size == A ? 0 : 1, this;
        }
        Ga.prototype.clear = py, Ga.prototype.delete = Ql, Ga.prototype.get = Vu, Ga.prototype.has = ya, Ga.prototype.set = zp;
        function Hu(d) {
          var m = -1, w = d == null ? 0 : d.length;
          for (this.__data__ = new Ga(); ++m < w; )
            this.add(d[m]);
        }
        function dl(d) {
          return this.__data__.set(d, p), this;
        }
        function ao(d) {
          return this.__data__.has(d);
        }
        Hu.prototype.add = Hu.prototype.push = dl, Hu.prototype.has = ao;
        function la(d) {
          var m = this.__data__ = new hr(d);
          this.size = m.size;
        }
        function so() {
          this.__data__ = new hr(), this.size = 0;
        }
        function zc(d) {
          var m = this.__data__, w = m.delete(d);
          return this.size = m.size, w;
        }
        function gs(d) {
          return this.__data__.get(d);
        }
        function ms(d) {
          return this.__data__.has(d);
        }
        function Io(d, m) {
          var w = this.__data__;
          if (w instanceof hr) {
            var A = w.__data__;
            if (!jc || A.length < a - 1)
              return A.push([d, m]), this.size = ++w.size, this;
            w = this.__data__ = new Ga(A);
          }
          return w.set(d, m), this.size = w.size, this;
        }
        la.prototype.clear = so, la.prototype.delete = zc, la.prototype.get = gs, la.prototype.has = ms, la.prototype.set = Io;
        function Ya(d, m) {
          var w = vn(d), A = !w && Zd(d), j = !w && !A && Sl(d), Y = !w && !A && !j && Ci(d), te = w || A || j || Y, ce = te ? Uf(d.length, Ic) : [], ge = ce.length;
          for (var Ue in d)
            (m || ni.call(d, Ue)) && !(te && // Safari 9 has enumerable `arguments.length` in strict mode.
            (Ue == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
            j && (Ue == "offset" || Ue == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
            Y && (Ue == "buffer" || Ue == "byteLength" || Ue == "byteOffset") || // Skip index properties.
            Es(Ue, ge))) && ce.push(Ue);
          return ce;
        }
        function ua(d) {
          var m = d.length;
          return m ? d[sr(0, m - 1)] : t;
        }
        function $c(d, m) {
          return js(La(d), Jl(m, 0, d.length));
        }
        function Wu(d) {
          return js(La(d));
        }
        function Xf(d, m, w) {
          (w !== t && !$o(d[m], w) || w === t && !(m in d)) && Po(d, m, w);
        }
        function Gu(d, m, w) {
          var A = d[m];
          (!(ni.call(d, m) && $o(A, w)) || w === t && !(m in d)) && Po(d, m, w);
        }
        function Oa(d, m) {
          for (var w = d.length; w--; )
            if ($o(d[w][0], m))
              return w;
          return -1;
        }
        function ks(d, m, w, A) {
          return Di(d, function(j, Y, te) {
            m(A, j, w(j), te);
          }), A;
        }
        function zi(d, m) {
          return d && Xa(m, ia(m), d);
        }
        function oo(d, m) {
          return d && Xa(m, mo(m), d);
        }
        function Po(d, m, w) {
          m == "__proto__" && dd ? dd(d, m, {
            configurable: !0,
            enumerable: !0,
            value: w,
            writable: !0
          }) : d[m] = w;
        }
        function _d(d, m) {
          for (var w = -1, A = m.length, j = xe(A), Y = d == null; ++w < A; )
            j[w] = Y ? t : X_(d, m[w]);
          return j;
        }
        function Jl(d, m, w) {
          return d === d && (w !== t && (d = d <= w ? d : w), m !== t && (d = d >= m ? d : m)), d;
        }
        function qa(d, m, w, A, j, Y) {
          var te, ce = m & S, ge = m & b, Ue = m & T;
          if (w && (te = j ? w(d, A, j, Y) : w(d)), te !== t)
            return te;
          if (!Mr(d))
            return d;
          var Be = vn(d);
          if (Be) {
            if (te = uo(d), !ce)
              return La(d, te);
          } else {
            var He = or(d), ot = He == hn || He == Je;
            if (Sl(d))
              return Rd(d, ce);
            if (He == Nn || He == De || ot && !j) {
              if (te = ge || ot ? {} : gr(d), !ce)
                return ge ? Fs(d, oo(te, d)) : nc(d, zi(te, d));
            } else {
              if (!An[He])
                return j ? d : {};
              te = Ia(d, He, ce);
            }
          }
          Y || (Y = new la());
          var xt = Y.get(d);
          if (xt)
            return xt;
          Y.set(d, te), OS(d) ? d.forEach(function(Xt) {
            te.add(qa(Xt, m, w, Xt, d, Y));
          }) : G_(d) && d.forEach(function(Xt, $n) {
            te.set($n, qa(Xt, m, w, $n, d, Y));
          });
          var $t = Ue ? ge ? Xc : Zp : ge ? mo : ia, yn = Be ? t : $t(d);
          return xn(yn || d, function(Xt, $n) {
            yn && ($n = Xt, Xt = d[$n]), Gu(te, $n, qa(Xt, m, w, $n, d, Y));
          }), te;
        }
        function wm(d) {
          var m = ia(d);
          return function(w) {
            return Ed(w, d, m);
          };
        }
        function Ed(d, m, w) {
          var A = w.length;
          if (d == null)
            return !A;
          for (d = bi(d); A--; ) {
            var j = w[A], Y = m[j], te = d[j];
            if (te === t && !(j in d) || !Y(te))
              return !1;
          }
          return !0;
        }
        function Cm(d, m, w) {
          if (typeof d != "function")
            throw new Ha(u);
          return yl(function() {
            d.apply(t, w);
          }, m);
        }
        function pl(d, m, w, A) {
          var j = -1, Y = Gl, te = !0, ce = d.length, ge = [], Ue = m.length;
          if (!ce)
            return ge;
          w && (m = xi(m, Lr(w))), A ? (Y = Ac, te = !1) : m.length >= a && (Y = ma, te = !1, m = new Hu(m));
          e:
            for (; ++j < ce; ) {
              var Be = d[j], He = w == null ? Be : w(Be);
              if (Be = A || Be !== 0 ? Be : 0, te && He === He) {
                for (var ot = Ue; ot--; )
                  if (m[ot] === He)
                    continue e;
                ge.push(Be);
              } else
                Y(m, He, A) || ge.push(Be);
            }
          return ge;
        }
        var Di = Nd(_a), gy = Nd(dr, !0);
        function vs(d, m) {
          var w = !0;
          return Di(d, function(A, j, Y) {
            return w = !!m(A, j, Y), w;
          }), w;
        }
        function eu(d, m, w) {
          for (var A = -1, j = d.length; ++A < j; ) {
            var Y = d[A], te = m(Y);
            if (te != null && (ce === t ? te === te && !Bo(te) : w(te, ce)))
              var ce = te, ge = Y;
          }
          return ge;
        }
        function gl(d, m, w, A) {
          var j = d.length;
          for (w = bn(w), w < 0 && (w = -w > j ? 0 : j + w), A = A === t || A > j ? j : bn(A), A < 0 && (A += j), A = w > A ? 0 : Jm(A); w < A; )
            d[w++] = m;
          return d;
        }
        function Bc(d, m) {
          var w = [];
          return Di(d, function(A, j, Y) {
            m(A, j, Y) && w.push(A);
          }), w;
        }
        function Ir(d, m, w, A, j) {
          var Y = -1, te = d.length;
          for (w || (w = D_), j || (j = []); ++Y < te; ) {
            var ce = d[Y];
            m > 0 && w(ce) ? m > 1 ? Ir(ce, m - 1, w, A, j) : Ra(j, ce) : A || (j[j.length] = ce);
          }
          return j;
        }
        var Sd = ah(), $p = ah(!0);
        function _a(d, m) {
          return d && Sd(d, m, ia);
        }
        function dr(d, m) {
          return d && $p(d, m, ia);
        }
        function rt(d, m) {
          return Ba(m, function(w) {
            return pu(d[w]);
          });
        }
        function wr(d, m) {
          m = Uo(m, d);
          for (var w = 0, A = m.length; d != null && w < A; )
            d = d[co(m[w++])];
          return w && w == A ? d : t;
        }
        function ys(d, m, w) {
          var A = m(d);
          return vn(d) ? A : Ra(A, w(d));
        }
        function Aa(d) {
          return d == null ? d === t ? Jn : Hn : Pc && Pc in bi(d) ? Im(d) : Sy(d);
        }
        function ko(d, m) {
          return d > m;
        }
        function Yu(d, m) {
          return d != null && ni.call(d, m);
        }
        function Tm(d, m) {
          return d != null && m in bi(d);
        }
        function my(d, m, w) {
          return d >= va(m, w) && d < Nr(m, w);
        }
        function wi(d, m, w) {
          for (var A = w ? Ac : Gl, j = d[0].length, Y = d.length, te = Y, ce = xe(Y), ge = 1 / 0, Ue = []; te--; ) {
            var Be = d[te];
            te && m && (Be = xi(Be, Lr(m))), ge = va(Be.length, ge), ce[te] = !w && (m || j >= 120 && Be.length >= 120) ? new Hu(te && Be) : t;
          }
          Be = d[0];
          var He = -1, ot = ce[0];
          e:
            for (; ++He < j && Ue.length < ge; ) {
              var xt = Be[He], $t = m ? m(xt) : xt;
              if (xt = w || xt !== 0 ? xt : 0, !(ot ? ma(ot, $t) : A(Ue, $t, w))) {
                for (te = Y; --te; ) {
                  var yn = ce[te];
                  if (!(yn ? ma(yn, $t) : A(d[te], $t, w)))
                    continue e;
                }
                ot && ot.push($t), Ue.push(xt);
              }
            }
          return Ue;
        }
        function qu(d, m, w, A) {
          return _a(d, function(j, Y, te) {
            m(A, w(j), Y, te);
          }), A;
        }
        function Xu(d, m, w) {
          m = Uo(m, d), d = Jc(d, m);
          var A = d == null ? d : d[co(mr(m))];
          return A == null ? t : pn(A, d, w);
        }
        function Rm(d) {
          return $r(d) && Aa(d) == De;
        }
        function xd(d) {
          return $r(d) && Aa(d) == ci;
        }
        function Kf(d) {
          return $r(d) && Aa(d) == lt;
        }
        function Fo(d, m, w, A, j) {
          return d === m ? !0 : d == null || m == null || !$r(d) && !$r(m) ? d !== d && m !== m : Mm(d, m, w, A, Fo, j);
        }
        function Mm(d, m, w, A, j, Y) {
          var te = vn(d), ce = vn(m), ge = te ? Ye : or(d), Ue = ce ? Ye : or(m);
          ge = ge == De ? Nn : ge, Ue = Ue == De ? Nn : Ue;
          var Be = ge == Nn, He = Ue == Nn, ot = ge == Ue;
          if (ot && Sl(d)) {
            if (!Sl(m))
              return !1;
            te = !0, Be = !1;
          }
          if (ot && !Be)
            return Y || (Y = new la()), te || Ci(d) ? an(d, m, w, A, j, Y) : jd(d, m, ge, w, A, j, Y);
          if (!(w & O)) {
            var xt = Be && ni.call(d, "__wrapped__"), $t = He && ni.call(m, "__wrapped__");
            if (xt || $t) {
              var yn = xt ? d.value() : d, Xt = $t ? m.value() : m;
              return Y || (Y = new la()), j(yn, Xt, w, A, Y);
            }
          }
          return ot ? (Y || (Y = new la()), Kp(d, m, w, A, j, Y)) : !1;
        }
        function Bp(d) {
          return $r(d) && or(d) == Pt;
        }
        function Vp(d, m, w, A) {
          var j = w.length, Y = j, te = !A;
          if (d == null)
            return !Y;
          for (d = bi(d); j--; ) {
            var ce = w[j];
            if (te && ce[2] ? ce[1] !== d[ce[0]] : !(ce[0] in d))
              return !1;
          }
          for (; ++j < Y; ) {
            ce = w[j];
            var ge = ce[0], Ue = d[ge], Be = ce[1];
            if (te && ce[2]) {
              if (Ue === t && !(ge in d))
                return !1;
            } else {
              var He = new la();
              if (A)
                var ot = A(Ue, Be, ge, d, m, He);
              if (!(ot === t ? Fo(Be, Ue, O | N, A, He) : ot))
                return !1;
            }
          }
          return !0;
        }
        function Om(d) {
          if (!Mr(d) || Pm(d))
            return !1;
          var m = pu(d) ? _m : It;
          return m.test(fo(d));
        }
        function vy(d) {
          return $r(d) && Aa(d) == In;
        }
        function Am(d) {
          return $r(d) && or(d) == Tn;
        }
        function Zf(d) {
          return $r(d) && Qd(d.length) && !!ei[Aa(d)];
        }
        function Qf(d) {
          return typeof d == "function" ? d : d == null ? xs : typeof d == "object" ? vn(d) ? jo(d[0], d[1]) : Jf(d) : WS(d);
        }
        function Hp(d) {
          if (!zd(d))
            return Fc(d);
          var m = [];
          for (var w in bi(d))
            ni.call(d, w) && w != "constructor" && m.push(w);
          return m;
        }
        function yy(d) {
          if (!Mr(d))
            return km(d);
          var m = zd(d), w = [];
          for (var A in d)
            A == "constructor" && (m || !ni.call(d, A)) || w.push(A);
          return w;
        }
        function Ku(d, m) {
          return d < m;
        }
        function Lm(d, m) {
          var w = -1, A = go(d) ? xe(d.length) : [];
          return Di(d, function(j, Y, te) {
            A[++w] = m(j, Y, te);
          }), A;
        }
        function Jf(d) {
          var m = Qp(d);
          return m.length == 1 && m[0][2] ? $d(m[0][0], m[0][1]) : function(w) {
            return w === d || Vp(w, d, m);
          };
        }
        function jo(d, m) {
          return dh(d) && Qc(m) ? $d(co(d), m) : function(w) {
            var A = X_(w, d);
            return A === t && A === m ? Sg(w, d) : Fo(m, A, O | N);
          };
        }
        function tu(d, m, w, A, j) {
          d !== m && Sd(m, function(Y, te) {
            if (j || (j = new la()), Mr(Y))
              bd(d, m, te, w, tu, A, j);
            else {
              var ce = A ? A(Kr(d, te), Y, te + "", d, m, j) : t;
              ce === t && (ce = Y), Xf(d, te, ce);
            }
          }, mo);
        }
        function bd(d, m, w, A, j, Y, te) {
          var ce = Kr(d, w), ge = Kr(m, w), Ue = te.get(ge);
          if (Ue) {
            Xf(d, w, Ue);
            return;
          }
          var Be = Y ? Y(ce, ge, w + "", d, m, te) : t, He = Be === t;
          if (He) {
            var ot = vn(ge), xt = !ot && Sl(ge), $t = !ot && !xt && Ci(ge);
            Be = ge, ot || xt || $t ? vn(ce) ? Be = ce : ur(ce) ? Be = La(ce) : xt ? (He = !1, Be = Rd(ge, !0)) : $t ? (He = !1, Be = Od(ge, !0)) : Be = [] : of(ge) || Zd(ge) ? (Be = ce, Zd(ce) ? Be = NS(ce) : (!Mr(ce) || pu(ce)) && (Be = gr(ge))) : He = !1;
          }
          He && (te.set(ge, Be), j(Be, ge, A, Y, te), te.delete(ge)), Xf(d, w, Be);
        }
        function nu(d, m) {
          var w = d.length;
          if (w)
            return m += m < 0 ? w : 0, Es(m, w) ? d[m] : t;
        }
        function Wp(d, m, w) {
          m.length ? m = xi(m, function(Y) {
            return vn(Y) ? function(te) {
              return wr(te, Y.length === 1 ? Y[0] : Y);
            } : Y;
          }) : m = [xs];
          var A = -1;
          m = xi(m, Lr(jt()));
          var j = Lm(d, function(Y, te, ce) {
            var ge = xi(m, function(Ue) {
              return Ue(Y);
            });
            return { criteria: ge, index: ++A, value: Y };
          });
          return gm(j, function(Y, te) {
            return Yp(Y, te, w);
          });
        }
        function eh(d, m) {
          return wd(d, m, function(w, A) {
            return Sg(d, A);
          });
        }
        function wd(d, m, w) {
          for (var A = -1, j = m.length, Y = {}; ++A < j; ) {
            var te = m[A], ce = wr(d, te);
            w(ce, te) && Ji(Y, Uo(te, d), ce);
          }
          return Y;
        }
        function Ft(d) {
          return function(m) {
            return wr(m, d);
          };
        }
        function Ot(d, m, w, A) {
          var j = A ? Np : Nc, Y = -1, te = m.length, ce = d;
          for (d === m && (m = La(m)), w && (ce = xi(d, Lr(w))); ++Y < te; )
            for (var ge = 0, Ue = m[Y], Be = w ? w(Ue) : Ue; (ge = j(ce, Be, ge, A)) > -1; )
              ce !== d && Uu.call(ce, ge, 1), Uu.call(d, ge, 1);
          return d;
        }
        function Wn(d, m) {
          for (var w = d ? m.length : 0, A = w - 1; w--; ) {
            var j = m[w];
            if (w == A || j !== Y) {
              var Y = j;
              Es(j) ? Uu.call(d, j, 1) : au(d, j);
            }
          }
          return d;
        }
        function sr(d, m) {
          return d + Ds(Yf() * (m - d + 1));
        }
        function lo(d, m, w, A) {
          for (var j = -1, Y = Nr(to((m - d) / (w || 1)), 0), te = xe(Y); Y--; )
            te[A ? Y : ++j] = d, d += w;
          return te;
        }
        function Vc(d, m) {
          var w = "";
          if (!d || m < 1 || m > se)
            return w;
          do
            m % 2 && (w += d), m = Ds(m / 2), m && (d += d);
          while (m);
          return w;
        }
        function mn(d, m) {
          return rc(ph(d, m, xs), d + "");
        }
        function Hc(d) {
          return ua(tp(d));
        }
        function pr(d, m) {
          var w = tp(d);
          return js(w, Jl(m, 0, w.length));
        }
        function Ji(d, m, w, A) {
          if (!Mr(d))
            return d;
          m = Uo(m, d);
          for (var j = -1, Y = m.length, te = Y - 1, ce = d; ce != null && ++j < Y; ) {
            var ge = co(m[j]), Ue = w;
            if (ge === "__proto__" || ge === "constructor" || ge === "prototype")
              return d;
            if (j != te) {
              var Be = ce[ge];
              Ue = A ? A(Be, ge, ce) : t, Ue === t && (Ue = Mr(Be) ? Be : Es(m[j + 1]) ? [] : {});
            }
            Gu(ce, ge, Ue), ce = ce[ge];
          }
          return d;
        }
        var je = vd ? function(d, m) {
          return vd.set(d, m), d;
        } : xs, Pr = dd ? function(d, m) {
          return dd(d, "toString", {
            configurable: !0,
            enumerable: !1,
            value: s1(m),
            writable: !0
          });
        } : xs;
        function Bt(d) {
          return js(tp(d));
        }
        function kr(d, m, w) {
          var A = -1, j = d.length;
          m < 0 && (m = -m > j ? 0 : j + m), w = w > j ? j : w, w < 0 && (w += j), j = m > w ? 0 : w - m >>> 0, m >>>= 0;
          for (var Y = xe(j); ++A < j; )
            Y[A] = d[A + m];
          return Y;
        }
        function iu(d, m) {
          var w;
          return Di(d, function(A, j, Y) {
            return w = m(A, j, Y), !w;
          }), !!w;
        }
        function er(d, m, w) {
          var A = 0, j = d == null ? A : d.length;
          if (typeof m == "number" && m === m && j <= Le) {
            for (; A < j; ) {
              var Y = A + j >>> 1, te = d[Y];
              te !== null && !Bo(te) && (w ? te <= m : te < m) ? A = Y + 1 : j = Y;
            }
            return j;
          }
          return _s(d, m, xs, w);
        }
        function _s(d, m, w, A) {
          var j = 0, Y = d == null ? 0 : d.length;
          if (Y === 0)
            return 0;
          m = w(m);
          for (var te = m !== m, ce = m === null, ge = Bo(m), Ue = m === t; j < Y; ) {
            var Be = Ds((j + Y) / 2), He = w(d[Be]), ot = He !== t, xt = He === null, $t = He === He, yn = Bo(He);
            if (te)
              var Xt = A || $t;
            else
              Ue ? Xt = $t && (A || ot) : ce ? Xt = $t && ot && (A || !xt) : ge ? Xt = $t && ot && !xt && (A || !yn) : xt || yn ? Xt = !1 : Xt = A ? He <= m : He < m;
            Xt ? j = Be + 1 : Y = Be;
          }
          return va(Y, ee);
        }
        function Zu(d, m) {
          for (var w = -1, A = d.length, j = 0, Y = []; ++w < A; ) {
            var te = d[w], ce = m ? m(te) : te;
            if (!w || !$o(ce, ge)) {
              var ge = ce;
              Y[j++] = te === 0 ? 0 : te;
            }
          }
          return Y;
        }
        function ru(d) {
          return typeof d == "number" ? d : Bo(d) ? q : +d;
        }
        function $i(d) {
          if (typeof d == "string")
            return d;
          if (vn(d))
            return xi(d, $i) + "";
          if (Bo(d))
            return jp ? jp.call(d) : "";
          var m = d + "";
          return m == "0" && 1 / d == -le ? "-0" : m;
        }
        function Fr(d, m, w) {
          var A = -1, j = Gl, Y = d.length, te = !0, ce = [], ge = ce;
          if (w)
            te = !1, j = Ac;
          else if (Y >= a) {
            var Ue = m ? null : jr(d);
            if (Ue)
              return ku(Ue);
            te = !1, j = ma, ge = new Hu();
          } else
            ge = m ? [] : ce;
          e:
            for (; ++A < Y; ) {
              var Be = d[A], He = m ? m(Be) : Be;
              if (Be = w || Be !== 0 ? Be : 0, te && He === He) {
                for (var ot = ge.length; ot--; )
                  if (ge[ot] === He)
                    continue e;
                m && ge.push(He), ce.push(Be);
              } else
                j(ge, He, w) || (ge !== ce && ge.push(He), ce.push(Be));
            }
          return ce;
        }
        function au(d, m) {
          return m = Uo(m, d), d = Jc(d, m), d == null || delete d[co(mr(m))];
        }
        function th(d, m, w, A) {
          return Ji(d, m, w(wr(d, m)), A);
        }
        function Qu(d, m, w, A) {
          for (var j = d.length, Y = A ? j : -1; (A ? Y-- : ++Y < j) && m(d[Y], Y, d); )
            ;
          return w ? kr(d, A ? 0 : Y, A ? Y + 1 : j) : kr(d, A ? Y + 1 : 0, A ? j : Y);
        }
        function Cd(d, m) {
          var w = d;
          return w instanceof gn && (w = w.value()), Lc(m, function(A, j) {
            return j.func.apply(j.thisArg, Ra([A], j.args));
          }, w);
        }
        function nh(d, m, w) {
          var A = d.length;
          if (A < 2)
            return A ? Fr(d[0]) : [];
          for (var j = -1, Y = xe(A); ++j < A; )
            for (var te = d[j], ce = -1; ++ce < A; )
              ce != j && (Y[j] = pl(Y[j] || te, d[ce], m, w));
          return Fr(Ir(Y, 1), m, w);
        }
        function Td(d, m, w) {
          for (var A = -1, j = d.length, Y = m.length, te = {}; ++A < j; ) {
            var ce = A < Y ? m[A] : t;
            w(te, d[A], ce);
          }
          return te;
        }
        function ih(d) {
          return ur(d) ? d : [];
        }
        function rh(d) {
          return typeof d == "function" ? d : xs;
        }
        function Uo(d, m) {
          return vn(d) ? d : dh(d, m) ? [d] : xy(Ti(d));
        }
        var Gp = mn;
        function zo(d, m, w) {
          var A = d.length;
          return w = w === t ? A : w, !m && w >= A ? d : kr(d, m, w);
        }
        var Ju = hy || function(d) {
          return Li.clearTimeout(d);
        };
        function Rd(d, m) {
          if (m)
            return d.slice();
          var w = d.length, A = Em ? Em(w) : new d.constructor(w);
          return d.copy(A), A;
        }
        function ec(d) {
          var m = new d.constructor(d.byteLength);
          return new fd(m).set(new fd(d)), m;
        }
        function Wc(d, m) {
          var w = m ? ec(d.buffer) : d.buffer;
          return new d.constructor(w, d.byteOffset, d.byteLength);
        }
        function Gc(d) {
          var m = new d.constructor(d.source, Sn.exec(d));
          return m.lastIndex = d.lastIndex, m;
        }
        function Md(d) {
          return Wa ? bi(Wa.call(d)) : {};
        }
        function Od(d, m) {
          var w = m ? ec(d.buffer) : d.buffer;
          return new d.constructor(w, d.byteOffset, d.length);
        }
        function Ad(d, m) {
          if (d !== m) {
            var w = d !== t, A = d === null, j = d === d, Y = Bo(d), te = m !== t, ce = m === null, ge = m === m, Ue = Bo(m);
            if (!ce && !Ue && !Y && d > m || Y && te && ge && !ce && !Ue || A && te && ge || !w && ge || !j)
              return 1;
            if (!A && !Y && !Ue && d < m || Ue && w && j && !A && !Y || ce && w && j || !te && j || !ge)
              return -1;
          }
          return 0;
        }
        function Yp(d, m, w) {
          for (var A = -1, j = d.criteria, Y = m.criteria, te = j.length, ce = w.length; ++A < te; ) {
            var ge = Ad(j[A], Y[A]);
            if (ge) {
              if (A >= ce)
                return ge;
              var Ue = w[A];
              return ge * (Ue == "desc" ? -1 : 1);
            }
          }
          return d.index - m.index;
        }
        function qp(d, m, w, A) {
          for (var j = -1, Y = d.length, te = w.length, ce = -1, ge = m.length, Ue = Nr(Y - te, 0), Be = xe(ge + Ue), He = !A; ++ce < ge; )
            Be[ce] = m[ce];
          for (; ++j < te; )
            (He || j < Y) && (Be[w[j]] = d[j]);
          for (; Ue--; )
            Be[ce++] = d[j++];
          return Be;
        }
        function tc(d, m, w, A) {
          for (var j = -1, Y = d.length, te = -1, ce = w.length, ge = -1, Ue = m.length, Be = Nr(Y - ce, 0), He = xe(Be + Ue), ot = !A; ++j < Be; )
            He[j] = d[j];
          for (var xt = j; ++ge < Ue; )
            He[xt + ge] = m[ge];
          for (; ++te < ce; )
            (ot || j < Y) && (He[xt + w[te]] = d[j++]);
          return He;
        }
        function La(d, m) {
          var w = -1, A = d.length;
          for (m || (m = xe(A)); ++w < A; )
            m[w] = d[w];
          return m;
        }
        function Xa(d, m, w, A) {
          var j = !w;
          w || (w = {});
          for (var Y = -1, te = m.length; ++Y < te; ) {
            var ce = m[Y], ge = A ? A(w[ce], d[ce], ce, w, d) : t;
            ge === t && (ge = d[ce]), j ? Po(w, ce, ge) : Gu(w, ce, ge);
          }
          return w;
        }
        function nc(d, m) {
          return Xa(d, Kc(d), m);
        }
        function Fs(d, m) {
          return Xa(d, Cr(d), m);
        }
        function Ld(d, m) {
          return function(w, A) {
            var j = vn(w) ? vi : ks, Y = m ? m() : {};
            return j(w, d, jt(A, 2), Y);
          };
        }
        function oi(d) {
          return mn(function(m, w) {
            var A = -1, j = w.length, Y = j > 1 ? w[j - 1] : t, te = j > 2 ? w[2] : t;
            for (Y = d.length > 3 && typeof Y == "function" ? (j--, Y) : t, te && li(w[0], w[1], te) && (Y = j < 3 ? t : Y, j = 1), m = bi(m); ++A < j; ) {
              var ce = w[A];
              ce && d(m, ce, A, Y);
            }
            return m;
          });
        }
        function Nd(d, m) {
          return function(w, A) {
            if (w == null)
              return w;
            if (!go(w))
              return d(w, A);
            for (var j = w.length, Y = m ? j : -1, te = bi(w); (m ? Y-- : ++Y < j) && A(te[Y], Y, te) !== !1; )
              ;
            return w;
          };
        }
        function ah(d) {
          return function(m, w, A) {
            for (var j = -1, Y = bi(m), te = A(m), ce = te.length; ce--; ) {
              var ge = te[d ? ce : ++j];
              if (w(Y[ge], ge, Y) === !1)
                break;
            }
            return m;
          };
        }
        function sh(d, m, w) {
          var A = m & D, j = Dd(d);
          function Y() {
            var te = this && this !== Li && this instanceof Y ? j : d;
            return te.apply(A ? w : this, arguments);
          }
          return Y;
        }
        function oh(d) {
          return function(m) {
            m = Ti(m);
            var w = Bf(m) ? ds(m) : t, A = w ? w[0] : m.charAt(0), j = w ? zo(w, 1).join("") : m.slice(1);
            return A[d]() + j;
          };
        }
        function su(d) {
          return function(m) {
            return Lc(VS(iv(m).replace(fr, "")), d, "");
          };
        }
        function Dd(d) {
          return function() {
            var m = arguments;
            switch (m.length) {
              case 0:
                return new d();
              case 1:
                return new d(m[0]);
              case 2:
                return new d(m[0], m[1]);
              case 3:
                return new d(m[0], m[1], m[2]);
              case 4:
                return new d(m[0], m[1], m[2], m[3]);
              case 5:
                return new d(m[0], m[1], m[2], m[3], m[4]);
              case 6:
                return new d(m[0], m[1], m[2], m[3], m[4], m[5]);
              case 7:
                return new d(m[0], m[1], m[2], m[3], m[4], m[5], m[6]);
            }
            var w = qf(d.prototype), A = d.apply(w, m);
            return Mr(A) ? A : w;
          };
        }
        function L_(d, m, w) {
          var A = Dd(d);
          function j() {
            for (var Y = arguments.length, te = xe(Y), ce = Y, ge = cu(j); ce--; )
              te[ce] = arguments[ce];
            var Ue = Y < 3 && te[0] !== ge && te[Y - 1] !== ge ? [] : eo(te, ge);
            if (Y -= Ue.length, Y < w)
              return Dm(
                d,
                m,
                lh,
                j.placeholder,
                t,
                te,
                Ue,
                t,
                t,
                w - Y
              );
            var Be = this && this !== Li && this instanceof j ? A : d;
            return pn(Be, this, te);
          }
          return j;
        }
        function _y(d) {
          return function(m, w, A) {
            var j = bi(m);
            if (!go(m)) {
              var Y = jt(w, 3);
              m = ia(m), w = function(ce) {
                return Y(j[ce], ce, j);
              };
            }
            var te = d(m, w, A);
            return te > -1 ? j[Y ? m[te] : te] : t;
          };
        }
        function ou(d) {
          return lu(function(m) {
            var w = m.length, A = w, j = Dr.prototype.thru;
            for (d && m.reverse(); A--; ) {
              var Y = m[A];
              if (typeof Y != "function")
                throw new Ha(u);
              if (j && !te && Ud(Y) == "wrapper")
                var te = new Dr([], !0);
            }
            for (A = te ? A : w; ++A < w; ) {
              Y = m[A];
              var ce = Ud(Y), ge = ce == "wrapper" ? uu(Y) : t;
              ge && ic(ge[0]) && ge[1] == (ie | B | z | ue) && !ge[4].length && ge[9] == 1 ? te = te[Ud(ge[0])].apply(te, ge[3]) : te = Y.length == 1 && ic(Y) ? te[ce]() : te.thru(Y);
            }
            return function() {
              var Ue = arguments, Be = Ue[0];
              if (te && Ue.length == 1 && vn(Be))
                return te.plant(Be).value();
              for (var He = 0, ot = w ? m[He].apply(this, Ue) : Be; ++He < w; )
                ot = m[He].call(this, ot);
              return ot;
            };
          });
        }
        function lh(d, m, w, A, j, Y, te, ce, ge, Ue) {
          var Be = m & ie, He = m & D, ot = m & k, xt = m & (B | V), $t = m & Re, yn = ot ? t : Dd(d);
          function Xt() {
            for (var $n = arguments.length, Gn = xe($n), vo = $n; vo--; )
              Gn[vo] = arguments[vo];
            if (xt)
              var Fa = cu(Xt), Br = ry(Gn, Fa);
            if (A && (Gn = qp(Gn, A, j, xt)), Y && (Gn = tc(Gn, Y, te, xt)), $n -= Br, xt && $n < Ue) {
              var Vr = eo(Gn, Fa);
              return Dm(
                d,
                m,
                lh,
                Xt.placeholder,
                w,
                Gn,
                Vr,
                ce,
                ge,
                Ue - $n
              );
            }
            var yo = He ? w : this, Qa = ot ? yo[d] : d;
            return $n = Gn.length, ce ? Gn = lr(Gn, ce) : $t && $n > 1 && Gn.reverse(), Be && ge < $n && (Gn.length = ge), this && this !== Li && this instanceof Xt && (Qa = yn || Dd(Qa)), Qa.apply(yo, Gn);
          }
          return Xt;
        }
        function uh(d, m) {
          return function(w, A) {
            return qu(w, d, m(A), {});
          };
        }
        function Id(d, m) {
          return function(w, A) {
            var j;
            if (w === t && A === t)
              return m;
            if (w !== t && (j = w), A !== t) {
              if (j === t)
                return A;
              typeof w == "string" || typeof A == "string" ? (w = $i(w), A = $i(A)) : (w = ru(w), A = ru(A)), j = d(w, A);
            }
            return j;
          };
        }
        function Xp(d) {
          return lu(function(m) {
            return m = xi(m, Lr(jt())), mn(function(w) {
              var A = this;
              return d(m, function(j) {
                return pn(j, A, w);
              });
            });
          });
        }
        function Pd(d, m) {
          m = m === t ? " " : $i(m);
          var w = m.length;
          if (w < 2)
            return w ? Vc(m, d) : m;
          var A = Vc(m, to(d / Fu(m)));
          return Bf(m) ? zo(ds(A), 0, d).join("") : A.slice(0, d);
        }
        function kd(d, m, w, A) {
          var j = m & D, Y = Dd(d);
          function te() {
            for (var ce = -1, ge = arguments.length, Ue = -1, Be = A.length, He = xe(Be + ge), ot = this && this !== Li && this instanceof te ? Y : d; ++Ue < Be; )
              He[Ue] = A[Ue];
            for (; ge--; )
              He[Ue++] = arguments[++ce];
            return pn(ot, j ? w : this, He);
          }
          return te;
        }
        function Nm(d) {
          return function(m, w, A) {
            return A && typeof A != "number" && li(m, w, A) && (w = A = t), m = Vo(m), w === t ? (w = m, m = 0) : w = Vo(w), A = A === t ? m < w ? 1 : -1 : Vo(A), lo(m, w, A, d);
          };
        }
        function ch(d) {
          return function(m, w) {
            return typeof m == "string" && typeof w == "string" || (m = Za(m), w = Za(w)), d(m, w);
          };
        }
        function Dm(d, m, w, A, j, Y, te, ce, ge, Ue) {
          var Be = m & B, He = Be ? te : t, ot = Be ? t : te, xt = Be ? Y : t, $t = Be ? t : Y;
          m |= Be ? z : G, m &= ~(Be ? G : z), m & $ || (m &= ~(D | k));
          var yn = [
            d,
            m,
            j,
            xt,
            He,
            $t,
            ot,
            ce,
            ge,
            Ue
          ], Xt = w.apply(t, yn);
          return ic(d) && Pa(Xt, yn), Xt.placeholder = A, Jr(Xt, d, m);
        }
        function Na(d) {
          var m = qr[d];
          return function(w, A) {
            if (w = Za(w), A = A == null ? 0 : va(bn(A), 292), A && kc(w)) {
              var j = (Ti(w) + "e").split("e"), Y = m(j[0] + "e" + (+j[1] + A));
              return j = (Ti(Y) + "e").split("e"), +(j[0] + "e" + (+j[1] - A));
            }
            return m(w);
          };
        }
        var jr = fl && 1 / ku(new fl([, -0]))[1] == le ? function(d) {
          return new fl(d);
        } : u1;
        function Yc(d) {
          return function(m) {
            var w = or(m);
            return w == Pt ? ad(m) : w == Tn ? oy(m) : iy(m, d(m));
          };
        }
        function Da(d, m, w, A, j, Y, te, ce) {
          var ge = m & k;
          if (!ge && typeof d != "function")
            throw new Ha(u);
          var Ue = A ? A.length : 0;
          if (Ue || (m &= ~(z | G), A = j = t), te = te === t ? te : Nr(bn(te), 0), ce = ce === t ? ce : bn(ce), Ue -= j ? j.length : 0, m & G) {
            var Be = A, He = j;
            A = j = t;
          }
          var ot = ge ? t : uu(d), xt = [
            d,
            m,
            w,
            A,
            j,
            Be,
            He,
            Y,
            te,
            ce
          ];
          if (ot && Ey(xt, ot), d = xt[0], m = xt[1], w = xt[2], A = xt[3], j = xt[4], ce = xt[9] = xt[9] === t ? ge ? 0 : d.length : Nr(xt[9] - Ue, 0), !ce && m & (B | V) && (m &= ~(B | V)), !m || m == D)
            var $t = sh(d, m, w);
          else
            m == B || m == V ? $t = L_(d, m, ce) : (m == z || m == (D | z)) && !j.length ? $t = kd(d, m, w, A) : $t = lh.apply(t, xt);
          var yn = ot ? je : Pa;
          return Jr(yn($t, xt), d, m);
        }
        function Fd(d, m, w, A) {
          return d === t || $o(d, cl[w]) && !ni.call(A, w) ? m : d;
        }
        function Ka(d, m, w, A, j, Y) {
          return Mr(d) && Mr(m) && (Y.set(m, d), tu(d, m, t, Ka, Y), Y.delete(m)), d;
        }
        function qc(d) {
          return of(d) ? t : d;
        }
        function an(d, m, w, A, j, Y) {
          var te = w & O, ce = d.length, ge = m.length;
          if (ce != ge && !(te && ge > ce))
            return !1;
          var Ue = Y.get(d), Be = Y.get(m);
          if (Ue && Be)
            return Ue == m && Be == d;
          var He = -1, ot = !0, xt = w & N ? new Hu() : t;
          for (Y.set(d, m), Y.set(m, d); ++He < ce; ) {
            var $t = d[He], yn = m[He];
            if (A)
              var Xt = te ? A(yn, $t, He, m, d, Y) : A($t, yn, He, d, m, Y);
            if (Xt !== t) {
              if (Xt)
                continue;
              ot = !1;
              break;
            }
            if (xt) {
              if (!id(m, function($n, Gn) {
                if (!ma(xt, Gn) && ($t === $n || j($t, $n, w, A, Y)))
                  return xt.push(Gn);
              })) {
                ot = !1;
                break;
              }
            } else if (!($t === yn || j($t, yn, w, A, Y))) {
              ot = !1;
              break;
            }
          }
          return Y.delete(d), Y.delete(m), ot;
        }
        function jd(d, m, w, A, j, Y, te) {
          switch (w) {
            case dn:
              if (d.byteLength != m.byteLength || d.byteOffset != m.byteOffset)
                return !1;
              d = d.buffer, m = m.buffer;
            case ci:
              return !(d.byteLength != m.byteLength || !Y(new fd(d), new fd(m)));
            case Xe:
            case lt:
            case Vn:
              return $o(+d, +m);
            case Ct:
              return d.name == m.name && d.message == m.message;
            case In:
            case Pn:
              return d == m + "";
            case Pt:
              var ce = ad;
            case Tn:
              var ge = A & O;
              if (ce || (ce = ku), d.size != m.size && !ge)
                return !1;
              var Ue = te.get(d);
              if (Ue)
                return Ue == m;
              A |= N, te.set(d, m);
              var Be = an(ce(d), ce(m), A, j, Y, te);
              return te.delete(d), Be;
            case Qn:
              if (Wa)
                return Wa.call(d) == Wa.call(m);
          }
          return !1;
        }
        function Kp(d, m, w, A, j, Y) {
          var te = w & O, ce = Zp(d), ge = ce.length, Ue = Zp(m), Be = Ue.length;
          if (ge != Be && !te)
            return !1;
          for (var He = ge; He--; ) {
            var ot = ce[He];
            if (!(te ? ot in m : ni.call(m, ot)))
              return !1;
          }
          var xt = Y.get(d), $t = Y.get(m);
          if (xt && $t)
            return xt == m && $t == d;
          var yn = !0;
          Y.set(d, m), Y.set(m, d);
          for (var Xt = te; ++He < ge; ) {
            ot = ce[He];
            var $n = d[ot], Gn = m[ot];
            if (A)
              var vo = te ? A(Gn, $n, ot, m, d, Y) : A($n, Gn, ot, d, m, Y);
            if (!(vo === t ? $n === Gn || j($n, Gn, w, A, Y) : vo)) {
              yn = !1;
              break;
            }
            Xt || (Xt = ot == "constructor");
          }
          if (yn && !Xt) {
            var Fa = d.constructor, Br = m.constructor;
            Fa != Br && "constructor" in d && "constructor" in m && !(typeof Fa == "function" && Fa instanceof Fa && typeof Br == "function" && Br instanceof Br) && (yn = !1);
          }
          return Y.delete(d), Y.delete(m), yn;
        }
        function lu(d) {
          return rc(ph(d, t, tf), d + "");
        }
        function Zp(d) {
          return ys(d, ia, Kc);
        }
        function Xc(d) {
          return ys(d, mo, Cr);
        }
        var uu = vd ? function(d) {
          return vd.get(d);
        } : u1;
        function Ud(d) {
          for (var m = d.name + "", w = zu[m], A = ni.call(zu, m) ? w.length : 0; A--; ) {
            var j = w[A], Y = j.func;
            if (Y == null || Y == d)
              return j.name;
          }
          return m;
        }
        function cu(d) {
          var m = ni.call(H, "placeholder") ? H : d;
          return m.placeholder;
        }
        function jt() {
          var d = H.iteratee || o1;
          return d = d === o1 ? Qf : d, arguments.length ? d(arguments[0], arguments[1]) : d;
        }
        function fh(d, m) {
          var w = d.__data__;
          return vt(m) ? w[typeof m == "string" ? "string" : "hash"] : w.map;
        }
        function Qp(d) {
          for (var m = ia(d), w = m.length; w--; ) {
            var A = m[w], j = d[A];
            m[w] = [A, j, Qc(j)];
          }
          return m;
        }
        function ml(d, m) {
          var w = Pu(d, m);
          return Om(w) ? w : t;
        }
        function Im(d) {
          var m = ni.call(d, Pc), w = d[Pc];
          try {
            d[Pc] = t;
            var A = !0;
          } catch {
          }
          var j = ld.call(d);
          return A && (m ? d[Pc] = w : delete d[Pc]), j;
        }
        var Kc = gd ? function(d) {
          return d == null ? [] : (d = bi(d), Ba(gd(d), function(m) {
            return Gf.call(d, m);
          }));
        } : f1, Cr = gd ? function(d) {
          for (var m = []; d; )
            Ra(m, Kc(d)), d = No(d);
          return m;
        } : f1, or = Aa;
        (md && or(new md(new ArrayBuffer(1))) != dn || jc && or(new jc()) != Pt || Xl && or(Xl.resolve()) != Si || fl && or(new fl()) != Tn || Kl && or(new Kl()) != ui) && (or = function(d) {
          var m = Aa(d), w = m == Nn ? d.constructor : t, A = w ? fo(w) : "";
          if (A)
            switch (A) {
              case bm:
                return dn;
              case Is:
                return Pt;
              case yd:
                return Si;
              case Zl:
                return Tn;
              case no:
                return ui;
            }
          return m;
        });
        function vl(d, m, w) {
          for (var A = -1, j = w.length; ++A < j; ) {
            var Y = w[A], te = Y.size;
            switch (Y.type) {
              case "drop":
                d += te;
                break;
              case "dropRight":
                m -= te;
                break;
              case "take":
                m = va(m, d + te);
                break;
              case "takeRight":
                d = Nr(d, m - te);
                break;
            }
          }
          return { start: d, end: m };
        }
        function hh(d) {
          var m = d.match(Ms);
          return m ? m[1].split(Ul) : [];
        }
        function Zc(d, m, w) {
          m = Uo(m, d);
          for (var A = -1, j = m.length, Y = !1; ++A < j; ) {
            var te = co(m[A]);
            if (!(Y = d != null && w(d, te)))
              break;
            d = d[te];
          }
          return Y || ++A != j ? Y : (j = d == null ? 0 : d.length, !!j && Qd(j) && Es(te, j) && (vn(d) || Zd(d)));
        }
        function uo(d) {
          var m = d.length, w = new d.constructor(m);
          return m && typeof d[0] == "string" && ni.call(d, "index") && (w.index = d.index, w.input = d.input), w;
        }
        function gr(d) {
          return typeof d.constructor == "function" && !zd(d) ? qf(No(d)) : {};
        }
        function Ia(d, m, w) {
          var A = d.constructor;
          switch (m) {
            case ci:
              return ec(d);
            case Xe:
            case lt:
              return new A(+d);
            case dn:
              return Wc(d, w);
            case xr:
            case Wr:
            case ai:
            case at:
            case Tt:
            case nn:
            case kn:
            case Mn:
            case Oi:
              return Od(d, w);
            case Pt:
              return new A();
            case Vn:
            case Pn:
              return new A(d);
            case In:
              return Gc(d);
            case Tn:
              return new A();
            case Qn:
              return Md(d);
          }
        }
        function N_(d, m) {
          var w = m.length;
          if (!w)
            return d;
          var A = w - 1;
          return m[A] = (w > 1 ? "& " : "") + m[A], m = m.join(w > 2 ? ", " : " "), d.replace(Ta, `{
/* [wrapped with ` + m + `] */
`);
        }
        function D_(d) {
          return vn(d) || Zd(d) || !!(fy && d && d[fy]);
        }
        function Es(d, m) {
          var w = typeof d;
          return m = m ?? se, !!m && (w == "number" || w != "symbol" && ji.test(d)) && d > -1 && d % 1 == 0 && d < m;
        }
        function li(d, m, w) {
          if (!Mr(w))
            return !1;
          var A = typeof m;
          return (A == "number" ? go(w) && Es(m, w.length) : A == "string" && m in w) ? $o(w[m], d) : !1;
        }
        function dh(d, m) {
          if (vn(d))
            return !1;
          var w = typeof d;
          return w == "number" || w == "symbol" || w == "boolean" || d == null || Bo(d) ? !0 : br.test(d) || !ga.test(d) || m != null && d in bi(m);
        }
        function vt(d) {
          var m = typeof d;
          return m == "string" || m == "number" || m == "symbol" || m == "boolean" ? d !== "__proto__" : d === null;
        }
        function ic(d) {
          var m = Ud(d), w = H[m];
          if (typeof w != "function" || !(m in gn.prototype))
            return !1;
          if (d === w)
            return !0;
          var A = uu(w);
          return !!A && d === A[0];
        }
        function Pm(d) {
          return !!od && od in d;
        }
        var Jp = Hf ? pu : h1;
        function zd(d) {
          var m = d && d.constructor, w = typeof m == "function" && m.prototype || cl;
          return d === w;
        }
        function Qc(d) {
          return d === d && !Mr(d);
        }
        function $d(d, m) {
          return function(w) {
            return w == null ? !1 : w[d] === m && (m !== t || d in bi(w));
          };
        }
        function eg(d) {
          var m = fe(d, function(A) {
            return w.size === y && w.clear(), A;
          }), w = m.cache;
          return m;
        }
        function Ey(d, m) {
          var w = d[1], A = m[1], j = w | A, Y = j < (D | k | ie), te = A == ie && w == B || A == ie && w == ue && d[7].length <= m[8] || A == (ie | ue) && m[7].length <= m[8] && w == B;
          if (!(Y || te))
            return d;
          A & D && (d[2] = m[2], j |= w & D ? 0 : $);
          var ce = m[3];
          if (ce) {
            var ge = d[3];
            d[3] = ge ? qp(ge, ce, m[4]) : ce, d[4] = ge ? eo(d[3], _) : m[4];
          }
          return ce = m[5], ce && (ge = d[5], d[5] = ge ? tc(ge, ce, m[6]) : ce, d[6] = ge ? eo(d[5], _) : m[6]), ce = m[7], ce && (d[7] = ce), A & ie && (d[8] = d[8] == null ? m[8] : va(d[8], m[8])), d[9] == null && (d[9] = m[9]), d[0] = m[0], d[1] = j, d;
        }
        function km(d) {
          var m = [];
          if (d != null)
            for (var w in bi(d))
              m.push(w);
          return m;
        }
        function Sy(d) {
          return ld.call(d);
        }
        function ph(d, m, w) {
          return m = Nr(m === t ? d.length - 1 : m, 0), function() {
            for (var A = arguments, j = -1, Y = Nr(A.length - m, 0), te = xe(Y); ++j < Y; )
              te[j] = A[m + j];
            j = -1;
            for (var ce = xe(m + 1); ++j < m; )
              ce[j] = A[j];
            return ce[m] = w(te), pn(d, this, ce);
          };
        }
        function Jc(d, m) {
          return m.length < 2 ? d : wr(d, kr(m, 0, -1));
        }
        function lr(d, m) {
          for (var w = d.length, A = va(m.length, w), j = La(d); A--; ) {
            var Y = m[A];
            d[A] = Es(Y, w) ? j[Y] : t;
          }
          return d;
        }
        function Kr(d, m) {
          if (!(m === "constructor" && typeof d[m] == "function") && m != "__proto__")
            return d[m];
        }
        var Pa = Fm(je), yl = pd || function(d, m) {
          return Li.setTimeout(d, m);
        }, rc = Fm(Pr);
        function Jr(d, m, w) {
          var A = m + "";
          return rc(d, N_(A, by(hh(A), w)));
        }
        function Fm(d) {
          var m = 0, w = 0;
          return function() {
            var A = xm(), j = Fe - (A - w);
            if (w = A, j > 0) {
              if (++m >= Ee)
                return arguments[0];
            } else
              m = 0;
            return d.apply(t, arguments);
          };
        }
        function js(d, m) {
          var w = -1, A = d.length, j = A - 1;
          for (m = m === t ? A : m; ++w < m; ) {
            var Y = sr(w, j), te = d[Y];
            d[Y] = d[w], d[w] = te;
          }
          return d.length = m, d;
        }
        var xy = eg(function(d) {
          var m = [];
          return d.charCodeAt(0) === 46 && m.push(""), d.replace(Ca, function(w, A, j, Y) {
            m.push(j ? Y.replace(st, "$1") : A || w);
          }), m;
        });
        function co(d) {
          if (typeof d == "string" || Bo(d))
            return d;
          var m = d + "";
          return m == "0" && 1 / d == -le ? "-0" : m;
        }
        function fo(d) {
          if (d != null) {
            try {
              return sd.call(d);
            } catch {
            }
            try {
              return d + "";
            } catch {
            }
          }
          return "";
        }
        function by(d, m) {
          return xn(Me, function(w) {
            var A = "_." + w[0];
            m & w[1] && !Gl(d, A) && d.push(A);
          }), d.sort();
        }
        function tg(d) {
          if (d instanceof gn)
            return d.clone();
          var m = new Dr(d.__wrapped__, d.__chain__);
          return m.__actions__ = La(d.__actions__), m.__index__ = d.__index__, m.__values__ = d.__values__, m;
        }
        function I_(d, m, w) {
          (w ? li(d, m, w) : m === t) ? m = 1 : m = Nr(bn(m), 0);
          var A = d == null ? 0 : d.length;
          if (!A || m < 1)
            return [];
          for (var j = 0, Y = 0, te = xe(to(A / m)); j < A; )
            te[Y++] = kr(d, j, j += m);
          return te;
        }
        function ef(d) {
          for (var m = -1, w = d == null ? 0 : d.length, A = 0, j = []; ++m < w; ) {
            var Y = d[m];
            Y && (j[A++] = Y);
          }
          return j;
        }
        function ng() {
          var d = arguments.length;
          if (!d)
            return [];
          for (var m = xe(d - 1), w = arguments[0], A = d; A--; )
            m[A - 1] = arguments[A];
          return Ra(vn(w) ? La(w) : [w], Ir(m, 1));
        }
        var ho = mn(function(d, m) {
          return ur(d) ? pl(d, Ir(m, 1, ur, !0)) : [];
        }), Ln = mn(function(d, m) {
          var w = mr(m);
          return ur(w) && (w = t), ur(d) ? pl(d, Ir(m, 1, ur, !0), jt(w, 2)) : [];
        }), Tr = mn(function(d, m) {
          var w = mr(m);
          return ur(w) && (w = t), ur(d) ? pl(d, Ir(m, 1, ur, !0), t, w) : [];
        });
        function tr(d, m, w) {
          var A = d == null ? 0 : d.length;
          return A ? (m = w || m === t ? 1 : bn(m), kr(d, m < 0 ? 0 : m, A)) : [];
        }
        function ea(d, m, w) {
          var A = d == null ? 0 : d.length;
          return A ? (m = w || m === t ? 1 : bn(m), m = A - m, kr(d, 0, m < 0 ? 0 : m)) : [];
        }
        function Ss(d, m) {
          return d && d.length ? Qu(d, jt(m, 3), !0, !0) : [];
        }
        function gh(d, m) {
          return d && d.length ? Qu(d, jt(m, 3), !0) : [];
        }
        function ta(d, m, w, A) {
          var j = d == null ? 0 : d.length;
          return j ? (w && typeof w != "number" && li(d, m, w) && (w = 0, A = j), gl(d, m, w, A)) : [];
        }
        function mh(d, m, w) {
          var A = d == null ? 0 : d.length;
          if (!A)
            return -1;
          var j = w == null ? 0 : bn(w);
          return j < 0 && (j = Nr(A + j, 0)), rd(d, jt(m, 3), j);
        }
        function ac(d, m, w) {
          var A = d == null ? 0 : d.length;
          if (!A)
            return -1;
          var j = A - 1;
          return w !== t && (j = bn(w), j = w < 0 ? Nr(A + j, 0) : va(j, A - 1)), rd(d, jt(m, 3), j, !0);
        }
        function tf(d) {
          var m = d == null ? 0 : d.length;
          return m ? Ir(d, 1) : [];
        }
        function jm(d) {
          var m = d == null ? 0 : d.length;
          return m ? Ir(d, le) : [];
        }
        function sc(d, m) {
          var w = d == null ? 0 : d.length;
          return w ? (m = m === t ? 1 : bn(m), Ir(d, m)) : [];
        }
        function ka(d) {
          for (var m = -1, w = d == null ? 0 : d.length, A = {}; ++m < w; ) {
            var j = d[m];
            A[j[0]] = j[1];
          }
          return A;
        }
        function Bd(d) {
          return d && d.length ? d[0] : t;
        }
        function vh(d, m, w) {
          var A = d == null ? 0 : d.length;
          if (!A)
            return -1;
          var j = w == null ? 0 : bn(w);
          return j < 0 && (j = Nr(A + j, 0)), Nc(d, m, j);
        }
        function fu(d) {
          var m = d == null ? 0 : d.length;
          return m ? kr(d, 0, -1) : [];
        }
        var ig = mn(function(d) {
          var m = xi(d, ih);
          return m.length && m[0] === d[0] ? wi(m) : [];
        }), Um = mn(function(d) {
          var m = mr(d), w = xi(d, ih);
          return m === mr(w) ? m = t : w.pop(), w.length && w[0] === d[0] ? wi(w, jt(m, 2)) : [];
        }), po = mn(function(d) {
          var m = mr(d), w = xi(d, ih);
          return m = typeof m == "function" ? m : t, m && w.pop(), w.length && w[0] === d[0] ? wi(w, t, m) : [];
        });
        function yh(d, m) {
          return d == null ? "" : kp.call(d, m);
        }
        function mr(d) {
          var m = d == null ? 0 : d.length;
          return m ? d[m - 1] : t;
        }
        function rg(d, m, w) {
          var A = d == null ? 0 : d.length;
          if (!A)
            return -1;
          var j = A;
          return w !== t && (j = bn(w), j = j < 0 ? Nr(A + j, 0) : va(j, A - 1)), m === m ? ym(d, m, j) : rd(d, ny, j, !0);
        }
        function Vd(d, m) {
          return d && d.length ? nu(d, bn(m)) : t;
        }
        var ag = mn(_h);
        function _h(d, m) {
          return d && d.length && m && m.length ? Ot(d, m) : d;
        }
        function nf(d, m, w) {
          return d && d.length && m && m.length ? Ot(d, m, jt(w, 2)) : d;
        }
        function ca(d, m, w) {
          return d && d.length && m && m.length ? Ot(d, m, t, w) : d;
        }
        var hu = lu(function(d, m) {
          var w = d == null ? 0 : d.length, A = _d(d, m);
          return Wn(d, xi(m, function(j) {
            return Es(j, w) ? +j : j;
          }).sort(Ad)), A;
        });
        function vr(d, m) {
          var w = [];
          if (!(d && d.length))
            return w;
          var A = -1, j = [], Y = d.length;
          for (m = jt(m, 3); ++A < Y; ) {
            var te = d[A];
            m(te, A, d) && (w.push(te), j.push(A));
          }
          return Wn(d, j), w;
        }
        function Ur(d) {
          return d == null ? d : Fp.call(d);
        }
        function sg(d, m, w) {
          var A = d == null ? 0 : d.length;
          return A ? (w && typeof w != "number" && li(d, m, w) ? (m = 0, w = A) : (m = m == null ? 0 : bn(m), w = w === t ? A : bn(w)), kr(d, m, w)) : [];
        }
        function rf(d, m) {
          return er(d, m);
        }
        function zm(d, m, w) {
          return _s(d, m, jt(w, 2));
        }
        function $m(d, m) {
          var w = d == null ? 0 : d.length;
          if (w) {
            var A = er(d, m);
            if (A < w && $o(d[A], m))
              return A;
          }
          return -1;
        }
        function _l(d, m) {
          return er(d, m, !0);
        }
        function Eh(d, m, w) {
          return _s(d, m, jt(w, 2), !0);
        }
        function Bm(d, m) {
          var w = d == null ? 0 : d.length;
          if (w) {
            var A = er(d, m, !0) - 1;
            if ($o(d[A], m))
              return A;
          }
          return -1;
        }
        function El(d) {
          return d && d.length ? Zu(d) : [];
        }
        function og(d, m) {
          return d && d.length ? Zu(d, jt(m, 2)) : [];
        }
        function af(d) {
          var m = d == null ? 0 : d.length;
          return m ? kr(d, 1, m) : [];
        }
        function wy(d, m, w) {
          return d && d.length ? (m = w || m === t ? 1 : bn(m), kr(d, 0, m < 0 ? 0 : m)) : [];
        }
        function Cy(d, m, w) {
          var A = d == null ? 0 : d.length;
          return A ? (m = w || m === t ? 1 : bn(m), m = A - m, kr(d, m < 0 ? 0 : m, A)) : [];
        }
        function Hd(d, m) {
          return d && d.length ? Qu(d, jt(m, 3), !1, !0) : [];
        }
        function lg(d, m) {
          return d && d.length ? Qu(d, jt(m, 3)) : [];
        }
        var P_ = mn(function(d) {
          return Fr(Ir(d, 1, ur, !0));
        }), k_ = mn(function(d) {
          var m = mr(d);
          return ur(m) && (m = t), Fr(Ir(d, 1, ur, !0), jt(m, 2));
        }), Ty = mn(function(d) {
          var m = mr(d);
          return m = typeof m == "function" ? m : t, Fr(Ir(d, 1, ur, !0), t, m);
        });
        function Ry(d) {
          return d && d.length ? Fr(d) : [];
        }
        function oc(d, m) {
          return d && d.length ? Fr(d, jt(m, 2)) : [];
        }
        function F_(d, m) {
          return m = typeof m == "function" ? m : t, d && d.length ? Fr(d, t, m) : [];
        }
        function lc(d) {
          if (!(d && d.length))
            return [];
          var m = 0;
          return d = Ba(d, function(w) {
            if (ur(w))
              return m = Nr(w.length, m), !0;
          }), Uf(m, function(w) {
            return xi(d, pm(w));
          });
        }
        function Vm(d, m) {
          if (!(d && d.length))
            return [];
          var w = lc(d);
          return m == null ? w : xi(w, function(A) {
            return pn(m, t, A);
          });
        }
        var Rr = mn(function(d, m) {
          return ur(d) ? pl(d, m) : [];
        }), j_ = mn(function(d) {
          return nh(Ba(d, ur));
        }), My = mn(function(d) {
          var m = mr(d);
          return ur(m) && (m = t), nh(Ba(d, ur), jt(m, 2));
        }), Hm = mn(function(d) {
          var m = mr(d);
          return m = typeof m == "function" ? m : t, nh(Ba(d, ur), t, m);
        }), U_ = mn(lc);
        function Oy(d, m) {
          return Td(d || [], m || [], Gu);
        }
        function Ay(d, m) {
          return Td(d || [], m || [], Ji);
        }
        var Ly = mn(function(d) {
          var m = d.length, w = m > 1 ? d[m - 1] : t;
          return w = typeof w == "function" ? (d.pop(), w) : t, Vm(d, w);
        });
        function Us(d) {
          var m = H(d);
          return m.__chain__ = !0, m;
        }
        function Wm(d, m) {
          return m(d), d;
        }
        function ug(d, m) {
          return m(d);
        }
        var uc = lu(function(d) {
          var m = d.length, w = m ? d[0] : 0, A = this.__wrapped__, j = function(Y) {
            return _d(Y, d);
          };
          return m > 1 || this.__actions__.length || !(A instanceof gn) || !Es(w) ? this.thru(j) : (A = A.slice(w, +w + (m ? 1 : 0)), A.__actions__.push({
            func: ug,
            args: [j],
            thisArg: t
          }), new Dr(A, this.__chain__).thru(function(Y) {
            return m && !Y.length && Y.push(t), Y;
          }));
        });
        function cg() {
          return Us(this);
        }
        function sf() {
          return new Dr(this.value(), this.__chain__);
        }
        function fg() {
          this.__values__ === t && (this.__values__ = Fy(this.value()));
          var d = this.__index__ >= this.__values__.length, m = d ? t : this.__values__[this.__index__++];
          return { done: d, value: m };
        }
        function hg() {
          return this;
        }
        function Wd(d) {
          for (var m, w = this; w instanceof io; ) {
            var A = tg(w);
            A.__index__ = 0, A.__values__ = t, m ? j.__wrapped__ = A : m = A;
            var j = A;
            w = w.__wrapped__;
          }
          return j.__wrapped__ = d, m;
        }
        function Gd() {
          var d = this.__wrapped__;
          if (d instanceof gn) {
            var m = d;
            return this.__actions__.length && (m = new gn(this)), m = m.reverse(), m.__actions__.push({
              func: ug,
              args: [Ur],
              thisArg: t
            }), new Dr(m, this.__chain__);
          }
          return this.thru(Ur);
        }
        function Gm() {
          return Cd(this.__wrapped__, this.__actions__);
        }
        var Ny = Ld(function(d, m, w) {
          ni.call(d, w) ? ++d[w] : Po(d, w, 1);
        });
        function Ym(d, m, w) {
          var A = vn(d) ? zn : vs;
          return w && li(d, m, w) && (m = t), A(d, jt(m, 3));
        }
        function qm(d, m) {
          var w = vn(d) ? Ba : Bc;
          return w(d, jt(m, 3));
        }
        var dg = _y(mh), Yd = _y(ac);
        function Dy(d, m) {
          return Ir(mg(d, m), 1);
        }
        function Xm(d, m) {
          return Ir(mg(d, m), le);
        }
        function z_(d, m, w) {
          return w = w === t ? 1 : bn(w), Ir(mg(d, m), w);
        }
        function pg(d, m) {
          var w = vn(d) ? xn : Di;
          return w(d, jt(m, 3));
        }
        function qd(d, m) {
          var w = vn(d) ? Qi : gy;
          return w(d, jt(m, 3));
        }
        var Xd = Ld(function(d, m, w) {
          ni.call(d, w) ? d[w].push(m) : Po(d, w, [m]);
        });
        function cc(d, m, w, A) {
          d = go(d) ? d : tp(d), w = w && !A ? bn(w) : 0;
          var j = d.length;
          return w < 0 && (w = Nr(j + w, 0)), Zm(d) ? w <= j && d.indexOf(m, w) > -1 : !!j && Nc(d, m, w) > -1;
        }
        var gg = mn(function(d, m, w) {
          var A = -1, j = typeof m == "function", Y = go(d) ? xe(d.length) : [];
          return Di(d, function(te) {
            Y[++A] = j ? pn(m, te, w) : Xu(te, m, w);
          }), Y;
        }), Iy = Ld(function(d, m, w) {
          Po(d, w, m);
        });
        function mg(d, m) {
          var w = vn(d) ? xi : Lm;
          return w(d, jt(m, 3));
        }
        function vg(d, m, w, A) {
          return d == null ? [] : (vn(m) || (m = m == null ? [] : [m]), w = A ? t : w, vn(w) || (w = w == null ? [] : [w]), Wp(d, m, w));
        }
        var $_ = Ld(function(d, m, w) {
          d[w ? 0 : 1].push(m);
        }, function() {
          return [[], []];
        });
        function Kd(d, m, w) {
          var A = vn(d) ? Lc : Dp, j = arguments.length < 3;
          return A(d, jt(m, 4), w, j, Di);
        }
        function Py(d, m, w) {
          var A = vn(d) ? nd : Dp, j = arguments.length < 3;
          return A(d, jt(m, 4), w, j, gy);
        }
        function yg(d, m) {
          var w = vn(d) ? Ba : Bc;
          return w(d, ve(jt(m, 3)));
        }
        function l(d) {
          var m = vn(d) ? ua : Hc;
          return m(d);
        }
        function f(d, m, w) {
          (w ? li(d, m, w) : m === t) ? m = 1 : m = bn(m);
          var A = vn(d) ? $c : pr;
          return A(d, m);
        }
        function v(d) {
          var m = vn(d) ? Wu : Bt;
          return m(d);
        }
        function x(d) {
          if (d == null)
            return 0;
          if (go(d))
            return Zm(d) ? Fu(d) : d.length;
          var m = or(d);
          return m == Pt || m == Tn ? d.size : Hp(d).length;
        }
        function R(d, m, w) {
          var A = vn(d) ? id : iu;
          return w && li(d, m, w) && (m = t), A(d, jt(m, 3));
        }
        var L = mn(function(d, m) {
          if (d == null)
            return [];
          var w = m.length;
          return w > 1 && li(d, m[0], m[1]) ? m = [] : w > 2 && li(m[0], m[1], m[2]) && (m = [m[0]]), Wp(d, Ir(m, 1), []);
        }), U = Ni || function() {
          return Li.Date.now();
        };
        function J(d, m) {
          if (typeof m != "function")
            throw new Ha(u);
          return d = bn(d), function() {
            if (--d < 1)
              return m.apply(this, arguments);
          };
        }
        function oe(d, m, w) {
          return m = w ? t : m, m = d && m == null ? d.length : m, Da(d, ie, t, t, t, t, m);
        }
        function be(d, m) {
          var w;
          if (typeof m != "function")
            throw new Ha(u);
          return d = bn(d), function() {
            return --d > 0 && (w = m.apply(this, arguments)), d <= 1 && (m = t), w;
          };
        }
        var Ge = mn(function(d, m, w) {
          var A = D;
          if (w.length) {
            var j = eo(w, cu(Ge));
            A |= z;
          }
          return Da(d, A, m, w, j);
        }), Ke = mn(function(d, m, w) {
          var A = D | k;
          if (w.length) {
            var j = eo(w, cu(Ke));
            A |= z;
          }
          return Da(m, A, d, w, j);
        });
        function Ve(d, m, w) {
          m = w ? t : m;
          var A = Da(d, B, t, t, t, t, t, m);
          return A.placeholder = Ve.placeholder, A;
        }
        function ht(d, m, w) {
          m = w ? t : m;
          var A = Da(d, V, t, t, t, t, t, m);
          return A.placeholder = ht.placeholder, A;
        }
        function Et(d, m, w) {
          var A, j, Y, te, ce, ge, Ue = 0, Be = !1, He = !1, ot = !0;
          if (typeof d != "function")
            throw new Ha(u);
          m = Za(m) || 0, Mr(w) && (Be = !!w.leading, He = "maxWait" in w, Y = He ? Nr(Za(w.maxWait) || 0, m) : Y, ot = "trailing" in w ? !!w.trailing : ot);
          function xt(Vr) {
            var yo = A, Qa = j;
            return A = j = t, Ue = Vr, te = d.apply(Qa, yo), te;
          }
          function $t(Vr) {
            return Ue = Vr, ce = yl($n, m), Be ? xt(Vr) : te;
          }
          function yn(Vr) {
            var yo = Vr - ge, Qa = Vr - Ue, lf = m - yo;
            return He ? va(lf, Y - Qa) : lf;
          }
          function Xt(Vr) {
            var yo = Vr - ge, Qa = Vr - Ue;
            return ge === t || yo >= m || yo < 0 || He && Qa >= Y;
          }
          function $n() {
            var Vr = U();
            if (Xt(Vr))
              return Gn(Vr);
            ce = yl($n, yn(Vr));
          }
          function Gn(Vr) {
            return ce = t, ot && A ? xt(Vr) : (A = j = t, te);
          }
          function vo() {
            ce !== t && Ju(ce), Ue = 0, A = ge = j = ce = t;
          }
          function Fa() {
            return ce === t ? te : Gn(U());
          }
          function Br() {
            var Vr = U(), yo = Xt(Vr);
            if (A = arguments, j = this, ge = Vr, yo) {
              if (ce === t)
                return $t(ge);
              if (He)
                return Ju(ce), ce = yl($n, m), xt(ge);
            }
            return ce === t && (ce = yl($n, m)), te;
          }
          return Br.cancel = vo, Br.flush = Fa, Br;
        }
        var Rt = mn(function(d, m) {
          return Cm(d, 1, m);
        }), zr = mn(function(d, m, w) {
          return Cm(d, Za(m) || 0, w);
        });
        function me(d) {
          return Da(d, Re);
        }
        function fe(d, m) {
          if (typeof d != "function" || m != null && typeof m != "function")
            throw new Ha(u);
          var w = function() {
            var A = arguments, j = m ? m.apply(this, A) : A[0], Y = w.cache;
            if (Y.has(j))
              return Y.get(j);
            var te = d.apply(this, A);
            return w.cache = Y.set(j, te) || Y, te;
          };
          return w.cache = new (fe.Cache || Ga)(), w;
        }
        fe.Cache = Ga;
        function ve(d) {
          if (typeof d != "function")
            throw new Ha(u);
          return function() {
            var m = arguments;
            switch (m.length) {
              case 0:
                return !d.call(this);
              case 1:
                return !d.call(this, m[0]);
              case 2:
                return !d.call(this, m[0], m[1]);
              case 3:
                return !d.call(this, m[0], m[1], m[2]);
            }
            return !d.apply(this, m);
          };
        }
        function nt(d) {
          return be(2, d);
        }
        var Lt = Gp(function(d, m) {
          m = m.length == 1 && vn(m[0]) ? xi(m[0], Lr(jt())) : xi(Ir(m, 1), Lr(jt()));
          var w = m.length;
          return mn(function(A) {
            for (var j = -1, Y = va(A.length, w); ++j < Y; )
              A[j] = m[j].call(this, A[j]);
            return pn(d, this, A);
          });
        }), Ut = mn(function(d, m) {
          var w = eo(m, cu(Ut));
          return Da(d, z, t, m, w);
        }), St = mn(function(d, m) {
          var w = eo(m, cu(St));
          return Da(d, G, t, m, w);
        }), Gt = lu(function(d, m) {
          return Da(d, ue, t, t, t, m);
        });
        function na(d, m) {
          if (typeof d != "function")
            throw new Ha(u);
          return m = m === t ? m : bn(m), mn(d, m);
        }
        function ri(d, m) {
          if (typeof d != "function")
            throw new Ha(u);
          return m = m == null ? 0 : Nr(bn(m), 0), mn(function(w) {
            var A = w[m], j = zo(w, 0, m);
            return A && Ra(j, A), pn(d, this, j);
          });
        }
        function du(d, m, w) {
          var A = !0, j = !0;
          if (typeof d != "function")
            throw new Ha(u);
          return Mr(w) && (A = "leading" in w ? !!w.leading : A, j = "trailing" in w ? !!w.trailing : j), Et(d, m, {
            leading: A,
            maxWait: m,
            trailing: j
          });
        }
        function B_(d) {
          return oe(d, 1);
        }
        function iC(d, m) {
          return Ut(rh(m), d);
        }
        function rC() {
          if (!arguments.length)
            return [];
          var d = arguments[0];
          return vn(d) ? d : [d];
        }
        function ES(d) {
          return qa(d, T);
        }
        function SS(d, m) {
          return m = typeof m == "function" ? m : t, qa(d, T, m);
        }
        function aC(d) {
          return qa(d, S | T);
        }
        function sC(d, m) {
          return m = typeof m == "function" ? m : t, qa(d, S | T, m);
        }
        function xS(d, m) {
          return m == null || Ed(d, m, ia(m));
        }
        function $o(d, m) {
          return d === m || d !== d && m !== m;
        }
        var oC = ch(ko), lC = ch(function(d, m) {
          return d >= m;
        }), Zd = Rm(/* @__PURE__ */ function() {
          return arguments;
        }()) ? Rm : function(d) {
          return $r(d) && ni.call(d, "callee") && !Gf.call(d, "callee");
        }, vn = xe.isArray, uC = tt ? Lr(tt) : xd;
        function go(d) {
          return d != null && Qd(d.length) && !pu(d);
        }
        function ur(d) {
          return $r(d) && go(d);
        }
        function V_(d) {
          return d === !0 || d === !1 || $r(d) && Aa(d) == Xe;
        }
        var Sl = Sm || h1, H_ = bt ? Lr(bt) : Kf;
        function cC(d) {
          return $r(d) && d.nodeType === 1 && !of(d);
        }
        function fC(d) {
          if (d == null)
            return !0;
          if (go(d) && (vn(d) || typeof d == "string" || typeof d.splice == "function" || Sl(d) || Ci(d) || Zd(d)))
            return !d.length;
          var m = or(d);
          if (m == Pt || m == Tn)
            return !d.size;
          if (zd(d))
            return !Hp(d).length;
          for (var w in d)
            if (ni.call(d, w))
              return !1;
          return !0;
        }
        function bS(d, m) {
          return Fo(d, m);
        }
        function hC(d, m, w) {
          w = typeof w == "function" ? w : t;
          var A = w ? w(d, m) : t;
          return A === t ? Fo(d, m, t, w) : !!A;
        }
        function _g(d) {
          if (!$r(d))
            return !1;
          var m = Aa(d);
          return m == Ct || m == Dt || typeof d.message == "string" && typeof d.name == "string" && !of(d);
        }
        function Eg(d) {
          return typeof d == "number" && kc(d);
        }
        function pu(d) {
          if (!Mr(d))
            return !1;
          var m = Aa(d);
          return m == hn || m == Je || m == Ze || m == Sr;
        }
        function W_(d) {
          return typeof d == "number" && d == bn(d);
        }
        function Qd(d) {
          return typeof d == "number" && d > -1 && d % 1 == 0 && d <= se;
        }
        function Mr(d) {
          var m = typeof d;
          return d != null && (m == "object" || m == "function");
        }
        function $r(d) {
          return d != null && typeof d == "object";
        }
        var G_ = pt ? Lr(pt) : Bp;
        function wS(d, m) {
          return d === m || Vp(d, m, Qp(m));
        }
        function CS(d, m, w) {
          return w = typeof w == "function" ? w : t, Vp(d, m, Qp(m), w);
        }
        function TS(d) {
          return RS(d) && d != +d;
        }
        function Sh(d) {
          if (Jp(d))
            throw new rn(o);
          return Om(d);
        }
        function dC(d) {
          return d === null;
        }
        function pC(d) {
          return d == null;
        }
        function RS(d) {
          return typeof d == "number" || $r(d) && Aa(d) == Vn;
        }
        function of(d) {
          if (!$r(d) || Aa(d) != Nn)
            return !1;
          var m = No(d);
          if (m === null)
            return !0;
          var w = ni.call(m, "constructor") && m.constructor;
          return typeof w == "function" && w instanceof w && sd.call(w) == ud;
        }
        var Km = Wt ? Lr(Wt) : vy;
        function MS(d) {
          return W_(d) && d >= -se && d <= se;
        }
        var OS = fn ? Lr(fn) : Am;
        function Zm(d) {
          return typeof d == "string" || !vn(d) && $r(d) && Aa(d) == Pn;
        }
        function Bo(d) {
          return typeof d == "symbol" || $r(d) && Aa(d) == Qn;
        }
        var Ci = si ? Lr(si) : Zf;
        function Y_(d) {
          return d === t;
        }
        function ky(d) {
          return $r(d) && or(d) == ui;
        }
        function Qm(d) {
          return $r(d) && Aa(d) == Mi;
        }
        var AS = ch(Ku), LS = ch(function(d, m) {
          return d <= m;
        });
        function Fy(d) {
          if (!d)
            return [];
          if (go(d))
            return Zm(d) ? ds(d) : La(d);
          if (Ns && d[Ns])
            return M_(d[Ns]());
          var m = or(d), w = m == Pt ? ad : m == Tn ? ku : tp;
          return w(d);
        }
        function Vo(d) {
          if (!d)
            return d === 0 ? d : 0;
          if (d = Za(d), d === le || d === -le) {
            var m = d < 0 ? -1 : 1;
            return m * Ae;
          }
          return d === d ? d : 0;
        }
        function bn(d) {
          var m = Vo(d), w = m % 1;
          return m === m ? w ? m - w : m : 0;
        }
        function Jm(d) {
          return d ? Jl(bn(d), 0, Z) : 0;
        }
        function Za(d) {
          if (typeof d == "number")
            return d;
          if (Bo(d))
            return q;
          if (Mr(d)) {
            var m = typeof d.valueOf == "function" ? d.valueOf() : d;
            d = Mr(m) ? m + "" : m;
          }
          if (typeof d != "string")
            return d === 0 ? d : +d;
          d = Va(d);
          var w = un.test(d);
          return w || Yr.test(d) ? Wl(d.slice(2), w ? 2 : 8) : jn.test(d) ? q : +d;
        }
        function NS(d) {
          return Xa(d, mo(d));
        }
        function DS(d) {
          return d ? Jl(bn(d), -se, se) : d === 0 ? d : 0;
        }
        function Ti(d) {
          return d == null ? "" : $i(d);
        }
        var gC = oi(function(d, m) {
          if (zd(m) || go(m)) {
            Xa(m, ia(m), d);
            return;
          }
          for (var w in m)
            ni.call(m, w) && Gu(d, w, m[w]);
        }), zs = oi(function(d, m) {
          Xa(m, mo(m), d);
        }), xh = oi(function(d, m, w, A) {
          Xa(m, mo(m), d, A);
        }), jy = oi(function(d, m, w, A) {
          Xa(m, ia(m), d, A);
        }), bh = lu(_d);
        function IS(d, m) {
          var w = qf(d);
          return m == null ? w : zi(w, m);
        }
        var Jd = mn(function(d, m) {
          d = bi(d);
          var w = -1, A = m.length, j = A > 2 ? m[2] : t;
          for (j && li(m[0], m[1], j) && (A = 1); ++w < A; )
            for (var Y = m[w], te = mo(Y), ce = -1, ge = te.length; ++ce < ge; ) {
              var Ue = te[ce], Be = d[Ue];
              (Be === t || $o(Be, cl[Ue]) && !ni.call(d, Ue)) && (d[Ue] = Y[Ue]);
            }
          return d;
        }), ep = mn(function(d) {
          return d.push(t, Ka), pn(US, t, d);
        });
        function Uy(d, m) {
          return Lp(d, jt(m, 3), _a);
        }
        function q_(d, m) {
          return Lp(d, jt(m, 3), dr);
        }
        function zy(d, m) {
          return d == null ? d : Sd(d, jt(m, 3), mo);
        }
        function ev(d, m) {
          return d == null ? d : $p(d, jt(m, 3), mo);
        }
        function PS(d, m) {
          return d && _a(d, jt(m, 3));
        }
        function $y(d, m) {
          return d && dr(d, jt(m, 3));
        }
        function kS(d) {
          return d == null ? [] : rt(d, ia(d));
        }
        function FS(d) {
          return d == null ? [] : rt(d, mo(d));
        }
        function X_(d, m, w) {
          var A = d == null ? t : wr(d, m);
          return A === t ? w : A;
        }
        function mC(d, m) {
          return d != null && Zc(d, m, Yu);
        }
        function Sg(d, m) {
          return d != null && Zc(d, m, Tm);
        }
        var By = uh(function(d, m, w) {
          m != null && typeof m.toString != "function" && (m = ld.call(m)), d[m] = w;
        }, s1(xs)), jS = uh(function(d, m, w) {
          m != null && typeof m.toString != "function" && (m = ld.call(m)), ni.call(d, m) ? d[m].push(w) : d[m] = [w];
        }, jt), vC = mn(Xu);
        function ia(d) {
          return go(d) ? Ya(d) : Hp(d);
        }
        function mo(d) {
          return go(d) ? Ya(d, !0) : yy(d);
        }
        function yC(d, m) {
          var w = {};
          return m = jt(m, 3), _a(d, function(A, j, Y) {
            Po(w, m(A, j, Y), A);
          }), w;
        }
        function _C(d, m) {
          var w = {};
          return m = jt(m, 3), _a(d, function(A, j, Y) {
            Po(w, j, m(A, j, Y));
          }), w;
        }
        var EC = oi(function(d, m, w) {
          tu(d, m, w);
        }), US = oi(function(d, m, w, A) {
          tu(d, m, w, A);
        }), SC = lu(function(d, m) {
          var w = {};
          if (d == null)
            return w;
          var A = !1;
          m = xi(m, function(Y) {
            return Y = Uo(Y, d), A || (A = Y.length > 1), Y;
          }), Xa(d, Xc(d), w), A && (w = qa(w, S | b | T, qc));
          for (var j = m.length; j--; )
            au(w, m[j]);
          return w;
        });
        function xC(d, m) {
          return zS(d, ve(jt(m)));
        }
        var bC = lu(function(d, m) {
          return d == null ? {} : eh(d, m);
        });
        function zS(d, m) {
          if (d == null)
            return {};
          var w = xi(Xc(d), function(A) {
            return [A];
          });
          return m = jt(m), wd(d, w, function(A, j) {
            return m(A, j[0]);
          });
        }
        function wC(d, m, w) {
          m = Uo(m, d);
          var A = -1, j = m.length;
          for (j || (j = 1, d = t); ++A < j; ) {
            var Y = d == null ? t : d[co(m[A])];
            Y === t && (A = j, Y = w), d = pu(Y) ? Y.call(d) : Y;
          }
          return d;
        }
        function K_(d, m, w) {
          return d == null ? d : Ji(d, m, w);
        }
        function Z_(d, m, w, A) {
          return A = typeof A == "function" ? A : t, d == null ? d : Ji(d, m, w, A);
        }
        var Vy = Yc(ia), Hy = Yc(mo);
        function CC(d, m, w) {
          var A = vn(d), j = A || Sl(d) || Ci(d);
          if (m = jt(m, 4), w == null) {
            var Y = d && d.constructor;
            j ? w = A ? new Y() : [] : Mr(d) ? w = pu(Y) ? qf(No(d)) : {} : w = {};
          }
          return (j ? xn : _a)(d, function(te, ce, ge) {
            return m(w, te, ce, ge);
          }), w;
        }
        function tv(d, m) {
          return d == null ? !0 : au(d, m);
        }
        function nv(d, m, w) {
          return d == null ? d : th(d, m, rh(w));
        }
        function TC(d, m, w, A) {
          return A = typeof A == "function" ? A : t, d == null ? d : th(d, m, rh(w), A);
        }
        function tp(d) {
          return d == null ? [] : ar(d, ia(d));
        }
        function RC(d) {
          return d == null ? [] : ar(d, mo(d));
        }
        function MC(d, m, w) {
          return w === t && (w = m, m = t), w !== t && (w = Za(w), w = w === w ? w : 0), m !== t && (m = Za(m), m = m === m ? m : 0), Jl(Za(d), m, w);
        }
        function $S(d, m, w) {
          return m = Vo(m), w === t ? (w = m, m = 0) : w = Vo(w), d = Za(d), my(d, m, w);
        }
        function OC(d, m, w) {
          if (w && typeof w != "boolean" && li(d, m, w) && (m = w = t), w === t && (typeof m == "boolean" ? (w = m, m = t) : typeof d == "boolean" && (w = d, d = t)), d === t && m === t ? (d = 0, m = 1) : (d = Vo(d), m === t ? (m = d, d = 0) : m = Vo(m)), d > m) {
            var A = d;
            d = m, m = A;
          }
          if (w || d % 1 || m % 1) {
            var j = Yf();
            return va(d + j * (m - d + ol("1e-" + ((j + "").length - 1))), m);
          }
          return sr(d, m);
        }
        var AC = su(function(d, m, w) {
          return m = m.toLowerCase(), d + (w ? Q_(m) : m);
        });
        function Q_(d) {
          return r1(Ti(d).toLowerCase());
        }
        function iv(d) {
          return d = Ti(d), d && d.replace(Ui, $f).replace(ed, "");
        }
        function Wy(d, m, w) {
          d = Ti(d), m = $i(m);
          var A = d.length;
          w = w === t ? A : Jl(bn(w), 0, A);
          var j = w;
          return w -= m.length, w >= 0 && d.slice(w, j) == m;
        }
        function Gy(d) {
          return d = Ti(d), d && ls.test(d) ? d.replace(On, ay) : d;
        }
        function rv(d) {
          return d = Ti(d), d && Ai.test(d) ? d.replace(sa, "\\$&") : d;
        }
        var av = su(function(d, m, w) {
          return d + (w ? "-" : "") + m.toLowerCase();
        }), LC = su(function(d, m, w) {
          return d + (w ? " " : "") + m.toLowerCase();
        }), J_ = oh("toLowerCase");
        function e1(d, m, w) {
          d = Ti(d), m = bn(m);
          var A = m ? Fu(d) : 0;
          if (!m || A >= m)
            return d;
          var j = (m - A) / 2;
          return Pd(Ds(j), w) + d + Pd(to(j), w);
        }
        function NC(d, m, w) {
          d = Ti(d), m = bn(m);
          var A = m ? Fu(d) : 0;
          return m && A < m ? d + Pd(m - A, w) : d;
        }
        function DC(d, m, w) {
          d = Ti(d), m = bn(m);
          var A = m ? Fu(d) : 0;
          return m && A < m ? Pd(m - A, w) + d : d;
        }
        function pN(d, m, w) {
          return w || m == null ? m = 0 : m && (m = +m), dy(Ti(d).replace(ir, ""), m || 0);
        }
        function IC(d, m, w) {
          return (w ? li(d, m, w) : m === t) ? m = 1 : m = bn(m), Vc(Ti(d), m);
        }
        function PC() {
          var d = arguments, m = Ti(d[0]);
          return d.length < 3 ? m : m.replace(d[1], d[2]);
        }
        var kC = su(function(d, m, w) {
          return d + (w ? "_" : "") + m.toLowerCase();
        });
        function FC(d, m, w) {
          return w && typeof w != "number" && li(d, m, w) && (m = w = t), w = w === t ? Z : w >>> 0, w ? (d = Ti(d), d && (typeof m == "string" || m != null && !Km(m)) && (m = $i(m), !m && Bf(d)) ? zo(ds(d), 0, w) : d.split(m, w)) : [];
        }
        var jC = su(function(d, m, w) {
          return d + (w ? " " : "") + r1(m);
        });
        function UC(d, m, w) {
          return d = Ti(d), w = w == null ? 0 : Jl(bn(w), 0, d.length), m = $i(m), d.slice(w, w + m.length) == m;
        }
        function t1(d, m, w) {
          var A = H.templateSettings;
          w && li(d, m, w) && (m = t), d = Ti(d), m = xh({}, m, A, Fd);
          var j = xh({}, m.imports, A.imports, Fd), Y = ia(j), te = ar(j, Y), ce, ge, Ue = 0, Be = m.interpolate || Zr, He = "__p += '", ot = Dc(
            (m.escape || Zr).source + "|" + Be.source + "|" + (Be === Ar ? ct : Zr).source + "|" + (m.evaluate || Zr).source + "|$",
            "g"
          ), xt = "//# sourceURL=" + (ni.call(m, "sourceURL") ? (m.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Mc + "]") + `
`;
          d.replace(ot, function(Xt, $n, Gn, vo, Fa, Br) {
            return Gn || (Gn = vo), He += d.slice(Ue, Br).replace(nl, sy), $n && (ce = !0, He += `' +
__e(` + $n + `) +
'`), Fa && (ge = !0, He += `';
` + Fa + `;
__p += '`), Gn && (He += `' +
((__t = (` + Gn + `)) == null ? '' : __t) +
'`), Ue = Br + Xt.length, Xt;
          }), He += `';
`;
          var $t = ni.call(m, "variable") && m.variable;
          if (!$t)
            He = `with (obj) {
` + He + `
}
`;
          else if (We.test($t))
            throw new rn(c);
          He = (ge ? He.replace(ki, "") : He).replace(Gr, "$1").replace(Fn, "$1;"), He = "function(" + ($t || "obj") + `) {
` + ($t ? "" : `obj || (obj = {});
`) + "var __t, __p = ''" + (ce ? ", __e = _.escape" : "") + (ge ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
` : `;
`) + He + `return __p
}`;
          var yn = a1(function() {
            return ti(Y, xt + "return " + He).apply(t, te);
          });
          if (yn.source = He, _g(yn))
            throw yn;
          return yn;
        }
        function zC(d) {
          return Ti(d).toLowerCase();
        }
        function $C(d) {
          return Ti(d).toUpperCase();
        }
        function n1(d, m, w) {
          if (d = Ti(d), d && (w || m === t))
            return Va(d);
          if (!d || !(m = $i(m)))
            return d;
          var A = ds(d), j = ds(m), Y = Ip(A, j), te = zf(A, j) + 1;
          return zo(A, Y, te).join("");
        }
        function BC(d, m, w) {
          if (d = Ti(d), d && (w || m === t))
            return d.slice(0, Pp(d) + 1);
          if (!d || !(m = $i(m)))
            return d;
          var A = ds(d), j = zf(A, ds(m)) + 1;
          return zo(A, 0, j).join("");
        }
        function i1(d, m, w) {
          if (d = Ti(d), d && (w || m === t))
            return d.replace(ir, "");
          if (!d || !(m = $i(m)))
            return d;
          var A = ds(d), j = Ip(A, ds(m));
          return zo(A, j).join("");
        }
        function BS(d, m) {
          var w = Oe, A = $e;
          if (Mr(m)) {
            var j = "separator" in m ? m.separator : j;
            w = "length" in m ? bn(m.length) : w, A = "omission" in m ? $i(m.omission) : A;
          }
          d = Ti(d);
          var Y = d.length;
          if (Bf(d)) {
            var te = ds(d);
            Y = te.length;
          }
          if (w >= Y)
            return d;
          var ce = w - Fu(A);
          if (ce < 1)
            return A;
          var ge = te ? zo(te, 0, ce).join("") : d.slice(0, ce);
          if (j === t)
            return ge + A;
          if (te && (ce += ge.length - ce), Km(j)) {
            if (d.slice(ce).search(j)) {
              var Ue, Be = ge;
              for (j.global || (j = Dc(j.source, Ti(Sn.exec(j)) + "g")), j.lastIndex = 0; Ue = j.exec(Be); )
                var He = Ue.index;
              ge = ge.slice(0, He === t ? ce : He);
            }
          } else if (d.indexOf($i(j), ce) != ce) {
            var ot = ge.lastIndexOf(j);
            ot > -1 && (ge = ge.slice(0, ot));
          }
          return ge + A;
        }
        function VC(d) {
          return d = Ti(d), d && gi.test(d) ? d.replace(Ki, ly) : d;
        }
        var HC = su(function(d, m, w) {
          return d + (w ? " " : "") + m.toUpperCase();
        }), r1 = oh("toUpperCase");
        function VS(d, m, w) {
          return d = Ti(d), m = w ? t : m, m === t ? R_(d) ? O_(d) : ty(d) : d.match(m) || [];
        }
        var a1 = mn(function(d, m) {
          try {
            return pn(d, t, m);
          } catch (w) {
            return _g(w) ? w : new rn(w);
          }
        }), WC = lu(function(d, m) {
          return xn(m, function(w) {
            w = co(w), Po(d, w, Ge(d[w], d));
          }), d;
        });
        function GC(d) {
          var m = d == null ? 0 : d.length, w = jt();
          return d = m ? xi(d, function(A) {
            if (typeof A[1] != "function")
              throw new Ha(u);
            return [w(A[0]), A[1]];
          }) : [], mn(function(A) {
            for (var j = -1; ++j < m; ) {
              var Y = d[j];
              if (pn(Y[0], this, A))
                return pn(Y[1], this, A);
            }
          });
        }
        function YC(d) {
          return wm(qa(d, S));
        }
        function s1(d) {
          return function() {
            return d;
          };
        }
        function qC(d, m) {
          return d == null || d !== d ? m : d;
        }
        var XC = ou(), KC = ou(!0);
        function xs(d) {
          return d;
        }
        function o1(d) {
          return Qf(typeof d == "function" ? d : qa(d, S));
        }
        function ZC(d) {
          return Jf(qa(d, S));
        }
        function QC(d, m) {
          return jo(d, qa(m, S));
        }
        var JC = mn(function(d, m) {
          return function(w) {
            return Xu(w, d, m);
          };
        }), eT = mn(function(d, m) {
          return function(w) {
            return Xu(d, w, m);
          };
        });
        function l1(d, m, w) {
          var A = ia(m), j = rt(m, A);
          w == null && !(Mr(m) && (j.length || !A.length)) && (w = m, m = d, d = this, j = rt(m, ia(m)));
          var Y = !(Mr(w) && "chain" in w) || !!w.chain, te = pu(d);
          return xn(j, function(ce) {
            var ge = m[ce];
            d[ce] = ge, te && (d.prototype[ce] = function() {
              var Ue = this.__chain__;
              if (Y || Ue) {
                var Be = d(this.__wrapped__), He = Be.__actions__ = La(this.__actions__);
                return He.push({ func: ge, args: arguments, thisArg: d }), Be.__chain__ = Ue, Be;
              }
              return ge.apply(d, Ra([this.value()], arguments));
            });
          }), d;
        }
        function tT() {
          return Li._ === this && (Li._ = Ma), this;
        }
        function u1() {
        }
        function nT(d) {
          return d = bn(d), mn(function(m) {
            return nu(m, d);
          });
        }
        var HS = Xp(xi), c1 = Xp(zn), iT = Xp(id);
        function WS(d) {
          return dh(d) ? pm(co(d)) : Ft(d);
        }
        function Yy(d) {
          return function(m) {
            return d == null ? t : wr(d, m);
          };
        }
        var sv = Nm(), rT = Nm(!0);
        function f1() {
          return [];
        }
        function h1() {
          return !1;
        }
        function aT() {
          return {};
        }
        function sT() {
          return "";
        }
        function oT() {
          return !0;
        }
        function lT(d, m) {
          if (d = bn(d), d < 1 || d > se)
            return [];
          var w = Z, A = va(d, Z);
          m = jt(m), d -= Z;
          for (var j = Uf(A, m); ++w < d; )
            m(w);
          return j;
        }
        function GS(d) {
          return vn(d) ? xi(d, co) : Bo(d) ? [d] : La(xy(Ti(d)));
        }
        function uT(d) {
          var m = ++Wf;
          return Ti(d) + m;
        }
        var cT = Id(function(d, m) {
          return d + m;
        }, 0), fT = Na("ceil"), hT = Id(function(d, m) {
          return d / m;
        }, 1), dT = Na("floor");
        function pT(d) {
          return d && d.length ? eu(d, xs, ko) : t;
        }
        function gT(d, m) {
          return d && d.length ? eu(d, jt(m, 2), ko) : t;
        }
        function mT(d) {
          return ll(d, xs);
        }
        function vT(d, m) {
          return ll(d, jt(m, 2));
        }
        function yT(d) {
          return d && d.length ? eu(d, xs, Ku) : t;
        }
        function _T(d, m) {
          return d && d.length ? eu(d, jt(m, 2), Ku) : t;
        }
        var ET = Id(function(d, m) {
          return d * m;
        }, 1), ST = Na("round"), xT = Id(function(d, m) {
          return d - m;
        }, 0);
        function bT(d) {
          return d && d.length ? mm(d, xs) : 0;
        }
        function wT(d, m) {
          return d && d.length ? mm(d, jt(m, 2)) : 0;
        }
        return H.after = J, H.ary = oe, H.assign = gC, H.assignIn = zs, H.assignInWith = xh, H.assignWith = jy, H.at = bh, H.before = be, H.bind = Ge, H.bindAll = WC, H.bindKey = Ke, H.castArray = rC, H.chain = Us, H.chunk = I_, H.compact = ef, H.concat = ng, H.cond = GC, H.conforms = YC, H.constant = s1, H.countBy = Ny, H.create = IS, H.curry = Ve, H.curryRight = ht, H.debounce = Et, H.defaults = Jd, H.defaultsDeep = ep, H.defer = Rt, H.delay = zr, H.difference = ho, H.differenceBy = Ln, H.differenceWith = Tr, H.drop = tr, H.dropRight = ea, H.dropRightWhile = Ss, H.dropWhile = gh, H.fill = ta, H.filter = qm, H.flatMap = Dy, H.flatMapDeep = Xm, H.flatMapDepth = z_, H.flatten = tf, H.flattenDeep = jm, H.flattenDepth = sc, H.flip = me, H.flow = XC, H.flowRight = KC, H.fromPairs = ka, H.functions = kS, H.functionsIn = FS, H.groupBy = Xd, H.initial = fu, H.intersection = ig, H.intersectionBy = Um, H.intersectionWith = po, H.invert = By, H.invertBy = jS, H.invokeMap = gg, H.iteratee = o1, H.keyBy = Iy, H.keys = ia, H.keysIn = mo, H.map = mg, H.mapKeys = yC, H.mapValues = _C, H.matches = ZC, H.matchesProperty = QC, H.memoize = fe, H.merge = EC, H.mergeWith = US, H.method = JC, H.methodOf = eT, H.mixin = l1, H.negate = ve, H.nthArg = nT, H.omit = SC, H.omitBy = xC, H.once = nt, H.orderBy = vg, H.over = HS, H.overArgs = Lt, H.overEvery = c1, H.overSome = iT, H.partial = Ut, H.partialRight = St, H.partition = $_, H.pick = bC, H.pickBy = zS, H.property = WS, H.propertyOf = Yy, H.pull = ag, H.pullAll = _h, H.pullAllBy = nf, H.pullAllWith = ca, H.pullAt = hu, H.range = sv, H.rangeRight = rT, H.rearg = Gt, H.reject = yg, H.remove = vr, H.rest = na, H.reverse = Ur, H.sampleSize = f, H.set = K_, H.setWith = Z_, H.shuffle = v, H.slice = sg, H.sortBy = L, H.sortedUniq = El, H.sortedUniqBy = og, H.split = FC, H.spread = ri, H.tail = af, H.take = wy, H.takeRight = Cy, H.takeRightWhile = Hd, H.takeWhile = lg, H.tap = Wm, H.throttle = du, H.thru = ug, H.toArray = Fy, H.toPairs = Vy, H.toPairsIn = Hy, H.toPath = GS, H.toPlainObject = NS, H.transform = CC, H.unary = B_, H.union = P_, H.unionBy = k_, H.unionWith = Ty, H.uniq = Ry, H.uniqBy = oc, H.uniqWith = F_, H.unset = tv, H.unzip = lc, H.unzipWith = Vm, H.update = nv, H.updateWith = TC, H.values = tp, H.valuesIn = RC, H.without = Rr, H.words = VS, H.wrap = iC, H.xor = j_, H.xorBy = My, H.xorWith = Hm, H.zip = U_, H.zipObject = Oy, H.zipObjectDeep = Ay, H.zipWith = Ly, H.entries = Vy, H.entriesIn = Hy, H.extend = zs, H.extendWith = xh, l1(H, H), H.add = cT, H.attempt = a1, H.camelCase = AC, H.capitalize = Q_, H.ceil = fT, H.clamp = MC, H.clone = ES, H.cloneDeep = aC, H.cloneDeepWith = sC, H.cloneWith = SS, H.conformsTo = xS, H.deburr = iv, H.defaultTo = qC, H.divide = hT, H.endsWith = Wy, H.eq = $o, H.escape = Gy, H.escapeRegExp = rv, H.every = Ym, H.find = dg, H.findIndex = mh, H.findKey = Uy, H.findLast = Yd, H.findLastIndex = ac, H.findLastKey = q_, H.floor = dT, H.forEach = pg, H.forEachRight = qd, H.forIn = zy, H.forInRight = ev, H.forOwn = PS, H.forOwnRight = $y, H.get = X_, H.gt = oC, H.gte = lC, H.has = mC, H.hasIn = Sg, H.head = Bd, H.identity = xs, H.includes = cc, H.indexOf = vh, H.inRange = $S, H.invoke = vC, H.isArguments = Zd, H.isArray = vn, H.isArrayBuffer = uC, H.isArrayLike = go, H.isArrayLikeObject = ur, H.isBoolean = V_, H.isBuffer = Sl, H.isDate = H_, H.isElement = cC, H.isEmpty = fC, H.isEqual = bS, H.isEqualWith = hC, H.isError = _g, H.isFinite = Eg, H.isFunction = pu, H.isInteger = W_, H.isLength = Qd, H.isMap = G_, H.isMatch = wS, H.isMatchWith = CS, H.isNaN = TS, H.isNative = Sh, H.isNil = pC, H.isNull = dC, H.isNumber = RS, H.isObject = Mr, H.isObjectLike = $r, H.isPlainObject = of, H.isRegExp = Km, H.isSafeInteger = MS, H.isSet = OS, H.isString = Zm, H.isSymbol = Bo, H.isTypedArray = Ci, H.isUndefined = Y_, H.isWeakMap = ky, H.isWeakSet = Qm, H.join = yh, H.kebabCase = av, H.last = mr, H.lastIndexOf = rg, H.lowerCase = LC, H.lowerFirst = J_, H.lt = AS, H.lte = LS, H.max = pT, H.maxBy = gT, H.mean = mT, H.meanBy = vT, H.min = yT, H.minBy = _T, H.stubArray = f1, H.stubFalse = h1, H.stubObject = aT, H.stubString = sT, H.stubTrue = oT, H.multiply = ET, H.nth = Vd, H.noConflict = tT, H.noop = u1, H.now = U, H.pad = e1, H.padEnd = NC, H.padStart = DC, H.parseInt = pN, H.random = OC, H.reduce = Kd, H.reduceRight = Py, H.repeat = IC, H.replace = PC, H.result = wC, H.round = ST, H.runInContext = pe, H.sample = l, H.size = x, H.snakeCase = kC, H.some = R, H.sortedIndex = rf, H.sortedIndexBy = zm, H.sortedIndexOf = $m, H.sortedLastIndex = _l, H.sortedLastIndexBy = Eh, H.sortedLastIndexOf = Bm, H.startCase = jC, H.startsWith = UC, H.subtract = xT, H.sum = bT, H.sumBy = wT, H.template = t1, H.times = lT, H.toFinite = Vo, H.toInteger = bn, H.toLength = Jm, H.toLower = zC, H.toNumber = Za, H.toSafeInteger = DS, H.toString = Ti, H.toUpper = $C, H.trim = n1, H.trimEnd = BC, H.trimStart = i1, H.truncate = BS, H.unescape = VC, H.uniqueId = uT, H.upperCase = HC, H.upperFirst = r1, H.each = pg, H.eachRight = qd, H.first = Bd, l1(H, function() {
          var d = {};
          return _a(H, function(m, w) {
            ni.call(H.prototype, w) || (d[w] = m);
          }), d;
        }(), { chain: !1 }), H.VERSION = i, xn(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(d) {
          H[d].placeholder = H;
        }), xn(["drop", "take"], function(d, m) {
          gn.prototype[d] = function(w) {
            w = w === t ? 1 : Nr(bn(w), 0);
            var A = this.__filtered__ && !m ? new gn(this) : this.clone();
            return A.__filtered__ ? A.__takeCount__ = va(w, A.__takeCount__) : A.__views__.push({
              size: va(w, Z),
              type: d + (A.__dir__ < 0 ? "Right" : "")
            }), A;
          }, gn.prototype[d + "Right"] = function(w) {
            return this.reverse()[d](w).reverse();
          };
        }), xn(["filter", "map", "takeWhile"], function(d, m) {
          var w = m + 1, A = w == Ne || w == ae;
          gn.prototype[d] = function(j) {
            var Y = this.clone();
            return Y.__iteratees__.push({
              iteratee: jt(j, 3),
              type: w
            }), Y.__filtered__ = Y.__filtered__ || A, Y;
          };
        }), xn(["head", "last"], function(d, m) {
          var w = "take" + (m ? "Right" : "");
          gn.prototype[d] = function() {
            return this[w](1).value()[0];
          };
        }), xn(["initial", "tail"], function(d, m) {
          var w = "drop" + (m ? "" : "Right");
          gn.prototype[d] = function() {
            return this.__filtered__ ? new gn(this) : this[w](1);
          };
        }), gn.prototype.compact = function() {
          return this.filter(xs);
        }, gn.prototype.find = function(d) {
          return this.filter(d).head();
        }, gn.prototype.findLast = function(d) {
          return this.reverse().find(d);
        }, gn.prototype.invokeMap = mn(function(d, m) {
          return typeof d == "function" ? new gn(this) : this.map(function(w) {
            return Xu(w, d, m);
          });
        }), gn.prototype.reject = function(d) {
          return this.filter(ve(jt(d)));
        }, gn.prototype.slice = function(d, m) {
          d = bn(d);
          var w = this;
          return w.__filtered__ && (d > 0 || m < 0) ? new gn(w) : (d < 0 ? w = w.takeRight(-d) : d && (w = w.drop(d)), m !== t && (m = bn(m), w = m < 0 ? w.dropRight(-m) : w.take(m - d)), w);
        }, gn.prototype.takeRightWhile = function(d) {
          return this.reverse().takeWhile(d).reverse();
        }, gn.prototype.toArray = function() {
          return this.take(Z);
        }, _a(gn.prototype, function(d, m) {
          var w = /^(?:filter|find|map|reject)|While$/.test(m), A = /^(?:head|last)$/.test(m), j = H[A ? "take" + (m == "last" ? "Right" : "") : m], Y = A || /^find/.test(m);
          j && (H.prototype[m] = function() {
            var te = this.__wrapped__, ce = A ? [1] : arguments, ge = te instanceof gn, Ue = ce[0], Be = ge || vn(te), He = function($n) {
              var Gn = j.apply(H, Ra([$n], ce));
              return A && ot ? Gn[0] : Gn;
            };
            Be && w && typeof Ue == "function" && Ue.length != 1 && (ge = Be = !1);
            var ot = this.__chain__, xt = !!this.__actions__.length, $t = Y && !ot, yn = ge && !xt;
            if (!Y && Be) {
              te = yn ? te : new gn(this);
              var Xt = d.apply(te, ce);
              return Xt.__actions__.push({ func: ug, args: [He], thisArg: t }), new Dr(Xt, ot);
            }
            return $t && yn ? d.apply(this, ce) : (Xt = this.thru(He), $t ? A ? Xt.value()[0] : Xt.value() : Xt);
          });
        }), xn(["pop", "push", "shift", "sort", "splice", "unshift"], function(d) {
          var m = ul[d], w = /^(?:push|sort|unshift)$/.test(d) ? "tap" : "thru", A = /^(?:pop|shift)$/.test(d);
          H.prototype[d] = function() {
            var j = arguments;
            if (A && !this.__chain__) {
              var Y = this.value();
              return m.apply(vn(Y) ? Y : [], j);
            }
            return this[w](function(te) {
              return m.apply(vn(te) ? te : [], j);
            });
          };
        }), _a(gn.prototype, function(d, m) {
          var w = H[m];
          if (w) {
            var A = w.name + "";
            ni.call(zu, A) || (zu[A] = []), zu[A].push({ name: m, func: w });
          }
        }), zu[lh(t, k).name] = [{
          name: "wrapper",
          func: t
        }], gn.prototype.clone = Up, gn.prototype.reverse = kt, gn.prototype.value = Do, H.prototype.at = uc, H.prototype.chain = cg, H.prototype.commit = sf, H.prototype.next = fg, H.prototype.plant = Wd, H.prototype.reverse = Gd, H.prototype.toJSON = H.prototype.valueOf = H.prototype.value = Gm, H.prototype.first = H.prototype.head, Ns && (H.prototype[Ns] = hg), H;
      }, Vf = A_();
      F ? ((F.exports = Vf)._ = Vf, Iu._ = Vf) : Li._ = Vf;
    }).call(Ko);
  })(tw, tw.exports);
  var qt = tw.exports, hA = { exports: {} }, JM, Rk;
  function rL() {
    if (Rk)
      return JM;
    Rk = 1;
    var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
    return JM = n, JM;
  }
  var eO, Mk;
  function r7() {
    if (Mk)
      return eO;
    Mk = 1;
    var n = rL();
    function e() {
    }
    function t() {
    }
    return t.resetWarningCache = e, eO = function() {
      function i(u, c, p, y, _, S) {
        if (S !== n) {
          var b = new Error(
            "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
          );
          throw b.name = "Invariant Violation", b;
        }
      }
      i.isRequired = i;
      function a() {
        return i;
      }
      var o = {
        array: i,
        bigint: i,
        bool: i,
        func: i,
        number: i,
        object: i,
        string: i,
        symbol: i,
        any: i,
        arrayOf: a,
        element: i,
        elementType: i,
        instanceOf: a,
        node: i,
        objectOf: a,
        oneOf: a,
        oneOfType: a,
        shape: a,
        exact: a,
        checkPropTypes: t,
        resetWarningCache: e
      };
      return o.PropTypes = o, o;
    }, eO;
  }
  var fb = { exports: {} }, Hi = {}, Ok;
  function a7() {
    if (Ok)
      return Hi;
    Ok = 1;
    var n = {};
    /** @license React v16.13.1
     * react-is.development.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.
     */
    return n.NODE_ENV !== "production" && function() {
      var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, i = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, u = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, p = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, _ = e ? Symbol.for("react.concurrent_mode") : 60111, S = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, T = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, D = e ? Symbol.for("react.block") : 60121, k = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, B = e ? Symbol.for("react.scope") : 60119;
      function V(Je) {
        return typeof Je == "string" || typeof Je == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
        Je === a || Je === _ || Je === u || Je === o || Je === b || Je === T || typeof Je == "object" && Je !== null && (Je.$$typeof === N || Je.$$typeof === O || Je.$$typeof === c || Je.$$typeof === p || Je.$$typeof === S || Je.$$typeof === k || Je.$$typeof === $ || Je.$$typeof === B || Je.$$typeof === D);
      }
      function z(Je) {
        if (typeof Je == "object" && Je !== null) {
          var Pt = Je.$$typeof;
          switch (Pt) {
            case t:
              var Vn = Je.type;
              switch (Vn) {
                case y:
                case _:
                case a:
                case u:
                case o:
                case b:
                  return Vn;
                default:
                  var Hn = Vn && Vn.$$typeof;
                  switch (Hn) {
                    case p:
                    case S:
                    case N:
                    case O:
                    case c:
                      return Hn;
                    default:
                      return Pt;
                  }
              }
            case i:
              return Pt;
          }
        }
      }
      var G = y, ie = _, ue = p, Re = c, Oe = t, $e = S, Ee = a, Fe = N, Ne = O, Q = i, ae = u, le = o, se = b, Ae = !1;
      function q(Je) {
        return Ae || (Ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Z(Je) || z(Je) === y;
      }
      function Z(Je) {
        return z(Je) === _;
      }
      function ee(Je) {
        return z(Je) === p;
      }
      function Le(Je) {
        return z(Je) === c;
      }
      function Me(Je) {
        return typeof Je == "object" && Je !== null && Je.$$typeof === t;
      }
      function De(Je) {
        return z(Je) === S;
      }
      function Ye(Je) {
        return z(Je) === a;
      }
      function Ze(Je) {
        return z(Je) === N;
      }
      function Xe(Je) {
        return z(Je) === O;
      }
      function lt(Je) {
        return z(Je) === i;
      }
      function Dt(Je) {
        return z(Je) === u;
      }
      function Ct(Je) {
        return z(Je) === o;
      }
      function hn(Je) {
        return z(Je) === b;
      }
      Hi.AsyncMode = G, Hi.ConcurrentMode = ie, Hi.ContextConsumer = ue, Hi.ContextProvider = Re, Hi.Element = Oe, Hi.ForwardRef = $e, Hi.Fragment = Ee, Hi.Lazy = Fe, Hi.Memo = Ne, Hi.Portal = Q, Hi.Profiler = ae, Hi.StrictMode = le, Hi.Suspense = se, Hi.isAsyncMode = q, Hi.isConcurrentMode = Z, Hi.isContextConsumer = ee, Hi.isContextProvider = Le, Hi.isElement = Me, Hi.isForwardRef = De, Hi.isFragment = Ye, Hi.isLazy = Ze, Hi.isMemo = Xe, Hi.isPortal = lt, Hi.isProfiler = Dt, Hi.isStrictMode = Ct, Hi.isSuspense = hn, Hi.isValidElementType = V, Hi.typeOf = z;
    }(), Hi;
  }
  var Wi = {};
  /** @license React v16.13.1
   * react-is.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 Ak;
  function s7() {
    if (Ak)
      return Wi;
    Ak = 1;
    var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, i = n ? Symbol.for("react.fragment") : 60107, a = n ? Symbol.for("react.strict_mode") : 60108, o = n ? Symbol.for("react.profiler") : 60114, u = n ? Symbol.for("react.provider") : 60109, c = n ? Symbol.for("react.context") : 60110, p = n ? Symbol.for("react.async_mode") : 60111, y = n ? Symbol.for("react.concurrent_mode") : 60111, _ = n ? Symbol.for("react.forward_ref") : 60112, S = n ? Symbol.for("react.suspense") : 60113, b = n ? Symbol.for("react.suspense_list") : 60120, T = n ? Symbol.for("react.memo") : 60115, O = n ? Symbol.for("react.lazy") : 60116, N = n ? Symbol.for("react.block") : 60121, D = n ? Symbol.for("react.fundamental") : 60117, k = n ? Symbol.for("react.responder") : 60118, $ = n ? Symbol.for("react.scope") : 60119;
    function B(z) {
      if (typeof z == "object" && z !== null) {
        var G = z.$$typeof;
        switch (G) {
          case e:
            switch (z = z.type, z) {
              case p:
              case y:
              case i:
              case o:
              case a:
              case S:
                return z;
              default:
                switch (z = z && z.$$typeof, z) {
                  case c:
                  case _:
                  case O:
                  case T:
                  case u:
                    return z;
                  default:
                    return G;
                }
            }
          case t:
            return G;
        }
      }
    }
    function V(z) {
      return B(z) === y;
    }
    return Wi.AsyncMode = p, Wi.ConcurrentMode = y, Wi.ContextConsumer = c, Wi.ContextProvider = u, Wi.Element = e, Wi.ForwardRef = _, Wi.Fragment = i, Wi.Lazy = O, Wi.Memo = T, Wi.Portal = t, Wi.Profiler = o, Wi.StrictMode = a, Wi.Suspense = S, Wi.isAsyncMode = function(z) {
      return V(z) || B(z) === p;
    }, Wi.isConcurrentMode = V, Wi.isContextConsumer = function(z) {
      return B(z) === c;
    }, Wi.isContextProvider = function(z) {
      return B(z) === u;
    }, Wi.isElement = function(z) {
      return typeof z == "object" && z !== null && z.$$typeof === e;
    }, Wi.isForwardRef = function(z) {
      return B(z) === _;
    }, Wi.isFragment = function(z) {
      return B(z) === i;
    }, Wi.isLazy = function(z) {
      return B(z) === O;
    }, Wi.isMemo = function(z) {
      return B(z) === T;
    }, Wi.isPortal = function(z) {
      return B(z) === t;
    }, Wi.isProfiler = function(z) {
      return B(z) === o;
    }, Wi.isStrictMode = function(z) {
      return B(z) === a;
    }, Wi.isSuspense = function(z) {
      return B(z) === S;
    }, Wi.isValidElementType = function(z) {
      return typeof z == "string" || typeof z == "function" || z === i || z === y || z === o || z === a || z === S || z === b || typeof z == "object" && z !== null && (z.$$typeof === O || z.$$typeof === T || z.$$typeof === u || z.$$typeof === c || z.$$typeof === _ || z.$$typeof === D || z.$$typeof === k || z.$$typeof === $ || z.$$typeof === N);
    }, Wi.typeOf = B, Wi;
  }
  var Lk;
  function IF() {
    if (Lk)
      return fb.exports;
    Lk = 1;
    var n = {};
    return n.NODE_ENV === "production" ? fb.exports = s7() : fb.exports = a7(), fb.exports;
  }
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  var tO, Nk;
  function o7() {
    if (Nk)
      return tO;
    Nk = 1;
    var n = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
    function i(o) {
      if (o == null)
        throw new TypeError("Object.assign cannot be called with null or undefined");
      return Object(o);
    }
    function a() {
      try {
        if (!Object.assign)
          return !1;
        var o = new String("abc");
        if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
          return !1;
        for (var u = {}, c = 0; c < 10; c++)
          u["_" + String.fromCharCode(c)] = c;
        var p = Object.getOwnPropertyNames(u).map(function(_) {
          return u[_];
        });
        if (p.join("") !== "0123456789")
          return !1;
        var y = {};
        return "abcdefghijklmnopqrst".split("").forEach(function(_) {
          y[_] = _;
        }), Object.keys(Object.assign({}, y)).join("") === "abcdefghijklmnopqrst";
      } catch {
        return !1;
      }
    }
    return tO = a() ? Object.assign : function(o, u) {
      for (var c, p = i(o), y, _ = 1; _ < arguments.length; _++) {
        c = Object(arguments[_]);
        for (var S in c)
          e.call(c, S) && (p[S] = c[S]);
        if (n) {
          y = n(c);
          for (var b = 0; b < y.length; b++)
            t.call(c, y[b]) && (p[y[b]] = c[y[b]]);
        }
      }
      return p;
    }, tO;
  }
  var nO, Dk;
  function PF() {
    return Dk || (Dk = 1, nO = Function.call.bind(Object.prototype.hasOwnProperty)), nO;
  }
  var iO, Ik;
  function l7() {
    if (Ik)
      return iO;
    Ik = 1;
    var n = {}, e = function() {
    };
    if (n.NODE_ENV !== "production") {
      var t = rL(), i = {}, a = PF();
      e = function(u) {
        var c = "Warning: " + u;
        typeof console < "u" && console.error(c);
        try {
          throw new Error(c);
        } catch {
        }
      };
    }
    function o(u, c, p, y, _) {
      if (n.NODE_ENV !== "production") {
        for (var S in u)
          if (a(u, S)) {
            var b;
            try {
              if (typeof u[S] != "function") {
                var T = Error(
                  (y || "React class") + ": " + p + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
                );
                throw T.name = "Invariant Violation", T;
              }
              b = u[S](c, S, y, p, null, t);
            } catch (N) {
              b = N;
            }
            if (b && !(b instanceof Error) && e(
              (y || "React class") + ": type specification of " + p + " `" + S + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof b + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
            ), b instanceof Error && !(b.message in i)) {
              i[b.message] = !0;
              var O = _ ? _() : "";
              e(
                "Failed " + p + " type: " + b.message + (O ?? "")
              );
            }
          }
      }
    }
    return o.resetWarningCache = function() {
      n.NODE_ENV !== "production" && (i = {});
    }, iO = o, iO;
  }
  var rO, Pk;
  function u7() {
    if (Pk)
      return rO;
    Pk = 1;
    var n = {}, e = IF(), t = o7(), i = rL(), a = PF(), o = l7(), u = function() {
    };
    n.NODE_ENV !== "production" && (u = function(p) {
      var y = "Warning: " + p;
      typeof console < "u" && console.error(y);
      try {
        throw new Error(y);
      } catch {
      }
    });
    function c() {
      return null;
    }
    return rO = function(p, y) {
      var _ = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
      function b(Z) {
        var ee = Z && (_ && Z[_] || Z[S]);
        if (typeof ee == "function")
          return ee;
      }
      var T = "<<anonymous>>", O = {
        array: $("array"),
        bigint: $("bigint"),
        bool: $("boolean"),
        func: $("function"),
        number: $("number"),
        object: $("object"),
        string: $("string"),
        symbol: $("symbol"),
        any: B(),
        arrayOf: V,
        element: z(),
        elementType: G(),
        instanceOf: ie,
        node: $e(),
        objectOf: Re,
        oneOf: ue,
        oneOfType: Oe,
        shape: Fe,
        exact: Ne
      };
      function N(Z, ee) {
        return Z === ee ? Z !== 0 || 1 / Z === 1 / ee : Z !== Z && ee !== ee;
      }
      function D(Z, ee) {
        this.message = Z, this.data = ee && typeof ee == "object" ? ee : {}, this.stack = "";
      }
      D.prototype = Error.prototype;
      function k(Z) {
        if (n.NODE_ENV !== "production")
          var ee = {}, Le = 0;
        function Me(Ye, Ze, Xe, lt, Dt, Ct, hn) {
          if (lt = lt || T, Ct = Ct || Xe, hn !== i) {
            if (y) {
              var Je = new Error(
                "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
              );
              throw Je.name = "Invariant Violation", Je;
            } else if (n.NODE_ENV !== "production" && typeof console < "u") {
              var Pt = lt + ":" + Xe;
              !ee[Pt] && // Avoid spamming the console because they are often not actionable except for lib authors
              Le < 3 && (u(
                "You are manually calling a React.PropTypes validation function for the `" + Ct + "` prop on `" + lt + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
              ), ee[Pt] = !0, Le++);
            }
          }
          return Ze[Xe] == null ? Ye ? Ze[Xe] === null ? new D("The " + Dt + " `" + Ct + "` is marked as required " + ("in `" + lt + "`, but its value is `null`.")) : new D("The " + Dt + " `" + Ct + "` is marked as required in " + ("`" + lt + "`, but its value is `undefined`.")) : null : Z(Ze, Xe, lt, Dt, Ct);
        }
        var De = Me.bind(null, !1);
        return De.isRequired = Me.bind(null, !0), De;
      }
      function $(Z) {
        function ee(Le, Me, De, Ye, Ze, Xe) {
          var lt = Le[Me], Dt = le(lt);
          if (Dt !== Z) {
            var Ct = se(lt);
            return new D(
              "Invalid " + Ye + " `" + Ze + "` of type " + ("`" + Ct + "` supplied to `" + De + "`, expected ") + ("`" + Z + "`."),
              { expectedType: Z }
            );
          }
          return null;
        }
        return k(ee);
      }
      function B() {
        return k(c);
      }
      function V(Z) {
        function ee(Le, Me, De, Ye, Ze) {
          if (typeof Z != "function")
            return new D("Property `" + Ze + "` of component `" + De + "` has invalid PropType notation inside arrayOf.");
          var Xe = Le[Me];
          if (!Array.isArray(Xe)) {
            var lt = le(Xe);
            return new D("Invalid " + Ye + " `" + Ze + "` of type " + ("`" + lt + "` supplied to `" + De + "`, expected an array."));
          }
          for (var Dt = 0; Dt < Xe.length; Dt++) {
            var Ct = Z(Xe, Dt, De, Ye, Ze + "[" + Dt + "]", i);
            if (Ct instanceof Error)
              return Ct;
          }
          return null;
        }
        return k(ee);
      }
      function z() {
        function Z(ee, Le, Me, De, Ye) {
          var Ze = ee[Le];
          if (!p(Ze)) {
            var Xe = le(Ze);
            return new D("Invalid " + De + " `" + Ye + "` of type " + ("`" + Xe + "` supplied to `" + Me + "`, expected a single ReactElement."));
          }
          return null;
        }
        return k(Z);
      }
      function G() {
        function Z(ee, Le, Me, De, Ye) {
          var Ze = ee[Le];
          if (!e.isValidElementType(Ze)) {
            var Xe = le(Ze);
            return new D("Invalid " + De + " `" + Ye + "` of type " + ("`" + Xe + "` supplied to `" + Me + "`, expected a single ReactElement type."));
          }
          return null;
        }
        return k(Z);
      }
      function ie(Z) {
        function ee(Le, Me, De, Ye, Ze) {
          if (!(Le[Me] instanceof Z)) {
            var Xe = Z.name || T, lt = q(Le[Me]);
            return new D("Invalid " + Ye + " `" + Ze + "` of type " + ("`" + lt + "` supplied to `" + De + "`, expected ") + ("instance of `" + Xe + "`."));
          }
          return null;
        }
        return k(ee);
      }
      function ue(Z) {
        if (!Array.isArray(Z))
          return n.NODE_ENV !== "production" && (arguments.length > 1 ? u(
            "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
          ) : u("Invalid argument supplied to oneOf, expected an array.")), c;
        function ee(Le, Me, De, Ye, Ze) {
          for (var Xe = Le[Me], lt = 0; lt < Z.length; lt++)
            if (N(Xe, Z[lt]))
              return null;
          var Dt = JSON.stringify(Z, function(hn, Je) {
            var Pt = se(Je);
            return Pt === "symbol" ? String(Je) : Je;
          });
          return new D("Invalid " + Ye + " `" + Ze + "` of value `" + String(Xe) + "` " + ("supplied to `" + De + "`, expected one of " + Dt + "."));
        }
        return k(ee);
      }
      function Re(Z) {
        function ee(Le, Me, De, Ye, Ze) {
          if (typeof Z != "function")
            return new D("Property `" + Ze + "` of component `" + De + "` has invalid PropType notation inside objectOf.");
          var Xe = Le[Me], lt = le(Xe);
          if (lt !== "object")
            return new D("Invalid " + Ye + " `" + Ze + "` of type " + ("`" + lt + "` supplied to `" + De + "`, expected an object."));
          for (var Dt in Xe)
            if (a(Xe, Dt)) {
              var Ct = Z(Xe, Dt, De, Ye, Ze + "." + Dt, i);
              if (Ct instanceof Error)
                return Ct;
            }
          return null;
        }
        return k(ee);
      }
      function Oe(Z) {
        if (!Array.isArray(Z))
          return n.NODE_ENV !== "production" && u("Invalid argument supplied to oneOfType, expected an instance of array."), c;
        for (var ee = 0; ee < Z.length; ee++) {
          var Le = Z[ee];
          if (typeof Le != "function")
            return u(
              "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Ae(Le) + " at index " + ee + "."
            ), c;
        }
        function Me(De, Ye, Ze, Xe, lt) {
          for (var Dt = [], Ct = 0; Ct < Z.length; Ct++) {
            var hn = Z[Ct], Je = hn(De, Ye, Ze, Xe, lt, i);
            if (Je == null)
              return null;
            Je.data && a(Je.data, "expectedType") && Dt.push(Je.data.expectedType);
          }
          var Pt = Dt.length > 0 ? ", expected one of type [" + Dt.join(", ") + "]" : "";
          return new D("Invalid " + Xe + " `" + lt + "` supplied to " + ("`" + Ze + "`" + Pt + "."));
        }
        return k(Me);
      }
      function $e() {
        function Z(ee, Le, Me, De, Ye) {
          return Q(ee[Le]) ? null : new D("Invalid " + De + " `" + Ye + "` supplied to " + ("`" + Me + "`, expected a ReactNode."));
        }
        return k(Z);
      }
      function Ee(Z, ee, Le, Me, De) {
        return new D(
          (Z || "React class") + ": " + ee + " type `" + Le + "." + Me + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + De + "`."
        );
      }
      function Fe(Z) {
        function ee(Le, Me, De, Ye, Ze) {
          var Xe = Le[Me], lt = le(Xe);
          if (lt !== "object")
            return new D("Invalid " + Ye + " `" + Ze + "` of type `" + lt + "` " + ("supplied to `" + De + "`, expected `object`."));
          for (var Dt in Z) {
            var Ct = Z[Dt];
            if (typeof Ct != "function")
              return Ee(De, Ye, Ze, Dt, se(Ct));
            var hn = Ct(Xe, Dt, De, Ye, Ze + "." + Dt, i);
            if (hn)
              return hn;
          }
          return null;
        }
        return k(ee);
      }
      function Ne(Z) {
        function ee(Le, Me, De, Ye, Ze) {
          var Xe = Le[Me], lt = le(Xe);
          if (lt !== "object")
            return new D("Invalid " + Ye + " `" + Ze + "` of type `" + lt + "` " + ("supplied to `" + De + "`, expected `object`."));
          var Dt = t({}, Le[Me], Z);
          for (var Ct in Dt) {
            var hn = Z[Ct];
            if (a(Z, Ct) && typeof hn != "function")
              return Ee(De, Ye, Ze, Ct, se(hn));
            if (!hn)
              return new D(
                "Invalid " + Ye + " `" + Ze + "` key `" + Ct + "` supplied to `" + De + "`.\nBad object: " + JSON.stringify(Le[Me], null, "  ") + `
Valid keys: ` + JSON.stringify(Object.keys(Z), null, "  ")
              );
            var Je = hn(Xe, Ct, De, Ye, Ze + "." + Ct, i);
            if (Je)
              return Je;
          }
          return null;
        }
        return k(ee);
      }
      function Q(Z) {
        switch (typeof Z) {
          case "number":
          case "string":
          case "undefined":
            return !0;
          case "boolean":
            return !Z;
          case "object":
            if (Array.isArray(Z))
              return Z.every(Q);
            if (Z === null || p(Z))
              return !0;
            var ee = b(Z);
            if (ee) {
              var Le = ee.call(Z), Me;
              if (ee !== Z.entries) {
                for (; !(Me = Le.next()).done; )
                  if (!Q(Me.value))
                    return !1;
              } else
                for (; !(Me = Le.next()).done; ) {
                  var De = Me.value;
                  if (De && !Q(De[1]))
                    return !1;
                }
            } else
              return !1;
            return !0;
          default:
            return !1;
        }
      }
      function ae(Z, ee) {
        return Z === "symbol" ? !0 : ee ? ee["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && ee instanceof Symbol : !1;
      }
      function le(Z) {
        var ee = typeof Z;
        return Array.isArray(Z) ? "array" : Z instanceof RegExp ? "object" : ae(ee, Z) ? "symbol" : ee;
      }
      function se(Z) {
        if (typeof Z > "u" || Z === null)
          return "" + Z;
        var ee = le(Z);
        if (ee === "object") {
          if (Z instanceof Date)
            return "date";
          if (Z instanceof RegExp)
            return "regexp";
        }
        return ee;
      }
      function Ae(Z) {
        var ee = se(Z);
        switch (ee) {
          case "array":
          case "object":
            return "an " + ee;
          case "boolean":
          case "date":
          case "regexp":
            return "a " + ee;
          default:
            return ee;
        }
      }
      function q(Z) {
        return !Z.constructor || !Z.constructor.name ? T : Z.constructor.name;
      }
      return O.checkPropTypes = o, O.resetWarningCache = o.resetWarningCache, O.PropTypes = O, O;
    }, rO;
  }
  var c7 = {};
  if (c7.NODE_ENV !== "production") {
    var f7 = IF(), h7 = !0;
    hA.exports = u7()(f7.isElement, h7);
  } else
    hA.exports = r7()();
  var d7 = hA.exports;
  const wa = /* @__PURE__ */ Cw(d7);
  var xa = {};
  function Zs(n) {
    return `Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `;
  }
  var p7 = typeof Symbol == "function" && Symbol.observable || "@@observable", kk = p7, aO = () => Math.random().toString(36).substring(7).split("").join("."), g7 = {
    INIT: `@@redux/INIT${/* @__PURE__ */ aO()}`,
    REPLACE: `@@redux/REPLACE${/* @__PURE__ */ aO()}`,
    PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${aO()}`
  }, Fv = g7;
  function iS(n) {
    if (typeof n != "object" || n === null)
      return !1;
    let e = n;
    for (; Object.getPrototypeOf(e) !== null; )
      e = Object.getPrototypeOf(e);
    return Object.getPrototypeOf(n) === e;
  }
  function m7(n) {
    if (n === void 0)
      return "undefined";
    if (n === null)
      return "null";
    const e = typeof n;
    switch (e) {
      case "boolean":
      case "string":
      case "number":
      case "symbol":
      case "function":
        return e;
    }
    if (Array.isArray(n))
      return "array";
    if (_7(n))
      return "date";
    if (y7(n))
      return "error";
    const t = v7(n);
    switch (t) {
      case "Symbol":
      case "Promise":
      case "WeakMap":
      case "WeakSet":
      case "Map":
      case "Set":
        return t;
    }
    return Object.prototype.toString.call(n).slice(8, -1).toLowerCase().replace(/\s/g, "");
  }
  function v7(n) {
    return typeof n.constructor == "function" ? n.constructor.name : null;
  }
  function y7(n) {
    return n instanceof Error || typeof n.message == "string" && n.constructor && typeof n.constructor.stackTraceLimit == "number";
  }
  function _7(n) {
    return n instanceof Date ? !0 : typeof n.toDateString == "function" && typeof n.getDate == "function" && typeof n.setDate == "function";
  }
  function Bg(n) {
    let e = typeof n;
    return xa.NODE_ENV !== "production" && (e = m7(n)), e;
  }
  function kF(n, e, t) {
    if (typeof n != "function")
      throw new Error(xa.NODE_ENV === "production" ? Zs(2) : `Expected the root reducer to be a function. Instead, received: '${Bg(n)}'`);
    if (typeof e == "function" && typeof t == "function" || typeof t == "function" && typeof arguments[3] == "function")
      throw new Error(xa.NODE_ENV === "production" ? Zs(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
    if (typeof e == "function" && typeof t > "u" && (t = e, e = void 0), typeof t < "u") {
      if (typeof t != "function")
        throw new Error(xa.NODE_ENV === "production" ? Zs(1) : `Expected the enhancer to be a function. Instead, received: '${Bg(t)}'`);
      return t(kF)(n, e);
    }
    let i = n, a = e, o = /* @__PURE__ */ new Map(), u = o, c = 0, p = !1;
    function y() {
      u === o && (u = /* @__PURE__ */ new Map(), o.forEach((D, k) => {
        u.set(k, D);
      }));
    }
    function _() {
      if (p)
        throw new Error(xa.NODE_ENV === "production" ? Zs(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
      return a;
    }
    function S(D) {
      if (typeof D != "function")
        throw new Error(xa.NODE_ENV === "production" ? Zs(4) : `Expected the listener to be a function. Instead, received: '${Bg(D)}'`);
      if (p)
        throw new Error(xa.NODE_ENV === "production" ? Zs(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
      let k = !0;
      y();
      const $ = c++;
      return u.set($, D), function() {
        if (k) {
          if (p)
            throw new Error(xa.NODE_ENV === "production" ? Zs(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
          k = !1, y(), u.delete($), o = null;
        }
      };
    }
    function b(D) {
      if (!iS(D))
        throw new Error(xa.NODE_ENV === "production" ? Zs(7) : `Actions must be plain objects. Instead, the actual type was: '${Bg(D)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
      if (typeof D.type > "u")
        throw new Error(xa.NODE_ENV === "production" ? Zs(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
      if (typeof D.type != "string")
        throw new Error(xa.NODE_ENV === "production" ? Zs(17) : `Action "type" property must be a string. Instead, the actual type was: '${Bg(D.type)}'. Value was: '${D.type}' (stringified)`);
      if (p)
        throw new Error(xa.NODE_ENV === "production" ? Zs(9) : "Reducers may not dispatch actions.");
      try {
        p = !0, a = i(a, D);
      } finally {
        p = !1;
      }
      return (o = u).forEach(($) => {
        $();
      }), D;
    }
    function T(D) {
      if (typeof D != "function")
        throw new Error(xa.NODE_ENV === "production" ? Zs(10) : `Expected the nextReducer to be a function. Instead, received: '${Bg(D)}`);
      i = D, b({
        type: Fv.REPLACE
      });
    }
    function O() {
      const D = S;
      return {
        /**
         * The minimal observable subscription method.
         * @param observer Any object that can be used as an observer.
         * The observer object should have a `next` method.
         * @returns An object with an `unsubscribe` method that can
         * be used to unsubscribe the observable from the store, and prevent further
         * emission of values from the observable.
         */
        subscribe(k) {
          if (typeof k != "object" || k === null)
            throw new Error(xa.NODE_ENV === "production" ? Zs(11) : `Expected the observer to be an object. Instead, received: '${Bg(k)}'`);
          function $() {
            const V = k;
            V.next && V.next(_());
          }
          return $(), {
            unsubscribe: D($)
          };
        },
        [kk]() {
          return this;
        }
      };
    }
    return b({
      type: Fv.INIT
    }), {
      dispatch: b,
      subscribe: S,
      getState: _,
      replaceReducer: T,
      [kk]: O
    };
  }
  function Fk(n) {
    typeof console < "u" && typeof console.error == "function" && console.error(n);
    try {
      throw new Error(n);
    } catch {
    }
  }
  function E7(n, e, t, i) {
    const a = Object.keys(e), o = t && t.type === Fv.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
    if (a.length === 0)
      return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
    if (!iS(n))
      return `The ${o} has unexpected type of "${Bg(n)}". Expected argument to be an object with the following keys: "${a.join('", "')}"`;
    const u = Object.keys(n).filter((c) => !e.hasOwnProperty(c) && !i[c]);
    if (u.forEach((c) => {
      i[c] = !0;
    }), !(t && t.type === Fv.REPLACE) && u.length > 0)
      return `Unexpected ${u.length > 1 ? "keys" : "key"} "${u.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${a.join('", "')}". Unexpected keys will be ignored.`;
  }
  function S7(n) {
    Object.keys(n).forEach((e) => {
      const t = n[e];
      if (typeof t(void 0, {
        type: Fv.INIT
      }) > "u")
        throw new Error(xa.NODE_ENV === "production" ? Zs(12) : `The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
      if (typeof t(void 0, {
        type: Fv.PROBE_UNKNOWN_ACTION()
      }) > "u")
        throw new Error(xa.NODE_ENV === "production" ? Zs(13) : `The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Fv.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);
    });
  }
  function x7(n) {
    const e = Object.keys(n), t = {};
    for (let u = 0; u < e.length; u++) {
      const c = e[u];
      xa.NODE_ENV !== "production" && typeof n[c] > "u" && Fk(`No reducer provided for key "${c}"`), typeof n[c] == "function" && (t[c] = n[c]);
    }
    const i = Object.keys(t);
    let a;
    xa.NODE_ENV !== "production" && (a = {});
    let o;
    try {
      S7(t);
    } catch (u) {
      o = u;
    }
    return function(c = {}, p) {
      if (o)
        throw o;
      if (xa.NODE_ENV !== "production") {
        const S = E7(c, t, p, a);
        S && Fk(S);
      }
      let y = !1;
      const _ = {};
      for (let S = 0; S < i.length; S++) {
        const b = i[S], T = t[b], O = c[b], N = T(O, p);
        if (typeof N > "u") {
          const D = p && p.type;
          throw new Error(xa.NODE_ENV === "production" ? Zs(14) : `When called with an action of type ${D ? `"${String(D)}"` : "(unknown type)"}, the slice reducer for key "${b}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);
        }
        _[b] = N, y = y || N !== O;
      }
      return y = y || i.length !== Object.keys(c).length, y ? _ : c;
    };
  }
  function nw(...n) {
    return n.length === 0 ? (e) => e : n.length === 1 ? n[0] : n.reduce((e, t) => (...i) => e(t(...i)));
  }
  function b7(...n) {
    return (e) => (t, i) => {
      const a = e(t, i);
      let o = () => {
        throw new Error(xa.NODE_ENV === "production" ? Zs(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
      };
      const u = {
        getState: a.getState,
        dispatch: (p, ...y) => o(p, ...y)
      }, c = n.map((p) => p(u));
      return o = nw(...c)(a.dispatch), {
        ...a,
        dispatch: o
      };
    };
  }
  function FF(n) {
    return iS(n) && "type" in n && typeof n.type == "string";
  }
  var rS = {}, jF = Symbol.for("immer-nothing"), jk = Symbol.for("immer-draftable"), xu = Symbol.for("immer-state"), w7 = rS.NODE_ENV !== "production" ? [
    // All error codes, starting by 0:
    function(n) {
      return `The plugin for '${n}' has not been loaded into Immer. To enable the plugin, import and call \`enable${n}()\` when initializing your application.`;
    },
    function(n) {
      return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${n}'`;
    },
    "This object has been frozen and should not be mutated",
    function(n) {
      return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + n;
    },
    "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
    "Immer forbids circular references",
    "The first or second argument to `produce` must be a function",
    "The third argument to `produce` must be a function or undefined",
    "First argument to `createDraft` must be a plain object, an array, or an immerable object",
    "First argument to `finishDraft` must be a draft returned by `createDraft`",
    function(n) {
      return `'current' expects a draft, got: ${n}`;
    },
    "Object.defineProperty() cannot be used on an Immer draft",
    "Object.setPrototypeOf() cannot be used on an Immer draft",
    "Immer only supports deleting array indices",
    "Immer only supports setting array indices and the 'length' property",
    function(n) {
      return `'original' expects a draft, got: ${n}`;
    }
    // Note: if more errors are added, the errorOffset in Patches.ts should be increased
    // See Patches.ts for additional errors
  ] : [];
  function Nl(n, ...e) {
    if (rS.NODE_ENV !== "production") {
      const t = w7[n], i = typeof t == "function" ? t.apply(null, e) : t;
      throw new Error(`[Immer] ${i}`);
    }
    throw new Error(
      `[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`
    );
  }
  var J0 = Object.getPrototypeOf;
  function nm(n) {
    return !!n && !!n[xu];
  }
  function Tp(n) {
    var e;
    return n ? UF(n) || Array.isArray(n) || !!n[jk] || !!((e = n.constructor) != null && e[jk]) || Pw(n) || kw(n) : !1;
  }
  var C7 = Object.prototype.constructor.toString();
  function UF(n) {
    if (!n || typeof n != "object")
      return !1;
    const e = J0(n);
    if (e === null)
      return !0;
    const t = Object.hasOwnProperty.call(e, "constructor") && e.constructor;
    return t === Object ? !0 : typeof t == "function" && Function.toString.call(t) === C7;
  }
  function NE(n, e) {
    Iw(n) === 0 ? Object.entries(n).forEach(([t, i]) => {
      e(t, i, n);
    }) : n.forEach((t, i) => e(i, t, n));
  }
  function Iw(n) {
    const e = n[xu];
    return e ? e.type_ : Array.isArray(n) ? 1 : Pw(n) ? 2 : kw(n) ? 3 : 0;
  }
  function dA(n, e) {
    return Iw(n) === 2 ? n.has(e) : Object.prototype.hasOwnProperty.call(n, e);
  }
  function zF(n, e, t) {
    const i = Iw(n);
    i === 2 ? n.set(e, t) : i === 3 ? n.add(t) : n[e] = t;
  }
  function T7(n, e) {
    return n === e ? n !== 0 || 1 / n === 1 / e : n !== n && e !== e;
  }
  function Pw(n) {
    return n instanceof Map;
  }
  function kw(n) {
    return n instanceof Set;
  }
  function Tv(n) {
    return n.copy_ || n.base_;
  }
  function pA(n, e) {
    if (Pw(n))
      return new Map(n);
    if (kw(n))
      return new Set(n);
    if (Array.isArray(n))
      return Array.prototype.slice.call(n);
    if (!e && UF(n))
      return J0(n) ? { ...n } : Object.assign(/* @__PURE__ */ Object.create(null), n);
    const t = Object.getOwnPropertyDescriptors(n);
    delete t[xu];
    let i = Reflect.ownKeys(t);
    for (let a = 0; a < i.length; a++) {
      const o = i[a], u = t[o];
      u.writable === !1 && (u.writable = !0, u.configurable = !0), (u.get || u.set) && (t[o] = {
        configurable: !0,
        writable: !0,
        // could live with !!desc.set as well here...
        enumerable: u.enumerable,
        value: n[o]
      });
    }
    return Object.create(J0(n), t);
  }
  function aL(n, e = !1) {
    return Fw(n) || nm(n) || !Tp(n) || (Iw(n) > 1 && (n.set = n.add = n.clear = n.delete = R7), Object.freeze(n), e && NE(n, (t, i) => aL(i, !0))), n;
  }
  function R7() {
    Nl(2);
  }
  function Fw(n) {
    return Object.isFrozen(n);
  }
  var M7 = {};
  function Bv(n) {
    const e = M7[n];
    return e || Nl(0, n), e;
  }
  var DE;
  function $F() {
    return DE;
  }
  function O7(n, e) {
    return {
      drafts_: [],
      parent_: n,
      immer_: e,
      // Whenever the modified draft contains a draft from another scope, we
      // need to prevent auto-freezing so the unowned draft can be finalized.
      canAutoFreeze_: !0,
      unfinalizedDrafts_: 0
    };
  }
  function Uk(n, e) {
    e && (Bv("Patches"), n.patches_ = [], n.inversePatches_ = [], n.patchListener_ = e);
  }
  function gA(n) {
    mA(n), n.drafts_.forEach(A7), n.drafts_ = null;
  }
  function mA(n) {
    n === DE && (DE = n.parent_);
  }
  function zk(n) {
    return DE = O7(DE, n);
  }
  function A7(n) {
    const e = n[xu];
    e.type_ === 0 || e.type_ === 1 ? e.revoke_() : e.revoked_ = !0;
  }
  function $k(n, e) {
    e.unfinalizedDrafts_ = e.drafts_.length;
    const t = e.drafts_[0];
    return n !== void 0 && n !== t ? (t[xu].modified_ && (gA(e), Nl(4)), Tp(n) && (n = iw(e, n), e.parent_ || rw(e, n)), e.patches_ && Bv("Patches").generateReplacementPatches_(
      t[xu].base_,
      n,
      e.patches_,
      e.inversePatches_
    )) : n = iw(e, t, []), gA(e), e.patches_ && e.patchListener_(e.patches_, e.inversePatches_), n !== jF ? n : void 0;
  }
  function iw(n, e, t) {
    if (Fw(e))
      return e;
    const i = e[xu];
    if (!i)
      return NE(
        e,
        (a, o) => Bk(n, i, e, a, o, t)
      ), e;
    if (i.scope_ !== n)
      return e;
    if (!i.modified_)
      return rw(n, i.base_, !0), i.base_;
    if (!i.finalized_) {
      i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
      const a = i.copy_;
      let o = a, u = !1;
      i.type_ === 3 && (o = new Set(a), a.clear(), u = !0), NE(
        o,
        (c, p) => Bk(n, i, a, c, p, t, u)
      ), rw(n, a, !1), t && n.patches_ && Bv("Patches").generatePatches_(
        i,
        t,
        n.patches_,
        n.inversePatches_
      );
    }
    return i.copy_;
  }
  function Bk(n, e, t, i, a, o, u) {
    if (rS.NODE_ENV !== "production" && a === t && Nl(5), nm(a)) {
      const c = o && e && e.type_ !== 3 && // Set objects are atomic since they have no keys.
      !dA(e.assigned_, i) ? o.concat(i) : void 0, p = iw(n, a, c);
      if (zF(t, i, p), nm(p))
        n.canAutoFreeze_ = !1;
      else
        return;
    } else
      u && t.add(a);
    if (Tp(a) && !Fw(a)) {
      if (!n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1)
        return;
      iw(n, a), (!e || !e.scope_.parent_) && rw(n, a);
    }
  }
  function rw(n, e, t = !1) {
    !n.parent_ && n.immer_.autoFreeze_ && n.canAutoFreeze_ && aL(e, t);
  }
  function L7(n, e) {
    const t = Array.isArray(n), i = {
      type_: t ? 1 : 0,
      // Track which produce call this is associated with.
      scope_: e ? e.scope_ : $F(),
      // True for both shallow and deep changes.
      modified_: !1,
      // Used during finalization.
      finalized_: !1,
      // Track which properties have been assigned (true) or deleted (false).
      assigned_: {},
      // The parent draft state.
      parent_: e,
      // The base state.
      base_: n,
      // The base proxy.
      draft_: null,
      // set below
      // The base copy with any updated values.
      copy_: null,
      // Called by the `produce` function.
      revoke_: null,
      isManual_: !1
    };
    let a = i, o = sL;
    t && (a = [i], o = IE);
    const { revoke: u, proxy: c } = Proxy.revocable(a, o);
    return i.draft_ = c, i.revoke_ = u, c;
  }
  var sL = {
    get(n, e) {
      if (e === xu)
        return n;
      const t = Tv(n);
      if (!dA(t, e))
        return N7(n, t, e);
      const i = t[e];
      return n.finalized_ || !Tp(i) ? i : i === sO(n.base_, e) ? (oO(n), n.copy_[e] = yA(i, n)) : i;
    },
    has(n, e) {
      return e in Tv(n);
    },
    ownKeys(n) {
      return Reflect.ownKeys(Tv(n));
    },
    set(n, e, t) {
      const i = BF(Tv(n), e);
      if (i != null && i.set)
        return i.set.call(n.draft_, t), !0;
      if (!n.modified_) {
        const a = sO(Tv(n), e), o = a == null ? void 0 : a[xu];
        if (o && o.base_ === t)
          return n.copy_[e] = t, n.assigned_[e] = !1, !0;
        if (T7(t, a) && (t !== void 0 || dA(n.base_, e)))
          return !0;
        oO(n), vA(n);
      }
      return n.copy_[e] === t && // special case: handle new props with value 'undefined'
      (t !== void 0 || e in n.copy_) || // special case: NaN
      Number.isNaN(t) && Number.isNaN(n.copy_[e]) || (n.copy_[e] = t, n.assigned_[e] = !0), !0;
    },
    deleteProperty(n, e) {
      return sO(n.base_, e) !== void 0 || e in n.base_ ? (n.assigned_[e] = !1, oO(n), vA(n)) : delete n.assigned_[e], n.copy_ && delete n.copy_[e], !0;
    },
    // Note: We never coerce `desc.value` into an Immer draft, because we can't make
    // the same guarantee in ES5 mode.
    getOwnPropertyDescriptor(n, e) {
      const t = Tv(n), i = Reflect.getOwnPropertyDescriptor(t, e);
      return i && {
        writable: !0,
        configurable: n.type_ !== 1 || e !== "length",
        enumerable: i.enumerable,
        value: t[e]
      };
    },
    defineProperty() {
      Nl(11);
    },
    getPrototypeOf(n) {
      return J0(n.base_);
    },
    setPrototypeOf() {
      Nl(12);
    }
  }, IE = {};
  NE(sL, (n, e) => {
    IE[n] = function() {
      return arguments[0] = arguments[0][0], e.apply(this, arguments);
    };
  });
  IE.deleteProperty = function(n, e) {
    return rS.NODE_ENV !== "production" && isNaN(parseInt(e)) && Nl(13), IE.set.call(this, n, e, void 0);
  };
  IE.set = function(n, e, t) {
    return rS.NODE_ENV !== "production" && e !== "length" && isNaN(parseInt(e)) && Nl(14), sL.set.call(this, n[0], e, t, n[0]);
  };
  function sO(n, e) {
    const t = n[xu];
    return (t ? Tv(t) : n)[e];
  }
  function N7(n, e, t) {
    var a;
    const i = BF(e, t);
    return i ? "value" in i ? i.value : (
      // This is a very special case, if the prop is a getter defined by the
      // prototype, we should invoke it with the draft as context!
      (a = i.get) == null ? void 0 : a.call(n.draft_)
    ) : void 0;
  }
  function BF(n, e) {
    if (!(e in n))
      return;
    let t = J0(n);
    for (; t; ) {
      const i = Object.getOwnPropertyDescriptor(t, e);
      if (i)
        return i;
      t = J0(t);
    }
  }
  function vA(n) {
    n.modified_ || (n.modified_ = !0, n.parent_ && vA(n.parent_));
  }
  function oO(n) {
    n.copy_ || (n.copy_ = pA(
      n.base_,
      n.scope_.immer_.useStrictShallowCopy_
    ));
  }
  var D7 = class {
    constructor(n) {
      this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (e, t, i) => {
        if (typeof e == "function" && typeof t != "function") {
          const o = t;
          t = e;
          const u = this;
          return function(p = o, ...y) {
            return u.produce(p, (_) => t.call(this, _, ...y));
          };
        }
        typeof t != "function" && Nl(6), i !== void 0 && typeof i != "function" && Nl(7);
        let a;
        if (Tp(e)) {
          const o = zk(this), u = yA(e, void 0);
          let c = !0;
          try {
            a = t(u), c = !1;
          } finally {
            c ? gA(o) : mA(o);
          }
          return Uk(o, i), $k(a, o);
        } else if (!e || typeof e != "object") {
          if (a = t(e), a === void 0 && (a = e), a === jF && (a = void 0), this.autoFreeze_ && aL(a, !0), i) {
            const o = [], u = [];
            Bv("Patches").generateReplacementPatches_(e, a, o, u), i(o, u);
          }
          return a;
        } else
          Nl(1, e);
      }, this.produceWithPatches = (e, t) => {
        if (typeof e == "function")
          return (u, ...c) => this.produceWithPatches(u, (p) => e(p, ...c));
        let i, a;
        return [this.produce(e, t, (u, c) => {
          i = u, a = c;
        }), i, a];
      }, typeof (n == null ? void 0 : n.autoFreeze) == "boolean" && this.setAutoFreeze(n.autoFreeze), typeof (n == null ? void 0 : n.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(n.useStrictShallowCopy);
    }
    createDraft(n) {
      Tp(n) || Nl(8), nm(n) && (n = VF(n));
      const e = zk(this), t = yA(n, void 0);
      return t[xu].isManual_ = !0, mA(e), t;
    }
    finishDraft(n, e) {
      const t = n && n[xu];
      (!t || !t.isManual_) && Nl(9);
      const { scope_: i } = t;
      return Uk(i, e), $k(void 0, i);
    }
    /**
     * Pass true to automatically freeze all copies created by Immer.
     *
     * By default, auto-freezing is enabled.
     */
    setAutoFreeze(n) {
      this.autoFreeze_ = n;
    }
    /**
     * Pass true to enable strict shallow copy.
     *
     * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
     */
    setUseStrictShallowCopy(n) {
      this.useStrictShallowCopy_ = n;
    }
    applyPatches(n, e) {
      let t;
      for (t = e.length - 1; t >= 0; t--) {
        const a = e[t];
        if (a.path.length === 0 && a.op === "replace") {
          n = a.value;
          break;
        }
      }
      t > -1 && (e = e.slice(t + 1));
      const i = Bv("Patches").applyPatches_;
      return nm(n) ? i(n, e) : this.produce(
        n,
        (a) => i(a, e)
      );
    }
  };
  function yA(n, e) {
    const t = Pw(n) ? Bv("MapSet").proxyMap_(n, e) : kw(n) ? Bv("MapSet").proxySet_(n, e) : L7(n, e);
    return (e ? e.scope_ : $F()).drafts_.push(t), t;
  }
  function VF(n) {
    return nm(n) || Nl(10, n), HF(n);
  }
  function HF(n) {
    if (!Tp(n) || Fw(n))
      return n;
    const e = n[xu];
    let t;
    if (e) {
      if (!e.modified_)
        return e.base_;
      e.finalized_ = !0, t = pA(n, e.scope_.immer_.useStrictShallowCopy_);
    } else
      t = pA(n, !0);
    return NE(t, (i, a) => {
      zF(t, i, HF(a));
    }), e && (e.finalized_ = !1), t;
  }
  var bu = new D7(), WF = bu.produce;
  bu.produceWithPatches.bind(
    bu
  );
  bu.setAutoFreeze.bind(bu);
  bu.setUseStrictShallowCopy.bind(bu);
  bu.applyPatches.bind(bu);
  bu.createDraft.bind(bu);
  bu.finishDraft.bind(bu);
  var I7 = {}, P7 = (n) => {
    let e = !1;
    try {
      const t = {};
      n(t) === t && (e = !0);
    } catch {
    }
    if (e) {
      let t;
      try {
        throw new Error();
      } catch (i) {
        ({ stack: t } = i);
      }
      console.warn(
        `The result function returned its own inputs without modification. e.g
\`createSelector([state => state.todos], todos => todos)\`
This could lead to inefficient memoization and unnecessary re-renders.
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,
        { stack: t }
      );
    }
  }, k7 = (n, e, t) => {
    const { memoize: i, memoizeOptions: a } = e, { inputSelectorResults: o, inputSelectorResultsCopy: u } = n, c = i(() => ({}), ...a);
    if (!(c.apply(null, o) === c.apply(null, u))) {
      let y;
      try {
        throw new Error();
      } catch (_) {
        ({ stack: y } = _);
      }
      console.warn(
        `An input selector returned a different result when passed same arguments.
This means your output selector will likely run more frequently than intended.
Avoid returning a new reference inside your input selector, e.g.
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,
        {
          arguments: t,
          firstInputs: o,
          secondInputs: u,
          stack: y
        }
      );
    }
  }, F7 = {
    inputStabilityCheck: "once",
    identityFunctionCheck: "once"
  };
  function j7(n, e = `expected a function, instead received ${typeof n}`) {
    if (typeof n != "function")
      throw new TypeError(e);
  }
  function U7(n, e = "expected all items to be functions, instead received the following types: ") {
    if (!n.every((t) => typeof t == "function")) {
      const t = n.map(
        (i) => typeof i == "function" ? `function ${i.name || "unnamed"}()` : typeof i
      ).join(", ");
      throw new TypeError(`${e}[${t}]`);
    }
  }
  var Vk = (n) => Array.isArray(n) ? n : [n];
  function z7(n) {
    const e = Array.isArray(n[0]) ? n[0] : n;
    return U7(
      e,
      "createSelector expects all input-selectors to be functions, but received the following types: "
    ), e;
  }
  function Hk(n, e) {
    const t = [], { length: i } = n;
    for (let a = 0; a < i; a++)
      t.push(n[a].apply(null, e));
    return t;
  }
  var $7 = (n, e) => {
    const { identityFunctionCheck: t, inputStabilityCheck: i } = {
      ...F7,
      ...e
    };
    return {
      identityFunctionCheck: {
        shouldRun: t === "always" || t === "once" && n,
        run: P7
      },
      inputStabilityCheck: {
        shouldRun: i === "always" || i === "once" && n,
        run: k7
      }
    };
  }, B7 = class {
    constructor(n) {
      this.value = n;
    }
    deref() {
      return this.value;
    }
  }, V7 = typeof WeakRef < "u" ? WeakRef : B7, H7 = 0, Wk = 1;
  function hb() {
    return {
      s: H7,
      v: void 0,
      o: null,
      p: null
    };
  }
  function GF(n, e = {}) {
    let t = hb();
    const { resultEqualityCheck: i } = e;
    let a, o = 0;
    function u() {
      let c = t;
      const { length: p } = arguments;
      for (let S = 0, b = p; S < b; S++) {
        const T = arguments[S];
        if (typeof T == "function" || typeof T == "object" && T !== null) {
          let O = c.o;
          O === null && (c.o = O = /* @__PURE__ */ new WeakMap());
          const N = O.get(T);
          N === void 0 ? (c = hb(), O.set(T, c)) : c = N;
        } else {
          let O = c.p;
          O === null && (c.p = O = /* @__PURE__ */ new Map());
          const N = O.get(T);
          N === void 0 ? (c = hb(), O.set(T, c)) : c = N;
        }
      }
      const y = c;
      let _;
      if (c.s === Wk ? _ = c.v : (_ = n.apply(null, arguments), o++), y.s = Wk, i) {
        const S = (a == null ? void 0 : a.deref()) ?? a;
        S != null && i(S, _) && (_ = S, o !== 0 && o--), a = typeof _ == "object" && _ !== null || typeof _ == "function" ? new V7(_) : _;
      }
      return y.v = _, _;
    }
    return u.clearCache = () => {
      t = hb(), u.resetResultsCount();
    }, u.resultsCount = () => o, u.resetResultsCount = () => {
      o = 0;
    }, u;
  }
  function W7(n, ...e) {
    const t = typeof n == "function" ? {
      memoize: n,
      memoizeOptions: e
    } : n;
    return (...a) => {
      let o = 0, u = 0, c, p = {}, y = a.pop();
      typeof y == "object" && (p = y, y = a.pop()), j7(
        y,
        `createSelector expects an output function after the inputs, but received: [${typeof y}]`
      );
      const _ = {
        ...t,
        ...p
      }, {
        memoize: S,
        memoizeOptions: b = [],
        argsMemoize: T = GF,
        argsMemoizeOptions: O = [],
        devModeChecks: N = {}
      } = _, D = Vk(b), k = Vk(O), $ = z7(a), B = S(function() {
        return o++, y.apply(
          null,
          arguments
        );
      }, ...D);
      let V = !0;
      const z = T(function() {
        u++;
        const ie = Hk(
          $,
          arguments
        );
        if (I7.NODE_ENV !== "production") {
          const { identityFunctionCheck: ue, inputStabilityCheck: Re } = $7(V, N);
          if (ue.shouldRun && ue.run(
            y
          ), Re.shouldRun) {
            const Oe = Hk(
              $,
              arguments
            );
            Re.run(
              { inputSelectorResults: ie, inputSelectorResultsCopy: Oe },
              { memoize: S, memoizeOptions: D },
              arguments
            );
          }
          V && (V = !1);
        }
        return c = B.apply(null, ie), c;
      }, ...k);
      return Object.assign(z, {
        resultFunc: y,
        memoizedResultFunc: B,
        dependencies: $,
        dependencyRecomputations: () => u,
        resetDependencyRecomputations: () => {
          u = 0;
        },
        lastResult: () => c,
        recomputations: () => o,
        resetRecomputations: () => {
          o = 0;
        },
        memoize: S,
        argsMemoize: T
      });
    };
  }
  function YF(n) {
    return ({ dispatch: t, getState: i }) => (a) => (o) => typeof o == "function" ? o(t, i, n) : a(o);
  }
  var G7 = YF(), Y7 = YF, Dn = {}, q7 = (...n) => {
    const e = W7(...n);
    return (...t) => {
      const i = e(...t), a = (o, ...u) => i(nm(o) ? VF(o) : o, ...u);
      return Object.assign(a, i), a;
    };
  };
  q7(GF);
  var X7 = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
    if (arguments.length !== 0)
      return typeof arguments[0] == "object" ? nw : nw.apply(null, arguments);
  }, K7 = (n) => n && typeof n.match == "function";
  function PE(n, e) {
    function t(...i) {
      if (e) {
        let a = e(...i);
        if (!a)
          throw new Error(Dn.NODE_ENV === "production" ? _r(0) : "prepareAction did not return an object");
        return {
          type: n,
          payload: a.payload,
          ..."meta" in a && {
            meta: a.meta
          },
          ..."error" in a && {
            error: a.error
          }
        };
      }
      return {
        type: n,
        payload: i[0]
      };
    }
    return t.toString = () => `${n}`, t.type = n, t.match = (i) => FF(i) && i.type === n, t;
  }
  function Z7(n) {
    return typeof n == "function" && "type" in n && // hasMatchFunction only wants Matchers but I don't see the point in rewriting it
    K7(n);
  }
  function Q7(n) {
    const e = n ? `${n}`.split("/") : [], t = e[e.length - 1] || "actionCreator";
    return `Detected an action creator with type "${n || "unknown"}" being dispatched. 
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${t}())\` instead of \`dispatch(${t})\`. This is necessary even if the action has no payload.`;
  }
  function J7(n = {}) {
    if (Dn.NODE_ENV === "production")
      return () => (t) => (i) => t(i);
    const {
      isActionCreator: e = Z7
    } = n;
    return () => (t) => (i) => (e(i) && console.warn(Q7(i.type)), t(i));
  }
  function qF(n, e) {
    let t = 0;
    return {
      measureTime(i) {
        const a = Date.now();
        try {
          return i();
        } finally {
          const o = Date.now();
          t += o - a;
        }
      },
      warnIfExceeded() {
        t > n && console.warn(`${e} took ${t}ms, which is more than the warning threshold of ${n}ms. 
If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
It is disabled in production builds, so you don't need to worry about that.`);
      }
    };
  }
  var XF = class dE extends Array {
    constructor(...e) {
      super(...e), Object.setPrototypeOf(this, dE.prototype);
    }
    static get [Symbol.species]() {
      return dE;
    }
    concat(...e) {
      return super.concat.apply(this, e);
    }
    prepend(...e) {
      return e.length === 1 && Array.isArray(e[0]) ? new dE(...e[0].concat(this)) : new dE(...e.concat(this));
    }
  };
  function Gk(n) {
    return Tp(n) ? WF(n, () => {
    }) : n;
  }
  function Yk(n, e, t) {
    if (n.has(e)) {
      let a = n.get(e);
      return t.update && (a = t.update(a, e, n), n.set(e, a)), a;
    }
    if (!t.insert)
      throw new Error(Dn.NODE_ENV === "production" ? _r(10) : "No insert provided for key not already in map");
    const i = t.insert(e, n);
    return n.set(e, i), i;
  }
  function eY(n) {
    return typeof n != "object" || n == null || Object.isFrozen(n);
  }
  function tY(n, e, t) {
    const i = KF(n, e, t);
    return {
      detectMutations() {
        return ZF(n, e, i, t);
      }
    };
  }
  function KF(n, e = [], t, i = "", a = /* @__PURE__ */ new Set()) {
    const o = {
      value: t
    };
    if (!n(t) && !a.has(t)) {
      a.add(t), o.children = {};
      for (const u in t) {
        const c = i ? i + "." + u : u;
        e.length && e.indexOf(c) !== -1 || (o.children[u] = KF(n, e, t[u], c));
      }
    }
    return o;
  }
  function ZF(n, e = [], t, i, a = !1, o = "") {
    const u = t ? t.value : void 0, c = u === i;
    if (a && !c && !Number.isNaN(i))
      return {
        wasMutated: !0,
        path: o
      };
    if (n(u) || n(i))
      return {
        wasMutated: !1
      };
    const p = {};
    for (let _ in t.children)
      p[_] = !0;
    for (let _ in i)
      p[_] = !0;
    const y = e.length > 0;
    for (let _ in p) {
      const S = o ? o + "." + _ : _;
      if (y && e.some((O) => O instanceof RegExp ? O.test(S) : S === O))
        continue;
      const b = ZF(n, e, t.children[_], i[_], c, S);
      if (b.wasMutated)
        return b;
    }
    return {
      wasMutated: !1
    };
  }
  function nY(n = {}) {
    if (Dn.NODE_ENV === "production")
      return () => (e) => (t) => e(t);
    {
      let e = function(c, p, y, _) {
        return JSON.stringify(c, t(p, _), y);
      }, t = function(c, p) {
        let y = [], _ = [];
        return p || (p = function(S, b) {
          return y[0] === b ? "[Circular ~]" : "[Circular ~." + _.slice(0, y.indexOf(b)).join(".") + "]";
        }), function(S, b) {
          if (y.length > 0) {
            var T = y.indexOf(this);
            ~T ? y.splice(T + 1) : y.push(this), ~T ? _.splice(T, 1 / 0, S) : _.push(S), ~y.indexOf(b) && (b = p.call(this, S, b));
          } else
            y.push(b);
          return c == null ? b : c.call(this, S, b);
        };
      }, {
        isImmutable: i = eY,
        ignoredPaths: a,
        warnAfter: o = 32
      } = n;
      const u = tY.bind(null, i, a);
      return ({
        getState: c
      }) => {
        let p = c(), y = u(p), _;
        return (S) => (b) => {
          const T = qF(o, "ImmutableStateInvariantMiddleware");
          T.measureTime(() => {
            if (p = c(), _ = y.detectMutations(), y = u(p), _.wasMutated)
              throw new Error(Dn.NODE_ENV === "production" ? _r(19) : `A state mutation was detected between dispatches, in the path '${_.path || ""}'.  This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
          });
          const O = S(b);
          return T.measureTime(() => {
            if (p = c(), _ = y.detectMutations(), y = u(p), _.wasMutated)
              throw new Error(Dn.NODE_ENV === "production" ? _r(20) : `A state mutation was detected inside a dispatch, in the path: ${_.path || ""}. Take a look at the reducer(s) handling the action ${e(b)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
          }), T.warnIfExceeded(), O;
        };
      };
    }
  }
  function QF(n) {
    const e = typeof n;
    return n == null || e === "string" || e === "boolean" || e === "number" || Array.isArray(n) || iS(n);
  }
  function _A(n, e = "", t = QF, i, a = [], o) {
    let u;
    if (!t(n))
      return {
        keyPath: e || "<root>",
        value: n
      };
    if (typeof n != "object" || n === null || o != null && o.has(n))
      return !1;
    const c = i != null ? i(n) : Object.entries(n), p = a.length > 0;
    for (const [y, _] of c) {
      const S = e ? e + "." + y : y;
      if (!(p && a.some((T) => T instanceof RegExp ? T.test(S) : S === T))) {
        if (!t(_))
          return {
            keyPath: S,
            value: _
          };
        if (typeof _ == "object" && (u = _A(_, S, t, i, a, o), u))
          return u;
      }
    }
    return o && JF(n) && o.add(n), !1;
  }
  function JF(n) {
    if (!Object.isFrozen(n))
      return !1;
    for (const e of Object.values(n))
      if (!(typeof e != "object" || e === null) && !JF(e))
        return !1;
    return !0;
  }
  function iY(n = {}) {
    if (Dn.NODE_ENV === "production")
      return () => (e) => (t) => e(t);
    {
      const {
        isSerializable: e = QF,
        getEntries: t,
        ignoredActions: i = [],
        ignoredActionPaths: a = ["meta.arg", "meta.baseQueryMeta"],
        ignoredPaths: o = [],
        warnAfter: u = 32,
        ignoreState: c = !1,
        ignoreActions: p = !1,
        disableCache: y = !1
      } = n, _ = !y && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
      return (S) => (b) => (T) => {
        if (!FF(T))
          return b(T);
        const O = b(T), N = qF(u, "SerializableStateInvariantMiddleware");
        return !p && !(i.length && i.indexOf(T.type) !== -1) && N.measureTime(() => {
          const D = _A(T, "", e, t, a, _);
          if (D) {
            const {
              keyPath: k,
              value: $
            } = D;
            console.error(`A non-serializable value was detected in an action, in the path: \`${k}\`. Value:`, $, `
Take a look at the logic that dispatched this action: `, T, `
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`, `
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`);
          }
        }), c || (N.measureTime(() => {
          const D = S.getState(), k = _A(D, "", e, t, o, _);
          if (k) {
            const {
              keyPath: $,
              value: B
            } = k;
            console.error(`A non-serializable value was detected in the state, in the path: \`${$}\`. Value:`, B, `
Take a look at the reducer(s) handling this action type: ${T.type}.
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);
          }
        }), N.warnIfExceeded()), O;
      };
    }
  }
  function db(n) {
    return typeof n == "boolean";
  }
  var rY = () => function(e) {
    const {
      thunk: t = !0,
      immutableCheck: i = !0,
      serializableCheck: a = !0,
      actionCreatorCheck: o = !0
    } = e ?? {};
    let u = new XF();
    if (t && (db(t) ? u.push(G7) : u.push(Y7(t.extraArgument))), Dn.NODE_ENV !== "production") {
      if (i) {
        let c = {};
        db(i) || (c = i), u.unshift(nY(c));
      }
      if (a) {
        let c = {};
        db(a) || (c = a), u.push(iY(c));
      }
      if (o) {
        let c = {};
        db(o) || (c = o), u.unshift(J7(c));
      }
    }
    return u;
  }, aY = "RTK_autoBatch", e5 = (n) => (e) => {
    setTimeout(e, n);
  }, sY = typeof window < "u" && window.requestAnimationFrame ? window.requestAnimationFrame : e5(10), oY = (n = {
    type: "raf"
  }) => (e) => (...t) => {
    const i = e(...t);
    let a = !0, o = !1, u = !1;
    const c = /* @__PURE__ */ new Set(), p = n.type === "tick" ? queueMicrotask : n.type === "raf" ? sY : n.type === "callback" ? n.queueNotification : e5(n.timeout), y = () => {
      u = !1, o && (o = !1, c.forEach((_) => _()));
    };
    return Object.assign({}, i, {
      // Override the base `store.subscribe` method to keep original listeners
      // from running if we're delaying notifications
      subscribe(_) {
        const S = () => a && _(), b = i.subscribe(S);
        return c.add(_), () => {
          b(), c.delete(_);
        };
      },
      // Override the base `store.dispatch` method so that we can check actions
      // for the `shouldAutoBatch` flag and determine if batching is active
      dispatch(_) {
        var S;
        try {
          return a = !((S = _ == null ? void 0 : _.meta) != null && S[aY]), o = !a, o && (u || (u = !0, p(y))), i.dispatch(_);
        } finally {
          a = !0;
        }
      }
    });
  }, lY = (n) => function(t) {
    const {
      autoBatch: i = !0
    } = t ?? {};
    let a = new XF(n);
    return i && a.push(oY(typeof i == "object" ? i : void 0)), a;
  }, kg = Dn.NODE_ENV === "production";
  function uY(n) {
    const e = rY(), {
      reducer: t = void 0,
      middleware: i,
      devTools: a = !0,
      preloadedState: o = void 0,
      enhancers: u = void 0
    } = n || {};
    let c;
    if (typeof t == "function")
      c = t;
    else if (iS(t))
      c = x7(t);
    else
      throw new Error(Dn.NODE_ENV === "production" ? _r(1) : "`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");
    if (!kg && i && typeof i != "function")
      throw new Error(Dn.NODE_ENV === "production" ? _r(2) : "`middleware` field must be a callback");
    let p;
    if (typeof i == "function") {
      if (p = i(e), !kg && !Array.isArray(p))
        throw new Error(Dn.NODE_ENV === "production" ? _r(3) : "when using a middleware builder function, an array of middleware must be returned");
    } else
      p = e();
    if (!kg && p.some((O) => typeof O != "function"))
      throw new Error(Dn.NODE_ENV === "production" ? _r(4) : "each middleware provided to configureStore must be a function");
    let y = nw;
    a && (y = X7({
      // Enable capture of stack traces for dispatched Redux actions
      trace: !kg,
      ...typeof a == "object" && a
    }));
    const _ = b7(...p), S = lY(_);
    if (!kg && u && typeof u != "function")
      throw new Error(Dn.NODE_ENV === "production" ? _r(5) : "`enhancers` field must be a callback");
    let b = typeof u == "function" ? u(S) : S();
    if (!kg && !Array.isArray(b))
      throw new Error(Dn.NODE_ENV === "production" ? _r(6) : "`enhancers` callback must return an array");
    if (!kg && b.some((O) => typeof O != "function"))
      throw new Error(Dn.NODE_ENV === "production" ? _r(7) : "each enhancer provided to configureStore must be a function");
    !kg && p.length && !b.includes(_) && console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");
    const T = y(...b);
    return kF(c, o, T);
  }
  function t5(n) {
    const e = {}, t = [];
    let i;
    const a = {
      addCase(o, u) {
        if (Dn.NODE_ENV !== "production") {
          if (t.length > 0)
            throw new Error(Dn.NODE_ENV === "production" ? _r(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
          if (i)
            throw new Error(Dn.NODE_ENV === "production" ? _r(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
        }
        const c = typeof o == "string" ? o : o.type;
        if (!c)
          throw new Error(Dn.NODE_ENV === "production" ? _r(28) : "`builder.addCase` cannot be called with an empty action type");
        if (c in e)
          throw new Error(Dn.NODE_ENV === "production" ? _r(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${c}'`);
        return e[c] = u, a;
      },
      addMatcher(o, u) {
        if (Dn.NODE_ENV !== "production" && i)
          throw new Error(Dn.NODE_ENV === "production" ? _r(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
        return t.push({
          matcher: o,
          reducer: u
        }), a;
      },
      addDefaultCase(o) {
        if (Dn.NODE_ENV !== "production" && i)
          throw new Error(Dn.NODE_ENV === "production" ? _r(31) : "`builder.addDefaultCase` can only be called once");
        return i = o, a;
      }
    };
    return n(a), [e, t, i];
  }
  function cY(n) {
    return typeof n == "function";
  }
  function fY(n, e) {
    if (Dn.NODE_ENV !== "production" && typeof e == "object")
      throw new Error(Dn.NODE_ENV === "production" ? _r(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
    let [t, i, a] = t5(e), o;
    if (cY(n))
      o = () => Gk(n());
    else {
      const c = Gk(n);
      o = () => c;
    }
    function u(c = o(), p) {
      let y = [t[p.type], ...i.filter(({
        matcher: _
      }) => _(p)).map(({
        reducer: _
      }) => _)];
      return y.filter((_) => !!_).length === 0 && (y = [a]), y.reduce((_, S) => {
        if (S)
          if (nm(_)) {
            const T = S(_, p);
            return T === void 0 ? _ : T;
          } else {
            if (Tp(_))
              return WF(_, (b) => S(b, p));
            {
              const b = S(_, p);
              if (b === void 0) {
                if (_ === null)
                  return _;
                throw new Error(Dn.NODE_ENV === "production" ? _r(9) : "A case reducer on a non-draftable value must not return undefined");
              }
              return b;
            }
          }
        return _;
      }, c);
    }
    return u.getInitialState = o, u;
  }
  var hY = Symbol.for("rtk-slice-createasyncthunk");
  function dY(n, e) {
    return `${n}/${e}`;
  }
  function pY({
    creators: n
  } = {}) {
    var t;
    const e = (t = n == null ? void 0 : n.asyncThunk) == null ? void 0 : t[hY];
    return function(a) {
      const {
        name: o,
        reducerPath: u = o
      } = a;
      if (!o)
        throw new Error(Dn.NODE_ENV === "production" ? _r(11) : "`name` is a required option for createSlice");
      typeof process < "u" && Dn.NODE_ENV === "development" && a.initialState === void 0 && console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
      const c = (typeof a.reducers == "function" ? a.reducers(mY()) : a.reducers) || {}, p = Object.keys(c), y = {
        sliceCaseReducersByName: {},
        sliceCaseReducersByType: {},
        actionCreators: {},
        sliceMatchers: []
      }, _ = {
        addCase(D, k) {
          const $ = typeof D == "string" ? D : D.type;
          if (!$)
            throw new Error(Dn.NODE_ENV === "production" ? _r(12) : "`context.addCase` cannot be called with an empty action type");
          if ($ in y.sliceCaseReducersByType)
            throw new Error(Dn.NODE_ENV === "production" ? _r(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + $);
          return y.sliceCaseReducersByType[$] = k, _;
        },
        addMatcher(D, k) {
          return y.sliceMatchers.push({
            matcher: D,
            reducer: k
          }), _;
        },
        exposeAction(D, k) {
          return y.actionCreators[D] = k, _;
        },
        exposeCaseReducer(D, k) {
          return y.sliceCaseReducersByName[D] = k, _;
        }
      };
      p.forEach((D) => {
        const k = c[D], $ = {
          reducerName: D,
          type: dY(o, D),
          createNotation: typeof a.reducers == "function"
        };
        yY(k) ? EY($, k, _, e) : vY($, k, _);
      });
      function S() {
        if (Dn.NODE_ENV !== "production" && typeof a.extraReducers == "object")
          throw new Error(Dn.NODE_ENV === "production" ? _r(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
        const [D = {}, k = [], $ = void 0] = typeof a.extraReducers == "function" ? t5(a.extraReducers) : [a.extraReducers], B = {
          ...D,
          ...y.sliceCaseReducersByType
        };
        return fY(a.initialState, (V) => {
          for (let z in B)
            V.addCase(z, B[z]);
          for (let z of y.sliceMatchers)
            V.addMatcher(z.matcher, z.reducer);
          for (let z of k)
            V.addMatcher(z.matcher, z.reducer);
          $ && V.addDefaultCase($);
        });
      }
      const b = (D) => D, T = /* @__PURE__ */ new WeakMap();
      let O;
      const N = {
        name: o,
        reducerPath: u,
        reducer(D, k) {
          return O || (O = S()), O(D, k);
        },
        actions: y.actionCreators,
        caseReducers: y.sliceCaseReducersByName,
        getInitialState() {
          return O || (O = S()), O.getInitialState();
        },
        getSelectors(D = b) {
          const k = Yk(T, this, {
            insert: () => /* @__PURE__ */ new WeakMap()
          });
          return Yk(k, D, {
            insert: () => {
              const $ = {};
              for (const [B, V] of Object.entries(a.selectors ?? {}))
                $[B] = gY(this, V, D, this !== N);
              return $;
            }
          });
        },
        selectSlice(D) {
          let k = D[this.reducerPath];
          if (typeof k > "u") {
            if (this !== N)
              k = this.getInitialState();
            else if (Dn.NODE_ENV !== "production")
              throw new Error(Dn.NODE_ENV === "production" ? _r(15) : "selectSlice returned undefined for an uninjected slice reducer");
          }
          return k;
        },
        get selectors() {
          return this.getSelectors(this.selectSlice);
        },
        injectInto(D, {
          reducerPath: k,
          ...$
        } = {}) {
          const B = k ?? this.reducerPath;
          return D.inject({
            reducerPath: B,
            reducer: this.reducer
          }, $), {
            ...this,
            reducerPath: B
          };
        }
      };
      return N;
    };
  }
  function gY(n, e, t, i) {
    function a(o, ...u) {
      let c = t.call(n, o);
      if (typeof c > "u") {
        if (i)
          c = n.getInitialState();
        else if (Dn.NODE_ENV !== "production")
          throw new Error(Dn.NODE_ENV === "production" ? _r(16) : "selectState returned undefined for an uninjected slice reducer");
      }
      return e(c, ...u);
    }
    return a.unwrapped = e, a;
  }
  var qh = pY();
  function mY() {
    function n(e, t) {
      return {
        _reducerDefinitionType: "asyncThunk",
        payloadCreator: e,
        ...t
      };
    }
    return n.withTypes = () => n, {
      reducer(e) {
        return Object.assign({
          // hack so the wrapping function has the same name as the original
          // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
          [e.name](...t) {
            return e(...t);
          }
        }[e.name], {
          _reducerDefinitionType: "reducer"
          /* reducer */
        });
      },
      preparedReducer(e, t) {
        return {
          _reducerDefinitionType: "reducerWithPrepare",
          prepare: e,
          reducer: t
        };
      },
      asyncThunk: n
    };
  }
  function vY({
    type: n,
    reducerName: e,
    createNotation: t
  }, i, a) {
    let o, u;
    if ("reducer" in i) {
      if (t && !_Y(i))
        throw new Error(Dn.NODE_ENV === "production" ? _r(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
      o = i.reducer, u = i.prepare;
    } else
      o = i;
    a.addCase(n, o).exposeCaseReducer(e, o).exposeAction(e, u ? PE(n, u) : PE(n));
  }
  function yY(n) {
    return n._reducerDefinitionType === "asyncThunk";
  }
  function _Y(n) {
    return n._reducerDefinitionType === "reducerWithPrepare";
  }
  function EY({
    type: n,
    reducerName: e
  }, t, i, a) {
    if (!a)
      throw new Error(Dn.NODE_ENV === "production" ? _r(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
    const {
      payloadCreator: o,
      fulfilled: u,
      pending: c,
      rejected: p,
      settled: y,
      options: _
    } = t, S = a(n, o, _);
    i.exposeAction(e, S), u && i.addCase(S.fulfilled, u), c && i.addCase(S.pending, c), p && i.addCase(S.rejected, p), y && i.addMatcher(S.settled, y), i.exposeCaseReducer(e, {
      fulfilled: u || pb,
      pending: c || pb,
      rejected: p || pb,
      settled: y || pb
    });
  }
  function pb() {
  }
  var oL = "listenerMiddleware";
  PE(`${oL}/add`);
  PE(`${oL}/removeAll`);
  PE(`${oL}/remove`);
  function _r(n) {
    return `Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `;
  }
  const n5 = qh({
    name: "availability",
    initialState: {
      key: "OerebAvailability",
      visible: !0
    },
    reducers: {
      setAvailabilityPrefix: (n, e) => {
        n.key = e.payload + "OerebAvailability";
      },
      initAvailability: (n) => {
        const e = localStorage.getItem(n.key);
        qt.isBoolean(e) ? n.visible = e : qt.isString(e) ? n.visible = JSON.parse(e) : n.visible = !0;
      },
      showAvailability: (n, e) => {
        n.visible = e.payload, localStorage.setItem(n.key, n.visible);
      }
    }
  }), { setAvailabilityPrefix: SY, initAvailability: xY, showAvailability: bY } = n5.actions, wY = n5.reducer, i5 = qh({
    name: "config",
    initialState: {
      config: {}
    },
    reducers: {
      update: (n, e) => {
        n.config = e.payload;
      }
    }
  }), { update: CY } = i5.actions, TY = i5.reducer, r5 = qh({
    name: "extract",
    initialState: {
      loading: !1,
      zoom: !1,
      visible: !1,
      collapsed: !1,
      error: !1,
      egrid: null,
      identdn: null,
      number: null,
      information: !1,
      tab: 0,
      data: {},
      highlight: !0,
      background: !0
    },
    reducers: {
      loadExtract: (n, e) => {
        if (!n.loading) {
          n.loading = !0, n.visible = !1, n.collapsed = !1, n.error = !1, n.information = !1, n.tab = 0, n.egrid = e.payload.egrid, n.identdn = e.payload.identdn, n.number = e.payload.number, n.zoom = e.payload.zoom, n.data = {};
          const t = new URLSearchParams(window.location.search);
          n.egrid !== null ? t.set("egrid", n.egrid) : n.identdn !== null && n.number !== null && (t.set("identdn", n.identdn), t.set("number", n.number)), window.history.pushState(null, null, "?" + t.toString());
        }
      },
      showExtract: (n, e) => {
        n.loading = !1, n.visible = !0, n.collapsed = !1, n.error = !1, n.information = !1, n.highlight = !0, n.background = !0, n.tab = 0, n.data = e.payload;
      },
      showError: (n) => {
        n.loading = !1, n.zoom = !1, n.visible = !1, n.collapsed = !1, n.error = !0, n.information = !1, n.tab = 0, n.data = {};
        const e = new URLSearchParams(window.location.search);
        e.delete("egrid"), e.delete("identdn"), e.delete("number"), window.history.pushState(null, null, "?" + e.toString());
      },
      hideExtract: (n) => {
        n.loading = !1, n.zoom = !1, n.visible = !1, n.collapsed = !1, n.error = !1, n.egrid = null, n.identdn = null, n.number = null, n.information = !1, n.tab = 0, n.data = {};
        const e = new URLSearchParams(window.location.search);
        e.delete("egrid"), e.delete("identdn"), e.delete("number"), window.history.pushState(null, null, "?" + e.toString());
      },
      toggleCollapsed: (n) => {
        n.collapsed = !n.collapsed;
      },
      toggleHighlight: (n) => {
        n.highlight = !n.highlight;
      },
      toggleBackground: (n) => {
        n.background = !n.background;
      },
      toggleInformationPanel: (n) => {
        n.information = !n.information, n.information && (n.tab = 0);
      },
      setInformationPanelTab: (n, e) => {
        n.tab = e.payload;
      }
    }
  }), {
    loadExtract: d_,
    showExtract: p_,
    showError: Zv,
    hideExtract: a5,
    toggleCollapsed: RY,
    toggleHighlight: MY,
    toggleBackground: OY,
    toggleInformationPanel: s5,
    setInformationPanelTab: AY
  } = r5.actions, LY = r5.reducer, o5 = qh({
    name: "history",
    initialState: {
      key: "OerebHistory",
      elements: []
    },
    reducers: {
      setHistoryPrefix: (n, e) => {
        n.key = e.payload + "OerebHistory";
      },
      initHistory: (n) => {
        const e = localStorage.getItem(n.key);
        e ? n.elements = JSON.parse(e) : n.elements = [];
      },
      updateHistory: (n, e) => {
        const i = e.payload.GetExtractByIdResponse.extract.RealEstate, a = {
          EGRID: i.EGRID,
          IdentDN: i.IdentDN,
          Municipality: i.MunicipalityName,
          Number: i.Number
        };
        for (let o = 0; o < n.elements.length; o++)
          if (qt.isEqual(a, n.elements[o])) {
            n.elements.splice(o, 1);
            break;
          }
        n.elements.length > 4 && n.elements.splice(0, 1), n.elements.push(a), localStorage.setItem(n.key, JSON.stringify(n.elements));
      }
    }
  }), { setHistoryPrefix: NY, initHistory: DY, updateHistory: g_ } = o5.actions, IY = o5.reducer, l5 = qh({
    name: "language",
    initialState: {
      current: null,
      default: null,
      available: []
    },
    reducers: {
      initLanguages: (n, e) => {
        n.default = e.payload.default, n.available = e.payload.available;
        const t = new URLSearchParams(window.location.search);
        t.has("lang") && n.available.indexOf(t.get("lang")) > -1 ? n.current = t.get("lang") : n.current = n.default, Ts.changeLanguage(n.current), t.set("lang", n.current), window.history.pushState(null, null, "?" + t.toString());
      },
      setLanguage: (n, e) => {
        if (n.available.indexOf(e.payload) > -1) {
          n.current = e.payload, Ts.changeLanguage(n.current);
          const t = new URLSearchParams(window.location.search);
          t.set("lang", n.current), window.history.pushState(null, null, "?" + t.toString());
        }
      }
    }
  }), { initLanguages: PY, setLanguage: kY } = l5.actions, FY = l5.reducer, u5 = qh({
    name: "symbolZoom",
    initialState: {
      key: "OerebSymbolZoom",
      enabled: !0
    },
    reducers: {
      setSymbolZoomPrefix: (n, e) => {
        n.key = e.payload + "OerebSymbolZoom";
      },
      initSymbolZoom: (n) => {
        const e = localStorage.getItem(n.key);
        qt.isBoolean(e) ? n.enabled = e : qt.isString(e) ? n.enabled = JSON.parse(e) : n.enabled = !0;
      },
      enableSymbolZoom: (n, e) => {
        n.enabled = e.payload, localStorage.setItem(n.key, n.enabled);
      }
    }
  }), { setSymbolZoomPrefix: jY, initSymbolZoom: UY, enableSymbolZoom: zY } = u5.actions, $Y = u5.reducer, m_ = function(n, e, t, i, a, o) {
    const u = new URL(n + "extract/json/");
    return qt.isString(e) ? u.searchParams.append("EGRID", e) : (u.searchParams.append("IDENTDN", t), u.searchParams.append("NUMBER", i)), u.searchParams.append("GEOMETRY", !0), u.searchParams.append("_dc", (/* @__PURE__ */ new Date()).getTime()), o && u.searchParams.append("LANG", o), new Promise((c, p) => {
      const y = new AbortController(), _ = setTimeout(() => y.abort(), a * 1e3);
      fetch(u.toString(), { signal: y.signal }).then((S) => {
        clearTimeout(_), S.ok ? c(S.json()) : p(new Error(S.text()));
      }).catch((S) => {
        clearTimeout(_), p(S);
      });
    });
  }, BY = function(n, e, t, i, a, o) {
    const u = new URL(n + "extract/pdf/");
    return qt.isString(e) ? u.searchParams.append("EGRID", e) : (u.searchParams.append("IDENTDN", t), u.searchParams.append("NUMBER", i)), u.searchParams.append("_dc", (/* @__PURE__ */ new Date()).getTime()), o && u.searchParams.append("LANG", o), new Promise((c, p) => {
      const y = new AbortController(), _ = setTimeout(() => y.abort(), a * 1e3);
      fetch(u.toString(), { signal: y.signal }).then((S) => {
        clearTimeout(_), S.ok ? c(S.arrayBuffer()) : p(new Error(S.text()));
      }).catch((S) => {
        clearTimeout(_), p(S);
      });
    });
  }, c5 = function(n) {
    let e = n.Code.replace(".", "").replace("-", "").replace("_", "");
    return qt.isString(n.SubCode) && (e += "_" + n.SubCode.replace(".", "").replace("-", "").replace("_", "")), e;
  }, VY = function(n, e) {
    let t = null;
    for (let i = 0; i < e.length; i++)
      if (e[i].Code === n.Code) {
        t = e[i];
        break;
      }
    return t;
  }, HY = function(n, e) {
    const t = {};
    return n.forEach((i) => {
      const a = c5(i.Theme), o = i.Lawstatus.Code;
      if (!Reflect.apply(Object.prototype.hasOwnProperty, t, [a])) {
        let u = null, c = null;
        qt.isString(i.Theme.SubCode) ? (c = i.Theme.Text, u = VY(i.Theme, e).Text) : u = i.Theme.Text, t[a] = {
          themeText: u,
          subThemeText: c,
          inForce: [],
          changeWithPreEffect: [],
          changeWithoutPreEffect: []
        };
      }
      t[a][o].push(i);
    }), t;
  }, f5 = qh({
    name: "accordion",
    initialState: {
      category: null,
      topic: null,
      viewServices: [],
      callback: null
    },
    reducers: {
      setActiveCategory: (n, e) => {
        n.category = e.payload;
      },
      setActiveTopic: (n, e) => {
        n.topic = e.payload;
      },
      setViewServices: (n, e) => {
        n.viewServices = e.payload.viewServices, n.callback = e.payload.callback;
      }
    }
  }), { setActiveCategory: lL, setActiveTopic: kE, setViewServices: Vv } = f5.actions, WY = f5.reducer;
  var Jo = "top", wu = "bottom", Cu = "right", el = "left", jw = "auto", v_ = [Jo, wu, Cu, el], Hv = "start", e_ = "end", h5 = "clippingParents", uL = "viewport", M0 = "popper", d5 = "reference", EA = /* @__PURE__ */ v_.reduce(function(n, e) {
    return n.concat([e + "-" + Hv, e + "-" + e_]);
  }, []), cL = /* @__PURE__ */ [].concat(v_, [jw]).reduce(function(n, e) {
    return n.concat([e, e + "-" + Hv, e + "-" + e_]);
  }, []), p5 = "beforeRead", g5 = "read", m5 = "afterRead", v5 = "beforeMain", y5 = "main", _5 = "afterMain", E5 = "beforeWrite", S5 = "write", x5 = "afterWrite", b5 = [p5, g5, m5, v5, y5, _5, E5, S5, x5];
  function Yh(n) {
    return n ? (n.nodeName || "").toLowerCase() : null;
  }
  function Tu(n) {
    if (n == null)
      return window;
    if (n.toString() !== "[object Window]") {
      var e = n.ownerDocument;
      return e && e.defaultView || window;
    }
    return n;
  }
  function Wv(n) {
    var e = Tu(n).Element;
    return n instanceof e || n instanceof Element;
  }
  function Ec(n) {
    var e = Tu(n).HTMLElement;
    return n instanceof e || n instanceof HTMLElement;
  }
  function fL(n) {
    if (typeof ShadowRoot > "u")
      return !1;
    var e = Tu(n).ShadowRoot;
    return n instanceof e || n instanceof ShadowRoot;
  }
  function GY(n) {
    var e = n.state;
    Object.keys(e.elements).forEach(function(t) {
      var i = e.styles[t] || {}, a = e.attributes[t] || {}, o = e.elements[t];
      !Ec(o) || !Yh(o) || (Object.assign(o.style, i), Object.keys(a).forEach(function(u) {
        var c = a[u];
        c === !1 ? o.removeAttribute(u) : o.setAttribute(u, c === !0 ? "" : c);
      }));
    });
  }
  function YY(n) {
    var e = n.state, t = {
      popper: {
        position: e.options.strategy,
        left: "0",
        top: "0",
        margin: "0"
      },
      arrow: {
        position: "absolute"
      },
      reference: {}
    };
    return Object.assign(e.elements.popper.style, t.popper), e.styles = t, e.elements.arrow && Object.assign(e.elements.arrow.style, t.arrow), function() {
      Object.keys(e.elements).forEach(function(i) {
        var a = e.elements[i], o = e.attributes[i] || {}, u = Object.keys(e.styles.hasOwnProperty(i) ? e.styles[i] : t[i]), c = u.reduce(function(p, y) {
          return p[y] = "", p;
        }, {});
        !Ec(a) || !Yh(a) || (Object.assign(a.style, c), Object.keys(o).forEach(function(p) {
          a.removeAttribute(p);
        }));
      });
    };
  }
  const hL = {
    name: "applyStyles",
    enabled: !0,
    phase: "write",
    fn: GY,
    effect: YY,
    requires: ["computeStyles"]
  };
  function Bh(n) {
    return n.split("-")[0];
  }
  var jv = Math.max, aw = Math.min, t_ = Math.round;
  function SA() {
    var n = navigator.userAgentData;
    return n != null && n.brands && Array.isArray(n.brands) ? n.brands.map(function(e) {
      return e.brand + "/" + e.version;
    }).join(" ") : navigator.userAgent;
  }
  function w5() {
    return !/^((?!chrome|android).)*safari/i.test(SA());
  }
  function n_(n, e, t) {
    e === void 0 && (e = !1), t === void 0 && (t = !1);
    var i = n.getBoundingClientRect(), a = 1, o = 1;
    e && Ec(n) && (a = n.offsetWidth > 0 && t_(i.width) / n.offsetWidth || 1, o = n.offsetHeight > 0 && t_(i.height) / n.offsetHeight || 1);
    var u = Wv(n) ? Tu(n) : window, c = u.visualViewport, p = !w5() && t, y = (i.left + (p && c ? c.offsetLeft : 0)) / a, _ = (i.top + (p && c ? c.offsetTop : 0)) / o, S = i.width / a, b = i.height / o;
    return {
      width: S,
      height: b,
      top: _,
      right: y + S,
      bottom: _ + b,
      left: y,
      x: y,
      y: _
    };
  }
  function dL(n) {
    var e = n_(n), t = n.offsetWidth, i = n.offsetHeight;
    return Math.abs(e.width - t) <= 1 && (t = e.width), Math.abs(e.height - i) <= 1 && (i = e.height), {
      x: n.offsetLeft,
      y: n.offsetTop,
      width: t,
      height: i
    };
  }
  function C5(n, e) {
    var t = e.getRootNode && e.getRootNode();
    if (n.contains(e))
      return !0;
    if (t && fL(t)) {
      var i = e;
      do {
        if (i && n.isSameNode(i))
          return !0;
        i = i.parentNode || i.host;
      } while (i);
    }
    return !1;
  }
  function Rp(n) {
    return Tu(n).getComputedStyle(n);
  }
  function qY(n) {
    return ["table", "td", "th"].indexOf(Yh(n)) >= 0;
  }
  function um(n) {
    return ((Wv(n) ? n.ownerDocument : (
      // $FlowFixMe[prop-missing]
      n.document
    )) || window.document).documentElement;
  }
  function Uw(n) {
    return Yh(n) === "html" ? n : (
      // this is a quicker (but less type safe) way to save quite some bytes from the bundle
      // $FlowFixMe[incompatible-return]
      // $FlowFixMe[prop-missing]
      n.assignedSlot || // step into the shadow DOM of the parent of a slotted node
      n.parentNode || // DOM Element detected
      (fL(n) ? n.host : null) || // ShadowRoot detected
      // $FlowFixMe[incompatible-call]: HTMLElement is a Node
      um(n)
    );
  }
  function qk(n) {
    return !Ec(n) || // https://github.com/popperjs/popper-core/issues/837
    Rp(n).position === "fixed" ? null : n.offsetParent;
  }
  function XY(n) {
    var e = /firefox/i.test(SA()), t = /Trident/i.test(SA());
    if (t && Ec(n)) {
      var i = Rp(n);
      if (i.position === "fixed")
        return null;
    }
    var a = Uw(n);
    for (fL(a) && (a = a.host); Ec(a) && ["html", "body"].indexOf(Yh(a)) < 0; ) {
      var o = Rp(a);
      if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
        return a;
      a = a.parentNode;
    }
    return null;
  }
  function aS(n) {
    for (var e = Tu(n), t = qk(n); t && qY(t) && Rp(t).position === "static"; )
      t = qk(t);
    return t && (Yh(t) === "html" || Yh(t) === "body" && Rp(t).position === "static") ? e : t || XY(n) || e;
  }
  function pL(n) {
    return ["top", "bottom"].indexOf(n) >= 0 ? "x" : "y";
  }
  function _E(n, e, t) {
    return jv(n, aw(e, t));
  }
  function KY(n, e, t) {
    var i = _E(n, e, t);
    return i > t ? t : i;
  }
  function T5() {
    return {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    };
  }
  function R5(n) {
    return Object.assign({}, T5(), n);
  }
  function M5(n, e) {
    return e.reduce(function(t, i) {
      return t[i] = n, t;
    }, {});
  }
  var ZY = function(e, t) {
    return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
      placement: t.placement
    })) : e, R5(typeof e != "number" ? e : M5(e, v_));
  };
  function QY(n) {
    var e, t = n.state, i = n.name, a = n.options, o = t.elements.arrow, u = t.modifiersData.popperOffsets, c = Bh(t.placement), p = pL(c), y = [el, Cu].indexOf(c) >= 0, _ = y ? "height" : "width";
    if (!(!o || !u)) {
      var S = ZY(a.padding, t), b = dL(o), T = p === "y" ? Jo : el, O = p === "y" ? wu : Cu, N = t.rects.reference[_] + t.rects.reference[p] - u[p] - t.rects.popper[_], D = u[p] - t.rects.reference[p], k = aS(o), $ = k ? p === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, B = N / 2 - D / 2, V = S[T], z = $ - b[_] - S[O], G = $ / 2 - b[_] / 2 + B, ie = _E(V, G, z), ue = p;
      t.modifiersData[i] = (e = {}, e[ue] = ie, e.centerOffset = ie - G, e);
    }
  }
  function JY(n) {
    var e = n.state, t = n.options, i = t.element, a = i === void 0 ? "[data-popper-arrow]" : i;
    a != null && (typeof a == "string" && (a = e.elements.popper.querySelector(a), !a) || C5(e.elements.popper, a) && (e.elements.arrow = a));
  }
  const O5 = {
    name: "arrow",
    enabled: !0,
    phase: "main",
    fn: QY,
    effect: JY,
    requires: ["popperOffsets"],
    requiresIfExists: ["preventOverflow"]
  };
  function i_(n) {
    return n.split("-")[1];
  }
  var eq = {
    top: "auto",
    right: "auto",
    bottom: "auto",
    left: "auto"
  };
  function tq(n, e) {
    var t = n.x, i = n.y, a = e.devicePixelRatio || 1;
    return {
      x: t_(t * a) / a || 0,
      y: t_(i * a) / a || 0
    };
  }
  function Xk(n) {
    var e, t = n.popper, i = n.popperRect, a = n.placement, o = n.variation, u = n.offsets, c = n.position, p = n.gpuAcceleration, y = n.adaptive, _ = n.roundOffsets, S = n.isFixed, b = u.x, T = b === void 0 ? 0 : b, O = u.y, N = O === void 0 ? 0 : O, D = typeof _ == "function" ? _({
      x: T,
      y: N
    }) : {
      x: T,
      y: N
    };
    T = D.x, N = D.y;
    var k = u.hasOwnProperty("x"), $ = u.hasOwnProperty("y"), B = el, V = Jo, z = window;
    if (y) {
      var G = aS(t), ie = "clientHeight", ue = "clientWidth";
      if (G === Tu(t) && (G = um(t), Rp(G).position !== "static" && c === "absolute" && (ie = "scrollHeight", ue = "scrollWidth")), G = G, a === Jo || (a === el || a === Cu) && o === e_) {
        V = wu;
        var Re = S && G === z && z.visualViewport ? z.visualViewport.height : (
          // $FlowFixMe[prop-missing]
          G[ie]
        );
        N -= Re - i.height, N *= p ? 1 : -1;
      }
      if (a === el || (a === Jo || a === wu) && o === e_) {
        B = Cu;
        var Oe = S && G === z && z.visualViewport ? z.visualViewport.width : (
          // $FlowFixMe[prop-missing]
          G[ue]
        );
        T -= Oe - i.width, T *= p ? 1 : -1;
      }
    }
    var $e = Object.assign({
      position: c
    }, y && eq), Ee = _ === !0 ? tq({
      x: T,
      y: N
    }, Tu(t)) : {
      x: T,
      y: N
    };
    if (T = Ee.x, N = Ee.y, p) {
      var Fe;
      return Object.assign({}, $e, (Fe = {}, Fe[V] = $ ? "0" : "", Fe[B] = k ? "0" : "", Fe.transform = (z.devicePixelRatio || 1) <= 1 ? "translate(" + T + "px, " + N + "px)" : "translate3d(" + T + "px, " + N + "px, 0)", Fe));
    }
    return Object.assign({}, $e, (e = {}, e[V] = $ ? N + "px" : "", e[B] = k ? T + "px" : "", e.transform = "", e));
  }
  function nq(n) {
    var e = n.state, t = n.options, i = t.gpuAcceleration, a = i === void 0 ? !0 : i, o = t.adaptive, u = o === void 0 ? !0 : o, c = t.roundOffsets, p = c === void 0 ? !0 : c, y = {
      placement: Bh(e.placement),
      variation: i_(e.placement),
      popper: e.elements.popper,
      popperRect: e.rects.popper,
      gpuAcceleration: a,
      isFixed: e.options.strategy === "fixed"
    };
    e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Xk(Object.assign({}, y, {
      offsets: e.modifiersData.popperOffsets,
      position: e.options.strategy,
      adaptive: u,
      roundOffsets: p
    })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Xk(Object.assign({}, y, {
      offsets: e.modifiersData.arrow,
      position: "absolute",
      adaptive: !1,
      roundOffsets: p
    })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
      "data-popper-placement": e.placement
    });
  }
  const gL = {
    name: "computeStyles",
    enabled: !0,
    phase: "beforeWrite",
    fn: nq,
    data: {}
  };
  var gb = {
    passive: !0
  };
  function iq(n) {
    var e = n.state, t = n.instance, i = n.options, a = i.scroll, o = a === void 0 ? !0 : a, u = i.resize, c = u === void 0 ? !0 : u, p = Tu(e.elements.popper), y = [].concat(e.scrollParents.reference, e.scrollParents.popper);
    return o && y.forEach(function(_) {
      _.addEventListener("scroll", t.update, gb);
    }), c && p.addEventListener("resize", t.update, gb), function() {
      o && y.forEach(function(_) {
        _.removeEventListener("scroll", t.update, gb);
      }), c && p.removeEventListener("resize", t.update, gb);
    };
  }
  const mL = {
    name: "eventListeners",
    enabled: !0,
    phase: "write",
    fn: function() {
    },
    effect: iq,
    data: {}
  };
  var rq = {
    left: "right",
    right: "left",
    bottom: "top",
    top: "bottom"
  };
  function Pb(n) {
    return n.replace(/left|right|bottom|top/g, function(e) {
      return rq[e];
    });
  }
  var aq = {
    start: "end",
    end: "start"
  };
  function Kk(n) {
    return n.replace(/start|end/g, function(e) {
      return aq[e];
    });
  }
  function vL(n) {
    var e = Tu(n), t = e.pageXOffset, i = e.pageYOffset;
    return {
      scrollLeft: t,
      scrollTop: i
    };
  }
  function yL(n) {
    return n_(um(n)).left + vL(n).scrollLeft;
  }
  function sq(n, e) {
    var t = Tu(n), i = um(n), a = t.visualViewport, o = i.clientWidth, u = i.clientHeight, c = 0, p = 0;
    if (a) {
      o = a.width, u = a.height;
      var y = w5();
      (y || !y && e === "fixed") && (c = a.offsetLeft, p = a.offsetTop);
    }
    return {
      width: o,
      height: u,
      x: c + yL(n),
      y: p
    };
  }
  function oq(n) {
    var e, t = um(n), i = vL(n), a = (e = n.ownerDocument) == null ? void 0 : e.body, o = jv(t.scrollWidth, t.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), u = jv(t.scrollHeight, t.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), c = -i.scrollLeft + yL(n), p = -i.scrollTop;
    return Rp(a || t).direction === "rtl" && (c += jv(t.clientWidth, a ? a.clientWidth : 0) - o), {
      width: o,
      height: u,
      x: c,
      y: p
    };
  }
  function _L(n) {
    var e = Rp(n), t = e.overflow, i = e.overflowX, a = e.overflowY;
    return /auto|scroll|overlay|hidden/.test(t + a + i);
  }
  function A5(n) {
    return ["html", "body", "#document"].indexOf(Yh(n)) >= 0 ? n.ownerDocument.body : Ec(n) && _L(n) ? n : A5(Uw(n));
  }
  function EE(n, e) {
    var t;
    e === void 0 && (e = []);
    var i = A5(n), a = i === ((t = n.ownerDocument) == null ? void 0 : t.body), o = Tu(i), u = a ? [o].concat(o.visualViewport || [], _L(i) ? i : []) : i, c = e.concat(u);
    return a ? c : (
      // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
      c.concat(EE(Uw(u)))
    );
  }
  function xA(n) {
    return Object.assign({}, n, {
      left: n.x,
      top: n.y,
      right: n.x + n.width,
      bottom: n.y + n.height
    });
  }
  function lq(n, e) {
    var t = n_(n, !1, e === "fixed");
    return t.top = t.top + n.clientTop, t.left = t.left + n.clientLeft, t.bottom = t.top + n.clientHeight, t.right = t.left + n.clientWidth, t.width = n.clientWidth, t.height = n.clientHeight, t.x = t.left, t.y = t.top, t;
  }
  function Zk(n, e, t) {
    return e === uL ? xA(sq(n, t)) : Wv(e) ? lq(e, t) : xA(oq(um(n)));
  }
  function uq(n) {
    var e = EE(Uw(n)), t = ["absolute", "fixed"].indexOf(Rp(n).position) >= 0, i = t && Ec(n) ? aS(n) : n;
    return Wv(i) ? e.filter(function(a) {
      return Wv(a) && C5(a, i) && Yh(a) !== "body";
    }) : [];
  }
  function cq(n, e, t, i) {
    var a = e === "clippingParents" ? uq(n) : [].concat(e), o = [].concat(a, [t]), u = o[0], c = o.reduce(function(p, y) {
      var _ = Zk(n, y, i);
      return p.top = jv(_.top, p.top), p.right = aw(_.right, p.right), p.bottom = aw(_.bottom, p.bottom), p.left = jv(_.left, p.left), p;
    }, Zk(n, u, i));
    return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c;
  }
  function L5(n) {
    var e = n.reference, t = n.element, i = n.placement, a = i ? Bh(i) : null, o = i ? i_(i) : null, u = e.x + e.width / 2 - t.width / 2, c = e.y + e.height / 2 - t.height / 2, p;
    switch (a) {
      case Jo:
        p = {
          x: u,
          y: e.y - t.height
        };
        break;
      case wu:
        p = {
          x: u,
          y: e.y + e.height
        };
        break;
      case Cu:
        p = {
          x: e.x + e.width,
          y: c
        };
        break;
      case el:
        p = {
          x: e.x - t.width,
          y: c
        };
        break;
      default:
        p = {
          x: e.x,
          y: e.y
        };
    }
    var y = a ? pL(a) : null;
    if (y != null) {
      var _ = y === "y" ? "height" : "width";
      switch (o) {
        case Hv:
          p[y] = p[y] - (e[_] / 2 - t[_] / 2);
          break;
        case e_:
          p[y] = p[y] + (e[_] / 2 - t[_] / 2);
          break;
      }
    }
    return p;
  }
  function r_(n, e) {
    e === void 0 && (e = {});
    var t = e, i = t.placement, a = i === void 0 ? n.placement : i, o = t.strategy, u = o === void 0 ? n.strategy : o, c = t.boundary, p = c === void 0 ? h5 : c, y = t.rootBoundary, _ = y === void 0 ? uL : y, S = t.elementContext, b = S === void 0 ? M0 : S, T = t.altBoundary, O = T === void 0 ? !1 : T, N = t.padding, D = N === void 0 ? 0 : N, k = R5(typeof D != "number" ? D : M5(D, v_)), $ = b === M0 ? d5 : M0, B = n.rects.popper, V = n.elements[O ? $ : b], z = cq(Wv(V) ? V : V.contextElement || um(n.elements.popper), p, _, u), G = n_(n.elements.reference), ie = L5({
      reference: G,
      element: B,
      strategy: "absolute",
      placement: a
    }), ue = xA(Object.assign({}, B, ie)), Re = b === M0 ? ue : G, Oe = {
      top: z.top - Re.top + k.top,
      bottom: Re.bottom - z.bottom + k.bottom,
      left: z.left - Re.left + k.left,
      right: Re.right - z.right + k.right
    }, $e = n.modifiersData.offset;
    if (b === M0 && $e) {
      var Ee = $e[a];
      Object.keys(Oe).forEach(function(Fe) {
        var Ne = [Cu, wu].indexOf(Fe) >= 0 ? 1 : -1, Q = [Jo, wu].indexOf(Fe) >= 0 ? "y" : "x";
        Oe[Fe] += Ee[Q] * Ne;
      });
    }
    return Oe;
  }
  function fq(n, e) {
    e === void 0 && (e = {});
    var t = e, i = t.placement, a = t.boundary, o = t.rootBoundary, u = t.padding, c = t.flipVariations, p = t.allowedAutoPlacements, y = p === void 0 ? cL : p, _ = i_(i), S = _ ? c ? EA : EA.filter(function(O) {
      return i_(O) === _;
    }) : v_, b = S.filter(function(O) {
      return y.indexOf(O) >= 0;
    });
    b.length === 0 && (b = S);
    var T = b.reduce(function(O, N) {
      return O[N] = r_(n, {
        placement: N,
        boundary: a,
        rootBoundary: o,
        padding: u
      })[Bh(N)], O;
    }, {});
    return Object.keys(T).sort(function(O, N) {
      return T[O] - T[N];
    });
  }
  function hq(n) {
    if (Bh(n) === jw)
      return [];
    var e = Pb(n);
    return [Kk(n), e, Kk(e)];
  }
  function dq(n) {
    var e = n.state, t = n.options, i = n.name;
    if (!e.modifiersData[i]._skip) {
      for (var a = t.mainAxis, o = a === void 0 ? !0 : a, u = t.altAxis, c = u === void 0 ? !0 : u, p = t.fallbackPlacements, y = t.padding, _ = t.boundary, S = t.rootBoundary, b = t.altBoundary, T = t.flipVariations, O = T === void 0 ? !0 : T, N = t.allowedAutoPlacements, D = e.options.placement, k = Bh(D), $ = k === D, B = p || ($ || !O ? [Pb(D)] : hq(D)), V = [D].concat(B).reduce(function(Me, De) {
        return Me.concat(Bh(De) === jw ? fq(e, {
          placement: De,
          boundary: _,
          rootBoundary: S,
          padding: y,
          flipVariations: O,
          allowedAutoPlacements: N
        }) : De);
      }, []), z = e.rects.reference, G = e.rects.popper, ie = /* @__PURE__ */ new Map(), ue = !0, Re = V[0], Oe = 0; Oe < V.length; Oe++) {
        var $e = V[Oe], Ee = Bh($e), Fe = i_($e) === Hv, Ne = [Jo, wu].indexOf(Ee) >= 0, Q = Ne ? "width" : "height", ae = r_(e, {
          placement: $e,
          boundary: _,
          rootBoundary: S,
          altBoundary: b,
          padding: y
        }), le = Ne ? Fe ? Cu : el : Fe ? wu : Jo;
        z[Q] > G[Q] && (le = Pb(le));
        var se = Pb(le), Ae = [];
        if (o && Ae.push(ae[Ee] <= 0), c && Ae.push(ae[le] <= 0, ae[se] <= 0), Ae.every(function(Me) {
          return Me;
        })) {
          Re = $e, ue = !1;
          break;
        }
        ie.set($e, Ae);
      }
      if (ue)
        for (var q = O ? 3 : 1, Z = function(De) {
          var Ye = V.find(function(Ze) {
            var Xe = ie.get(Ze);
            if (Xe)
              return Xe.slice(0, De).every(function(lt) {
                return lt;
              });
          });
          if (Ye)
            return Re = Ye, "break";
        }, ee = q; ee > 0; ee--) {
          var Le = Z(ee);
          if (Le === "break")
            break;
        }
      e.placement !== Re && (e.modifiersData[i]._skip = !0, e.placement = Re, e.reset = !0);
    }
  }
  const N5 = {
    name: "flip",
    enabled: !0,
    phase: "main",
    fn: dq,
    requiresIfExists: ["offset"],
    data: {
      _skip: !1
    }
  };
  function Qk(n, e, t) {
    return t === void 0 && (t = {
      x: 0,
      y: 0
    }), {
      top: n.top - e.height - t.y,
      right: n.right - e.width + t.x,
      bottom: n.bottom - e.height + t.y,
      left: n.left - e.width - t.x
    };
  }
  function Jk(n) {
    return [Jo, Cu, wu, el].some(function(e) {
      return n[e] >= 0;
    });
  }
  function pq(n) {
    var e = n.state, t = n.name, i = e.rects.reference, a = e.rects.popper, o = e.modifiersData.preventOverflow, u = r_(e, {
      elementContext: "reference"
    }), c = r_(e, {
      altBoundary: !0
    }), p = Qk(u, i), y = Qk(c, a, o), _ = Jk(p), S = Jk(y);
    e.modifiersData[t] = {
      referenceClippingOffsets: p,
      popperEscapeOffsets: y,
      isReferenceHidden: _,
      hasPopperEscaped: S
    }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
      "data-popper-reference-hidden": _,
      "data-popper-escaped": S
    });
  }
  const D5 = {
    name: "hide",
    enabled: !0,
    phase: "main",
    requiresIfExists: ["preventOverflow"],
    fn: pq
  };
  function gq(n, e, t) {
    var i = Bh(n), a = [el, Jo].indexOf(i) >= 0 ? -1 : 1, o = typeof t == "function" ? t(Object.assign({}, e, {
      placement: n
    })) : t, u = o[0], c = o[1];
    return u = u || 0, c = (c || 0) * a, [el, Cu].indexOf(i) >= 0 ? {
      x: c,
      y: u
    } : {
      x: u,
      y: c
    };
  }
  function mq(n) {
    var e = n.state, t = n.options, i = n.name, a = t.offset, o = a === void 0 ? [0, 0] : a, u = cL.reduce(function(_, S) {
      return _[S] = gq(S, e.rects, o), _;
    }, {}), c = u[e.placement], p = c.x, y = c.y;
    e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += p, e.modifiersData.popperOffsets.y += y), e.modifiersData[i] = u;
  }
  const I5 = {
    name: "offset",
    enabled: !0,
    phase: "main",
    requires: ["popperOffsets"],
    fn: mq
  };
  function vq(n) {
    var e = n.state, t = n.name;
    e.modifiersData[t] = L5({
      reference: e.rects.reference,
      element: e.rects.popper,
      strategy: "absolute",
      placement: e.placement
    });
  }
  const EL = {
    name: "popperOffsets",
    enabled: !0,
    phase: "read",
    fn: vq,
    data: {}
  };
  function yq(n) {
    return n === "x" ? "y" : "x";
  }
  function _q(n) {
    var e = n.state, t = n.options, i = n.name, a = t.mainAxis, o = a === void 0 ? !0 : a, u = t.altAxis, c = u === void 0 ? !1 : u, p = t.boundary, y = t.rootBoundary, _ = t.altBoundary, S = t.padding, b = t.tether, T = b === void 0 ? !0 : b, O = t.tetherOffset, N = O === void 0 ? 0 : O, D = r_(e, {
      boundary: p,
      rootBoundary: y,
      padding: S,
      altBoundary: _
    }), k = Bh(e.placement), $ = i_(e.placement), B = !$, V = pL(k), z = yq(V), G = e.modifiersData.popperOffsets, ie = e.rects.reference, ue = e.rects.popper, Re = typeof N == "function" ? N(Object.assign({}, e.rects, {
      placement: e.placement
    })) : N, Oe = typeof Re == "number" ? {
      mainAxis: Re,
      altAxis: Re
    } : Object.assign({
      mainAxis: 0,
      altAxis: 0
    }, Re), $e = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, Ee = {
      x: 0,
      y: 0
    };
    if (G) {
      if (o) {
        var Fe, Ne = V === "y" ? Jo : el, Q = V === "y" ? wu : Cu, ae = V === "y" ? "height" : "width", le = G[V], se = le + D[Ne], Ae = le - D[Q], q = T ? -ue[ae] / 2 : 0, Z = $ === Hv ? ie[ae] : ue[ae], ee = $ === Hv ? -ue[ae] : -ie[ae], Le = e.elements.arrow, Me = T && Le ? dL(Le) : {
          width: 0,
          height: 0
        }, De = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : T5(), Ye = De[Ne], Ze = De[Q], Xe = _E(0, ie[ae], Me[ae]), lt = B ? ie[ae] / 2 - q - Xe - Ye - Oe.mainAxis : Z - Xe - Ye - Oe.mainAxis, Dt = B ? -ie[ae] / 2 + q + Xe + Ze + Oe.mainAxis : ee + Xe + Ze + Oe.mainAxis, Ct = e.elements.arrow && aS(e.elements.arrow), hn = Ct ? V === "y" ? Ct.clientTop || 0 : Ct.clientLeft || 0 : 0, Je = (Fe = $e == null ? void 0 : $e[V]) != null ? Fe : 0, Pt = le + lt - Je - hn, Vn = le + Dt - Je, Hn = _E(T ? aw(se, Pt) : se, le, T ? jv(Ae, Vn) : Ae);
        G[V] = Hn, Ee[V] = Hn - le;
      }
      if (c) {
        var Nn, Si = V === "x" ? Jo : el, Sr = V === "x" ? wu : Cu, In = G[z], Tn = z === "y" ? "height" : "width", Pn = In + D[Si], Qn = In - D[Sr], Jn = [Jo, el].indexOf(k) !== -1, ui = (Nn = $e == null ? void 0 : $e[z]) != null ? Nn : 0, Mi = Jn ? Pn : In - ie[Tn] - ue[Tn] - ui + Oe.altAxis, ci = Jn ? In + ie[Tn] + ue[Tn] - ui - Oe.altAxis : Qn, dn = T && Jn ? KY(Mi, In, ci) : _E(T ? Mi : Pn, In, T ? ci : Qn);
        G[z] = dn, Ee[z] = dn - In;
      }
      e.modifiersData[i] = Ee;
    }
  }
  const P5 = {
    name: "preventOverflow",
    enabled: !0,
    phase: "main",
    fn: _q,
    requiresIfExists: ["offset"]
  };
  function Eq(n) {
    return {
      scrollLeft: n.scrollLeft,
      scrollTop: n.scrollTop
    };
  }
  function Sq(n) {
    return n === Tu(n) || !Ec(n) ? vL(n) : Eq(n);
  }
  function xq(n) {
    var e = n.getBoundingClientRect(), t = t_(e.width) / n.offsetWidth || 1, i = t_(e.height) / n.offsetHeight || 1;
    return t !== 1 || i !== 1;
  }
  function bq(n, e, t) {
    t === void 0 && (t = !1);
    var i = Ec(e), a = Ec(e) && xq(e), o = um(e), u = n_(n, a, t), c = {
      scrollLeft: 0,
      scrollTop: 0
    }, p = {
      x: 0,
      y: 0
    };
    return (i || !i && !t) && ((Yh(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
    _L(o)) && (c = Sq(e)), Ec(e) ? (p = n_(e, !0), p.x += e.clientLeft, p.y += e.clientTop) : o && (p.x = yL(o))), {
      x: u.left + c.scrollLeft - p.x,
      y: u.top + c.scrollTop - p.y,
      width: u.width,
      height: u.height
    };
  }
  function wq(n) {
    var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), i = [];
    n.forEach(function(o) {
      e.set(o.name, o);
    });
    function a(o) {
      t.add(o.name);
      var u = [].concat(o.requires || [], o.requiresIfExists || []);
      u.forEach(function(c) {
        if (!t.has(c)) {
          var p = e.get(c);
          p && a(p);
        }
      }), i.push(o);
    }
    return n.forEach(function(o) {
      t.has(o.name) || a(o);
    }), i;
  }
  function Cq(n) {
    var e = wq(n);
    return b5.reduce(function(t, i) {
      return t.concat(e.filter(function(a) {
        return a.phase === i;
      }));
    }, []);
  }
  function Tq(n) {
    var e;
    return function() {
      return e || (e = new Promise(function(t) {
        Promise.resolve().then(function() {
          e = void 0, t(n());
        });
      })), e;
    };
  }
  function Rq(n) {
    var e = n.reduce(function(t, i) {
      var a = t[i.name];
      return t[i.name] = a ? Object.assign({}, a, i, {
        options: Object.assign({}, a.options, i.options),
        data: Object.assign({}, a.data, i.data)
      }) : i, t;
    }, {});
    return Object.keys(e).map(function(t) {
      return e[t];
    });
  }
  var e3 = {
    placement: "bottom",
    modifiers: [],
    strategy: "absolute"
  };
  function t3() {
    for (var n = arguments.length, e = new Array(n), t = 0; t < n; t++)
      e[t] = arguments[t];
    return !e.some(function(i) {
      return !(i && typeof i.getBoundingClientRect == "function");
    });
  }
  function zw(n) {
    n === void 0 && (n = {});
    var e = n, t = e.defaultModifiers, i = t === void 0 ? [] : t, a = e.defaultOptions, o = a === void 0 ? e3 : a;
    return function(c, p, y) {
      y === void 0 && (y = o);
      var _ = {
        placement: "bottom",
        orderedModifiers: [],
        options: Object.assign({}, e3, o),
        modifiersData: {},
        elements: {
          reference: c,
          popper: p
        },
        attributes: {},
        styles: {}
      }, S = [], b = !1, T = {
        state: _,
        setOptions: function(k) {
          var $ = typeof k == "function" ? k(_.options) : k;
          N(), _.options = Object.assign({}, o, _.options, $), _.scrollParents = {
            reference: Wv(c) ? EE(c) : c.contextElement ? EE(c.contextElement) : [],
            popper: EE(p)
          };
          var B = Cq(Rq([].concat(i, _.options.modifiers)));
          return _.orderedModifiers = B.filter(function(V) {
            return V.enabled;
          }), O(), T.update();
        },
        // Sync update – it will always be executed, even if not necessary. This
        // is useful for low frequency updates where sync behavior simplifies the
        // logic.
        // For high frequency updates (e.g. `resize` and `scroll` events), always
        // prefer the async Popper#update method
        forceUpdate: function() {
          if (!b) {
            var k = _.elements, $ = k.reference, B = k.popper;
            if (t3($, B)) {
              _.rects = {
                reference: bq($, aS(B), _.options.strategy === "fixed"),
                popper: dL(B)
              }, _.reset = !1, _.placement = _.options.placement, _.orderedModifiers.forEach(function(Oe) {
                return _.modifiersData[Oe.name] = Object.assign({}, Oe.data);
              });
              for (var V = 0; V < _.orderedModifiers.length; V++) {
                if (_.reset === !0) {
                  _.reset = !1, V = -1;
                  continue;
                }
                var z = _.orderedModifiers[V], G = z.fn, ie = z.options, ue = ie === void 0 ? {} : ie, Re = z.name;
                typeof G == "function" && (_ = G({
                  state: _,
                  options: ue,
                  name: Re,
                  instance: T
                }) || _);
              }
            }
          }
        },
        // Async and optimistically optimized update – it will not be executed if
        // not necessary (debounced to run at most once-per-tick)
        update: Tq(function() {
          return new Promise(function(D) {
            T.forceUpdate(), D(_);
          });
        }),
        destroy: function() {
          N(), b = !0;
        }
      };
      if (!t3(c, p))
        return T;
      T.setOptions(y).then(function(D) {
        !b && y.onFirstUpdate && y.onFirstUpdate(D);
      });
      function O() {
        _.orderedModifiers.forEach(function(D) {
          var k = D.name, $ = D.options, B = $ === void 0 ? {} : $, V = D.effect;
          if (typeof V == "function") {
            var z = V({
              state: _,
              name: k,
              instance: T,
              options: B
            }), G = function() {
            };
            S.push(z || G);
          }
        });
      }
      function N() {
        S.forEach(function(D) {
          return D();
        }), S = [];
      }
      return T;
    };
  }
  var Mq = /* @__PURE__ */ zw(), Oq = [mL, EL, gL, hL], Aq = /* @__PURE__ */ zw({
    defaultModifiers: Oq
  }), Lq = [mL, EL, gL, hL, I5, N5, P5, O5, D5], SL = /* @__PURE__ */ zw({
    defaultModifiers: Lq
  });
  const k5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    afterMain: _5,
    afterRead: m5,
    afterWrite: x5,
    applyStyles: hL,
    arrow: O5,
    auto: jw,
    basePlacements: v_,
    beforeMain: v5,
    beforeRead: p5,
    beforeWrite: E5,
    bottom: wu,
    clippingParents: h5,
    computeStyles: gL,
    createPopper: SL,
    createPopperBase: Mq,
    createPopperLite: Aq,
    detectOverflow: r_,
    end: e_,
    eventListeners: mL,
    flip: N5,
    hide: D5,
    left: el,
    main: y5,
    modifierPhases: b5,
    offset: I5,
    placements: cL,
    popper: M0,
    popperGenerator: zw,
    popperOffsets: EL,
    preventOverflow: P5,
    read: g5,
    reference: d5,
    right: Cu,
    start: Hv,
    top: Jo,
    variationPlacements: EA,
    viewport: uL,
    write: S5
  }, Symbol.toStringTag, { value: "Module" }));
  /*!
    * Bootstrap v5.3.2 (https://getbootstrap.com/)
    * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
    */
  const Fg = /* @__PURE__ */ new Map(), lO = {
    set(n, e, t) {
      Fg.has(n) || Fg.set(n, /* @__PURE__ */ new Map());
      const i = Fg.get(n);
      if (!i.has(e) && i.size !== 0) {
        console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);
        return;
      }
      i.set(e, t);
    },
    get(n, e) {
      return Fg.has(n) && Fg.get(n).get(e) || null;
    },
    remove(n, e) {
      if (!Fg.has(n))
        return;
      const t = Fg.get(n);
      t.delete(e), t.size === 0 && Fg.delete(n);
    }
  }, Nq = 1e6, Dq = 1e3, bA = "transitionend", F5 = (n) => (n && window.CSS && window.CSS.escape && (n = n.replace(/#([^\s"#']+)/g, (e, t) => `#${CSS.escape(t)}`)), n), Iq = (n) => n == null ? `${n}` : Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(), Pq = (n) => {
    do
      n += Math.floor(Math.random() * Nq);
    while (document.getElementById(n));
    return n;
  }, kq = (n) => {
    if (!n)
      return 0;
    let {
      transitionDuration: e,
      transitionDelay: t
    } = window.getComputedStyle(n);
    const i = Number.parseFloat(e), a = Number.parseFloat(t);
    return !i && !a ? 0 : (e = e.split(",")[0], t = t.split(",")[0], (Number.parseFloat(e) + Number.parseFloat(t)) * Dq);
  }, j5 = (n) => {
    n.dispatchEvent(new Event(bA));
  }, Ep = (n) => !n || typeof n != "object" ? !1 : (typeof n.jquery < "u" && (n = n[0]), typeof n.nodeType < "u"), im = (n) => Ep(n) ? n.jquery ? n[0] : n : typeof n == "string" && n.length > 0 ? document.querySelector(F5(n)) : null, y_ = (n) => {
    if (!Ep(n) || n.getClientRects().length === 0)
      return !1;
    const e = getComputedStyle(n).getPropertyValue("visibility") === "visible", t = n.closest("details:not([open])");
    if (!t)
      return e;
    if (t !== n) {
      const i = n.closest("summary");
      if (i && i.parentNode !== t || i === null)
        return !1;
    }
    return e;
  }, rm = (n) => !n || n.nodeType !== Node.ELEMENT_NODE || n.classList.contains("disabled") ? !0 : typeof n.disabled < "u" ? n.disabled : n.hasAttribute("disabled") && n.getAttribute("disabled") !== "false", U5 = (n) => {
    if (!document.documentElement.attachShadow)
      return null;
    if (typeof n.getRootNode == "function") {
      const e = n.getRootNode();
      return e instanceof ShadowRoot ? e : null;
    }
    return n instanceof ShadowRoot ? n : n.parentNode ? U5(n.parentNode) : null;
  }, sw = () => {
  }, sS = (n) => {
    n.offsetHeight;
  }, z5 = () => window.jQuery && !document.body.hasAttribute("data-bs-no-jquery") ? window.jQuery : null, uO = [], Fq = (n) => {
    document.readyState === "loading" ? (uO.length || document.addEventListener("DOMContentLoaded", () => {
      for (const e of uO)
        e();
    }), uO.push(n)) : n();
  }, Sc = () => document.documentElement.dir === "rtl", bc = (n) => {
    Fq(() => {
      const e = z5();
      if (e) {
        const t = n.NAME, i = e.fn[t];
        e.fn[t] = n.jQueryInterface, e.fn[t].Constructor = n, e.fn[t].noConflict = () => (e.fn[t] = i, n.jQueryInterface);
      }
    });
  }, Dl = (n, e = [], t = n) => typeof n == "function" ? n(...e) : t, $5 = (n, e, t = !0) => {
    if (!t) {
      Dl(n);
      return;
    }
    const i = 5, a = kq(e) + i;
    let o = !1;
    const u = ({
      target: c
    }) => {
      c === e && (o = !0, e.removeEventListener(bA, u), Dl(n));
    };
    e.addEventListener(bA, u), setTimeout(() => {
      o || j5(e);
    }, a);
  }, xL = (n, e, t, i) => {
    const a = n.length;
    let o = n.indexOf(e);
    return o === -1 ? !t && i ? n[a - 1] : n[0] : (o += t ? 1 : -1, i && (o = (o + a) % a), n[Math.max(0, Math.min(o, a - 1))]);
  }, jq = /[^.]*(?=\..*)\.|.*/, Uq = /\..*/, zq = /::\d+$/, cO = {};
  let n3 = 1;
  const B5 = {
    mouseenter: "mouseover",
    mouseleave: "mouseout"
  }, $q = /* @__PURE__ */ new Set(["click", "dblclick", "mouseup", "mousedown", "contextmenu", "mousewheel", "DOMMouseScroll", "mouseover", "mouseout", "mousemove", "selectstart", "selectend", "keydown", "keypress", "keyup", "orientationchange", "touchstart", "touchmove", "touchend", "touchcancel", "pointerdown", "pointermove", "pointerup", "pointerleave", "pointercancel", "gesturestart", "gesturechange", "gestureend", "focus", "blur", "change", "reset", "select", "submit", "focusin", "focusout", "load", "unload", "beforeunload", "resize", "move", "DOMContentLoaded", "readystatechange", "error", "abort", "scroll"]);
  function V5(n, e) {
    return e && `${e}::${n3++}` || n.uidEvent || n3++;
  }
  function H5(n) {
    const e = V5(n);
    return n.uidEvent = e, cO[e] = cO[e] || {}, cO[e];
  }
  function Bq(n, e) {
    return function t(i) {
      return bL(i, {
        delegateTarget: n
      }), t.oneOff && Qe.off(n, i.type, e), e.apply(n, [i]);
    };
  }
  function Vq(n, e, t) {
    return function i(a) {
      const o = n.querySelectorAll(e);
      for (let {
        target: u
      } = a; u && u !== this; u = u.parentNode)
        for (const c of o)
          if (c === u)
            return bL(a, {
              delegateTarget: u
            }), i.oneOff && Qe.off(n, a.type, e, t), t.apply(u, [a]);
    };
  }
  function W5(n, e, t = null) {
    return Object.values(n).find((i) => i.callable === e && i.delegationSelector === t);
  }
  function G5(n, e, t) {
    const i = typeof e == "string", a = i ? t : e || t;
    let o = Y5(n);
    return $q.has(o) || (o = n), [i, a, o];
  }
  function i3(n, e, t, i, a) {
    if (typeof e != "string" || !n)
      return;
    let [o, u, c] = G5(e, t, i);
    e in B5 && (u = ((O) => function(N) {
      if (!N.relatedTarget || N.relatedTarget !== N.delegateTarget && !N.delegateTarget.contains(N.relatedTarget))
        return O.call(this, N);
    })(u));
    const p = H5(n), y = p[c] || (p[c] = {}), _ = W5(y, u, o ? t : null);
    if (_) {
      _.oneOff = _.oneOff && a;
      return;
    }
    const S = V5(u, e.replace(jq, "")), b = o ? Vq(n, t, u) : Bq(n, u);
    b.delegationSelector = o ? t : null, b.callable = u, b.oneOff = a, b.uidEvent = S, y[S] = b, n.addEventListener(c, b, o);
  }
  function wA(n, e, t, i, a) {
    const o = W5(e[t], i, a);
    o && (n.removeEventListener(t, o, !!a), delete e[t][o.uidEvent]);
  }
  function Hq(n, e, t, i) {
    const a = e[t] || {};
    for (const [o, u] of Object.entries(a))
      o.includes(i) && wA(n, e, t, u.callable, u.delegationSelector);
  }
  function Y5(n) {
    return n = n.replace(Uq, ""), B5[n] || n;
  }
  const Qe = {
    on(n, e, t, i) {
      i3(n, e, t, i, !1);
    },
    one(n, e, t, i) {
      i3(n, e, t, i, !0);
    },
    off(n, e, t, i) {
      if (typeof e != "string" || !n)
        return;
      const [a, o, u] = G5(e, t, i), c = u !== e, p = H5(n), y = p[u] || {}, _ = e.startsWith(".");
      if (typeof o < "u") {
        if (!Object.keys(y).length)
          return;
        wA(n, p, u, o, a ? t : null);
        return;
      }
      if (_)
        for (const S of Object.keys(p))
          Hq(n, p, S, e.slice(1));
      for (const [S, b] of Object.entries(y)) {
        const T = S.replace(zq, "");
        (!c || e.includes(T)) && wA(n, p, u, b.callable, b.delegationSelector);
      }
    },
    trigger(n, e, t) {
      if (typeof e != "string" || !n)
        return null;
      const i = z5(), a = Y5(e), o = e !== a;
      let u = null, c = !0, p = !0, y = !1;
      o && i && (u = i.Event(e, t), i(n).trigger(u), c = !u.isPropagationStopped(), p = !u.isImmediatePropagationStopped(), y = u.isDefaultPrevented());
      const _ = bL(new Event(e, {
        bubbles: c,
        cancelable: !0
      }), t);
      return y && _.preventDefault(), p && n.dispatchEvent(_), _.defaultPrevented && u && u.preventDefault(), _;
    }
  };
  function bL(n, e = {}) {
    for (const [t, i] of Object.entries(e))
      try {
        n[t] = i;
      } catch {
        Object.defineProperty(n, t, {
          configurable: !0,
          get() {
            return i;
          }
        });
      }
    return n;
  }
  function r3(n) {
    if (n === "true")
      return !0;
    if (n === "false")
      return !1;
    if (n === Number(n).toString())
      return Number(n);
    if (n === "" || n === "null")
      return null;
    if (typeof n != "string")
      return n;
    try {
      return JSON.parse(decodeURIComponent(n));
    } catch {
      return n;
    }
  }
  function fO(n) {
    return n.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
  }
  const Sp = {
    setDataAttribute(n, e, t) {
      n.setAttribute(`data-bs-${fO(e)}`, t);
    },
    removeDataAttribute(n, e) {
      n.removeAttribute(`data-bs-${fO(e)}`);
    },
    getDataAttributes(n) {
      if (!n)
        return {};
      const e = {}, t = Object.keys(n.dataset).filter((i) => i.startsWith("bs") && !i.startsWith("bsConfig"));
      for (const i of t) {
        let a = i.replace(/^bs/, "");
        a = a.charAt(0).toLowerCase() + a.slice(1, a.length), e[a] = r3(n.dataset[i]);
      }
      return e;
    },
    getDataAttribute(n, e) {
      return r3(n.getAttribute(`data-bs-${fO(e)}`));
    }
  };
  class oS {
    // Getters
    static get Default() {
      return {};
    }
    static get DefaultType() {
      return {};
    }
    static get NAME() {
      throw new Error('You have to implement the static method "NAME", for each component!');
    }
    _getConfig(e) {
      return e = this._mergeConfigObj(e), e = this._configAfterMerge(e), this._typeCheckConfig(e), e;
    }
    _configAfterMerge(e) {
      return e;
    }
    _mergeConfigObj(e, t) {
      const i = Ep(t) ? Sp.getDataAttribute(t, "config") : {};
      return {
        ...this.constructor.Default,
        ...typeof i == "object" ? i : {},
        ...Ep(t) ? Sp.getDataAttributes(t) : {},
        ...typeof e == "object" ? e : {}
      };
    }
    _typeCheckConfig(e, t = this.constructor.DefaultType) {
      for (const [i, a] of Object.entries(t)) {
        const o = e[i], u = Ep(o) ? "element" : Iq(o);
        if (!new RegExp(a).test(u))
          throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${u}" but expected type "${a}".`);
      }
    }
  }
  const Wq = "5.3.2";
  class Mf extends oS {
    constructor(e, t) {
      super(), e = im(e), e && (this._element = e, this._config = this._getConfig(t), lO.set(this._element, this.constructor.DATA_KEY, this));
    }
    // Public
    dispose() {
      lO.remove(this._element, this.constructor.DATA_KEY), Qe.off(this._element, this.constructor.EVENT_KEY);
      for (const e of Object.getOwnPropertyNames(this))
        this[e] = null;
    }
    _queueCallback(e, t, i = !0) {
      $5(e, t, i);
    }
    _getConfig(e) {
      return e = this._mergeConfigObj(e, this._element), e = this._configAfterMerge(e), this._typeCheckConfig(e), e;
    }
    // Static
    static getInstance(e) {
      return lO.get(im(e), this.DATA_KEY);
    }
    static getOrCreateInstance(e, t = {}) {
      return this.getInstance(e) || new this(e, typeof t == "object" ? t : null);
    }
    static get VERSION() {
      return Wq;
    }
    static get DATA_KEY() {
      return `bs.${this.NAME}`;
    }
    static get EVENT_KEY() {
      return `.${this.DATA_KEY}`;
    }
    static eventName(e) {
      return `${e}${this.EVENT_KEY}`;
    }
  }
  const hO = (n) => {
    let e = n.getAttribute("data-bs-target");
    if (!e || e === "#") {
      let t = n.getAttribute("href");
      if (!t || !t.includes("#") && !t.startsWith("."))
        return null;
      t.includes("#") && !t.startsWith("#") && (t = `#${t.split("#")[1]}`), e = t && t !== "#" ? F5(t.trim()) : null;
    }
    return e;
  }, Zt = {
    find(n, e = document.documentElement) {
      return [].concat(...Element.prototype.querySelectorAll.call(e, n));
    },
    findOne(n, e = document.documentElement) {
      return Element.prototype.querySelector.call(e, n);
    },
    children(n, e) {
      return [].concat(...n.children).filter((t) => t.matches(e));
    },
    parents(n, e) {
      const t = [];
      let i = n.parentNode.closest(e);
      for (; i; )
        t.push(i), i = i.parentNode.closest(e);
      return t;
    },
    prev(n, e) {
      let t = n.previousElementSibling;
      for (; t; ) {
        if (t.matches(e))
          return [t];
        t = t.previousElementSibling;
      }
      return [];
    },
    // TODO: this is now unused; remove later along with prev()
    next(n, e) {
      let t = n.nextElementSibling;
      for (; t; ) {
        if (t.matches(e))
          return [t];
        t = t.nextElementSibling;
      }
      return [];
    },
    focusableChildren(n) {
      const e = ["a", "button", "input", "textarea", "select", "details", "[tabindex]", '[contenteditable="true"]'].map((t) => `${t}:not([tabindex^="-"])`).join(",");
      return this.find(e, n).filter((t) => !rm(t) && y_(t));
    },
    getSelectorFromElement(n) {
      const e = hO(n);
      return e && Zt.findOne(e) ? e : null;
    },
    getElementFromSelector(n) {
      const e = hO(n);
      return e ? Zt.findOne(e) : null;
    },
    getMultipleElementsFromSelector(n) {
      const e = hO(n);
      return e ? Zt.find(e) : [];
    }
  }, $w = (n, e = "hide") => {
    const t = `click.dismiss${n.EVENT_KEY}`, i = n.NAME;
    Qe.on(document, t, `[data-bs-dismiss="${i}"]`, function(a) {
      if (["A", "AREA"].includes(this.tagName) && a.preventDefault(), rm(this))
        return;
      const o = Zt.getElementFromSelector(this) || this.closest(`.${i}`);
      n.getOrCreateInstance(o)[e]();
    });
  }, Gq = "alert", Yq = "bs.alert", q5 = `.${Yq}`, qq = `close${q5}`, Xq = `closed${q5}`, Kq = "fade", Zq = "show";
  class Bw extends Mf {
    // Getters
    static get NAME() {
      return Gq;
    }
    // Public
    close() {
      if (Qe.trigger(this._element, qq).defaultPrevented)
        return;
      this._element.classList.remove(Zq);
      const t = this._element.classList.contains(Kq);
      this._queueCallback(() => this._destroyElement(), this._element, t);
    }
    // Private
    _destroyElement() {
      this._element.remove(), Qe.trigger(this._element, Xq), this.dispose();
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = Bw.getOrCreateInstance(this);
        if (typeof e == "string") {
          if (t[e] === void 0 || e.startsWith("_") || e === "constructor")
            throw new TypeError(`No method named "${e}"`);
          t[e](this);
        }
      });
    }
  }
  $w(Bw, "close");
  bc(Bw);
  const Qq = "button", Jq = "bs.button", eX = `.${Jq}`, tX = ".data-api", nX = "active", a3 = '[data-bs-toggle="button"]', iX = `click${eX}${tX}`;
  class Vw extends Mf {
    // Getters
    static get NAME() {
      return Qq;
    }
    // Public
    toggle() {
      this._element.setAttribute("aria-pressed", this._element.classList.toggle(nX));
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = Vw.getOrCreateInstance(this);
        e === "toggle" && t[e]();
      });
    }
  }
  Qe.on(document, iX, a3, (n) => {
    n.preventDefault();
    const e = n.target.closest(a3);
    Vw.getOrCreateInstance(e).toggle();
  });
  bc(Vw);
  const rX = "swipe", __ = ".bs.swipe", aX = `touchstart${__}`, sX = `touchmove${__}`, oX = `touchend${__}`, lX = `pointerdown${__}`, uX = `pointerup${__}`, cX = "touch", fX = "pen", hX = "pointer-event", dX = 40, pX = {
    endCallback: null,
    leftCallback: null,
    rightCallback: null
  }, gX = {
    endCallback: "(function|null)",
    leftCallback: "(function|null)",
    rightCallback: "(function|null)"
  };
  class ow extends oS {
    constructor(e, t) {
      super(), this._element = e, !(!e || !ow.isSupported()) && (this._config = this._getConfig(t), this._deltaX = 0, this._supportPointerEvents = !!window.PointerEvent, this._initEvents());
    }
    // Getters
    static get Default() {
      return pX;
    }
    static get DefaultType() {
      return gX;
    }
    static get NAME() {
      return rX;
    }
    // Public
    dispose() {
      Qe.off(this._element, __);
    }
    // Private
    _start(e) {
      if (!this._supportPointerEvents) {
        this._deltaX = e.touches[0].clientX;
        return;
      }
      this._eventIsPointerPenTouch(e) && (this._deltaX = e.clientX);
    }
    _end(e) {
      this._eventIsPointerPenTouch(e) && (this._deltaX = e.clientX - this._deltaX), this._handleSwipe(), Dl(this._config.endCallback);
    }
    _move(e) {
      this._deltaX = e.touches && e.touches.length > 1 ? 0 : e.touches[0].clientX - this._deltaX;
    }
    _handleSwipe() {
      const e = Math.abs(this._deltaX);
      if (e <= dX)
        return;
      const t = e / this._deltaX;
      this._deltaX = 0, t && Dl(t > 0 ? this._config.rightCallback : this._config.leftCallback);
    }
    _initEvents() {
      this._supportPointerEvents ? (Qe.on(this._element, lX, (e) => this._start(e)), Qe.on(this._element, uX, (e) => this._end(e)), this._element.classList.add(hX)) : (Qe.on(this._element, aX, (e) => this._start(e)), Qe.on(this._element, sX, (e) => this._move(e)), Qe.on(this._element, oX, (e) => this._end(e)));
    }
    _eventIsPointerPenTouch(e) {
      return this._supportPointerEvents && (e.pointerType === fX || e.pointerType === cX);
    }
    // Static
    static isSupported() {
      return "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0;
    }
  }
  const mX = "carousel", vX = "bs.carousel", cm = `.${vX}`, X5 = ".data-api", yX = "ArrowLeft", _X = "ArrowRight", EX = 500, nE = "next", S0 = "prev", O0 = "left", kb = "right", SX = `slide${cm}`, dO = `slid${cm}`, xX = `keydown${cm}`, bX = `mouseenter${cm}`, wX = `mouseleave${cm}`, CX = `dragstart${cm}`, TX = `load${cm}${X5}`, RX = `click${cm}${X5}`, K5 = "carousel", mb = "active", MX = "slide", OX = "carousel-item-end", AX = "carousel-item-start", LX = "carousel-item-next", NX = "carousel-item-prev", Z5 = ".active", Q5 = ".carousel-item", DX = Z5 + Q5, IX = ".carousel-item img", PX = ".carousel-indicators", kX = "[data-bs-slide], [data-bs-slide-to]", FX = '[data-bs-ride="carousel"]', jX = {
    [yX]: kb,
    [_X]: O0
  }, UX = {
    interval: 5e3,
    keyboard: !0,
    pause: "hover",
    ride: !1,
    touch: !0,
    wrap: !0
  }, zX = {
    interval: "(number|boolean)",
    // TODO:v6 remove boolean support
    keyboard: "boolean",
    pause: "(string|boolean)",
    ride: "(boolean|string)",
    touch: "boolean",
    wrap: "boolean"
  };
  class lS extends Mf {
    constructor(e, t) {
      super(e, t), this._interval = null, this._activeElement = null, this._isSliding = !1, this.touchTimeout = null, this._swipeHelper = null, this._indicatorsElement = Zt.findOne(PX, this._element), this._addEventListeners(), this._config.ride === K5 && this.cycle();
    }
    // Getters
    static get Default() {
      return UX;
    }
    static get DefaultType() {
      return zX;
    }
    static get NAME() {
      return mX;
    }
    // Public
    next() {
      this._slide(nE);
    }
    nextWhenVisible() {
      !document.hidden && y_(this._element) && this.next();
    }
    prev() {
      this._slide(S0);
    }
    pause() {
      this._isSliding && j5(this._element), this._clearInterval();
    }
    cycle() {
      this._clearInterval(), this._updateInterval(), this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
    }
    _maybeEnableCycle() {
      if (this._config.ride) {
        if (this._isSliding) {
          Qe.one(this._element, dO, () => this.cycle());
          return;
        }
        this.cycle();
      }
    }
    to(e) {
      const t = this._getItems();
      if (e > t.length - 1 || e < 0)
        return;
      if (this._isSliding) {
        Qe.one(this._element, dO, () => this.to(e));
        return;
      }
      const i = this._getItemIndex(this._getActive());
      if (i === e)
        return;
      const a = e > i ? nE : S0;
      this._slide(a, t[e]);
    }
    dispose() {
      this._swipeHelper && this._swipeHelper.dispose(), super.dispose();
    }
    // Private
    _configAfterMerge(e) {
      return e.defaultInterval = e.interval, e;
    }
    _addEventListeners() {
      this._config.keyboard && Qe.on(this._element, xX, (e) => this._keydown(e)), this._config.pause === "hover" && (Qe.on(this._element, bX, () => this.pause()), Qe.on(this._element, wX, () => this._maybeEnableCycle())), this._config.touch && ow.isSupported() && this._addTouchEventListeners();
    }
    _addTouchEventListeners() {
      for (const i of Zt.find(IX, this._element))
        Qe.on(i, CX, (a) => a.preventDefault());
      const t = {
        leftCallback: () => this._slide(this._directionToOrder(O0)),
        rightCallback: () => this._slide(this._directionToOrder(kb)),
        endCallback: () => {
          this._config.pause === "hover" && (this.pause(), this.touchTimeout && clearTimeout(this.touchTimeout), this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), EX + this._config.interval));
        }
      };
      this._swipeHelper = new ow(this._element, t);
    }
    _keydown(e) {
      if (/input|textarea/i.test(e.target.tagName))
        return;
      const t = jX[e.key];
      t && (e.preventDefault(), this._slide(this._directionToOrder(t)));
    }
    _getItemIndex(e) {
      return this._getItems().indexOf(e);
    }
    _setActiveIndicatorElement(e) {
      if (!this._indicatorsElement)
        return;
      const t = Zt.findOne(Z5, this._indicatorsElement);
      t.classList.remove(mb), t.removeAttribute("aria-current");
      const i = Zt.findOne(`[data-bs-slide-to="${e}"]`, this._indicatorsElement);
      i && (i.classList.add(mb), i.setAttribute("aria-current", "true"));
    }
    _updateInterval() {
      const e = this._activeElement || this._getActive();
      if (!e)
        return;
      const t = Number.parseInt(e.getAttribute("data-bs-interval"), 10);
      this._config.interval = t || this._config.defaultInterval;
    }
    _slide(e, t = null) {
      if (this._isSliding)
        return;
      const i = this._getActive(), a = e === nE, o = t || xL(this._getItems(), i, a, this._config.wrap);
      if (o === i)
        return;
      const u = this._getItemIndex(o), c = (T) => Qe.trigger(this._element, T, {
        relatedTarget: o,
        direction: this._orderToDirection(e),
        from: this._getItemIndex(i),
        to: u
      });
      if (c(SX).defaultPrevented || !i || !o)
        return;
      const y = !!this._interval;
      this.pause(), this._isSliding = !0, this._setActiveIndicatorElement(u), this._activeElement = o;
      const _ = a ? AX : OX, S = a ? LX : NX;
      o.classList.add(S), sS(o), i.classList.add(_), o.classList.add(_);
      const b = () => {
        o.classList.remove(_, S), o.classList.add(mb), i.classList.remove(mb, S, _), this._isSliding = !1, c(dO);
      };
      this._queueCallback(b, i, this._isAnimated()), y && this.cycle();
    }
    _isAnimated() {
      return this._element.classList.contains(MX);
    }
    _getActive() {
      return Zt.findOne(DX, this._element);
    }
    _getItems() {
      return Zt.find(Q5, this._element);
    }
    _clearInterval() {
      this._interval && (clearInterval(this._interval), this._interval = null);
    }
    _directionToOrder(e) {
      return Sc() ? e === O0 ? S0 : nE : e === O0 ? nE : S0;
    }
    _orderToDirection(e) {
      return Sc() ? e === S0 ? O0 : kb : e === S0 ? kb : O0;
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = lS.getOrCreateInstance(this, e);
        if (typeof e == "number") {
          t.to(e);
          return;
        }
        if (typeof e == "string") {
          if (t[e] === void 0 || e.startsWith("_") || e === "constructor")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
  }
  Qe.on(document, RX, kX, function(n) {
    const e = Zt.getElementFromSelector(this);
    if (!e || !e.classList.contains(K5))
      return;
    n.preventDefault();
    const t = lS.getOrCreateInstance(e), i = this.getAttribute("data-bs-slide-to");
    if (i) {
      t.to(i), t._maybeEnableCycle();
      return;
    }
    if (Sp.getDataAttribute(this, "slide") === "next") {
      t.next(), t._maybeEnableCycle();
      return;
    }
    t.prev(), t._maybeEnableCycle();
  });
  Qe.on(window, TX, () => {
    const n = Zt.find(FX);
    for (const e of n)
      lS.getOrCreateInstance(e);
  });
  bc(lS);
  const $X = "collapse", BX = "bs.collapse", uS = `.${BX}`, VX = ".data-api", HX = `show${uS}`, WX = `shown${uS}`, GX = `hide${uS}`, YX = `hidden${uS}`, qX = `click${uS}${VX}`, pO = "show", $0 = "collapse", vb = "collapsing", XX = "collapsed", KX = `:scope .${$0} .${$0}`, ZX = "collapse-horizontal", QX = "width", JX = "height", eK = ".collapse.show, .collapse.collapsing", CA = '[data-bs-toggle="collapse"]', tK = {
    parent: null,
    toggle: !0
  }, nK = {
    parent: "(null|element)",
    toggle: "boolean"
  };
  class Gv extends Mf {
    constructor(e, t) {
      super(e, t), this._isTransitioning = !1, this._triggerArray = [];
      const i = Zt.find(CA);
      for (const a of i) {
        const o = Zt.getSelectorFromElement(a), u = Zt.find(o).filter((c) => c === this._element);
        o !== null && u.length && this._triggerArray.push(a);
      }
      this._initializeChildren(), this._config.parent || this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), this._config.toggle && this.toggle();
    }
    // Getters
    static get Default() {
      return tK;
    }
    static get DefaultType() {
      return nK;
    }
    static get NAME() {
      return $X;
    }
    // Public
    toggle() {
      this._isShown() ? this.hide() : this.show();
    }
    show() {
      if (this._isTransitioning || this._isShown())
        return;
      let e = [];
      if (this._config.parent && (e = this._getFirstLevelChildren(eK).filter((c) => c !== this._element).map((c) => Gv.getOrCreateInstance(c, {
        toggle: !1
      }))), e.length && e[0]._isTransitioning || Qe.trigger(this._element, HX).defaultPrevented)
        return;
      for (const c of e)
        c.hide();
      const i = this._getDimension();
      this._element.classList.remove($0), this._element.classList.add(vb), this._element.style[i] = 0, this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0;
      const a = () => {
        this._isTransitioning = !1, this._element.classList.remove(vb), this._element.classList.add($0, pO), this._element.style[i] = "", Qe.trigger(this._element, WX);
      }, u = `scroll${i[0].toUpperCase() + i.slice(1)}`;
      this._queueCallback(a, this._element, !0), this._element.style[i] = `${this._element[u]}px`;
    }
    hide() {
      if (this._isTransitioning || !this._isShown() || Qe.trigger(this._element, GX).defaultPrevented)
        return;
      const t = this._getDimension();
      this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, sS(this._element), this._element.classList.add(vb), this._element.classList.remove($0, pO);
      for (const a of this._triggerArray) {
        const o = Zt.getElementFromSelector(a);
        o && !this._isShown(o) && this._addAriaAndCollapsedClass([a], !1);
      }
      this._isTransitioning = !0;
      const i = () => {
        this._isTransitioning = !1, this._element.classList.remove(vb), this._element.classList.add($0), Qe.trigger(this._element, YX);
      };
      this._element.style[t] = "", this._queueCallback(i, this._element, !0);
    }
    _isShown(e = this._element) {
      return e.classList.contains(pO);
    }
    // Private
    _configAfterMerge(e) {
      return e.toggle = !!e.toggle, e.parent = im(e.parent), e;
    }
    _getDimension() {
      return this._element.classList.contains(ZX) ? QX : JX;
    }
    _initializeChildren() {
      if (!this._config.parent)
        return;
      const e = this._getFirstLevelChildren(CA);
      for (const t of e) {
        const i = Zt.getElementFromSelector(t);
        i && this._addAriaAndCollapsedClass([t], this._isShown(i));
      }
    }
    _getFirstLevelChildren(e) {
      const t = Zt.find(KX, this._config.parent);
      return Zt.find(e, this._config.parent).filter((i) => !t.includes(i));
    }
    _addAriaAndCollapsedClass(e, t) {
      if (e.length)
        for (const i of e)
          i.classList.toggle(XX, !t), i.setAttribute("aria-expanded", t);
    }
    // Static
    static jQueryInterface(e) {
      const t = {};
      return typeof e == "string" && /show|hide/.test(e) && (t.toggle = !1), this.each(function() {
        const i = Gv.getOrCreateInstance(this, t);
        if (typeof e == "string") {
          if (typeof i[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          i[e]();
        }
      });
    }
  }
  Qe.on(document, qX, CA, function(n) {
    (n.target.tagName === "A" || n.delegateTarget && n.delegateTarget.tagName === "A") && n.preventDefault();
    for (const e of Zt.getMultipleElementsFromSelector(this))
      Gv.getOrCreateInstance(e, {
        toggle: !1
      }).toggle();
  });
  bc(Gv);
  const s3 = "dropdown", iK = "bs.dropdown", Qv = `.${iK}`, wL = ".data-api", rK = "Escape", o3 = "Tab", aK = "ArrowUp", l3 = "ArrowDown", sK = 2, oK = `hide${Qv}`, lK = `hidden${Qv}`, uK = `show${Qv}`, cK = `shown${Qv}`, J5 = `click${Qv}${wL}`, ej = `keydown${Qv}${wL}`, fK = `keyup${Qv}${wL}`, A0 = "show", hK = "dropup", dK = "dropend", pK = "dropstart", gK = "dropup-center", mK = "dropdown-center", Mv = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)', vK = `${Mv}.${A0}`, Fb = ".dropdown-menu", yK = ".navbar", _K = ".navbar-nav", EK = ".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", SK = Sc() ? "top-end" : "top-start", xK = Sc() ? "top-start" : "top-end", bK = Sc() ? "bottom-end" : "bottom-start", wK = Sc() ? "bottom-start" : "bottom-end", CK = Sc() ? "left-start" : "right-start", TK = Sc() ? "right-start" : "left-start", RK = "top", MK = "bottom", OK = {
    autoClose: !0,
    boundary: "clippingParents",
    display: "dynamic",
    offset: [0, 2],
    popperConfig: null,
    reference: "toggle"
  }, AK = {
    autoClose: "(boolean|string)",
    boundary: "(string|element)",
    display: "string",
    offset: "(array|string|function)",
    popperConfig: "(null|object|function)",
    reference: "(string|element|object)"
  };
  class Vh extends Mf {
    constructor(e, t) {
      super(e, t), this._popper = null, this._parent = this._element.parentNode, this._menu = Zt.next(this._element, Fb)[0] || Zt.prev(this._element, Fb)[0] || Zt.findOne(Fb, this._parent), this._inNavbar = this._detectNavbar();
    }
    // Getters
    static get Default() {
      return OK;
    }
    static get DefaultType() {
      return AK;
    }
    static get NAME() {
      return s3;
    }
    // Public
    toggle() {
      return this._isShown() ? this.hide() : this.show();
    }
    show() {
      if (rm(this._element) || this._isShown())
        return;
      const e = {
        relatedTarget: this._element
      };
      if (!Qe.trigger(this._element, uK, e).defaultPrevented) {
        if (this._createPopper(), "ontouchstart" in document.documentElement && !this._parent.closest(_K))
          for (const i of [].concat(...document.body.children))
            Qe.on(i, "mouseover", sw);
        this._element.focus(), this._element.setAttribute("aria-expanded", !0), this._menu.classList.add(A0), this._element.classList.add(A0), Qe.trigger(this._element, cK, e);
      }
    }
    hide() {
      if (rm(this._element) || !this._isShown())
        return;
      const e = {
        relatedTarget: this._element
      };
      this._completeHide(e);
    }
    dispose() {
      this._popper && this._popper.destroy(), super.dispose();
    }
    update() {
      this._inNavbar = this._detectNavbar(), this._popper && this._popper.update();
    }
    // Private
    _completeHide(e) {
      if (!Qe.trigger(this._element, oK, e).defaultPrevented) {
        if ("ontouchstart" in document.documentElement)
          for (const i of [].concat(...document.body.children))
            Qe.off(i, "mouseover", sw);
        this._popper && this._popper.destroy(), this._menu.classList.remove(A0), this._element.classList.remove(A0), this._element.setAttribute("aria-expanded", "false"), Sp.removeDataAttribute(this._menu, "popper"), Qe.trigger(this._element, lK, e);
      }
    }
    _getConfig(e) {
      if (e = super._getConfig(e), typeof e.reference == "object" && !Ep(e.reference) && typeof e.reference.getBoundingClientRect != "function")
        throw new TypeError(`${s3.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
      return e;
    }
    _createPopper() {
      if (typeof k5 > "u")
        throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");
      let e = this._element;
      this._config.reference === "parent" ? e = this._parent : Ep(this._config.reference) ? e = im(this._config.reference) : typeof this._config.reference == "object" && (e = this._config.reference);
      const t = this._getPopperConfig();
      this._popper = SL(e, this._menu, t);
    }
    _isShown() {
      return this._menu.classList.contains(A0);
    }
    _getPlacement() {
      const e = this._parent;
      if (e.classList.contains(dK))
        return CK;
      if (e.classList.contains(pK))
        return TK;
      if (e.classList.contains(gK))
        return RK;
      if (e.classList.contains(mK))
        return MK;
      const t = getComputedStyle(this._menu).getPropertyValue("--bs-position").trim() === "end";
      return e.classList.contains(hK) ? t ? xK : SK : t ? wK : bK;
    }
    _detectNavbar() {
      return this._element.closest(yK) !== null;
    }
    _getOffset() {
      const {
        offset: e
      } = this._config;
      return typeof e == "string" ? e.split(",").map((t) => Number.parseInt(t, 10)) : typeof e == "function" ? (t) => e(t, this._element) : e;
    }
    _getPopperConfig() {
      const e = {
        placement: this._getPlacement(),
        modifiers: [{
          name: "preventOverflow",
          options: {
            boundary: this._config.boundary
          }
        }, {
          name: "offset",
          options: {
            offset: this._getOffset()
          }
        }]
      };
      return (this._inNavbar || this._config.display === "static") && (Sp.setDataAttribute(this._menu, "popper", "static"), e.modifiers = [{
        name: "applyStyles",
        enabled: !1
      }]), {
        ...e,
        ...Dl(this._config.popperConfig, [e])
      };
    }
    _selectMenuItem({
      key: e,
      target: t
    }) {
      const i = Zt.find(EK, this._menu).filter((a) => y_(a));
      i.length && xL(i, t, e === l3, !i.includes(t)).focus();
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = Vh.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (typeof t[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
    static clearMenus(e) {
      if (e.button === sK || e.type === "keyup" && e.key !== o3)
        return;
      const t = Zt.find(vK);
      for (const i of t) {
        const a = Vh.getInstance(i);
        if (!a || a._config.autoClose === !1)
          continue;
        const o = e.composedPath(), u = o.includes(a._menu);
        if (o.includes(a._element) || a._config.autoClose === "inside" && !u || a._config.autoClose === "outside" && u || a._menu.contains(e.target) && (e.type === "keyup" && e.key === o3 || /input|select|option|textarea|form/i.test(e.target.tagName)))
          continue;
        const c = {
          relatedTarget: a._element
        };
        e.type === "click" && (c.clickEvent = e), a._completeHide(c);
      }
    }
    static dataApiKeydownHandler(e) {
      const t = /input|textarea/i.test(e.target.tagName), i = e.key === rK, a = [aK, l3].includes(e.key);
      if (!a && !i || t && !i)
        return;
      e.preventDefault();
      const o = this.matches(Mv) ? this : Zt.prev(this, Mv)[0] || Zt.next(this, Mv)[0] || Zt.findOne(Mv, e.delegateTarget.parentNode), u = Vh.getOrCreateInstance(o);
      if (a) {
        e.stopPropagation(), u.show(), u._selectMenuItem(e);
        return;
      }
      u._isShown() && (e.stopPropagation(), u.hide(), o.focus());
    }
  }
  Qe.on(document, ej, Mv, Vh.dataApiKeydownHandler);
  Qe.on(document, ej, Fb, Vh.dataApiKeydownHandler);
  Qe.on(document, J5, Vh.clearMenus);
  Qe.on(document, fK, Vh.clearMenus);
  Qe.on(document, J5, Mv, function(n) {
    n.preventDefault(), Vh.getOrCreateInstance(this).toggle();
  });
  bc(Vh);
  const tj = "backdrop", LK = "fade", u3 = "show", c3 = `mousedown.bs.${tj}`, NK = {
    className: "modal-backdrop",
    clickCallback: null,
    isAnimated: !1,
    isVisible: !0,
    // if false, we use the backdrop helper without adding any element to the dom
    rootElement: "body"
    // give the choice to place backdrop under different elements
  }, DK = {
    className: "string",
    clickCallback: "(function|null)",
    isAnimated: "boolean",
    isVisible: "boolean",
    rootElement: "(element|string)"
  };
  class nj extends oS {
    constructor(e) {
      super(), this._config = this._getConfig(e), this._isAppended = !1, this._element = null;
    }
    // Getters
    static get Default() {
      return NK;
    }
    static get DefaultType() {
      return DK;
    }
    static get NAME() {
      return tj;
    }
    // Public
    show(e) {
      if (!this._config.isVisible) {
        Dl(e);
        return;
      }
      this._append();
      const t = this._getElement();
      this._config.isAnimated && sS(t), t.classList.add(u3), this._emulateAnimation(() => {
        Dl(e);
      });
    }
    hide(e) {
      if (!this._config.isVisible) {
        Dl(e);
        return;
      }
      this._getElement().classList.remove(u3), this._emulateAnimation(() => {
        this.dispose(), Dl(e);
      });
    }
    dispose() {
      this._isAppended && (Qe.off(this._element, c3), this._element.remove(), this._isAppended = !1);
    }
    // Private
    _getElement() {
      if (!this._element) {
        const e = document.createElement("div");
        e.className = this._config.className, this._config.isAnimated && e.classList.add(LK), this._element = e;
      }
      return this._element;
    }
    _configAfterMerge(e) {
      return e.rootElement = im(e.rootElement), e;
    }
    _append() {
      if (this._isAppended)
        return;
      const e = this._getElement();
      this._config.rootElement.append(e), Qe.on(e, c3, () => {
        Dl(this._config.clickCallback);
      }), this._isAppended = !0;
    }
    _emulateAnimation(e) {
      $5(e, this._getElement(), this._config.isAnimated);
    }
  }
  const IK = "focustrap", PK = "bs.focustrap", lw = `.${PK}`, kK = `focusin${lw}`, FK = `keydown.tab${lw}`, jK = "Tab", UK = "forward", f3 = "backward", zK = {
    autofocus: !0,
    trapElement: null
    // The element to trap focus inside of
  }, $K = {
    autofocus: "boolean",
    trapElement: "element"
  };
  class ij extends oS {
    constructor(e) {
      super(), this._config = this._getConfig(e), this._isActive = !1, this._lastTabNavDirection = null;
    }
    // Getters
    static get Default() {
      return zK;
    }
    static get DefaultType() {
      return $K;
    }
    static get NAME() {
      return IK;
    }
    // Public
    activate() {
      this._isActive || (this._config.autofocus && this._config.trapElement.focus(), Qe.off(document, lw), Qe.on(document, kK, (e) => this._handleFocusin(e)), Qe.on(document, FK, (e) => this._handleKeydown(e)), this._isActive = !0);
    }
    deactivate() {
      this._isActive && (this._isActive = !1, Qe.off(document, lw));
    }
    // Private
    _handleFocusin(e) {
      const {
        trapElement: t
      } = this._config;
      if (e.target === document || e.target === t || t.contains(e.target))
        return;
      const i = Zt.focusableChildren(t);
      i.length === 0 ? t.focus() : this._lastTabNavDirection === f3 ? i[i.length - 1].focus() : i[0].focus();
    }
    _handleKeydown(e) {
      e.key === jK && (this._lastTabNavDirection = e.shiftKey ? f3 : UK);
    }
  }
  const h3 = ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", d3 = ".sticky-top", yb = "padding-right", p3 = "margin-right";
  class TA {
    constructor() {
      this._element = document.body;
    }
    // Public
    getWidth() {
      const e = document.documentElement.clientWidth;
      return Math.abs(window.innerWidth - e);
    }
    hide() {
      const e = this.getWidth();
      this._disableOverFlow(), this._setElementAttributes(this._element, yb, (t) => t + e), this._setElementAttributes(h3, yb, (t) => t + e), this._setElementAttributes(d3, p3, (t) => t - e);
    }
    reset() {
      this._resetElementAttributes(this._element, "overflow"), this._resetElementAttributes(this._element, yb), this._resetElementAttributes(h3, yb), this._resetElementAttributes(d3, p3);
    }
    isOverflowing() {
      return this.getWidth() > 0;
    }
    // Private
    _disableOverFlow() {
      this._saveInitialAttribute(this._element, "overflow"), this._element.style.overflow = "hidden";
    }
    _setElementAttributes(e, t, i) {
      const a = this.getWidth(), o = (u) => {
        if (u !== this._element && window.innerWidth > u.clientWidth + a)
          return;
        this._saveInitialAttribute(u, t);
        const c = window.getComputedStyle(u).getPropertyValue(t);
        u.style.setProperty(t, `${i(Number.parseFloat(c))}px`);
      };
      this._applyManipulationCallback(e, o);
    }
    _saveInitialAttribute(e, t) {
      const i = e.style.getPropertyValue(t);
      i && Sp.setDataAttribute(e, t, i);
    }
    _resetElementAttributes(e, t) {
      const i = (a) => {
        const o = Sp.getDataAttribute(a, t);
        if (o === null) {
          a.style.removeProperty(t);
          return;
        }
        Sp.removeDataAttribute(a, t), a.style.setProperty(t, o);
      };
      this._applyManipulationCallback(e, i);
    }
    _applyManipulationCallback(e, t) {
      if (Ep(e)) {
        t(e);
        return;
      }
      for (const i of Zt.find(e, this._element))
        t(i);
    }
  }
  const BK = "modal", VK = "bs.modal", xc = `.${VK}`, HK = ".data-api", WK = "Escape", GK = `hide${xc}`, YK = `hidePrevented${xc}`, rj = `hidden${xc}`, aj = `show${xc}`, qK = `shown${xc}`, XK = `resize${xc}`, KK = `click.dismiss${xc}`, ZK = `mousedown.dismiss${xc}`, QK = `keydown.dismiss${xc}`, JK = `click${xc}${HK}`, g3 = "modal-open", eZ = "fade", m3 = "show", gO = "modal-static", tZ = ".modal.show", nZ = ".modal-dialog", iZ = ".modal-body", rZ = '[data-bs-toggle="modal"]', aZ = {
    backdrop: !0,
    focus: !0,
    keyboard: !0
  }, sZ = {
    backdrop: "(boolean|string)",
    focus: "boolean",
    keyboard: "boolean"
  };
  class Yv extends Mf {
    constructor(e, t) {
      super(e, t), this._dialog = Zt.findOne(nZ, this._element), this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._isShown = !1, this._isTransitioning = !1, this._scrollBar = new TA(), this._addEventListeners();
    }
    // Getters
    static get Default() {
      return aZ;
    }
    static get DefaultType() {
      return sZ;
    }
    static get NAME() {
      return BK;
    }
    // Public
    toggle(e) {
      return this._isShown ? this.hide() : this.show(e);
    }
    show(e) {
      this._isShown || this._isTransitioning || Qe.trigger(this._element, aj, {
        relatedTarget: e
      }).defaultPrevented || (this._isShown = !0, this._isTransitioning = !0, this._scrollBar.hide(), document.body.classList.add(g3), this._adjustDialog(), this._backdrop.show(() => this._showElement(e)));
    }
    hide() {
      !this._isShown || this._isTransitioning || Qe.trigger(this._element, GK).defaultPrevented || (this._isShown = !1, this._isTransitioning = !0, this._focustrap.deactivate(), this._element.classList.remove(m3), this._queueCallback(() => this._hideModal(), this._element, this._isAnimated()));
    }
    dispose() {
      Qe.off(window, xc), Qe.off(this._dialog, xc), this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
    }
    handleUpdate() {
      this._adjustDialog();
    }
    // Private
    _initializeBackDrop() {
      return new nj({
        isVisible: !!this._config.backdrop,
        // 'static' option will be translated to true, and booleans will keep their value,
        isAnimated: this._isAnimated()
      });
    }
    _initializeFocusTrap() {
      return new ij({
        trapElement: this._element
      });
    }
    _showElement(e) {
      document.body.contains(this._element) || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0;
      const t = Zt.findOne(iZ, this._dialog);
      t && (t.scrollTop = 0), sS(this._element), this._element.classList.add(m3);
      const i = () => {
        this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, Qe.trigger(this._element, qK, {
          relatedTarget: e
        });
      };
      this._queueCallback(i, this._dialog, this._isAnimated());
    }
    _addEventListeners() {
      Qe.on(this._element, QK, (e) => {
        if (e.key === WK) {
          if (this._config.keyboard) {
            this.hide();
            return;
          }
          this._triggerBackdropTransition();
        }
      }), Qe.on(window, XK, () => {
        this._isShown && !this._isTransitioning && this._adjustDialog();
      }), Qe.on(this._element, ZK, (e) => {
        Qe.one(this._element, KK, (t) => {
          if (!(this._element !== e.target || this._element !== t.target)) {
            if (this._config.backdrop === "static") {
              this._triggerBackdropTransition();
              return;
            }
            this._config.backdrop && this.hide();
          }
        });
      });
    }
    _hideModal() {
      this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide(() => {
        document.body.classList.remove(g3), this._resetAdjustments(), this._scrollBar.reset(), Qe.trigger(this._element, rj);
      });
    }
    _isAnimated() {
      return this._element.classList.contains(eZ);
    }
    _triggerBackdropTransition() {
      if (Qe.trigger(this._element, YK).defaultPrevented)
        return;
      const t = this._element.scrollHeight > document.documentElement.clientHeight, i = this._element.style.overflowY;
      i === "hidden" || this._element.classList.contains(gO) || (t || (this._element.style.overflowY = "hidden"), this._element.classList.add(gO), this._queueCallback(() => {
        this._element.classList.remove(gO), this._queueCallback(() => {
          this._element.style.overflowY = i;
        }, this._dialog);
      }, this._dialog), this._element.focus());
    }
    /**
     * The following methods are used to handle overflowing modals
     */
    _adjustDialog() {
      const e = this._element.scrollHeight > document.documentElement.clientHeight, t = this._scrollBar.getWidth(), i = t > 0;
      if (i && !e) {
        const a = Sc() ? "paddingLeft" : "paddingRight";
        this._element.style[a] = `${t}px`;
      }
      if (!i && e) {
        const a = Sc() ? "paddingRight" : "paddingLeft";
        this._element.style[a] = `${t}px`;
      }
    }
    _resetAdjustments() {
      this._element.style.paddingLeft = "", this._element.style.paddingRight = "";
    }
    // Static
    static jQueryInterface(e, t) {
      return this.each(function() {
        const i = Yv.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (typeof i[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          i[e](t);
        }
      });
    }
  }
  Qe.on(document, JK, rZ, function(n) {
    const e = Zt.getElementFromSelector(this);
    ["A", "AREA"].includes(this.tagName) && n.preventDefault(), Qe.one(e, aj, (a) => {
      a.defaultPrevented || Qe.one(e, rj, () => {
        y_(this) && this.focus();
      });
    });
    const t = Zt.findOne(tZ);
    t && Yv.getInstance(t).hide(), Yv.getOrCreateInstance(e).toggle(this);
  });
  $w(Yv);
  bc(Yv);
  const oZ = "offcanvas", lZ = "bs.offcanvas", Ap = `.${lZ}`, sj = ".data-api", uZ = `load${Ap}${sj}`, cZ = "Escape", v3 = "show", y3 = "showing", _3 = "hiding", fZ = "offcanvas-backdrop", oj = ".offcanvas.show", hZ = `show${Ap}`, dZ = `shown${Ap}`, pZ = `hide${Ap}`, E3 = `hidePrevented${Ap}`, lj = `hidden${Ap}`, gZ = `resize${Ap}`, mZ = `click${Ap}${sj}`, vZ = `keydown.dismiss${Ap}`, yZ = '[data-bs-toggle="offcanvas"]', _Z = {
    backdrop: !0,
    keyboard: !0,
    scroll: !1
  }, EZ = {
    backdrop: "(boolean|string)",
    keyboard: "boolean",
    scroll: "boolean"
  };
  class am extends Mf {
    constructor(e, t) {
      super(e, t), this._isShown = !1, this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._addEventListeners();
    }
    // Getters
    static get Default() {
      return _Z;
    }
    static get DefaultType() {
      return EZ;
    }
    static get NAME() {
      return oZ;
    }
    // Public
    toggle(e) {
      return this._isShown ? this.hide() : this.show(e);
    }
    show(e) {
      if (this._isShown || Qe.trigger(this._element, hZ, {
        relatedTarget: e
      }).defaultPrevented)
        return;
      this._isShown = !0, this._backdrop.show(), this._config.scroll || new TA().hide(), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.classList.add(y3);
      const i = () => {
        (!this._config.scroll || this._config.backdrop) && this._focustrap.activate(), this._element.classList.add(v3), this._element.classList.remove(y3), Qe.trigger(this._element, dZ, {
          relatedTarget: e
        });
      };
      this._queueCallback(i, this._element, !0);
    }
    hide() {
      if (!this._isShown || Qe.trigger(this._element, pZ).defaultPrevented)
        return;
      this._focustrap.deactivate(), this._element.blur(), this._isShown = !1, this._element.classList.add(_3), this._backdrop.hide();
      const t = () => {
        this._element.classList.remove(v3, _3), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._config.scroll || new TA().reset(), Qe.trigger(this._element, lj);
      };
      this._queueCallback(t, this._element, !0);
    }
    dispose() {
      this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
    }
    // Private
    _initializeBackDrop() {
      const e = () => {
        if (this._config.backdrop === "static") {
          Qe.trigger(this._element, E3);
          return;
        }
        this.hide();
      }, t = !!this._config.backdrop;
      return new nj({
        className: fZ,
        isVisible: t,
        isAnimated: !0,
        rootElement: this._element.parentNode,
        clickCallback: t ? e : null
      });
    }
    _initializeFocusTrap() {
      return new ij({
        trapElement: this._element
      });
    }
    _addEventListeners() {
      Qe.on(this._element, vZ, (e) => {
        if (e.key === cZ) {
          if (this._config.keyboard) {
            this.hide();
            return;
          }
          Qe.trigger(this._element, E3);
        }
      });
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = am.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (t[e] === void 0 || e.startsWith("_") || e === "constructor")
            throw new TypeError(`No method named "${e}"`);
          t[e](this);
        }
      });
    }
  }
  Qe.on(document, mZ, yZ, function(n) {
    const e = Zt.getElementFromSelector(this);
    if (["A", "AREA"].includes(this.tagName) && n.preventDefault(), rm(this))
      return;
    Qe.one(e, lj, () => {
      y_(this) && this.focus();
    });
    const t = Zt.findOne(oj);
    t && t !== e && am.getInstance(t).hide(), am.getOrCreateInstance(e).toggle(this);
  });
  Qe.on(window, uZ, () => {
    for (const n of Zt.find(oj))
      am.getOrCreateInstance(n).show();
  });
  Qe.on(window, gZ, () => {
    for (const n of Zt.find("[aria-modal][class*=show][class*=offcanvas-]"))
      getComputedStyle(n).position !== "fixed" && am.getOrCreateInstance(n).hide();
  });
  $w(am);
  bc(am);
  const SZ = /^aria-[\w-]*$/i, uj = {
    // Global attributes allowed on any supplied element below.
    "*": ["class", "dir", "id", "lang", "role", SZ],
    a: ["target", "href", "title", "rel"],
    area: [],
    b: [],
    br: [],
    col: [],
    code: [],
    div: [],
    em: [],
    hr: [],
    h1: [],
    h2: [],
    h3: [],
    h4: [],
    h5: [],
    h6: [],
    i: [],
    img: ["src", "srcset", "alt", "title", "width", "height"],
    li: [],
    ol: [],
    p: [],
    pre: [],
    s: [],
    small: [],
    span: [],
    sub: [],
    sup: [],
    strong: [],
    u: [],
    ul: []
  }, xZ = /* @__PURE__ */ new Set(["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"]), bZ = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i, wZ = (n, e) => {
    const t = n.nodeName.toLowerCase();
    return e.includes(t) ? xZ.has(t) ? !!bZ.test(n.nodeValue) : !0 : e.filter((i) => i instanceof RegExp).some((i) => i.test(t));
  };
  function CZ(n, e, t) {
    if (!n.length)
      return n;
    if (t && typeof t == "function")
      return t(n);
    const a = new window.DOMParser().parseFromString(n, "text/html"), o = [].concat(...a.body.querySelectorAll("*"));
    for (const u of o) {
      const c = u.nodeName.toLowerCase();
      if (!Object.keys(e).includes(c)) {
        u.remove();
        continue;
      }
      const p = [].concat(...u.attributes), y = [].concat(e["*"] || [], e[c] || []);
      for (const _ of p)
        wZ(_, y) || u.removeAttribute(_.nodeName);
    }
    return a.body.innerHTML;
  }
  const TZ = "TemplateFactory", RZ = {
    allowList: uj,
    content: {},
    // { selector : text ,  selector2 : text2 , }
    extraClass: "",
    html: !1,
    sanitize: !0,
    sanitizeFn: null,
    template: "<div></div>"
  }, MZ = {
    allowList: "object",
    content: "object",
    extraClass: "(string|function)",
    html: "boolean",
    sanitize: "boolean",
    sanitizeFn: "(null|function)",
    template: "string"
  }, OZ = {
    entry: "(string|element|function|null)",
    selector: "(string|element)"
  };
  class AZ extends oS {
    constructor(e) {
      super(), this._config = this._getConfig(e);
    }
    // Getters
    static get Default() {
      return RZ;
    }
    static get DefaultType() {
      return MZ;
    }
    static get NAME() {
      return TZ;
    }
    // Public
    getContent() {
      return Object.values(this._config.content).map((e) => this._resolvePossibleFunction(e)).filter(Boolean);
    }
    hasContent() {
      return this.getContent().length > 0;
    }
    changeContent(e) {
      return this._checkContent(e), this._config.content = {
        ...this._config.content,
        ...e
      }, this;
    }
    toHtml() {
      const e = document.createElement("div");
      e.innerHTML = this._maybeSanitize(this._config.template);
      for (const [a, o] of Object.entries(this._config.content))
        this._setContent(e, o, a);
      const t = e.children[0], i = this._resolvePossibleFunction(this._config.extraClass);
      return i && t.classList.add(...i.split(" ")), t;
    }
    // Private
    _typeCheckConfig(e) {
      super._typeCheckConfig(e), this._checkContent(e.content);
    }
    _checkContent(e) {
      for (const [t, i] of Object.entries(e))
        super._typeCheckConfig({
          selector: t,
          entry: i
        }, OZ);
    }
    _setContent(e, t, i) {
      const a = Zt.findOne(i, e);
      if (a) {
        if (t = this._resolvePossibleFunction(t), !t) {
          a.remove();
          return;
        }
        if (Ep(t)) {
          this._putElementInTemplate(im(t), a);
          return;
        }
        if (this._config.html) {
          a.innerHTML = this._maybeSanitize(t);
          return;
        }
        a.textContent = t;
      }
    }
    _maybeSanitize(e) {
      return this._config.sanitize ? CZ(e, this._config.allowList, this._config.sanitizeFn) : e;
    }
    _resolvePossibleFunction(e) {
      return Dl(e, [this]);
    }
    _putElementInTemplate(e, t) {
      if (this._config.html) {
        t.innerHTML = "", t.append(e);
        return;
      }
      t.textContent = e.textContent;
    }
  }
  const LZ = "tooltip", NZ = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]), mO = "fade", DZ = "modal", _b = "show", IZ = ".tooltip-inner", S3 = `.${DZ}`, x3 = "hide.bs.modal", iE = "hover", vO = "focus", PZ = "click", kZ = "manual", FZ = "hide", jZ = "hidden", UZ = "show", zZ = "shown", $Z = "inserted", BZ = "click", VZ = "focusin", HZ = "focusout", WZ = "mouseenter", GZ = "mouseleave", YZ = {
    AUTO: "auto",
    TOP: "top",
    RIGHT: Sc() ? "left" : "right",
    BOTTOM: "bottom",
    LEFT: Sc() ? "right" : "left"
  }, qZ = {
    allowList: uj,
    animation: !0,
    boundary: "clippingParents",
    container: !1,
    customClass: "",
    delay: 0,
    fallbackPlacements: ["top", "right", "bottom", "left"],
    html: !1,
    offset: [0, 6],
    placement: "top",
    popperConfig: null,
    sanitize: !0,
    sanitizeFn: null,
    selector: !1,
    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
    title: "",
    trigger: "hover focus"
  }, XZ = {
    allowList: "object",
    animation: "boolean",
    boundary: "(string|element)",
    container: "(string|element|boolean)",
    customClass: "(string|function)",
    delay: "(number|object)",
    fallbackPlacements: "array",
    html: "boolean",
    offset: "(array|string|function)",
    placement: "(string|function)",
    popperConfig: "(null|object|function)",
    sanitize: "boolean",
    sanitizeFn: "(null|function)",
    selector: "(string|boolean)",
    template: "string",
    title: "(string|element|function)",
    trigger: "string"
  };
  class E_ extends Mf {
    constructor(e, t) {
      if (typeof k5 > "u")
        throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");
      super(e, t), this._isEnabled = !0, this._timeout = 0, this._isHovered = null, this._activeTrigger = {}, this._popper = null, this._templateFactory = null, this._newContent = null, this.tip = null, this._setListeners(), this._config.selector || this._fixTitle();
    }
    // Getters
    static get Default() {
      return qZ;
    }
    static get DefaultType() {
      return XZ;
    }
    static get NAME() {
      return LZ;
    }
    // Public
    enable() {
      this._isEnabled = !0;
    }
    disable() {
      this._isEnabled = !1;
    }
    toggleEnabled() {
      this._isEnabled = !this._isEnabled;
    }
    toggle() {
      if (this._isEnabled) {
        if (this._activeTrigger.click = !this._activeTrigger.click, this._isShown()) {
          this._leave();
          return;
        }
        this._enter();
      }
    }
    dispose() {
      clearTimeout(this._timeout), Qe.off(this._element.closest(S3), x3, this._hideModalHandler), this._element.getAttribute("data-bs-original-title") && this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")), this._disposePopper(), super.dispose();
    }
    show() {
      if (this._element.style.display === "none")
        throw new Error("Please use show on visible elements");
      if (!(this._isWithContent() && this._isEnabled))
        return;
      const e = Qe.trigger(this._element, this.constructor.eventName(UZ)), i = (U5(this._element) || this._element.ownerDocument.documentElement).contains(this._element);
      if (e.defaultPrevented || !i)
        return;
      this._disposePopper();
      const a = this._getTipElement();
      this._element.setAttribute("aria-describedby", a.getAttribute("id"));
      const {
        container: o
      } = this._config;
      if (this._element.ownerDocument.documentElement.contains(this.tip) || (o.append(a), Qe.trigger(this._element, this.constructor.eventName($Z))), this._popper = this._createPopper(a), a.classList.add(_b), "ontouchstart" in document.documentElement)
        for (const c of [].concat(...document.body.children))
          Qe.on(c, "mouseover", sw);
      const u = () => {
        Qe.trigger(this._element, this.constructor.eventName(zZ)), this._isHovered === !1 && this._leave(), this._isHovered = !1;
      };
      this._queueCallback(u, this.tip, this._isAnimated());
    }
    hide() {
      if (!this._isShown() || Qe.trigger(this._element, this.constructor.eventName(FZ)).defaultPrevented)
        return;
      if (this._getTipElement().classList.remove(_b), "ontouchstart" in document.documentElement)
        for (const a of [].concat(...document.body.children))
          Qe.off(a, "mouseover", sw);
      this._activeTrigger[PZ] = !1, this._activeTrigger[vO] = !1, this._activeTrigger[iE] = !1, this._isHovered = null;
      const i = () => {
        this._isWithActiveTrigger() || (this._isHovered || this._disposePopper(), this._element.removeAttribute("aria-describedby"), Qe.trigger(this._element, this.constructor.eventName(jZ)));
      };
      this._queueCallback(i, this.tip, this._isAnimated());
    }
    update() {
      this._popper && this._popper.update();
    }
    // Protected
    _isWithContent() {
      return !!this._getTitle();
    }
    _getTipElement() {
      return this.tip || (this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())), this.tip;
    }
    _createTipElement(e) {
      const t = this._getTemplateFactory(e).toHtml();
      if (!t)
        return null;
      t.classList.remove(mO, _b), t.classList.add(`bs-${this.constructor.NAME}-auto`);
      const i = Pq(this.constructor.NAME).toString();
      return t.setAttribute("id", i), this._isAnimated() && t.classList.add(mO), t;
    }
    setContent(e) {
      this._newContent = e, this._isShown() && (this._disposePopper(), this.show());
    }
    _getTemplateFactory(e) {
      return this._templateFactory ? this._templateFactory.changeContent(e) : this._templateFactory = new AZ({
        ...this._config,
        // the `content` var has to be after `this._config`
        // to override config.content in case of popover
        content: e,
        extraClass: this._resolvePossibleFunction(this._config.customClass)
      }), this._templateFactory;
    }
    _getContentForTemplate() {
      return {
        [IZ]: this._getTitle()
      };
    }
    _getTitle() {
      return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title");
    }
    // Private
    _initializeOnDelegatedTarget(e) {
      return this.constructor.getOrCreateInstance(e.delegateTarget, this._getDelegateConfig());
    }
    _isAnimated() {
      return this._config.animation || this.tip && this.tip.classList.contains(mO);
    }
    _isShown() {
      return this.tip && this.tip.classList.contains(_b);
    }
    _createPopper(e) {
      const t = Dl(this._config.placement, [this, e, this._element]), i = YZ[t.toUpperCase()];
      return SL(this._element, e, this._getPopperConfig(i));
    }
    _getOffset() {
      const {
        offset: e
      } = this._config;
      return typeof e == "string" ? e.split(",").map((t) => Number.parseInt(t, 10)) : typeof e == "function" ? (t) => e(t, this._element) : e;
    }
    _resolvePossibleFunction(e) {
      return Dl(e, [this._element]);
    }
    _getPopperConfig(e) {
      const t = {
        placement: e,
        modifiers: [{
          name: "flip",
          options: {
            fallbackPlacements: this._config.fallbackPlacements
          }
        }, {
          name: "offset",
          options: {
            offset: this._getOffset()
          }
        }, {
          name: "preventOverflow",
          options: {
            boundary: this._config.boundary
          }
        }, {
          name: "arrow",
          options: {
            element: `.${this.constructor.NAME}-arrow`
          }
        }, {
          name: "preSetPlacement",
          enabled: !0,
          phase: "beforeMain",
          fn: (i) => {
            this._getTipElement().setAttribute("data-popper-placement", i.state.placement);
          }
        }]
      };
      return {
        ...t,
        ...Dl(this._config.popperConfig, [t])
      };
    }
    _setListeners() {
      const e = this._config.trigger.split(" ");
      for (const t of e)
        if (t === "click")
          Qe.on(this._element, this.constructor.eventName(BZ), this._config.selector, (i) => {
            this._initializeOnDelegatedTarget(i).toggle();
          });
        else if (t !== kZ) {
          const i = t === iE ? this.constructor.eventName(WZ) : this.constructor.eventName(VZ), a = t === iE ? this.constructor.eventName(GZ) : this.constructor.eventName(HZ);
          Qe.on(this._element, i, this._config.selector, (o) => {
            const u = this._initializeOnDelegatedTarget(o);
            u._activeTrigger[o.type === "focusin" ? vO : iE] = !0, u._enter();
          }), Qe.on(this._element, a, this._config.selector, (o) => {
            const u = this._initializeOnDelegatedTarget(o);
            u._activeTrigger[o.type === "focusout" ? vO : iE] = u._element.contains(o.relatedTarget), u._leave();
          });
        }
      this._hideModalHandler = () => {
        this._element && this.hide();
      }, Qe.on(this._element.closest(S3), x3, this._hideModalHandler);
    }
    _fixTitle() {
      const e = this._element.getAttribute("title");
      e && (!this._element.getAttribute("aria-label") && !this._element.textContent.trim() && this._element.setAttribute("aria-label", e), this._element.setAttribute("data-bs-original-title", e), this._element.removeAttribute("title"));
    }
    _enter() {
      if (this._isShown() || this._isHovered) {
        this._isHovered = !0;
        return;
      }
      this._isHovered = !0, this._setTimeout(() => {
        this._isHovered && this.show();
      }, this._config.delay.show);
    }
    _leave() {
      this._isWithActiveTrigger() || (this._isHovered = !1, this._setTimeout(() => {
        this._isHovered || this.hide();
      }, this._config.delay.hide));
    }
    _setTimeout(e, t) {
      clearTimeout(this._timeout), this._timeout = setTimeout(e, t);
    }
    _isWithActiveTrigger() {
      return Object.values(this._activeTrigger).includes(!0);
    }
    _getConfig(e) {
      const t = Sp.getDataAttributes(this._element);
      for (const i of Object.keys(t))
        NZ.has(i) && delete t[i];
      return e = {
        ...t,
        ...typeof e == "object" && e ? e : {}
      }, e = this._mergeConfigObj(e), e = this._configAfterMerge(e), this._typeCheckConfig(e), e;
    }
    _configAfterMerge(e) {
      return e.container = e.container === !1 ? document.body : im(e.container), typeof e.delay == "number" && (e.delay = {
        show: e.delay,
        hide: e.delay
      }), typeof e.title == "number" && (e.title = e.title.toString()), typeof e.content == "number" && (e.content = e.content.toString()), e;
    }
    _getDelegateConfig() {
      const e = {};
      for (const [t, i] of Object.entries(this._config))
        this.constructor.Default[t] !== i && (e[t] = i);
      return e.selector = !1, e.trigger = "manual", e;
    }
    _disposePopper() {
      this._popper && (this._popper.destroy(), this._popper = null), this.tip && (this.tip.remove(), this.tip = null);
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = E_.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (typeof t[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
  }
  bc(E_);
  const KZ = "popover", ZZ = ".popover-header", QZ = ".popover-body", JZ = {
    ...E_.Default,
    content: "",
    offset: [0, 8],
    placement: "right",
    template: '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',
    trigger: "click"
  }, eQ = {
    ...E_.DefaultType,
    content: "(null|string|element|function)"
  };
  class Hw extends E_ {
    // Getters
    static get Default() {
      return JZ;
    }
    static get DefaultType() {
      return eQ;
    }
    static get NAME() {
      return KZ;
    }
    // Overrides
    _isWithContent() {
      return this._getTitle() || this._getContent();
    }
    // Private
    _getContentForTemplate() {
      return {
        [ZZ]: this._getTitle(),
        [QZ]: this._getContent()
      };
    }
    _getContent() {
      return this._resolvePossibleFunction(this._config.content);
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = Hw.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (typeof t[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
  }
  bc(Hw);
  const tQ = "scrollspy", nQ = "bs.scrollspy", CL = `.${nQ}`, iQ = ".data-api", rQ = `activate${CL}`, b3 = `click${CL}`, aQ = `load${CL}${iQ}`, sQ = "dropdown-item", x0 = "active", oQ = '[data-bs-spy="scroll"]', yO = "[href]", lQ = ".nav, .list-group", w3 = ".nav-link", uQ = ".nav-item", cQ = ".list-group-item", fQ = `${w3}, ${uQ} > ${w3}, ${cQ}`, hQ = ".dropdown", dQ = ".dropdown-toggle", pQ = {
    offset: null,
    // TODO: v6 @deprecated, keep it for backwards compatibility reasons
    rootMargin: "0px 0px -25%",
    smoothScroll: !1,
    target: null,
    threshold: [0.1, 0.5, 1]
  }, gQ = {
    offset: "(number|null)",
    // TODO v6 @deprecated, keep it for backwards compatibility reasons
    rootMargin: "string",
    smoothScroll: "boolean",
    target: "element",
    threshold: "array"
  };
  class Ww extends Mf {
    constructor(e, t) {
      super(e, t), this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map(), this._rootElement = getComputedStyle(this._element).overflowY === "visible" ? null : this._element, this._activeTarget = null, this._observer = null, this._previousScrollData = {
        visibleEntryTop: 0,
        parentScrollTop: 0
      }, this.refresh();
    }
    // Getters
    static get Default() {
      return pQ;
    }
    static get DefaultType() {
      return gQ;
    }
    static get NAME() {
      return tQ;
    }
    // Public
    refresh() {
      this._initializeTargetsAndObservables(), this._maybeEnableSmoothScroll(), this._observer ? this._observer.disconnect() : this._observer = this._getNewObserver();
      for (const e of this._observableSections.values())
        this._observer.observe(e);
    }
    dispose() {
      this._observer.disconnect(), super.dispose();
    }
    // Private
    _configAfterMerge(e) {
      return e.target = im(e.target) || document.body, e.rootMargin = e.offset ? `${e.offset}px 0px -30%` : e.rootMargin, typeof e.threshold == "string" && (e.threshold = e.threshold.split(",").map((t) => Number.parseFloat(t))), e;
    }
    _maybeEnableSmoothScroll() {
      this._config.smoothScroll && (Qe.off(this._config.target, b3), Qe.on(this._config.target, b3, yO, (e) => {
        const t = this._observableSections.get(e.target.hash);
        if (t) {
          e.preventDefault();
          const i = this._rootElement || window, a = t.offsetTop - this._element.offsetTop;
          if (i.scrollTo) {
            i.scrollTo({
              top: a,
              behavior: "smooth"
            });
            return;
          }
          i.scrollTop = a;
        }
      }));
    }
    _getNewObserver() {
      const e = {
        root: this._rootElement,
        threshold: this._config.threshold,
        rootMargin: this._config.rootMargin
      };
      return new IntersectionObserver((t) => this._observerCallback(t), e);
    }
    // The logic of selection
    _observerCallback(e) {
      const t = (u) => this._targetLinks.get(`#${u.target.id}`), i = (u) => {
        this._previousScrollData.visibleEntryTop = u.target.offsetTop, this._process(t(u));
      }, a = (this._rootElement || document.documentElement).scrollTop, o = a >= this._previousScrollData.parentScrollTop;
      this._previousScrollData.parentScrollTop = a;
      for (const u of e) {
        if (!u.isIntersecting) {
          this._activeTarget = null, this._clearActiveClass(t(u));
          continue;
        }
        const c = u.target.offsetTop >= this._previousScrollData.visibleEntryTop;
        if (o && c) {
          if (i(u), !a)
            return;
          continue;
        }
        !o && !c && i(u);
      }
    }
    _initializeTargetsAndObservables() {
      this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map();
      const e = Zt.find(yO, this._config.target);
      for (const t of e) {
        if (!t.hash || rm(t))
          continue;
        const i = Zt.findOne(decodeURI(t.hash), this._element);
        y_(i) && (this._targetLinks.set(decodeURI(t.hash), t), this._observableSections.set(t.hash, i));
      }
    }
    _process(e) {
      this._activeTarget !== e && (this._clearActiveClass(this._config.target), this._activeTarget = e, e.classList.add(x0), this._activateParents(e), Qe.trigger(this._element, rQ, {
        relatedTarget: e
      }));
    }
    _activateParents(e) {
      if (e.classList.contains(sQ)) {
        Zt.findOne(dQ, e.closest(hQ)).classList.add(x0);
        return;
      }
      for (const t of Zt.parents(e, lQ))
        for (const i of Zt.prev(t, fQ))
          i.classList.add(x0);
    }
    _clearActiveClass(e) {
      e.classList.remove(x0);
      const t = Zt.find(`${yO}.${x0}`, e);
      for (const i of t)
        i.classList.remove(x0);
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = Ww.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (t[e] === void 0 || e.startsWith("_") || e === "constructor")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
  }
  Qe.on(window, aQ, () => {
    for (const n of Zt.find(oQ))
      Ww.getOrCreateInstance(n);
  });
  bc(Ww);
  const mQ = "tab", vQ = "bs.tab", Jv = `.${vQ}`, yQ = `hide${Jv}`, _Q = `hidden${Jv}`, EQ = `show${Jv}`, SQ = `shown${Jv}`, xQ = `click${Jv}`, bQ = `keydown${Jv}`, wQ = `load${Jv}`, CQ = "ArrowLeft", C3 = "ArrowRight", TQ = "ArrowUp", T3 = "ArrowDown", _O = "Home", R3 = "End", Ov = "active", M3 = "fade", EO = "show", RQ = "dropdown", cj = ".dropdown-toggle", MQ = ".dropdown-menu", SO = `:not(${cj})`, OQ = '.list-group, .nav, [role="tablist"]', AQ = ".nav-item, .list-group-item", LQ = `.nav-link${SO}, .list-group-item${SO}, [role="tab"]${SO}`, fj = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', xO = `${LQ}, ${fj}`, NQ = `.${Ov}[data-bs-toggle="tab"], .${Ov}[data-bs-toggle="pill"], .${Ov}[data-bs-toggle="list"]`;
  class a_ extends Mf {
    constructor(e) {
      super(e), this._parent = this._element.closest(OQ), this._parent && (this._setInitialAttributes(this._parent, this._getChildren()), Qe.on(this._element, bQ, (t) => this._keydown(t)));
    }
    // Getters
    static get NAME() {
      return mQ;
    }
    // Public
    show() {
      const e = this._element;
      if (this._elemIsActive(e))
        return;
      const t = this._getActiveElem(), i = t ? Qe.trigger(t, yQ, {
        relatedTarget: e
      }) : null;
      Qe.trigger(e, EQ, {
        relatedTarget: t
      }).defaultPrevented || i && i.defaultPrevented || (this._deactivate(t, e), this._activate(e, t));
    }
    // Private
    _activate(e, t) {
      if (!e)
        return;
      e.classList.add(Ov), this._activate(Zt.getElementFromSelector(e));
      const i = () => {
        if (e.getAttribute("role") !== "tab") {
          e.classList.add(EO);
          return;
        }
        e.removeAttribute("tabindex"), e.setAttribute("aria-selected", !0), this._toggleDropDown(e, !0), Qe.trigger(e, SQ, {
          relatedTarget: t
        });
      };
      this._queueCallback(i, e, e.classList.contains(M3));
    }
    _deactivate(e, t) {
      if (!e)
        return;
      e.classList.remove(Ov), e.blur(), this._deactivate(Zt.getElementFromSelector(e));
      const i = () => {
        if (e.getAttribute("role") !== "tab") {
          e.classList.remove(EO);
          return;
        }
        e.setAttribute("aria-selected", !1), e.setAttribute("tabindex", "-1"), this._toggleDropDown(e, !1), Qe.trigger(e, _Q, {
          relatedTarget: t
        });
      };
      this._queueCallback(i, e, e.classList.contains(M3));
    }
    _keydown(e) {
      if (![CQ, C3, TQ, T3, _O, R3].includes(e.key))
        return;
      e.stopPropagation(), e.preventDefault();
      const t = this._getChildren().filter((a) => !rm(a));
      let i;
      if ([_O, R3].includes(e.key))
        i = t[e.key === _O ? 0 : t.length - 1];
      else {
        const a = [C3, T3].includes(e.key);
        i = xL(t, e.target, a, !0);
      }
      i && (i.focus({
        preventScroll: !0
      }), a_.getOrCreateInstance(i).show());
    }
    _getChildren() {
      return Zt.find(xO, this._parent);
    }
    _getActiveElem() {
      return this._getChildren().find((e) => this._elemIsActive(e)) || null;
    }
    _setInitialAttributes(e, t) {
      this._setAttributeIfNotExists(e, "role", "tablist");
      for (const i of t)
        this._setInitialAttributesOnChild(i);
    }
    _setInitialAttributesOnChild(e) {
      e = this._getInnerElement(e);
      const t = this._elemIsActive(e), i = this._getOuterElement(e);
      e.setAttribute("aria-selected", t), i !== e && this._setAttributeIfNotExists(i, "role", "presentation"), t || e.setAttribute("tabindex", "-1"), this._setAttributeIfNotExists(e, "role", "tab"), this._setInitialAttributesOnTargetPanel(e);
    }
    _setInitialAttributesOnTargetPanel(e) {
      const t = Zt.getElementFromSelector(e);
      t && (this._setAttributeIfNotExists(t, "role", "tabpanel"), e.id && this._setAttributeIfNotExists(t, "aria-labelledby", `${e.id}`));
    }
    _toggleDropDown(e, t) {
      const i = this._getOuterElement(e);
      if (!i.classList.contains(RQ))
        return;
      const a = (o, u) => {
        const c = Zt.findOne(o, i);
        c && c.classList.toggle(u, t);
      };
      a(cj, Ov), a(MQ, EO), i.setAttribute("aria-expanded", t);
    }
    _setAttributeIfNotExists(e, t, i) {
      e.hasAttribute(t) || e.setAttribute(t, i);
    }
    _elemIsActive(e) {
      return e.classList.contains(Ov);
    }
    // Try to get the inner element (usually the .nav-link)
    _getInnerElement(e) {
      return e.matches(xO) ? e : Zt.findOne(xO, e);
    }
    // Try to get the outer element (usually the .nav-item)
    _getOuterElement(e) {
      return e.closest(AQ) || e;
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = a_.getOrCreateInstance(this);
        if (typeof e == "string") {
          if (t[e] === void 0 || e.startsWith("_") || e === "constructor")
            throw new TypeError(`No method named "${e}"`);
          t[e]();
        }
      });
    }
  }
  Qe.on(document, xQ, fj, function(n) {
    ["A", "AREA"].includes(this.tagName) && n.preventDefault(), !rm(this) && a_.getOrCreateInstance(this).show();
  });
  Qe.on(window, wQ, () => {
    for (const n of Zt.find(NQ))
      a_.getOrCreateInstance(n);
  });
  bc(a_);
  const DQ = "toast", IQ = "bs.toast", fm = `.${IQ}`, PQ = `mouseover${fm}`, kQ = `mouseout${fm}`, FQ = `focusin${fm}`, jQ = `focusout${fm}`, UQ = `hide${fm}`, zQ = `hidden${fm}`, $Q = `show${fm}`, BQ = `shown${fm}`, VQ = "fade", O3 = "hide", Eb = "show", Sb = "showing", HQ = {
    animation: "boolean",
    autohide: "boolean",
    delay: "number"
  }, WQ = {
    animation: !0,
    autohide: !0,
    delay: 5e3
  };
  class cS extends Mf {
    constructor(e, t) {
      super(e, t), this._timeout = null, this._hasMouseInteraction = !1, this._hasKeyboardInteraction = !1, this._setListeners();
    }
    // Getters
    static get Default() {
      return WQ;
    }
    static get DefaultType() {
      return HQ;
    }
    static get NAME() {
      return DQ;
    }
    // Public
    show() {
      if (Qe.trigger(this._element, $Q).defaultPrevented)
        return;
      this._clearTimeout(), this._config.animation && this._element.classList.add(VQ);
      const t = () => {
        this._element.classList.remove(Sb), Qe.trigger(this._element, BQ), this._maybeScheduleHide();
      };
      this._element.classList.remove(O3), sS(this._element), this._element.classList.add(Eb, Sb), this._queueCallback(t, this._element, this._config.animation);
    }
    hide() {
      if (!this.isShown() || Qe.trigger(this._element, UQ).defaultPrevented)
        return;
      const t = () => {
        this._element.classList.add(O3), this._element.classList.remove(Sb, Eb), Qe.trigger(this._element, zQ);
      };
      this._element.classList.add(Sb), this._queueCallback(t, this._element, this._config.animation);
    }
    dispose() {
      this._clearTimeout(), this.isShown() && this._element.classList.remove(Eb), super.dispose();
    }
    isShown() {
      return this._element.classList.contains(Eb);
    }
    // Private
    _maybeScheduleHide() {
      this._config.autohide && (this._hasMouseInteraction || this._hasKeyboardInteraction || (this._timeout = setTimeout(() => {
        this.hide();
      }, this._config.delay)));
    }
    _onInteraction(e, t) {
      switch (e.type) {
        case "mouseover":
        case "mouseout": {
          this._hasMouseInteraction = t;
          break;
        }
        case "focusin":
        case "focusout": {
          this._hasKeyboardInteraction = t;
          break;
        }
      }
      if (t) {
        this._clearTimeout();
        return;
      }
      const i = e.relatedTarget;
      this._element === i || this._element.contains(i) || this._maybeScheduleHide();
    }
    _setListeners() {
      Qe.on(this._element, PQ, (e) => this._onInteraction(e, !0)), Qe.on(this._element, kQ, (e) => this._onInteraction(e, !1)), Qe.on(this._element, FQ, (e) => this._onInteraction(e, !0)), Qe.on(this._element, jQ, (e) => this._onInteraction(e, !1));
    }
    _clearTimeout() {
      clearTimeout(this._timeout), this._timeout = null;
    }
    // Static
    static jQueryInterface(e) {
      return this.each(function() {
        const t = cS.getOrCreateInstance(this, e);
        if (typeof e == "string") {
          if (typeof t[e] > "u")
            throw new TypeError(`No method named "${e}"`);
          t[e](this);
        }
      });
    }
  }
  $w(cS);
  bc(cS);
  const pa = function(n, e, t) {
    if (qt.isArray(n) && n.length > 0) {
      let i = null;
      for (let a = 0; a < n.length; a++) {
        if (n[a].Language === e)
          return n[a].Text;
        n[a].Language === t && (i = n[a].Text);
      }
      return i || n[0].Text;
    }
    return null;
  }, A3 = function(n, e, t) {
    if (qt.isArray(n) && n.length > 0) {
      let i = null;
      for (let a = 0; a < n.length; a++) {
        if (n[a].Language === e)
          return n[a].URL;
        n[a].Language === t && (i = n[a].URL);
      }
      return i || n[0].URL;
    }
    return null;
  };
  class GQ {
    /**
     * @param {string} type Type.
     */
    constructor(e) {
      this.propagationStopped, this.defaultPrevented, this.type = e, this.target = null;
    }
    /**
     * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events
     * will be fired.
     * @api
     */
    preventDefault() {
      this.defaultPrevented = !0;
    }
    /**
     * Stop event propagation.
     * @api
     */
    stopPropagation() {
      this.propagationStopped = !0;
    }
  }
  const Xh = GQ, s_ = {
    /**
     * Triggered when a property is changed.
     * @event module:ol/Object.ObjectEvent#propertychange
     * @api
     */
    PROPERTYCHANGE: "propertychange"
  };
  class YQ {
    constructor() {
      this.disposed = !1;
    }
    /**
     * Clean up.
     */
    dispose() {
      this.disposed || (this.disposed = !0, this.disposeInternal());
    }
    /**
     * Extension point for disposable objects.
     * @protected
     */
    disposeInternal() {
    }
  }
  const TL = YQ;
  function qQ(n, e, t) {
    let i, a;
    t = t || sm;
    let o = 0, u = n.length, c = !1;
    for (; o < u; )
      i = o + (u - o >> 1), a = +t(n[i], e), a < 0 ? o = i + 1 : (u = i, c = !a);
    return c ? o : ~o;
  }
  function sm(n, e) {
    return n > e ? 1 : n < e ? -1 : 0;
  }
  function Gw(n, e, t) {
    if (n[0] <= e)
      return 0;
    const i = n.length;
    if (e <= n[i - 1])
      return i - 1;
    if (typeof t == "function") {
      for (let a = 1; a < i; ++a) {
        const o = n[a];
        if (o === e)
          return a;
        if (o < e)
          return t(e, n[a - 1], o) > 0 ? a - 1 : a;
      }
      return i - 1;
    }
    if (t > 0) {
      for (let a = 1; a < i; ++a)
        if (n[a] < e)
          return a - 1;
      return i - 1;
    }
    if (t < 0) {
      for (let a = 1; a < i; ++a)
        if (n[a] <= e)
          return a;
      return i - 1;
    }
    for (let a = 1; a < i; ++a) {
      if (n[a] == e)
        return a;
      if (n[a] < e)
        return n[a - 1] - e < e - n[a] ? a - 1 : a;
    }
    return i - 1;
  }
  function XQ(n, e, t) {
    for (; e < t; ) {
      const i = n[e];
      n[e] = n[t], n[t] = i, ++e, --t;
    }
  }
  function o_(n, e) {
    const t = Array.isArray(e) ? e : [e], i = t.length;
    for (let a = 0; a < i; a++)
      n[n.length] = t[a];
  }
  function hm(n, e) {
    const t = n.length;
    if (t !== e.length)
      return !1;
    for (let i = 0; i < t; i++)
      if (n[i] !== e[i])
        return !1;
    return !0;
  }
  function KQ(n, e, t) {
    const i = e || sm;
    return n.every(function(a, o) {
      if (o === 0)
        return !0;
      const u = i(n[o - 1], a);
      return !(u > 0 || t && u === 0);
    });
  }
  function FE() {
    return !0;
  }
  function Yw() {
    return !1;
  }
  function l_() {
  }
  function hj(n) {
    let e = !1, t, i, a;
    return function() {
      const o = Array.prototype.slice.call(arguments);
      return (!e || this !== a || !hm(o, i)) && (e = !0, a = this, i = o, t = n.apply(this, arguments)), t;
    };
  }
  function ZQ(n) {
    function e() {
      let t;
      try {
        t = n();
      } catch (i) {
        return Promise.reject(i);
      }
      return t instanceof Promise ? t : Promise.resolve(t);
    }
    return e();
  }
  class QQ extends TL {
    /**
     * @param {*} [target] Default event target for dispatched events.
     */
    constructor(e) {
      super(), this.eventTarget_ = e, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null;
    }
    /**
     * @param {string} type Type.
     * @param {import("../events.js").Listener} listener Listener.
     */
    addEventListener(e, t) {
      if (!e || !t)
        return;
      const i = this.listeners_ || (this.listeners_ = {}), a = i[e] || (i[e] = []);
      a.includes(t) || a.push(t);
    }
    /**
     * Dispatches an event and calls all listeners listening for events
     * of this type. The event parameter can either be a string or an
     * Object with a `type` property.
     *
     * @param {import("./Event.js").default|string} event Event object.
     * @return {boolean|undefined} `false` if anyone called preventDefault on the
     *     event object or if any of the listeners returned false.
     * @api
     */
    dispatchEvent(e) {
      const t = typeof e == "string", i = t ? e : e.type, a = this.listeners_ && this.listeners_[i];
      if (!a)
        return;
      const o = t ? new Xh(e) : (
        /** @type {Event} */
        e
      );
      o.target || (o.target = this.eventTarget_ || this);
      const u = this.dispatching_ || (this.dispatching_ = {}), c = this.pendingRemovals_ || (this.pendingRemovals_ = {});
      i in u || (u[i] = 0, c[i] = 0), ++u[i];
      let p;
      for (let y = 0, _ = a.length; y < _; ++y)
        if ("handleEvent" in a[y] ? p = /** @type {import("../events.js").ListenerObject} */
        a[y].handleEvent(o) : p = /** @type {import("../events.js").ListenerFunction} */
        a[y].call(this, o), p === !1 || o.propagationStopped) {
          p = !1;
          break;
        }
      if (--u[i] === 0) {
        let y = c[i];
        for (delete c[i]; y--; )
          this.removeEventListener(i, l_);
        delete u[i];
      }
      return p;
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.listeners_ && XE(this.listeners_);
    }
    /**
     * Get the listeners for a specified event type. Listeners are returned in the
     * order that they will be called in.
     *
     * @param {string} type Type.
     * @return {Array<import("../events.js").Listener>|undefined} Listeners.
     */
    getListeners(e) {
      return this.listeners_ && this.listeners_[e] || void 0;
    }
    /**
     * @param {string} [type] Type. If not provided,
     *     `true` will be returned if this event target has any listeners.
     * @return {boolean} Has listeners.
     */
    hasListener(e) {
      return this.listeners_ ? e ? e in this.listeners_ : Object.keys(this.listeners_).length > 0 : !1;
    }
    /**
     * @param {string} type Type.
     * @param {import("../events.js").Listener} listener Listener.
     */
    removeEventListener(e, t) {
      if (!this.listeners_)
        return;
      const i = this.listeners_[e];
      if (!i)
        return;
      const a = i.indexOf(t);
      a !== -1 && (this.pendingRemovals_ && e in this.pendingRemovals_ ? (i[a] = l_, ++this.pendingRemovals_[e]) : (i.splice(a, 1), i.length === 0 && delete this.listeners_[e]));
    }
  }
  const fS = QQ, Cn = {
    /**
     * Generic change event. Triggered when the revision counter is increased.
     * @event module:ol/events/Event~BaseEvent#change
     * @api
     */
    CHANGE: "change",
    /**
     * Generic error event. Triggered when an error occurs.
     * @event module:ol/events/Event~BaseEvent#error
     * @api
     */
    ERROR: "error",
    BLUR: "blur",
    CLEAR: "clear",
    CONTEXTMENU: "contextmenu",
    CLICK: "click",
    DBLCLICK: "dblclick",
    DRAGENTER: "dragenter",
    DRAGOVER: "dragover",
    DROP: "drop",
    FOCUS: "focus",
    KEYDOWN: "keydown",
    KEYPRESS: "keypress",
    LOAD: "load",
    RESIZE: "resize",
    TOUCHMOVE: "touchmove",
    WHEEL: "wheel"
  };
  function di(n, e, t, i, a) {
    if (i && i !== n && (t = t.bind(i)), a) {
      const u = t;
      t = function() {
        n.removeEventListener(e, t), u.apply(this, arguments);
      };
    }
    const o = {
      target: n,
      type: e,
      listener: t
    };
    return n.addEventListener(e, t), o;
  }
  function uw(n, e, t, i) {
    return di(n, e, t, i, !0);
  }
  function Or(n) {
    n && n.target && (n.target.removeEventListener(n.type, n.listener), XE(n));
  }
  class qw extends fS {
    constructor() {
      super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
      this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
      this.onceInternal, this.un = /** @type {ObservableOnSignature<void>} */
      this.unInternal, this.revision_ = 0;
    }
    /**
     * Increases the revision counter and dispatches a 'change' event.
     * @api
     */
    changed() {
      ++this.revision_, this.dispatchEvent(Cn.CHANGE);
    }
    /**
     * Get the version number for this object.  Each time the object is modified,
     * its version number will be incremented.
     * @return {number} Revision.
     * @api
     */
    getRevision() {
      return this.revision_;
    }
    /**
     * @param {string|Array<string>} type Type.
     * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
     * @return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Event key.
     * @protected
     */
    onInternal(e, t) {
      if (Array.isArray(e)) {
        const i = e.length, a = new Array(i);
        for (let o = 0; o < i; ++o)
          a[o] = di(this, e[o], t);
        return a;
      }
      return di(
        this,
        /** @type {string} */
        e,
        t
      );
    }
    /**
     * @param {string|Array<string>} type Type.
     * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
     * @return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Event key.
     * @protected
     */
    onceInternal(e, t) {
      let i;
      if (Array.isArray(e)) {
        const a = e.length;
        i = new Array(a);
        for (let o = 0; o < a; ++o)
          i[o] = uw(this, e[o], t);
      } else
        i = uw(
          this,
          /** @type {string} */
          e,
          t
        );
      return t.ol_key = i, i;
    }
    /**
     * Unlisten for a certain type of event.
     * @param {string|Array<string>} type Type.
     * @param {function((Event|import("./events/Event").default)): ?} listener Listener.
     * @protected
     */
    unInternal(e, t) {
      const i = (
        /** @type {Object} */
        t.ol_key
      );
      if (i)
        JQ(i);
      else if (Array.isArray(e))
        for (let a = 0, o = e.length; a < o; ++a)
          this.removeEventListener(e[a], t);
      else
        this.removeEventListener(e, t);
    }
  }
  qw.prototype.on;
  qw.prototype.once;
  qw.prototype.un;
  function JQ(n) {
    if (Array.isArray(n))
      for (let e = 0, t = n.length; e < t; ++e)
        Or(n[e]);
    else
      Or(
        /** @type {import("./events.js").EventsKey} */
        n
      );
  }
  const dj = qw;
  function yi() {
    throw new Error("Unimplemented abstract method.");
  }
  let eJ = 0;
  function Pi(n) {
    return n.ol_uid || (n.ol_uid = String(++eJ));
  }
  class L3 extends Xh {
    /**
     * @param {string} type The event type.
     * @param {string} key The property name.
     * @param {*} oldValue The old value for `key`.
     */
    constructor(e, t, i) {
      super(e), this.key = t, this.oldValue = i;
    }
  }
  class tJ extends dj {
    /**
     * @param {Object<string, *>} [values] An object with key-value pairs.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, Pi(this), this.values_ = null, e !== void 0 && this.setProperties(e);
    }
    /**
     * Gets a value.
     * @param {string} key Key name.
     * @return {*} Value.
     * @api
     */
    get(e) {
      let t;
      return this.values_ && this.values_.hasOwnProperty(e) && (t = this.values_[e]), t;
    }
    /**
     * Get a list of object property names.
     * @return {Array<string>} List of property names.
     * @api
     */
    getKeys() {
      return this.values_ && Object.keys(this.values_) || [];
    }
    /**
     * Get an object of all property names and values.
     * @return {Object<string, *>} Object.
     * @api
     */
    getProperties() {
      return this.values_ && Object.assign({}, this.values_) || {};
    }
    /**
     * Get an object of all property names and values.
     * @return {Object<string, *>?} Object.
     */
    getPropertiesInternal() {
      return this.values_;
    }
    /**
     * @return {boolean} The object has properties.
     */
    hasProperties() {
      return !!this.values_;
    }
    /**
     * @param {string} key Key name.
     * @param {*} oldValue Old value.
     */
    notify(e, t) {
      let i;
      i = `change:${e}`, this.hasListener(i) && this.dispatchEvent(new L3(i, e, t)), i = s_.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new L3(i, e, t));
    }
    /**
     * @param {string} key Key name.
     * @param {import("./events.js").Listener} listener Listener.
     */
    addChangeListener(e, t) {
      this.addEventListener(`change:${e}`, t);
    }
    /**
     * @param {string} key Key name.
     * @param {import("./events.js").Listener} listener Listener.
     */
    removeChangeListener(e, t) {
      this.removeEventListener(`change:${e}`, t);
    }
    /**
     * Sets a value.
     * @param {string} key Key name.
     * @param {*} value Value.
     * @param {boolean} [silent] Update without triggering an event.
     * @api
     */
    set(e, t, i) {
      const a = this.values_ || (this.values_ = {});
      if (i)
        a[e] = t;
      else {
        const o = a[e];
        a[e] = t, o !== t && this.notify(e, o);
      }
    }
    /**
     * Sets a collection of key-value pairs.  Note that this changes any existing
     * properties and adds new ones (it does not remove any existing properties).
     * @param {Object<string, *>} values Values.
     * @param {boolean} [silent] Update without triggering an event.
     * @api
     */
    setProperties(e, t) {
      for (const i in e)
        this.set(i, e[i], t);
    }
    /**
     * Apply any properties from another object without triggering events.
     * @param {BaseObject} source The source object.
     * @protected
     */
    applyProperties(e) {
      e.values_ && Object.assign(this.values_ || (this.values_ = {}), e.values_);
    }
    /**
     * Unsets a property.
     * @param {string} key Key name.
     * @param {boolean} [silent] Unset without triggering an event.
     * @api
     */
    unset(e, t) {
      if (this.values_ && e in this.values_) {
        const i = this.values_[e];
        delete this.values_[e], q0(this.values_) && (this.values_ = null), t || this.notify(e, i);
      }
    }
  }
  const Of = tJ, nr = {
    OPACITY: "opacity",
    VISIBLE: "visible",
    EXTENT: "extent",
    Z_INDEX: "zIndex",
    MAX_RESOLUTION: "maxResolution",
    MIN_RESOLUTION: "minResolution",
    MAX_ZOOM: "maxZoom",
    MIN_ZOOM: "minZoom",
    SOURCE: "source",
    MAP: "map"
  };
  function Ei(n, e) {
    if (!n)
      throw new Error(e);
  }
  class nJ extends Of {
    /**
     * @param {Options} options Layer options.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, this.background_ = e.background;
      const t = Object.assign({}, e);
      typeof e.properties == "object" && (delete t.properties, Object.assign(t, e.properties)), t[nr.OPACITY] = e.opacity !== void 0 ? e.opacity : 1, Ei(
        typeof t[nr.OPACITY] == "number",
        "Layer opacity must be a number"
      ), t[nr.VISIBLE] = e.visible !== void 0 ? e.visible : !0, t[nr.Z_INDEX] = e.zIndex, t[nr.MAX_RESOLUTION] = e.maxResolution !== void 0 ? e.maxResolution : 1 / 0, t[nr.MIN_RESOLUTION] = e.minResolution !== void 0 ? e.minResolution : 0, t[nr.MIN_ZOOM] = e.minZoom !== void 0 ? e.minZoom : -1 / 0, t[nr.MAX_ZOOM] = e.maxZoom !== void 0 ? e.maxZoom : 1 / 0, this.className_ = t.className !== void 0 ? t.className : "ol-layer", delete t.className, this.setProperties(t), this.state_ = null;
    }
    /**
     * Get the background for this layer.
     * @return {BackgroundColor|false} Layer background.
     */
    getBackground() {
      return this.background_;
    }
    /**
     * @return {string} CSS class name.
     */
    getClassName() {
      return this.className_;
    }
    /**
     * This method is not meant to be called by layers or layer renderers because the state
     * is incorrect if the layer is included in a layer group.
     *
     * @param {boolean} [managed] Layer is managed.
     * @return {import("./Layer.js").State} Layer state.
     */
    getLayerState(e) {
      const t = this.state_ || /** @type {?} */
      {
        layer: this,
        managed: e === void 0 ? !0 : e
      }, i = this.getZIndex();
      return t.opacity = da(Math.round(this.getOpacity() * 100) / 100, 0, 1), t.visible = this.getVisible(), t.extent = this.getExtent(), t.zIndex = i === void 0 && !t.managed ? 1 / 0 : i, t.maxResolution = this.getMaxResolution(), t.minResolution = Math.max(this.getMinResolution(), 0), t.minZoom = this.getMinZoom(), t.maxZoom = this.getMaxZoom(), this.state_ = t, t;
    }
    /**
     * @abstract
     * @param {Array<import("./Layer.js").default>} [array] Array of layers (to be
     *     modified in place).
     * @return {Array<import("./Layer.js").default>} Array of layers.
     */
    getLayersArray(e) {
      return yi();
    }
    /**
     * @abstract
     * @param {Array<import("./Layer.js").State>} [states] Optional list of layer
     *     states (to be modified in place).
     * @return {Array<import("./Layer.js").State>} List of layer states.
     */
    getLayerStatesArray(e) {
      return yi();
    }
    /**
     * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it
     * will be visible regardless of extent.
     * @return {import("../extent.js").Extent|undefined} The layer extent.
     * @observable
     * @api
     */
    getExtent() {
      return (
        /** @type {import("../extent.js").Extent|undefined} */
        this.get(nr.EXTENT)
      );
    }
    /**
     * Return the maximum resolution of the layer. Returns Infinity if
     * the layer has no maximum resolution set.
     * @return {number} The maximum resolution of the layer.
     * @observable
     * @api
     */
    getMaxResolution() {
      return (
        /** @type {number} */
        this.get(nr.MAX_RESOLUTION)
      );
    }
    /**
     * Return the minimum resolution of the layer. Returns 0 if
     * the layer has no minimum resolution set.
     * @return {number} The minimum resolution of the layer.
     * @observable
     * @api
     */
    getMinResolution() {
      return (
        /** @type {number} */
        this.get(nr.MIN_RESOLUTION)
      );
    }
    /**
     * Return the minimum zoom level of the layer. Returns -Infinity if
     * the layer has no minimum zoom set.
     * @return {number} The minimum zoom level of the layer.
     * @observable
     * @api
     */
    getMinZoom() {
      return (
        /** @type {number} */
        this.get(nr.MIN_ZOOM)
      );
    }
    /**
     * Return the maximum zoom level of the layer. Returns Infinity if
     * the layer has no maximum zoom set.
     * @return {number} The maximum zoom level of the layer.
     * @observable
     * @api
     */
    getMaxZoom() {
      return (
        /** @type {number} */
        this.get(nr.MAX_ZOOM)
      );
    }
    /**
     * Return the opacity of the layer (between 0 and 1).
     * @return {number} The opacity of the layer.
     * @observable
     * @api
     */
    getOpacity() {
      return (
        /** @type {number} */
        this.get(nr.OPACITY)
      );
    }
    /**
     * @abstract
     * @return {import("../source/Source.js").State} Source state.
     */
    getSourceState() {
      return yi();
    }
    /**
     * Return the value of this layer's `visible` property. To find out whether the layer
     * is visible on a map, use `isVisible()` instead.
     * @return {boolean} The value of the `visible` property of the layer.
     * @observable
     * @api
     */
    getVisible() {
      return (
        /** @type {boolean} */
        this.get(nr.VISIBLE)
      );
    }
    /**
     * Return the Z-index of the layer, which is used to order layers before
     * rendering. Returns undefined if the layer is unmanaged.
     * @return {number|undefined} The Z-index of the layer.
     * @observable
     * @api
     */
    getZIndex() {
      return (
        /** @type {number|undefined} */
        this.get(nr.Z_INDEX)
      );
    }
    /**
     * Sets the background color.
     * @param {BackgroundColor} [background] Background color.
     */
    setBackground(e) {
      this.background_ = e, this.changed();
    }
    /**
     * Set the extent at which the layer is visible.  If `undefined`, the layer
     * will be visible at all extents.
     * @param {import("../extent.js").Extent|undefined} extent The extent of the layer.
     * @observable
     * @api
     */
    setExtent(e) {
      this.set(nr.EXTENT, e);
    }
    /**
     * Set the maximum resolution at which the layer is visible.
     * @param {number} maxResolution The maximum resolution of the layer.
     * @observable
     * @api
     */
    setMaxResolution(e) {
      this.set(nr.MAX_RESOLUTION, e);
    }
    /**
     * Set the minimum resolution at which the layer is visible.
     * @param {number} minResolution The minimum resolution of the layer.
     * @observable
     * @api
     */
    setMinResolution(e) {
      this.set(nr.MIN_RESOLUTION, e);
    }
    /**
     * Set the maximum zoom (exclusive) at which the layer is visible.
     * Note that the zoom levels for layer visibility are based on the
     * view zoom level, which may be different from a tile source zoom level.
     * @param {number} maxZoom The maximum zoom of the layer.
     * @observable
     * @api
     */
    setMaxZoom(e) {
      this.set(nr.MAX_ZOOM, e);
    }
    /**
     * Set the minimum zoom (inclusive) at which the layer is visible.
     * Note that the zoom levels for layer visibility are based on the
     * view zoom level, which may be different from a tile source zoom level.
     * @param {number} minZoom The minimum zoom of the layer.
     * @observable
     * @api
     */
    setMinZoom(e) {
      this.set(nr.MIN_ZOOM, e);
    }
    /**
     * Set the opacity of the layer, allowed values range from 0 to 1.
     * @param {number} opacity The opacity of the layer.
     * @observable
     * @api
     */
    setOpacity(e) {
      Ei(typeof e == "number", "Layer opacity must be a number"), this.set(nr.OPACITY, e);
    }
    /**
     * Set the visibility of the layer (`true` or `false`).
     * @param {boolean} visible The visibility of the layer.
     * @observable
     * @api
     */
    setVisible(e) {
      this.set(nr.VISIBLE, e);
    }
    /**
     * Set Z-index of the layer, which is used to order layers before rendering.
     * The default Z-index is 0.
     * @param {number} zindex The z-index of the layer.
     * @observable
     * @api
     */
    setZIndex(e) {
      this.set(nr.Z_INDEX, e);
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.state_ && (this.state_.layer = null, this.state_ = null), super.disposeInternal();
    }
  }
  const RL = nJ, Al = {
    /**
     * Triggered when an item is added to the collection.
     * @event module:ol/Collection.CollectionEvent#add
     * @api
     */
    ADD: "add",
    /**
     * Triggered when an item is removed from the collection.
     * @event module:ol/Collection.CollectionEvent#remove
     * @api
     */
    REMOVE: "remove"
  }, N3 = {
    LENGTH: "length"
  };
  class xb extends Xh {
    /**
     * @param {import("./CollectionEventType.js").default} type Type.
     * @param {T} element Element.
     * @param {number} index The index of the added or removed element.
     */
    constructor(e, t, i) {
      super(e), this.element = t, this.index = i;
    }
  }
  class iJ extends Of {
    /**
     * @param {Array<T>} [array] Array.
     * @param {Options} [options] Collection options.
     */
    constructor(e, t) {
      if (super(), this.on, this.once, this.un, t = t || {}, this.unique_ = !!t.unique, this.array_ = e || [], this.unique_)
        for (let i = 0, a = this.array_.length; i < a; ++i)
          this.assertUnique_(this.array_[i], i);
      this.updateLength_();
    }
    /**
     * Remove all elements from the collection.
     * @api
     */
    clear() {
      for (; this.getLength() > 0; )
        this.pop();
    }
    /**
     * Add elements to the collection.  This pushes each item in the provided array
     * to the end of the collection.
     * @param {!Array<T>} arr Array.
     * @return {Collection<T>} This collection.
     * @api
     */
    extend(e) {
      for (let t = 0, i = e.length; t < i; ++t)
        this.push(e[t]);
      return this;
    }
    /**
     * Iterate over each element, calling the provided callback.
     * @param {function(T, number, Array<T>): *} f The function to call
     *     for every element. This function takes 3 arguments (the element, the
     *     index and the array). The return value is ignored.
     * @api
     */
    forEach(e) {
      const t = this.array_;
      for (let i = 0, a = t.length; i < a; ++i)
        e(t[i], i, t);
    }
    /**
     * Get a reference to the underlying Array object. Warning: if the array
     * is mutated, no events will be dispatched by the collection, and the
     * collection's "length" property won't be in sync with the actual length
     * of the array.
     * @return {!Array<T>} Array.
     * @api
     */
    getArray() {
      return this.array_;
    }
    /**
     * Get the element at the provided index.
     * @param {number} index Index.
     * @return {T} Element.
     * @api
     */
    item(e) {
      return this.array_[e];
    }
    /**
     * Get the length of this collection.
     * @return {number} The length of the array.
     * @observable
     * @api
     */
    getLength() {
      return this.get(N3.LENGTH);
    }
    /**
     * Insert an element at the provided index.
     * @param {number} index Index.
     * @param {T} elem Element.
     * @api
     */
    insertAt(e, t) {
      if (e < 0 || e > this.getLength())
        throw new Error("Index out of bounds: " + e);
      this.unique_ && this.assertUnique_(t), this.array_.splice(e, 0, t), this.updateLength_(), this.dispatchEvent(
        new xb(Al.ADD, t, e)
      );
    }
    /**
     * Remove the last element of the collection and return it.
     * Return `undefined` if the collection is empty.
     * @return {T|undefined} Element.
     * @api
     */
    pop() {
      return this.removeAt(this.getLength() - 1);
    }
    /**
     * Insert the provided element at the end of the collection.
     * @param {T} elem Element.
     * @return {number} New length of the collection.
     * @api
     */
    push(e) {
      this.unique_ && this.assertUnique_(e);
      const t = this.getLength();
      return this.insertAt(t, e), this.getLength();
    }
    /**
     * Remove the first occurrence of an element from the collection.
     * @param {T} elem Element.
     * @return {T|undefined} The removed element or undefined if none found.
     * @api
     */
    remove(e) {
      const t = this.array_;
      for (let i = 0, a = t.length; i < a; ++i)
        if (t[i] === e)
          return this.removeAt(i);
    }
    /**
     * Remove the element at the provided index and return it.
     * Return `undefined` if the collection does not contain this index.
     * @param {number} index Index.
     * @return {T|undefined} Value.
     * @api
     */
    removeAt(e) {
      if (e < 0 || e >= this.getLength())
        return;
      const t = this.array_[e];
      return this.array_.splice(e, 1), this.updateLength_(), this.dispatchEvent(
        /** @type {CollectionEvent<T>} */
        new xb(Al.REMOVE, t, e)
      ), t;
    }
    /**
     * Set the element at the provided index.
     * @param {number} index Index.
     * @param {T} elem Element.
     * @api
     */
    setAt(e, t) {
      const i = this.getLength();
      if (e >= i) {
        this.insertAt(e, t);
        return;
      }
      if (e < 0)
        throw new Error("Index out of bounds: " + e);
      this.unique_ && this.assertUnique_(t, e);
      const a = this.array_[e];
      this.array_[e] = t, this.dispatchEvent(
        /** @type {CollectionEvent<T>} */
        new xb(Al.REMOVE, a, e)
      ), this.dispatchEvent(
        /** @type {CollectionEvent<T>} */
        new xb(Al.ADD, t, e)
      );
    }
    /**
     * @private
     */
    updateLength_() {
      this.set(N3.LENGTH, this.array_.length);
    }
    /**
     * @private
     * @param {T} elem Element.
     * @param {number} [except] Optional index to ignore.
     */
    assertUnique_(e, t) {
      for (let i = 0, a = this.array_.length; i < a; ++i)
        if (this.array_[i] === e && i !== t)
          throw new Error("Duplicate item added to a unique collection");
    }
  }
  const bf = iJ;
  class Hg extends Xh {
    /**
     * @param {EventType} type The event type.
     * @param {BaseLayer} layer The layer.
     */
    constructor(e, t) {
      super(e), this.layer = t;
    }
  }
  const bO = {
    LAYERS: "layers"
  };
  class ML extends RL {
    /**
     * @param {Options} [options] Layer options.
     */
    constructor(e) {
      e = e || {};
      const t = (
        /** @type {Options} */
        Object.assign({}, e)
      );
      delete t.layers;
      let i = e.layers;
      super(t), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(bO.LAYERS, this.handleLayersChanged_), i ? Array.isArray(i) ? i = new bf(i.slice(), { unique: !0 }) : Ei(
        typeof /** @type {?} */
        i.getArray == "function",
        "Expected `layers` to be an array or a `Collection`"
      ) : i = new bf(void 0, { unique: !0 }), this.setLayers(i);
    }
    /**
     * @private
     */
    handleLayerChange_() {
      this.changed();
    }
    /**
     * @private
     */
    handleLayersChanged_() {
      this.layersListenerKeys_.forEach(Or), this.layersListenerKeys_.length = 0;
      const e = this.getLayers();
      this.layersListenerKeys_.push(
        di(e, Al.ADD, this.handleLayersAdd_, this),
        di(e, Al.REMOVE, this.handleLayersRemove_, this)
      );
      for (const i in this.listenerKeys_)
        this.listenerKeys_[i].forEach(Or);
      XE(this.listenerKeys_);
      const t = e.getArray();
      for (let i = 0, a = t.length; i < a; i++) {
        const o = t[i];
        this.registerLayerListeners_(o), this.dispatchEvent(new Hg("addlayer", o));
      }
      this.changed();
    }
    /**
     * @param {BaseLayer} layer The layer.
     */
    registerLayerListeners_(e) {
      const t = [
        di(
          e,
          s_.PROPERTYCHANGE,
          this.handleLayerChange_,
          this
        ),
        di(e, Cn.CHANGE, this.handleLayerChange_, this)
      ];
      e instanceof ML && t.push(
        di(e, "addlayer", this.handleLayerGroupAdd_, this),
        di(e, "removelayer", this.handleLayerGroupRemove_, this)
      ), this.listenerKeys_[Pi(e)] = t;
    }
    /**
     * @param {GroupEvent} event The layer group event.
     */
    handleLayerGroupAdd_(e) {
      this.dispatchEvent(new Hg("addlayer", e.layer));
    }
    /**
     * @param {GroupEvent} event The layer group event.
     */
    handleLayerGroupRemove_(e) {
      this.dispatchEvent(new Hg("removelayer", e.layer));
    }
    /**
     * @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
     * @private
     */
    handleLayersAdd_(e) {
      const t = e.element;
      this.registerLayerListeners_(t), this.dispatchEvent(new Hg("addlayer", t)), this.changed();
    }
    /**
     * @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
     * @private
     */
    handleLayersRemove_(e) {
      const t = e.element, i = Pi(t);
      this.listenerKeys_[i].forEach(Or), delete this.listenerKeys_[i], this.dispatchEvent(new Hg("removelayer", t)), this.changed();
    }
    /**
     * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
     * in this group.
     * @return {!Collection<import("./Base.js").default>} Collection of
     *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
     * @observable
     * @api
     */
    getLayers() {
      return (
        /** @type {!Collection<import("./Base.js").default>} */
        this.get(bO.LAYERS)
      );
    }
    /**
     * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
     * in this group.
     * @param {!Collection<import("./Base.js").default>} layers Collection of
     *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
     * @observable
     * @api
     */
    setLayers(e) {
      const t = this.getLayers();
      if (t) {
        const i = t.getArray();
        for (let a = 0, o = i.length; a < o; ++a)
          this.dispatchEvent(new Hg("removelayer", i[a]));
      }
      this.set(bO.LAYERS, e);
    }
    /**
     * @param {Array<import("./Layer.js").default>} [array] Array of layers (to be modified in place).
     * @return {Array<import("./Layer.js").default>} Array of layers.
     */
    getLayersArray(e) {
      return e = e !== void 0 ? e : [], this.getLayers().forEach(function(t) {
        t.getLayersArray(e);
      }), e;
    }
    /**
     * Get the layer states list and use this groups z-index as the default
     * for all layers in this and nested groups, if it is unset at this point.
     * If dest is not provided and this group's z-index is undefined
     * 0 is used a the default z-index.
     * @param {Array<import("./Layer.js").State>} [dest] Optional list
     * of layer states (to be modified in place).
     * @return {Array<import("./Layer.js").State>} List of layer states.
     */
    getLayerStatesArray(e) {
      const t = e !== void 0 ? e : [], i = t.length;
      this.getLayers().forEach(function(u) {
        u.getLayerStatesArray(t);
      });
      const a = this.getLayerState();
      let o = a.zIndex;
      !e && a.zIndex === void 0 && (o = 0);
      for (let u = i, c = t.length; u < c; u++) {
        const p = t[u];
        p.opacity *= a.opacity, p.visible = p.visible && a.visible, p.maxResolution = Math.min(
          p.maxResolution,
          a.maxResolution
        ), p.minResolution = Math.max(
          p.minResolution,
          a.minResolution
        ), p.minZoom = Math.max(p.minZoom, a.minZoom), p.maxZoom = Math.min(p.maxZoom, a.maxZoom), a.extent !== void 0 && (p.extent !== void 0 ? p.extent = Iv(
          p.extent,
          a.extent
        ) : p.extent = a.extent), p.zIndex === void 0 && (p.zIndex = o);
      }
      return t;
    }
    /**
     * @return {import("../source/Source.js").State} Source state.
     */
    getSourceState() {
      return "ready";
    }
  }
  const S_ = ML, cw = function(n, e) {
    if (qt.isArray(e)) {
      for (var t = 0; t < e.length; t++)
        if (qt.isEqual(e[t], n))
          return;
      e.push(n);
    }
  }, rJ = function(n, e) {
    const t = e[n.Type.Code];
    if (qt.isObject(e) && qt.isArray(t)) {
      for (var i = 0; i < t.length; i++)
        if (qt.isEqual(t[i].Title, n.Title) && qt.isEqual(t[i].OfficialNumber, n.OfficialNumber) && qt.isEqual(t[i].Lawstatus, n.Lawstatus)) {
          for (var a = 0; a < n.ArticleNumber.length; a++)
            cw(n.ArticleNumber[a], t[i].ArticleNumber);
          for (var o = 0; o < n.TextAtWeb.length; o++)
            cw(n.TextAtWeb[o], t[i].TextAtWeb);
          return;
        }
      t.push(n);
    }
  }, aJ = function(n) {
    const e = {
      LegalProvision: [],
      Law: [],
      Hint: []
    };
    return n.forEach((t) => {
      t.LegalProvisions.forEach((a) => {
        rJ({
          Type: a.Type,
          Title: a.Title,
          Abbreviation: a.Abbreviation,
          OfficialNumber: a.OfficialNumber,
          ArticleNumber: a.ArticleNumber || [],
          Article: a.Article || [],
          TextAtWeb: [a.TextAtWeb],
          Index: a.Index
        }, e);
      });
    }), e;
  }, sJ = function(n, e, t) {
    let i = pa(n.Title, e, t);
    return qt.isArray(n.Abbreviation) && n.Abbreviation.length > 0 && (i += " (" + pa(n.Abbreviation, e, t) + ")"), qt.isArray(n.OfficialNumber) && n.OfficialNumber.length > 0 && (i += ", " + pa(n.OfficialNumber, e, t)), i;
  }, wO = function(n, e, t, i) {
    const a = n.ArticleNumber.map(
      (u, c) => /* @__PURE__ */ K.jsxs("span", { children: [
        " ",
        /* @__PURE__ */ K.jsx("span", { className: "badge bg-primary", children: u })
      ] }, c)
    ), o = n.TextAtWeb.map((u, c) => {
      const p = pa(u, t, i);
      return /* @__PURE__ */ K.jsx("li", { children: /* @__PURE__ */ K.jsx("a", { href: p, target: "_blank", rel: "noreferrer", children: p }) }, c);
    });
    return /* @__PURE__ */ K.jsxs("dd", { className: "oereb-client-document ms-2", children: [
      /* @__PURE__ */ K.jsx("span", { children: sJ(n, t, i) }),
      a,
      /* @__PURE__ */ K.jsx("ul", { className: "ps-2 mb-2", children: o })
    ] }, e);
  }, pj = function(n) {
    const { t: e } = Rs(), t = n.restrictions, i = zt((T) => T.language), a = i.current, o = i.default, u = aJ(t), c = function() {
      return u.LegalProvision.length > 0 ? /* @__PURE__ */ K.jsx("dt", { children: e("extract.topic.document.legal_provisions") }) : null;
    }, p = u.LegalProvision.sort((T, O) => T.Index - O.Index).map((T, O) => wO(T, O, a, o)), y = function() {
      return u.Law.length > 0 ? /* @__PURE__ */ K.jsx("dt", { children: e("extract.topic.document.laws") }) : null;
    }, _ = u.Law.sort((T, O) => T.Index - O.Index).map((T, O) => wO(T, O, a, o)), S = function() {
      return u.Hint.length > 0 ? /* @__PURE__ */ K.jsx("dt", { children: e("extract.topic.document.hints") }) : null;
    }, b = u.Hint.sort((T, O) => T.Index - O.Index).map((T, O) => wO(T, O, a, o));
    return /* @__PURE__ */ K.jsxs("dl", { className: "oereb-client-documents mb-2", children: [
      c(),
      p,
      y(),
      _,
      S(),
      b
    ] });
  };
  pj.propTypes = {
    /** The list of restrictions for which to collect the documents. */
    restrictions: wa.array.isRequired
  };
  const OL = function(n) {
    return Reflect.apply(Object.prototype.hasOwnProperty, n, ["NrOfPoints"]) ? "Point" : Reflect.apply(Object.prototype.hasOwnProperty, n, ["LengthShare"]) ? "LineString" : Reflect.apply(Object.prototype.hasOwnProperty, n, ["AreaShare"]) ? "Polygon" : null;
  }, oJ = function(n) {
    for (var e = [], t = 0; t < n.length; t++) {
      const u = OL(n[t]);
      for (var i = !1, a = 0; a < e.length; a++)
        if (e[a].TypeCode === n[t].TypeCode && e[a].GeomType === u) {
          i = !0, u === "Point" && (e[a].NrOfPoints += n[t].NrOfPoints), u === "LineString" && (e[a].LengthShare += n[t].LengthShare), u === "Polygon" && (e[a].AreaShare += n[t].AreaShare, e[a].PartInPercent += n[t].PartInPercent);
          break;
        }
      if (!i) {
        var o = {
          GeomType: u,
          TypeCode: n[t].TypeCode,
          LegendText: n[t].LegendText,
          SymbolRef: n[t].SymbolRef,
          SubTheme: n[t].SubTheme
        };
        u === "Point" && (o.NrOfPoints = n[t].NrOfPoints), u === "LineString" && (o.LengthShare = n[t].LengthShare), u === "Polygon" && (o.AreaShare = n[t].AreaShare, o.PartInPercent = n[t].PartInPercent), e.push(o);
      }
    }
    return e.sort((u, c) => (u.AreaShare || 0) > (c.AreaShare || 0) ? -1 : (u.AreaShare || 0) < (c.AreaShare || 0) ? 1 : (u.LengthShare || 0) > (c.LengthShare || 0) ? -1 : (u.LengthShare || 0) < (c.LengthShare || 0) ? 1 : (u.NrOfPoints || 0) > (c.NrOfPoints || 0) ? -1 : (u.NrOfPoints || 0) < (c.NrOfPoints || 0) ? 1 : 0);
  }, lJ = function(n) {
    return OL(n) === "Polygon" ? n.PartInPercent.toFixed(1) + "%" : null;
  }, uJ = function(n) {
    const e = OL(n);
    return e === "Point" ? n.NrOfPoints.toFixed(0) : e === "LineString" ? n.LengthShare.toFixed(0) + " m" : e === "Polygon" ? /* @__PURE__ */ K.jsxs("span", { children: [
      n.AreaShare.toFixed(0),
      " m",
      /* @__PURE__ */ K.jsx("sup", { children: "2" })
    ] }) : null;
  }, gj = function(n) {
    const { t: e } = Rs(), t = zt((y) => y.language), i = t.current, a = t.default, o = zt((y) => y.symbolZoom).enabled, u = n.restrictions, c = Kt.useRef(null), p = oJ(u).map((y, _) => {
      const S = pa(y.LegendText, i, a), b = y.SymbolRef, T = uJ(y), O = lJ(y);
      return /* @__PURE__ */ K.jsxs("tr", { children: [
        /* @__PURE__ */ K.jsx("td", { className: "oereb-client-symbol-cell", children: /* @__PURE__ */ K.jsx("img", { className: "oereb-client-symbol", src: b }) }),
        /* @__PURE__ */ K.jsx("td", { className: "oereb-client-legend-text", children: S }),
        /* @__PURE__ */ K.jsx("td", { className: "oereb-client-legend-text text-end text-nowrap", children: T }),
        /* @__PURE__ */ K.jsx("td", { className: "oereb-client-legend-text text-end text-nowrap", children: O })
      ] }, _);
    });
    return Kt.useEffect(() => {
      c.current.querySelectorAll(".oereb-client-symbol").forEach((_) => {
        const S = _.getAttribute("src"), b = new Hw(_, {
          content: '<img src="' + S + '" />',
          html: !0,
          trigger: "hover"
        });
        o ? b.enable() : b.disable();
      });
    }), /* @__PURE__ */ K.jsxs("table", { className: "table table-sm mb-2 oereb-client-legend", children: [
      /* @__PURE__ */ K.jsx("thead", { children: /* @__PURE__ */ K.jsxs("tr", { children: [
        /* @__PURE__ */ K.jsx("th", { children: e("extract.topic.legend.type") }),
        /* @__PURE__ */ K.jsx("th", {}),
        /* @__PURE__ */ K.jsx("th", { className: "text-end text-nowrap", children: e("extract.topic.legend.part") }),
        /* @__PURE__ */ K.jsx("th", { className: "text-end text-nowrap", children: e("extract.topic.legend.part_in_percent") })
      ] }) }),
      /* @__PURE__ */ K.jsx("tbody", { ref: c, children: p })
    ] });
  };
  gj.propTypes = {
    /** The restrictions to show the legend for. */
    restrictions: wa.array.isRequired
  };
  const mj = function(n) {
    const { t: e } = Rs(), t = n.restrictions, i = zt((p) => p.language), a = i.current, o = i.default, u = [];
    t.forEach((p) => {
      cw(p.ResponsibleOffice, u);
    });
    const c = u.map((p, y) => {
      const _ = pa(p.Name, a, o), S = pa(p.OfficeAtWeb, a, o);
      return S === null ? /* @__PURE__ */ K.jsx("dd", { className: "ms-2", children: _ }, y) : /* @__PURE__ */ K.jsx("dd", { className: "ms-2", children: /* @__PURE__ */ K.jsx("a", { href: S, target: "_blank", rel: "noreferrer", children: _ }) }, y);
    });
    return /* @__PURE__ */ K.jsxs("dl", { className: "oereb-client-responsible-office border-top pt-2 mb-2", children: [
      /* @__PURE__ */ K.jsx("dt", { children: e("extract.topic.responsible_office") }),
      c
    ] });
  };
  mj.propTypes = {
    /** The topic's restrictions to collect the responsible offices for. */
    restrictions: wa.array.isRequired
  };
  const jb = function(n) {
    const { t: e } = Rs(), t = n.restrictions, i = Kt.useRef(null), a = Kt.useRef(null), [o, u] = Kt.useState(!1), [c, p] = Kt.useState(1), [y, _] = Kt.useState(!1), S = zt((G) => G.accordion).topic, b = zt((G) => G.map).topicLayers, T = zt((G) => G.language), O = T.current, N = T.default, D = Fl(), k = [];
    t.forEach((G) => {
      const ie = G.Map;
      cw(ie, k);
    }), Kt.useEffect(() => {
      const G = new Gv(i.current, {
        toggle: !1
      });
      S === i.current && o ? (G.show(), a.current.classList.remove("collapsed")) : (G.hide(), a.current.classList.add("collapsed"));
    });
    let $ = null;
    y && ($ = /* @__PURE__ */ K.jsx("div", { className: "spinner-grow spinner-grow-sm text-secondary float-end me-2" })), Kt.useEffect(() => {
      b instanceof S_ && b.setOpacity(c);
    });
    const B = function() {
      S === i.current ? (u(!o), D(kE(null)), D(Vv({
        viewServices: [],
        callback: null
      }))) : (u(!0), D(kE(i.current)), D(Vv({
        viewServices: k,
        callback: _
      })));
    }, V = function(G) {
      p(G.target.value / 100);
    }, z = pa(t[0].Lawstatus.Text, O, N);
    return /* @__PURE__ */ K.jsxs("div", { className: "accordion-item oereb-client-topic", children: [
      /* @__PURE__ */ K.jsx("h2", { className: "accordion-header", children: /* @__PURE__ */ K.jsx(
        "button",
        {
          className: "accordion-button pt-2 pb-2 collapsed",
          type: "button",
          onClick: B,
          ref: a,
          children: /* @__PURE__ */ K.jsxs("div", { className: "oereb-topic-lawstatus", children: [
            /* @__PURE__ */ K.jsx("small", { className: "fst-italic", children: z }),
            $
          ] })
        }
      ) }),
      /* @__PURE__ */ K.jsx("div", { className: "accordion-collapse collapse", ref: i, children: /* @__PURE__ */ K.jsxs("div", { className: "accordion-body", children: [
        /* @__PURE__ */ K.jsxs("div", { className: "row align-items-center mb-2", children: [
          /* @__PURE__ */ K.jsx("div", { className: "col-3", children: /* @__PURE__ */ K.jsxs("small", { children: [
            e("extract.topic.opacity"),
            ":"
          ] }) }),
          /* @__PURE__ */ K.jsx("div", { className: "col-2 pe-2 text-end", children: /* @__PURE__ */ K.jsxs("small", { children: [
            Math.round(c * 100),
            "%"
          ] }) }),
          /* @__PURE__ */ K.jsx("div", { className: "col-7", children: /* @__PURE__ */ K.jsx(
            "input",
            {
              type: "range",
              className: "form-range align-middle",
              min: "0",
              max: "100",
              value: Math.round(c * 100),
              onChange: V
            }
          ) })
        ] }),
        /* @__PURE__ */ K.jsx(gj, { restrictions: t }),
        /* @__PURE__ */ K.jsx(pj, { restrictions: t }),
        /* @__PURE__ */ K.jsx(mj, { restrictions: t })
      ] }) })
    ] });
  };
  jb.propTypes = {
    /** The restrictions of the topic to be shown. */
    restrictions: wa.array.isRequired
  };
  const vj = function(n) {
    const e = n.data, t = n.restrictions, i = Kt.useRef(null), a = zt((p) => p.language), o = a.current, u = a.default, c = e.map((p, y) => {
      const _ = c5(p);
      return Object.keys(t).filter((T) => T === _ || T.startsWith(_ + "_")).map((T, O) => {
        const N = t[T];
        let D = pa(N.themeText, o, u);
        N.subThemeText !== null && (D += ": " + pa(N.subThemeText, o, u));
        let k = null, $ = null, B = null;
        return N.inForce.length > 0 && (k = /* @__PURE__ */ K.jsx(jb, { restrictions: N.inForce })), N.changeWithPreEffect.length > 0 && ($ = /* @__PURE__ */ K.jsx(jb, { restrictions: N.changeWithPreEffect })), N.changeWithoutPreEffect.length > 0 && (B = /* @__PURE__ */ K.jsx(jb, { restrictions: N.changeWithoutPreEffect })), /* @__PURE__ */ K.jsxs("div", { className: "accordion-item", children: [
          /* @__PURE__ */ K.jsx("div", { className: "accordion-item p-2 ps-3", children: /* @__PURE__ */ K.jsx("strong", { children: D }) }),
          k,
          $,
          B
        ] }, `${y}_${O}`);
      });
    });
    return /* @__PURE__ */ K.jsx("div", { className: "accordion-body p-0 oereb-client-topic-list-with-restrictions", children: /* @__PURE__ */ K.jsx("div", { className: "accordion accordion-flush", ref: i, children: c }) });
  };
  vj.propTypes = {
    /** The list of topics. */
    data: wa.array.isRequired,
    /** The restrictions grouped by topic. */
    restrictions: wa.object.isRequired
  };
  const yj = function(n) {
    const e = zt((u) => u.language), t = e.current, i = e.default, o = n.data.map((u, c) => {
      const p = pa(u.Text, t, i);
      return /* @__PURE__ */ K.jsx("li", { className: "list-group-item", children: p }, c);
    });
    return /* @__PURE__ */ K.jsx("div", { className: "accordion-body p-0 oereb-client-topic-list-without-restrictions", children: /* @__PURE__ */ K.jsx("ul", { className: "list-group list-group-flush", children: o }) });
  };
  yj.propTypes = {
    /** The list of topics. */
    data: wa.array.isRequired
  };
  const Ub = function(n) {
    const e = n.title, t = n.data, i = n.restriction, a = Kt.useRef(null), o = Kt.useRef(null), [u, c] = Kt.useState(!1), p = zt((T) => T.accordion).category, y = zt((T) => T.extract).data.GetExtractByIdResponse.extract, _ = Fl(), S = function() {
      p === a.current ? c(!u) : c(!0), _(lL(a.current)), _(kE(null)), _(Vv([]));
    };
    Kt.useEffect(() => {
      const T = new Gv(a.current, {
        toggle: !1
      });
      p === a.current && u ? (T.show(), o.current.classList.remove("collapsed")) : (T.hide(), o.current.classList.add("collapsed")), p === null && n.initial && S();
    });
    const b = (() => {
      if (i && qt.isArray(y.RealEstate.RestrictionOnLandownership)) {
        const T = HY(
          y.RealEstate.RestrictionOnLandownership,
          y.ConcernedTheme
        );
        return /* @__PURE__ */ K.jsx(vj, { data: t, restrictions: T });
      }
      return /* @__PURE__ */ K.jsx(yj, { data: t });
    })();
    return /* @__PURE__ */ K.jsxs("div", { className: "accordion-item mt-3 oereb-client-category", children: [
      /* @__PURE__ */ K.jsx("h2", { className: "accordion-header", children: /* @__PURE__ */ K.jsx(
        "button",
        {
          className: "accordion-button collapsed ps-1",
          type: "button",
          onClick: S,
          ref: o,
          children: /* @__PURE__ */ K.jsxs("div", { className: "container-fluid", children: [
            /* @__PURE__ */ K.jsx("strong", { children: e }),
            /* @__PURE__ */ K.jsx("span", { className: "badge rounded-pill bg-secondary float-end", children: t.length })
          ] })
        }
      ) }),
      /* @__PURE__ */ K.jsx("div", { className: "accordion-collapse collapse", ref: a, children: b })
    ] });
  };
  Ub.propTypes = {
    /** The category title. */
    title: wa.string.isRequired,
    /** The topics contained in this category. */
    data: wa.array.isRequired,
    /** Use `true` to show the restrictions data. */
    restriction: wa.bool.isRequired,
    /** Initially show this category */
    initial: wa.bool
  };
  const D3 = new RegExp("({([\\w]*)})", "g"), _j = function(n, e) {
    if (qt.isString(n)) {
      let t = n, i = D3.exec(n);
      for (; i !== null; )
        t = t.replace(i[1], e[i[2]] || ""), i = D3.exec(n);
      return t;
    }
    return n;
  }, cJ = function() {
    const n = zt((p) => p.config).config, e = zt((p) => p.extract), t = zt((p) => p.language), i = t.current, a = t.default;
    if (!(qt.isObject(n.external_viewer) && qt.isArray(n.external_viewer.tooltip) && qt.isString(n.external_viewer.url)))
      return null;
    const u = pa(
      n.external_viewer.tooltip,
      i,
      a
    ), c = function() {
      if (e.visible) {
        const p = new URLSearchParams(window.location.search), y = e.data.GetExtractByIdResponse.extract.RealEstate, _ = {
          map_x: p.get("map_x"),
          map_y: p.get("map_y"),
          map_zoom: p.get("map_zoom"),
          lang: p.get("lang"),
          canton: y.Canton,
          egrid: y.EGRID,
          fosnr: y.FosNr,
          identdn: y.IdentDN,
          municipality: y.MunicipalityName,
          number: y.Number
        };
        let S = n.external_viewer.url;
        S.indexOf("?") === -1 && (S += "?");
        const b = n.external_viewer.params;
        qt.isArray(b) && (S += b.join("&")), window.open(encodeURI(_j(S, _)), "_blank");
      }
    };
    return /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: "btn btn-outline-secondary oereb-client-external-viewer",
        title: u,
        onClick: c,
        children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-map" })
      }
    );
  }, Ej = function() {
    const { t: n } = Rs(), e = document.getElementById("permalinkModal"), t = e.querySelector("input"), i = e.querySelector("h5"), a = Yv.getOrCreateInstance(e);
    e.getAttribute("data-bs-modal-shown-listener") !== "true" && (e.addEventListener("shown.bs.modal", () => {
      t.focus(), t.select();
    }), e.setAttribute("data-bs-modal-shown-listener", "true"));
    const o = function() {
      i.textContent = n("extract.permalink.title"), t.value = window.location, a.show();
    };
    return /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: "btn btn-outline-secondary oereb-client-permalink",
        onClick: o,
        title: n("extract.permalink.title"),
        children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-link-45deg" })
      }
    );
  };
  Ej.propTypes = {};
  const Sj = function(n) {
    const { t: e } = Rs(), t = n.data, i = t.Number, a = t.MunicipalityName, o = t.EGRID, u = t.LandRegistryArea, c = zt((S) => S.language), p = c.current, y = c.default, _ = pa(t.Type.Text, p, y);
    return /* @__PURE__ */ K.jsxs("div", { className: "container-fluid mt-3 oereb-client-real-estate", children: [
      /* @__PURE__ */ K.jsxs("h5", { children: [
        _,
        " ",
        i,
        " ",
        e("extract.real_estate.at"),
        " ",
        a
      ] }),
      /* @__PURE__ */ K.jsxs("div", { className: "row row-cols-2", children: [
        /* @__PURE__ */ K.jsx("div", { className: "col-3", children: /* @__PURE__ */ K.jsxs("strong", { children: [
          e("extract.real_estate.egrid"),
          ":"
        ] }) }),
        /* @__PURE__ */ K.jsx("div", { className: "col-9", children: o })
      ] }),
      /* @__PURE__ */ K.jsxs("div", { className: "row row-cols-2", children: [
        /* @__PURE__ */ K.jsx("div", { className: "col-3", children: /* @__PURE__ */ K.jsxs("strong", { children: [
          e("extract.real_estate.area"),
          ":"
        ] }) }),
        /* @__PURE__ */ K.jsxs("div", { className: "col-9", children: [
          u,
          " m²"
        ] })
      ] })
    ] });
  };
  Sj.propTypes = {
    /** The real estate data. */
    data: wa.object.isRequired
  };
  var xj = { exports: {} };
  (function(n, e) {
    (function(t, i) {
      i();
    })(Ko, function() {
      function t(y, _) {
        return typeof _ > "u" ? _ = { autoBom: !1 } : typeof _ != "object" && (console.warn("Deprecated: Expected third argument to be a object"), _ = { autoBom: !_ }), _.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type) ? new Blob(["\uFEFF", y], { type: y.type }) : y;
      }
      function i(y, _, S) {
        var b = new XMLHttpRequest();
        b.open("GET", y), b.responseType = "blob", b.onload = function() {
          p(b.response, _, S);
        }, b.onerror = function() {
          console.error("could not download file");
        }, b.send();
      }
      function a(y) {
        var _ = new XMLHttpRequest();
        _.open("HEAD", y, !1);
        try {
          _.send();
        } catch {
        }
        return 200 <= _.status && 299 >= _.status;
      }
      function o(y) {
        try {
          y.dispatchEvent(new MouseEvent("click"));
        } catch {
          var _ = document.createEvent("MouseEvents");
          _.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), y.dispatchEvent(_);
        }
      }
      var u = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof Ko == "object" && Ko.global === Ko ? Ko : void 0, c = u.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), p = u.saveAs || (typeof window != "object" || window !== u ? function() {
      } : "download" in HTMLAnchorElement.prototype && !c ? function(y, _, S) {
        var b = u.URL || u.webkitURL, T = document.createElement("a");
        _ = _ || y.name || "download", T.download = _, T.rel = "noopener", typeof y == "string" ? (T.href = y, T.origin === location.origin ? o(T) : a(T.href) ? i(y, _, S) : o(T, T.target = "_blank")) : (T.href = b.createObjectURL(y), setTimeout(function() {
          b.revokeObjectURL(T.href);
        }, 4e4), setTimeout(function() {
          o(T);
        }, 0));
      } : "msSaveOrOpenBlob" in navigator ? function(y, _, S) {
        if (_ = _ || y.name || "download", typeof y != "string")
          navigator.msSaveOrOpenBlob(t(y, S), _);
        else if (a(y))
          i(y, _, S);
        else {
          var b = document.createElement("a");
          b.href = y, b.target = "_blank", setTimeout(function() {
            o(b);
          });
        }
      } : function(y, _, S, b) {
        if (b = b || open("", "_blank"), b && (b.document.title = b.document.body.innerText = "downloading..."), typeof y == "string")
          return i(y, _, S);
        var T = y.type === "application/octet-stream", O = /constructor/i.test(u.HTMLElement) || u.safari, N = /CriOS\/[\d]+/.test(navigator.userAgent);
        if ((N || T && O || c) && typeof FileReader < "u") {
          var D = new FileReader();
          D.onloadend = function() {
            var B = D.result;
            B = N ? B : B.replace(/^data:[^;]*;/, "data:attachment/file;"), b ? b.location.href = B : location = B, b = null;
          }, D.readAsDataURL(y);
        } else {
          var k = u.URL || u.webkitURL, $ = k.createObjectURL(y);
          b ? b.location = $ : location.href = $, b = null, setTimeout(function() {
            k.revokeObjectURL($);
          }, 4e4);
        }
      });
      u.saveAs = p.saveAs = p, n.exports = p;
    });
  })(xj);
  var fJ = xj.exports;
  const hJ = function() {
    const { t: n } = Rs(), e = zt((p) => p.config).config, t = zt((p) => p.extract), a = zt((p) => p.language).current, o = Kt.useRef(null), u = Fl(), c = function() {
      if (t.visible) {
        const p = t.data.GetExtractByIdResponse.extract.ExtractIdentifier;
        o.current.classList.remove("bi", "bi-file-earmark-pdf"), o.current.classList.add("spinner-grow", "spinner-grow-sm"), BY(
          e.service_url,
          t.egrid,
          t.identdn,
          t.number,
          e.extract_pdf_timeout,
          a
        ).then((y) => {
          const _ = p + ".pdf";
          o.current.classList.remove("spinner-grow", "spinner-grow-sm"), o.current.classList.add("bi", "bi-file-earmark-pdf"), fJ.saveAs(new Blob([y], { type: "application/pdf" }), _);
        }).catch(() => {
          o.current.classList.remove("spinner-grow", "spinner-grow-sm"), o.current.classList.add("bi", "bi-file-earmark-pdf"), u(Zv());
        });
      }
    };
    return /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: "btn btn-outline-secondary oereb-client-static-extract",
        title: n("extract.static_extract.title"),
        onClick: c,
        children: /* @__PURE__ */ K.jsx("i", { ref: o, className: "bi bi-file-earmark-pdf" })
      }
    );
  }, bj = function() {
    const { t: n } = Rs(), e = zt((o) => o.extract).highlight, t = Fl(), i = () => {
      t(MY());
    };
    let a;
    return e ? a = "btn btn-outline-secondary" : a = "btn btn-secondary", /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: a,
        onClick: i,
        title: n("extract.hide_highlight.title"),
        children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-bounding-box-circles" })
      }
    );
  };
  bj.propTypes = {};
  const wj = function() {
    const { t: n } = Rs(), e = zt((o) => o.extract).background, t = Fl(), i = () => {
      t(OY());
    };
    let a;
    return e ? a = "btn btn-outline-secondary" : a = "btn btn-secondary", /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: a,
        onClick: i,
        title: n("extract.hide_background.title"),
        children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-layers-half" })
      }
    );
  };
  wj.propTypes = {};
  const dJ = function() {
    const { t: n } = Rs(), e = zt((_) => _.extract), t = Fl(), i = function() {
      t(Vv([])), t(kE(null)), t(lL(null)), t(a5());
    }, a = e.data.GetExtractByIdResponse.extract, o = e.collapsed, u = function() {
      t(s5());
    }, c = function() {
      t(RY());
    }, p = (() => {
      let _ = n("extract.hide"), S = "bi bi-chevron-up";
      return o && (_ = n("extract.show"), S = "bi bi-chevron-down"), /* @__PURE__ */ K.jsx(
        "button",
        {
          type: "button",
          className: "btn btn-outline-secondary collapse-extract",
          title: _,
          onClick: c,
          children: /* @__PURE__ */ K.jsx("i", { className: S })
        }
      );
    })(), y = [
      "oereb-client-extract",
      "data container-fluid",
      "d-flex",
      "flex-column",
      "justify-content-start",
      "align-items-stretch"
    ];
    return /* @__PURE__ */ K.jsxs("div", { className: y.join(" "), children: [
      /* @__PURE__ */ K.jsxs("div", { children: [
        /* @__PURE__ */ K.jsxs("div", { className: "btn-group float-end", role: "group", children: [
          p,
          /* @__PURE__ */ K.jsx(
            "button",
            {
              onClick: i,
              className: "btn btn-outline-secondary",
              type: "button",
              children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-x-lg" })
            }
          )
        ] }),
        /* @__PURE__ */ K.jsxs("div", { className: "btn-group float-start me-3", role: "group", children: [
          /* @__PURE__ */ K.jsx(Ej, {}),
          /* @__PURE__ */ K.jsx(cJ, {}),
          /* @__PURE__ */ K.jsx(hJ, {}),
          /* @__PURE__ */ K.jsx(
            "button",
            {
              type: "button",
              className: "btn btn-outline-secondary",
              title: n("extract.information_panel.button.title"),
              onClick: u,
              children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-info-square" })
            }
          )
        ] }),
        /* @__PURE__ */ K.jsxs("div", { className: "btn-group float-start", role: "group", children: [
          /* @__PURE__ */ K.jsx(bj, {}),
          /* @__PURE__ */ K.jsx(wj, {})
        ] })
      ] }),
      /* @__PURE__ */ K.jsx(Sj, { data: a.RealEstate }),
      /* @__PURE__ */ K.jsxs("div", { className: "accordion accordion-flush flex-grow-1 mt-1 mb-2 oereb-client-extract-data", children: [
        /* @__PURE__ */ K.jsx(
          Ub,
          {
            title: n("extract.category.concerned_theme"),
            initial: !0,
            data: a.ConcernedTheme,
            restriction: !0
          }
        ),
        /* @__PURE__ */ K.jsx(
          Ub,
          {
            title: n("extract.category.not_concerned_theme"),
            data: a.NotConcernedTheme,
            restriction: !1
          }
        ),
        /* @__PURE__ */ K.jsx(
          Ub,
          {
            title: n("extract.category.theme_without_data"),
            data: a.ThemeWithoutData,
            restriction: !1
          }
        )
      ] })
    ] });
  }, pJ = function() {
    const { t: n } = Rs(), e = Fl(), t = zt((B) => B.config).config, i = zt((B) => B.extract), a = zt((B) => B.language), o = a.current, u = a.default, c = function(B) {
      return B ? /* @__PURE__ */ K.jsxs("span", { children: [
        /* @__PURE__ */ K.jsx("br", {}),
        B
      ] }) : null;
    }, p = function() {
      return t.support.phone ? /* @__PURE__ */ K.jsxs("span", { children: [
        /* @__PURE__ */ K.jsx("br", {}),
        /* @__PURE__ */ K.jsx("i", { className: "bi bi-telephone-fill", title: n("extract.error.support.phone.title") }),
        " ",
        t.support.phone
      ] }) : null;
    }, y = function() {
      return t.support.email ? /* @__PURE__ */ K.jsxs("span", { children: [
        /* @__PURE__ */ K.jsx("br", {}),
        /* @__PURE__ */ K.jsx("i", { className: "bi bi-envelope-fill", title: n("extract.error.support.email.title") }),
        " ",
        /* @__PURE__ */ K.jsx("a", { href: "mailto:" + t.support.email, children: t.support.email })
      ] }) : null;
    }, _ = pa(t.support.office1, o, u), S = c(pa(
      t.support.office2,
      o,
      u
    )), b = c(t.support.street), T = c(t.support.city), O = p(), N = y(), D = t.service_url, k = function() {
      e(a5());
    }, $ = function() {
      e(d_({
        egrid: i.egrid,
        identdn: i.identdn,
        number: i.number,
        zoom: !0
      })), m_(
        D,
        i.egrid,
        i.identdn,
        i.number,
        t.extract_json_timeout,
        o
      ).then((B) => {
        e(p_(B)), e(g_(B));
      }).catch(() => {
        e(Zv());
      });
    };
    return /* @__PURE__ */ K.jsxs("div", { className: "oereb-client-extract oereb-client-extract-error container-fluid", children: [
      /* @__PURE__ */ K.jsx("p", { className: "text-end", children: /* @__PURE__ */ K.jsx(
        "button",
        {
          onClick: k,
          className: "btn btn-outline-secondary",
          type: "button",
          children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-x-lg" })
        }
      ) }),
      /* @__PURE__ */ K.jsxs("h3", { children: [
        /* @__PURE__ */ K.jsx("i", { className: "bi bi-exclamation-circle-fill text-secondary" }),
        " ",
        n("extract.error.title")
      ] }),
      /* @__PURE__ */ K.jsx("p", { children: n("extract.error.message") }),
      /* @__PURE__ */ K.jsx("p", { className: "text-center", children: /* @__PURE__ */ K.jsx("button", { onClick: $, className: "btn btn-secondary", children: n("extract.error.button.text") }) }),
      /* @__PURE__ */ K.jsx("p", { children: n("extract.error.support.message") }),
      /* @__PURE__ */ K.jsxs("address", { children: [
        /* @__PURE__ */ K.jsx("strong", { children: _ }),
        S,
        b,
        T,
        O,
        N
      ] })
    ] });
  }, gJ = function() {
    const { t: n } = Rs(), e = Fl();
    return Kt.useEffect(() => {
      e(Vv([])), e(kE(null)), e(lL(null));
    }, []), /* @__PURE__ */ K.jsx("div", { className: "oereb-client-extract oereb-client-extract-loading container-fluid", children: /* @__PURE__ */ K.jsxs("p", { className: "text-center align-middle pt-5", children: [
      /* @__PURE__ */ K.jsx("i", { className: "spinner-grow spinner-grow-sm" }),
      " ",
      n("extract.loading.message")
    ] }) });
  }, mJ = function() {
    const n = zt((i) => i.extract), e = Kt.useRef(null), t = n.loading ? /* @__PURE__ */ K.jsx(gJ, {}) : n.error ? /* @__PURE__ */ K.jsx(pJ, {}) : n.visible ? /* @__PURE__ */ K.jsx(dJ, {}) : null;
    return Kt.useEffect(() => {
      e.current.classList.remove("hidden", "loading", "shown", "collapsed"), n.collapsed ? e.current.classList.add("collapsed") : n.loading ? e.current.classList.add("loading") : n.visible || n.error ? e.current.classList.add("shown") : e.current.classList.add("hidden");
    }), document.querySelectorAll(".ol-scale-bar").forEach((i) => {
      n.visible || n.error ? i.style.left = "513px" : i.style.left = "8px";
    }), /* @__PURE__ */ K.jsx("div", { ref: e, className: "oereb-client-extract-wrapper", children: t });
  }, vJ = function() {
    const { t: n } = Rs(), e = zt((V) => V.extract), t = zt((V) => V.language), i = t.current, a = t.default;
    if (!(e.visible && qt.isObject(e.data) && qt.isObject(e.data.GetExtractByIdResponse) && qt.isObject(e.data.GetExtractByIdResponse.extract)))
      return null;
    const u = e.data.GetExtractByIdResponse.extract.PLRCadastreAuthority, c = e.data.GetExtractByIdResponse.extract.CantonalLogoRef, p = pa(u.Name, i, a), y = u.Street + " " + u.Number, _ = u.PostalCode + " " + u.City, S = pa(u.OfficeAtWeb, i, a);
    let b = "d-flex g-0";
    document.body.offsetWidth < 1200 && (b += " flex-column");
    const T = new Date(e.data.GetExtractByIdResponse.extract.UpdateDateCS).toLocaleDateString("de-CH"), N = e.data.GetExtractByIdResponse.extract.GeneralInformation.map((V, z) => {
      const G = pa(
        V,
        i,
        a
      );
      return /* @__PURE__ */ K.jsx("p", { className: "card-text m-0 mb-2", children: G }, z);
    }), D = e.data.GetExtractByIdResponse.extract.FederalLogoRef, k = e.data.GetExtractByIdResponse.extract.MunicipalityLogoRef, $ = e.data.GetExtractByIdResponse.extract.RealEstate.MunicipalityName;
    let B = "card-text d-flex align-items-stretch";
    return document.body.offsetWidth < 1200 && (B += " flex-column"), /* @__PURE__ */ K.jsxs("div", { className: "container-fluid oereb-client-general-information", children: [
      /* @__PURE__ */ K.jsx("div", { className: "card oereb-client-authority", children: /* @__PURE__ */ K.jsxs("div", { className: b, children: [
        /* @__PURE__ */ K.jsx("div", { children: /* @__PURE__ */ K.jsxs("div", { className: "card-body", children: [
          /* @__PURE__ */ K.jsx("h5", { className: "card-title", children: n("extract.information_panel.general_information.authority") }),
          /* @__PURE__ */ K.jsx("p", { className: "card-text fw-bold m-0", children: p }),
          /* @__PURE__ */ K.jsx("p", { className: "card-text m-0", children: y }),
          /* @__PURE__ */ K.jsx("p", { className: "card-text m-0", children: _ }),
          /* @__PURE__ */ K.jsx("p", { className: "card-text m-0", children: /* @__PURE__ */ K.jsx("a", { href: S, target: "_blank", rel: "noreferrer", children: S }) })
        ] }) }),
        /* @__PURE__ */ K.jsx("div", { children: /* @__PURE__ */ K.jsx("div", { className: "card-body", children: /* @__PURE__ */ K.jsx("img", { src: c, className: "img-fluid oereb-client-authority-logo" }) }) })
      ] }) }),
      /* @__PURE__ */ K.jsx("div", { className: "card mt-4 oereb-client-base-data", children: /* @__PURE__ */ K.jsx("div", { className: "d-flex g-0", children: /* @__PURE__ */ K.jsx("div", { children: /* @__PURE__ */ K.jsxs("div", { className: "card-body", children: [
        /* @__PURE__ */ K.jsx("h5", { className: "card-title", children: n("extract.information_panel.general_information.base_data") }),
        /* @__PURE__ */ K.jsxs("p", { className: "card-text m-0", children: [
          n("extract.information_panel.general_information.update_date_cs"),
          ": ",
          T
        ] })
      ] }) }) }) }),
      /* @__PURE__ */ K.jsx("div", { className: "card mt-4 oereb-client-general-information-card", children: /* @__PURE__ */ K.jsx("div", { className: "d-flex g-0", children: /* @__PURE__ */ K.jsx("div", { children: /* @__PURE__ */ K.jsxs("div", { className: "card-body pb-1", children: [
        /* @__PURE__ */ K.jsx("h5", { className: "card-title", children: n("extract.information_panel.general_information.general_information") }),
        N
      ] }) }) }) }),
      /* @__PURE__ */ K.jsx("div", { className: "card mt-4 oereb-client-involved-parties", children: /* @__PURE__ */ K.jsx("div", { className: "d-flex g-0", children: /* @__PURE__ */ K.jsx("div", { children: /* @__PURE__ */ K.jsxs("div", { className: "card-body", children: [
        /* @__PURE__ */ K.jsx("h5", { className: "card-title", children: n("extract.information_panel.general_information.further_participants") }),
        /* @__PURE__ */ K.jsxs("div", { className: B, children: [
          /* @__PURE__ */ K.jsx("div", { className: "text-center", children: /* @__PURE__ */ K.jsx("img", { src: D, className: "img-fluid oereb-client-federal-logo" }) }),
          /* @__PURE__ */ K.jsxs("div", { className: "text-center", children: [
            /* @__PURE__ */ K.jsx("img", { src: k, className: "img-fluid oereb-client-municipality-logo" }),
            /* @__PURE__ */ K.jsx("p", { children: $ })
          ] })
        ] })
      ] }) }) }) })
    ] });
  }, RA = function(n) {
    const e = n.catalog, t = n.search, i = zt((b) => b.extract), a = zt((b) => b.language), o = a.current, u = a.default;
    if (!(i.visible && qt.isObject(i.data) && qt.isObject(i.data.GetExtractByIdResponse) && qt.isObject(i.data.GetExtractByIdResponse.extract)))
      return null;
    const p = function(b, T) {
      const O = b.split(new RegExp(`(${T})`, "gi")).map((N, D) => N.toLocaleLowerCase() === T.toLocaleLowerCase() ? /* @__PURE__ */ K.jsx("mark", { className: "ps-0 pe-0", children: N }, D) : /* @__PURE__ */ K.jsx("span", { children: N }, D));
      return /* @__PURE__ */ K.jsx("span", { children: O });
    }, S = i.data.GetExtractByIdResponse.extract[e].map((b) => ({
      title: pa(b.Title, o, u),
      content: pa(b.Content, o, u)
    })).filter((b) => qt.isString(t) && t.length > 0 ? b.title.toLocaleLowerCase().includes(t.toLocaleLowerCase()) || b.content.toLocaleLowerCase().includes(t.toLocaleLowerCase()) : !0).sort((b, T) => b.title.localeCompare(T.title)).map((b, T) => {
      let O = b.title, N = b.content;
      return qt.isString(t) && t.length > 0 && (O = p(O, t), N = p(N, t)), /* @__PURE__ */ K.jsxs("li", { className: "list-group-item", children: [
        /* @__PURE__ */ K.jsx("p", { className: "fw-bold m-0", children: O }),
        /* @__PURE__ */ K.jsx("p", { className: "m-0", children: N })
      ] }, T);
    });
    return /* @__PURE__ */ K.jsx("div", { className: "container-fluid oereb-client-catalog", children: /* @__PURE__ */ K.jsx("ul", { className: "list-group list-group-flush", children: S }) });
  };
  RA.propTypes = {
    /** The catalog data to be shown. */
    catalog: wa.string.isRequired,
    /** The current value to filter the catalog entries for. */
    search: wa.string
  };
  const yJ = function() {
    const { t: n } = Rs(), e = Fl(), t = zt((O) => O.extract), i = Kt.useRef(null), [a, o] = Kt.useState(null), u = [
      {
        title: n("extract.information_panel.general_information.title"),
        content: /* @__PURE__ */ K.jsx(vJ, {}),
        search: !1
      },
      {
        title: n("extract.information_panel.exclusion_of_liability.title"),
        content: /* @__PURE__ */ K.jsx(RA, { catalog: "Disclaimer", search: a }),
        search: !0
      },
      {
        title: n("extract.information_panel.glossary.title"),
        content: /* @__PURE__ */ K.jsx(RA, { catalog: "Glossary", search: a }),
        search: !0
      }
    ], c = u[t.tab].content, p = function(O) {
      e(AY(O));
    }, y = function() {
      e(s5());
    }, _ = u.map((O, N) => {
      let D = "nav-link";
      return N === t.tab && (D += " active"), /* @__PURE__ */ K.jsx("li", { className: "nav-item", children: /* @__PURE__ */ K.jsx(
        "button",
        {
          className: D,
          onClick: p.bind(this, N),
          children: /* @__PURE__ */ K.jsx("span", { className: "text-body", children: O.title })
        }
      ) }, N);
    }), S = function(O) {
      o(O.target.value);
    };
    let b = null;
    u[t.tab].search && (document.body.offsetWidth < 1200 ? b = /* @__PURE__ */ K.jsx("div", { className: "mt-2", children: /* @__PURE__ */ K.jsx(
      "input",
      {
        className: "form-control",
        placeholder: n("extract.information_panel.search.placeholder"),
        onChange: S
      }
    ) }) : b = /* @__PURE__ */ K.jsx("div", { className: "ms-4", children: /* @__PURE__ */ K.jsx(
      "input",
      {
        className: "form-control",
        placeholder: n("extract.information_panel.search.placeholder"),
        onChange: S
      }
    ) }));
    const T = document.body.offsetWidth < 1200 ? /* @__PURE__ */ K.jsxs("div", { className: "mb-4 oereb-client-information-panel-nav-mobile", children: [
      /* @__PURE__ */ K.jsxs("div", { className: "d-flex", children: [
        /* @__PURE__ */ K.jsx("ul", { className: "nav nav-pills nav-justified flex-column", children: _ }),
        /* @__PURE__ */ K.jsx("div", { className: "flex-grow-1 text-end ms-4", children: /* @__PURE__ */ K.jsx(
          "button",
          {
            className: "btn btn-outline-secondary text-body",
            onClick: y,
            children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-x-lg" })
          }
        ) })
      ] }),
      b
    ] }) : /* @__PURE__ */ K.jsxs("ul", { className: "nav nav-tabs mb-4 oereb-client-information-panel-nav", children: [
      _,
      b,
      /* @__PURE__ */ K.jsx("li", { className: "nav-item ms-auto", children: /* @__PURE__ */ K.jsx("button", { className: "nav-link text-body", onClick: y, children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-x-lg" }) }) })
    ] });
    return Kt.useEffect(() => {
      i.current.classList.remove("disabled", "hidden", "shown"), t.visible ? t.information ? i.current.classList.add("shown") : i.current.classList.add("hidden") : i.current.classList.add("disabled");
    }), /* @__PURE__ */ K.jsxs("div", { ref: i, className: "oereb-client-information-panel container-fluid d-flex flex-column", children: [
      T,
      /* @__PURE__ */ K.jsx("div", { className: "flex-grow-1 content-wrapper", children: c })
    ] });
  };
  class AL extends Of {
    /**
     * @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
     *     You may pass a Geometry object directly, or an object literal containing
     *     properties. If you pass an object literal, you may include a Geometry
     *     associated with a `geometry` key.
     */
    constructor(e) {
      if (super(), this.on, this.once, this.un, this.id_ = void 0, this.geometryName_ = "geometry", this.style_ = null, this.styleFunction_ = void 0, this.geometryChangeKey_ = null, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), e)
        if (typeof /** @type {?} */
        e.getSimplifiedGeometry == "function") {
          const t = (
            /** @type {Geometry} */
            e
          );
          this.setGeometry(t);
        } else {
          const t = e;
          this.setProperties(t);
        }
    }
    /**
     * Clone this feature. If the original feature has a geometry it
     * is also cloned. The feature id is not set in the clone.
     * @return {Feature<Geometry>} The clone.
     * @api
     */
    clone() {
      const e = (
        /** @type {Feature<Geometry>} */
        new AL(this.hasProperties() ? this.getProperties() : null)
      );
      e.setGeometryName(this.getGeometryName());
      const t = this.getGeometry();
      t && e.setGeometry(
        /** @type {Geometry} */
        t.clone()
      );
      const i = this.getStyle();
      return i && e.setStyle(i), e;
    }
    /**
     * Get the feature's default geometry.  A feature may have any number of named
     * geometries.  The "default" geometry (the one that is rendered by default) is
     * set when calling {@link module:ol/Feature~Feature#setGeometry}.
     * @return {Geometry|undefined} The default geometry for the feature.
     * @api
     * @observable
     */
    getGeometry() {
      return (
        /** @type {Geometry|undefined} */
        this.get(this.geometryName_)
      );
    }
    /**
     * Get the feature identifier.  This is a stable identifier for the feature and
     * is either set when reading data from a remote source or set explicitly by
     * calling {@link module:ol/Feature~Feature#setId}.
     * @return {number|string|undefined} Id.
     * @api
     */
    getId() {
      return this.id_;
    }
    /**
     * Get the name of the feature's default geometry.  By default, the default
     * geometry is named `geometry`.
     * @return {string} Get the property name associated with the default geometry
     *     for this feature.
     * @api
     */
    getGeometryName() {
      return this.geometryName_;
    }
    /**
     * Get the feature's style. Will return what was provided to the
     * {@link module:ol/Feature~Feature#setStyle} method.
     * @return {import("./style/Style.js").StyleLike|undefined} The feature style.
     * @api
     */
    getStyle() {
      return this.style_;
    }
    /**
     * Get the feature's style function.
     * @return {import("./style/Style.js").StyleFunction|undefined} Return a function
     * representing the current style of this feature.
     * @api
     */
    getStyleFunction() {
      return this.styleFunction_;
    }
    /**
     * @private
     */
    handleGeometryChange_() {
      this.changed();
    }
    /**
     * @private
     */
    handleGeometryChanged_() {
      this.geometryChangeKey_ && (Or(this.geometryChangeKey_), this.geometryChangeKey_ = null);
      const e = this.getGeometry();
      e && (this.geometryChangeKey_ = di(
        e,
        Cn.CHANGE,
        this.handleGeometryChange_,
        this
      )), this.changed();
    }
    /**
     * Set the default geometry for the feature.  This will update the property
     * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.
     * @param {Geometry|undefined} geometry The new geometry.
     * @api
     * @observable
     */
    setGeometry(e) {
      this.set(this.geometryName_, e);
    }
    /**
     * Set the style for the feature to override the layer style.  This can be a
     * single style object, an array of styles, or a function that takes a
     * resolution and returns an array of styles. To unset the feature style, call
     * `setStyle()` without arguments or a falsey value.
     * @param {import("./style/Style.js").StyleLike} [style] Style for this feature.
     * @api
     * @fires module:ol/events/Event~BaseEvent#event:change
     */
    setStyle(e) {
      this.style_ = e, this.styleFunction_ = e ? _J(e) : void 0, this.changed();
    }
    /**
     * Set the feature id.  The feature id is considered stable and may be used when
     * requesting features or comparing identifiers returned from a remote source.
     * The feature id can be used with the
     * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.
     * @param {number|string|undefined} id The feature id.
     * @api
     * @fires module:ol/events/Event~BaseEvent#event:change
     */
    setId(e) {
      this.id_ = e, this.changed();
    }
    /**
     * Set the property name to be used when getting the feature's default geometry.
     * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with
     * this name will be returned.
     * @param {string} name The property name of the default geometry.
     * @api
     */
    setGeometryName(e) {
      this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = e, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_();
    }
  }
  function _J(n) {
    if (typeof n == "function")
      return n;
    let e;
    return Array.isArray(n) ? e = n : (Ei(
      typeof /** @type {?} */
      n.getZIndex == "function",
      "Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
    ), e = [
      /** @type {import("./style/Style.js").default} */
      n
    ]), function() {
      return e;
    };
  }
  const EJ = AL, om = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", SJ = om.includes("firefox"), xJ = om.includes("safari") && !om.includes("chrom");
  xJ && (om.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(om));
  const bJ = om.includes("webkit") && !om.includes("edge"), Cj = om.includes("macintosh"), Tj = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, LL = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, NL = typeof Image < "u" && Image.prototype.decode, wJ = typeof createImageBitmap == "function", Rj = function() {
    let n = !1;
    try {
      const e = Object.defineProperty({}, "passive", {
        get: function() {
          n = !0;
        }
      });
      window.addEventListener("_", null, e), window.removeEventListener("_", null, e);
    } catch {
    }
    return n;
  }();
  new Array(6);
  function Tf() {
    return [1, 0, 0, 1, 0, 0];
  }
  function CJ(n, e, t, i, a, o, u) {
    return n[0] = e, n[1] = t, n[2] = i, n[3] = a, n[4] = o, n[5] = u, n;
  }
  function TJ(n, e) {
    return n[0] = e[0], n[1] = e[1], n[2] = e[2], n[3] = e[3], n[4] = e[4], n[5] = e[5], n;
  }
  function os(n, e) {
    const t = e[0], i = e[1];
    return e[0] = n[0] * t + n[2] * i + n[4], e[1] = n[1] * t + n[3] * i + n[5], e;
  }
  function RJ(n, e, t) {
    return CJ(n, e, 0, 0, t, 0, 0);
  }
  function Rf(n, e, t, i, a, o, u, c) {
    const p = Math.sin(o), y = Math.cos(o);
    return n[0] = i * y, n[1] = a * p, n[2] = -i * p, n[3] = a * y, n[4] = u * i * y - c * i * p + e, n[5] = u * a * p + c * a * y + t, n;
  }
  function Xw(n, e) {
    const t = MJ(e);
    Ei(t !== 0, "Transformation matrix cannot be inverted");
    const i = e[0], a = e[1], o = e[2], u = e[3], c = e[4], p = e[5];
    return n[0] = u / t, n[1] = -a / t, n[2] = -o / t, n[3] = i / t, n[4] = (o * p - u * c) / t, n[5] = -(i * p - a * c) / t, n;
  }
  function MJ(n) {
    return n[0] * n[3] - n[1] * n[2];
  }
  let I3;
  function DL(n) {
    const e = "matrix(" + n.join(", ") + ")";
    if (LL)
      return e;
    const t = I3 || (I3 = document.createElement("div"));
    return t.style.transform = e, t.style.transform;
  }
  function Qg(n, e, t, i, a, o) {
    o = o || [];
    let u = 0;
    for (let c = e; c < t; c += i) {
      const p = n[c], y = n[c + 1];
      o[u++] = a[0] * p + a[2] * y + a[4], o[u++] = a[1] * p + a[3] * y + a[5];
    }
    return o && o.length != u && (o.length = u), o;
  }
  function Mj(n, e, t, i, a, o, u) {
    u = u || [];
    const c = Math.cos(a), p = Math.sin(a), y = o[0], _ = o[1];
    let S = 0;
    for (let b = e; b < t; b += i) {
      const T = n[b] - y, O = n[b + 1] - _;
      u[S++] = y + T * c - O * p, u[S++] = _ + T * p + O * c;
      for (let N = b + 2; N < b + i; ++N)
        u[S++] = n[N];
    }
    return u && u.length != S && (u.length = S), u;
  }
  function OJ(n, e, t, i, a, o, u, c) {
    c = c || [];
    const p = u[0], y = u[1];
    let _ = 0;
    for (let S = e; S < t; S += i) {
      const b = n[S] - p, T = n[S + 1] - y;
      c[_++] = p + a * b, c[_++] = y + o * T;
      for (let O = S + 2; O < S + i; ++O)
        c[_++] = n[O];
    }
    return c && c.length != _ && (c.length = _), c;
  }
  function AJ(n, e, t, i, a, o, u) {
    u = u || [];
    let c = 0;
    for (let p = e; p < t; p += i) {
      u[c++] = n[p] + a, u[c++] = n[p + 1] + o;
      for (let y = p + 2; y < p + i; ++y)
        u[c++] = n[y];
    }
    return u && u.length != c && (u.length = c), u;
  }
  const P3 = Tf();
  class LJ extends Of {
    constructor() {
      super(), this.extent_ = Su(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = hj(
        (e, t, i) => {
          if (!i)
            return this.getSimplifiedGeometry(t);
          const a = this.clone();
          return a.applyTransform(i), a.getSimplifiedGeometry(t);
        }
      );
    }
    /**
     * Get a transformed and simplified version of the geometry.
     * @abstract
     * @param {number} squaredTolerance Squared tolerance.
     * @param {import("../proj.js").TransformFunction} [transform] Optional transform function.
     * @return {Geometry} Simplified geometry.
     */
    simplifyTransformed(e, t) {
      return this.simplifyTransformedInternal(
        this.getRevision(),
        e,
        t
      );
    }
    /**
     * Make a complete copy of the geometry.
     * @abstract
     * @return {!Geometry} Clone.
     */
    clone() {
      return yi();
    }
    /**
     * @abstract
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      return yi();
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @return {boolean} Contains (x, y).
     */
    containsXY(e, t) {
      const i = this.getClosestPoint([e, t]);
      return i[0] === e && i[1] === t;
    }
    /**
     * Return the closest point of the geometry to the passed point as
     * {@link module:ol/coordinate~Coordinate coordinate}.
     * @param {import("../coordinate.js").Coordinate} point Point.
     * @param {import("../coordinate.js").Coordinate} [closestPoint] Closest point.
     * @return {import("../coordinate.js").Coordinate} Closest point.
     * @api
     */
    getClosestPoint(e, t) {
      return t = t || [NaN, NaN], this.closestPointXY(e[0], e[1], t, 1 / 0), t;
    }
    /**
     * Returns true if this geometry includes the specified coordinate. If the
     * coordinate is on the boundary of the geometry, returns false.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @return {boolean} Contains coordinate.
     * @api
     */
    intersectsCoordinate(e) {
      return this.containsXY(e[0], e[1]);
    }
    /**
     * @abstract
     * @param {import("../extent.js").Extent} extent Extent.
     * @protected
     * @return {import("../extent.js").Extent} extent Extent.
     */
    computeExtent(e) {
      return yi();
    }
    /**
     * Get the extent of the geometry.
     * @param {import("../extent.js").Extent} [extent] Extent.
     * @return {import("../extent.js").Extent} extent Extent.
     * @api
     */
    getExtent(e) {
      if (this.extentRevision_ != this.getRevision()) {
        const t = this.computeExtent(this.extent_);
        (isNaN(t[0]) || isNaN(t[1])) && ZE(t), this.extentRevision_ = this.getRevision();
      }
      return FB(this.extent_, e);
    }
    /**
     * Rotate the geometry around a given coordinate. This modifies the geometry
     * coordinates in place.
     * @abstract
     * @param {number} angle Rotation angle in radians.
     * @param {import("../coordinate.js").Coordinate} anchor The rotation center.
     * @api
     */
    rotate(e, t) {
      yi();
    }
    /**
     * Scale the geometry (with an optional origin).  This modifies the geometry
     * coordinates in place.
     * @abstract
     * @param {number} sx The scaling factor in the x-direction.
     * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).
     * @param {import("../coordinate.js").Coordinate} [anchor] The scale origin (defaults to the center
     *     of the geometry extent).
     * @api
     */
    scale(e, t, i) {
      yi();
    }
    /**
     * Create a simplified version of this geometry.  For linestrings, this uses
     * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)
     * algorithm.  For polygons, a quantization-based
     * simplification is used to preserve topology.
     * @param {number} tolerance The tolerance distance for simplification.
     * @return {Geometry} A new, simplified version of the original geometry.
     * @api
     */
    simplify(e) {
      return this.getSimplifiedGeometry(e * e);
    }
    /**
     * Create a simplified version of this geometry using the Douglas Peucker
     * algorithm.
     * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.
     * @abstract
     * @param {number} squaredTolerance Squared tolerance.
     * @return {Geometry} Simplified geometry.
     */
    getSimplifiedGeometry(e) {
      return yi();
    }
    /**
     * Get the type of this geometry.
     * @abstract
     * @return {Type} Geometry type.
     */
    getType() {
      return yi();
    }
    /**
     * Apply a transform function to the coordinates of the geometry.
     * The geometry is modified in place.
     * If you do not want the geometry modified in place, first `clone()` it and
     * then use this function on the clone.
     * @abstract
     * @param {import("../proj.js").TransformFunction} transformFn Transform function.
     * Called with a flat array of geometry coordinates.
     */
    applyTransform(e) {
      yi();
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @abstract
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     */
    intersectsExtent(e) {
      return yi();
    }
    /**
     * Translate the geometry.  This modifies the geometry coordinates in place.  If
     * instead you want a new geometry, first `clone()` this geometry.
     * @abstract
     * @param {number} deltaX Delta X.
     * @param {number} deltaY Delta Y.
     * @api
     */
    translate(e, t) {
      yi();
    }
    /**
     * Transform each coordinate of the geometry from one coordinate reference
     * system to another. The geometry is modified in place.
     * For example, a line will be transformed to a line and a circle to a circle.
     * If you do not want the geometry modified in place, first `clone()` it and
     * then use this function on the clone.
     *
     * @param {import("../proj.js").ProjectionLike} source The current projection.  Can be a
     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.
     * @param {import("../proj.js").ProjectionLike} destination The desired projection.  Can be a
     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.
     * @return {Geometry} This geometry.  Note that original geometry is
     *     modified in place.
     * @api
     */
    transform(e, t) {
      const i = Er(e), a = i.getUnits() == "tile-pixels" ? function(o, u, c) {
        const p = i.getExtent(), y = i.getWorldExtent(), _ = Cs(y) / Cs(p);
        return Rf(
          P3,
          y[0],
          y[3],
          _,
          -_,
          0,
          0,
          0
        ), Qg(
          o,
          0,
          o.length,
          c,
          P3,
          u
        ), ME(i, t)(
          o,
          u,
          c
        );
      } : ME(i, t);
      return this.applyTransform(a), this;
    }
  }
  const NJ = LJ;
  class DJ extends NJ {
    constructor() {
      super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
    }
    /**
     * @param {import("../extent.js").Extent} extent Extent.
     * @protected
     * @return {import("../extent.js").Extent} extent Extent.
     */
    computeExtent(e) {
      return WA(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride,
        e
      );
    }
    /**
     * @abstract
     * @return {Array<*> | null} Coordinates.
     */
    getCoordinates() {
      return yi();
    }
    /**
     * Return the first coordinate of the geometry.
     * @return {import("../coordinate.js").Coordinate} First coordinate.
     * @api
     */
    getFirstCoordinate() {
      return this.flatCoordinates.slice(0, this.stride);
    }
    /**
     * @return {Array<number>} Flat coordinates.
     */
    getFlatCoordinates() {
      return this.flatCoordinates;
    }
    /**
     * Return the last coordinate of the geometry.
     * @return {import("../coordinate.js").Coordinate} Last point.
     * @api
     */
    getLastCoordinate() {
      return this.flatCoordinates.slice(
        this.flatCoordinates.length - this.stride
      );
    }
    /**
     * Return the {@link import("./Geometry.js").GeometryLayout layout} of the geometry.
     * @return {import("./Geometry.js").GeometryLayout} Layout.
     * @api
     */
    getLayout() {
      return this.layout;
    }
    /**
     * Create a simplified version of this geometry using the Douglas Peucker algorithm.
     * @param {number} squaredTolerance Squared tolerance.
     * @return {SimpleGeometry} Simplified geometry.
     */
    getSimplifiedGeometry(e) {
      if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), e < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && e <= this.simplifiedGeometryMaxMinSquaredTolerance)
        return this;
      const t = this.getSimplifiedGeometryInternal(e);
      return t.getFlatCoordinates().length < this.flatCoordinates.length ? t : (this.simplifiedGeometryMaxMinSquaredTolerance = e, this);
    }
    /**
     * @param {number} squaredTolerance Squared tolerance.
     * @return {SimpleGeometry} Simplified geometry.
     * @protected
     */
    getSimplifiedGeometryInternal(e) {
      return this;
    }
    /**
     * @return {number} Stride.
     */
    getStride() {
      return this.stride;
    }
    /**
     * @param {import("./Geometry.js").GeometryLayout} layout Layout.
     * @param {Array<number>} flatCoordinates Flat coordinates.
     */
    setFlatCoordinates(e, t) {
      this.stride = k3(e), this.layout = e, this.flatCoordinates = t;
    }
    /**
     * @abstract
     * @param {!Array<*>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     */
    setCoordinates(e, t) {
      yi();
    }
    /**
     * @param {import("./Geometry.js").GeometryLayout|undefined} layout Layout.
     * @param {Array<*>} coordinates Coordinates.
     * @param {number} nesting Nesting.
     * @protected
     */
    setLayout(e, t, i) {
      let a;
      if (e)
        a = k3(e);
      else {
        for (let o = 0; o < i; ++o) {
          if (t.length === 0) {
            this.layout = "XY", this.stride = 2;
            return;
          }
          t = /** @type {Array<unknown>} */
          t[0];
        }
        a = t.length, e = IJ(a);
      }
      this.layout = e, this.stride = a;
    }
    /**
     * Apply a transform function to the coordinates of the geometry.
     * The geometry is modified in place.
     * If you do not want the geometry modified in place, first `clone()` it and
     * then use this function on the clone.
     * @param {import("../proj.js").TransformFunction} transformFn Transform function.
     * Called with a flat array of geometry coordinates.
     * @api
     */
    applyTransform(e) {
      this.flatCoordinates && (e(this.flatCoordinates, this.flatCoordinates, this.stride), this.changed());
    }
    /**
     * Rotate the geometry around a given coordinate. This modifies the geometry
     * coordinates in place.
     * @param {number} angle Rotation angle in counter-clockwise radians.
     * @param {import("../coordinate.js").Coordinate} anchor The rotation center.
     * @api
     */
    rotate(e, t) {
      const i = this.getFlatCoordinates();
      if (i) {
        const a = this.getStride();
        Mj(
          i,
          0,
          i.length,
          a,
          e,
          t,
          i
        ), this.changed();
      }
    }
    /**
     * Scale the geometry (with an optional origin).  This modifies the geometry
     * coordinates in place.
     * @param {number} sx The scaling factor in the x-direction.
     * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).
     * @param {import("../coordinate.js").Coordinate} [anchor] The scale origin (defaults to the center
     *     of the geometry extent).
     * @api
     */
    scale(e, t, i) {
      t === void 0 && (t = e), i || (i = Cp(this.getExtent()));
      const a = this.getFlatCoordinates();
      if (a) {
        const o = this.getStride();
        OJ(
          a,
          0,
          a.length,
          o,
          e,
          t,
          i,
          a
        ), this.changed();
      }
    }
    /**
     * Translate the geometry.  This modifies the geometry coordinates in place.  If
     * instead you want a new geometry, first `clone()` this geometry.
     * @param {number} deltaX Delta X.
     * @param {number} deltaY Delta Y.
     * @api
     */
    translate(e, t) {
      const i = this.getFlatCoordinates();
      if (i) {
        const a = this.getStride();
        AJ(
          i,
          0,
          i.length,
          a,
          e,
          t,
          i
        ), this.changed();
      }
    }
  }
  function IJ(n) {
    let e;
    return n == 2 ? e = "XY" : n == 3 ? e = "XYZ" : n == 4 && (e = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
    e;
  }
  function k3(n) {
    let e;
    return n == "XY" ? e = 2 : n == "XYZ" || n == "XYM" ? e = 3 : n == "XYZM" && (e = 4), /** @type {number} */
    e;
  }
  function PJ(n, e, t) {
    const i = n.getFlatCoordinates();
    if (!i)
      return null;
    const a = n.getStride();
    return Qg(
      i,
      0,
      i.length,
      a,
      e,
      t
    );
  }
  const hS = DJ;
  function F3(n, e, t, i, a, o, u) {
    const c = n[e], p = n[e + 1], y = n[t] - c, _ = n[t + 1] - p;
    let S;
    if (y === 0 && _ === 0)
      S = e;
    else {
      const b = ((a - c) * y + (o - p) * _) / (y * y + _ * _);
      if (b > 1)
        S = t;
      else if (b > 0) {
        for (let T = 0; T < i; ++T)
          u[T] = _c(
            n[e + T],
            n[t + T],
            b
          );
        u.length = i;
        return;
      } else
        S = e;
    }
    for (let b = 0; b < i; ++b)
      u[b] = n[S + b];
    u.length = i;
  }
  function Oj(n, e, t, i, a) {
    let o = n[e], u = n[e + 1];
    for (e += i; e < t; e += i) {
      const c = n[e], p = n[e + 1], y = Pv(o, u, c, p);
      y > a && (a = y), o = c, u = p;
    }
    return a;
  }
  function Aj(n, e, t, i, a) {
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      a = Oj(n, e, c, i, a), e = c;
    }
    return a;
  }
  function kJ(n, e, t, i, a) {
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      a = Aj(n, e, c, i, a), e = c[c.length - 1];
    }
    return a;
  }
  function Lj(n, e, t, i, a, o, u, c, p, y, _) {
    if (e == t)
      return y;
    let S, b;
    if (a === 0) {
      if (b = Pv(
        u,
        c,
        n[e],
        n[e + 1]
      ), b < y) {
        for (S = 0; S < i; ++S)
          p[S] = n[e + S];
        return p.length = i, b;
      }
      return y;
    }
    _ = _ || [NaN, NaN];
    let T = e + i;
    for (; T < t; )
      if (F3(
        n,
        T - i,
        T,
        i,
        u,
        c,
        _
      ), b = Pv(u, c, _[0], _[1]), b < y) {
        for (y = b, S = 0; S < i; ++S)
          p[S] = _[S];
        p.length = i, T += i;
      } else
        T += i * Math.max(
          (Math.sqrt(b) - Math.sqrt(y)) / a | 0,
          1
        );
    if (o && (F3(
      n,
      t - i,
      e,
      i,
      u,
      c,
      _
    ), b = Pv(u, c, _[0], _[1]), b < y)) {
      for (y = b, S = 0; S < i; ++S)
        p[S] = _[S];
      p.length = i;
    }
    return y;
  }
  function Nj(n, e, t, i, a, o, u, c, p, y, _) {
    _ = _ || [NaN, NaN];
    for (let S = 0, b = t.length; S < b; ++S) {
      const T = t[S];
      y = Lj(
        n,
        e,
        T,
        i,
        a,
        o,
        u,
        c,
        p,
        y,
        _
      ), e = T;
    }
    return y;
  }
  function FJ(n, e, t, i, a, o, u, c, p, y, _) {
    _ = _ || [NaN, NaN];
    for (let S = 0, b = t.length; S < b; ++S) {
      const T = t[S];
      y = Nj(
        n,
        e,
        T,
        i,
        a,
        o,
        u,
        c,
        p,
        y,
        _
      ), e = T[T.length - 1];
    }
    return y;
  }
  function jJ(n, e, t, i) {
    for (let a = 0, o = t.length; a < o; ++a)
      n[e++] = t[a];
    return e;
  }
  function IL(n, e, t, i) {
    for (let a = 0, o = t.length; a < o; ++a) {
      const u = t[a];
      for (let c = 0; c < i; ++c)
        n[e++] = u[c];
    }
    return e;
  }
  function Dj(n, e, t, i, a) {
    a = a || [];
    let o = 0;
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = IL(
        n,
        e,
        t[u],
        i
      );
      a[o++] = p, e = p;
    }
    return a.length = o, a;
  }
  function UJ(n, e, t, i, a) {
    a = a || [];
    let o = 0;
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = Dj(
        n,
        e,
        t[u],
        i,
        a[o]
      );
      p.length === 0 && (p[0] = e), a[o++] = p, e = p[p.length - 1];
    }
    return a.length = o, a;
  }
  function PL(n, e, t, i, a, o, u) {
    const c = (t - e) / i;
    if (c < 3) {
      for (; e < t; e += i)
        o[u++] = n[e], o[u++] = n[e + 1];
      return u;
    }
    const p = new Array(c);
    p[0] = 1, p[c - 1] = 1;
    const y = [e, t - i];
    let _ = 0;
    for (; y.length > 0; ) {
      const S = y.pop(), b = y.pop();
      let T = 0;
      const O = n[b], N = n[b + 1], D = n[S], k = n[S + 1];
      for (let $ = b + i; $ < S; $ += i) {
        const B = n[$], V = n[$ + 1], z = $B(B, V, O, N, D, k);
        z > T && (_ = $, T = z);
      }
      T > a && (p[(_ - e) / i] = 1, b + i < _ && y.push(b, _), _ + i < S && y.push(_, S));
    }
    for (let S = 0; S < c; ++S)
      p[S] && (o[u++] = n[e + S * i], o[u++] = n[e + S * i + 1]);
    return u;
  }
  function zJ(n, e, t, i, a, o, u, c) {
    for (let p = 0, y = t.length; p < y; ++p) {
      const _ = t[p];
      u = PL(
        n,
        e,
        _,
        i,
        a,
        o,
        u
      ), c.push(u), e = _;
    }
    return u;
  }
  function Rv(n, e) {
    return e * Math.round(n / e);
  }
  function $J(n, e, t, i, a, o, u) {
    if (e == t)
      return u;
    let c = Rv(n[e], a), p = Rv(n[e + 1], a);
    e += i, o[u++] = c, o[u++] = p;
    let y, _;
    do
      if (y = Rv(n[e], a), _ = Rv(n[e + 1], a), e += i, e == t)
        return o[u++] = y, o[u++] = _, u;
    while (y == c && _ == p);
    for (; e < t; ) {
      const S = Rv(n[e], a), b = Rv(n[e + 1], a);
      if (e += i, S == y && b == _)
        continue;
      const T = y - c, O = _ - p, N = S - c, D = b - p;
      if (T * D == O * N && (T < 0 && N < T || T == N || T > 0 && N > T) && (O < 0 && D < O || O == D || O > 0 && D > O)) {
        y = S, _ = b;
        continue;
      }
      o[u++] = y, o[u++] = _, c = y, p = _, y = S, _ = b;
    }
    return o[u++] = y, o[u++] = _, u;
  }
  function kL(n, e, t, i, a, o, u, c) {
    for (let p = 0, y = t.length; p < y; ++p) {
      const _ = t[p];
      u = $J(
        n,
        e,
        _,
        i,
        a,
        o,
        u
      ), c.push(u), e = _;
    }
    return u;
  }
  function BJ(n, e, t, i, a, o, u, c) {
    for (let p = 0, y = t.length; p < y; ++p) {
      const _ = t[p], S = [];
      u = kL(
        n,
        e,
        _,
        i,
        a,
        o,
        u,
        S
      ), c.push(S), e = _[_.length - 1];
    }
    return u;
  }
  function Av(n, e, t, i, a) {
    a = a !== void 0 ? a : [];
    let o = 0;
    for (let u = e; u < t; u += i)
      a[o++] = n.slice(u, u + i);
    return a.length = o, a;
  }
  function fw(n, e, t, i, a) {
    a = a !== void 0 ? a : [];
    let o = 0;
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = t[u];
      a[o++] = Av(
        n,
        e,
        p,
        i,
        a[o]
      ), e = p;
    }
    return a.length = o, a;
  }
  function MA(n, e, t, i, a) {
    a = a !== void 0 ? a : [];
    let o = 0;
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = t[u];
      a[o++] = p.length === 1 && p[0] === e ? [] : fw(
        n,
        e,
        p,
        i,
        a[o]
      ), e = p[p.length - 1];
    }
    return a.length = o, a;
  }
  function Ij(n, e, t, i) {
    let a = 0, o = n[t - i], u = n[t - i + 1];
    for (; e < t; e += i) {
      const c = n[e], p = n[e + 1];
      a += u * c - o * p, o = c, u = p;
    }
    return a / 2;
  }
  function Pj(n, e, t, i) {
    let a = 0;
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      a += Ij(n, e, c, i), e = c;
    }
    return a;
  }
  function VJ(n, e, t, i) {
    let a = 0;
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      a += Pj(n, e, c, i), e = c[c.length - 1];
    }
    return a;
  }
  class hw extends hS {
    /**
     * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
     *     For internal use, flat coordinates in combination with `layout` are also accepted.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     */
    constructor(e, t) {
      super(), this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, t !== void 0 && !Array.isArray(e[0]) ? this.setFlatCoordinates(
        t,
        /** @type {Array<number>} */
        e
      ) : this.setCoordinates(
        /** @type {Array<import("../coordinate.js").Coordinate>} */
        e,
        t
      );
    }
    /**
     * Make a complete copy of the geometry.
     * @return {!LinearRing} Clone.
     * @api
     */
    clone() {
      return new hw(this.flatCoordinates.slice(), this.layout);
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      return a < Rw(this.getExtent(), e, t) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
        Oj(
          this.flatCoordinates,
          0,
          this.flatCoordinates.length,
          this.stride,
          0
        )
      ), this.maxDeltaRevision_ = this.getRevision()), Lj(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride,
        this.maxDelta_,
        !0,
        e,
        t,
        i,
        a
      ));
    }
    /**
     * Return the area of the linear ring on projected plane.
     * @return {number} Area (on projected plane).
     * @api
     */
    getArea() {
      return Ij(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride
      );
    }
    /**
     * Return the coordinates of the linear ring.
     * @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
     * @api
     */
    getCoordinates() {
      return Av(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride
      );
    }
    /**
     * @param {number} squaredTolerance Squared tolerance.
     * @return {LinearRing} Simplified LinearRing.
     * @protected
     */
    getSimplifiedGeometryInternal(e) {
      const t = [];
      return t.length = PL(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride,
        e,
        t,
        0
      ), new hw(t, "XY");
    }
    /**
     * Get the type of this geometry.
     * @return {import("./Geometry.js").Type} Geometry type.
     * @api
     */
    getType() {
      return "LinearRing";
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     * @api
     */
    intersectsExtent(e) {
      return !1;
    }
    /**
     * Set the coordinates of the linear ring.
     * @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @api
     */
    setCoordinates(e, t) {
      this.setLayout(t, e, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = IL(
        this.flatCoordinates,
        0,
        e,
        this.stride
      ), this.changed();
    }
  }
  const j3 = hw;
  class FL extends hS {
    /**
     * @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     */
    constructor(e, t) {
      super(), this.setCoordinates(e, t);
    }
    /**
     * Make a complete copy of the geometry.
     * @return {!Point} Clone.
     * @api
     */
    clone() {
      const e = new FL(this.flatCoordinates.slice(), this.layout);
      return e.applyProperties(this), e;
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      const o = this.flatCoordinates, u = Pv(
        e,
        t,
        o[0],
        o[1]
      );
      if (u < a) {
        const c = this.stride;
        for (let p = 0; p < c; ++p)
          i[p] = o[p];
        return i.length = c, u;
      }
      return a;
    }
    /**
     * Return the coordinate of the point.
     * @return {import("../coordinate.js").Coordinate} Coordinates.
     * @api
     */
    getCoordinates() {
      return this.flatCoordinates.slice();
    }
    /**
     * @param {import("../extent.js").Extent} extent Extent.
     * @protected
     * @return {import("../extent.js").Extent} extent Extent.
     */
    computeExtent(e) {
      return G2(this.flatCoordinates, e);
    }
    /**
     * Get the type of this geometry.
     * @return {import("./Geometry.js").Type} Geometry type.
     * @api
     */
    getType() {
      return "Point";
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     * @api
     */
    intersectsExtent(e) {
      return HA(e, this.flatCoordinates[0], this.flatCoordinates[1]);
    }
    /**
     * @param {!Array<*>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @api
     */
    setCoordinates(e, t) {
      this.setLayout(t, e, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = jJ(
        this.flatCoordinates,
        0,
        e,
        this.stride
      ), this.changed();
    }
  }
  const dw = FL;
  function HJ(n, e, t, i, a) {
    return !q2(
      a,
      /**
       * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
       * @return {boolean} Contains (x, y).
       */
      function(u) {
        return !Lv(
          n,
          e,
          t,
          i,
          u[0],
          u[1]
        );
      }
    );
  }
  function Lv(n, e, t, i, a, o) {
    let u = 0, c = n[t - i], p = n[t - i + 1];
    for (; e < t; e += i) {
      const y = n[e], _ = n[e + 1];
      p <= o ? _ > o && (y - c) * (o - p) - (a - c) * (_ - p) > 0 && u++ : _ <= o && (y - c) * (o - p) - (a - c) * (_ - p) < 0 && u--, c = y, p = _;
    }
    return u !== 0;
  }
  function jL(n, e, t, i, a, o) {
    if (t.length === 0 || !Lv(n, e, t[0], i, a, o))
      return !1;
    for (let u = 1, c = t.length; u < c; ++u)
      if (Lv(n, t[u - 1], t[u], i, a, o))
        return !1;
    return !0;
  }
  function WJ(n, e, t, i, a, o) {
    if (t.length === 0)
      return !1;
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = t[u];
      if (jL(n, e, p, i, a, o))
        return !0;
      e = p[p.length - 1];
    }
    return !1;
  }
  function UL(n, e, t, i, a, o, u) {
    let c, p, y, _, S, b, T;
    const O = a[o + 1], N = [];
    for (let $ = 0, B = t.length; $ < B; ++$) {
      const V = t[$];
      for (_ = n[V - i], b = n[V - i + 1], c = e; c < V; c += i)
        S = n[c], T = n[c + 1], (O <= b && T <= O || b <= O && O <= T) && (y = (O - b) / (T - b) * (S - _) + _, N.push(y)), _ = S, b = T;
    }
    let D = NaN, k = -1 / 0;
    for (N.sort(sm), _ = N[0], c = 1, p = N.length; c < p; ++c) {
      S = N[c];
      const $ = Math.abs(S - _);
      $ > k && (y = (_ + S) / 2, jL(n, e, t, i, y, O) && (D = y, k = $)), _ = S;
    }
    return isNaN(D) && (D = a[o]), u ? (u.push(D, O, k), u) : [D, O, k];
  }
  function kj(n, e, t, i, a) {
    let o = [];
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = t[u];
      o = UL(
        n,
        e,
        p,
        i,
        a,
        2 * u,
        o
      ), e = p[p.length - 1];
    }
    return o;
  }
  function GJ(n, e, t, i, a) {
    let o;
    for (e += i; e < t; e += i)
      if (o = a(
        n.slice(e - i, e),
        n.slice(e, e + i)
      ), o)
        return o;
    return !1;
  }
  function Fj(n, e, t, i, a) {
    const o = Y2(
      Su(),
      n,
      e,
      t,
      i
    );
    return Zo(a, o) ? xf(a, o) || o[0] >= a[0] && o[2] <= a[2] || o[1] >= a[1] && o[3] <= a[3] ? !0 : GJ(
      n,
      e,
      t,
      i,
      /**
       * @param {import("../../coordinate.js").Coordinate} point1 Start point.
       * @param {import("../../coordinate.js").Coordinate} point2 End point.
       * @return {boolean} `true` if the segment and the extent intersect,
       *     `false` otherwise.
       */
      function(u, c) {
        return jB(a, u, c);
      }
    ) : !1;
  }
  function jj(n, e, t, i, a) {
    return !!(Fj(n, e, t, i, a) || Lv(
      n,
      e,
      t,
      i,
      a[0],
      a[1]
    ) || Lv(
      n,
      e,
      t,
      i,
      a[0],
      a[3]
    ) || Lv(
      n,
      e,
      t,
      i,
      a[2],
      a[1]
    ) || Lv(
      n,
      e,
      t,
      i,
      a[2],
      a[3]
    ));
  }
  function Uj(n, e, t, i, a) {
    if (!jj(n, e, t[0], i, a))
      return !1;
    if (t.length === 1)
      return !0;
    for (let o = 1, u = t.length; o < u; ++o)
      if (HJ(
        n,
        t[o - 1],
        t[o],
        i,
        a
      ) && !Fj(
        n,
        t[o - 1],
        t[o],
        i,
        a
      ))
        return !1;
    return !0;
  }
  function YJ(n, e, t, i, a) {
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      if (Uj(n, e, c, i, a))
        return !0;
      e = c[c.length - 1];
    }
    return !1;
  }
  function qJ(n, e, t, i) {
    for (; e < t - i; ) {
      for (let a = 0; a < i; ++a) {
        const o = n[e + a];
        n[e + a] = n[t - i + a], n[t - i + a] = o;
      }
      e += i, t -= i;
    }
  }
  function zL(n, e, t, i) {
    let a = 0, o = n[t - i], u = n[t - i + 1];
    for (; e < t; e += i) {
      const c = n[e], p = n[e + 1];
      a += (c - o) * (p + u), o = c, u = p;
    }
    return a === 0 ? void 0 : a > 0;
  }
  function zj(n, e, t, i, a) {
    a = a !== void 0 ? a : !1;
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o], p = zL(
        n,
        e,
        c,
        i
      );
      if (o === 0) {
        if (a && p || !a && !p)
          return !1;
      } else if (a && !p || !a && p)
        return !1;
      e = c;
    }
    return !0;
  }
  function XJ(n, e, t, i, a) {
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o];
      if (!zj(n, e, c, i, a))
        return !1;
      c.length && (e = c[c.length - 1]);
    }
    return !0;
  }
  function OA(n, e, t, i, a) {
    a = a !== void 0 ? a : !1;
    for (let o = 0, u = t.length; o < u; ++o) {
      const c = t[o], p = zL(
        n,
        e,
        c,
        i
      );
      (o === 0 ? a && p || !a && !p : a && !p || !a && p) && qJ(n, e, c, i), e = c;
    }
    return e;
  }
  function U3(n, e, t, i, a) {
    for (let o = 0, u = t.length; o < u; ++o)
      e = OA(
        n,
        e,
        t[o],
        i,
        a
      );
    return e;
  }
  function KJ(n, e) {
    const t = [];
    let i = 0, a = 0, o;
    for (let u = 0, c = e.length; u < c; ++u) {
      const p = e[u], y = zL(n, i, p, 2);
      if (o === void 0 && (o = y), y === o)
        t.push(e.slice(a, u + 1));
      else {
        if (t.length === 0)
          continue;
        t[t.length - 1].push(e[a]);
      }
      a = u + 1, i = p;
    }
    return t;
  }
  class qv extends hS {
    /**
     * @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
     *     Array of linear rings that define the polygon. The first linear ring of the
     *     array defines the outer-boundary or surface of the polygon. Each subsequent
     *     linear ring defines a hole in the surface of the polygon. A linear ring is
     *     an array of vertices' coordinates where the first coordinate and the last are
     *     equivalent. (For internal use, flat coordinates in combination with
     *     `layout` and `ends` are also accepted.)
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @param {Array<number>} [ends] Ends (for internal use with flat coordinates).
     */
    constructor(e, t, i) {
      super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, t !== void 0 && i ? (this.setFlatCoordinates(
        t,
        /** @type {Array<number>} */
        e
      ), this.ends_ = i) : this.setCoordinates(
        /** @type {Array<Array<import("../coordinate.js").Coordinate>>} */
        e,
        t
      );
    }
    /**
     * Append the passed linear ring to this polygon.
     * @param {LinearRing} linearRing Linear ring.
     * @api
     */
    appendLinearRing(e) {
      this.flatCoordinates ? o_(this.flatCoordinates, e.getFlatCoordinates()) : this.flatCoordinates = e.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
    }
    /**
     * Make a complete copy of the geometry.
     * @return {!Polygon} Clone.
     * @api
     */
    clone() {
      const e = new qv(
        this.flatCoordinates.slice(),
        this.layout,
        this.ends_.slice()
      );
      return e.applyProperties(this), e;
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      return a < Rw(this.getExtent(), e, t) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
        Aj(
          this.flatCoordinates,
          0,
          this.ends_,
          this.stride,
          0
        )
      ), this.maxDeltaRevision_ = this.getRevision()), Nj(
        this.flatCoordinates,
        0,
        this.ends_,
        this.stride,
        this.maxDelta_,
        !0,
        e,
        t,
        i,
        a
      ));
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @return {boolean} Contains (x, y).
     */
    containsXY(e, t) {
      return jL(
        this.getOrientedFlatCoordinates(),
        0,
        this.ends_,
        this.stride,
        e,
        t
      );
    }
    /**
     * Return the area of the polygon on projected plane.
     * @return {number} Area (on projected plane).
     * @api
     */
    getArea() {
      return Pj(
        this.getOrientedFlatCoordinates(),
        0,
        this.ends_,
        this.stride
      );
    }
    /**
     * Get the coordinate array for this geometry.  This array has the structure
     * of a GeoJSON coordinate array for polygons.
     *
     * @param {boolean} [right] Orient coordinates according to the right-hand
     *     rule (counter-clockwise for exterior and clockwise for interior rings).
     *     If `false`, coordinates will be oriented according to the left-hand rule
     *     (clockwise for exterior and counter-clockwise for interior rings).
     *     By default, coordinate orientation will depend on how the geometry was
     *     constructed.
     * @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
     * @api
     */
    getCoordinates(e) {
      let t;
      return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), OA(t, 0, this.ends_, this.stride, e)) : t = this.flatCoordinates, fw(t, 0, this.ends_, this.stride);
    }
    /**
     * @return {Array<number>} Ends.
     */
    getEnds() {
      return this.ends_;
    }
    /**
     * @return {Array<number>} Interior point.
     */
    getFlatInteriorPoint() {
      if (this.flatInteriorPointRevision_ != this.getRevision()) {
        const e = Cp(this.getExtent());
        this.flatInteriorPoint_ = UL(
          this.getOrientedFlatCoordinates(),
          0,
          this.ends_,
          this.stride,
          e,
          0
        ), this.flatInteriorPointRevision_ = this.getRevision();
      }
      return (
        /** @type {import("../coordinate.js").Coordinate} */
        this.flatInteriorPoint_
      );
    }
    /**
     * Return an interior point of the polygon.
     * @return {Point} Interior point as XYM coordinate, where M is the
     * length of the horizontal intersection that the point belongs to.
     * @api
     */
    getInteriorPoint() {
      return new dw(this.getFlatInteriorPoint(), "XYM");
    }
    /**
     * Return the number of rings of the polygon,  this includes the exterior
     * ring and any interior rings.
     *
     * @return {number} Number of rings.
     * @api
     */
    getLinearRingCount() {
      return this.ends_.length;
    }
    /**
     * Return the Nth linear ring of the polygon geometry. Return `null` if the
     * given index is out of range.
     * The exterior linear ring is available at index `0` and the interior rings
     * at index `1` and beyond.
     *
     * @param {number} index Index.
     * @return {LinearRing|null} Linear ring.
     * @api
     */
    getLinearRing(e) {
      return e < 0 || this.ends_.length <= e ? null : new j3(
        this.flatCoordinates.slice(
          e === 0 ? 0 : this.ends_[e - 1],
          this.ends_[e]
        ),
        this.layout
      );
    }
    /**
     * Return the linear rings of the polygon.
     * @return {Array<LinearRing>} Linear rings.
     * @api
     */
    getLinearRings() {
      const e = this.layout, t = this.flatCoordinates, i = this.ends_, a = [];
      let o = 0;
      for (let u = 0, c = i.length; u < c; ++u) {
        const p = i[u], y = new j3(
          t.slice(o, p),
          e
        );
        a.push(y), o = p;
      }
      return a;
    }
    /**
     * @return {Array<number>} Oriented flat coordinates.
     */
    getOrientedFlatCoordinates() {
      if (this.orientedRevision_ != this.getRevision()) {
        const e = this.flatCoordinates;
        zj(e, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = OA(
          this.orientedFlatCoordinates_,
          0,
          this.ends_,
          this.stride
        )), this.orientedRevision_ = this.getRevision();
      }
      return (
        /** @type {Array<number>} */
        this.orientedFlatCoordinates_
      );
    }
    /**
     * @param {number} squaredTolerance Squared tolerance.
     * @return {Polygon} Simplified Polygon.
     * @protected
     */
    getSimplifiedGeometryInternal(e) {
      const t = [], i = [];
      return t.length = kL(
        this.flatCoordinates,
        0,
        this.ends_,
        this.stride,
        Math.sqrt(e),
        t,
        0,
        i
      ), new qv(t, "XY", i);
    }
    /**
     * Get the type of this geometry.
     * @return {import("./Geometry.js").Type} Geometry type.
     * @api
     */
    getType() {
      return "Polygon";
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     * @api
     */
    intersectsExtent(e) {
      return Uj(
        this.getOrientedFlatCoordinates(),
        0,
        this.ends_,
        this.stride,
        e
      );
    }
    /**
     * Set the coordinates of the polygon.
     * @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @api
     */
    setCoordinates(e, t) {
      this.setLayout(t, e, 2), this.flatCoordinates || (this.flatCoordinates = []);
      const i = Dj(
        this.flatCoordinates,
        0,
        e,
        this.stride,
        this.ends_
      );
      this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed();
    }
  }
  function z3(n) {
    if (Kv(n))
      throw new Error("Cannot create polygon from empty extent");
    const e = n[0], t = n[1], i = n[2], a = n[3], o = [
      e,
      t,
      e,
      a,
      i,
      a,
      i,
      t,
      e,
      t
    ];
    return new qv(o, "XY", [o.length]);
  }
  const Hh = {
    /**
     * Triggered before a layer is rendered.
     * @event module:ol/render/Event~RenderEvent#prerender
     * @api
     */
    PRERENDER: "prerender",
    /**
     * Triggered after a layer is rendered.
     * @event module:ol/render/Event~RenderEvent#postrender
     * @api
     */
    POSTRENDER: "postrender",
    /**
     * Triggered before layers are composed.  When dispatched by the map, the event object will not have
     * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only
     * WebGL layers currently dispatch this event.
     * @event module:ol/render/Event~RenderEvent#precompose
     * @api
     */
    PRECOMPOSE: "precompose",
    /**
     * Triggered after layers are composed.  When dispatched by the map, the event object will not have
     * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only
     * WebGL layers currently dispatch this event.
     * @event module:ol/render/Event~RenderEvent#postcompose
     * @api
     */
    POSTCOMPOSE: "postcompose",
    /**
     * Triggered when rendering is complete, i.e. all sources and tiles have
     * finished loading for the current viewport, and all tiles are faded in.
     * The event object will not have a `context` set.
     * @event module:ol/render/Event~RenderEvent#rendercomplete
     * @api
     */
    RENDERCOMPLETE: "rendercomplete"
  };
  class $L {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, this.color_ = e.color !== void 0 ? e.color : null;
    }
    /**
     * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.
     * @return {Fill} The cloned style.
     * @api
     */
    clone() {
      const e = this.getColor();
      return new $L({
        color: Array.isArray(e) ? e.slice() : e || void 0
      });
    }
    /**
     * Get the fill color.
     * @return {import("../color.js").Color|import("../colorlike.js").ColorLike|null} Color.
     * @api
     */
    getColor() {
      return this.color_;
    }
    /**
     * Set the color.
     *
     * @param {import("../color.js").Color|import("../colorlike.js").ColorLike|null} color Color.
     * @api
     */
    setColor(e) {
      this.color_ = e;
    }
  }
  const BL = $L;
  function $3(n, e, t, i, a, o, u) {
    let c, p;
    const y = (t - e) / i;
    if (y === 1)
      c = e;
    else if (y === 2)
      c = e, p = a;
    else if (y !== 0) {
      let _ = n[e], S = n[e + 1], b = 0;
      const T = [0];
      for (let D = e + i; D < t; D += i) {
        const k = n[D], $ = n[D + 1];
        b += Math.sqrt((k - _) * (k - _) + ($ - S) * ($ - S)), T.push(b), _ = k, S = $;
      }
      const O = a * b, N = qQ(T, O);
      N < 0 ? (p = (O - T[-N - 2]) / (T[-N - 1] - T[-N - 2]), c = e + (-N - 2) * i) : c = e + N * i;
    }
    u = u > 1 ? u : 2, o = o || new Array(u);
    for (let _ = 0; _ < u; ++_)
      o[_] = c === void 0 ? NaN : p === void 0 ? n[c + _] : _c(n[c + _], n[c + i + _], p);
    return o;
  }
  function ZJ(n, e, t, i) {
    let a = n[e], o = n[e + 1], u = 0;
    for (let c = e + i; c < t; c += i) {
      const p = n[c], y = n[c + 1];
      u += Math.sqrt((p - a) * (p - a) + (y - o) * (y - o)), a = p, o = y;
    }
    return u;
  }
  class VL {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, this.color_ = e.color !== void 0 ? e.color : null, this.lineCap_ = e.lineCap, this.lineDash_ = e.lineDash !== void 0 ? e.lineDash : null, this.lineDashOffset_ = e.lineDashOffset, this.lineJoin_ = e.lineJoin, this.miterLimit_ = e.miterLimit, this.width_ = e.width;
    }
    /**
     * Clones the style.
     * @return {Stroke} The cloned style.
     * @api
     */
    clone() {
      const e = this.getColor();
      return new VL({
        color: Array.isArray(e) ? e.slice() : e || void 0,
        lineCap: this.getLineCap(),
        lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0,
        lineDashOffset: this.getLineDashOffset(),
        lineJoin: this.getLineJoin(),
        miterLimit: this.getMiterLimit(),
        width: this.getWidth()
      });
    }
    /**
     * Get the stroke color.
     * @return {import("../color.js").Color|import("../colorlike.js").ColorLike} Color.
     * @api
     */
    getColor() {
      return this.color_;
    }
    /**
     * Get the line cap type for the stroke.
     * @return {CanvasLineCap|undefined} Line cap.
     * @api
     */
    getLineCap() {
      return this.lineCap_;
    }
    /**
     * Get the line dash style for the stroke.
     * @return {Array<number>|null} Line dash.
     * @api
     */
    getLineDash() {
      return this.lineDash_;
    }
    /**
     * Get the line dash offset for the stroke.
     * @return {number|undefined} Line dash offset.
     * @api
     */
    getLineDashOffset() {
      return this.lineDashOffset_;
    }
    /**
     * Get the line join type for the stroke.
     * @return {CanvasLineJoin|undefined} Line join.
     * @api
     */
    getLineJoin() {
      return this.lineJoin_;
    }
    /**
     * Get the miter limit for the stroke.
     * @return {number|undefined} Miter limit.
     * @api
     */
    getMiterLimit() {
      return this.miterLimit_;
    }
    /**
     * Get the stroke width.
     * @return {number|undefined} Width.
     * @api
     */
    getWidth() {
      return this.width_;
    }
    /**
     * Set the color.
     *
     * @param {import("../color.js").Color|import("../colorlike.js").ColorLike} color Color.
     * @api
     */
    setColor(e) {
      this.color_ = e;
    }
    /**
     * Set the line cap.
     *
     * @param {CanvasLineCap|undefined} lineCap Line cap.
     * @api
     */
    setLineCap(e) {
      this.lineCap_ = e;
    }
    /**
     * Set the line dash.
     *
     * @param {Array<number>|null} lineDash Line dash.
     * @api
     */
    setLineDash(e) {
      this.lineDash_ = e;
    }
    /**
     * Set the line dash offset.
     *
     * @param {number|undefined} lineDashOffset Line dash offset.
     * @api
     */
    setLineDashOffset(e) {
      this.lineDashOffset_ = e;
    }
    /**
     * Set the line join.
     *
     * @param {CanvasLineJoin|undefined} lineJoin Line join.
     * @api
     */
    setLineJoin(e) {
      this.lineJoin_ = e;
    }
    /**
     * Set the miter limit.
     *
     * @param {number|undefined} miterLimit Miter limit.
     * @api
     */
    setMiterLimit(e) {
      this.miterLimit_ = e;
    }
    /**
     * Set the width.
     *
     * @param {number|undefined} width Width.
     * @api
     */
    setWidth(e) {
      this.width_ = e;
    }
  }
  const HL = VL, _n = {
    IDLE: 0,
    LOADING: 1,
    LOADED: 2,
    ERROR: 3,
    EMPTY: 4
  };
  function B3(n) {
    return n[0] > 0 && n[1] > 0;
  }
  function QJ(n, e, t) {
    return t === void 0 && (t = [0, 0]), t[0] = n[0] * e + 0.5 | 0, t[1] = n[1] * e + 0.5 | 0, t;
  }
  function Eu(n, e) {
    return Array.isArray(n) ? n : (e === void 0 ? e = [n, n] : (e[0] = n, e[1] = n), e);
  }
  class WL {
    /**
     * @param {Options} options Options.
     */
    constructor(e) {
      this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ = Eu(e.scale), this.displacement_ = e.displacement, this.declutterMode_ = e.declutterMode;
    }
    /**
     * Clones the style.
     * @return {ImageStyle} The cloned style.
     * @api
     */
    clone() {
      const e = this.getScale();
      return new WL({
        opacity: this.getOpacity(),
        scale: Array.isArray(e) ? e.slice() : e,
        rotation: this.getRotation(),
        rotateWithView: this.getRotateWithView(),
        displacement: this.getDisplacement().slice(),
        declutterMode: this.getDeclutterMode()
      });
    }
    /**
     * Get the symbolizer opacity.
     * @return {number} Opacity.
     * @api
     */
    getOpacity() {
      return this.opacity_;
    }
    /**
     * Determine whether the symbolizer rotates with the map.
     * @return {boolean} Rotate with map.
     * @api
     */
    getRotateWithView() {
      return this.rotateWithView_;
    }
    /**
     * Get the symoblizer rotation.
     * @return {number} Rotation.
     * @api
     */
    getRotation() {
      return this.rotation_;
    }
    /**
     * Get the symbolizer scale.
     * @return {number|import("../size.js").Size} Scale.
     * @api
     */
    getScale() {
      return this.scale_;
    }
    /**
     * Get the symbolizer scale array.
     * @return {import("../size.js").Size} Scale array.
     */
    getScaleArray() {
      return this.scaleArray_;
    }
    /**
     * Get the displacement of the shape
     * @return {Array<number>} Shape's center displacement
     * @api
     */
    getDisplacement() {
      return this.displacement_;
    }
    /**
     * Get the declutter mode of the shape
     * @return {"declutter"|"obstacle"|"none"|undefined} Shape's declutter mode
     * @api
     */
    getDeclutterMode() {
      return this.declutterMode_;
    }
    /**
     * Get the anchor point in pixels. The anchor determines the center point for the
     * symbolizer.
     * @abstract
     * @return {Array<number>} Anchor.
     */
    getAnchor() {
      return yi();
    }
    /**
     * Get the image element for the symbolizer.
     * @abstract
     * @param {number} pixelRatio Pixel ratio.
     * @return {import('../DataTile.js').ImageLike} Image element.
     */
    getImage(e) {
      return yi();
    }
    /**
     * @abstract
     * @return {import('../DataTile.js').ImageLike} Image element.
     */
    getHitDetectionImage() {
      return yi();
    }
    /**
     * Get the image pixel ratio.
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} Pixel ratio.
     */
    getPixelRatio(e) {
      return 1;
    }
    /**
     * @abstract
     * @return {import("../ImageState.js").default} Image state.
     */
    getImageState() {
      return yi();
    }
    /**
     * @abstract
     * @return {import("../size.js").Size} Image size.
     */
    getImageSize() {
      return yi();
    }
    /**
     * Get the origin of the symbolizer.
     * @abstract
     * @return {Array<number>} Origin.
     */
    getOrigin() {
      return yi();
    }
    /**
     * Get the size of the symbolizer (in pixels).
     * @abstract
     * @return {import("../size.js").Size} Size.
     */
    getSize() {
      return yi();
    }
    /**
     * Set the displacement.
     *
     * @param {Array<number>} displacement Displacement.
     * @api
     */
    setDisplacement(e) {
      this.displacement_ = e;
    }
    /**
     * Set the opacity.
     *
     * @param {number} opacity Opacity.
     * @api
     */
    setOpacity(e) {
      this.opacity_ = e;
    }
    /**
     * Set whether to rotate the style with the view.
     *
     * @param {boolean} rotateWithView Rotate with map.
     * @api
     */
    setRotateWithView(e) {
      this.rotateWithView_ = e;
    }
    /**
     * Set the rotation.
     *
     * @param {number} rotation Rotation.
     * @api
     */
    setRotation(e) {
      this.rotation_ = e;
    }
    /**
     * Set the scale.
     *
     * @param {number|import("../size.js").Size} scale Scale.
     * @api
     */
    setScale(e) {
      this.scale_ = e, this.scaleArray_ = Eu(e);
    }
    /**
     * @abstract
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    listenImageChange(e) {
      yi();
    }
    /**
     * Load not yet loaded URI.
     * @abstract
     */
    load() {
      yi();
    }
    /**
     * @abstract
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    unlistenImageChange(e) {
      yi();
    }
  }
  const $j = WL, jE = {
    name: "rgb",
    min: [0, 0, 0],
    max: [255, 255, 255],
    channel: ["red", "green", "blue"],
    alias: ["RGB"]
  };
  var Js = {
    name: "xyz",
    min: [0, 0, 0],
    channel: ["X", "Y", "Z"],
    alias: ["XYZ", "ciexyz", "cie1931"]
  };
  Js.whitepoint = {
    //1931 2°
    2: {
      //incadescent
      A: [109.85, 100, 35.585],
      // B:[],
      C: [98.074, 100, 118.232],
      D50: [96.422, 100, 82.521],
      D55: [95.682, 100, 92.149],
      //daylight
      D65: [95.045592705167, 100, 108.9057750759878],
      D75: [94.972, 100, 122.638],
      //flourescent
      // F1: [],
      F2: [99.187, 100, 67.395],
      // F3: [],
      // F4: [],
      // F5: [],
      // F6:[],
      F7: [95.044, 100, 108.755],
      // F8: [],
      // F9: [],
      // F10: [],
      F11: [100.966, 100, 64.37],
      // F12: [],
      E: [100, 100, 100]
    },
    //1964  10°
    10: {
      //incadescent
      A: [111.144, 100, 35.2],
      C: [97.285, 100, 116.145],
      D50: [96.72, 100, 81.427],
      D55: [95.799, 100, 90.926],
      //daylight
      D65: [94.811, 100, 107.304],
      D75: [94.416, 100, 120.641],
      //flourescent
      F2: [103.28, 100, 69.026],
      F7: [95.792, 100, 107.687],
      F11: [103.866, 100, 65.627],
      E: [100, 100, 100]
    }
  };
  Js.max = Js.whitepoint[2].D65;
  Js.rgb = function(n, e) {
    e = e || Js.whitepoint[2].E;
    var t = n[0] / e[0], i = n[1] / e[1], a = n[2] / e[2], o, u, c;
    return o = t * 3.240969941904521 + i * -1.537383177570093 + a * -0.498610760293, u = t * -0.96924363628087 + i * 1.87596750150772 + a * 0.041555057407175, c = t * 0.055630079696993 + i * -0.20397695888897 + a * 1.056971514242878, o = o > 31308e-7 ? 1.055 * Math.pow(o, 1 / 2.4) - 0.055 : o = o * 12.92, u = u > 31308e-7 ? 1.055 * Math.pow(u, 1 / 2.4) - 0.055 : u = u * 12.92, c = c > 31308e-7 ? 1.055 * Math.pow(c, 1 / 2.4) - 0.055 : c = c * 12.92, o = Math.min(Math.max(0, o), 1), u = Math.min(Math.max(0, u), 1), c = Math.min(Math.max(0, c), 1), [o * 255, u * 255, c * 255];
  };
  jE.xyz = function(n, e) {
    var t = n[0] / 255, i = n[1] / 255, a = n[2] / 255;
    t = t > 0.04045 ? Math.pow((t + 0.055) / 1.055, 2.4) : t / 12.92, i = i > 0.04045 ? Math.pow((i + 0.055) / 1.055, 2.4) : i / 12.92, a = a > 0.04045 ? Math.pow((a + 0.055) / 1.055, 2.4) : a / 12.92;
    var o = t * 0.41239079926595 + i * 0.35758433938387 + a * 0.18048078840183, u = t * 0.21263900587151 + i * 0.71516867876775 + a * 0.072192315360733, c = t * 0.019330818715591 + i * 0.11919477979462 + a * 0.95053215224966;
    return e = e || Js.whitepoint[2].E, [o * e[0], u * e[1], c * e[2]];
  };
  const GL = {
    name: "luv",
    //NOTE: luv has no rigidly defined limits
    //easyrgb fails to get proper coords
    //boronine states no rigid limits
    //colorMine refers this ones:
    min: [0, -134, -140],
    max: [100, 224, 122],
    channel: ["lightness", "u", "v"],
    alias: ["LUV", "cieluv", "cie1976"],
    xyz: function(n, e, t) {
      var i, a, o, u, c, p, y, _, S, b, T, O, N;
      if (o = n[0], u = n[1], c = n[2], o === 0)
        return [0, 0, 0];
      var D = 0.0011070564598794539;
      return e = e || "D65", t = t || 2, S = Js.whitepoint[t][e][0], b = Js.whitepoint[t][e][1], T = Js.whitepoint[t][e][2], O = 4 * S / (S + 15 * b + 3 * T), N = 9 * b / (S + 15 * b + 3 * T), i = u / (13 * o) + O || 0, a = c / (13 * o) + N || 0, y = o > 8 ? b * Math.pow((o + 16) / 116, 3) : b * o * D, p = y * 9 * i / (4 * a) || 0, _ = y * (12 - 3 * i - 20 * a) / (4 * a) || 0, [p, y, _];
    }
  };
  Js.luv = function(n, e, t) {
    var i, a, o, u, c, p, y, _, S, b, T, O, N, D = 0.008856451679035631, k = 903.2962962962961;
    e = e || "D65", t = t || 2, S = Js.whitepoint[t][e][0], b = Js.whitepoint[t][e][1], T = Js.whitepoint[t][e][2], O = 4 * S / (S + 15 * b + 3 * T), N = 9 * b / (S + 15 * b + 3 * T), p = n[0], y = n[1], _ = n[2], i = 4 * p / (p + 15 * y + 3 * _) || 0, a = 9 * y / (p + 15 * y + 3 * _) || 0;
    var $ = y / b;
    return o = $ <= D ? k * $ : 116 * Math.pow($, 1 / 3) - 16, u = 13 * o * (i - O), c = 13 * o * (a - N), [o, u, c];
  };
  var Bj = {
    name: "lchuv",
    channel: ["lightness", "chroma", "hue"],
    alias: ["LCHuv", "cielchuv"],
    min: [0, 0, 0],
    max: [100, 100, 360],
    luv: function(n) {
      var e = n[0], t = n[1], i = n[2], a, o, u;
      return u = i / 360 * 2 * Math.PI, a = t * Math.cos(u), o = t * Math.sin(u), [e, a, o];
    },
    xyz: function(n) {
      return GL.xyz(Bj.luv(n));
    }
  };
  GL.lchuv = function(n) {
    var e = n[0], t = n[1], i = n[2], a = Math.sqrt(t * t + i * i), o = Math.atan2(i, t), u = o * 360 / 2 / Math.PI;
    return u < 0 && (u += 360), [e, a, u];
  };
  Js.lchuv = function(n) {
    return GL.lchuv(Js.luv(n));
  };
  var JJ = {
    aliceblue: [240, 248, 255],
    antiquewhite: [250, 235, 215],
    aqua: [0, 255, 255],
    aquamarine: [127, 255, 212],
    azure: [240, 255, 255],
    beige: [245, 245, 220],
    bisque: [255, 228, 196],
    black: [0, 0, 0],
    blanchedalmond: [255, 235, 205],
    blue: [0, 0, 255],
    blueviolet: [138, 43, 226],
    brown: [165, 42, 42],
    burlywood: [222, 184, 135],
    cadetblue: [95, 158, 160],
    chartreuse: [127, 255, 0],
    chocolate: [210, 105, 30],
    coral: [255, 127, 80],
    cornflowerblue: [100, 149, 237],
    cornsilk: [255, 248, 220],
    crimson: [220, 20, 60],
    cyan: [0, 255, 255],
    darkblue: [0, 0, 139],
    darkcyan: [0, 139, 139],
    darkgoldenrod: [184, 134, 11],
    darkgray: [169, 169, 169],
    darkgreen: [0, 100, 0],
    darkgrey: [169, 169, 169],
    darkkhaki: [189, 183, 107],
    darkmagenta: [139, 0, 139],
    darkolivegreen: [85, 107, 47],
    darkorange: [255, 140, 0],
    darkorchid: [153, 50, 204],
    darkred: [139, 0, 0],
    darksalmon: [233, 150, 122],
    darkseagreen: [143, 188, 143],
    darkslateblue: [72, 61, 139],
    darkslategray: [47, 79, 79],
    darkslategrey: [47, 79, 79],
    darkturquoise: [0, 206, 209],
    darkviolet: [148, 0, 211],
    deeppink: [255, 20, 147],
    deepskyblue: [0, 191, 255],
    dimgray: [105, 105, 105],
    dimgrey: [105, 105, 105],
    dodgerblue: [30, 144, 255],
    firebrick: [178, 34, 34],
    floralwhite: [255, 250, 240],
    forestgreen: [34, 139, 34],
    fuchsia: [255, 0, 255],
    gainsboro: [220, 220, 220],
    ghostwhite: [248, 248, 255],
    gold: [255, 215, 0],
    goldenrod: [218, 165, 32],
    gray: [128, 128, 128],
    green: [0, 128, 0],
    greenyellow: [173, 255, 47],
    grey: [128, 128, 128],
    honeydew: [240, 255, 240],
    hotpink: [255, 105, 180],
    indianred: [205, 92, 92],
    indigo: [75, 0, 130],
    ivory: [255, 255, 240],
    khaki: [240, 230, 140],
    lavender: [230, 230, 250],
    lavenderblush: [255, 240, 245],
    lawngreen: [124, 252, 0],
    lemonchiffon: [255, 250, 205],
    lightblue: [173, 216, 230],
    lightcoral: [240, 128, 128],
    lightcyan: [224, 255, 255],
    lightgoldenrodyellow: [250, 250, 210],
    lightgray: [211, 211, 211],
    lightgreen: [144, 238, 144],
    lightgrey: [211, 211, 211],
    lightpink: [255, 182, 193],
    lightsalmon: [255, 160, 122],
    lightseagreen: [32, 178, 170],
    lightskyblue: [135, 206, 250],
    lightslategray: [119, 136, 153],
    lightslategrey: [119, 136, 153],
    lightsteelblue: [176, 196, 222],
    lightyellow: [255, 255, 224],
    lime: [0, 255, 0],
    limegreen: [50, 205, 50],
    linen: [250, 240, 230],
    magenta: [255, 0, 255],
    maroon: [128, 0, 0],
    mediumaquamarine: [102, 205, 170],
    mediumblue: [0, 0, 205],
    mediumorchid: [186, 85, 211],
    mediumpurple: [147, 112, 219],
    mediumseagreen: [60, 179, 113],
    mediumslateblue: [123, 104, 238],
    mediumspringgreen: [0, 250, 154],
    mediumturquoise: [72, 209, 204],
    mediumvioletred: [199, 21, 133],
    midnightblue: [25, 25, 112],
    mintcream: [245, 255, 250],
    mistyrose: [255, 228, 225],
    moccasin: [255, 228, 181],
    navajowhite: [255, 222, 173],
    navy: [0, 0, 128],
    oldlace: [253, 245, 230],
    olive: [128, 128, 0],
    olivedrab: [107, 142, 35],
    orange: [255, 165, 0],
    orangered: [255, 69, 0],
    orchid: [218, 112, 214],
    palegoldenrod: [238, 232, 170],
    palegreen: [152, 251, 152],
    paleturquoise: [175, 238, 238],
    palevioletred: [219, 112, 147],
    papayawhip: [255, 239, 213],
    peachpuff: [255, 218, 185],
    peru: [205, 133, 63],
    pink: [255, 192, 203],
    plum: [221, 160, 221],
    powderblue: [176, 224, 230],
    purple: [128, 0, 128],
    rebeccapurple: [102, 51, 153],
    red: [255, 0, 0],
    rosybrown: [188, 143, 143],
    royalblue: [65, 105, 225],
    saddlebrown: [139, 69, 19],
    salmon: [250, 128, 114],
    sandybrown: [244, 164, 96],
    seagreen: [46, 139, 87],
    seashell: [255, 245, 238],
    sienna: [160, 82, 45],
    silver: [192, 192, 192],
    skyblue: [135, 206, 235],
    slateblue: [106, 90, 205],
    slategray: [112, 128, 144],
    slategrey: [112, 128, 144],
    snow: [255, 250, 250],
    springgreen: [0, 255, 127],
    steelblue: [70, 130, 180],
    tan: [210, 180, 140],
    teal: [0, 128, 128],
    thistle: [216, 191, 216],
    tomato: [255, 99, 71],
    turquoise: [64, 224, 208],
    violet: [238, 130, 238],
    wheat: [245, 222, 179],
    white: [255, 255, 255],
    whitesmoke: [245, 245, 245],
    yellow: [255, 255, 0],
    yellowgreen: [154, 205, 50]
  };
  const V3 = /* @__PURE__ */ Cw(JJ);
  var H3 = {
    red: 0,
    orange: 60,
    yellow: 120,
    green: 180,
    blue: 240,
    purple: 300
  };
  function eee(n) {
    var _, S;
    var e, t = [], i = 1, a;
    if (typeof n == "number")
      return { space: "rgb", values: [n >>> 16, (n & 65280) >>> 8, n & 255], alpha: 1 };
    if (typeof n == "number")
      return { space: "rgb", values: [n >>> 16, (n & 65280) >>> 8, n & 255], alpha: 1 };
    if (n = String(n).toLowerCase(), V3[n])
      t = V3[n].slice(), a = "rgb";
    else if (n === "transparent")
      i = 0, a = "rgb", t = [0, 0, 0];
    else if (n[0] === "#") {
      var o = n.slice(1), u = o.length, c = u <= 4;
      i = 1, c ? (t = [
        parseInt(o[0] + o[0], 16),
        parseInt(o[1] + o[1], 16),
        parseInt(o[2] + o[2], 16)
      ], u === 4 && (i = parseInt(o[3] + o[3], 16) / 255)) : (t = [
        parseInt(o[0] + o[1], 16),
        parseInt(o[2] + o[3], 16),
        parseInt(o[4] + o[5], 16)
      ], u === 8 && (i = parseInt(o[6] + o[7], 16) / 255)), t[0] || (t[0] = 0), t[1] || (t[1] = 0), t[2] || (t[2] = 0), a = "rgb";
    } else if (e = /^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)) {
      var p = e[1];
      a = p.replace(/a$/, "");
      var y = a === "cmyk" ? 4 : a === "gray" ? 1 : 3;
      t = e[2].trim().split(/\s*[,\/]\s*|\s+/), a === "color" && (a = t.shift()), t = t.map(function(b, T) {
        if (b[b.length - 1] === "%")
          return b = parseFloat(b) / 100, T === 3 ? b : a === "rgb" ? b * 255 : a[0] === "h" || a[0] === "l" && !T ? b * 100 : a === "lab" ? b * 125 : a === "lch" ? T < 2 ? b * 150 : b * 360 : a[0] === "o" && !T ? b : a === "oklab" ? b * 0.4 : a === "oklch" ? T < 2 ? b * 0.4 : b * 360 : b;
        if (a[T] === "h" || T === 2 && a[a.length - 1] === "h") {
          if (H3[b] !== void 0)
            return H3[b];
          if (b.endsWith("deg"))
            return parseFloat(b);
          if (b.endsWith("turn"))
            return parseFloat(b) * 360;
          if (b.endsWith("grad"))
            return parseFloat(b) * 360 / 400;
          if (b.endsWith("rad"))
            return parseFloat(b) * 180 / Math.PI;
        }
        return b === "none" ? 0 : parseFloat(b);
      }), i = t.length > y ? t.pop() : 1;
    } else
      /[0-9](?:\s|\/|,)/.test(n) && (t = n.match(/([0-9]+)/g).map(function(b) {
        return parseFloat(b);
      }), a = ((S = (_ = n.match(/([a-z])/ig)) == null ? void 0 : _.join("")) == null ? void 0 : S.toLowerCase()) || "rgb");
    return {
      space: a,
      values: t,
      alpha: i
    };
  }
  const CO = {
    name: "hsl",
    min: [0, 0, 0],
    max: [360, 100, 100],
    channel: ["hue", "saturation", "lightness"],
    alias: ["HSL"],
    rgb: function(n) {
      var e = n[0] / 360, t = n[1] / 100, i = n[2] / 100, a, o, u, c, p, y = 0;
      if (t === 0)
        return p = i * 255, [p, p, p];
      for (o = i < 0.5 ? i * (1 + t) : i + t - i * t, a = 2 * i - o, c = [0, 0, 0]; y < 3; )
        u = e + 1 / 3 * -(y - 1), u < 0 ? u++ : u > 1 && u--, p = 6 * u < 1 ? a + (o - a) * 6 * u : 2 * u < 1 ? o : 3 * u < 2 ? a + (o - a) * (2 / 3 - u) * 6 : a, c[y++] = p * 255;
      return c;
    }
  };
  jE.hsl = function(n) {
    var e = n[0] / 255, t = n[1] / 255, i = n[2] / 255, a = Math.min(e, t, i), o = Math.max(e, t, i), u = o - a, c, p, y;
    return o === a ? c = 0 : e === o ? c = (t - i) / u : t === o ? c = 2 + (i - e) / u : i === o && (c = 4 + (e - t) / u), c = Math.min(c * 60, 360), c < 0 && (c += 360), y = (a + o) / 2, o === a ? p = 0 : y <= 0.5 ? p = u / (o + a) : p = u / (2 - o - a), [c, p * 100, y * 100];
  };
  function tee(n) {
    Array.isArray(n) && n.raw && (n = String.raw(...arguments)), n instanceof Number && (n = +n);
    var e, t = eee(n);
    if (!t.space)
      return [];
    const i = t.space[0] === "h" ? CO.min : jE.min, a = t.space[0] === "h" ? CO.max : jE.max;
    return e = Array(3), e[0] = Math.min(Math.max(t.values[0], i[0]), a[0]), e[1] = Math.min(Math.max(t.values[1], i[1]), a[1]), e[2] = Math.min(Math.max(t.values[2], i[2]), a[2]), t.space[0] === "h" && (e = CO.rgb(e)), e.push(Math.min(Math.max(t.alpha, 0), 1)), e;
  }
  function Vj(n) {
    return typeof n == "string" ? n : Wj(n);
  }
  const nee = 1024, rE = {};
  let TO = 0;
  function iee(n) {
    if (n.length === 4)
      return n;
    const e = n.slice();
    return e[3] = 1, e;
  }
  function W3(n) {
    const e = Js.lchuv(jE.xyz(n));
    return e[3] = n[3], e;
  }
  function ree(n) {
    const e = Js.rgb(Bj.xyz(n));
    return e[3] = n[3], e;
  }
  function YL(n) {
    if (rE.hasOwnProperty(n))
      return rE[n];
    if (TO >= nee) {
      let t = 0;
      for (const i in rE)
        t++ & 3 || (delete rE[i], --TO);
    }
    const e = tee(n);
    if (e.length !== 4)
      throw new Error('Failed to parse "' + n + '" as color');
    for (const t of e)
      if (isNaN(t))
        throw new Error('Failed to parse "' + n + '" as color');
    return Hj(e), rE[n] = e, ++TO, e;
  }
  function pw(n) {
    return Array.isArray(n) ? n : YL(n);
  }
  function Hj(n) {
    return n[0] = da(n[0] + 0.5 | 0, 0, 255), n[1] = da(n[1] + 0.5 | 0, 0, 255), n[2] = da(n[2] + 0.5 | 0, 0, 255), n[3] = da(n[3], 0, 1), n;
  }
  function Wj(n) {
    let e = n[0];
    e != (e | 0) && (e = e + 0.5 | 0);
    let t = n[1];
    t != (t | 0) && (t = t + 0.5 | 0);
    let i = n[2];
    i != (i | 0) && (i = i + 0.5 | 0);
    const a = n[3] === void 0 ? 1 : Math.round(n[3] * 100) / 100;
    return "rgba(" + e + "," + t + "," + i + "," + a + ")";
  }
  function aee(n) {
    try {
      return YL(n), !0;
    } catch {
      return !1;
    }
  }
  function zh(n) {
    return Array.isArray(n) ? Wj(n) : n;
  }
  function tl(n, e, t, i) {
    let a;
    return t && t.length ? a = /** @type {HTMLCanvasElement} */
    t.shift() : LL ? a = new OffscreenCanvas(n || 300, e || 300) : a = document.createElement("canvas"), n && (a.width = n), e && (a.height = e), /** @type {CanvasRenderingContext2D} */
    a.getContext("2d", i);
  }
  function Kw(n) {
    const e = n.canvas;
    e.width = 1, e.height = 1, n.clearRect(0, 0, 1, 1);
  }
  function see(n) {
    let e = n.offsetWidth;
    const t = getComputedStyle(n);
    return e += parseInt(t.marginLeft, 10) + parseInt(t.marginRight, 10), e;
  }
  function oee(n) {
    let e = n.offsetHeight;
    const t = getComputedStyle(n);
    return e += parseInt(t.marginTop, 10) + parseInt(t.marginBottom, 10), e;
  }
  function G3(n, e) {
    const t = e.parentNode;
    t && t.replaceChild(n, e);
  }
  function gw(n) {
    return n && n.parentNode ? n.parentNode.removeChild(n) : null;
  }
  function Gj(n) {
    for (; n.lastChild; )
      n.removeChild(n.lastChild);
  }
  function lee(n, e) {
    const t = n.childNodes;
    for (let i = 0; ; ++i) {
      const a = t[i], o = e[i];
      if (!a && !o)
        break;
      if (a !== o) {
        if (!a) {
          n.appendChild(o);
          continue;
        }
        if (!o) {
          n.removeChild(a), --i;
          continue;
        }
        n.insertBefore(o, a);
      }
    }
  }
  const bb = "ol-hidden", uee = "ol-selectable", dS = "ol-unselectable", qL = "ol-control", Y3 = "ol-collapsed", cee = new RegExp(
    [
      "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)",
      "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)",
      "(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)",
      "(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?",
      "(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))",
      "(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",
      `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`
    ].join(""),
    "i"
  ), q3 = [
    "style",
    "variant",
    "weight",
    "size",
    "lineHeight",
    "family"
  ], Yj = function(n) {
    const e = n.match(cee);
    if (!e)
      return null;
    const t = (
      /** @type {FontParameters} */
      {
        lineHeight: "normal",
        size: "1.2em",
        style: "normal",
        weight: "normal",
        variant: "normal"
      }
    );
    for (let i = 0, a = q3.length; i < a; ++i) {
      const o = e[i + 1];
      o !== void 0 && (t[q3[i]] = o);
    }
    return t.families = t.family.split(/,\s?/), t;
  }, qj = "10px sans-serif", Ll = "#000", u_ = "round", xp = [], bp = 0, c_ = "round", UE = 10, zE = "#000", $E = "center", mw = "middle", Nv = [0, 0, 0, 0], BE = 1, mp = new Of();
  let L0 = null, AA;
  const LA = {}, fee = function() {
    const e = "32px ", t = ["monospace", "serif"], i = t.length, a = "wmytzilWMYTZIL@#/&?$%10";
    let o, u;
    function c(y, _, S) {
      let b = !0;
      for (let T = 0; T < i; ++T) {
        const O = t[T];
        if (u = vw(
          y + " " + _ + " " + e + O,
          a
        ), S != O) {
          const N = vw(
            y + " " + _ + " " + e + S + "," + O,
            a
          );
          b = b && N != u;
        }
      }
      return !!b;
    }
    function p() {
      let y = !0;
      const _ = mp.getKeys();
      for (let S = 0, b = _.length; S < b; ++S) {
        const T = _[S];
        mp.get(T) < 100 && (c.apply(this, T.split(`
`)) ? (XE(LA), L0 = null, AA = void 0, mp.set(T, 100)) : (mp.set(T, mp.get(T) + 1, !0), y = !1));
      }
      y && (clearInterval(o), o = void 0);
    }
    return function(y) {
      const _ = Yj(y);
      if (!_)
        return;
      const S = _.families;
      for (let b = 0, T = S.length; b < T; ++b) {
        const O = S[b], N = _.style + `
` + _.weight + `
` + O;
        mp.get(N) === void 0 && (mp.set(N, 100, !0), c(_.style, _.weight, O) || (mp.set(N, 0, !0), o === void 0 && (o = setInterval(p, 32))));
      }
    };
  }(), hee = /* @__PURE__ */ function() {
    let n;
    return function(e) {
      let t = LA[e];
      if (t == null) {
        if (LL) {
          const i = Yj(e), a = Xj(e, "Žg");
          t = (isNaN(Number(i.lineHeight)) ? 1.2 : Number(i.lineHeight)) * (a.actualBoundingBoxAscent + a.actualBoundingBoxDescent);
        } else
          n || (n = document.createElement("div"), n.innerHTML = "M", n.style.minHeight = "0", n.style.maxHeight = "none", n.style.height = "auto", n.style.padding = "0", n.style.border = "none", n.style.position = "absolute", n.style.display = "block", n.style.left = "-99999px"), n.style.font = e, document.body.appendChild(n), t = n.offsetHeight, document.body.removeChild(n);
        LA[e] = t;
      }
      return t;
    };
  }();
  function Xj(n, e) {
    return L0 || (L0 = tl(1, 1)), n != AA && (L0.font = n, AA = L0.font), L0.measureText(e);
  }
  function vw(n, e) {
    return Xj(n, e).width;
  }
  function X3(n, e, t) {
    if (e in t)
      return t[e];
    const i = e.split(`
`).reduce((a, o) => Math.max(a, vw(n, o)), 0);
    return t[e] = i, i;
  }
  function dee(n, e) {
    const t = [], i = [], a = [];
    let o = 0, u = 0, c = 0, p = 0;
    for (let y = 0, _ = e.length; y <= _; y += 2) {
      const S = e[y];
      if (S === `
` || y === _) {
        o = Math.max(o, u), a.push(u), u = 0, c += p;
        continue;
      }
      const b = e[y + 1] || n.font, T = vw(b, S);
      t.push(T), u += T;
      const O = hee(b);
      i.push(O), p = Math.max(p, O);
    }
    return { width: o, height: c, widths: t, heights: i, lineWidths: a };
  }
  function pee(n, e, t, i, a, o, u, c, p, y, _) {
    n.save(), t !== 1 && (n.globalAlpha *= t), e && n.transform.apply(n, e), /** @type {*} */
    i.contextInstructions ? (n.translate(p, y), n.scale(_[0], _[1]), gee(
      /** @type {Label} */
      i,
      n
    )) : _[0] < 0 || _[1] < 0 ? (n.translate(p, y), n.scale(_[0], _[1]), n.drawImage(
      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */
      i,
      a,
      o,
      u,
      c,
      0,
      0,
      u,
      c
    )) : n.drawImage(
      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */
      i,
      a,
      o,
      u,
      c,
      p,
      y,
      u * _[0],
      c * _[1]
    ), n.restore();
  }
  function gee(n, e) {
    const t = n.contextInstructions;
    for (let i = 0, a = t.length; i < a; i += 2)
      Array.isArray(t[i + 1]) ? e[t[i]].apply(
        e,
        t[i + 1]
      ) : e[t[i]] = t[i + 1];
  }
  class XL extends $j {
    /**
     * @param {Options} options Options.
     */
    constructor(e) {
      const t = e.rotateWithView !== void 0 ? e.rotateWithView : !1;
      super({
        opacity: 1,
        rotateWithView: t,
        rotation: e.rotation !== void 0 ? e.rotation : 0,
        scale: e.scale !== void 0 ? e.scale : 1,
        displacement: e.displacement !== void 0 ? e.displacement : [0, 0],
        declutterMode: e.declutterMode
      }), this.canvases_, this.hitDetectionCanvas_ = null, this.fill_ = e.fill !== void 0 ? e.fill : null, this.origin_ = [0, 0], this.points_ = e.points, this.radius_ = e.radius !== void 0 ? e.radius : e.radius1, this.radius2_ = e.radius2, this.angle_ = e.angle !== void 0 ? e.angle : 0, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.size_, this.renderOptions_, this.render();
    }
    /**
     * Clones the style.
     * @return {RegularShape} The cloned style.
     * @api
     */
    clone() {
      const e = this.getScale(), t = new XL({
        fill: this.getFill() ? this.getFill().clone() : void 0,
        points: this.getPoints(),
        radius: this.getRadius(),
        radius2: this.getRadius2(),
        angle: this.getAngle(),
        stroke: this.getStroke() ? this.getStroke().clone() : void 0,
        rotation: this.getRotation(),
        rotateWithView: this.getRotateWithView(),
        scale: Array.isArray(e) ? e.slice() : e,
        displacement: this.getDisplacement().slice(),
        declutterMode: this.getDeclutterMode()
      });
      return t.setOpacity(this.getOpacity()), t;
    }
    /**
     * Get the anchor point in pixels. The anchor determines the center point for the
     * symbolizer.
     * @return {Array<number>} Anchor.
     * @api
     */
    getAnchor() {
      const e = this.size_, t = this.getDisplacement(), i = this.getScaleArray();
      return [
        e[0] / 2 - t[0] / i[0],
        e[1] / 2 + t[1] / i[1]
      ];
    }
    /**
     * Get the angle used in generating the shape.
     * @return {number} Shape's rotation in radians.
     * @api
     */
    getAngle() {
      return this.angle_;
    }
    /**
     * Get the fill style for the shape.
     * @return {import("./Fill.js").default|null} Fill style.
     * @api
     */
    getFill() {
      return this.fill_;
    }
    /**
     * Set the fill style.
     * @param {import("./Fill.js").default|null} fill Fill style.
     * @api
     */
    setFill(e) {
      this.fill_ = e, this.render();
    }
    /**
     * @return {HTMLCanvasElement} Image element.
     */
    getHitDetectionImage() {
      return this.hitDetectionCanvas_ || (this.hitDetectionCanvas_ = this.createHitDetectionCanvas_(
        this.renderOptions_
      )), this.hitDetectionCanvas_;
    }
    /**
     * Get the image icon.
     * @param {number} pixelRatio Pixel ratio.
     * @return {HTMLCanvasElement} Image or Canvas element.
     * @api
     */
    getImage(e) {
      let t = this.canvases_[e];
      if (!t) {
        const i = this.renderOptions_, a = tl(
          i.size * e,
          i.size * e
        );
        this.draw_(i, a, e), t = a.canvas, this.canvases_[e] = t;
      }
      return t;
    }
    /**
     * Get the image pixel ratio.
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} Pixel ratio.
     */
    getPixelRatio(e) {
      return e;
    }
    /**
     * @return {import("../size.js").Size} Image size.
     */
    getImageSize() {
      return this.size_;
    }
    /**
     * @return {import("../ImageState.js").default} Image state.
     */
    getImageState() {
      return _n.LOADED;
    }
    /**
     * Get the origin of the symbolizer.
     * @return {Array<number>} Origin.
     * @api
     */
    getOrigin() {
      return this.origin_;
    }
    /**
     * Get the number of points for generating the shape.
     * @return {number} Number of points for stars and regular polygons.
     * @api
     */
    getPoints() {
      return this.points_;
    }
    /**
     * Get the (primary) radius for the shape.
     * @return {number} Radius.
     * @api
     */
    getRadius() {
      return this.radius_;
    }
    /**
     * Get the secondary radius for the shape.
     * @return {number|undefined} Radius2.
     * @api
     */
    getRadius2() {
      return this.radius2_;
    }
    /**
     * Get the size of the symbolizer (in pixels).
     * @return {import("../size.js").Size} Size.
     * @api
     */
    getSize() {
      return this.size_;
    }
    /**
     * Get the stroke style for the shape.
     * @return {import("./Stroke.js").default|null} Stroke style.
     * @api
     */
    getStroke() {
      return this.stroke_;
    }
    /**
     * Set the stroke style.
     * @param {import("./Stroke.js").default|null} stroke Stroke style.
     * @api
     */
    setStroke(e) {
      this.stroke_ = e, this.render();
    }
    /**
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    listenImageChange(e) {
    }
    /**
     * Load not yet loaded URI.
     */
    load() {
    }
    /**
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    unlistenImageChange(e) {
    }
    /**
     * Calculate additional canvas size needed for the miter.
     * @param {string} lineJoin Line join
     * @param {number} strokeWidth Stroke width
     * @param {number} miterLimit Miter limit
     * @return {number} Additional canvas size needed
     * @private
     */
    calculateLineJoinSize_(e, t, i) {
      if (t === 0 || this.points_ === 1 / 0 || e !== "bevel" && e !== "miter")
        return t;
      let a = this.radius_, o = this.radius2_ === void 0 ? a : this.radius2_;
      if (a < o) {
        const G = a;
        a = o, o = G;
      }
      const u = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, c = 2 * Math.PI / u, p = o * Math.sin(c), y = Math.sqrt(o * o - p * p), _ = a - y, S = Math.sqrt(p * p + _ * _), b = S / p;
      if (e === "miter" && b <= i)
        return b * t;
      const T = t / 2 / b, O = t / 2 * (_ / S), D = Math.sqrt((a + T) * (a + T) + O * O) - a;
      if (this.radius2_ === void 0 || e === "bevel")
        return D * 2;
      const k = a * Math.sin(c), $ = Math.sqrt(a * a - k * k), B = o - $, z = Math.sqrt(k * k + B * B) / k;
      if (z <= i) {
        const G = z * t / 2 - o - a;
        return 2 * Math.max(D, G);
      }
      return D * 2;
    }
    /**
     * @return {RenderOptions}  The render options
     * @protected
     */
    createRenderOptions() {
      let e = u_, t = c_, i = 0, a = null, o = 0, u, c = 0;
      this.stroke_ && (u = zh(this.stroke_.getColor() ?? zE), c = this.stroke_.getWidth() ?? BE, a = this.stroke_.getLineDash(), o = this.stroke_.getLineDashOffset() ?? 0, t = this.stroke_.getLineJoin() ?? c_, e = this.stroke_.getLineCap() ?? u_, i = this.stroke_.getMiterLimit() ?? UE);
      const p = this.calculateLineJoinSize_(t, c, i), y = Math.max(this.radius_, this.radius2_ || 0), _ = Math.ceil(2 * y + p);
      return {
        strokeStyle: u,
        strokeWidth: c,
        size: _,
        lineCap: e,
        lineDash: a,
        lineDashOffset: o,
        lineJoin: t,
        miterLimit: i
      };
    }
    /**
     * @protected
     */
    render() {
      this.renderOptions_ = this.createRenderOptions();
      const e = this.renderOptions_.size;
      this.canvases_ = {}, this.hitDetectionCanvas_ = null, this.size_ = [e, e];
    }
    /**
     * @private
     * @param {RenderOptions} renderOptions Render options.
     * @param {CanvasRenderingContext2D} context The rendering context.
     * @param {number} pixelRatio The pixel ratio.
     */
    draw_(e, t, i) {
      if (t.scale(i, i), t.translate(e.size / 2, e.size / 2), this.createPath_(t), this.fill_) {
        let a = this.fill_.getColor();
        a === null && (a = Ll), t.fillStyle = zh(a), t.fill();
      }
      e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineCap = e.lineCap, t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
    }
    /**
     * @private
     * @param {RenderOptions} renderOptions Render options.
     * @return {HTMLCanvasElement} Canvas containing the icon
     */
    createHitDetectionCanvas_(e) {
      let t;
      if (this.fill_) {
        let i = this.fill_.getColor(), a = 0;
        typeof i == "string" && (i = pw(i)), i === null ? a = 1 : Array.isArray(i) && (a = i.length === 4 ? i[3] : 1), a === 0 && (t = tl(e.size, e.size), this.drawHitDetectionCanvas_(e, t));
      }
      return t ? t.canvas : this.getImage(1);
    }
    /**
     * @private
     * @param {CanvasRenderingContext2D} context The context to draw in.
     */
    createPath_(e) {
      let t = this.points_;
      const i = this.radius_;
      if (t === 1 / 0)
        e.arc(0, 0, i, 0, 2 * Math.PI);
      else {
        const a = this.radius2_ === void 0 ? i : this.radius2_;
        this.radius2_ !== void 0 && (t *= 2);
        const o = this.angle_ - Math.PI / 2, u = 2 * Math.PI / t;
        for (let c = 0; c < t; c++) {
          const p = o + c * u, y = c % 2 === 0 ? i : a;
          e.lineTo(y * Math.cos(p), y * Math.sin(p));
        }
        e.closePath();
      }
    }
    /**
     * @private
     * @param {RenderOptions} renderOptions Render options.
     * @param {CanvasRenderingContext2D} context The context.
     */
    drawHitDetectionCanvas_(e, t) {
      t.translate(e.size / 2, e.size / 2), this.createPath_(t), t.fillStyle = Ll, t.fill(), e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
    }
  }
  const Kj = XL;
  class KL extends Kj {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || { radius: 5 }, super({
        points: 1 / 0,
        fill: e.fill,
        radius: e.radius,
        stroke: e.stroke,
        scale: e.scale !== void 0 ? e.scale : 1,
        rotation: e.rotation !== void 0 ? e.rotation : 0,
        rotateWithView: e.rotateWithView !== void 0 ? e.rotateWithView : !1,
        displacement: e.displacement !== void 0 ? e.displacement : [0, 0],
        declutterMode: e.declutterMode
      });
    }
    /**
     * Clones the style.
     * @return {CircleStyle} The cloned style.
     * @api
     */
    clone() {
      const e = this.getScale(), t = new KL({
        fill: this.getFill() ? this.getFill().clone() : void 0,
        stroke: this.getStroke() ? this.getStroke().clone() : void 0,
        radius: this.getRadius(),
        scale: Array.isArray(e) ? e.slice() : e,
        rotation: this.getRotation(),
        rotateWithView: this.getRotateWithView(),
        displacement: this.getDisplacement().slice(),
        declutterMode: this.getDeclutterMode()
      });
      return t.setOpacity(this.getOpacity()), t;
    }
    /**
     * Set the circle radius.
     *
     * @param {number} radius Circle radius.
     * @api
     */
    setRadius(e) {
      this.radius_ = e, this.render();
    }
  }
  const Zj = KL;
  class Zw {
    /**
     * @param {Options} [options] Style options.
     */
    constructor(e) {
      e = e || {}, this.geometry_ = null, this.geometryFunction_ = K3, e.geometry !== void 0 && this.setGeometry(e.geometry), this.fill_ = e.fill !== void 0 ? e.fill : null, this.image_ = e.image !== void 0 ? e.image : null, this.renderer_ = e.renderer !== void 0 ? e.renderer : null, this.hitDetectionRenderer_ = e.hitDetectionRenderer !== void 0 ? e.hitDetectionRenderer : null, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.text_ = e.text !== void 0 ? e.text : null, this.zIndex_ = e.zIndex;
    }
    /**
     * Clones the style.
     * @return {Style} The cloned style.
     * @api
     */
    clone() {
      let e = this.getGeometry();
      return e && typeof e == "object" && (e = /** @type {import("../geom/Geometry.js").default} */
      e.clone()), new Zw({
        geometry: e ?? void 0,
        fill: this.getFill() ? this.getFill().clone() : void 0,
        image: this.getImage() ? this.getImage().clone() : void 0,
        renderer: this.getRenderer() ?? void 0,
        stroke: this.getStroke() ? this.getStroke().clone() : void 0,
        text: this.getText() ? this.getText().clone() : void 0,
        zIndex: this.getZIndex()
      });
    }
    /**
     * Get the custom renderer function that was configured with
     * {@link #setRenderer} or the `renderer` constructor option.
     * @return {RenderFunction|null} Custom renderer function.
     * @api
     */
    getRenderer() {
      return this.renderer_;
    }
    /**
     * Sets a custom renderer function for this style. When set, `fill`, `stroke`
     * and `image` options of the style will be ignored.
     * @param {RenderFunction|null} renderer Custom renderer function.
     * @api
     */
    setRenderer(e) {
      this.renderer_ = e;
    }
    /**
     * Sets a custom renderer function for this style used
     * in hit detection.
     * @param {RenderFunction|null} renderer Custom renderer function.
     * @api
     */
    setHitDetectionRenderer(e) {
      this.hitDetectionRenderer_ = e;
    }
    /**
     * Get the custom renderer function that was configured with
     * {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.
     * @return {RenderFunction|null} Custom renderer function.
     * @api
     */
    getHitDetectionRenderer() {
      return this.hitDetectionRenderer_;
    }
    /**
     * Get the geometry to be rendered.
     * @return {string|import("../geom/Geometry.js").default|GeometryFunction|null}
     * Feature property or geometry or function that returns the geometry that will
     * be rendered with this style.
     * @api
     */
    getGeometry() {
      return this.geometry_;
    }
    /**
     * Get the function used to generate a geometry for rendering.
     * @return {!GeometryFunction} Function that is called with a feature
     * and returns the geometry to render instead of the feature's geometry.
     * @api
     */
    getGeometryFunction() {
      return this.geometryFunction_;
    }
    /**
     * Get the fill style.
     * @return {import("./Fill.js").default|null} Fill style.
     * @api
     */
    getFill() {
      return this.fill_;
    }
    /**
     * Set the fill style.
     * @param {import("./Fill.js").default|null} fill Fill style.
     * @api
     */
    setFill(e) {
      this.fill_ = e;
    }
    /**
     * Get the image style.
     * @return {import("./Image.js").default|null} Image style.
     * @api
     */
    getImage() {
      return this.image_;
    }
    /**
     * Set the image style.
     * @param {import("./Image.js").default} image Image style.
     * @api
     */
    setImage(e) {
      this.image_ = e;
    }
    /**
     * Get the stroke style.
     * @return {import("./Stroke.js").default|null} Stroke style.
     * @api
     */
    getStroke() {
      return this.stroke_;
    }
    /**
     * Set the stroke style.
     * @param {import("./Stroke.js").default|null} stroke Stroke style.
     * @api
     */
    setStroke(e) {
      this.stroke_ = e;
    }
    /**
     * Get the text style.
     * @return {import("./Text.js").default|null} Text style.
     * @api
     */
    getText() {
      return this.text_;
    }
    /**
     * Set the text style.
     * @param {import("./Text.js").default} text Text style.
     * @api
     */
    setText(e) {
      this.text_ = e;
    }
    /**
     * Get the z-index for the style.
     * @return {number|undefined} ZIndex.
     * @api
     */
    getZIndex() {
      return this.zIndex_;
    }
    /**
     * Set a geometry that is rendered instead of the feature's geometry.
     *
     * @param {string|import("../geom/Geometry.js").default|GeometryFunction} geometry
     *     Feature property or geometry or function returning a geometry to render
     *     for this style.
     * @api
     */
    setGeometry(e) {
      typeof e == "function" ? this.geometryFunction_ = e : typeof e == "string" ? this.geometryFunction_ = function(t) {
        return (
          /** @type {import("../geom/Geometry.js").default} */
          t.get(e)
        );
      } : e ? e !== void 0 && (this.geometryFunction_ = function() {
        return (
          /** @type {import("../geom/Geometry.js").default} */
          e
        );
      }) : this.geometryFunction_ = K3, this.geometry_ = e;
    }
    /**
     * Set the z-index.
     *
     * @param {number|undefined} zIndex ZIndex.
     * @api
     */
    setZIndex(e) {
      this.zIndex_ = e;
    }
  }
  function mee(n) {
    let e;
    if (typeof n == "function")
      e = n;
    else {
      let t;
      Array.isArray(n) ? t = n : (Ei(
        typeof /** @type {?} */
        n.getZIndex == "function",
        "Expected an `Style` or an array of `Style`"
      ), t = [
        /** @type {Style} */
        n
      ]), e = function() {
        return t;
      };
    }
    return e;
  }
  let RO = null;
  function vee(n, e) {
    if (!RO) {
      const t = new BL({
        color: "rgba(255,255,255,0.4)"
      }), i = new HL({
        color: "#3399CC",
        width: 1.25
      });
      RO = [
        new Zw({
          image: new Zj({
            fill: t,
            stroke: i,
            radius: 5
          }),
          fill: t,
          stroke: i
        })
      ];
    }
    return RO;
  }
  function K3(n) {
    return n.getGeometry();
  }
  const SE = Zw, yee = "#333";
  class ZL {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, this.font_ = e.font, this.rotation_ = e.rotation, this.rotateWithView_ = e.rotateWithView, this.scale_ = e.scale, this.scaleArray_ = Eu(e.scale !== void 0 ? e.scale : 1), this.text_ = e.text, this.textAlign_ = e.textAlign, this.justify_ = e.justify, this.repeat_ = e.repeat, this.textBaseline_ = e.textBaseline, this.fill_ = e.fill !== void 0 ? e.fill : new BL({ color: yee }), this.maxAngle_ = e.maxAngle !== void 0 ? e.maxAngle : Math.PI / 4, this.placement_ = e.placement !== void 0 ? e.placement : "point", this.overflow_ = !!e.overflow, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.offsetX_ = e.offsetX !== void 0 ? e.offsetX : 0, this.offsetY_ = e.offsetY !== void 0 ? e.offsetY : 0, this.backgroundFill_ = e.backgroundFill ? e.backgroundFill : null, this.backgroundStroke_ = e.backgroundStroke ? e.backgroundStroke : null, this.padding_ = e.padding === void 0 ? null : e.padding;
    }
    /**
     * Clones the style.
     * @return {Text} The cloned style.
     * @api
     */
    clone() {
      const e = this.getScale();
      return new ZL({
        font: this.getFont(),
        placement: this.getPlacement(),
        repeat: this.getRepeat(),
        maxAngle: this.getMaxAngle(),
        overflow: this.getOverflow(),
        rotation: this.getRotation(),
        rotateWithView: this.getRotateWithView(),
        scale: Array.isArray(e) ? e.slice() : e,
        text: this.getText(),
        textAlign: this.getTextAlign(),
        justify: this.getJustify(),
        textBaseline: this.getTextBaseline(),
        fill: this.getFill() ? this.getFill().clone() : void 0,
        stroke: this.getStroke() ? this.getStroke().clone() : void 0,
        offsetX: this.getOffsetX(),
        offsetY: this.getOffsetY(),
        backgroundFill: this.getBackgroundFill() ? this.getBackgroundFill().clone() : void 0,
        backgroundStroke: this.getBackgroundStroke() ? this.getBackgroundStroke().clone() : void 0,
        padding: this.getPadding() || void 0
      });
    }
    /**
     * Get the `overflow` configuration.
     * @return {boolean} Let text overflow the length of the path they follow.
     * @api
     */
    getOverflow() {
      return this.overflow_;
    }
    /**
     * Get the font name.
     * @return {string|undefined} Font.
     * @api
     */
    getFont() {
      return this.font_;
    }
    /**
     * Get the maximum angle between adjacent characters.
     * @return {number} Angle in radians.
     * @api
     */
    getMaxAngle() {
      return this.maxAngle_;
    }
    /**
     * Get the label placement.
     * @return {TextPlacement} Text placement.
     * @api
     */
    getPlacement() {
      return this.placement_;
    }
    /**
     * Get the repeat interval of the text.
     * @return {number|undefined} Repeat interval in pixels.
     * @api
     */
    getRepeat() {
      return this.repeat_;
    }
    /**
     * Get the x-offset for the text.
     * @return {number} Horizontal text offset.
     * @api
     */
    getOffsetX() {
      return this.offsetX_;
    }
    /**
     * Get the y-offset for the text.
     * @return {number} Vertical text offset.
     * @api
     */
    getOffsetY() {
      return this.offsetY_;
    }
    /**
     * Get the fill style for the text.
     * @return {import("./Fill.js").default|null} Fill style.
     * @api
     */
    getFill() {
      return this.fill_;
    }
    /**
     * Determine whether the text rotates with the map.
     * @return {boolean|undefined} Rotate with map.
     * @api
     */
    getRotateWithView() {
      return this.rotateWithView_;
    }
    /**
     * Get the text rotation.
     * @return {number|undefined} Rotation.
     * @api
     */
    getRotation() {
      return this.rotation_;
    }
    /**
     * Get the text scale.
     * @return {number|import("../size.js").Size|undefined} Scale.
     * @api
     */
    getScale() {
      return this.scale_;
    }
    /**
     * Get the symbolizer scale array.
     * @return {import("../size.js").Size} Scale array.
     */
    getScaleArray() {
      return this.scaleArray_;
    }
    /**
     * Get the stroke style for the text.
     * @return {import("./Stroke.js").default|null} Stroke style.
     * @api
     */
    getStroke() {
      return this.stroke_;
    }
    /**
     * Get the text to be rendered.
     * @return {string|Array<string>|undefined} Text.
     * @api
     */
    getText() {
      return this.text_;
    }
    /**
     * Get the text alignment.
     * @return {CanvasTextAlign|undefined} Text align.
     * @api
     */
    getTextAlign() {
      return this.textAlign_;
    }
    /**
     * Get the justification.
     * @return {TextJustify|undefined} Justification.
     * @api
     */
    getJustify() {
      return this.justify_;
    }
    /**
     * Get the text baseline.
     * @return {CanvasTextBaseline|undefined} Text baseline.
     * @api
     */
    getTextBaseline() {
      return this.textBaseline_;
    }
    /**
     * Get the background fill style for the text.
     * @return {import("./Fill.js").default|null} Fill style.
     * @api
     */
    getBackgroundFill() {
      return this.backgroundFill_;
    }
    /**
     * Get the background stroke style for the text.
     * @return {import("./Stroke.js").default|null} Stroke style.
     * @api
     */
    getBackgroundStroke() {
      return this.backgroundStroke_;
    }
    /**
     * Get the padding for the text.
     * @return {Array<number>|null} Padding.
     * @api
     */
    getPadding() {
      return this.padding_;
    }
    /**
     * Set the `overflow` property.
     *
     * @param {boolean} overflow Let text overflow the path that it follows.
     * @api
     */
    setOverflow(e) {
      this.overflow_ = e;
    }
    /**
     * Set the font.
     *
     * @param {string|undefined} font Font.
     * @api
     */
    setFont(e) {
      this.font_ = e;
    }
    /**
     * Set the maximum angle between adjacent characters.
     *
     * @param {number} maxAngle Angle in radians.
     * @api
     */
    setMaxAngle(e) {
      this.maxAngle_ = e;
    }
    /**
     * Set the x offset.
     *
     * @param {number} offsetX Horizontal text offset.
     * @api
     */
    setOffsetX(e) {
      this.offsetX_ = e;
    }
    /**
     * Set the y offset.
     *
     * @param {number} offsetY Vertical text offset.
     * @api
     */
    setOffsetY(e) {
      this.offsetY_ = e;
    }
    /**
     * Set the text placement.
     *
     * @param {TextPlacement} placement Placement.
     * @api
     */
    setPlacement(e) {
      this.placement_ = e;
    }
    /**
     * Set the repeat interval of the text.
     * @param {number|undefined} [repeat] Repeat interval in pixels.
     * @api
     */
    setRepeat(e) {
      this.repeat_ = e;
    }
    /**
     * Set whether to rotate the text with the view.
     *
     * @param {boolean} rotateWithView Rotate with map.
     * @api
     */
    setRotateWithView(e) {
      this.rotateWithView_ = e;
    }
    /**
     * Set the fill.
     *
     * @param {import("./Fill.js").default|null} fill Fill style.
     * @api
     */
    setFill(e) {
      this.fill_ = e;
    }
    /**
     * Set the rotation.
     *
     * @param {number|undefined} rotation Rotation.
     * @api
     */
    setRotation(e) {
      this.rotation_ = e;
    }
    /**
     * Set the scale.
     *
     * @param {number|import("../size.js").Size|undefined} scale Scale.
     * @api
     */
    setScale(e) {
      this.scale_ = e, this.scaleArray_ = Eu(e !== void 0 ? e : 1);
    }
    /**
     * Set the stroke.
     *
     * @param {import("./Stroke.js").default|null} stroke Stroke style.
     * @api
     */
    setStroke(e) {
      this.stroke_ = e;
    }
    /**
     * Set the text.
     *
     * @param {string|Array<string>|undefined} text Text.
     * @api
     */
    setText(e) {
      this.text_ = e;
    }
    /**
     * Set the text alignment.
     *
     * @param {CanvasTextAlign|undefined} textAlign Text align.
     * @api
     */
    setTextAlign(e) {
      this.textAlign_ = e;
    }
    /**
     * Set the justification.
     *
     * @param {TextJustify|undefined} justify Justification.
     * @api
     */
    setJustify(e) {
      this.justify_ = e;
    }
    /**
     * Set the text baseline.
     *
     * @param {CanvasTextBaseline|undefined} textBaseline Text baseline.
     * @api
     */
    setTextBaseline(e) {
      this.textBaseline_ = e;
    }
    /**
     * Set the background fill.
     *
     * @param {import("./Fill.js").default|null} fill Fill style.
     * @api
     */
    setBackgroundFill(e) {
      this.backgroundFill_ = e;
    }
    /**
     * Set the background stroke.
     *
     * @param {import("./Stroke.js").default|null} stroke Stroke style.
     * @api
     */
    setBackgroundStroke(e) {
      this.backgroundStroke_ = e;
    }
    /**
     * Set the padding (`[top, right, bottom, left]`).
     *
     * @param {Array<number>|null} padding Padding.
     * @api
     */
    setPadding(e) {
      this.padding_ = e;
    }
  }
  const _ee = ZL, ws = {
    ANIMATING: 0,
    INTERACTING: 1
  }, _f = {
    CENTER: "center",
    RESOLUTION: "resolution",
    ROTATION: "rotation"
  }, Eee = 42, QL = 256;
  function Z3(n, e, t) {
    return (
      /**
       * @param {import("./coordinate.js").Coordinate|undefined} center Center.
       * @param {number|undefined} resolution Resolution.
       * @param {import("./size.js").Size} size Viewport size; unused if `onlyCenter` was specified.
       * @param {boolean} [isMoving] True if an interaction or animation is in progress.
       * @param {Array<number>} [centerShift] Shift between map center and viewport center.
       * @return {import("./coordinate.js").Coordinate|undefined} Center.
       */
      function(i, a, o, u, c) {
        if (!i)
          return;
        if (!a && !e)
          return i;
        const p = e ? 0 : o[0] * a, y = e ? 0 : o[1] * a, _ = c ? c[0] : 0, S = c ? c[1] : 0;
        let b = n[0] + p / 2 + _, T = n[2] - p / 2 + _, O = n[1] + y / 2 + S, N = n[3] - y / 2 + S;
        b > T && (b = (T + b) / 2, T = b), O > N && (O = (N + O) / 2, N = O);
        let D = da(i[0], b, T), k = da(i[1], O, N);
        if (u && t && a) {
          const $ = 30 * a;
          D += -$ * Math.log(1 + Math.max(0, b - i[0]) / $) + $ * Math.log(1 + Math.max(0, i[0] - T) / $), k += -$ * Math.log(1 + Math.max(0, O - i[1]) / $) + $ * Math.log(1 + Math.max(0, i[1] - N) / $);
        }
        return [D, k];
      }
    );
  }
  function See(n) {
    return n;
  }
  function JL(n, e, t, i) {
    const a = _i(e) / t[0], o = Cs(e) / t[1];
    return i ? Math.min(n, Math.max(a, o)) : Math.min(n, Math.min(a, o));
  }
  function eN(n, e, t) {
    let i = Math.min(n, e);
    const a = 50;
    return i *= Math.log(1 + a * Math.max(0, n / e - 1)) / a + 1, t && (i = Math.max(i, t), i /= Math.log(1 + a * Math.max(0, t / n - 1)) / a + 1), da(i, t / 2, e * 2);
  }
  function xee(n, e, t, i) {
    return e = e !== void 0 ? e : !0, /**
     * @param {number|undefined} resolution Resolution.
     * @param {number} direction Direction.
     * @param {import("./size.js").Size} size Viewport size.
     * @param {boolean} [isMoving] True if an interaction or animation is in progress.
     * @return {number|undefined} Resolution.
     */
    function(a, o, u, c) {
      if (a !== void 0) {
        const p = n[0], y = n[n.length - 1], _ = t ? JL(
          p,
          t,
          u,
          i
        ) : p;
        if (c)
          return e ? eN(
            a,
            _,
            y
          ) : da(a, y, _);
        const S = Math.min(_, a), b = Math.floor(Gw(n, S, o));
        return n[b] > _ && b < n.length - 1 ? n[b + 1] : n[b];
      }
    };
  }
  function bee(n, e, t, i, a, o) {
    return i = i !== void 0 ? i : !0, t = t !== void 0 ? t : 0, /**
     * @param {number|undefined} resolution Resolution.
     * @param {number} direction Direction.
     * @param {import("./size.js").Size} size Viewport size.
     * @param {boolean} [isMoving] True if an interaction or animation is in progress.
     * @return {number|undefined} Resolution.
     */
    function(u, c, p, y) {
      if (u !== void 0) {
        const _ = a ? JL(
          e,
          a,
          p,
          o
        ) : e;
        if (y)
          return i ? eN(
            u,
            _,
            t
          ) : da(u, t, _);
        const S = 1e-9, b = Math.ceil(
          Math.log(e / _) / Math.log(n) - S
        ), T = -c * (0.5 - S) + 0.5, O = Math.min(_, u), N = Math.floor(
          Math.log(e / O) / Math.log(n) + T
        ), D = Math.max(b, N), k = e / Math.pow(n, D);
        return da(k, t, _);
      }
    };
  }
  function Q3(n, e, t, i, a) {
    return t = t !== void 0 ? t : !0, /**
     * @param {number|undefined} resolution Resolution.
     * @param {number} direction Direction.
     * @param {import("./size.js").Size} size Viewport size.
     * @param {boolean} [isMoving] True if an interaction or animation is in progress.
     * @return {number|undefined} Resolution.
     */
    function(o, u, c, p) {
      if (o !== void 0) {
        const y = i ? JL(
          n,
          i,
          c,
          a
        ) : n;
        return !t || !p ? da(o, e, y) : eN(
          o,
          y,
          e
        );
      }
    };
  }
  function tN(n) {
    if (n !== void 0)
      return 0;
  }
  function J3(n) {
    if (n !== void 0)
      return n;
  }
  function wee(n) {
    const e = 2 * Math.PI / n;
    return (
      /**
       * @param {number|undefined} rotation Rotation.
       * @param {boolean} [isMoving] True if an interaction or animation is in progress.
       * @return {number|undefined} Rotation.
       */
      function(t, i) {
        if (i)
          return t;
        if (t !== void 0)
          return t = Math.floor(t / e + 0.5) * e, t;
      }
    );
  }
  function Cee(n) {
    const e = n === void 0 ? Lb(5) : n;
    return (
      /**
       * @param {number|undefined} rotation Rotation.
       * @param {boolean} [isMoving] True if an interaction or animation is in progress.
       * @return {number|undefined} Rotation.
       */
      function(t, i) {
        return i || t === void 0 ? t : Math.abs(t) <= e ? 0 : t;
      }
    );
  }
  function Qj(n) {
    return Math.pow(n, 3);
  }
  function x_(n) {
    return 1 - Qj(1 - n);
  }
  function Tee(n) {
    return 3 * n * n - 2 * n * n * n;
  }
  function Ree(n) {
    return n;
  }
  const MO = 0;
  class Mee extends Of {
    /**
     * @param {ViewOptions} [options] View options.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, e = Object.assign({}, e), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = XA(e.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, e.projection && YB(), e.center && (e.center = gp(e.center, this.projection_)), e.extent && (e.extent = yp(e.extent, this.projection_)), this.applyOptions_(e);
    }
    /**
     * Set up the view with the given options.
     * @param {ViewOptions} options View options.
     */
    applyOptions_(e) {
      const t = Object.assign({}, e);
      for (const c in _f)
        delete t[c];
      this.setProperties(t, !0);
      const i = Aee(e);
      this.maxResolution_ = i.maxResolution, this.minResolution_ = i.minResolution, this.zoomFactor_ = i.zoomFactor, this.resolutions_ = e.resolutions, this.padding_ = e.padding, this.minZoom_ = i.minZoom;
      const a = Oee(e), o = i.constraint, u = Lee(e);
      this.constraints_ = {
        center: a,
        resolution: o,
        rotation: u
      }, this.setRotation(e.rotation !== void 0 ? e.rotation : 0), this.setCenterInternal(
        e.center !== void 0 ? e.center : null
      ), e.resolution !== void 0 ? this.setResolution(e.resolution) : e.zoom !== void 0 && this.setZoom(e.zoom);
    }
    /**
     * Padding (in css pixels).
     * If the map viewport is partially covered with other content (overlays) along
     * its edges, this setting allows to shift the center of the viewport away from that
     * content. The order of the values in the array is top, right, bottom, left.
     * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.
     * @type {Array<number>|undefined}
     * @api
     */
    get padding() {
      return this.padding_;
    }
    set padding(e) {
      let t = this.padding_;
      this.padding_ = e;
      const i = this.getCenterInternal();
      if (i) {
        const a = e || [0, 0, 0, 0];
        t = t || [0, 0, 0, 0];
        const o = this.getResolution(), u = o / 2 * (a[3] - t[3] + t[1] - a[1]), c = o / 2 * (a[0] - t[0] + t[2] - a[2]);
        this.setCenterInternal([i[0] + u, i[1] - c]);
      }
    }
    /**
     * Get an updated version of the view options used to construct the view.  The
     * current resolution (or zoom), center, and rotation are applied to any stored
     * options.  The provided options can be used to apply new min/max zoom or
     * resolution limits.
     * @param {ViewOptions} newOptions New options to be applied.
     * @return {ViewOptions} New options updated with the current view state.
     */
    getUpdatedOptions_(e) {
      const t = this.getProperties();
      return t.resolution !== void 0 ? t.resolution = this.getResolution() : t.zoom = this.getZoom(), t.center = this.getCenterInternal(), t.rotation = this.getRotation(), Object.assign({}, t, e);
    }
    /**
     * Animate the view.  The view's center, zoom (or resolution), and rotation
     * can be animated for smooth transitions between view states.  For example,
     * to animate the view to a new zoom level:
     *
     *     view.animate({zoom: view.getZoom() + 1});
     *
     * By default, the animation lasts one second and uses in-and-out easing.  You
     * can customize this behavior by including `duration` (in milliseconds) and
     * `easing` options (see {@link module:ol/easing}).
     *
     * To chain together multiple animations, call the method with multiple
     * animation objects.  For example, to first zoom and then pan:
     *
     *     view.animate({zoom: 10}, {center: [0, 0]});
     *
     * If you provide a function as the last argument to the animate method, it
     * will get called at the end of an animation series.  The callback will be
     * called with `true` if the animation series completed on its own or `false`
     * if it was cancelled.
     *
     * Animations are cancelled by user interactions (e.g. dragging the map) or by
     * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`
     * (or another method that calls one of these).
     *
     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation
     *     options.  Multiple animations can be run in series by passing multiple
     *     options objects.  To run multiple animations in parallel, call the method
     *     multiple times.  An optional callback can be provided as a final
     *     argument.  The callback will be called with a boolean indicating whether
     *     the animation completed without being cancelled.
     * @api
     */
    animate(e) {
      this.isDef() && !this.getAnimating() && this.resolveConstraints(0);
      const t = new Array(arguments.length);
      for (let i = 0; i < t.length; ++i) {
        let a = arguments[i];
        a.center && (a = Object.assign({}, a), a.center = gp(
          a.center,
          this.getProjection()
        )), a.anchor && (a = Object.assign({}, a), a.anchor = gp(
          a.anchor,
          this.getProjection()
        )), t[i] = a;
      }
      this.animateInternal.apply(this, t);
    }
    /**
     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.
     */
    animateInternal(e) {
      let t = arguments.length, i;
      t > 1 && typeof arguments[t - 1] == "function" && (i = arguments[t - 1], --t);
      let a = 0;
      for (; a < t && !this.isDef(); ++a) {
        const _ = arguments[a];
        _.center && this.setCenterInternal(_.center), _.zoom !== void 0 ? this.setZoom(_.zoom) : _.resolution && this.setResolution(_.resolution), _.rotation !== void 0 && this.setRotation(_.rotation);
      }
      if (a === t) {
        i && wb(i, !0);
        return;
      }
      let o = Date.now(), u = this.targetCenter_.slice(), c = this.targetResolution_, p = this.targetRotation_;
      const y = [];
      for (; a < t; ++a) {
        const _ = (
          /** @type {AnimationOptions} */
          arguments[a]
        ), S = {
          start: o,
          complete: !1,
          anchor: _.anchor,
          duration: _.duration !== void 0 ? _.duration : 1e3,
          easing: _.easing || Tee,
          callback: i
        };
        if (_.center && (S.sourceCenter = u, S.targetCenter = _.center.slice(), u = S.targetCenter), _.zoom !== void 0 ? (S.sourceResolution = c, S.targetResolution = this.getResolutionForZoom(_.zoom), c = S.targetResolution) : _.resolution && (S.sourceResolution = c, S.targetResolution = _.resolution, c = S.targetResolution), _.rotation !== void 0) {
          S.sourceRotation = p;
          const b = kv(_.rotation - p + Math.PI, 2 * Math.PI) - Math.PI;
          S.targetRotation = p + b, p = S.targetRotation;
        }
        Nee(S) ? S.complete = !0 : o += S.duration, y.push(S);
      }
      this.animations_.push(y), this.setHint(ws.ANIMATING, 1), this.updateAnimations_();
    }
    /**
     * Determine if the view is being animated.
     * @return {boolean} The view is being animated.
     * @api
     */
    getAnimating() {
      return this.hints_[ws.ANIMATING] > 0;
    }
    /**
     * Determine if the user is interacting with the view, such as panning or zooming.
     * @return {boolean} The view is being interacted with.
     * @api
     */
    getInteracting() {
      return this.hints_[ws.INTERACTING] > 0;
    }
    /**
     * Cancel any ongoing animations.
     * @api
     */
    cancelAnimations() {
      this.setHint(ws.ANIMATING, -this.hints_[ws.ANIMATING]);
      let e;
      for (let t = 0, i = this.animations_.length; t < i; ++t) {
        const a = this.animations_[t];
        if (a[0].callback && wb(a[0].callback, !1), !e)
          for (let o = 0, u = a.length; o < u; ++o) {
            const c = a[o];
            if (!c.complete) {
              e = c.anchor;
              break;
            }
          }
      }
      this.animations_.length = 0, this.cancelAnchor_ = e, this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN;
    }
    /**
     * Update all animations.
     */
    updateAnimations_() {
      if (this.updateAnimationKey_ !== void 0 && (cancelAnimationFrame(this.updateAnimationKey_), this.updateAnimationKey_ = void 0), !this.getAnimating())
        return;
      const e = Date.now();
      let t = !1;
      for (let i = this.animations_.length - 1; i >= 0; --i) {
        const a = this.animations_[i];
        let o = !0;
        for (let u = 0, c = a.length; u < c; ++u) {
          const p = a[u];
          if (p.complete)
            continue;
          const y = e - p.start;
          let _ = p.duration > 0 ? y / p.duration : 1;
          _ >= 1 ? (p.complete = !0, _ = 1) : o = !1;
          const S = p.easing(_);
          if (p.sourceCenter) {
            const b = p.sourceCenter[0], T = p.sourceCenter[1], O = p.targetCenter[0], N = p.targetCenter[1];
            this.nextCenter_ = p.targetCenter;
            const D = b + S * (O - b), k = T + S * (N - T);
            this.targetCenter_ = [D, k];
          }
          if (p.sourceResolution && p.targetResolution) {
            const b = S === 1 ? p.targetResolution : p.sourceResolution + S * (p.targetResolution - p.sourceResolution);
            if (p.anchor) {
              const T = this.getViewportSize_(this.getRotation()), O = this.constraints_.resolution(
                b,
                0,
                T,
                !0
              );
              this.targetCenter_ = this.calculateCenterZoom(
                O,
                p.anchor
              );
            }
            this.nextResolution_ = p.targetResolution, this.targetResolution_ = b, this.applyTargetState_(!0);
          }
          if (p.sourceRotation !== void 0 && p.targetRotation !== void 0) {
            const b = S === 1 ? kv(p.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : p.sourceRotation + S * (p.targetRotation - p.sourceRotation);
            if (p.anchor) {
              const T = this.constraints_.rotation(
                b,
                !0
              );
              this.targetCenter_ = this.calculateCenterRotate(
                T,
                p.anchor
              );
            }
            this.nextRotation_ = p.targetRotation, this.targetRotation_ = b;
          }
          if (this.applyTargetState_(!0), t = !0, !p.complete)
            break;
        }
        if (o) {
          this.animations_[i] = null, this.setHint(ws.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN;
          const u = a[0].callback;
          u && wb(u, !0);
        }
      }
      this.animations_ = this.animations_.filter(Boolean), t && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame(
        this.updateAnimations_.bind(this)
      ));
    }
    /**
     * @param {number} rotation Target rotation.
     * @param {import("./coordinate.js").Coordinate} anchor Rotation anchor.
     * @return {import("./coordinate.js").Coordinate|undefined} Center for rotation and anchor.
     */
    calculateCenterRotate(e, t) {
      let i;
      const a = this.getCenterInternal();
      return a !== void 0 && (i = [a[0] - t[0], a[1] - t[1]], YA(i, e - this.getRotation()), VB(i, t)), i;
    }
    /**
     * @param {number} resolution Target resolution.
     * @param {import("./coordinate.js").Coordinate} anchor Zoom anchor.
     * @return {import("./coordinate.js").Coordinate|undefined} Center for resolution and anchor.
     */
    calculateCenterZoom(e, t) {
      let i;
      const a = this.getCenterInternal(), o = this.getResolution();
      if (a !== void 0 && o !== void 0) {
        const u = t[0] - e * (t[0] - a[0]) / o, c = t[1] - e * (t[1] - a[1]) / o;
        i = [u, c];
      }
      return i;
    }
    /**
     * Returns the current viewport size.
     * @private
     * @param {number} [rotation] Take into account the rotation of the viewport when giving the size
     * @return {import("./size.js").Size} Viewport size or `[100, 100]` when no viewport is found.
     */
    getViewportSize_(e) {
      const t = this.viewportSize_;
      if (e) {
        const i = t[0], a = t[1];
        return [
          Math.abs(i * Math.cos(e)) + Math.abs(a * Math.sin(e)),
          Math.abs(i * Math.sin(e)) + Math.abs(a * Math.cos(e))
        ];
      }
      return t;
    }
    /**
     * Stores the viewport size on the view. The viewport size is not read every time from the DOM
     * to avoid performance hit and layout reflow.
     * This should be done on map size change.
     * Note: the constraints are not resolved during an animation to avoid stopping it
     * @param {import("./size.js").Size} [size] Viewport size; if undefined, [100, 100] is assumed
     */
    setViewportSize(e) {
      this.viewportSize_ = Array.isArray(e) ? e.slice() : [100, 100], this.getAnimating() || this.resolveConstraints(0);
    }
    /**
     * Get the view center.
     * @return {import("./coordinate.js").Coordinate|undefined} The center of the view.
     * @observable
     * @api
     */
    getCenter() {
      const e = this.getCenterInternal();
      return e && rA(e, this.getProjection());
    }
    /**
     * Get the view center without transforming to user projection.
     * @return {import("./coordinate.js").Coordinate|undefined} The center of the view.
     */
    getCenterInternal() {
      return (
        /** @type {import("./coordinate.js").Coordinate|undefined} */
        this.get(_f.CENTER)
      );
    }
    /**
     * @return {Constraints} Constraints.
     */
    getConstraints() {
      return this.constraints_;
    }
    /**
     * @return {boolean} Resolution constraint is set
     */
    getConstrainResolution() {
      return this.get("constrainResolution");
    }
    /**
     * @param {Array<number>} [hints] Destination array.
     * @return {Array<number>} Hint.
     */
    getHints(e) {
      return e !== void 0 ? (e[0] = this.hints_[0], e[1] = this.hints_[1], e) : this.hints_.slice();
    }
    /**
     * Calculate the extent for the current view state and the passed box size.
     * @param {import("./size.js").Size} [size] The pixel dimensions of the box
     * into which the calculated extent should fit. Defaults to the size of the
     * map the view is associated with.
     * If no map or multiple maps are connected to the view, provide the desired
     * box size (e.g. `map.getSize()`).
     * @return {import("./extent.js").Extent} Extent.
     * @api
     */
    calculateExtent(e) {
      const t = this.calculateExtentInternal(e);
      return nF(t, this.getProjection());
    }
    /**
     * @param {import("./size.js").Size} [size] Box pixel size. If not provided,
     * the map's last known viewport size will be used.
     * @return {import("./extent.js").Extent} Extent.
     */
    calculateExtentInternal(e) {
      e = e || this.getViewportSizeMinusPadding_();
      const t = (
        /** @type {!import("./coordinate.js").Coordinate} */
        this.getCenterInternal()
      );
      Ei(t, "The view center is not defined");
      const i = (
        /** @type {!number} */
        this.getResolution()
      );
      Ei(i !== void 0, "The view resolution is not defined");
      const a = (
        /** @type {!number} */
        this.getRotation()
      );
      return Ei(a !== void 0, "The view rotation is not defined"), RE(t, i, a, e);
    }
    /**
     * Get the maximum resolution of the view.
     * @return {number} The maximum resolution of the view.
     * @api
     */
    getMaxResolution() {
      return this.maxResolution_;
    }
    /**
     * Get the minimum resolution of the view.
     * @return {number} The minimum resolution of the view.
     * @api
     */
    getMinResolution() {
      return this.minResolution_;
    }
    /**
     * Get the maximum zoom level for the view.
     * @return {number} The maximum zoom level.
     * @api
     */
    getMaxZoom() {
      return (
        /** @type {number} */
        this.getZoomForResolution(this.minResolution_)
      );
    }
    /**
     * Set a new maximum zoom level for the view.
     * @param {number} zoom The maximum zoom level.
     * @api
     */
    setMaxZoom(e) {
      this.applyOptions_(this.getUpdatedOptions_({ maxZoom: e }));
    }
    /**
     * Get the minimum zoom level for the view.
     * @return {number} The minimum zoom level.
     * @api
     */
    getMinZoom() {
      return (
        /** @type {number} */
        this.getZoomForResolution(this.maxResolution_)
      );
    }
    /**
     * Set a new minimum zoom level for the view.
     * @param {number} zoom The minimum zoom level.
     * @api
     */
    setMinZoom(e) {
      this.applyOptions_(this.getUpdatedOptions_({ minZoom: e }));
    }
    /**
     * Set whether the view should allow intermediary zoom levels.
     * @param {boolean} enabled Whether the resolution is constrained.
     * @api
     */
    setConstrainResolution(e) {
      this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: e }));
    }
    /**
     * Get the view projection.
     * @return {import("./proj/Projection.js").default} The projection of the view.
     * @api
     */
    getProjection() {
      return this.projection_;
    }
    /**
     * Get the view resolution.
     * @return {number|undefined} The resolution of the view.
     * @observable
     * @api
     */
    getResolution() {
      return (
        /** @type {number|undefined} */
        this.get(_f.RESOLUTION)
      );
    }
    /**
     * Get the resolutions for the view. This returns the array of resolutions
     * passed to the constructor of the View, or undefined if none were given.
     * @return {Array<number>|undefined} The resolutions of the view.
     * @api
     */
    getResolutions() {
      return this.resolutions_;
    }
    /**
     * Get the resolution for a provided extent (in map units) and size (in pixels).
     * @param {import("./extent.js").Extent} extent Extent.
     * @param {import("./size.js").Size} [size] Box pixel size.
     * @return {number} The resolution at which the provided extent will render at
     *     the given size.
     * @api
     */
    getResolutionForExtent(e, t) {
      return this.getResolutionForExtentInternal(
        yp(e, this.getProjection()),
        t
      );
    }
    /**
     * Get the resolution for a provided extent (in map units) and size (in pixels).
     * @param {import("./extent.js").Extent} extent Extent.
     * @param {import("./size.js").Size} [size] Box pixel size.
     * @return {number} The resolution at which the provided extent will render at
     *     the given size.
     */
    getResolutionForExtentInternal(e, t) {
      t = t || this.getViewportSizeMinusPadding_();
      const i = _i(e) / t[0], a = Cs(e) / t[1];
      return Math.max(i, a);
    }
    /**
     * Return a function that returns a value between 0 and 1 for a
     * resolution. Exponential scaling is assumed.
     * @param {number} [power] Power.
     * @return {function(number): number} Resolution for value function.
     */
    getResolutionForValueFunction(e) {
      e = e || 2;
      const t = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, a = Math.log(t / i) / Math.log(e);
      return (
        /**
         * @param {number} value Value.
         * @return {number} Resolution.
         */
        function(o) {
          return t / Math.pow(e, o * a);
        }
      );
    }
    /**
     * Get the view rotation.
     * @return {number} The rotation of the view in radians.
     * @observable
     * @api
     */
    getRotation() {
      return (
        /** @type {number} */
        this.get(_f.ROTATION)
      );
    }
    /**
     * Return a function that returns a resolution for a value between
     * 0 and 1. Exponential scaling is assumed.
     * @param {number} [power] Power.
     * @return {function(number): number} Value for resolution function.
     */
    getValueForResolutionFunction(e) {
      const t = Math.log(e || 2), i = this.getConstrainedResolution(this.maxResolution_), a = this.minResolution_, o = Math.log(i / a) / t;
      return (
        /**
         * @param {number} resolution Resolution.
         * @return {number} Value.
         */
        function(u) {
          return Math.log(i / u) / t / o;
        }
      );
    }
    /**
     * Returns the size of the viewport minus padding.
     * @private
     * @param {number} [rotation] Take into account the rotation of the viewport when giving the size
     * @return {import("./size.js").Size} Viewport size reduced by the padding.
     */
    getViewportSizeMinusPadding_(e) {
      let t = this.getViewportSize_(e);
      const i = this.padding_;
      return i && (t = [
        t[0] - i[1] - i[3],
        t[1] - i[0] - i[2]
      ]), t;
    }
    /**
     * @return {State} View state.
     */
    getState() {
      const e = this.getProjection(), t = this.getResolution(), i = this.getRotation();
      let a = (
        /** @type {import("./coordinate.js").Coordinate} */
        this.getCenterInternal()
      );
      const o = this.padding_;
      if (o) {
        const u = this.getViewportSizeMinusPadding_();
        a = OO(
          a,
          this.getViewportSize_(),
          [u[0] / 2 + o[3], u[1] / 2 + o[0]],
          t,
          i
        );
      }
      return {
        center: a.slice(0),
        projection: e !== void 0 ? e : null,
        resolution: t,
        nextCenter: this.nextCenter_,
        nextResolution: this.nextResolution_,
        nextRotation: this.nextRotation_,
        rotation: i,
        zoom: this.getZoom()
      };
    }
    /**
     * @return {ViewStateLayerStateExtent} Like `FrameState`, but just `viewState` and `extent`.
     */
    getViewStateAndExtent() {
      return {
        viewState: this.getState(),
        extent: this.calculateExtent()
      };
    }
    /**
     * Get the current zoom level. This method may return non-integer zoom levels
     * if the view does not constrain the resolution, or if an interaction or
     * animation is underway.
     * @return {number|undefined} Zoom.
     * @api
     */
    getZoom() {
      let e;
      const t = this.getResolution();
      return t !== void 0 && (e = this.getZoomForResolution(t)), e;
    }
    /**
     * Get the zoom level for a resolution.
     * @param {number} resolution The resolution.
     * @return {number|undefined} The zoom level for the provided resolution.
     * @api
     */
    getZoomForResolution(e) {
      let t = this.minZoom_ || 0, i, a;
      if (this.resolutions_) {
        const o = Gw(this.resolutions_, e, 1);
        t = o, i = this.resolutions_[o], o == this.resolutions_.length - 1 ? a = 2 : a = i / this.resolutions_[o + 1];
      } else
        i = this.maxResolution_, a = this.zoomFactor_;
      return t + Math.log(i / e) / Math.log(a);
    }
    /**
     * Get the resolution for a zoom level.
     * @param {number} zoom Zoom level.
     * @return {number} The view resolution for the provided zoom level.
     * @api
     */
    getResolutionForZoom(e) {
      if (this.resolutions_) {
        if (this.resolutions_.length <= 1)
          return 0;
        const t = da(
          Math.floor(e),
          0,
          this.resolutions_.length - 2
        ), i = this.resolutions_[t] / this.resolutions_[t + 1];
        return this.resolutions_[t] / Math.pow(i, da(e - t, 0, 1));
      }
      return this.maxResolution_ / Math.pow(this.zoomFactor_, e - this.minZoom_);
    }
    /**
     * Fit the given geometry or extent based on the given map size and border.
     * The size is pixel dimensions of the box to fit the extent into.
     * In most cases you will want to use the map size, that is `map.getSize()`.
     * Takes care of the map angle.
     * @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or
     *     extent to fit the view to.
     * @param {FitOptions} [options] Options.
     * @api
     */
    fit(e, t) {
      let i;
      if (Ei(
        Array.isArray(e) || typeof /** @type {?} */
        e.getSimplifiedGeometry == "function",
        "Invalid extent or geometry provided as `geometry`"
      ), Array.isArray(e)) {
        Ei(
          !Kv(e),
          "Cannot fit empty extent provided as `geometry`"
        );
        const a = yp(e, this.getProjection());
        i = z3(a);
      } else if (e.getType() === "Circle") {
        const a = yp(
          e.getExtent(),
          this.getProjection()
        );
        i = z3(a), i.rotate(this.getRotation(), Cp(a));
      } else
        i = e;
      this.fitInternal(i, t);
    }
    /**
     * Calculate rotated extent
     * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry.
     * @return {import("./extent").Extent} The rotated extent for the geometry.
     */
    rotatedExtentForGeometry(e) {
      const t = this.getRotation(), i = Math.cos(t), a = Math.sin(-t), o = e.getFlatCoordinates(), u = e.getStride();
      let c = 1 / 0, p = 1 / 0, y = -1 / 0, _ = -1 / 0;
      for (let S = 0, b = o.length; S < b; S += u) {
        const T = o[S] * i - o[S + 1] * a, O = o[S] * a + o[S + 1] * i;
        c = Math.min(c, T), p = Math.min(p, O), y = Math.max(y, T), _ = Math.max(_, O);
      }
      return [c, p, y, _];
    }
    /**
     * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry.
     * @param {FitOptions} [options] Options.
     */
    fitInternal(e, t) {
      t = t || {};
      let i = t.size;
      i || (i = this.getViewportSizeMinusPadding_());
      const a = t.padding !== void 0 ? t.padding : [0, 0, 0, 0], o = t.nearest !== void 0 ? t.nearest : !1;
      let u;
      t.minResolution !== void 0 ? u = t.minResolution : t.maxZoom !== void 0 ? u = this.getResolutionForZoom(t.maxZoom) : u = 0;
      const c = this.rotatedExtentForGeometry(e);
      let p = this.getResolutionForExtentInternal(c, [
        i[0] - a[1] - a[3],
        i[1] - a[0] - a[2]
      ]);
      p = isNaN(p) ? u : Math.max(p, u), p = this.getConstrainedResolution(p, o ? 0 : 1);
      const y = this.getRotation(), _ = Math.sin(y), S = Math.cos(y), b = Cp(c);
      b[0] += (a[1] - a[3]) / 2 * p, b[1] += (a[0] - a[2]) / 2 * p;
      const T = b[0] * S - b[1] * _, O = b[1] * S + b[0] * _, N = this.getConstrainedCenter([T, O], p), D = t.callback ? t.callback : l_;
      t.duration !== void 0 ? this.animateInternal(
        {
          resolution: p,
          center: N,
          duration: t.duration,
          easing: t.easing
        },
        D
      ) : (this.targetResolution_ = p, this.targetCenter_ = N, this.applyTargetState_(!1, !0), wb(D, !0));
    }
    /**
     * Center on coordinate and view position.
     * @param {import("./coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("./size.js").Size} size Box pixel size.
     * @param {import("./pixel.js").Pixel} position Position on the view to center on.
     * @api
     */
    centerOn(e, t, i) {
      this.centerOnInternal(
        gp(e, this.getProjection()),
        t,
        i
      );
    }
    /**
     * @param {import("./coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("./size.js").Size} size Box pixel size.
     * @param {import("./pixel.js").Pixel} position Position on the view to center on.
     */
    centerOnInternal(e, t, i) {
      this.setCenterInternal(
        OO(
          e,
          t,
          i,
          this.getResolution(),
          this.getRotation()
        )
      );
    }
    /**
     * Calculates the shift between map and viewport center.
     * @param {import("./coordinate.js").Coordinate} center Center.
     * @param {number} resolution Resolution.
     * @param {number} rotation Rotation.
     * @param {import("./size.js").Size} size Size.
     * @return {Array<number>|undefined} Center shift.
     */
    calculateCenterShift(e, t, i, a) {
      let o;
      const u = this.padding_;
      if (u && e) {
        const c = this.getViewportSizeMinusPadding_(-i), p = OO(
          e,
          a,
          [c[0] / 2 + u[3], c[1] / 2 + u[0]],
          t,
          i
        );
        o = [
          e[0] - p[0],
          e[1] - p[1]
        ];
      }
      return o;
    }
    /**
     * @return {boolean} Is defined.
     */
    isDef() {
      return !!this.getCenterInternal() && this.getResolution() !== void 0;
    }
    /**
     * Adds relative coordinates to the center of the view. Any extent constraint will apply.
     * @param {import("./coordinate.js").Coordinate} deltaCoordinates Relative value to add.
     * @api
     */
    adjustCenter(e) {
      const t = rA(this.targetCenter_, this.getProjection());
      this.setCenter([
        t[0] + e[0],
        t[1] + e[1]
      ]);
    }
    /**
     * Adds relative coordinates to the center of the view. Any extent constraint will apply.
     * @param {import("./coordinate.js").Coordinate} deltaCoordinates Relative value to add.
     */
    adjustCenterInternal(e) {
      const t = this.targetCenter_;
      this.setCenterInternal([
        t[0] + e[0],
        t[1] + e[1]
      ]);
    }
    /**
     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
     * constraint will apply.
     * @param {number} ratio The ratio to apply on the view resolution.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     * @api
     */
    adjustResolution(e, t) {
      t = t && gp(t, this.getProjection()), this.adjustResolutionInternal(e, t);
    }
    /**
     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
     * constraint will apply.
     * @param {number} ratio The ratio to apply on the view resolution.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     */
    adjustResolutionInternal(e, t) {
      const i = this.getAnimating() || this.getInteracting(), a = this.getViewportSize_(this.getRotation()), o = this.constraints_.resolution(
        this.targetResolution_ * e,
        0,
        a,
        i
      );
      t && (this.targetCenter_ = this.calculateCenterZoom(o, t)), this.targetResolution_ *= e, this.applyTargetState_();
    }
    /**
     * Adds a value to the view zoom level, optionally using an anchor. Any resolution
     * constraint will apply.
     * @param {number} delta Relative value to add to the zoom level.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     * @api
     */
    adjustZoom(e, t) {
      this.adjustResolution(Math.pow(this.zoomFactor_, -e), t);
    }
    /**
     * Adds a value to the view rotation, optionally using an anchor. Any rotation
     * constraint will apply.
     * @param {number} delta Relative value to add to the zoom rotation, in radians.
     * @param {import("./coordinate.js").Coordinate} [anchor] The rotation center.
     * @api
     */
    adjustRotation(e, t) {
      t && (t = gp(t, this.getProjection())), this.adjustRotationInternal(e, t);
    }
    /**
     * @param {number} delta Relative value to add to the zoom rotation, in radians.
     * @param {import("./coordinate.js").Coordinate} [anchor] The rotation center.
     */
    adjustRotationInternal(e, t) {
      const i = this.getAnimating() || this.getInteracting(), a = this.constraints_.rotation(
        this.targetRotation_ + e,
        i
      );
      t && (this.targetCenter_ = this.calculateCenterRotate(a, t)), this.targetRotation_ += e, this.applyTargetState_();
    }
    /**
     * Set the center of the current view. Any extent constraint will apply.
     * @param {import("./coordinate.js").Coordinate|undefined} center The center of the view.
     * @observable
     * @api
     */
    setCenter(e) {
      this.setCenterInternal(
        e && gp(e, this.getProjection())
      );
    }
    /**
     * Set the center using the view projection (not the user projection).
     * @param {import("./coordinate.js").Coordinate|undefined} center The center of the view.
     */
    setCenterInternal(e) {
      this.targetCenter_ = e, this.applyTargetState_();
    }
    /**
     * @param {import("./ViewHint.js").default} hint Hint.
     * @param {number} delta Delta.
     * @return {number} New value.
     */
    setHint(e, t) {
      return this.hints_[e] += t, this.changed(), this.hints_[e];
    }
    /**
     * Set the resolution for this view. Any resolution constraint will apply.
     * @param {number|undefined} resolution The resolution of the view.
     * @observable
     * @api
     */
    setResolution(e) {
      this.targetResolution_ = e, this.applyTargetState_();
    }
    /**
     * Set the rotation for this view. Any rotation constraint will apply.
     * @param {number} rotation The rotation of the view in radians.
     * @observable
     * @api
     */
    setRotation(e) {
      this.targetRotation_ = e, this.applyTargetState_();
    }
    /**
     * Zoom to a specific zoom level. Any resolution constrain will apply.
     * @param {number} zoom Zoom level.
     * @api
     */
    setZoom(e) {
      this.setResolution(this.getResolutionForZoom(e));
    }
    /**
     * Recompute rotation/resolution/center based on target values.
     * Note: we have to compute rotation first, then resolution and center considering that
     * parameters can influence one another in case a view extent constraint is present.
     * @param {boolean} [doNotCancelAnims] Do not cancel animations.
     * @param {boolean} [forceMoving] Apply constraints as if the view is moving.
     * @private
     */
    applyTargetState_(e, t) {
      const i = this.getAnimating() || this.getInteracting() || t, a = this.constraints_.rotation(
        this.targetRotation_,
        i
      ), o = this.getViewportSize_(a), u = this.constraints_.resolution(
        this.targetResolution_,
        0,
        o,
        i
      ), c = this.constraints_.center(
        this.targetCenter_,
        u,
        o,
        i,
        this.calculateCenterShift(
          this.targetCenter_,
          u,
          a,
          o
        )
      );
      this.get(_f.ROTATION) !== a && this.set(_f.ROTATION, a), this.get(_f.RESOLUTION) !== u && (this.set(_f.RESOLUTION, u), this.set("zoom", this.getZoom(), !0)), (!c || !this.get(_f.CENTER) || !Yb(this.get(_f.CENTER), c)) && this.set(_f.CENTER, c), this.getAnimating() && !e && this.cancelAnimations(), this.cancelAnchor_ = void 0;
    }
    /**
     * If any constraints need to be applied, an animation will be triggered.
     * This is typically done on interaction end.
     * Note: calling this with a duration of 0 will apply the constrained values straight away,
     * without animation.
     * @param {number} [duration] The animation duration in ms.
     * @param {number} [resolutionDirection] Which direction to zoom.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     */
    resolveConstraints(e, t, i) {
      e = e !== void 0 ? e : 200;
      const a = t || 0, o = this.constraints_.rotation(this.targetRotation_), u = this.getViewportSize_(o), c = this.constraints_.resolution(
        this.targetResolution_,
        a,
        u
      ), p = this.constraints_.center(
        this.targetCenter_,
        c,
        u,
        !1,
        this.calculateCenterShift(
          this.targetCenter_,
          c,
          o,
          u
        )
      );
      if (e === 0 && !this.cancelAnchor_) {
        this.targetResolution_ = c, this.targetRotation_ = o, this.targetCenter_ = p, this.applyTargetState_();
        return;
      }
      i = i || (e === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== c || this.getRotation() !== o || !this.getCenterInternal() || !Yb(this.getCenterInternal(), p)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
        rotation: o,
        center: p,
        resolution: c,
        duration: e,
        easing: x_,
        anchor: i
      }));
    }
    /**
     * Notify the View that an interaction has started.
     * The view state will be resolved to a stable one if needed
     * (depending on its constraints).
     * @api
     */
    beginInteraction() {
      this.resolveConstraints(0), this.setHint(ws.INTERACTING, 1);
    }
    /**
     * Notify the View that an interaction has ended. The view state will be resolved
     * to a stable one if needed (depending on its constraints).
     * @param {number} [duration] Animation duration in ms.
     * @param {number} [resolutionDirection] Which direction to zoom.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     * @api
     */
    endInteraction(e, t, i) {
      i = i && gp(i, this.getProjection()), this.endInteractionInternal(e, t, i);
    }
    /**
     * Notify the View that an interaction has ended. The view state will be resolved
     * to a stable one if needed (depending on its constraints).
     * @param {number} [duration] Animation duration in ms.
     * @param {number} [resolutionDirection] Which direction to zoom.
     * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
     */
    endInteractionInternal(e, t, i) {
      this.getInteracting() && (this.setHint(ws.INTERACTING, -1), this.resolveConstraints(e, t, i));
    }
    /**
     * Get a valid position for the view center according to the current constraints.
     * @param {import("./coordinate.js").Coordinate|undefined} targetCenter Target center position.
     * @param {number} [targetResolution] Target resolution. If not supplied, the current one will be used.
     * This is useful to guess a valid center position at a different zoom level.
     * @return {import("./coordinate.js").Coordinate|undefined} Valid center position.
     */
    getConstrainedCenter(e, t) {
      const i = this.getViewportSize_(this.getRotation());
      return this.constraints_.center(
        e,
        t || this.getResolution(),
        i
      );
    }
    /**
     * Get a valid zoom level according to the current view constraints.
     * @param {number|undefined} targetZoom Target zoom.
     * @param {number} [direction=0] Indicate which resolution should be used
     * by a renderer if the view resolution does not match any resolution of the tile source.
     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution
     * will be used. If -1, the nearest higher resolution will be used.
     * @return {number|undefined} Valid zoom level.
     */
    getConstrainedZoom(e, t) {
      const i = this.getResolutionForZoom(e);
      return this.getZoomForResolution(
        this.getConstrainedResolution(i, t)
      );
    }
    /**
     * Get a valid resolution according to the current view constraints.
     * @param {number|undefined} targetResolution Target resolution.
     * @param {number} [direction=0] Indicate which resolution should be used
     * by a renderer if the view resolution does not match any resolution of the tile source.
     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution
     * will be used. If -1, the nearest higher resolution will be used.
     * @return {number|undefined} Valid resolution.
     */
    getConstrainedResolution(e, t) {
      t = t || 0;
      const i = this.getViewportSize_(this.getRotation());
      return this.constraints_.resolution(e, t, i);
    }
  }
  function wb(n, e) {
    setTimeout(function() {
      n(e);
    }, 0);
  }
  function Oee(n) {
    if (n.extent !== void 0) {
      const t = n.smoothExtentConstraint !== void 0 ? n.smoothExtentConstraint : !0;
      return Z3(n.extent, n.constrainOnlyCenter, t);
    }
    const e = XA(n.projection, "EPSG:3857");
    if (n.multiWorld !== !0 && e.isGlobal()) {
      const t = e.getExtent().slice();
      return t[0] = -1 / 0, t[2] = 1 / 0, Z3(t, !1, !1);
    }
    return See;
  }
  function Aee(n) {
    let e, t, i, u = n.minZoom !== void 0 ? n.minZoom : MO, c = n.maxZoom !== void 0 ? n.maxZoom : 28;
    const p = n.zoomFactor !== void 0 ? n.zoomFactor : 2, y = n.multiWorld !== void 0 ? n.multiWorld : !1, _ = n.smoothResolutionConstraint !== void 0 ? n.smoothResolutionConstraint : !0, S = n.showFullExtent !== void 0 ? n.showFullExtent : !1, b = XA(n.projection, "EPSG:3857"), T = b.getExtent();
    let O = n.constrainOnlyCenter, N = n.extent;
    if (!y && !N && b.isGlobal() && (O = !1, N = T), n.resolutions !== void 0) {
      const D = n.resolutions;
      t = D[u], i = D[c] !== void 0 ? D[c] : D[D.length - 1], n.constrainResolution ? e = xee(
        D,
        _,
        !O && N,
        S
      ) : e = Q3(
        t,
        i,
        _,
        !O && N,
        S
      );
    } else {
      const k = (T ? Math.max(_i(T), Cs(T)) : (
        // use an extent that can fit the whole world if need be
        360 * Y0.degrees / b.getMetersPerUnit()
      )) / QL / Math.pow(2, MO), $ = k / Math.pow(2, 28 - MO);
      t = n.maxResolution, t !== void 0 ? u = 0 : t = k / Math.pow(p, u), i = n.minResolution, i === void 0 && (n.maxZoom !== void 0 ? n.maxResolution !== void 0 ? i = t / Math.pow(p, c) : i = k / Math.pow(p, c) : i = $), c = u + Math.floor(
        Math.log(t / i) / Math.log(p)
      ), i = t / Math.pow(p, c - u), n.constrainResolution ? e = bee(
        p,
        t,
        i,
        _,
        !O && N,
        S
      ) : e = Q3(
        t,
        i,
        _,
        !O && N,
        S
      );
    }
    return {
      constraint: e,
      maxResolution: t,
      minResolution: i,
      minZoom: u,
      zoomFactor: p
    };
  }
  function Lee(n) {
    if (n.enableRotation !== void 0 ? n.enableRotation : !0) {
      const t = n.constrainRotation;
      return t === void 0 || t === !0 ? Cee() : t === !1 ? J3 : typeof t == "number" ? wee(t) : J3;
    }
    return tN;
  }
  function Nee(n) {
    return !(n.sourceCenter && n.targetCenter && !Yb(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation);
  }
  function OO(n, e, t, i, a) {
    const o = Math.cos(-a);
    let u = Math.sin(-a), c = n[0] * o - n[1] * u, p = n[1] * o + n[0] * u;
    c += (e[0] / 2 - t[0]) * i, p += (t[1] - e[1] / 2) * i, u = -u;
    const y = c * o - p * u, _ = p * o + c * u;
    return [y, _];
  }
  const kh = Mee;
  class Dee extends RL {
    /**
     * @param {Options<SourceType>} options Layer options.
     */
    constructor(e) {
      const t = Object.assign({}, e);
      delete t.source, super(t), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.sourceReady_ = !1, this.rendered = !1, e.render && (this.render = e.render), e.map && this.setMap(e.map), this.addChangeListener(
        nr.SOURCE,
        this.handleSourcePropertyChange_
      );
      const i = e.source ? (
        /** @type {SourceType} */
        e.source
      ) : null;
      this.setSource(i);
    }
    /**
     * @param {Array<import("./Layer.js").default>} [array] Array of layers (to be modified in place).
     * @return {Array<import("./Layer.js").default>} Array of layers.
     */
    getLayersArray(e) {
      return e = e || [], e.push(this), e;
    }
    /**
     * @param {Array<import("./Layer.js").State>} [states] Optional list of layer states (to be modified in place).
     * @return {Array<import("./Layer.js").State>} List of layer states.
     */
    getLayerStatesArray(e) {
      return e = e || [], e.push(this.getLayerState()), e;
    }
    /**
     * Get the layer source.
     * @return {SourceType|null} The layer source (or `null` if not yet set).
     * @observable
     * @api
     */
    getSource() {
      return (
        /** @type {SourceType} */
        this.get(nr.SOURCE) || null
      );
    }
    /**
     * @return {SourceType|null} The source being rendered.
     */
    getRenderSource() {
      return this.getSource();
    }
    /**
     * @return {import("../source/Source.js").State} Source state.
     */
    getSourceState() {
      const e = this.getSource();
      return e ? e.getState() : "undefined";
    }
    /**
     * @private
     */
    handleSourceChange_() {
      this.changed(), !(this.sourceReady_ || this.getSource().getState() !== "ready") && (this.sourceReady_ = !0, this.dispatchEvent("sourceready"));
    }
    /**
     * @private
     */
    handleSourcePropertyChange_() {
      this.sourceChangeKey_ && (Or(this.sourceChangeKey_), this.sourceChangeKey_ = null), this.sourceReady_ = !1;
      const e = this.getSource();
      e && (this.sourceChangeKey_ = di(
        e,
        Cn.CHANGE,
        this.handleSourceChange_,
        this
      ), e.getState() === "ready" && (this.sourceReady_ = !0, setTimeout(() => {
        this.dispatchEvent("sourceready");
      }, 0))), this.changed();
    }
    /**
     * @param {import("../pixel").Pixel} pixel Pixel.
     * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with
     * an array of features.
     */
    getFeatures(e) {
      return this.renderer_ ? this.renderer_.getFeatures(e) : Promise.resolve([]);
    }
    /**
     * @param {import("../pixel").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
     */
    getData(e) {
      return !this.renderer_ || !this.rendered ? null : this.renderer_.getData(e);
    }
    /**
     * The layer is visible on the map view, i.e. within its min/max resolution or zoom and
     * extent, not set to `visible: false`, and not inside a layer group that is set
     * to `visible: false`.
     * @param {View|import("../View.js").ViewStateLayerStateExtent} [view] View or {@link import("../Map.js").FrameState}.
     * Only required when the layer is not added to a map.
     * @return {boolean} The layer is visible in the map view.
     * @api
     */
    isVisible(e) {
      let t;
      const i = this.getMapInternal();
      !e && i && (e = i.getView()), e instanceof kh ? t = {
        viewState: e.getState(),
        extent: e.calculateExtent()
      } : t = e, !t.layerStatesArray && i && (t.layerStatesArray = i.getLayerGroup().getLayerStatesArray());
      let a;
      t.layerStatesArray ? a = t.layerStatesArray.find(
        (u) => u.layer === this
      ) : a = this.getLayerState();
      const o = this.getExtent();
      return nN(a, t.viewState) && (!o || Zo(o, t.extent));
    }
    /**
     * Get the attributions of the source of this layer for the given view.
     * @param {View|import("../View.js").ViewStateLayerStateExtent} [view] View or {@link import("../Map.js").FrameState}.
     * Only required when the layer is not added to a map.
     * @return {Array<string>} Attributions for this layer at the given view.
     * @api
     */
    getAttributions(e) {
      if (!this.isVisible(e))
        return [];
      let t;
      const i = this.getSource();
      if (i && (t = i.getAttributions()), !t)
        return [];
      const a = e instanceof kh ? e.getViewStateAndExtent() : e;
      let o = t(a);
      return Array.isArray(o) || (o = [o]), o;
    }
    /**
     * In charge to manage the rendering of the layer. One layer type is
     * bounded with one layer renderer.
     * @param {?import("../Map.js").FrameState} frameState Frame state.
     * @param {HTMLElement} target Target which the renderer may (but need not) use
     * for rendering its content.
     * @return {HTMLElement|null} The rendered element.
     */
    render(e, t) {
      const i = this.getRenderer();
      return i.prepareFrame(e) ? (this.rendered = !0, i.renderFrame(e, t)) : null;
    }
    /**
     * Called when a layer is not visible during a map render.
     */
    unrender() {
      this.rendered = !1;
    }
    /**
     * For use inside the library only.
     * @param {import("../Map.js").default|null} map Map.
     */
    setMapInternal(e) {
      e || this.unrender(), this.set(nr.MAP, e);
    }
    /**
     * For use inside the library only.
     * @return {import("../Map.js").default|null} Map.
     */
    getMapInternal() {
      return this.get(nr.MAP);
    }
    /**
     * Sets the layer to be rendered on top of other layers on a map. The map will
     * not manage this layer in its layers collection. This
     * is useful for temporary layers. To remove an unmanaged layer from the map,
     * use `#setMap(null)`.
     *
     * To add the layer to a map and have it managed by the map, use
     * {@link module:ol/Map~Map#addLayer} instead.
     * @param {import("../Map.js").default|null} map Map.
     * @api
     */
    setMap(e) {
      this.mapPrecomposeKey_ && (Or(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), e || this.changed(), this.mapRenderKey_ && (Or(this.mapRenderKey_), this.mapRenderKey_ = null), e && (this.mapPrecomposeKey_ = di(
        e,
        Hh.PRECOMPOSE,
        function(t) {
          const a = /** @type {import("../render/Event.js").default} */ t.frameState.layerStatesArray, o = this.getLayerState(!1);
          Ei(
            !a.some(function(u) {
              return u.layer === o.layer;
            }),
            "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."
          ), a.push(o);
        },
        this
      ), this.mapRenderKey_ = di(this, Cn.CHANGE, e.render, e), this.changed());
    }
    /**
     * Set the layer source.
     * @param {SourceType|null} source The layer source.
     * @observable
     * @api
     */
    setSource(e) {
      this.set(nr.SOURCE, e);
    }
    /**
     * Get the renderer for this layer.
     * @return {RendererType|null} The layer renderer.
     */
    getRenderer() {
      return this.renderer_ || (this.renderer_ = this.createRenderer()), this.renderer_;
    }
    /**
     * @return {boolean} The layer has a renderer.
     */
    hasRenderer() {
      return !!this.renderer_;
    }
    /**
     * Create a renderer for this layer.
     * @return {RendererType} A layer renderer.
     * @protected
     */
    createRenderer() {
      return null;
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), super.disposeInternal();
    }
  }
  function nN(n, e) {
    if (!n.visible)
      return !1;
    const t = e.resolution;
    if (t < n.minResolution || t >= n.maxResolution)
      return !1;
    const i = e.zoom;
    return i > n.minZoom && i <= n.maxZoom;
  }
  const pS = Dee;
  function Iee(n, e, t, i, a) {
    Jj(n, e, t || 0, i || n.length - 1, a || Pee);
  }
  function Jj(n, e, t, i, a) {
    for (; i > t; ) {
      if (i - t > 600) {
        var o = i - t + 1, u = e - t + 1, c = Math.log(o), p = 0.5 * Math.exp(2 * c / 3), y = 0.5 * Math.sqrt(c * p * (o - p) / o) * (u - o / 2 < 0 ? -1 : 1), _ = Math.max(t, Math.floor(e - u * p / o + y)), S = Math.min(i, Math.floor(e + (o - u) * p / o + y));
        Jj(n, e, _, S, a);
      }
      var b = n[e], T = t, O = i;
      for (aE(n, t, e), a(n[i], b) > 0 && aE(n, t, i); T < O; ) {
        for (aE(n, T, O), T++, O--; a(n[T], b) < 0; )
          T++;
        for (; a(n[O], b) > 0; )
          O--;
      }
      a(n[t], b) === 0 ? aE(n, t, O) : (O++, aE(n, O, i)), O <= e && (t = O + 1), e <= O && (i = O - 1);
    }
  }
  function aE(n, e, t) {
    var i = n[e];
    n[e] = n[t], n[t] = i;
  }
  function Pee(n, e) {
    return n < e ? -1 : n > e ? 1 : 0;
  }
  let eU = class {
    constructor(e = 9) {
      this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
    }
    all() {
      return this._all(this.data, []);
    }
    search(e) {
      let t = this.data;
      const i = [];
      if (!Tb(e, t))
        return i;
      const a = this.toBBox, o = [];
      for (; t; ) {
        for (let u = 0; u < t.children.length; u++) {
          const c = t.children[u], p = t.leaf ? a(c) : c;
          Tb(e, p) && (t.leaf ? i.push(c) : LO(e, p) ? this._all(c, i) : o.push(c));
        }
        t = o.pop();
      }
      return i;
    }
    collides(e) {
      let t = this.data;
      if (!Tb(e, t))
        return !1;
      const i = [];
      for (; t; ) {
        for (let a = 0; a < t.children.length; a++) {
          const o = t.children[a], u = t.leaf ? this.toBBox(o) : o;
          if (Tb(e, u)) {
            if (t.leaf || LO(e, u))
              return !0;
            i.push(o);
          }
        }
        t = i.pop();
      }
      return !1;
    }
    load(e) {
      if (!(e && e.length))
        return this;
      if (e.length < this._minEntries) {
        for (let i = 0; i < e.length; i++)
          this.insert(e[i]);
        return this;
      }
      let t = this._build(e.slice(), 0, e.length - 1, 0);
      if (!this.data.children.length)
        this.data = t;
      else if (this.data.height === t.height)
        this._splitRoot(this.data, t);
      else {
        if (this.data.height < t.height) {
          const i = this.data;
          this.data = t, t = i;
        }
        this._insert(t, this.data.height - t.height - 1, !0);
      }
      return this;
    }
    insert(e) {
      return e && this._insert(e, this.data.height - 1), this;
    }
    clear() {
      return this.data = N0([]), this;
    }
    remove(e, t) {
      if (!e)
        return this;
      let i = this.data;
      const a = this.toBBox(e), o = [], u = [];
      let c, p, y;
      for (; i || o.length; ) {
        if (i || (i = o.pop(), p = o[o.length - 1], c = u.pop(), y = !0), i.leaf) {
          const _ = kee(e, i.children, t);
          if (_ !== -1)
            return i.children.splice(_, 1), o.push(i), this._condense(o), this;
        }
        !y && !i.leaf && LO(i, a) ? (o.push(i), u.push(c), c = 0, p = i, i = i.children[0]) : p ? (c++, i = p.children[c], y = !1) : i = null;
      }
      return this;
    }
    toBBox(e) {
      return e;
    }
    compareMinX(e, t) {
      return e.minX - t.minX;
    }
    compareMinY(e, t) {
      return e.minY - t.minY;
    }
    toJSON() {
      return this.data;
    }
    fromJSON(e) {
      return this.data = e, this;
    }
    _all(e, t) {
      const i = [];
      for (; e; )
        e.leaf ? t.push(...e.children) : i.push(...e.children), e = i.pop();
      return t;
    }
    _build(e, t, i, a) {
      const o = i - t + 1;
      let u = this._maxEntries, c;
      if (o <= u)
        return c = N0(e.slice(t, i + 1)), b0(c, this.toBBox), c;
      a || (a = Math.ceil(Math.log(o) / Math.log(u)), u = Math.ceil(o / Math.pow(u, a - 1))), c = N0([]), c.leaf = !1, c.height = a;
      const p = Math.ceil(o / u), y = p * Math.ceil(Math.sqrt(u));
      e2(e, t, i, y, this.compareMinX);
      for (let _ = t; _ <= i; _ += y) {
        const S = Math.min(_ + y - 1, i);
        e2(e, _, S, p, this.compareMinY);
        for (let b = _; b <= S; b += p) {
          const T = Math.min(b + p - 1, S);
          c.children.push(this._build(e, b, T, a - 1));
        }
      }
      return b0(c, this.toBBox), c;
    }
    _chooseSubtree(e, t, i, a) {
      for (; a.push(t), !(t.leaf || a.length - 1 === i); ) {
        let o = 1 / 0, u = 1 / 0, c;
        for (let p = 0; p < t.children.length; p++) {
          const y = t.children[p], _ = AO(y), S = Uee(e, y) - _;
          S < u ? (u = S, o = _ < o ? _ : o, c = y) : S === u && _ < o && (o = _, c = y);
        }
        t = c || t.children[0];
      }
      return t;
    }
    _insert(e, t, i) {
      const a = i ? e : this.toBBox(e), o = [], u = this._chooseSubtree(a, this.data, t, o);
      for (u.children.push(e), gE(u, a); t >= 0 && o[t].children.length > this._maxEntries; )
        this._split(o, t), t--;
      this._adjustParentBBoxes(a, o, t);
    }
    // split overflowed node into two
    _split(e, t) {
      const i = e[t], a = i.children.length, o = this._minEntries;
      this._chooseSplitAxis(i, o, a);
      const u = this._chooseSplitIndex(i, o, a), c = N0(i.children.splice(u, i.children.length - u));
      c.height = i.height, c.leaf = i.leaf, b0(i, this.toBBox), b0(c, this.toBBox), t ? e[t - 1].children.push(c) : this._splitRoot(i, c);
    }
    _splitRoot(e, t) {
      this.data = N0([e, t]), this.data.height = e.height + 1, this.data.leaf = !1, b0(this.data, this.toBBox);
    }
    _chooseSplitIndex(e, t, i) {
      let a, o = 1 / 0, u = 1 / 0;
      for (let c = t; c <= i - t; c++) {
        const p = pE(e, 0, c, this.toBBox), y = pE(e, c, i, this.toBBox), _ = zee(p, y), S = AO(p) + AO(y);
        _ < o ? (o = _, a = c, u = S < u ? S : u) : _ === o && S < u && (u = S, a = c);
      }
      return a || i - t;
    }
    // sorts node children by the best axis for split
    _chooseSplitAxis(e, t, i) {
      const a = e.leaf ? this.compareMinX : Fee, o = e.leaf ? this.compareMinY : jee, u = this._allDistMargin(e, t, i, a), c = this._allDistMargin(e, t, i, o);
      u < c && e.children.sort(a);
    }
    // total margin of all possible split distributions where each node is at least m full
    _allDistMargin(e, t, i, a) {
      e.children.sort(a);
      const o = this.toBBox, u = pE(e, 0, t, o), c = pE(e, i - t, i, o);
      let p = Cb(u) + Cb(c);
      for (let y = t; y < i - t; y++) {
        const _ = e.children[y];
        gE(u, e.leaf ? o(_) : _), p += Cb(u);
      }
      for (let y = i - t - 1; y >= t; y--) {
        const _ = e.children[y];
        gE(c, e.leaf ? o(_) : _), p += Cb(c);
      }
      return p;
    }
    _adjustParentBBoxes(e, t, i) {
      for (let a = i; a >= 0; a--)
        gE(t[a], e);
    }
    _condense(e) {
      for (let t = e.length - 1, i; t >= 0; t--)
        e[t].children.length === 0 ? t > 0 ? (i = e[t - 1].children, i.splice(i.indexOf(e[t]), 1)) : this.clear() : b0(e[t], this.toBBox);
    }
  };
  function kee(n, e, t) {
    if (!t)
      return e.indexOf(n);
    for (let i = 0; i < e.length; i++)
      if (t(n, e[i]))
        return i;
    return -1;
  }
  function b0(n, e) {
    pE(n, 0, n.children.length, e, n);
  }
  function pE(n, e, t, i, a) {
    a || (a = N0(null)), a.minX = 1 / 0, a.minY = 1 / 0, a.maxX = -1 / 0, a.maxY = -1 / 0;
    for (let o = e; o < t; o++) {
      const u = n.children[o];
      gE(a, n.leaf ? i(u) : u);
    }
    return a;
  }
  function gE(n, e) {
    return n.minX = Math.min(n.minX, e.minX), n.minY = Math.min(n.minY, e.minY), n.maxX = Math.max(n.maxX, e.maxX), n.maxY = Math.max(n.maxY, e.maxY), n;
  }
  function Fee(n, e) {
    return n.minX - e.minX;
  }
  function jee(n, e) {
    return n.minY - e.minY;
  }
  function AO(n) {
    return (n.maxX - n.minX) * (n.maxY - n.minY);
  }
  function Cb(n) {
    return n.maxX - n.minX + (n.maxY - n.minY);
  }
  function Uee(n, e) {
    return (Math.max(e.maxX, n.maxX) - Math.min(e.minX, n.minX)) * (Math.max(e.maxY, n.maxY) - Math.min(e.minY, n.minY));
  }
  function zee(n, e) {
    const t = Math.max(n.minX, e.minX), i = Math.max(n.minY, e.minY), a = Math.min(n.maxX, e.maxX), o = Math.min(n.maxY, e.maxY);
    return Math.max(0, a - t) * Math.max(0, o - i);
  }
  function LO(n, e) {
    return n.minX <= e.minX && n.minY <= e.minY && e.maxX <= n.maxX && e.maxY <= n.maxY;
  }
  function Tb(n, e) {
    return e.minX <= n.maxX && e.minY <= n.maxY && e.maxX >= n.minX && e.maxY >= n.minY;
  }
  function N0(n) {
    return {
      children: n,
      height: 1,
      leaf: !0,
      minX: 1 / 0,
      minY: 1 / 0,
      maxX: -1 / 0,
      maxY: -1 / 0
    };
  }
  function e2(n, e, t, i, a) {
    const o = [e, t];
    for (; o.length; ) {
      if (t = o.pop(), e = o.pop(), t - e <= i)
        continue;
      const u = e + Math.ceil((t - e) / i / 2) * i;
      Iee(n, u, e, t, a), o.push(e, u, u, t);
    }
  }
  class tU extends fS {
    /**
     * @param {import("./extent.js").Extent} extent Extent.
     * @param {number|Array<number>|undefined} resolution Resolution. If provided as array, x and y
     * resolution will be assumed.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("./ImageState.js").default|import("./Image.js").Loader} stateOrLoader State.
     */
    constructor(e, t, i, a) {
      super(), this.extent = e, this.pixelRatio_ = i, this.resolution = t, this.state = typeof a == "function" ? _n.IDLE : a, this.image_ = null, this.loader = typeof a == "function" ? a : null;
    }
    /**
     * @protected
     */
    changed() {
      this.dispatchEvent(Cn.CHANGE);
    }
    /**
     * @return {import("./extent.js").Extent} Extent.
     */
    getExtent() {
      return this.extent;
    }
    /**
     * @return {import('./DataTile.js').ImageLike} Image.
     */
    getImage() {
      return this.image_;
    }
    /**
     * @return {number} PixelRatio.
     */
    getPixelRatio() {
      return this.pixelRatio_;
    }
    /**
     * @return {number|Array<number>} Resolution.
     */
    getResolution() {
      return (
        /** @type {number} */
        this.resolution
      );
    }
    /**
     * @return {import("./ImageState.js").default} State.
     */
    getState() {
      return this.state;
    }
    /**
     * Load not yet loaded URI.
     */
    load() {
      if (this.state == _n.IDLE && this.loader) {
        this.state = _n.LOADING, this.changed();
        const e = this.getResolution(), t = Array.isArray(e) ? e[0] : e;
        ZQ(
          () => this.loader(this.getExtent(), t, this.getPixelRatio())
        ).then((i) => {
          "image" in i && (this.image_ = i.image), "extent" in i && (this.extent = i.extent), "resolution" in i && (this.resolution = i.resolution), "pixelRatio" in i && (this.pixelRatio_ = i.pixelRatio), (i instanceof HTMLImageElement || i instanceof ImageBitmap || i instanceof HTMLCanvasElement || i instanceof HTMLVideoElement) && (this.image_ = i), this.state = _n.LOADED;
        }).catch((i) => {
          this.state = _n.ERROR, console.error(i);
        }).finally(() => this.changed());
      }
    }
    /**
     * @param {import('./DataTile.js').ImageLike} image The image.
     */
    setImage(e) {
      this.image_ = e;
    }
    /**
     * @param {number|Array<number>} resolution Resolution.
     */
    setResolution(e) {
      this.resolution = e;
    }
  }
  function $ee(n, e, t) {
    const i = (
      /** @type {HTMLImageElement} */
      n
    );
    let a = !0, o = !1, u = !1;
    const c = [
      uw(i, Cn.LOAD, function() {
        u = !0, o || e();
      })
    ];
    return i.src && NL ? (o = !0, i.decode().then(function() {
      a && e();
    }).catch(function(p) {
      a && (u ? e() : t());
    })) : c.push(uw(i, Cn.ERROR, t)), function() {
      a = !1, c.forEach(Or);
    };
  }
  function Bee(n, e) {
    return new Promise((t, i) => {
      function a() {
        u(), t(n);
      }
      function o() {
        u(), i(new Error("Image load error"));
      }
      function u() {
        n.removeEventListener("load", a), n.removeEventListener("error", o);
      }
      n.addEventListener("load", a), n.addEventListener("error", o), e && (n.src = e);
    });
  }
  function nU(n, e) {
    return e && (n.src = e), n.src && NL ? new Promise(
      (t, i) => n.decode().then(() => t(n)).catch(
        (a) => n.complete && n.width ? t(n) : i(a)
      )
    ) : Bee(n);
  }
  function iU(n, e) {
    return e && (n.src = e), n.src && NL && wJ ? n.decode().then(() => createImageBitmap(n)).catch((t) => {
      if (n.complete && n.width)
        return n;
      throw t;
    }) : nU(n);
  }
  class Vee {
    constructor() {
      this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32;
    }
    /**
     * FIXME empty description for jsdoc
     */
    clear() {
      this.cache_ = {}, this.cacheSize_ = 0;
    }
    /**
     * @return {boolean} Can expire cache.
     */
    canExpireCache() {
      return this.cacheSize_ > this.maxCacheSize_;
    }
    /**
     * FIXME empty description for jsdoc
     */
    expire() {
      if (this.canExpireCache()) {
        let e = 0;
        for (const t in this.cache_) {
          const i = this.cache_[t];
          !(e++ & 3) && !i.hasListener() && (delete this.cache_[t], --this.cacheSize_);
        }
      }
    }
    /**
     * @param {string} src Src.
     * @param {?string} crossOrigin Cross origin.
     * @param {import("../color.js").Color} color Color.
     * @return {import("./IconImage.js").default} Icon image.
     */
    get(e, t, i) {
      const a = t2(e, t, i);
      return a in this.cache_ ? this.cache_[a] : null;
    }
    /**
     * @param {string} src Src.
     * @param {?string} crossOrigin Cross origin.
     * @param {import("../color.js").Color} color Color.
     * @param {import("./IconImage.js").default} iconImage Icon image.
     */
    set(e, t, i, a) {
      const o = t2(e, t, i);
      this.cache_[o] = a, ++this.cacheSize_;
    }
    /**
     * Set the cache size of the icon cache. Default is `32`. Change this value when
     * your map uses more than 32 different icon images and you are not caching icon
     * styles on the application level.
     * @param {number} maxCacheSize Cache max size.
     * @api
     */
    setSize(e) {
      this.maxCacheSize_ = e, this.expire();
    }
  }
  function t2(n, e, t) {
    const i = t ? Vj(t) : "null";
    return e + ":" + n + ":" + i;
  }
  const yw = new Vee();
  let sE = null;
  class Hee extends fS {
    /**
     * @param {HTMLImageElement|HTMLCanvasElement|ImageBitmap} image Image.
     * @param {string|undefined} src Src.
     * @param {?string} crossOrigin Cross origin.
     * @param {import("../ImageState.js").default} imageState Image state.
     * @param {import("../color.js").Color} color Color.
     */
    constructor(e, t, i, a, o) {
      super(), this.hitDetectionImage_ = null, this.image_ = e, this.crossOrigin_ = i, this.canvas_ = {}, this.color_ = o, this.imageState_ = a === void 0 ? _n.IDLE : a, this.size_ = e && e.width && e.height ? [e.width, e.height] : null, this.src_ = t, this.tainted_;
    }
    /**
     * @private
     */
    initializeImage_() {
      this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_);
    }
    /**
     * @private
     * @return {boolean} The image canvas is tainted.
     */
    isTainted_() {
      if (this.tainted_ === void 0 && this.imageState_ === _n.LOADED) {
        sE || (sE = tl(1, 1, void 0, {
          willReadFrequently: !0
        })), sE.drawImage(this.image_, 0, 0);
        try {
          sE.getImageData(0, 0, 1, 1), this.tainted_ = !1;
        } catch {
          sE = null, this.tainted_ = !0;
        }
      }
      return this.tainted_ === !0;
    }
    /**
     * @private
     */
    dispatchChangeEvent_() {
      this.dispatchEvent(Cn.CHANGE);
    }
    /**
     * @private
     */
    handleImageError_() {
      this.imageState_ = _n.ERROR, this.dispatchChangeEvent_();
    }
    /**
     * @private
     */
    handleImageLoad_() {
      this.imageState_ = _n.LOADED, this.size_ = [this.image_.width, this.image_.height], this.dispatchChangeEvent_();
    }
    /**
     * @param {number} pixelRatio Pixel ratio.
     * @return {HTMLImageElement|HTMLCanvasElement|ImageBitmap} Image or Canvas element or image bitmap.
     */
    getImage(e) {
      return this.image_ || this.initializeImage_(), this.replaceColor_(e), this.canvas_[e] ? this.canvas_[e] : this.image_;
    }
    /**
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} Image or Canvas element.
     */
    getPixelRatio(e) {
      return this.replaceColor_(e), this.canvas_[e] ? e : 1;
    }
    /**
     * @return {import("../ImageState.js").default} Image state.
     */
    getImageState() {
      return this.imageState_;
    }
    /**
     * @return {HTMLImageElement|HTMLCanvasElement|ImageBitmap} Image element.
     */
    getHitDetectionImage() {
      if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_)
        if (this.isTainted_()) {
          const e = this.size_[0], t = this.size_[1], i = tl(e, t);
          i.fillRect(0, 0, e, t), this.hitDetectionImage_ = i.canvas;
        } else
          this.hitDetectionImage_ = this.image_;
      return this.hitDetectionImage_;
    }
    /**
     * Get the size of the icon (in pixels).
     * @return {import("../size.js").Size} Image size.
     */
    getSize() {
      return this.size_;
    }
    /**
     * @return {string|undefined} Image src.
     */
    getSrc() {
      return this.src_;
    }
    /**
     * Load not yet loaded URI.
     */
    load() {
      if (this.imageState_ === _n.IDLE) {
        this.image_ || this.initializeImage_(), this.imageState_ = _n.LOADING;
        try {
          this.src_ !== void 0 && (this.image_.src = this.src_);
        } catch {
          this.handleImageError_();
        }
        this.image_ instanceof HTMLImageElement && nU(this.image_, this.src_).then((e) => {
          this.image_ = e, this.handleImageLoad_();
        }).catch(this.handleImageError_.bind(this));
      }
    }
    /**
     * @param {number} pixelRatio Pixel ratio.
     * @private
     */
    replaceColor_(e) {
      if (!this.color_ || this.canvas_[e] || this.imageState_ !== _n.LOADED)
        return;
      const t = this.image_, i = document.createElement("canvas");
      i.width = Math.ceil(t.width * e), i.height = Math.ceil(t.height * e);
      const a = i.getContext("2d");
      a.scale(e, e), a.drawImage(t, 0, 0), a.globalCompositeOperation = "multiply", a.fillStyle = Vj(this.color_), a.fillRect(0, 0, i.width / e, i.height / e), a.globalCompositeOperation = "destination-in", a.drawImage(t, 0, 0), this.canvas_[e] = i;
    }
  }
  function Wee(n, e, t, i, a) {
    let o = e === void 0 ? void 0 : yw.get(e, t, a);
    return o || (o = new Hee(
      n,
      n instanceof HTMLImageElement ? n.src || void 0 : e,
      t,
      i,
      a
    ), yw.set(e, t, a, o)), o;
  }
  function n2(n, e, t, i) {
    return t !== void 0 && i !== void 0 ? [t / n, i / e] : t !== void 0 ? t / n : i !== void 0 ? i / e : 1;
  }
  class iN extends $j {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {};
      const t = e.opacity !== void 0 ? e.opacity : 1, i = e.rotation !== void 0 ? e.rotation : 0, a = e.scale !== void 0 ? e.scale : 1, o = e.rotateWithView !== void 0 ? e.rotateWithView : !1;
      super({
        opacity: t,
        rotation: i,
        scale: a,
        displacement: e.displacement !== void 0 ? e.displacement : [0, 0],
        rotateWithView: o,
        declutterMode: e.declutterMode
      }), this.anchor_ = e.anchor !== void 0 ? e.anchor : [0.5, 0.5], this.normalizedAnchor_ = null, this.anchorOrigin_ = e.anchorOrigin !== void 0 ? e.anchorOrigin : "top-left", this.anchorXUnits_ = e.anchorXUnits !== void 0 ? e.anchorXUnits : "fraction", this.anchorYUnits_ = e.anchorYUnits !== void 0 ? e.anchorYUnits : "fraction", this.crossOrigin_ = e.crossOrigin !== void 0 ? e.crossOrigin : null;
      const u = e.img !== void 0 ? e.img : null;
      let c = e.src;
      Ei(
        !(c !== void 0 && u),
        "`image` and `src` cannot be provided at the same time"
      ), (c === void 0 || c.length === 0) && u && (c = /** @type {HTMLImageElement} */
      u.src || Pi(u)), Ei(
        c !== void 0 && c.length > 0,
        "A defined and non-empty `src` or `image` must be provided"
      ), Ei(
        !((e.width !== void 0 || e.height !== void 0) && e.scale !== void 0),
        "`width` or `height` cannot be provided together with `scale`"
      );
      let p;
      if (e.src !== void 0 ? p = _n.IDLE : u !== void 0 && (u instanceof HTMLImageElement ? u.complete ? p = u.src ? _n.LOADED : _n.IDLE : p = _n.LOADING : p = _n.LOADED), this.color_ = e.color !== void 0 ? pw(e.color) : null, this.iconImage_ = Wee(
        u,
        /** @type {string} */
        c,
        this.crossOrigin_,
        p,
        this.color_
      ), this.offset_ = e.offset !== void 0 ? e.offset : [0, 0], this.offsetOrigin_ = e.offsetOrigin !== void 0 ? e.offsetOrigin : "top-left", this.origin_ = null, this.size_ = e.size !== void 0 ? e.size : null, e.width !== void 0 || e.height !== void 0) {
        let y, _;
        if (e.size)
          [y, _] = e.size;
        else {
          const S = this.getImage(1);
          if (S.width && S.height)
            y = S.width, _ = S.height;
          else if (S instanceof HTMLImageElement) {
            this.initialOptions_ = e;
            const b = () => {
              if (this.unlistenImageChange(b), !this.initialOptions_)
                return;
              const T = this.iconImage_.getSize();
              this.setScale(
                n2(
                  T[0],
                  T[1],
                  e.width,
                  e.height
                )
              );
            };
            this.listenImageChange(b);
            return;
          }
        }
        y !== void 0 && this.setScale(
          n2(y, _, e.width, e.height)
        );
      }
    }
    /**
     * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
     * @return {Icon} The cloned style.
     * @api
     */
    clone() {
      let e, t, i;
      return this.initialOptions_ ? (t = this.initialOptions_.width, i = this.initialOptions_.height) : (e = this.getScale(), e = Array.isArray(e) ? e.slice() : e), new iN({
        anchor: this.anchor_.slice(),
        anchorOrigin: this.anchorOrigin_,
        anchorXUnits: this.anchorXUnits_,
        anchorYUnits: this.anchorYUnits_,
        color: this.color_ && this.color_.slice ? this.color_.slice() : this.color_ || void 0,
        crossOrigin: this.crossOrigin_,
        offset: this.offset_.slice(),
        offsetOrigin: this.offsetOrigin_,
        opacity: this.getOpacity(),
        rotateWithView: this.getRotateWithView(),
        rotation: this.getRotation(),
        scale: e,
        width: t,
        height: i,
        size: this.size_ !== null ? this.size_.slice() : void 0,
        src: this.getSrc(),
        displacement: this.getDisplacement().slice(),
        declutterMode: this.getDeclutterMode()
      });
    }
    /**
     * Get the anchor point in pixels. The anchor determines the center point for the
     * symbolizer.
     * @return {Array<number>} Anchor.
     * @api
     */
    getAnchor() {
      let e = this.normalizedAnchor_;
      if (!e) {
        e = this.anchor_;
        const a = this.getSize();
        if (this.anchorXUnits_ == "fraction" || this.anchorYUnits_ == "fraction") {
          if (!a)
            return null;
          e = this.anchor_.slice(), this.anchorXUnits_ == "fraction" && (e[0] *= a[0]), this.anchorYUnits_ == "fraction" && (e[1] *= a[1]);
        }
        if (this.anchorOrigin_ != "top-left") {
          if (!a)
            return null;
          e === this.anchor_ && (e = this.anchor_.slice()), (this.anchorOrigin_ == "top-right" || this.anchorOrigin_ == "bottom-right") && (e[0] = -e[0] + a[0]), (this.anchorOrigin_ == "bottom-left" || this.anchorOrigin_ == "bottom-right") && (e[1] = -e[1] + a[1]);
        }
        this.normalizedAnchor_ = e;
      }
      const t = this.getDisplacement(), i = this.getScaleArray();
      return [
        e[0] - t[0] / i[0],
        e[1] + t[1] / i[1]
      ];
    }
    /**
     * Set the anchor point. The anchor determines the center point for the
     * symbolizer.
     *
     * @param {Array<number>} anchor Anchor.
     * @api
     */
    setAnchor(e) {
      this.anchor_ = e, this.normalizedAnchor_ = null;
    }
    /**
     * Get the icon color.
     * @return {import("../color.js").Color} Color.
     * @api
     */
    getColor() {
      return this.color_;
    }
    /**
     * Get the image icon.
     * @param {number} pixelRatio Pixel ratio.
     * @return {HTMLImageElement|HTMLCanvasElement|ImageBitmap} Image or Canvas element. If the Icon
     * style was configured with `src` or with a not let loaded `img`, an `ImageBitmap` will be returned.
     * @api
     */
    getImage(e) {
      return this.iconImage_.getImage(e);
    }
    /**
     * Get the pixel ratio.
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} The pixel ratio of the image.
     * @api
     */
    getPixelRatio(e) {
      return this.iconImage_.getPixelRatio(e);
    }
    /**
     * @return {import("../size.js").Size} Image size.
     */
    getImageSize() {
      return this.iconImage_.getSize();
    }
    /**
     * @return {import("../ImageState.js").default} Image state.
     */
    getImageState() {
      return this.iconImage_.getImageState();
    }
    /**
     * @return {HTMLImageElement|HTMLCanvasElement|ImageBitmap} Image element.
     */
    getHitDetectionImage() {
      return this.iconImage_.getHitDetectionImage();
    }
    /**
     * Get the origin of the symbolizer.
     * @return {Array<number>} Origin.
     * @api
     */
    getOrigin() {
      if (this.origin_)
        return this.origin_;
      let e = this.offset_;
      if (this.offsetOrigin_ != "top-left") {
        const t = this.getSize(), i = this.iconImage_.getSize();
        if (!t || !i)
          return null;
        e = e.slice(), (this.offsetOrigin_ == "top-right" || this.offsetOrigin_ == "bottom-right") && (e[0] = i[0] - t[0] - e[0]), (this.offsetOrigin_ == "bottom-left" || this.offsetOrigin_ == "bottom-right") && (e[1] = i[1] - t[1] - e[1]);
      }
      return this.origin_ = e, this.origin_;
    }
    /**
     * Get the image URL.
     * @return {string|undefined} Image src.
     * @api
     */
    getSrc() {
      return this.iconImage_.getSrc();
    }
    /**
     * Get the size of the icon (in pixels).
     * @return {import("../size.js").Size} Image size.
     * @api
     */
    getSize() {
      return this.size_ ? this.size_ : this.iconImage_.getSize();
    }
    /**
     * Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
     * @return {number} Icon width (in pixels).
     * @api
     */
    getWidth() {
      const e = this.getScaleArray();
      if (this.size_)
        return this.size_[0] * e[0];
      if (this.iconImage_.getImageState() == _n.LOADED)
        return this.iconImage_.getSize()[0] * e[0];
    }
    /**
     * Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
     * @return {number} Icon height (in pixels).
     * @api
     */
    getHeight() {
      const e = this.getScaleArray();
      if (this.size_)
        return this.size_[1] * e[1];
      if (this.iconImage_.getImageState() == _n.LOADED)
        return this.iconImage_.getSize()[1] * e[1];
    }
    /**
     * Set the scale.
     *
     * @param {number|import("../size.js").Size} scale Scale.
     * @api
     */
    setScale(e) {
      delete this.initialOptions_, super.setScale(e);
    }
    /**
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    listenImageChange(e) {
      this.iconImage_.addEventListener(Cn.CHANGE, e);
    }
    /**
     * Load not yet loaded URI.
     * When rendering a feature with an icon style, the vector renderer will
     * automatically call this method. However, you might want to call this
     * method yourself for preloading or other purposes.
     * @api
     */
    load() {
      this.iconImage_.load();
    }
    /**
     * @param {function(import("../events/Event.js").default): void} listener Listener function.
     */
    unlistenImageChange(e) {
      this.iconImage_.removeEventListener(Cn.CHANGE, e);
    }
  }
  const rU = iN;
  let b_ = 0;
  const w_ = 0, Sa = 1 << b_++, Ht = 1 << b_++, wf = 1 << b_++, Ro = 1 << b_++, lm = 1 << b_++, Ol = Math.pow(2, b_) - 1, aU = {
    [Sa]: "boolean",
    [Ht]: "number",
    [wf]: "string",
    [Ro]: "color",
    [lm]: "number[]"
  }, Gee = Object.keys(aU).map(Number).sort(sm);
  function Mo(n) {
    const e = [];
    for (const t of Gee)
      Yee(n, t) && e.push(aU[t]);
    return e.length === 0 ? "untyped" : e.length < 3 ? e.join(" or ") : e.slice(0, -1).join(", ") + ", or " + e[e.length - 1];
  }
  function Yee(n, e) {
    return (n & e) === e;
  }
  function Wh(n, e) {
    return !!(n & e);
  }
  function Qw(n, e) {
    return n === e;
  }
  class Yg {
    /**
     * @param {number} type The value type.
     * @param {LiteralValue} value The literal value.
     */
    constructor(e, t) {
      this.type = e, this.value = t;
    }
  }
  class qee {
    /**
     * @param {number} type The return type.
     * @param {string} operator The operator.
     * @param {...Expression} args The arguments.
     */
    constructor(e, t, ...i) {
      this.type = e, this.operator = t, this.args = i;
    }
  }
  function sU() {
    return {
      variables: /* @__PURE__ */ new Set(),
      properties: /* @__PURE__ */ new Set(),
      featureId: !1,
      style: {}
    };
  }
  function Xee(n) {
    switch (n) {
      case "string":
        return wf;
      case "color":
        return Ro;
      case "number":
        return Ht;
      case "boolean":
        return Sa;
      case "number[]":
        return lm;
      default:
        throw new Error(`Unrecognized type hint: ${n}`);
    }
  }
  function qi(n, e, t) {
    switch (typeof n) {
      case "boolean":
        return new Yg(Sa, n);
      case "number":
        return new Yg(Ht, n);
      case "string": {
        let a = wf;
        return aee(n) && (a |= Ro), Qw(a & t, w_) || (a &= t), new Yg(a, n);
      }
    }
    if (!Array.isArray(n))
      throw new Error("Expression must be an array or a primitive value");
    if (n.length === 0)
      throw new Error("Empty expression");
    if (typeof n[0] == "string")
      return ste(n, e, t);
    for (const a of n)
      if (typeof a != "number")
        throw new Error("Expected an array of numbers");
    let i = lm;
    return (n.length === 3 || n.length === 4) && (i |= Ro), t && (i &= t), new Yg(i, n);
  }
  const qe = {
    Get: "get",
    Var: "var",
    Concat: "concat",
    GeometryType: "geometry-type",
    Any: "any",
    All: "all",
    Not: "!",
    Resolution: "resolution",
    Zoom: "zoom",
    Time: "time",
    Equal: "==",
    NotEqual: "!=",
    GreaterThan: ">",
    GreaterThanOrEqualTo: ">=",
    LessThan: "<",
    LessThanOrEqualTo: "<=",
    Multiply: "*",
    Divide: "/",
    Add: "+",
    Subtract: "-",
    Clamp: "clamp",
    Mod: "%",
    Pow: "^",
    Abs: "abs",
    Floor: "floor",
    Ceil: "ceil",
    Round: "round",
    Sin: "sin",
    Cos: "cos",
    Atan: "atan",
    Sqrt: "sqrt",
    Match: "match",
    Between: "between",
    Interpolate: "interpolate",
    Case: "case",
    In: "in",
    Number: "number",
    String: "string",
    Array: "array",
    Color: "color",
    Id: "id",
    Band: "band",
    Palette: "palette"
  }, Kee = {
    [qe.Get]: wn(
      ([n, e]) => e !== void 0 ? Xee(
        /** @type {string} */
        /** @type {LiteralExpression} */
        e.value
      ) : Ol,
      Yn(1, 2),
      Zee
    ),
    [qe.Var]: wn(
      ([n]) => n.type,
      Yn(1, 1),
      Qee
    ),
    [qe.Id]: wn(Ht | wf, oE, Jee),
    [qe.Concat]: wn(
      wf,
      Yn(2, 1 / 0),
      Ii(Ol)
    ),
    [qe.GeometryType]: wn(wf, oE),
    [qe.Resolution]: wn(Ht, oE),
    [qe.Zoom]: wn(Ht, oE),
    [qe.Time]: wn(Ht, oE),
    [qe.Any]: wn(
      Sa,
      Yn(2, 1 / 0),
      Ii(Sa)
    ),
    [qe.All]: wn(
      Sa,
      Yn(2, 1 / 0),
      Ii(Sa)
    ),
    [qe.Not]: wn(
      Sa,
      Yn(1, 1),
      Ii(Sa)
    ),
    [qe.Equal]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.NotEqual]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.GreaterThan]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.GreaterThanOrEqualTo]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.LessThan]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.LessThanOrEqualTo]: wn(
      Sa,
      Yn(2, 2),
      Ii(Ol),
      bv
    ),
    [qe.Multiply]: wn(
      (n) => {
        let e = Ht | Ro;
        for (let t = 0; t < n.length; t++)
          e &= n[t].type;
        return e;
      },
      Yn(2, 1 / 0),
      Ii(Ht | Ro),
      bv
    ),
    [qe.Divide]: wn(
      Ht,
      Yn(2, 2),
      Ii(Ht)
    ),
    [qe.Add]: wn(
      Ht,
      Yn(2, 1 / 0),
      Ii(Ht)
    ),
    [qe.Subtract]: wn(
      Ht,
      Yn(2, 2),
      Ii(Ht)
    ),
    [qe.Clamp]: wn(
      Ht,
      Yn(3, 3),
      Ii(Ht)
    ),
    [qe.Mod]: wn(
      Ht,
      Yn(2, 2),
      Ii(Ht)
    ),
    [qe.Pow]: wn(
      Ht,
      Yn(2, 2),
      Ii(Ht)
    ),
    [qe.Abs]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Floor]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Ceil]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Round]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Sin]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Cos]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Atan]: wn(
      Ht,
      Yn(1, 2),
      Ii(Ht)
    ),
    [qe.Sqrt]: wn(
      Ht,
      Yn(1, 1),
      Ii(Ht)
    ),
    [qe.Match]: wn(
      (n) => {
        let e = Ol;
        for (let t = 2; t < n.length; t += 2)
          e &= n[t].type;
        return e &= n[n.length - 1].type, e;
      },
      Yn(4, 1 / 0),
      i2,
      tte
    ),
    [qe.Between]: wn(
      Sa,
      Yn(3, 3),
      Ii(Ht)
    ),
    [qe.Interpolate]: wn(
      (n) => {
        let e = Ro | Ht;
        for (let t = 3; t < n.length; t += 2)
          e &= n[t].type;
        return e;
      },
      Yn(6, 1 / 0),
      i2,
      nte
    ),
    [qe.Case]: wn(
      (n) => {
        let e = Ol;
        for (let t = 1; t < n.length; t += 2)
          e &= n[t].type;
        return e &= n[n.length - 1].type, e;
      },
      Yn(3, 1 / 0),
      ete,
      ite
    ),
    [qe.In]: wn(Sa, Yn(2, 2), rte),
    [qe.Number]: wn(
      Ht,
      Yn(1, 1 / 0),
      Ii(Ol)
    ),
    [qe.String]: wn(
      wf,
      Yn(1, 1 / 0),
      Ii(Ol)
    ),
    [qe.Array]: wn(
      (n) => n.length === 3 || n.length === 4 ? lm | Ro : lm,
      Yn(1, 1 / 0),
      Ii(Ht)
    ),
    [qe.Color]: wn(
      Ro,
      Yn(3, 4),
      Ii(Ht)
    ),
    [qe.Band]: wn(
      Ht,
      Yn(1, 3),
      Ii(Ht)
    ),
    [qe.Palette]: wn(Ro, Yn(2, 2), ate)
  };
  function Zee(n, e) {
    const t = qi(n[1], e);
    if (!(t instanceof Yg))
      throw new Error("Expected a literal argument for get operation");
    if (typeof t.value != "string")
      throw new Error("Expected a string argument for get operation");
    if (e.properties.add(t.value), n.length === 3) {
      const i = qi(n[2], e);
      return [t, i];
    }
    return [t];
  }
  function Qee(n, e, t, i) {
    const a = n[1];
    if (typeof a != "string")
      throw new Error("Expected a string argument for var operation");
    if (e.variables.add(a), !("variables" in e.style) || e.style.variables[a] === void 0)
      return [new Yg(Ol, a)];
    const o = e.style.variables[a], u = (
      /** @type {LiteralExpression} */
      qi(o, e)
    );
    if (u.value = a, i && !Wh(i, u.type))
      throw new Error(
        `The variable ${a} has type ${Mo(
          u.type
        )} but the following type was expected: ${Mo(i)}`
      );
    return [u];
  }
  function Jee(n, e) {
    e.featureId = !0;
  }
  function oE(n, e) {
    const t = n[0];
    if (n.length !== 1)
      throw new Error(`Expected no arguments for ${t} operation`);
    return [];
  }
  function Yn(n, e) {
    return function(t, i) {
      const a = t[0], o = t.length - 1;
      if (n === e) {
        if (o !== n) {
          const u = n === 1 ? "" : "s";
          throw new Error(
            `Expected ${n} argument${u} for ${a}, got ${o}`
          );
        }
      } else if (o < n || o > e) {
        const u = e === 1 / 0 ? `${n} or more` : `${n} to ${e}`;
        throw new Error(
          `Expected ${u} arguments for ${a}, got ${o}`
        );
      }
    };
  }
  function Ii(n) {
    return function(e, t) {
      const i = e[0], a = e.length - 1, o = new Array(a);
      for (let u = 0; u < a; ++u) {
        const c = qi(e[u + 1], t);
        if (!Wh(n, c.type)) {
          const p = Mo(n), y = Mo(c.type);
          throw new Error(
            `Unexpected type for argument ${u} of ${i} operation, got ${p} but expected ${y}`
          );
        }
        c.type &= n, o[u] = c;
      }
      return o;
    };
  }
  function bv(n, e, t) {
    const i = n[0], a = n.length - 1;
    let o = Ol;
    for (let c = 0; c < t.length; ++c)
      o &= t[c].type;
    if (o === w_)
      throw new Error(
        `No common type could be found for arguments of ${i} operation`
      );
    const u = new Array(a);
    for (let c = 0; c < a; ++c)
      u[c] = qi(n[c + 1], e, o);
    return u;
  }
  function ete(n, e) {
    const t = n[0], i = n.length - 1;
    if (i % 2 === 0)
      throw new Error(
        `An odd amount of arguments was expected for operation ${t}, got ${JSON.stringify(
          i
        )} instead`
      );
  }
  function i2(n, e) {
    const t = n[0], i = n.length - 1;
    if (i % 2 === 1)
      throw new Error(
        `An even amount of arguments was expected for operation ${t}, got ${JSON.stringify(
          i
        )} instead`
      );
  }
  function tte(n, e, t, i) {
    const a = n.length - 1;
    let u = qi(n[1], e).type;
    const c = qi(n[n.length - 1], e);
    let p = i !== void 0 ? i & c.type : c.type;
    const y = new Array(a - 2);
    for (let S = 0; S < a - 2; S += 2) {
      const b = qi(n[S + 2], e), T = qi(n[S + 3], e);
      u &= b.type, p &= T.type, y[S] = b, y[S + 1] = T;
    }
    const _ = wf | Ht | Sa;
    if (!Wh(_, u))
      throw new Error(
        `Expected an input of type ${Mo(
          _
        )} for the interpolate operation, got ${Mo(u)} instead`
      );
    if (Qw(p, w_))
      throw new Error(
        "Could not find a common output type for the following match operation: " + JSON.stringify(n)
      );
    for (let S = 0; S < a - 2; S += 2) {
      const b = qi(n[S + 2], e, u), T = qi(n[S + 3], e, p);
      y[S] = b, y[S + 1] = T;
    }
    return [
      qi(n[1], e, u),
      ...y,
      qi(n[n.length - 1], e, p)
    ];
  }
  function nte(n, e, t, i) {
    const a = n[1];
    let o;
    switch (a[0]) {
      case "linear":
        o = 1;
        break;
      case "exponential":
        if (o = a[1], typeof o != "number")
          throw new Error(
            `Expected a number base for exponential interpolation, got ${JSON.stringify(o)} instead`
          );
        break;
      default:
        o = null;
    }
    if (!o)
      throw new Error(
        `Invalid interpolation type: ${JSON.stringify(a)}`
      );
    o = qi(o, e);
    let u = qi(n[2], e);
    if (!Wh(Ht, u.type))
      throw new Error(
        `Expected an input of type number for the interpolate operation, got ${Mo(u.type)} instead`
      );
    u = qi(n[2], e, Ht);
    const c = new Array(n.length - 3);
    for (let p = 0; p < c.length; p += 2) {
      let y = qi(n[p + 3], e);
      if (!Wh(Ht, y.type))
        throw new Error(
          `Expected all stop input values in the interpolate operation to be of type number, got ${Mo(y.type)} at position ${p + 2} instead`
        );
      let _ = qi(n[p + 4], e);
      if (!Wh(Ht | Ro, _.type))
        throw new Error(
          `Expected all stop output values in the interpolate operation to be a number or color, got ${Mo(_.type)} at position ${p + 3} instead`
        );
      y = qi(n[p + 3], e, Ht), _ = qi(n[p + 4], e, Ht | Ro), c[p] = y, c[p + 1] = _;
    }
    return [o, u, ...c];
  }
  function ite(n, e, t, i) {
    const a = qi(n[n.length - 1], e);
    let o = i !== void 0 ? i & a.type : a.type;
    const u = new Array(n.length - 1);
    for (let c = 0; c < u.length - 1; c += 2) {
      const p = qi(n[c + 1], e), y = qi(n[c + 2], e);
      if (!Wh(Sa, p.type))
        throw new Error(
          `Expected all conditions in the case operation to be of type boolean, got ${Mo(p.type)} at position ${c} instead`
        );
      o &= y.type, u[c] = p, u[c + 1] = y;
    }
    if (Qw(o, w_))
      throw new Error(
        "Could not find a common output type for the following case operation: " + JSON.stringify(n)
      );
    for (let c = 0; c < u.length - 1; c += 2)
      u[c + 1] = qi(n[c + 2], e, o);
    return u[u.length - 1] = qi(
      n[n.length - 1],
      e,
      o
    ), u;
  }
  function rte(n, e) {
    let t = (
      /** @type {any} */
      n[2]
    );
    if (!Array.isArray(t))
      throw new Error(
        'The "in" operator was provided a literal value which was not an array as second argument.'
      );
    if (typeof t[0] == "string") {
      if (t[0] !== "literal")
        throw new Error(
          'For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.'
        );
      if (!Array.isArray(t[1]))
        throw new Error(
          'The "in" operator was provided a literal value which was not an array as second argument.'
        );
      t = t[1];
    }
    let i = wf | Ht;
    const a = new Array(t.length);
    for (let u = 0; u < a.length; u++) {
      const c = qi(t[u], e);
      i &= c.type, a[u] = c;
    }
    if (Qw(i, w_))
      throw new Error(
        "Could not find a common type for the following in operation: " + JSON.stringify(n)
      );
    return [qi(n[1], e, i), ...a];
  }
  function ate(n, e) {
    const t = qi(n[1], e, Ht);
    if (t.type !== Ht)
      throw new Error(
        `The first argument of palette must be an number, got ${Mo(
          t.type
        )} instead`
      );
    const i = n[2];
    if (!Array.isArray(i))
      throw new Error("The second argument of palette must be an array");
    const a = new Array(i.length);
    for (let o = 0; o < a.length; o++) {
      const u = qi(i[o], e, Ro);
      if (!(u instanceof Yg))
        throw new Error(
          `The palette color at index ${o} must be a literal value`
        );
      if (!Wh(u.type, Ro))
        throw new Error(
          `The palette color at index ${o} should be of type color, got ${Mo(
            u.type
          )} instead`
        );
      a[o] = u;
    }
    return [t, ...a];
  }
  function wn(n, ...e) {
    return function(t, i, a) {
      const o = t[0];
      let u = [];
      for (let p = 0; p < e.length; p++)
        u = e[p](t, i, u, a) || u;
      let c = typeof n == "function" ? n(u) : n;
      if (a !== void 0) {
        if (!Wh(c, a))
          throw new Error(
            `The following expression was expected to return ${Mo(
              a
            )}, but returns ${Mo(c)} instead: ${JSON.stringify(
              t
            )}`
          );
        c &= a;
      }
      if (c === w_)
        throw new Error(
          `No matching type was found for the following expression: ${JSON.stringify(
            t
          )}`
        );
      return new qee(c, o, ...u);
    };
  }
  function ste(n, e, t) {
    const i = n[0], a = Kee[i];
    if (!a)
      throw new Error(`Unknown operator: ${i}`);
    return a(n, e, t);
  }
  function oU() {
    return {
      variables: {},
      properties: {},
      resolution: NaN,
      featureId: null
    };
  }
  function dm(n, e, t) {
    const i = qi(n, t);
    if (!Wh(e, i.type)) {
      const a = Mo(e), o = Mo(i.type);
      throw new Error(
        `Expected expression to be of type ${a}, got ${o}`
      );
    }
    return Mp(i);
  }
  function Mp(n, e) {
    if (n instanceof Yg) {
      if (n.type === Ro && typeof n.value == "string") {
        const i = YL(n.value);
        return function() {
          return i;
        };
      }
      return function() {
        return n.value;
      };
    }
    const t = n.operator;
    switch (t) {
      case qe.Number:
      case qe.String:
        return ote(n);
      case qe.Get:
      case qe.Var:
        return lte(n);
      case qe.Id:
        return (i) => i.featureId;
      case qe.Concat: {
        const i = n.args.map((a) => Mp(a));
        return (a) => "".concat(...i.map((o) => o(a).toString()));
      }
      case qe.Resolution:
        return (i) => i.resolution;
      case qe.Any:
      case qe.All:
      case qe.Not:
        return cte(n);
      case qe.Equal:
      case qe.NotEqual:
      case qe.LessThan:
      case qe.LessThanOrEqualTo:
      case qe.GreaterThan:
      case qe.GreaterThanOrEqualTo:
        return ute(n);
      case qe.Multiply:
      case qe.Divide:
      case qe.Add:
      case qe.Subtract:
      case qe.Clamp:
      case qe.Mod:
      case qe.Pow:
      case qe.Abs:
      case qe.Floor:
      case qe.Ceil:
      case qe.Round:
      case qe.Sin:
      case qe.Cos:
      case qe.Atan:
      case qe.Sqrt:
        return fte(n);
      case qe.Match:
        return hte(n);
      case qe.Interpolate:
        return dte(n);
      default:
        throw new Error(`Unsupported operator ${t}`);
    }
  }
  function ote(n, e) {
    const t = n.operator, i = n.args.length, a = new Array(i);
    for (let o = 0; o < i; ++o)
      a[o] = Mp(n.args[o]);
    switch (t) {
      case qe.Number:
      case qe.String:
        return (o) => {
          for (let u = 0; u < i; ++u) {
            const c = a[u](o);
            if (typeof c === t)
              return c;
          }
          throw new Error(`Expected one of the values to be a ${t}`);
        };
      default:
        throw new Error(`Unsupported assertion operator ${t}`);
    }
  }
  function lte(n, e) {
    const i = (
      /** @type {string} */
      /** @type {LiteralExpression} */
      n.args[0].value
    );
    switch (n.operator) {
      case qe.Get:
        return (a) => a.properties[i];
      case qe.Var:
        return (a) => a.variables[i];
      default:
        throw new Error(`Unsupported accessor operator ${n.operator}`);
    }
  }
  function ute(n, e) {
    const t = n.operator, i = Mp(n.args[0]), a = Mp(n.args[1]);
    switch (t) {
      case qe.Equal:
        return (o) => i(o) === a(o);
      case qe.NotEqual:
        return (o) => i(o) !== a(o);
      case qe.LessThan:
        return (o) => i(o) < a(o);
      case qe.LessThanOrEqualTo:
        return (o) => i(o) <= a(o);
      case qe.GreaterThan:
        return (o) => i(o) > a(o);
      case qe.GreaterThanOrEqualTo:
        return (o) => i(o) >= a(o);
      default:
        throw new Error(`Unsupported comparison operator ${t}`);
    }
  }
  function cte(n, e) {
    const t = n.operator, i = n.args.length, a = new Array(i);
    for (let o = 0; o < i; ++o)
      a[o] = Mp(n.args[o]);
    switch (t) {
      case qe.Any:
        return (o) => {
          for (let u = 0; u < i; ++u)
            if (a[u](o))
              return !0;
          return !1;
        };
      case qe.All:
        return (o) => {
          for (let u = 0; u < i; ++u)
            if (!a[u](o))
              return !1;
          return !0;
        };
      case qe.Not:
        return (o) => !a[0](o);
      default:
        throw new Error(`Unsupported logical operator ${t}`);
    }
  }
  function fte(n, e) {
    const t = n.operator, i = n.args.length, a = new Array(i);
    for (let o = 0; o < i; ++o)
      a[o] = Mp(n.args[o]);
    switch (t) {
      case qe.Multiply:
        return (o) => {
          let u = 1;
          for (let c = 0; c < i; ++c)
            u *= a[c](o);
          return u;
        };
      case qe.Divide:
        return (o) => a[0](o) / a[1](o);
      case qe.Add:
        return (o) => {
          let u = 0;
          for (let c = 0; c < i; ++c)
            u += a[c](o);
          return u;
        };
      case qe.Subtract:
        return (o) => a[0](o) - a[1](o);
      case qe.Clamp:
        return (o) => {
          const u = a[0](o), c = a[1](o);
          if (u < c)
            return c;
          const p = a[2](o);
          return u > p ? p : u;
        };
      case qe.Mod:
        return (o) => a[0](o) % a[1](o);
      case qe.Pow:
        return (o) => Math.pow(a[0](o), a[1](o));
      case qe.Abs:
        return (o) => Math.abs(a[0](o));
      case qe.Floor:
        return (o) => Math.floor(a[0](o));
      case qe.Ceil:
        return (o) => Math.ceil(a[0](o));
      case qe.Round:
        return (o) => Math.round(a[0](o));
      case qe.Sin:
        return (o) => Math.sin(a[0](o));
      case qe.Cos:
        return (o) => Math.cos(a[0](o));
      case qe.Atan:
        return i === 2 ? (o) => Math.atan2(a[0](o), a[1](o)) : (o) => Math.atan(a[0](o));
      case qe.Sqrt:
        return (o) => Math.sqrt(a[0](o));
      default:
        throw new Error(`Unsupported numeric operator ${t}`);
    }
  }
  function hte(n, e) {
    const t = n.args.length, i = new Array(t);
    for (let a = 0; a < t; ++a)
      i[a] = Mp(n.args[a]);
    return (a) => {
      const o = i[0](a);
      for (let u = 1; u < t; u += 2)
        if (o === i[u](a))
          return i[u + 1](a);
      return i[t - 1](a);
    };
  }
  function dte(n, e) {
    const t = n.args.length, i = new Array(t);
    for (let a = 0; a < t; ++a)
      i[a] = Mp(n.args[a]);
    return (a) => {
      const o = i[0](a), u = i[1](a);
      let c, p;
      for (let y = 2; y < t; y += 2) {
        const _ = i[y](a);
        let S = i[y + 1](a);
        const b = Array.isArray(S);
        if (b && (S = iee(S)), _ >= u)
          return y === 2 ? S : b ? pte(
            o,
            u,
            c,
            p,
            _,
            S
          ) : mE(
            o,
            u,
            c,
            p,
            _,
            S
          );
        c = _, p = S;
      }
      return p;
    };
  }
  function mE(n, e, t, i, a, o) {
    const u = a - t;
    if (u === 0)
      return i;
    const c = e - t, p = n === 1 ? c / u : (Math.pow(n, c) - 1) / (Math.pow(n, u) - 1);
    return i + p * (o - i);
  }
  function pte(n, e, t, i, a, o) {
    if (a - t === 0)
      return i;
    const c = W3(i), p = W3(o);
    let y = p[2] - c[2];
    y > 180 ? y -= 360 : y < -180 && (y += 360);
    const _ = [
      mE(n, e, t, c[0], a, p[0]),
      mE(n, e, t, c[1], a, p[1]),
      c[2] + mE(n, e, t, 0, a, y),
      mE(n, e, t, i[3], a, o[3])
    ];
    return Hj(ree(_));
  }
  function gte(n) {
    return !0;
  }
  function mte(n) {
    const e = sU(), t = vte(n, e), i = oU();
    return function(a, o) {
      if (i.properties = a.getPropertiesInternal(), i.resolution = o, e.featureId) {
        const u = a.getId();
        u !== void 0 ? i.featureId = u : i.featureId = null;
      }
      return t(i);
    };
  }
  function r2(n) {
    const e = sU(), t = n.length, i = new Array(t);
    for (let u = 0; u < t; ++u)
      i[u] = NA(n[u], e);
    const a = oU(), o = new Array(t);
    return function(u, c) {
      if (a.properties = u.getPropertiesInternal(), a.resolution = c, e.featureId) {
        const y = u.getId();
        y !== void 0 ? a.featureId = y : a.featureId = null;
      }
      let p = 0;
      for (let y = 0; y < t; ++y) {
        const _ = i[y](a);
        _ && (o[p] = _, p += 1);
      }
      return o.length = p, o;
    };
  }
  function vte(n, e) {
    const t = n.length, i = new Array(t);
    for (let a = 0; a < t; ++a) {
      const o = n[a], u = "filter" in o ? dm(o.filter, Sa, e) : gte;
      let c;
      if (Array.isArray(o.style)) {
        const p = o.style.length;
        c = new Array(p);
        for (let y = 0; y < p; ++y)
          c[y] = NA(o.style[y], e);
      } else
        c = [NA(o.style, e)];
      i[a] = { filter: u, styles: c };
    }
    return function(a) {
      const o = [];
      let u = !1;
      for (let c = 0; c < t; ++c) {
        const p = i[c].filter;
        if (p(a) && !(n[c].else && u)) {
          u = !0;
          for (const y of i[c].styles) {
            const _ = y(a);
            _ && o.push(_);
          }
        }
      }
      return o;
    };
  }
  function NA(n, e) {
    const t = VE(n, "", e), i = HE(n, "", e), a = yte(n, e), o = _te(n, e), u = Il(n, "z-index", e);
    if (!t && !i && !a && !o && !q0(n))
      throw new Error(
        "No fill, stroke, point, or text symbolizer properties in style: " + JSON.stringify(n)
      );
    const c = new SE();
    return function(p) {
      let y = !0;
      if (t) {
        const _ = t(p);
        _ && (y = !1), c.setFill(_);
      }
      if (i) {
        const _ = i(p);
        _ && (y = !1), c.setStroke(_);
      }
      if (a) {
        const _ = a(p);
        _ && (y = !1), c.setText(_);
      }
      if (o) {
        const _ = o(p);
        _ && (y = !1), c.setImage(_);
      }
      return u && c.setZIndex(u(p)), y ? null : c;
    };
  }
  function VE(n, e, t) {
    const i = lU(
      n,
      e + "fill-color",
      t
    );
    if (!i)
      return null;
    const a = new BL();
    return function(o) {
      const u = i(o);
      return u === "none" ? null : (a.setColor(u), a);
    };
  }
  function HE(n, e, t) {
    const i = Il(
      n,
      e + "stroke-width",
      t
    ), a = lU(
      n,
      e + "stroke-color",
      t
    );
    if (!i && !a)
      return null;
    const o = Wg(
      n,
      e + "stroke-line-cap",
      t
    ), u = Wg(
      n,
      e + "stroke-line-join",
      t
    ), c = uU(
      n,
      e + "stroke-line-dash",
      t
    ), p = Il(
      n,
      e + "stroke-line-dash-offset",
      t
    ), y = Il(
      n,
      e + "stroke-miter-limit",
      t
    ), _ = new HL();
    return function(S) {
      if (a) {
        const b = a(S);
        if (b === "none")
          return null;
        _.setColor(b);
      }
      if (i && _.setWidth(i(S)), o) {
        const b = o(S);
        if (b !== "butt" && b !== "round" && b !== "square")
          throw new Error("Expected butt, round, or square line cap");
        _.setLineCap(b);
      }
      if (u) {
        const b = u(S);
        if (b !== "bevel" && b !== "round" && b !== "miter")
          throw new Error("Expected bevel, round, or miter line join");
        _.setLineJoin(b);
      }
      return c && _.setLineDash(c(S)), p && _.setLineDashOffset(p(S)), y && _.setMiterLimit(y(S)), _;
    };
  }
  function yte(n, e) {
    const t = "text-", i = Wg(n, t + "value", e);
    if (!i)
      return null;
    const a = VE(n, t, e), o = VE(
      n,
      t + "background-",
      e
    ), u = HE(n, t, e), c = HE(
      n,
      t + "background-",
      e
    ), p = Wg(n, t + "font", e), y = Il(
      n,
      t + "max-angle",
      e
    ), _ = Il(
      n,
      t + "offset-x",
      e
    ), S = Il(
      n,
      t + "offset-y",
      e
    ), b = WE(
      n,
      t + "overflow",
      e
    ), T = Wg(
      n,
      t + "placement",
      e
    ), O = Il(n, t + "repeat", e), N = Jw(n, t + "scale", e), D = WE(
      n,
      t + "rotate-with-view",
      e
    ), k = Il(
      n,
      t + "rotation",
      e
    ), $ = Wg(n, t + "align", e), B = Wg(
      n,
      t + "justify",
      e
    ), V = Wg(
      n,
      t + "baseline",
      e
    ), z = uU(
      n,
      t + "padding",
      e
    ), G = new _ee({});
    return function(ie) {
      if (G.setText(i(ie)), a && G.setFill(a(ie)), o && G.setBackgroundFill(o(ie)), u && G.setStroke(u(ie)), c && G.setBackgroundStroke(c(ie)), p && G.setFont(p(ie)), y && G.setMaxAngle(y(ie)), _ && G.setOffsetX(_(ie)), S && G.setOffsetY(S(ie)), b && G.setOverflow(b(ie)), T) {
        const ue = T(ie);
        if (ue !== "point" && ue !== "line")
          throw new Error("Expected point or line for text-placement");
        G.setPlacement(ue);
      }
      if (O && G.setRepeat(O(ie)), N && G.setScale(N(ie)), D && G.setRotateWithView(D(ie)), k && G.setRotation(k(ie)), $) {
        const ue = $(ie);
        if (ue !== "left" && ue !== "center" && ue !== "right" && ue !== "end" && ue !== "start")
          throw new Error(
            "Expected left, right, center, start, or end for text-align"
          );
        G.setTextAlign(ue);
      }
      if (B) {
        const ue = B(ie);
        if (ue !== "left" && ue !== "right" && ue !== "center")
          throw new Error("Expected left, right, or center for text-justify");
        G.setJustify(ue);
      }
      if (V) {
        const ue = V(ie);
        if (ue !== "bottom" && ue !== "top" && ue !== "middle" && ue !== "alphabetic" && ue !== "hanging")
          throw new Error(
            "Expected bottom, top, middle, alphabetic, or hanging for text-baseline"
          );
        G.setTextBaseline(ue);
      }
      return z && G.setPadding(z(ie)), G;
    };
  }
  function _te(n, e) {
    return "icon-src" in n ? Ete(n, e) : "shape-points" in n ? Ste(n, e) : "circle-radius" in n ? xte(n, e) : null;
  }
  function Ete(n, e) {
    const t = "icon-", i = t + "src", a = cU(n[i], i), o = _w(
      n,
      t + "anchor",
      e
    ), u = Jw(n, t + "scale", e), c = Il(
      n,
      t + "opacity",
      e
    ), p = _w(
      n,
      t + "displacement",
      e
    ), y = Il(
      n,
      t + "rotation",
      e
    ), _ = WE(
      n,
      t + "rotate-with-view",
      e
    ), S = a2(n, t + "anchor-origin"), b = s2(
      n,
      t + "anchor-x-units"
    ), T = s2(
      n,
      t + "anchor-y-units"
    ), O = Tte(n, t + "color"), N = wte(n, t + "cross-origin"), D = Cte(n, t + "offset"), k = a2(n, t + "offset-origin"), $ = B0(n, t + "width"), B = B0(n, t + "height"), V = bte(n, t + "size"), z = rN(n, t + "declutter"), G = new rU({
      src: a,
      anchorOrigin: S,
      anchorXUnits: b,
      anchorYUnits: T,
      color: O,
      crossOrigin: N,
      offset: D,
      offsetOrigin: k,
      height: B,
      width: $,
      size: V,
      declutterMode: z
    });
    return function(ie) {
      return c && G.setOpacity(c(ie)), p && G.setDisplacement(p(ie)), y && G.setRotation(y(ie)), _ && G.setRotateWithView(_(ie)), u && G.setScale(u(ie)), o && G.setAnchor(o(ie)), G;
    };
  }
  function Ste(n, e) {
    const t = "shape-", i = t + "points", a = fU(n[i], i), o = VE(n, t, e), u = HE(n, t, e), c = Jw(n, t + "scale", e), p = _w(
      n,
      t + "displacement",
      e
    ), y = Il(
      n,
      t + "rotation",
      e
    ), _ = WE(
      n,
      t + "rotate-with-view",
      e
    ), S = B0(n, t + "radius"), b = B0(n, t + "radius1"), T = B0(n, t + "radius2"), O = B0(n, t + "angle"), N = rN(
      n,
      t + "declutter-mode"
    ), D = new Kj({
      points: a,
      radius: S,
      radius1: b,
      radius2: T,
      angle: O,
      declutterMode: N
    });
    return function(k) {
      return o && D.setFill(o(k)), u && D.setStroke(u(k)), p && D.setDisplacement(p(k)), y && D.setRotation(y(k)), _ && D.setRotateWithView(_(k)), c && D.setScale(c(k)), D;
    };
  }
  function xte(n, e) {
    const t = "circle-", i = VE(n, t, e), a = HE(n, t, e), o = Il(n, t + "radius", e), u = Jw(n, t + "scale", e), c = _w(
      n,
      t + "displacement",
      e
    ), p = Il(
      n,
      t + "rotation",
      e
    ), y = WE(
      n,
      t + "rotate-with-view",
      e
    ), _ = rN(
      n,
      t + "declutter-mode"
    ), S = new Zj({
      radius: 5,
      // this is arbitrary, but required - the evaluated radius is used below
      declutterMode: _
    });
    return function(b) {
      return o && S.setRadius(o(b)), i && S.setFill(i(b)), a && S.setStroke(a(b)), c && S.setDisplacement(c(b)), p && S.setRotation(p(b)), y && S.setRotateWithView(y(b)), u && S.setScale(u(b)), S;
    };
  }
  function Il(n, e, t) {
    if (!(e in n))
      return;
    const i = dm(n[e], Ht, t);
    return function(a) {
      return fU(i(a), e);
    };
  }
  function Wg(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(n[e], wf, t);
    return function(a) {
      return cU(i(a), e);
    };
  }
  function WE(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(n[e], Sa, t);
    return function(a) {
      const o = i(a);
      if (typeof o != "boolean")
        throw new Error(`Expected a boolean for ${e}`);
      return o;
    };
  }
  function lU(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(
      n[e],
      Ro | wf,
      t
    );
    return function(a) {
      return hU(i(a), e);
    };
  }
  function uU(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(n[e], lm, t);
    return function(a) {
      return gS(i(a), e);
    };
  }
  function _w(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(n[e], lm, t);
    return function(a) {
      const o = gS(i(a), e);
      if (o.length !== 2)
        throw new Error(`Expected two numbers for ${e}`);
      return o;
    };
  }
  function Jw(n, e, t) {
    if (!(e in n))
      return null;
    const i = dm(
      n[e],
      lm | Ht,
      t
    );
    return function(a) {
      return Rte(i(a), e);
    };
  }
  function B0(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (typeof t != "number")
        throw new Error(`Expected a number for ${e}`);
      return t;
    }
  }
  function bte(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (typeof t == "number")
        return Eu(t);
      if (!Array.isArray(t))
        throw new Error(`Expected a number or size array for ${e}`);
      if (t.length !== 2 || typeof t[0] != "number" || typeof t[1] != "number")
        throw new Error(`Expected a number or size array for ${e}`);
      return t;
    }
  }
  function wte(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (typeof t != "string")
        throw new Error(`Expected a string for ${e}`);
      return t;
    }
  }
  function a2(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (t !== "bottom-left" && t !== "bottom-right" && t !== "top-left" && t !== "top-right")
        throw new Error(
          `Expected bottom-left, bottom-right, top-left, or top-right for ${e}`
        );
      return t;
    }
  }
  function s2(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (t !== "pixels" && t !== "fraction")
        throw new Error(`Expected pixels or fraction for ${e}`);
      return t;
    }
  }
  function Cte(n, e) {
    const t = n[e];
    if (t !== void 0)
      return gS(t, e);
  }
  function rN(n, e) {
    const t = n[e];
    if (t !== void 0) {
      if (typeof t != "string")
        throw new Error(`Expected a string for ${e}`);
      if (t !== "declutter" && t !== "obstacle" && t !== "none")
        throw new Error(`Expected declutter, obstacle, or none for ${e}`);
      return t;
    }
  }
  function Tte(n, e) {
    const t = n[e];
    if (t !== void 0)
      return hU(t, e);
  }
  function gS(n, e) {
    if (!Array.isArray(n))
      throw new Error(`Expected an array for ${e}`);
    const t = n.length;
    for (let i = 0; i < t; ++i)
      if (typeof n[i] != "number")
        throw new Error(`Expected an array of numbers for ${e}`);
    return n;
  }
  function cU(n, e) {
    if (typeof n != "string")
      throw new Error(`Expected a string for ${e}`);
    return n;
  }
  function fU(n, e) {
    if (typeof n != "number")
      throw new Error(`Expected a number for ${e}`);
    return n;
  }
  function hU(n, e) {
    if (typeof n == "string")
      return n;
    const t = gS(n, e), i = t.length;
    if (i < 3 || i > 4)
      throw new Error(`Expected a color with 3 or 4 values for ${e}`);
    return t;
  }
  function Rte(n, e) {
    if (typeof n == "number")
      return n;
    const t = gS(n, e);
    if (t.length !== 2)
      throw new Error(`Expected an array of two numbers for ${e}`);
    return t;
  }
  const o2 = {
    RENDER_ORDER: "renderOrder"
  };
  class Mte extends pS {
    /**
     * @param {Options<VectorSourceType>} [options] Options.
     */
    constructor(e) {
      e = e || {};
      const t = Object.assign({}, e);
      delete t.style, delete t.renderBuffer, delete t.updateWhileAnimating, delete t.updateWhileInteracting, super(t), this.declutter_ = e.declutter !== void 0 ? e.declutter : !1, this.renderBuffer_ = e.renderBuffer !== void 0 ? e.renderBuffer : 100, this.style_ = null, this.styleFunction_ = void 0, this.setStyle(e.style), this.updateWhileAnimating_ = e.updateWhileAnimating !== void 0 ? e.updateWhileAnimating : !1, this.updateWhileInteracting_ = e.updateWhileInteracting !== void 0 ? e.updateWhileInteracting : !1;
    }
    /**
     * @return {boolean} Declutter.
     */
    getDeclutter() {
      return this.declutter_;
    }
    /**
     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise
     * that resolves with an array of features. The array will either contain the topmost feature
     * when a hit was detected, or it will be empty.
     *
     * The hit detection algorithm used for this method is optimized for performance, but is less
     * accurate than the one used in [map.getFeaturesAtPixel()]{@link import("../Map.js").default#getFeaturesAtPixel}.
     * Text is not considered, and icons are only represented by their bounding box instead of the exact
     * image.
     *
     * @param {import("../pixel.js").Pixel} pixel Pixel.
     * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with an array of features.
     * @api
     */
    getFeatures(e) {
      return super.getFeatures(e);
    }
    /**
     * @return {number|undefined} Render buffer.
     */
    getRenderBuffer() {
      return this.renderBuffer_;
    }
    /**
     * @return {function(import("../Feature.js").default, import("../Feature.js").default): number|null|undefined} Render
     *     order.
     */
    getRenderOrder() {
      return (
        /** @type {import("../render.js").OrderFunction|null|undefined} */
        this.get(o2.RENDER_ORDER)
      );
    }
    /**
     * Get the style for features.  This returns whatever was passed to the `style`
     * option at construction or to the `setStyle` method.
     * @return {import("../style/Style.js").StyleLike|null|undefined} Layer style.
     * @api
     */
    getStyle() {
      return this.style_;
    }
    /**
     * Get the style function.
     * @return {import("../style/Style.js").StyleFunction|undefined} Layer style function.
     * @api
     */
    getStyleFunction() {
      return this.styleFunction_;
    }
    /**
     * @return {boolean} Whether the rendered layer should be updated while
     *     animating.
     */
    getUpdateWhileAnimating() {
      return this.updateWhileAnimating_;
    }
    /**
     * @return {boolean} Whether the rendered layer should be updated while
     *     interacting.
     */
    getUpdateWhileInteracting() {
      return this.updateWhileInteracting_;
    }
    /**
     * Render declutter items for this layer
     * @param {import("../Map.js").FrameState} frameState Frame state.
     */
    renderDeclutter(e) {
      e.declutterTree || (e.declutterTree = new eU(9)), this.getRenderer().renderDeclutter(e);
    }
    /**
     * @param {import("../render.js").OrderFunction|null|undefined} renderOrder
     *     Render order.
     */
    setRenderOrder(e) {
      this.set(o2.RENDER_ORDER, e);
    }
    /**
     * Set the style for features.  This can be a single style object, an array
     * of styles, or a function that takes a feature and resolution and returns
     * an array of styles. If set to `null`, the layer has no style (a `null` style),
     * so only features that have their own styles will be rendered in the layer. Call
     * `setStyle()` without arguments to reset to the default style. See
     * [the ol/style/Style module]{@link module:ol/style/Style~Style} for information on the default style.
     *
     * If your layer has a static style, you can use [flat style]{@link module:ol/style/flat~FlatStyle} object
     * literals instead of using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.):
     * ```js
     * vectorLayer.setStyle({
     *   "fill-color": "yellow",
     *   "stroke-color": "black",
     *   "stroke-width": 4
     * })
     * ```
     *
     * @param {import("../style/Style.js").StyleLike|import("../style/flat.js").FlatStyleLike|null} [style] Layer style.
     * @api
     */
    setStyle(e) {
      this.style_ = Ote(e), this.styleFunction_ = e === null ? void 0 : mee(this.style_), this.changed();
    }
  }
  function Ote(n) {
    if (n === void 0)
      return vee;
    if (!n)
      return null;
    if (typeof n == "function" || n instanceof SE)
      return n;
    if (!Array.isArray(n))
      return r2([n]);
    if (n.length === 0)
      return [];
    const e = n.length, t = n[0];
    if (t instanceof SE) {
      const a = new Array(e);
      for (let o = 0; o < e; ++o) {
        const u = n[o];
        if (!(u instanceof SE))
          throw new Error("Expected a list of style instances");
        a[o] = u;
      }
      return a;
    }
    if ("style" in t) {
      const a = new Array(e);
      for (let o = 0; o < e; ++o) {
        const u = n[o];
        if (!("style" in u))
          throw new Error("Expected a list of rules with a style property");
        a[o] = u;
      }
      return mte(a);
    }
    return r2(
      /** @type {Array<import("../style/flat.js").FlatStyle>} */
      n
    );
  }
  const Ate = Mte, mS = {
    BEGIN_GEOMETRY: 0,
    BEGIN_PATH: 1,
    CIRCLE: 2,
    CLOSE_PATH: 3,
    CUSTOM: 4,
    DRAW_CHARS: 5,
    DRAW_IMAGE: 6,
    END_GEOMETRY: 7,
    FILL: 8,
    MOVE_TO_LINE_TO: 9,
    SET_FILL_STYLE: 10,
    SET_STROKE_STYLE: 11,
    STROKE: 12
  }, Rb = [mS.FILL], qg = [mS.STROKE], Dv = [mS.BEGIN_PATH], l2 = [mS.CLOSE_PATH], sn = mS;
  class Lte {
    /**
     * Render a geometry with a custom renderer.
     *
     * @param {import("../geom/SimpleGeometry.js").default} geometry Geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     * @param {Function} renderer Renderer.
     * @param {Function} hitDetectionRenderer Renderer.
     */
    drawCustom(e, t, i, a) {
    }
    /**
     * Render a geometry.
     *
     * @param {import("../geom/Geometry.js").default} geometry The geometry to render.
     */
    drawGeometry(e) {
    }
    /**
     * Set the rendering style.
     *
     * @param {import("../style/Style.js").default} style The rendering style.
     */
    setStyle(e) {
    }
    /**
     * @param {import("../geom/Circle.js").default} circleGeometry Circle geometry.
     * @param {import("../Feature.js").default} feature Feature.
     */
    drawCircle(e, t) {
    }
    /**
     * @param {import("../Feature.js").default} feature Feature.
     * @param {import("../style/Style.js").default} style Style.
     */
    drawFeature(e, t) {
    }
    /**
     * @param {import("../geom/GeometryCollection.js").default} geometryCollectionGeometry Geometry collection.
     * @param {import("../Feature.js").default} feature Feature.
     */
    drawGeometryCollection(e, t) {
    }
    /**
     * @param {import("../geom/LineString.js").default|import("./Feature.js").default} lineStringGeometry Line string geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawLineString(e, t) {
    }
    /**
     * @param {import("../geom/MultiLineString.js").default|import("./Feature.js").default} multiLineStringGeometry MultiLineString geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiLineString(e, t) {
    }
    /**
     * @param {import("../geom/MultiPoint.js").default|import("./Feature.js").default} multiPointGeometry MultiPoint geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiPoint(e, t) {
    }
    /**
     * @param {import("../geom/MultiPolygon.js").default} multiPolygonGeometry MultiPolygon geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiPolygon(e, t) {
    }
    /**
     * @param {import("../geom/Point.js").default|import("./Feature.js").default} pointGeometry Point geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawPoint(e, t) {
    }
    /**
     * @param {import("../geom/Polygon.js").default|import("./Feature.js").default} polygonGeometry Polygon geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawPolygon(e, t) {
    }
    /**
     * @param {import("../geom/SimpleGeometry.js").default|import("./Feature.js").default} geometry Geometry.
     * @param {import("../Feature.js").FeatureLike} feature Feature.
     */
    drawText(e, t) {
    }
    /**
     * @param {import("../style/Fill.js").default} fillStyle Fill style.
     * @param {import("../style/Stroke.js").default} strokeStyle Stroke style.
     */
    setFillStrokeStyle(e, t) {
    }
    /**
     * @param {import("../style/Image.js").default} imageStyle Image style.
     * @param {import("../render/canvas.js").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with a text style.
     */
    setImageStyle(e, t) {
    }
    /**
     * @param {import("../style/Text.js").default} textStyle Text style.
     * @param {import("../render/canvas.js").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with an image style.
     */
    setTextStyle(e, t) {
    }
  }
  const dU = Lte;
  class Nte extends dU {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      super(), this.tolerance = e, this.maxExtent = t, this.pixelRatio = a, this.maxLineWidth = 0, this.resolution = i, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = /** @type {import("../canvas.js").FillStrokeState} */
      {};
    }
    /**
     * @protected
     * @param {Array<number>} dashArray Dash array.
     * @return {Array<number>} Dash array with pixel ratio applied
     */
    applyPixelRatio(e) {
      const t = this.pixelRatio;
      return t == 1 ? e : e.map(function(i) {
        return i * t;
      });
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} stride Stride.
     * @protected
     * @return {number} My end
     */
    appendFlatPointCoordinates(e, t) {
      const i = this.getBufferedMaxExtent(), a = this.tmpCoordinate_, o = this.coordinates;
      let u = o.length;
      for (let c = 0, p = e.length; c < p; c += t)
        a[0] = e[c], a[1] = e[c + 1], KE(i, a) && (o[u++] = a[0], o[u++] = a[1]);
      return u;
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {number} end End.
     * @param {number} stride Stride.
     * @param {boolean} closed Last input coordinate equals first.
     * @param {boolean} skipFirst Skip first coordinate.
     * @protected
     * @return {number} My end.
     */
    appendFlatLineCoordinates(e, t, i, a, o, u) {
      const c = this.coordinates;
      let p = c.length;
      const y = this.getBufferedMaxExtent();
      u && (t += a);
      let _ = e[t], S = e[t + 1];
      const b = this.tmpCoordinate_;
      let T = !0, O, N, D;
      for (O = t + a; O < i; O += a)
        b[0] = e[O], b[1] = e[O + 1], D = JO(y, b), D !== N ? (T && (c[p++] = _, c[p++] = S, T = !1), c[p++] = b[0], c[p++] = b[1]) : D === bs.INTERSECTING ? (c[p++] = b[0], c[p++] = b[1], T = !1) : T = !0, _ = b[0], S = b[1], N = D;
      return (o && T || O === t + a) && (c[p++] = _, c[p++] = S), p;
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {Array<number>} ends Ends.
     * @param {number} stride Stride.
     * @param {Array<number>} builderEnds Builder ends.
     * @return {number} Offset.
     */
    drawCustomCoordinates_(e, t, i, a, o) {
      for (let u = 0, c = i.length; u < c; ++u) {
        const p = i[u], y = this.appendFlatLineCoordinates(
          e,
          t,
          p,
          a,
          !1,
          !1
        );
        o.push(y), t = p;
      }
      return t;
    }
    /**
     * @param {import("../../geom/SimpleGeometry.js").default} geometry Geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     * @param {Function} renderer Renderer.
     * @param {Function} hitDetectionRenderer Renderer.
     */
    drawCustom(e, t, i, a) {
      this.beginGeometry(e, t);
      const o = e.getType(), u = e.getStride(), c = this.coordinates.length;
      let p, y, _, S, b;
      switch (o) {
        case "MultiPolygon":
          p = /** @type {import("../../geom/MultiPolygon.js").default} */
          e.getOrientedFlatCoordinates(), S = [];
          const T = (
            /** @type {import("../../geom/MultiPolygon.js").default} */
            e.getEndss()
          );
          b = 0;
          for (let O = 0, N = T.length; O < N; ++O) {
            const D = [];
            b = this.drawCustomCoordinates_(
              p,
              b,
              T[O],
              u,
              D
            ), S.push(D);
          }
          this.instructions.push([
            sn.CUSTOM,
            c,
            S,
            e,
            i,
            MA
          ]), this.hitDetectionInstructions.push([
            sn.CUSTOM,
            c,
            S,
            e,
            a || i,
            MA
          ]);
          break;
        case "Polygon":
        case "MultiLineString":
          _ = [], p = o == "Polygon" ? (
            /** @type {import("../../geom/Polygon.js").default} */
            e.getOrientedFlatCoordinates()
          ) : e.getFlatCoordinates(), b = this.drawCustomCoordinates_(
            p,
            0,
            /** @type {import("../../geom/Polygon.js").default|import("../../geom/MultiLineString.js").default} */
            e.getEnds(),
            u,
            _
          ), this.instructions.push([
            sn.CUSTOM,
            c,
            _,
            e,
            i,
            fw
          ]), this.hitDetectionInstructions.push([
            sn.CUSTOM,
            c,
            _,
            e,
            a || i,
            fw
          ]);
          break;
        case "LineString":
        case "Circle":
          p = e.getFlatCoordinates(), y = this.appendFlatLineCoordinates(
            p,
            0,
            p.length,
            u,
            !1,
            !1
          ), this.instructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            i,
            Av
          ]), this.hitDetectionInstructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            a || i,
            Av
          ]);
          break;
        case "MultiPoint":
          p = e.getFlatCoordinates(), y = this.appendFlatPointCoordinates(p, u), y > c && (this.instructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            i,
            Av
          ]), this.hitDetectionInstructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            a || i,
            Av
          ]));
          break;
        case "Point":
          p = e.getFlatCoordinates(), this.coordinates.push(p[0], p[1]), y = this.coordinates.length, this.instructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            i
          ]), this.hitDetectionInstructions.push([
            sn.CUSTOM,
            c,
            y,
            e,
            a || i
          ]);
          break;
      }
      this.endGeometry(t);
    }
    /**
     * @protected
     * @param {import("../../geom/Geometry").default|import("../Feature.js").default} geometry The geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    beginGeometry(e, t) {
      this.beginGeometryInstruction1_ = [
        sn.BEGIN_GEOMETRY,
        t,
        0,
        e
      ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [
        sn.BEGIN_GEOMETRY,
        t,
        0,
        e
      ], this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);
    }
    /**
     * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
     */
    finish() {
      return {
        instructions: this.instructions,
        hitDetectionInstructions: this.hitDetectionInstructions,
        coordinates: this.coordinates
      };
    }
    /**
     * Reverse the hit detection instructions.
     */
    reverseHitDetectionInstructions() {
      const e = this.hitDetectionInstructions;
      e.reverse();
      let t;
      const i = e.length;
      let a, o, u = -1;
      for (t = 0; t < i; ++t)
        a = e[t], o = /** @type {import("./Instruction.js").default} */
        a[0], o == sn.END_GEOMETRY ? u = t : o == sn.BEGIN_GEOMETRY && (a[2] = t, XQ(this.hitDetectionInstructions, u, t), u = -1);
    }
    /**
     * @param {import("../../style/Fill.js").default} fillStyle Fill style.
     * @param {import("../../style/Stroke.js").default} strokeStyle Stroke style.
     */
    setFillStrokeStyle(e, t) {
      const i = this.state;
      if (e) {
        const a = e.getColor();
        i.fillStyle = zh(
          a || Ll
        );
      } else
        i.fillStyle = void 0;
      if (t) {
        const a = t.getColor();
        i.strokeStyle = zh(
          a || zE
        );
        const o = t.getLineCap();
        i.lineCap = o !== void 0 ? o : u_;
        const u = t.getLineDash();
        i.lineDash = u ? u.slice() : xp;
        const c = t.getLineDashOffset();
        i.lineDashOffset = c || bp;
        const p = t.getLineJoin();
        i.lineJoin = p !== void 0 ? p : c_;
        const y = t.getWidth();
        i.lineWidth = y !== void 0 ? y : BE;
        const _ = t.getMiterLimit();
        i.miterLimit = _ !== void 0 ? _ : UE, i.lineWidth > this.maxLineWidth && (this.maxLineWidth = i.lineWidth, this.bufferedMaxExtent_ = null);
      } else
        i.strokeStyle = void 0, i.lineCap = void 0, i.lineDash = null, i.lineDashOffset = void 0, i.lineJoin = void 0, i.lineWidth = void 0, i.miterLimit = void 0;
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     * @return {Array<*>} Fill instruction.
     */
    createFill(e) {
      const t = e.fillStyle, i = [sn.SET_FILL_STYLE, t];
      return typeof t != "string" && i.push(!0), i;
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     */
    applyStroke(e) {
      this.instructions.push(this.createStroke(e));
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     * @return {Array<*>} Stroke instruction.
     */
    createStroke(e) {
      return [
        sn.SET_STROKE_STYLE,
        e.strokeStyle,
        e.lineWidth * this.pixelRatio,
        e.lineCap,
        e.lineJoin,
        e.miterLimit,
        this.applyPixelRatio(e.lineDash),
        e.lineDashOffset * this.pixelRatio
      ];
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     * @param {function(this:CanvasBuilder, import("../canvas.js").FillStrokeState):Array<*>} createFill Create fill.
     */
    updateFillStyle(e, t) {
      const i = e.fillStyle;
      (typeof i != "string" || e.currentFillStyle != i) && (i !== void 0 && this.instructions.push(t.call(this, e)), e.currentFillStyle = i);
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     * @param {function(this:CanvasBuilder, import("../canvas.js").FillStrokeState): void} applyStroke Apply stroke.
     */
    updateStrokeStyle(e, t) {
      const i = e.strokeStyle, a = e.lineCap, o = e.lineDash, u = e.lineDashOffset, c = e.lineJoin, p = e.lineWidth, y = e.miterLimit;
      (e.currentStrokeStyle != i || e.currentLineCap != a || o != e.currentLineDash && !hm(e.currentLineDash, o) || e.currentLineDashOffset != u || e.currentLineJoin != c || e.currentLineWidth != p || e.currentMiterLimit != y) && (i !== void 0 && t.call(this, e), e.currentStrokeStyle = i, e.currentLineCap = a, e.currentLineDash = o, e.currentLineDashOffset = u, e.currentLineJoin = c, e.currentLineWidth = p, e.currentMiterLimit = y);
    }
    /**
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    endGeometry(e) {
      this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null;
      const t = [sn.END_GEOMETRY, e];
      this.instructions.push(t), this.hitDetectionInstructions.push(t);
    }
    /**
     * Get the buffered rendering extent.  Rendering will be clipped to the extent
     * provided to the constructor.  To account for symbolizers that may intersect
     * this extent, we calculate a buffered extent (e.g. based on stroke width).
     * @return {import("../../extent.js").Extent} The buffered rendering extent.
     * @protected
     */
    getBufferedMaxExtent() {
      if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = W2(this.maxExtent), this.maxLineWidth > 0)) {
        const e = this.resolution * (this.maxLineWidth + 1) / 2;
        TE(this.bufferedMaxExtent_, e, this.bufferedMaxExtent_);
      }
      return this.bufferedMaxExtent_;
    }
  }
  const vS = Nte;
  class Dte extends vS {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      super(e, t, i, a), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0;
    }
    /**
     * @param {import("../../geom/Point.js").default|import("../Feature.js").default} pointGeometry Point geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawPoint(e, t) {
      if (!this.image_)
        return;
      this.beginGeometry(e, t);
      const i = e.getFlatCoordinates(), a = e.getStride(), o = this.coordinates.length, u = this.appendFlatPointCoordinates(i, a);
      this.instructions.push([
        sn.DRAW_IMAGE,
        o,
        u,
        this.image_,
        // Remaining arguments to DRAW_IMAGE are in alphabetical order
        this.anchorX_ * this.imagePixelRatio_,
        this.anchorY_ * this.imagePixelRatio_,
        Math.ceil(this.height_ * this.imagePixelRatio_),
        this.opacity_,
        this.originX_ * this.imagePixelRatio_,
        this.originY_ * this.imagePixelRatio_,
        this.rotateWithView_,
        this.rotation_,
        [
          this.scale_[0] * this.pixelRatio / this.imagePixelRatio_,
          this.scale_[1] * this.pixelRatio / this.imagePixelRatio_
        ],
        Math.ceil(this.width_ * this.imagePixelRatio_),
        this.declutterMode_,
        this.declutterImageWithText_
      ]), this.hitDetectionInstructions.push([
        sn.DRAW_IMAGE,
        o,
        u,
        this.hitDetectionImage_,
        // Remaining arguments to DRAW_IMAGE are in alphabetical order
        this.anchorX_,
        this.anchorY_,
        this.height_,
        1,
        this.originX_,
        this.originY_,
        this.rotateWithView_,
        this.rotation_,
        this.scale_,
        this.width_,
        this.declutterMode_,
        this.declutterImageWithText_
      ]), this.endGeometry(t);
    }
    /**
     * @param {import("../../geom/MultiPoint.js").default|import("../Feature.js").default} multiPointGeometry MultiPoint geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiPoint(e, t) {
      if (!this.image_)
        return;
      this.beginGeometry(e, t);
      const i = e.getFlatCoordinates(), a = e.getStride(), o = this.coordinates.length, u = this.appendFlatPointCoordinates(i, a);
      this.instructions.push([
        sn.DRAW_IMAGE,
        o,
        u,
        this.image_,
        // Remaining arguments to DRAW_IMAGE are in alphabetical order
        this.anchorX_ * this.imagePixelRatio_,
        this.anchorY_ * this.imagePixelRatio_,
        Math.ceil(this.height_ * this.imagePixelRatio_),
        this.opacity_,
        this.originX_ * this.imagePixelRatio_,
        this.originY_ * this.imagePixelRatio_,
        this.rotateWithView_,
        this.rotation_,
        [
          this.scale_[0] * this.pixelRatio / this.imagePixelRatio_,
          this.scale_[1] * this.pixelRatio / this.imagePixelRatio_
        ],
        Math.ceil(this.width_ * this.imagePixelRatio_),
        this.declutterMode_,
        this.declutterImageWithText_
      ]), this.hitDetectionInstructions.push([
        sn.DRAW_IMAGE,
        o,
        u,
        this.hitDetectionImage_,
        // Remaining arguments to DRAW_IMAGE are in alphabetical order
        this.anchorX_,
        this.anchorY_,
        this.height_,
        1,
        this.originX_,
        this.originY_,
        this.rotateWithView_,
        this.rotation_,
        this.scale_,
        this.width_,
        this.declutterMode_,
        this.declutterImageWithText_
      ]), this.endGeometry(t);
    }
    /**
     * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
     */
    finish() {
      return this.reverseHitDetectionInstructions(), this.anchorX_ = void 0, this.anchorY_ = void 0, this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.height_ = void 0, this.scale_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.width_ = void 0, super.finish();
    }
    /**
     * @param {import("../../style/Image.js").default} imageStyle Image style.
     * @param {Object} [sharedData] Shared data.
     */
    setImageStyle(e, t) {
      const i = e.getAnchor(), a = e.getSize(), o = e.getOrigin();
      this.imagePixelRatio_ = e.getPixelRatio(this.pixelRatio), this.anchorX_ = i[0], this.anchorY_ = i[1], this.hitDetectionImage_ = e.getHitDetectionImage(), this.image_ = e.getImage(this.pixelRatio), this.height_ = a[1], this.opacity_ = e.getOpacity(), this.originX_ = o[0], this.originY_ = o[1], this.rotateWithView_ = e.getRotateWithView(), this.rotation_ = e.getRotation(), this.scale_ = e.getScaleArray(), this.width_ = a[0], this.declutterMode_ = e.getDeclutterMode(), this.declutterImageWithText_ = t;
    }
  }
  const Ite = Dte;
  class Pte extends vS {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      super(e, t, i, a);
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {number} end End.
     * @param {number} stride Stride.
     * @private
     * @return {number} end.
     */
    drawFlatCoordinates_(e, t, i, a) {
      const o = this.coordinates.length, u = this.appendFlatLineCoordinates(
        e,
        t,
        i,
        a,
        !1,
        !1
      ), c = [
        sn.MOVE_TO_LINE_TO,
        o,
        u
      ];
      return this.instructions.push(c), this.hitDetectionInstructions.push(c), i;
    }
    /**
     * @param {import("../../geom/LineString.js").default|import("../Feature.js").default} lineStringGeometry Line string geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawLineString(e, t) {
      const i = this.state, a = i.strokeStyle, o = i.lineWidth;
      if (a === void 0 || o === void 0)
        return;
      this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(e, t), this.hitDetectionInstructions.push(
        [
          sn.SET_STROKE_STYLE,
          i.strokeStyle,
          i.lineWidth,
          i.lineCap,
          i.lineJoin,
          i.miterLimit,
          xp,
          bp
        ],
        Dv
      );
      const u = e.getFlatCoordinates(), c = e.getStride();
      this.drawFlatCoordinates_(
        u,
        0,
        u.length,
        c
      ), this.hitDetectionInstructions.push(qg), this.endGeometry(t);
    }
    /**
     * @param {import("../../geom/MultiLineString.js").default|import("../Feature.js").default} multiLineStringGeometry MultiLineString geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiLineString(e, t) {
      const i = this.state, a = i.strokeStyle, o = i.lineWidth;
      if (a === void 0 || o === void 0)
        return;
      this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(e, t), this.hitDetectionInstructions.push(
        [
          sn.SET_STROKE_STYLE,
          i.strokeStyle,
          i.lineWidth,
          i.lineCap,
          i.lineJoin,
          i.miterLimit,
          xp,
          bp
        ],
        Dv
      );
      const u = e.getEnds(), c = e.getFlatCoordinates(), p = e.getStride();
      let y = 0;
      for (let _ = 0, S = u.length; _ < S; ++_)
        y = this.drawFlatCoordinates_(
          c,
          y,
          /** @type {number} */
          u[_],
          p
        );
      this.hitDetectionInstructions.push(qg), this.endGeometry(t);
    }
    /**
     * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
     */
    finish() {
      const e = this.state;
      return e.lastStroke != null && e.lastStroke != this.coordinates.length && this.instructions.push(qg), this.reverseHitDetectionInstructions(), this.state = null, super.finish();
    }
    /**
     * @param {import("../canvas.js").FillStrokeState} state State.
     */
    applyStroke(e) {
      e.lastStroke != null && e.lastStroke != this.coordinates.length && (this.instructions.push(qg), e.lastStroke = this.coordinates.length), e.lastStroke = 0, super.applyStroke(e), this.instructions.push(Dv);
    }
  }
  const kte = Pte;
  class Fte extends vS {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      super(e, t, i, a);
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {Array<number>} ends Ends.
     * @param {number} stride Stride.
     * @private
     * @return {number} End.
     */
    drawFlatCoordinatess_(e, t, i, a) {
      const o = this.state, u = o.fillStyle !== void 0, c = o.strokeStyle !== void 0, p = i.length;
      this.instructions.push(Dv), this.hitDetectionInstructions.push(Dv);
      for (let y = 0; y < p; ++y) {
        const _ = i[y], S = this.coordinates.length, b = this.appendFlatLineCoordinates(
          e,
          t,
          _,
          a,
          !0,
          !c
        ), T = [
          sn.MOVE_TO_LINE_TO,
          S,
          b
        ];
        this.instructions.push(T), this.hitDetectionInstructions.push(T), c && (this.instructions.push(l2), this.hitDetectionInstructions.push(l2)), t = _;
      }
      return u && (this.instructions.push(Rb), this.hitDetectionInstructions.push(Rb)), c && (this.instructions.push(qg), this.hitDetectionInstructions.push(qg)), t;
    }
    /**
     * @param {import("../../geom/Circle.js").default} circleGeometry Circle geometry.
     * @param {import("../../Feature.js").default} feature Feature.
     */
    drawCircle(e, t) {
      const i = this.state, a = i.fillStyle, o = i.strokeStyle;
      if (a === void 0 && o === void 0)
        return;
      this.setFillStrokeStyles_(), this.beginGeometry(e, t), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_FILL_STYLE,
        Ll
      ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_STROKE_STYLE,
        i.strokeStyle,
        i.lineWidth,
        i.lineCap,
        i.lineJoin,
        i.miterLimit,
        xp,
        bp
      ]);
      const u = e.getFlatCoordinates(), c = e.getStride(), p = this.coordinates.length;
      this.appendFlatLineCoordinates(
        u,
        0,
        u.length,
        c,
        !1,
        !1
      );
      const y = [sn.CIRCLE, p];
      this.instructions.push(Dv, y), this.hitDetectionInstructions.push(Dv, y), i.fillStyle !== void 0 && (this.instructions.push(Rb), this.hitDetectionInstructions.push(Rb)), i.strokeStyle !== void 0 && (this.instructions.push(qg), this.hitDetectionInstructions.push(qg)), this.endGeometry(t);
    }
    /**
     * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} polygonGeometry Polygon geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawPolygon(e, t) {
      const i = this.state, a = i.fillStyle, o = i.strokeStyle;
      if (a === void 0 && o === void 0)
        return;
      this.setFillStrokeStyles_(), this.beginGeometry(e, t), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_FILL_STYLE,
        Ll
      ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_STROKE_STYLE,
        i.strokeStyle,
        i.lineWidth,
        i.lineCap,
        i.lineJoin,
        i.miterLimit,
        xp,
        bp
      ]);
      const u = e.getEnds(), c = e.getOrientedFlatCoordinates(), p = e.getStride();
      this.drawFlatCoordinatess_(
        c,
        0,
        /** @type {Array<number>} */
        u,
        p
      ), this.endGeometry(t);
    }
    /**
     * @param {import("../../geom/MultiPolygon.js").default} multiPolygonGeometry MultiPolygon geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawMultiPolygon(e, t) {
      const i = this.state, a = i.fillStyle, o = i.strokeStyle;
      if (a === void 0 && o === void 0)
        return;
      this.setFillStrokeStyles_(), this.beginGeometry(e, t), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_FILL_STYLE,
        Ll
      ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([
        sn.SET_STROKE_STYLE,
        i.strokeStyle,
        i.lineWidth,
        i.lineCap,
        i.lineJoin,
        i.miterLimit,
        xp,
        bp
      ]);
      const u = e.getEndss(), c = e.getOrientedFlatCoordinates(), p = e.getStride();
      let y = 0;
      for (let _ = 0, S = u.length; _ < S; ++_)
        y = this.drawFlatCoordinatess_(
          c,
          y,
          u[_],
          p
        );
      this.endGeometry(t);
    }
    /**
     * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
     */
    finish() {
      this.reverseHitDetectionInstructions(), this.state = null;
      const e = this.tolerance;
      if (e !== 0) {
        const t = this.coordinates;
        for (let i = 0, a = t.length; i < a; ++i)
          t[i] = Rv(t[i], e);
      }
      return super.finish();
    }
    /**
     * @private
     */
    setFillStrokeStyles_() {
      const e = this.state;
      e.fillStyle !== void 0 && this.updateFillStyle(e, this.createFill), e.strokeStyle !== void 0 && this.updateStrokeStyle(e, this.applyStroke);
    }
  }
  const u2 = Fte;
  function jte(n, e, t, i, a) {
    const o = [];
    let u = t, c = 0, p = e.slice(t, 2);
    for (; c < n && u + a < i; ) {
      const [y, _] = p.slice(-2), S = e[u + a], b = e[u + a + 1], T = Math.sqrt(
        (S - y) * (S - y) + (b - _) * (b - _)
      );
      if (c += T, c >= n) {
        const O = (n - c + T) / T, N = _c(y, S, O), D = _c(_, b, O);
        p.push(N, D), o.push(p), p = [N, D], c == n && (u += a), c = 0;
      } else if (c < n)
        p.push(
          e[u + a],
          e[u + a + 1]
        ), u += a;
      else {
        const O = T - c, N = _c(y, S, O / T), D = _c(_, b, O / T);
        p.push(N, D), o.push(p), p = [N, D], c = 0, u += a;
      }
    }
    return c > 0 && o.push(p), o;
  }
  function Ute(n, e, t, i, a) {
    let o = t, u = t, c = 0, p = 0, y = t, _, S, b, T, O, N, D, k, $, B;
    for (S = t; S < i; S += a) {
      const V = e[S], z = e[S + 1];
      O !== void 0 && ($ = V - O, B = z - N, T = Math.sqrt($ * $ + B * B), D !== void 0 && (p += b, _ = Math.acos((D * $ + k * B) / (b * T)), _ > n && (p > c && (c = p, o = y, u = S), p = 0, y = S - a)), b = T, D = $, k = B), O = V, N = z;
    }
    return p += T, p > c ? [y, S] : [o, u];
  }
  const Ew = {
    left: 0,
    center: 0.5,
    right: 1,
    top: 0,
    middle: 0.5,
    hanging: 0.2,
    alphabetic: 0.8,
    ideographic: 0.8,
    bottom: 1
  };
  class zte extends vS {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Maximum extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      super(e, t, i, a), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.fillStates[Ll] = { fillStyle: Ll }, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = /** @type {import("../canvas.js").TextState} */
      {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0;
    }
    /**
     * @return {import("../canvas.js").SerializableInstructions} the serializable instructions.
     */
    finish() {
      const e = super.finish();
      return e.textStates = this.textStates, e.fillStates = this.fillStates, e.strokeStates = this.strokeStates, e;
    }
    /**
     * @param {import("../../geom/SimpleGeometry.js").default|import("../Feature.js").default} geometry Geometry.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     */
    drawText(e, t) {
      const i = this.textFillState_, a = this.textStrokeState_, o = this.textState_;
      if (this.text_ === "" || !o || !i && !a)
        return;
      const u = this.coordinates;
      let c = u.length;
      const p = e.getType();
      let y = null, _ = e.getStride();
      if (o.placement === "line" && (p == "LineString" || p == "MultiLineString" || p == "Polygon" || p == "MultiPolygon")) {
        if (!Zo(this.getBufferedMaxExtent(), e.getExtent()))
          return;
        let S;
        if (y = e.getFlatCoordinates(), p == "LineString")
          S = [y.length];
        else if (p == "MultiLineString")
          S = /** @type {import("../../geom/MultiLineString.js").default} */
          e.getEnds();
        else if (p == "Polygon")
          S = /** @type {import("../../geom/Polygon.js").default} */
          e.getEnds().slice(0, 1);
        else if (p == "MultiPolygon") {
          const N = (
            /** @type {import("../../geom/MultiPolygon.js").default} */
            e.getEndss()
          );
          S = [];
          for (let D = 0, k = N.length; D < k; ++D)
            S.push(N[D][0]);
        }
        this.beginGeometry(e, t);
        const b = o.repeat, T = b ? void 0 : o.textAlign;
        let O = 0;
        for (let N = 0, D = S.length; N < D; ++N) {
          let k;
          b ? k = jte(
            b * this.resolution,
            y,
            O,
            S[N],
            _
          ) : k = [y.slice(O, S[N])];
          for (let $ = 0, B = k.length; $ < B; ++$) {
            const V = k[$];
            let z = 0, G = V.length;
            if (T == null) {
              const ue = Ute(
                o.maxAngle,
                V,
                0,
                V.length,
                2
              );
              z = ue[0], G = ue[1];
            }
            for (let ue = z; ue < G; ue += _)
              u.push(V[ue], V[ue + 1]);
            const ie = u.length;
            O = S[N], this.drawChars_(c, ie), c = ie;
          }
        }
        this.endGeometry(t);
      } else {
        let S = o.overflow ? null : [];
        switch (p) {
          case "Point":
          case "MultiPoint":
            y = /** @type {import("../../geom/MultiPoint.js").default} */
            e.getFlatCoordinates();
            break;
          case "LineString":
            y = /** @type {import("../../geom/LineString.js").default} */
            e.getFlatMidpoint();
            break;
          case "Circle":
            y = /** @type {import("../../geom/Circle.js").default} */
            e.getCenter();
            break;
          case "MultiLineString":
            y = /** @type {import("../../geom/MultiLineString.js").default} */
            e.getFlatMidpoints(), _ = 2;
            break;
          case "Polygon":
            y = /** @type {import("../../geom/Polygon.js").default} */
            e.getFlatInteriorPoint(), o.overflow || S.push(y[2] / this.resolution), _ = 3;
            break;
          case "MultiPolygon":
            const k = (
              /** @type {import("../../geom/MultiPolygon.js").default} */
              e.getFlatInteriorPoints()
            );
            y = [];
            for (let $ = 0, B = k.length; $ < B; $ += 3)
              o.overflow || S.push(k[$ + 2] / this.resolution), y.push(k[$], k[$ + 1]);
            if (y.length === 0)
              return;
            _ = 2;
            break;
        }
        const b = this.appendFlatPointCoordinates(y, _);
        if (b === c)
          return;
        if (S && (b - c) / 2 !== y.length / _) {
          let k = c / 2;
          S = S.filter(($, B) => {
            const V = u[(k + B) * 2] === y[B * _] && u[(k + B) * 2 + 1] === y[B * _ + 1];
            return V || --k, V;
          });
        }
        this.saveTextStates_(), (o.backgroundFill || o.backgroundStroke) && (this.setFillStrokeStyle(
          o.backgroundFill,
          o.backgroundStroke
        ), o.backgroundFill && this.updateFillStyle(this.state, this.createFill), o.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(e, t);
        let T = o.padding;
        if (T != Nv && (o.scale[0] < 0 || o.scale[1] < 0)) {
          let k = o.padding[0], $ = o.padding[1], B = o.padding[2], V = o.padding[3];
          o.scale[0] < 0 && ($ = -$, V = -V), o.scale[1] < 0 && (k = -k, B = -B), T = [k, $, B, V];
        }
        const O = this.pixelRatio;
        this.instructions.push([
          sn.DRAW_IMAGE,
          c,
          b,
          null,
          NaN,
          NaN,
          NaN,
          1,
          0,
          0,
          this.textRotateWithView_,
          this.textRotation_,
          [1, 1],
          NaN,
          void 0,
          this.declutterImageWithText_,
          T == Nv ? Nv : T.map(function(k) {
            return k * O;
          }),
          !!o.backgroundFill,
          !!o.backgroundStroke,
          this.text_,
          this.textKey_,
          this.strokeKey_,
          this.fillKey_,
          this.textOffsetX_,
          this.textOffsetY_,
          S
        ]);
        const N = 1 / O, D = this.state.fillStyle;
        o.backgroundFill && (this.state.fillStyle = Ll, this.hitDetectionInstructions.push(this.createFill(this.state))), this.hitDetectionInstructions.push([
          sn.DRAW_IMAGE,
          c,
          b,
          null,
          NaN,
          NaN,
          NaN,
          1,
          0,
          0,
          this.textRotateWithView_,
          this.textRotation_,
          [N, N],
          NaN,
          void 0,
          this.declutterImageWithText_,
          T,
          !!o.backgroundFill,
          !!o.backgroundStroke,
          this.text_,
          this.textKey_,
          this.strokeKey_,
          this.fillKey_ ? Ll : this.fillKey_,
          this.textOffsetX_,
          this.textOffsetY_,
          S
        ]), o.backgroundFill && (this.state.fillStyle = D, this.hitDetectionInstructions.push(this.createFill(this.state))), this.endGeometry(t);
      }
    }
    /**
     * @private
     */
    saveTextStates_() {
      const e = this.textStrokeState_, t = this.textState_, i = this.textFillState_, a = this.strokeKey_;
      e && (a in this.strokeStates || (this.strokeStates[a] = {
        strokeStyle: e.strokeStyle,
        lineCap: e.lineCap,
        lineDashOffset: e.lineDashOffset,
        lineWidth: e.lineWidth,
        lineJoin: e.lineJoin,
        miterLimit: e.miterLimit,
        lineDash: e.lineDash
      }));
      const o = this.textKey_;
      o in this.textStates || (this.textStates[o] = {
        font: t.font,
        textAlign: t.textAlign || $E,
        justify: t.justify,
        textBaseline: t.textBaseline || mw,
        scale: t.scale
      });
      const u = this.fillKey_;
      i && (u in this.fillStates || (this.fillStates[u] = {
        fillStyle: i.fillStyle
      }));
    }
    /**
     * @private
     * @param {number} begin Begin.
     * @param {number} end End.
     */
    drawChars_(e, t) {
      const i = this.textStrokeState_, a = this.textState_, o = this.strokeKey_, u = this.textKey_, c = this.fillKey_;
      this.saveTextStates_();
      const p = this.pixelRatio, y = Ew[a.textBaseline], _ = this.textOffsetY_ * p, S = this.text_, b = i ? i.lineWidth * Math.abs(a.scale[0]) / 2 : 0;
      this.instructions.push([
        sn.DRAW_CHARS,
        e,
        t,
        y,
        a.overflow,
        c,
        a.maxAngle,
        p,
        _,
        o,
        b * p,
        S,
        u,
        1
      ]), this.hitDetectionInstructions.push([
        sn.DRAW_CHARS,
        e,
        t,
        y,
        a.overflow,
        c && Ll,
        a.maxAngle,
        p,
        _,
        o,
        b * p,
        S,
        u,
        1 / p
      ]);
    }
    /**
     * @param {import("../../style/Text.js").default} textStyle Text style.
     * @param {Object} [sharedData] Shared data.
     */
    setTextStyle(e, t) {
      let i, a, o;
      if (!e)
        this.text_ = "";
      else {
        const u = e.getFill();
        u ? (a = this.textFillState_, a || (a = /** @type {import("../canvas.js").FillState} */
        {}, this.textFillState_ = a), a.fillStyle = zh(
          u.getColor() || Ll
        )) : (a = null, this.textFillState_ = a);
        const c = e.getStroke();
        if (!c)
          o = null, this.textStrokeState_ = o;
        else {
          o = this.textStrokeState_, o || (o = /** @type {import("../canvas.js").StrokeState} */
          {}, this.textStrokeState_ = o);
          const O = c.getLineDash(), N = c.getLineDashOffset(), D = c.getWidth(), k = c.getMiterLimit();
          o.lineCap = c.getLineCap() || u_, o.lineDash = O ? O.slice() : xp, o.lineDashOffset = N === void 0 ? bp : N, o.lineJoin = c.getLineJoin() || c_, o.lineWidth = D === void 0 ? BE : D, o.miterLimit = k === void 0 ? UE : k, o.strokeStyle = zh(
            c.getColor() || zE
          );
        }
        i = this.textState_;
        const p = e.getFont() || qj;
        fee(p);
        const y = e.getScaleArray();
        i.overflow = e.getOverflow(), i.font = p, i.maxAngle = e.getMaxAngle(), i.placement = e.getPlacement(), i.textAlign = e.getTextAlign(), i.repeat = e.getRepeat(), i.justify = e.getJustify(), i.textBaseline = e.getTextBaseline() || mw, i.backgroundFill = e.getBackgroundFill(), i.backgroundStroke = e.getBackgroundStroke(), i.padding = e.getPadding() || Nv, i.scale = y === void 0 ? [1, 1] : y;
        const _ = e.getOffsetX(), S = e.getOffsetY(), b = e.getRotateWithView(), T = e.getRotation();
        this.text_ = e.getText() || "", this.textOffsetX_ = _ === void 0 ? 0 : _, this.textOffsetY_ = S === void 0 ? 0 : S, this.textRotateWithView_ = b === void 0 ? !1 : b, this.textRotation_ = T === void 0 ? 0 : T, this.strokeKey_ = o ? (typeof o.strokeStyle == "string" ? o.strokeStyle : Pi(o.strokeStyle)) + o.lineCap + o.lineDashOffset + "|" + o.lineWidth + o.lineJoin + o.miterLimit + "[" + o.lineDash.join() + "]" : "", this.textKey_ = i.font + i.scale + (i.textAlign || "?") + (i.repeat || "?") + (i.justify || "?") + (i.textBaseline || "?"), this.fillKey_ = a ? typeof a.fillStyle == "string" ? a.fillStyle : "|" + Pi(a.fillStyle) : "";
      }
      this.declutterImageWithText_ = t;
    }
  }
  const $te = {
    Circle: u2,
    Default: vS,
    Image: Ite,
    LineString: kte,
    Polygon: u2,
    Text: zte
  };
  class Bte {
    /**
     * @param {number} tolerance Tolerance.
     * @param {import("../../extent.js").Extent} maxExtent Max extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     */
    constructor(e, t, i, a) {
      this.tolerance_ = e, this.maxExtent_ = t, this.pixelRatio_ = a, this.resolution_ = i, this.buildersByZIndex_ = {};
    }
    /**
     * @return {!Object<string, !Object<import("../canvas.js").BuilderType, import("./Builder.js").SerializableInstructions>>} The serializable instructions
     */
    finish() {
      const e = {};
      for (const t in this.buildersByZIndex_) {
        e[t] = e[t] || {};
        const i = this.buildersByZIndex_[t];
        for (const a in i) {
          const o = i[a].finish();
          e[t][a] = o;
        }
      }
      return e;
    }
    /**
     * @param {number|undefined} zIndex Z index.
     * @param {import("../canvas.js").BuilderType} builderType Replay type.
     * @return {import("../VectorContext.js").default} Replay.
     */
    getBuilder(e, t) {
      const i = e !== void 0 ? e.toString() : "0";
      let a = this.buildersByZIndex_[i];
      a === void 0 && (a = {}, this.buildersByZIndex_[i] = a);
      let o = a[t];
      if (o === void 0) {
        const u = $te[t];
        o = new u(
          this.tolerance_,
          this.maxExtent_,
          this.resolution_,
          this.pixelRatio_
        ), a[t] = o;
      }
      return o;
    }
  }
  const c2 = Bte;
  class Vte extends dj {
    /**
     * @param {LayerType} layer Layer.
     */
    constructor(e) {
      super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = e, this.declutterExecutorGroup = null;
    }
    /**
     * Asynchronous layer level hit detection.
     * @param {import("../pixel.js").Pixel} pixel Pixel.
     * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with
     * an array of features.
     */
    getFeatures(e) {
      return yi();
    }
    /**
     * @param {import("../pixel.js").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
     */
    getData(e) {
      return null;
    }
    /**
     * Determine whether render should be called.
     * @abstract
     * @param {import("../Map.js").FrameState} frameState Frame state.
     * @return {boolean} Layer is ready to be rendered.
     */
    prepareFrame(e) {
      return yi();
    }
    /**
     * Render the layer.
     * @abstract
     * @param {import("../Map.js").FrameState} frameState Frame state.
     * @param {HTMLElement|null} target Target that may be used to render content to.
     * @return {HTMLElement|null} The rendered element.
     */
    renderFrame(e, t) {
      return yi();
    }
    /**
     * @param {Object<number, Object<string, import("../Tile.js").default>>} tiles Lookup of loaded tiles by zoom level.
     * @param {number} zoom Zoom level.
     * @param {import("../Tile.js").default} tile Tile.
     * @return {boolean|void} If `false`, the tile will not be considered loaded.
     */
    loadedTileCallback(e, t, i) {
      e[t] || (e[t] = {}), e[t][i.tileCoord.toString()] = i;
    }
    /**
     * Create a function that adds loaded tiles to the tile lookup.
     * @param {import("../source/Tile.js").default} source Tile source.
     * @param {import("../proj/Projection.js").default} projection Projection of the tiles.
     * @param {Object<number, Object<string, import("../Tile.js").default>>} tiles Lookup of loaded tiles by zoom level.
     * @return {function(number, import("../TileRange.js").default):boolean} A function that can be
     *     called with a zoom level and a tile range to add loaded tiles to the lookup.
     * @protected
     */
    createLoadedTileFinder(e, t, i) {
      return (
        /**
         * @param {number} zoom Zoom level.
         * @param {import("../TileRange.js").default} tileRange Tile range.
         * @return {boolean} The tile range is fully loaded.
         */
        (a, o) => {
          const u = this.loadedTileCallback.bind(this, i, a);
          return e.forEachLoadedTile(t, a, o, u);
        }
      );
    }
    /**
     * @abstract
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("../Map.js").FrameState} frameState Frame state.
     * @param {number} hitTolerance Hit tolerance in pixels.
     * @param {import("./vector.js").FeatureCallback<T>} callback Feature callback.
     * @param {Array<import("./Map.js").HitMatch<T>>} matches The hit detected matches with tolerance.
     * @return {T|undefined} Callback result.
     * @template T
     */
    forEachFeatureAtCoordinate(e, t, i, a, o) {
    }
    /**
     * @return {LayerType} Layer.
     */
    getLayer() {
      return this.layer_;
    }
    /**
     * Perform action necessary to get the layer rendered after new fonts have loaded
     * @abstract
     */
    handleFontsChanged() {
    }
    /**
     * Handle changes in image state.
     * @param {import("../events/Event.js").default} event Image change event.
     * @private
     */
    handleImageChange_(e) {
      const t = (
        /** @type {import("../Image.js").default} */
        e.target
      );
      (t.getState() === _n.LOADED || t.getState() === _n.ERROR) && this.renderIfReadyAndVisible();
    }
    /**
     * Load the image if not already loaded, and register the image change
     * listener if needed.
     * @param {import("../Image.js").default} image Image.
     * @return {boolean} `true` if the image is already loaded, `false` otherwise.
     * @protected
     */
    loadImage(e) {
      let t = e.getState();
      return t != _n.LOADED && t != _n.ERROR && e.addEventListener(Cn.CHANGE, this.boundHandleImageChange_), t == _n.IDLE && (e.load(), t = e.getState()), t == _n.LOADED;
    }
    /**
     * @protected
     */
    renderIfReadyAndVisible() {
      const e = this.getLayer();
      e && e.getVisible() && e.getSourceState() === "ready" && e.changed();
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      delete this.layer_, super.disposeInternal();
    }
  }
  const Hte = Vte;
  class Wte extends Xh {
    /**
     * @param {import("./EventType.js").default} type Type.
     * @param {import("../transform.js").Transform} [inversePixelTransform] Transform for
     *     CSS pixels to rendered pixels.
     * @param {import("../Map.js").FrameState} [frameState] Frame state.
     * @param {?(CanvasRenderingContext2D|WebGLRenderingContext)} [context] Context.
     */
    constructor(e, t, i, a) {
      super(e), this.inversePixelTransform = t, this.frameState = i, this.context = a;
    }
  }
  const pU = Wte, f2 = [];
  let D0 = null;
  function Gte() {
    D0 = tl(1, 1, void 0, {
      willReadFrequently: !0
    });
  }
  class Yte extends Hte {
    /**
     * @param {LayerType} layer Layer.
     */
    constructor(e) {
      super(e), this.container = null, this.renderedResolution, this.tempTransform = Tf(), this.pixelTransform = Tf(), this.inversePixelTransform = Tf(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null;
    }
    /**
     * @param {import('../../DataTile.js').ImageLike} image Image.
     * @param {number} col The column index.
     * @param {number} row The row index.
     * @return {Uint8ClampedArray|null} The image data.
     */
    getImageData(e, t, i) {
      D0 || Gte(), D0.clearRect(0, 0, 1, 1);
      let a;
      try {
        D0.drawImage(e, t, i, 1, 1, 0, 0, 1, 1), a = D0.getImageData(0, 0, 1, 1).data;
      } catch {
        return D0 = null, null;
      }
      return a;
    }
    /**
     * @param {import('../../Map.js').FrameState} frameState Frame state.
     * @return {string} Background color.
     */
    getBackground(e) {
      let i = this.getLayer().getBackground();
      return typeof i == "function" && (i = i(e.viewState.resolution)), i || void 0;
    }
    /**
     * Get a rendering container from an existing target, if compatible.
     * @param {HTMLElement} target Potential render target.
     * @param {string} transform CSS Transform.
     * @param {string} [backgroundColor] Background color.
     */
    useContainer(e, t, i) {
      const a = this.getLayer().getClassName();
      let o, u;
      if (e && e.className === a && (!i || e && e.style.backgroundColor && hm(
        pw(e.style.backgroundColor),
        pw(i)
      ))) {
        const c = e.firstElementChild;
        c instanceof HTMLCanvasElement && (u = c.getContext("2d"));
      }
      if (u && u.canvas.style.transform === t ? (this.container = e, this.context = u, this.containerReused = !0) : this.containerReused ? (this.container = null, this.context = null, this.containerReused = !1) : this.container && (this.container.style.backgroundColor = null), !this.container) {
        o = document.createElement("div"), o.className = a;
        let c = o.style;
        c.position = "absolute", c.width = "100%", c.height = "100%", u = tl();
        const p = u.canvas;
        o.appendChild(p), c = p.style, c.position = "absolute", c.left = "0", c.transformOrigin = "top left", this.container = o, this.context = u;
      }
      !this.containerReused && i && !this.container.style.backgroundColor && (this.container.style.backgroundColor = i);
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {import("../../extent.js").Extent} extent Clip extent.
     * @protected
     */
    clipUnrotated(e, t, i) {
      const a = Xv(i), o = Aw(i), u = Ow(i), c = Mw(i);
      os(t.coordinateToPixelTransform, a), os(t.coordinateToPixelTransform, o), os(t.coordinateToPixelTransform, u), os(t.coordinateToPixelTransform, c);
      const p = this.inversePixelTransform;
      os(p, a), os(p, o), os(p, u), os(p, c), e.save(), e.beginPath(), e.moveTo(Math.round(a[0]), Math.round(a[1])), e.lineTo(Math.round(o[0]), Math.round(o[1])), e.lineTo(Math.round(u[0]), Math.round(u[1])), e.lineTo(Math.round(c[0]), Math.round(c[1])), e.clip();
    }
    /**
     * @param {import("../../render/EventType.js").default} type Event type.
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @private
     */
    dispatchRenderEvent_(e, t, i) {
      const a = this.getLayer();
      if (a.hasListener(e)) {
        const o = new pU(
          e,
          this.inversePixelTransform,
          i,
          t
        );
        a.dispatchEvent(o);
      }
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @protected
     */
    preRender(e, t) {
      this.frameState = t, this.dispatchRenderEvent_(Hh.PRERENDER, e, t);
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @protected
     */
    postRender(e, t) {
      this.dispatchRenderEvent_(Hh.POSTRENDER, e, t);
    }
    /**
     * Creates a transform for rendering to an element that will be rotated after rendering.
     * @param {import("../../coordinate.js").Coordinate} center Center.
     * @param {number} resolution Resolution.
     * @param {number} rotation Rotation.
     * @param {number} pixelRatio Pixel ratio.
     * @param {number} width Width of the rendered element (in pixels).
     * @param {number} height Height of the rendered element (in pixels).
     * @param {number} offsetX Offset on the x-axis in view coordinates.
     * @protected
     * @return {!import("../../transform.js").Transform} Transform.
     */
    getRenderTransform(e, t, i, a, o, u, c) {
      const p = o / 2, y = u / 2, _ = a / t, S = -_, b = -e[0] + c, T = -e[1];
      return Rf(
        this.tempTransform,
        p,
        y,
        _,
        S,
        -i,
        b,
        T
      );
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      delete this.frameState, super.disposeInternal();
    }
  }
  const aN = Yte;
  function qte(n, e, t, i, a, o, u, c, p, y, _, S) {
    let b = n[e], T = n[e + 1], O = 0, N = 0, D = 0, k = 0;
    function $() {
      O = b, N = T, e += i, b = n[e], T = n[e + 1], k += D, D = Math.sqrt((b - O) * (b - O) + (T - N) * (T - N));
    }
    do
      $();
    while (e < t - i && k + D < o);
    let B = D === 0 ? 0 : (o - k) / D;
    const V = _c(O, b, B), z = _c(N, T, B), G = e - i, ie = k, ue = o + c * p(y, a, _);
    for (; e < t - i && k + D < ue; )
      $();
    B = D === 0 ? 0 : (ue - k) / D;
    const Re = _c(O, b, B), Oe = _c(N, T, B);
    let $e;
    if (S) {
      const ae = [V, z, Re, Oe];
      Mj(ae, 0, 4, 2, S, ae, ae), $e = ae[0] > ae[2];
    } else
      $e = V > Re;
    const Ee = Math.PI, Fe = [], Ne = G + i === e;
    e = G, D = 0, k = ie, b = n[e], T = n[e + 1];
    let Q;
    if (Ne) {
      $(), Q = Math.atan2(T - N, b - O), $e && (Q += Q > 0 ? -Ee : Ee);
      const ae = (Re + V) / 2, le = (Oe + z) / 2;
      return Fe[0] = [ae, le, (ue - o) / 2, Q, a], Fe;
    }
    a = a.replace(/\n/g, " ");
    for (let ae = 0, le = a.length; ae < le; ) {
      $();
      let se = Math.atan2(T - N, b - O);
      if ($e && (se += se > 0 ? -Ee : Ee), Q !== void 0) {
        let Me = se - Q;
        if (Me += Me > Ee ? -2 * Ee : Me < -Ee ? 2 * Ee : 0, Math.abs(Me) > u)
          return null;
      }
      Q = se;
      const Ae = ae;
      let q = 0;
      for (; ae < le; ++ae) {
        const Me = $e ? le - ae - 1 : ae, De = c * p(y, a[Me], _);
        if (e + i < t && k + D < o + q + De / 2)
          break;
        q += De;
      }
      if (ae === Ae)
        continue;
      const Z = $e ? a.substring(le - Ae, le - ae) : a.substring(Ae, ae);
      B = D === 0 ? 0 : (o + q / 2 - k) / D;
      const ee = _c(O, b, B), Le = _c(N, T, B);
      Fe.push([ee, Le, q / 2, se, Z]), o += q;
    }
    return Fe;
  }
  const w0 = Su(), jg = [], dp = [], pp = [], Ug = [];
  function h2(n) {
    return n[3].declutterBox;
  }
  const d2 = new RegExp(
    /* eslint-disable prettier/prettier */
    "[֑-ࣿיִ-﷿ﹰ-ﻼࠀ-࿿-]"
    /* eslint-enable prettier/prettier */
  );
  function NO(n, e) {
    return e === "start" ? e = d2.test(n) ? "right" : "left" : e === "end" && (e = d2.test(n) ? "left" : "right"), Ew[e];
  }
  function Xte(n, e, t) {
    return t > 0 && n.push(`
`, ""), n.push(e, ""), n;
  }
  class Kte {
    /**
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {boolean} overlaps The replay can have overlapping geometries.
     * @param {import("../canvas.js").SerializableInstructions} instructions The serializable instructions
     */
    constructor(e, t, i, a) {
      this.overlaps = i, this.pixelRatio = t, this.resolution = e, this.alignFill_, this.instructions = a.instructions, this.coordinates = a.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = Tf(), this.hitDetectionInstructions = a.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = a.fillStates || {}, this.strokeStates = a.strokeStates || {}, this.textStates = a.textStates || {}, this.widths_ = {}, this.labels_ = {};
    }
    /**
     * @param {string|Array<string>} text Text.
     * @param {string} textKey Text style key.
     * @param {string} fillKey Fill style key.
     * @param {string} strokeKey Stroke style key.
     * @return {import("../canvas.js").Label} Label.
     */
    createLabel(e, t, i, a) {
      const o = e + t + i + a;
      if (this.labels_[o])
        return this.labels_[o];
      const u = a ? this.strokeStates[a] : null, c = i ? this.fillStates[i] : null, p = this.textStates[t], y = this.pixelRatio, _ = [
        p.scale[0] * y,
        p.scale[1] * y
      ], S = Array.isArray(e), b = p.justify ? Ew[p.justify] : NO(
        Array.isArray(e) ? e[0] : e,
        p.textAlign || $E
      ), T = a && u.lineWidth ? u.lineWidth : 0, O = S ? e : e.split(`
`).reduce(Xte, []), { width: N, height: D, widths: k, heights: $, lineWidths: B } = dee(
        p,
        O
      ), V = N + T, z = [], G = (V + 2) * _[0], ie = (D + T) * _[1], ue = {
        width: G < 0 ? Math.floor(G) : Math.ceil(G),
        height: ie < 0 ? Math.floor(ie) : Math.ceil(ie),
        contextInstructions: z
      };
      (_[0] != 1 || _[1] != 1) && z.push("scale", _), a && (z.push("strokeStyle", u.strokeStyle), z.push("lineWidth", T), z.push("lineCap", u.lineCap), z.push("lineJoin", u.lineJoin), z.push("miterLimit", u.miterLimit), z.push("setLineDash", [u.lineDash]), z.push("lineDashOffset", u.lineDashOffset)), i && z.push("fillStyle", c.fillStyle), z.push("textBaseline", "middle"), z.push("textAlign", "center");
      const Re = 0.5 - b;
      let Oe = b * V + Re * T;
      const $e = [], Ee = [];
      let Fe = 0, Ne = 0, Q = 0, ae = 0, le;
      for (let se = 0, Ae = O.length; se < Ae; se += 2) {
        const q = O[se];
        if (q === `
`) {
          Ne += Fe, Fe = 0, Oe = b * V + Re * T, ++ae;
          continue;
        }
        const Z = O[se + 1] || p.font;
        Z !== le && (a && $e.push("font", Z), i && Ee.push("font", Z), le = Z), Fe = Math.max(Fe, $[Q]);
        const ee = [
          q,
          Oe + Re * k[Q] + b * (k[Q] - B[ae]),
          0.5 * (T + Fe) + Ne
        ];
        Oe += k[Q], a && $e.push("strokeText", ee), i && Ee.push("fillText", ee), ++Q;
      }
      return Array.prototype.push.apply(z, $e), Array.prototype.push.apply(z, Ee), this.labels_[o] = ue, ue;
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../coordinate.js").Coordinate} p1 1st point of the background box.
     * @param {import("../../coordinate.js").Coordinate} p2 2nd point of the background box.
     * @param {import("../../coordinate.js").Coordinate} p3 3rd point of the background box.
     * @param {import("../../coordinate.js").Coordinate} p4 4th point of the background box.
     * @param {Array<*>} fillInstruction Fill instruction.
     * @param {Array<*>} strokeInstruction Stroke instruction.
     */
    replayTextBackground_(e, t, i, a, o, u, c) {
      e.beginPath(), e.moveTo.apply(e, t), e.lineTo.apply(e, i), e.lineTo.apply(e, a), e.lineTo.apply(e, o), e.lineTo.apply(e, t), u && (this.alignFill_ = /** @type {boolean} */
      u[2], this.fill_(e)), c && (this.setStrokeStyle_(
        e,
        /** @type {Array<*>} */
        c
      ), e.stroke());
    }
    /**
     * @private
     * @param {number} sheetWidth Width of the sprite sheet.
     * @param {number} sheetHeight Height of the sprite sheet.
     * @param {number} centerX X.
     * @param {number} centerY Y.
     * @param {number} width Width.
     * @param {number} height Height.
     * @param {number} anchorX Anchor X.
     * @param {number} anchorY Anchor Y.
     * @param {number} originX Origin X.
     * @param {number} originY Origin Y.
     * @param {number} rotation Rotation.
     * @param {import("../../size.js").Size} scale Scale.
     * @param {boolean} snapToPixel Snap to pixel.
     * @param {Array<number>} padding Padding.
     * @param {boolean} fillStroke Background fill or stroke.
     * @param {import("../../Feature.js").FeatureLike} feature Feature.
     * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.
     */
    calculateImageOrLabelDimensions_(e, t, i, a, o, u, c, p, y, _, S, b, T, O, N, D) {
      c *= b[0], p *= b[1];
      let k = i - c, $ = a - p;
      const B = o + y > e ? e - y : o, V = u + _ > t ? t - _ : u, z = O[3] + B * b[0] + O[1], G = O[0] + V * b[1] + O[2], ie = k - O[3], ue = $ - O[0];
      (N || S !== 0) && (jg[0] = ie, Ug[0] = ie, jg[1] = ue, dp[1] = ue, dp[0] = ie + z, pp[0] = dp[0], pp[1] = ue + G, Ug[1] = pp[1]);
      let Re;
      return S !== 0 ? (Re = Rf(
        Tf(),
        i,
        a,
        1,
        1,
        S,
        -i,
        -a
      ), os(Re, jg), os(Re, dp), os(Re, pp), os(Re, Ug), wp(
        Math.min(jg[0], dp[0], pp[0], Ug[0]),
        Math.min(jg[1], dp[1], pp[1], Ug[1]),
        Math.max(jg[0], dp[0], pp[0], Ug[0]),
        Math.max(jg[1], dp[1], pp[1], Ug[1]),
        w0
      )) : wp(
        Math.min(ie, ie + z),
        Math.min(ue, ue + G),
        Math.max(ie, ie + z),
        Math.max(ue, ue + G),
        w0
      ), T && (k = Math.round(k), $ = Math.round($)), {
        drawImageX: k,
        drawImageY: $,
        drawImageW: B,
        drawImageH: V,
        originX: y,
        originY: _,
        declutterBox: {
          minX: w0[0],
          minY: w0[1],
          maxX: w0[2],
          maxY: w0[3],
          value: D
        },
        canvasTransform: Re,
        scale: b
      };
    }
    /**
     * @private
     * @param {CanvasRenderingContext2D} context Context.
     * @param {number} contextScale Scale of the context.
     * @param {import("../canvas.js").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.
     * @param {ImageOrLabelDimensions} dimensions Dimensions.
     * @param {number} opacity Opacity.
     * @param {Array<*>} fillInstruction Fill instruction.
     * @param {Array<*>} strokeInstruction Stroke instruction.
     * @return {boolean} The image or label was rendered.
     */
    replayImageOrLabel_(e, t, i, a, o, u, c) {
      const p = !!(u || c), y = a.declutterBox, _ = e.canvas, S = c ? c[2] * a.scale[0] / 2 : 0;
      return y.minX - S <= _.width / t && y.maxX + S >= 0 && y.minY - S <= _.height / t && y.maxY + S >= 0 && (p && this.replayTextBackground_(
        e,
        jg,
        dp,
        pp,
        Ug,
        /** @type {Array<*>} */
        u,
        /** @type {Array<*>} */
        c
      ), pee(
        e,
        a.canvasTransform,
        o,
        i,
        a.originX,
        a.originY,
        a.drawImageW,
        a.drawImageH,
        a.drawImageX,
        a.drawImageY,
        a.scale
      )), !0;
    }
    /**
     * @private
     * @param {CanvasRenderingContext2D} context Context.
     */
    fill_(e) {
      if (this.alignFill_) {
        const t = os(this.renderedTransform_, [0, 0]), i = 512 * this.pixelRatio;
        e.save(), e.translate(t[0] % i, t[1] % i), e.rotate(this.viewRotation_);
      }
      e.fill(), this.alignFill_ && e.restore();
    }
    /**
     * @private
     * @param {CanvasRenderingContext2D} context Context.
     * @param {Array<*>} instruction Instruction.
     */
    setStrokeStyle_(e, t) {
      e.strokeStyle = /** @type {import("../../colorlike.js").ColorLike} */
      t[1], e.lineWidth = /** @type {number} */
      t[2], e.lineCap = /** @type {CanvasLineCap} */
      t[3], e.lineJoin = /** @type {CanvasLineJoin} */
      t[4], e.miterLimit = /** @type {number} */
      t[5], e.lineDashOffset = /** @type {number} */
      t[7], e.setLineDash(
        /** @type {Array<number>} */
        t[6]
      );
    }
    /**
     * @private
     * @param {string|Array<string>} text The text to draw.
     * @param {string} textKey The key of the text state.
     * @param {string} strokeKey The key for the stroke state.
     * @param {string} fillKey The key for the fill state.
     * @return {{label: import("../canvas.js").Label, anchorX: number, anchorY: number}} The text image and its anchor.
     */
    drawLabelWithPointPlacement_(e, t, i, a) {
      const o = this.textStates[t], u = this.createLabel(e, t, a, i), c = this.strokeStates[i], p = this.pixelRatio, y = NO(
        Array.isArray(e) ? e[0] : e,
        o.textAlign || $E
      ), _ = Ew[o.textBaseline || mw], S = c && c.lineWidth ? c.lineWidth : 0, b = u.width / p - 2 * o.scale[0], T = y * b + 2 * (0.5 - y) * S, O = _ * u.height / p + 2 * (0.5 - _) * S;
      return {
        label: u,
        anchorX: T,
        anchorY: O
      };
    }
    /**
     * @private
     * @param {CanvasRenderingContext2D} context Context.
     * @param {number} contextScale Scale of the context.
     * @param {import("../../transform.js").Transform} transform Transform.
     * @param {Array<*>} instructions Instructions array.
     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.
     * @param {FeatureCallback<T>} [featureCallback] Feature callback.
     * @param {import("../../extent.js").Extent} [hitExtent] Only check
     *     features that intersect this extent.
     * @param {import("rbush").default} [declutterTree] Declutter tree.
     * @return {T|undefined} Callback result.
     * @template T
     */
    execute_(e, t, i, a, o, u, c, p) {
      let y;
      this.pixelCoordinates_ && hm(i, this.renderedTransform_) ? y = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), y = Qg(
        this.coordinates,
        0,
        this.coordinates.length,
        2,
        i,
        this.pixelCoordinates_
      ), TJ(this.renderedTransform_, i));
      let _ = 0;
      const S = a.length;
      let b = 0, T, O, N, D, k, $, B, V, z, G, ie, ue, Re = 0, Oe = 0, $e = null, Ee = null;
      const Fe = this.coordinateCache_, Ne = this.viewRotation_, Q = Math.round(Math.atan2(-i[1], i[0]) * 1e12) / 1e12, ae = (
        /** @type {import("../../render.js").State} */
        {
          context: e,
          pixelRatio: this.pixelRatio,
          resolution: this.resolution,
          rotation: Ne
        }
      ), le = this.instructions != a || this.overlaps ? 0 : 200;
      let se, Ae, q, Z;
      for (; _ < S; ) {
        const ee = a[_];
        switch (
          /** @type {import("./Instruction.js").default} */
          ee[0]
        ) {
          case sn.BEGIN_GEOMETRY:
            se = /** @type {import("../../Feature.js").FeatureLike} */
            ee[1], Z = ee[3], se.getGeometry() ? c !== void 0 && !Zo(c, Z.getExtent()) ? _ = /** @type {number} */
            ee[2] + 1 : ++_ : _ = /** @type {number} */
            ee[2];
            break;
          case sn.BEGIN_PATH:
            Re > le && (this.fill_(e), Re = 0), Oe > le && (e.stroke(), Oe = 0), !Re && !Oe && (e.beginPath(), D = NaN, k = NaN), ++_;
            break;
          case sn.CIRCLE:
            b = /** @type {number} */
            ee[1];
            const Me = y[b], De = y[b + 1], Ye = y[b + 2], Ze = y[b + 3], Xe = Ye - Me, lt = Ze - De, Dt = Math.sqrt(Xe * Xe + lt * lt);
            e.moveTo(Me + Dt, De), e.arc(Me, De, Dt, 0, 2 * Math.PI, !0), ++_;
            break;
          case sn.CLOSE_PATH:
            e.closePath(), ++_;
            break;
          case sn.CUSTOM:
            b = /** @type {number} */
            ee[1], T = ee[2];
            const Ct = (
              /** @type {import("../../geom/SimpleGeometry.js").default} */
              ee[3]
            ), hn = ee[4], Je = ee.length == 6 ? ee[5] : void 0;
            ae.geometry = Ct, ae.feature = se, _ in Fe || (Fe[_] = []);
            const Pt = Fe[_];
            Je ? Je(y, b, T, 2, Pt) : (Pt[0] = y[b], Pt[1] = y[b + 1], Pt.length = 2), hn(Pt, ae), ++_;
            break;
          case sn.DRAW_IMAGE:
            b = /** @type {number} */
            ee[1], T = /** @type {number} */
            ee[2], V = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */
            ee[3], O = /** @type {number} */
            ee[4], N = /** @type {number} */
            ee[5];
            let Vn = (
              /** @type {number} */
              ee[6]
            );
            const Hn = (
              /** @type {number} */
              ee[7]
            ), Nn = (
              /** @type {number} */
              ee[8]
            ), Si = (
              /** @type {number} */
              ee[9]
            ), Sr = (
              /** @type {boolean} */
              ee[10]
            );
            let In = (
              /** @type {number} */
              ee[11]
            );
            const Tn = (
              /** @type {import("../../size.js").Size} */
              ee[12]
            );
            let Pn = (
              /** @type {number} */
              ee[13]
            );
            const Qn = (
              /** @type {"declutter"|"obstacle"|"none"|undefined} */
              ee[14]
            ), Jn = (
              /** @type {import("../canvas.js").DeclutterImageWithText} */
              ee[15]
            );
            if (!V && ee.length >= 20) {
              z = /** @type {string} */
              ee[19], G = /** @type {string} */
              ee[20], ie = /** @type {string} */
              ee[21], ue = /** @type {string} */
              ee[22];
              const Fi = this.drawLabelWithPointPlacement_(
                z,
                G,
                ie,
                ue
              );
              V = Fi.label, ee[3] = V;
              const za = (
                /** @type {number} */
                ee[23]
              );
              O = (Fi.anchorX - za) * this.pixelRatio, ee[4] = O;
              const Ar = (
                /** @type {number} */
                ee[24]
              );
              N = (Fi.anchorY - Ar) * this.pixelRatio, ee[5] = N, Vn = V.height, ee[6] = Vn, Pn = V.width, ee[13] = Pn;
            }
            let ui;
            ee.length > 25 && (ui = /** @type {number} */
            ee[25]);
            let Mi, ci, dn;
            ee.length > 17 ? (Mi = /** @type {Array<number>} */
            ee[16], ci = /** @type {boolean} */
            ee[17], dn = /** @type {boolean} */
            ee[18]) : (Mi = Nv, ci = !1, dn = !1), Sr && Q ? In += Ne : !Sr && !Q && (In -= Ne);
            let xr = 0;
            for (; b < T; b += 2) {
              if (ui && ui[xr++] < Pn / this.pixelRatio)
                continue;
              const Fi = this.calculateImageOrLabelDimensions_(
                V.width,
                V.height,
                y[b],
                y[b + 1],
                Pn,
                Vn,
                O,
                N,
                Nn,
                Si,
                In,
                Tn,
                o,
                Mi,
                ci || dn,
                se
              ), za = [
                e,
                t,
                V,
                Fi,
                Hn,
                ci ? (
                  /** @type {Array<*>} */
                  $e
                ) : null,
                dn ? (
                  /** @type {Array<*>} */
                  Ee
                ) : null
              ];
              if (p) {
                if (Qn === "none")
                  continue;
                if (Qn === "obstacle") {
                  p.insert(Fi.declutterBox);
                  continue;
                } else {
                  let Ar, ga;
                  if (Jn) {
                    const br = T - b;
                    if (!Jn[br]) {
                      Jn[br] = za;
                      continue;
                    }
                    if (Ar = Jn[br], delete Jn[br], ga = h2(Ar), p.collides(ga))
                      continue;
                  }
                  if (p.collides(Fi.declutterBox))
                    continue;
                  Ar && (p.insert(ga), this.replayImageOrLabel_.apply(this, Ar)), p.insert(Fi.declutterBox);
                }
              }
              this.replayImageOrLabel_.apply(this, za);
            }
            ++_;
            break;
          case sn.DRAW_CHARS:
            const Wr = (
              /** @type {number} */
              ee[1]
            ), ai = (
              /** @type {number} */
              ee[2]
            ), at = (
              /** @type {number} */
              ee[3]
            ), Tt = (
              /** @type {number} */
              ee[4]
            );
            ue = /** @type {string} */
            ee[5];
            const nn = (
              /** @type {number} */
              ee[6]
            ), kn = (
              /** @type {number} */
              ee[7]
            ), Mn = (
              /** @type {number} */
              ee[8]
            );
            ie = /** @type {string} */
            ee[9];
            const Oi = (
              /** @type {number} */
              ee[10]
            );
            z = /** @type {string} */
            ee[11], G = /** @type {string} */
            ee[12];
            const ki = [
              /** @type {number} */
              ee[13],
              /** @type {number} */
              ee[13]
            ], Gr = this.textStates[G], Fn = Gr.font, Ki = [
              Gr.scale[0] * kn,
              Gr.scale[1] * kn
            ];
            let On;
            Fn in this.widths_ ? On = this.widths_[Fn] : (On = {}, this.widths_[Fn] = On);
            const gi = ZJ(y, Wr, ai, 2), ls = Math.abs(Ki[0]) * X3(Fn, z, On);
            if (Tt || ls <= gi) {
              const Fi = this.textStates[G].textAlign, za = (gi - ls) * NO(z, Fi), Ar = qte(
                y,
                Wr,
                ai,
                2,
                z,
                za,
                nn,
                Math.abs(Ki[0]),
                X3,
                Fn,
                On,
                Q ? 0 : this.viewRotation_
              );
              e:
                if (Ar) {
                  const ga = [];
                  let br, Ca, sa, Ai, ir;
                  if (ie)
                    for (br = 0, Ca = Ar.length; br < Ca; ++br) {
                      ir = Ar[br], sa = /** @type {string} */
                      ir[4], Ai = this.createLabel(sa, G, "", ie), O = /** @type {number} */
                      ir[2] + (Ki[0] < 0 ? -Oi : Oi), N = at * Ai.height + (0.5 - at) * 2 * Oi * Ki[1] / Ki[0] - Mn;
                      const rr = this.calculateImageOrLabelDimensions_(
                        Ai.width,
                        Ai.height,
                        ir[0],
                        ir[1],
                        Ai.width,
                        Ai.height,
                        O,
                        N,
                        0,
                        0,
                        ir[3],
                        ki,
                        !1,
                        Nv,
                        !1,
                        se
                      );
                      if (p && p.collides(rr.declutterBox))
                        break e;
                      ga.push([
                        e,
                        t,
                        Ai,
                        rr,
                        1,
                        null,
                        null
                      ]);
                    }
                  if (ue)
                    for (br = 0, Ca = Ar.length; br < Ca; ++br) {
                      ir = Ar[br], sa = /** @type {string} */
                      ir[4], Ai = this.createLabel(sa, G, ue, ""), O = /** @type {number} */
                      ir[2], N = at * Ai.height - Mn;
                      const rr = this.calculateImageOrLabelDimensions_(
                        Ai.width,
                        Ai.height,
                        ir[0],
                        ir[1],
                        Ai.width,
                        Ai.height,
                        O,
                        N,
                        0,
                        0,
                        ir[3],
                        ki,
                        !1,
                        Nv,
                        !1,
                        se
                      );
                      if (p && p.collides(rr.declutterBox))
                        break e;
                      ga.push([
                        e,
                        t,
                        Ai,
                        rr,
                        1,
                        null,
                        null
                      ]);
                    }
                  p && p.load(ga.map(h2));
                  for (let rr = 0, Ta = ga.length; rr < Ta; ++rr)
                    this.replayImageOrLabel_.apply(this, ga[rr]);
                }
            }
            ++_;
            break;
          case sn.END_GEOMETRY:
            if (u !== void 0) {
              se = /** @type {import("../../Feature.js").FeatureLike} */
              ee[1];
              const Fi = u(se, Z);
              if (Fi)
                return Fi;
            }
            ++_;
            break;
          case sn.FILL:
            le ? Re++ : this.fill_(e), ++_;
            break;
          case sn.MOVE_TO_LINE_TO:
            for (b = /** @type {number} */
            ee[1], T = /** @type {number} */
            ee[2], Ae = y[b], q = y[b + 1], $ = Ae + 0.5 | 0, B = q + 0.5 | 0, ($ !== D || B !== k) && (e.moveTo(Ae, q), D = $, k = B), b += 2; b < T; b += 2)
              Ae = y[b], q = y[b + 1], $ = Ae + 0.5 | 0, B = q + 0.5 | 0, (b == T - 2 || $ !== D || B !== k) && (e.lineTo(Ae, q), D = $, k = B);
            ++_;
            break;
          case sn.SET_FILL_STYLE:
            $e = ee, this.alignFill_ = ee[2], Re && (this.fill_(e), Re = 0, Oe && (e.stroke(), Oe = 0)), e.fillStyle = /** @type {import("../../colorlike.js").ColorLike} */
            ee[1], ++_;
            break;
          case sn.SET_STROKE_STYLE:
            Ee = ee, Oe && (e.stroke(), Oe = 0), this.setStrokeStyle_(
              e,
              /** @type {Array<*>} */
              ee
            ), ++_;
            break;
          case sn.STROKE:
            le ? Oe++ : e.stroke(), ++_;
            break;
          default:
            ++_;
            break;
        }
      }
      Re && this.fill_(e), Oe && e.stroke();
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {number} contextScale Scale of the context.
     * @param {import("../../transform.js").Transform} transform Transform.
     * @param {number} viewRotation View rotation.
     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.
     * @param {import("rbush").default} [declutterTree] Declutter tree.
     */
    execute(e, t, i, a, o, u) {
      this.viewRotation_ = a, this.execute_(
        e,
        t,
        i,
        this.instructions,
        o,
        void 0,
        void 0,
        u
      );
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../transform.js").Transform} transform Transform.
     * @param {number} viewRotation View rotation.
     * @param {FeatureCallback<T>} [featureCallback] Feature callback.
     * @param {import("../../extent.js").Extent} [hitExtent] Only check
     *     features that intersect this extent.
     * @return {T|undefined} Callback result.
     * @template T
     */
    executeHitDetection(e, t, i, a, o) {
      return this.viewRotation_ = i, this.execute_(
        e,
        1,
        t,
        this.hitDetectionInstructions,
        !0,
        a,
        o
      );
    }
  }
  const Zte = Kte, DO = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"];
  class Qte {
    /**
     * @param {import("../../extent.js").Extent} maxExtent Max extent for clipping. When a
     * `maxExtent` was set on the Builder for this executor group, the same `maxExtent`
     * should be set here, unless the target context does not exceed that extent (which
     * can be the case when rendering to tiles).
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {boolean} overlaps The executor group can have overlapping geometries.
     * @param {!Object<string, !Object<import("../canvas.js").BuilderType, import("../canvas.js").SerializableInstructions>>} allInstructions
     * The serializable instructions.
     * @param {number} [renderBuffer] Optional rendering buffer.
     */
    constructor(e, t, i, a, o, u) {
      this.maxExtent_ = e, this.overlaps_ = a, this.pixelRatio_ = i, this.resolution_ = t, this.renderBuffer_ = u, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = Tf(), this.createExecutors_(o);
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {import("../../transform.js").Transform} transform Transform.
     */
    clip(e, t) {
      const i = this.getClipCoords(t);
      e.beginPath(), e.moveTo(i[0], i[1]), e.lineTo(i[2], i[3]), e.lineTo(i[4], i[5]), e.lineTo(i[6], i[7]), e.clip();
    }
    /**
     * Create executors and populate them using the provided instructions.
     * @private
     * @param {!Object<string, !Object<import("../canvas.js").BuilderType, import("../canvas.js").SerializableInstructions>>} allInstructions The serializable instructions
     */
    createExecutors_(e) {
      for (const t in e) {
        let i = this.executorsByZIndex_[t];
        i === void 0 && (i = {}, this.executorsByZIndex_[t] = i);
        const a = e[t];
        for (const o in a) {
          const u = a[o];
          i[o] = new Zte(
            this.resolution_,
            this.pixelRatio_,
            this.overlaps_,
            u
          );
        }
      }
    }
    /**
     * @param {Array<import("../canvas.js").BuilderType>} executors Executors.
     * @return {boolean} Has executors of the provided types.
     */
    hasExecutors(e) {
      for (const t in this.executorsByZIndex_) {
        const i = this.executorsByZIndex_[t];
        for (let a = 0, o = e.length; a < o; ++a)
          if (e[a] in i)
            return !0;
      }
      return !1;
    }
    /**
     * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {number} resolution Resolution.
     * @param {number} rotation Rotation.
     * @param {number} hitTolerance Hit tolerance in pixels.
     * @param {function(import("../../Feature.js").FeatureLike, import("../../geom/SimpleGeometry.js").default, number): T} callback Feature callback.
     * @param {Array<import("../../Feature.js").FeatureLike>} declutteredFeatures Decluttered features.
     * @return {T|undefined} Callback result.
     * @template T
     */
    forEachFeatureAtCoordinate(e, t, i, a, o, u) {
      a = Math.round(a);
      const c = a * 2 + 1, p = Rf(
        this.hitDetectionTransform_,
        a + 0.5,
        a + 0.5,
        1 / t,
        -1 / t,
        -i,
        -e[0],
        -e[1]
      ), y = !this.hitDetectionContext_;
      y && (this.hitDetectionContext_ = tl(
        c,
        c,
        void 0,
        { willReadFrequently: !0 }
      ));
      const _ = this.hitDetectionContext_;
      _.canvas.width !== c || _.canvas.height !== c ? (_.canvas.width = c, _.canvas.height = c) : y || _.clearRect(0, 0, c, c);
      let S;
      this.renderBuffer_ !== void 0 && (S = Su(), vE(S, e), TE(
        S,
        t * (this.renderBuffer_ + a),
        S
      ));
      const b = Jte(a);
      let T;
      function O(z, G) {
        const ie = _.getImageData(
          0,
          0,
          c,
          c
        ).data;
        for (let ue = 0, Re = b.length; ue < Re; ue++)
          if (ie[b[ue]] > 0) {
            if (!u || T !== "Image" && T !== "Text" || u.includes(z)) {
              const Oe = (b[ue] - 3) / 4, $e = a - Oe % c, Ee = a - (Oe / c | 0), Fe = o(z, G, $e * $e + Ee * Ee);
              if (Fe)
                return Fe;
            }
            _.clearRect(0, 0, c, c);
            break;
          }
      }
      const N = Object.keys(this.executorsByZIndex_).map(Number);
      N.sort(sm);
      let D, k, $, B, V;
      for (D = N.length - 1; D >= 0; --D) {
        const z = N[D].toString();
        for ($ = this.executorsByZIndex_[z], k = DO.length - 1; k >= 0; --k)
          if (T = DO[k], B = $[T], B !== void 0 && (V = B.executeHitDetection(
            _,
            p,
            i,
            O,
            S
          ), V))
            return V;
      }
    }
    /**
     * @param {import("../../transform.js").Transform} transform Transform.
     * @return {Array<number>|null} Clip coordinates.
     */
    getClipCoords(e) {
      const t = this.maxExtent_;
      if (!t)
        return null;
      const i = t[0], a = t[1], o = t[2], u = t[3], c = [i, a, i, u, o, u, o, a];
      return Qg(c, 0, 8, 2, e, c), c;
    }
    /**
     * @return {boolean} Is empty.
     */
    isEmpty() {
      return q0(this.executorsByZIndex_);
    }
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {number} contextScale Scale of the context.
     * @param {import("../../transform.js").Transform} transform Transform.
     * @param {number} viewRotation View rotation.
     * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
     * @param {Array<import("../canvas.js").BuilderType>} [builderTypes] Ordered replay types to replay.
     *     Default is {@link module:ol/render/replay~ORDER}
     * @param {import("rbush").default} [declutterTree] Declutter tree.
     */
    execute(e, t, i, a, o, u, c) {
      const p = Object.keys(this.executorsByZIndex_).map(Number);
      p.sort(sm), this.maxExtent_ && (e.save(), this.clip(e, i)), u = u || DO;
      let y, _, S, b, T, O;
      for (c && p.reverse(), y = 0, _ = p.length; y < _; ++y) {
        const N = p[y].toString();
        for (T = this.executorsByZIndex_[N], S = 0, b = u.length; S < b; ++S) {
          const D = u[S];
          O = T[D], O !== void 0 && O.execute(
            e,
            t,
            i,
            a,
            o,
            c
          );
        }
      }
      this.maxExtent_ && e.restore();
    }
  }
  const IO = {};
  function Jte(n) {
    if (IO[n] !== void 0)
      return IO[n];
    const e = n * 2 + 1, t = n * n, i = new Array(t + 1);
    for (let o = 0; o <= n; ++o)
      for (let u = 0; u <= n; ++u) {
        const c = o * o + u * u;
        if (c > t)
          break;
        let p = i[c];
        p || (p = [], i[c] = p), p.push(((n + o) * e + (n + u)) * 4 + 3), o > 0 && p.push(((n - o) * e + (n + u)) * 4 + 3), u > 0 && (p.push(((n + o) * e + (n - u)) * 4 + 3), o > 0 && p.push(((n - o) * e + (n - u)) * 4 + 3));
      }
    const a = [];
    for (let o = 0, u = i.length; o < u; ++o)
      i[o] && a.push(...i[o]);
    return IO[n] = a, a;
  }
  const p2 = Qte;
  class ene extends dU {
    /**
     * @param {CanvasRenderingContext2D} context Context.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../../extent.js").Extent} extent Extent.
     * @param {import("../../transform.js").Transform} transform Transform.
     * @param {number} viewRotation View rotation.
     * @param {number} [squaredTolerance] Optional squared tolerance for simplification.
     * @param {import("../../proj.js").TransformFunction} [userTransform] Transform from user to view projection.
     */
    constructor(e, t, i, a, o, u, c) {
      super(), this.context_ = e, this.pixelRatio_ = t, this.extent_ = i, this.transform_ = a, this.transformRotation_ = a ? Lw(Math.atan2(a[1], a[0]), 10) : 0, this.viewRotation_ = o, this.squaredTolerance_ = u, this.userTransform_ = c, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = Tf();
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {number} end End.
     * @param {number} stride Stride.
     * @private
     */
    drawImages_(e, t, i, a) {
      if (!this.image_)
        return;
      const o = Qg(
        e,
        t,
        i,
        a,
        this.transform_,
        this.pixelCoordinates_
      ), u = this.context_, c = this.tmpLocalTransform_, p = u.globalAlpha;
      this.imageOpacity_ != 1 && (u.globalAlpha = p * this.imageOpacity_);
      let y = this.imageRotation_;
      this.transformRotation_ === 0 && (y -= this.viewRotation_), this.imageRotateWithView_ && (y += this.viewRotation_);
      for (let _ = 0, S = o.length; _ < S; _ += 2) {
        const b = o[_] - this.imageAnchorX_, T = o[_ + 1] - this.imageAnchorY_;
        if (y !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) {
          const O = b + this.imageAnchorX_, N = T + this.imageAnchorY_;
          Rf(
            c,
            O,
            N,
            1,
            1,
            y,
            -O,
            -N
          ), u.save(), u.transform.apply(u, c), u.translate(O, N), u.scale(this.imageScale_[0], this.imageScale_[1]), u.drawImage(
            this.image_,
            this.imageOriginX_,
            this.imageOriginY_,
            this.imageWidth_,
            this.imageHeight_,
            -this.imageAnchorX_,
            -this.imageAnchorY_,
            this.imageWidth_,
            this.imageHeight_
          ), u.restore();
        } else
          u.drawImage(
            this.image_,
            this.imageOriginX_,
            this.imageOriginY_,
            this.imageWidth_,
            this.imageHeight_,
            b,
            T,
            this.imageWidth_,
            this.imageHeight_
          );
      }
      this.imageOpacity_ != 1 && (u.globalAlpha = p);
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {number} end End.
     * @param {number} stride Stride.
     * @private
     */
    drawText_(e, t, i, a) {
      if (!this.textState_ || this.text_ === "")
        return;
      this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_);
      const o = Qg(
        e,
        t,
        i,
        a,
        this.transform_,
        this.pixelCoordinates_
      ), u = this.context_;
      let c = this.textRotation_;
      for (this.transformRotation_ === 0 && (c -= this.viewRotation_), this.textRotateWithView_ && (c += this.viewRotation_); t < i; t += a) {
        const p = o[t] + this.textOffsetX_, y = o[t + 1] + this.textOffsetY_;
        c !== 0 || this.textScale_[0] != 1 || this.textScale_[1] != 1 ? (u.save(), u.translate(p - this.textOffsetX_, y - this.textOffsetY_), u.rotate(c), u.translate(this.textOffsetX_, this.textOffsetY_), u.scale(this.textScale_[0], this.textScale_[1]), this.textStrokeState_ && u.strokeText(this.text_, 0, 0), this.textFillState_ && u.fillText(this.text_, 0, 0), u.restore()) : (this.textStrokeState_ && u.strokeText(this.text_, p, y), this.textFillState_ && u.fillText(this.text_, p, y));
      }
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {number} end End.
     * @param {number} stride Stride.
     * @param {boolean} close Close.
     * @private
     * @return {number} end End.
     */
    moveToLineTo_(e, t, i, a, o) {
      const u = this.context_, c = Qg(
        e,
        t,
        i,
        a,
        this.transform_,
        this.pixelCoordinates_
      );
      u.moveTo(c[0], c[1]);
      let p = c.length;
      o && (p -= 2);
      for (let y = 2; y < p; y += 2)
        u.lineTo(c[y], c[y + 1]);
      return o && u.closePath(), i;
    }
    /**
     * @param {Array<number>} flatCoordinates Flat coordinates.
     * @param {number} offset Offset.
     * @param {Array<number>} ends Ends.
     * @param {number} stride Stride.
     * @private
     * @return {number} End.
     */
    drawRings_(e, t, i, a) {
      for (let o = 0, u = i.length; o < u; ++o)
        t = this.moveToLineTo_(
          e,
          t,
          i[o],
          a,
          !0
        );
      return t;
    }
    /**
     * Render a circle geometry into the canvas.  Rendering is immediate and uses
     * the current fill and stroke styles.
     *
     * @param {import("../../geom/Circle.js").default} geometry Circle geometry.
     * @api
     */
    drawCircle(e) {
      if (this.squaredTolerance_ && (e = /** @type {import("../../geom/Circle.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      )), !!Zo(this.extent_, e.getExtent())) {
        if (this.fillState_ || this.strokeState_) {
          this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
          const t = PJ(
            e,
            this.transform_,
            this.pixelCoordinates_
          ), i = t[2] - t[0], a = t[3] - t[1], o = Math.sqrt(i * i + a * a), u = this.context_;
          u.beginPath(), u.arc(
            t[0],
            t[1],
            o,
            0,
            2 * Math.PI
          ), this.fillState_ && u.fill(), this.strokeState_ && u.stroke();
        }
        this.text_ !== "" && this.drawText_(e.getCenter(), 0, 2, 2);
      }
    }
    /**
     * Set the rendering style.  Note that since this is an immediate rendering API,
     * any `zIndex` on the provided style will be ignored.
     *
     * @param {import("../../style/Style.js").default} style The rendering style.
     * @api
     */
    setStyle(e) {
      this.setFillStrokeStyle(e.getFill(), e.getStroke()), this.setImageStyle(e.getImage()), this.setTextStyle(e.getText());
    }
    /**
     * @param {import("../../transform.js").Transform} transform Transform.
     */
    setTransform(e) {
      this.transform_ = e;
    }
    /**
     * Render a geometry into the canvas.  Call
     * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.
     *
     * @param {import("../../geom/Geometry.js").default|import("../Feature.js").default} geometry The geometry to render.
     * @api
     */
    drawGeometry(e) {
      switch (e.getType()) {
        case "Point":
          this.drawPoint(
            /** @type {import("../../geom/Point.js").default} */
            e
          );
          break;
        case "LineString":
          this.drawLineString(
            /** @type {import("../../geom/LineString.js").default} */
            e
          );
          break;
        case "Polygon":
          this.drawPolygon(
            /** @type {import("../../geom/Polygon.js").default} */
            e
          );
          break;
        case "MultiPoint":
          this.drawMultiPoint(
            /** @type {import("../../geom/MultiPoint.js").default} */
            e
          );
          break;
        case "MultiLineString":
          this.drawMultiLineString(
            /** @type {import("../../geom/MultiLineString.js").default} */
            e
          );
          break;
        case "MultiPolygon":
          this.drawMultiPolygon(
            /** @type {import("../../geom/MultiPolygon.js").default} */
            e
          );
          break;
        case "GeometryCollection":
          this.drawGeometryCollection(
            /** @type {import("../../geom/GeometryCollection.js").default} */
            e
          );
          break;
        case "Circle":
          this.drawCircle(
            /** @type {import("../../geom/Circle.js").default} */
            e
          );
          break;
      }
    }
    /**
     * Render a feature into the canvas.  Note that any `zIndex` on the provided
     * style will be ignored - features are rendered immediately in the order that
     * this method is called.  If you need `zIndex` support, you should be using an
     * {@link module:ol/layer/Vector~VectorLayer} instead.
     *
     * @param {import("../../Feature.js").default} feature Feature.
     * @param {import("../../style/Style.js").default} style Style.
     * @api
     */
    drawFeature(e, t) {
      const i = t.getGeometryFunction()(e);
      i && (this.setStyle(t), this.drawGeometry(i));
    }
    /**
     * Render a GeometryCollection to the canvas.  Rendering is immediate and
     * uses the current styles appropriate for each geometry in the collection.
     *
     * @param {import("../../geom/GeometryCollection.js").default} geometry Geometry collection.
     */
    drawGeometryCollection(e) {
      const t = e.getGeometriesArray();
      for (let i = 0, a = t.length; i < a; ++i)
        this.drawGeometry(t[i]);
    }
    /**
     * Render a Point geometry into the canvas.  Rendering is immediate and uses
     * the current style.
     *
     * @param {import("../../geom/Point.js").default|import("../Feature.js").default} geometry Point geometry.
     */
    drawPoint(e) {
      this.squaredTolerance_ && (e = /** @type {import("../../geom/Point.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      ));
      const t = e.getFlatCoordinates(), i = e.getStride();
      this.image_ && this.drawImages_(t, 0, t.length, i), this.text_ !== "" && this.drawText_(t, 0, t.length, i);
    }
    /**
     * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and
     * uses the current style.
     *
     * @param {import("../../geom/MultiPoint.js").default|import("../Feature.js").default} geometry MultiPoint geometry.
     */
    drawMultiPoint(e) {
      this.squaredTolerance_ && (e = /** @type {import("../../geom/MultiPoint.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      ));
      const t = e.getFlatCoordinates(), i = e.getStride();
      this.image_ && this.drawImages_(t, 0, t.length, i), this.text_ !== "" && this.drawText_(t, 0, t.length, i);
    }
    /**
     * Render a LineString into the canvas.  Rendering is immediate and uses
     * the current style.
     *
     * @param {import("../../geom/LineString.js").default|import("../Feature.js").default} geometry LineString geometry.
     */
    drawLineString(e) {
      if (this.squaredTolerance_ && (e = /** @type {import("../../geom/LineString.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      )), !!Zo(this.extent_, e.getExtent())) {
        if (this.strokeState_) {
          this.setContextStrokeState_(this.strokeState_);
          const t = this.context_, i = e.getFlatCoordinates();
          t.beginPath(), this.moveToLineTo_(
            i,
            0,
            i.length,
            e.getStride(),
            !1
          ), t.stroke();
        }
        if (this.text_ !== "") {
          const t = e.getFlatMidpoint();
          this.drawText_(t, 0, 2, 2);
        }
      }
    }
    /**
     * Render a MultiLineString geometry into the canvas.  Rendering is immediate
     * and uses the current style.
     *
     * @param {import("../../geom/MultiLineString.js").default|import("../Feature.js").default} geometry MultiLineString geometry.
     */
    drawMultiLineString(e) {
      this.squaredTolerance_ && (e = /** @type {import("../../geom/MultiLineString.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      ));
      const t = e.getExtent();
      if (Zo(this.extent_, t)) {
        if (this.strokeState_) {
          this.setContextStrokeState_(this.strokeState_);
          const i = this.context_, a = e.getFlatCoordinates();
          let o = 0;
          const u = (
            /** @type {Array<number>} */
            e.getEnds()
          ), c = e.getStride();
          i.beginPath();
          for (let p = 0, y = u.length; p < y; ++p)
            o = this.moveToLineTo_(
              a,
              o,
              u[p],
              c,
              !1
            );
          i.stroke();
        }
        if (this.text_ !== "") {
          const i = e.getFlatMidpoints();
          this.drawText_(i, 0, i.length, 2);
        }
      }
    }
    /**
     * Render a Polygon geometry into the canvas.  Rendering is immediate and uses
     * the current style.
     *
     * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} geometry Polygon geometry.
     */
    drawPolygon(e) {
      if (this.squaredTolerance_ && (e = /** @type {import("../../geom/Polygon.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      )), !!Zo(this.extent_, e.getExtent())) {
        if (this.strokeState_ || this.fillState_) {
          this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
          const t = this.context_;
          t.beginPath(), this.drawRings_(
            e.getOrientedFlatCoordinates(),
            0,
            /** @type {Array<number>} */
            e.getEnds(),
            e.getStride()
          ), this.fillState_ && t.fill(), this.strokeState_ && t.stroke();
        }
        if (this.text_ !== "") {
          const t = e.getFlatInteriorPoint();
          this.drawText_(t, 0, 2, 2);
        }
      }
    }
    /**
     * Render MultiPolygon geometry into the canvas.  Rendering is immediate and
     * uses the current style.
     * @param {import("../../geom/MultiPolygon.js").default} geometry MultiPolygon geometry.
     */
    drawMultiPolygon(e) {
      if (this.squaredTolerance_ && (e = /** @type {import("../../geom/MultiPolygon.js").default} */
      e.simplifyTransformed(
        this.squaredTolerance_,
        this.userTransform_
      )), !!Zo(this.extent_, e.getExtent())) {
        if (this.strokeState_ || this.fillState_) {
          this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_);
          const t = this.context_, i = e.getOrientedFlatCoordinates();
          let a = 0;
          const o = e.getEndss(), u = e.getStride();
          t.beginPath();
          for (let c = 0, p = o.length; c < p; ++c) {
            const y = o[c];
            a = this.drawRings_(i, a, y, u);
          }
          this.fillState_ && t.fill(), this.strokeState_ && t.stroke();
        }
        if (this.text_ !== "") {
          const t = e.getFlatInteriorPoints();
          this.drawText_(t, 0, t.length, 2);
        }
      }
    }
    /**
     * @param {import("../canvas.js").FillState} fillState Fill state.
     * @private
     */
    setContextFillState_(e) {
      const t = this.context_, i = this.contextFillState_;
      i ? i.fillStyle != e.fillStyle && (i.fillStyle = e.fillStyle, t.fillStyle = e.fillStyle) : (t.fillStyle = e.fillStyle, this.contextFillState_ = {
        fillStyle: e.fillStyle
      });
    }
    /**
     * @param {import("../canvas.js").StrokeState} strokeState Stroke state.
     * @private
     */
    setContextStrokeState_(e) {
      const t = this.context_, i = this.contextStrokeState_;
      i ? (i.lineCap != e.lineCap && (i.lineCap = e.lineCap, t.lineCap = e.lineCap), hm(i.lineDash, e.lineDash) || t.setLineDash(
        i.lineDash = e.lineDash
      ), i.lineDashOffset != e.lineDashOffset && (i.lineDashOffset = e.lineDashOffset, t.lineDashOffset = e.lineDashOffset), i.lineJoin != e.lineJoin && (i.lineJoin = e.lineJoin, t.lineJoin = e.lineJoin), i.lineWidth != e.lineWidth && (i.lineWidth = e.lineWidth, t.lineWidth = e.lineWidth), i.miterLimit != e.miterLimit && (i.miterLimit = e.miterLimit, t.miterLimit = e.miterLimit), i.strokeStyle != e.strokeStyle && (i.strokeStyle = e.strokeStyle, t.strokeStyle = e.strokeStyle)) : (t.lineCap = e.lineCap, t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset, t.lineJoin = e.lineJoin, t.lineWidth = e.lineWidth, t.miterLimit = e.miterLimit, t.strokeStyle = e.strokeStyle, this.contextStrokeState_ = {
        lineCap: e.lineCap,
        lineDash: e.lineDash,
        lineDashOffset: e.lineDashOffset,
        lineJoin: e.lineJoin,
        lineWidth: e.lineWidth,
        miterLimit: e.miterLimit,
        strokeStyle: e.strokeStyle
      });
    }
    /**
     * @param {import("../canvas.js").TextState} textState Text state.
     * @private
     */
    setContextTextState_(e) {
      const t = this.context_, i = this.contextTextState_, a = e.textAlign ? e.textAlign : $E;
      i ? (i.font != e.font && (i.font = e.font, t.font = e.font), i.textAlign != a && (i.textAlign = a, t.textAlign = a), i.textBaseline != e.textBaseline && (i.textBaseline = e.textBaseline, t.textBaseline = e.textBaseline)) : (t.font = e.font, t.textAlign = a, t.textBaseline = e.textBaseline, this.contextTextState_ = {
        font: e.font,
        textAlign: a,
        textBaseline: e.textBaseline
      });
    }
    /**
     * Set the fill and stroke style for subsequent draw operations.  To clear
     * either fill or stroke styles, pass null for the appropriate parameter.
     *
     * @param {import("../../style/Fill.js").default} fillStyle Fill style.
     * @param {import("../../style/Stroke.js").default} strokeStyle Stroke style.
     */
    setFillStrokeStyle(e, t) {
      if (!e)
        this.fillState_ = null;
      else {
        const i = e.getColor();
        this.fillState_ = {
          fillStyle: zh(
            i || Ll
          )
        };
      }
      if (!t)
        this.strokeState_ = null;
      else {
        const i = t.getColor(), a = t.getLineCap(), o = t.getLineDash(), u = t.getLineDashOffset(), c = t.getLineJoin(), p = t.getWidth(), y = t.getMiterLimit(), _ = o || xp;
        this.strokeState_ = {
          lineCap: a !== void 0 ? a : u_,
          lineDash: this.pixelRatio_ === 1 ? _ : _.map((S) => S * this.pixelRatio_),
          lineDashOffset: (u || bp) * this.pixelRatio_,
          lineJoin: c !== void 0 ? c : c_,
          lineWidth: (p !== void 0 ? p : BE) * this.pixelRatio_,
          miterLimit: y !== void 0 ? y : UE,
          strokeStyle: zh(
            i || zE
          )
        };
      }
    }
    /**
     * Set the image style for subsequent draw operations.  Pass null to remove
     * the image style.
     *
     * @param {import("../../style/Image.js").default} imageStyle Image style.
     */
    setImageStyle(e) {
      let t;
      if (!e || !(t = e.getSize())) {
        this.image_ = null;
        return;
      }
      const i = e.getPixelRatio(this.pixelRatio_), a = e.getAnchor(), o = e.getOrigin();
      this.image_ = e.getImage(this.pixelRatio_), this.imageAnchorX_ = a[0] * i, this.imageAnchorY_ = a[1] * i, this.imageHeight_ = t[1] * i, this.imageOpacity_ = e.getOpacity(), this.imageOriginX_ = o[0], this.imageOriginY_ = o[1], this.imageRotateWithView_ = e.getRotateWithView(), this.imageRotation_ = e.getRotation();
      const u = e.getScaleArray();
      this.imageScale_ = [
        u[0] * this.pixelRatio_ / i,
        u[1] * this.pixelRatio_ / i
      ], this.imageWidth_ = t[0] * i;
    }
    /**
     * Set the text style for subsequent draw operations.  Pass null to
     * remove the text style.
     *
     * @param {import("../../style/Text.js").default} textStyle Text style.
     */
    setTextStyle(e) {
      if (!e)
        this.text_ = "";
      else {
        const t = e.getFill();
        if (!t)
          this.textFillState_ = null;
        else {
          const T = t.getColor();
          this.textFillState_ = {
            fillStyle: zh(
              T || Ll
            )
          };
        }
        const i = e.getStroke();
        if (!i)
          this.textStrokeState_ = null;
        else {
          const T = i.getColor(), O = i.getLineCap(), N = i.getLineDash(), D = i.getLineDashOffset(), k = i.getLineJoin(), $ = i.getWidth(), B = i.getMiterLimit();
          this.textStrokeState_ = {
            lineCap: O !== void 0 ? O : u_,
            lineDash: N || xp,
            lineDashOffset: D || bp,
            lineJoin: k !== void 0 ? k : c_,
            lineWidth: $ !== void 0 ? $ : BE,
            miterLimit: B !== void 0 ? B : UE,
            strokeStyle: zh(
              T || zE
            )
          };
        }
        const a = e.getFont(), o = e.getOffsetX(), u = e.getOffsetY(), c = e.getRotateWithView(), p = e.getRotation(), y = e.getScaleArray(), _ = e.getText(), S = e.getTextAlign(), b = e.getTextBaseline();
        this.textState_ = {
          font: a !== void 0 ? a : qj,
          textAlign: S !== void 0 ? S : $E,
          textBaseline: b !== void 0 ? b : mw
        }, this.text_ = _ !== void 0 ? Array.isArray(_) ? _.reduce((T, O, N) => T += N % 2 ? " " : O, "") : _ : "", this.textOffsetX_ = o !== void 0 ? this.pixelRatio_ * o : 0, this.textOffsetY_ = u !== void 0 ? this.pixelRatio_ * u : 0, this.textRotateWithView_ = c !== void 0 ? c : !1, this.textRotation_ = p !== void 0 ? p : 0, this.textScale_ = [
          this.pixelRatio_ * y[0],
          this.pixelRatio_ * y[1]
        ];
      }
    }
  }
  const tne = ene, Fh = 0.5;
  function nne(n, e, t, i, a, o, u) {
    const c = n[0] * Fh, p = n[1] * Fh, y = tl(c, p);
    y.imageSmoothingEnabled = !1;
    const _ = y.canvas, S = new tne(
      y,
      Fh,
      a,
      null,
      u
    ), b = t.length, T = Math.floor((256 * 256 * 256 - 1) / b), O = {};
    for (let D = 1; D <= b; ++D) {
      const k = t[D - 1], $ = k.getStyleFunction() || i;
      if (!$)
        continue;
      let B = $(k, o);
      if (!B)
        continue;
      Array.isArray(B) || (B = [B]);
      const z = (D * T).toString(16).padStart(7, "#00000");
      for (let G = 0, ie = B.length; G < ie; ++G) {
        const ue = B[G], Re = ue.getGeometryFunction()(k);
        if (!Re || !Zo(a, Re.getExtent()))
          continue;
        const Oe = ue.clone(), $e = Oe.getFill();
        $e && $e.setColor(z);
        const Ee = Oe.getStroke();
        Ee && (Ee.setColor(z), Ee.setLineDash(null)), Oe.setText(void 0);
        const Fe = ue.getImage();
        if (Fe) {
          const le = Fe.getImageSize();
          if (!le)
            continue;
          const se = tl(
            le[0],
            le[1],
            void 0,
            { alpha: !1 }
          ), Ae = se.canvas;
          se.fillStyle = z, se.fillRect(0, 0, Ae.width, Ae.height), Oe.setImage(
            new rU({
              img: Ae,
              anchor: Fe.getAnchor(),
              anchorXUnits: "pixels",
              anchorYUnits: "pixels",
              offset: Fe.getOrigin(),
              opacity: 1,
              size: Fe.getSize(),
              scale: Fe.getScale(),
              rotation: Fe.getRotation(),
              rotateWithView: Fe.getRotateWithView()
            })
          );
        }
        const Ne = Oe.getZIndex() || 0;
        let Q = O[Ne];
        Q || (Q = {}, O[Ne] = Q, Q.Polygon = [], Q.Circle = [], Q.LineString = [], Q.Point = []);
        const ae = Re.getType();
        if (ae === "GeometryCollection") {
          const le = (
            /** @type {import("../../geom/GeometryCollection.js").default} */
            Re.getGeometriesArrayRecursive()
          );
          for (let se = 0, Ae = le.length; se < Ae; ++se) {
            const q = le[se];
            Q[q.getType().replace("Multi", "")].push(
              q,
              Oe
            );
          }
        } else
          Q[ae.replace("Multi", "")].push(Re, Oe);
      }
    }
    const N = Object.keys(O).map(Number).sort(sm);
    for (let D = 0, k = N.length; D < k; ++D) {
      const $ = O[N[D]];
      for (const B in $) {
        const V = $[B];
        for (let z = 0, G = V.length; z < G; z += 2) {
          S.setStyle(V[z + 1]);
          for (let ie = 0, ue = e.length; ie < ue; ++ie)
            S.setTransform(e[ie]), S.drawGeometry(V[z]);
        }
      }
    }
    return y.getImageData(0, 0, _.width, _.height);
  }
  function ine(n, e, t) {
    const i = [];
    if (t) {
      const a = Math.floor(Math.round(n[0]) * Fh), o = Math.floor(Math.round(n[1]) * Fh), u = (da(a, 0, t.width - 1) + da(o, 0, t.height - 1) * t.width) * 4, c = t.data[u], p = t.data[u + 1], _ = t.data[u + 2] + 256 * (p + 256 * c), S = Math.floor((256 * 256 * 256 - 1) / e.length);
      _ && _ % S === 0 && i.push(e[_ / S - 1]);
    }
    return i;
  }
  const rne = 0.5, gU = {
    Point: dne,
    LineString: cne,
    Polygon: gne,
    MultiPoint: pne,
    MultiLineString: fne,
    MultiPolygon: hne,
    GeometryCollection: une,
    Circle: one
  };
  function ane(n, e) {
    return parseInt(Pi(n), 10) - parseInt(Pi(e), 10);
  }
  function sne(n, e) {
    const t = DA(n, e);
    return t * t;
  }
  function DA(n, e) {
    return rne * n / e;
  }
  function one(n, e, t, i, a) {
    const o = t.getFill(), u = t.getStroke();
    if (o || u) {
      const p = n.getBuilder(t.getZIndex(), "Circle");
      p.setFillStrokeStyle(o, u), p.drawCircle(e, i);
    }
    const c = t.getText();
    if (c && c.getText()) {
      const p = (a || n).getBuilder(
        t.getZIndex(),
        "Text"
      );
      p.setTextStyle(c), p.drawText(e, i);
    }
  }
  function g2(n, e, t, i, a, o, u) {
    let c = !1;
    const p = t.getImage();
    if (p) {
      const y = p.getImageState();
      y == _n.LOADED || y == _n.ERROR ? p.unlistenImageChange(a) : (y == _n.IDLE && p.load(), p.listenImageChange(a), c = !0);
    }
    return lne(
      n,
      e,
      t,
      i,
      o,
      u
    ), c;
  }
  function lne(n, e, t, i, a, o) {
    const u = t.getGeometryFunction()(e);
    if (!u)
      return;
    const c = u.simplifyTransformed(
      i,
      a
    );
    if (t.getRenderer())
      mU(n, c, t, e);
    else {
      const y = gU[c.getType()];
      y(
        n,
        c,
        t,
        e,
        o
      );
    }
  }
  function mU(n, e, t, i) {
    if (e.getType() == "GeometryCollection") {
      const o = (
        /** @type {import("../geom/GeometryCollection.js").default} */
        e.getGeometries()
      );
      for (let u = 0, c = o.length; u < c; ++u)
        mU(n, o[u], t, i);
      return;
    }
    n.getBuilder(t.getZIndex(), "Default").drawCustom(
      /** @type {import("../geom/SimpleGeometry.js").default} */
      e,
      i,
      t.getRenderer(),
      t.getHitDetectionRenderer()
    );
  }
  function une(n, e, t, i, a) {
    const o = e.getGeometriesArray();
    let u, c;
    for (u = 0, c = o.length; u < c; ++u) {
      const p = gU[o[u].getType()];
      p(
        n,
        o[u],
        t,
        i,
        a
      );
    }
  }
  function cne(n, e, t, i, a) {
    const o = t.getStroke();
    if (o) {
      const c = n.getBuilder(
        t.getZIndex(),
        "LineString"
      );
      c.setFillStrokeStyle(null, o), c.drawLineString(e, i);
    }
    const u = t.getText();
    if (u && u.getText()) {
      const c = (a || n).getBuilder(
        t.getZIndex(),
        "Text"
      );
      c.setTextStyle(u), c.drawText(e, i);
    }
  }
  function fne(n, e, t, i, a) {
    const o = t.getStroke();
    if (o) {
      const c = n.getBuilder(
        t.getZIndex(),
        "LineString"
      );
      c.setFillStrokeStyle(null, o), c.drawMultiLineString(e, i);
    }
    const u = t.getText();
    if (u && u.getText()) {
      const c = (a || n).getBuilder(
        t.getZIndex(),
        "Text"
      );
      c.setTextStyle(u), c.drawText(e, i);
    }
  }
  function hne(n, e, t, i, a) {
    const o = t.getFill(), u = t.getStroke();
    if (u || o) {
      const p = n.getBuilder(t.getZIndex(), "Polygon");
      p.setFillStrokeStyle(o, u), p.drawMultiPolygon(e, i);
    }
    const c = t.getText();
    if (c && c.getText()) {
      const p = (a || n).getBuilder(
        t.getZIndex(),
        "Text"
      );
      p.setTextStyle(c), p.drawText(e, i);
    }
  }
  function dne(n, e, t, i, a) {
    const o = t.getImage(), u = t.getText();
    let c;
    if (o) {
      if (o.getImageState() != _n.LOADED)
        return;
      let p = n;
      if (a) {
        const _ = o.getDeclutterMode();
        if (_ !== "none")
          if (p = a, _ === "obstacle") {
            const S = n.getBuilder(
              t.getZIndex(),
              "Image"
            );
            S.setImageStyle(o, c), S.drawPoint(e, i);
          } else
            u && u.getText() && (c = {});
      }
      const y = p.getBuilder(
        t.getZIndex(),
        "Image"
      );
      y.setImageStyle(o, c), y.drawPoint(e, i);
    }
    if (u && u.getText()) {
      let p = n;
      a && (p = a);
      const y = p.getBuilder(t.getZIndex(), "Text");
      y.setTextStyle(u, c), y.drawText(e, i);
    }
  }
  function pne(n, e, t, i, a) {
    const o = t.getImage(), u = t.getText();
    let c;
    if (o) {
      if (o.getImageState() != _n.LOADED)
        return;
      let p = n;
      if (a) {
        const _ = o.getDeclutterMode();
        if (_ !== "none")
          if (p = a, _ === "obstacle") {
            const S = n.getBuilder(
              t.getZIndex(),
              "Image"
            );
            S.setImageStyle(o, c), S.drawMultiPoint(e, i);
          } else
            u && u.getText() && (c = {});
      }
      const y = p.getBuilder(
        t.getZIndex(),
        "Image"
      );
      y.setImageStyle(o, c), y.drawMultiPoint(e, i);
    }
    if (u && u.getText()) {
      let p = n;
      a && (p = a);
      const y = p.getBuilder(t.getZIndex(), "Text");
      y.setTextStyle(u, c), y.drawText(e, i);
    }
  }
  function gne(n, e, t, i, a) {
    const o = t.getFill(), u = t.getStroke();
    if (o || u) {
      const p = n.getBuilder(t.getZIndex(), "Polygon");
      p.setFillStrokeStyle(o, u), p.drawPolygon(e, i);
    }
    const c = t.getText();
    if (c && c.getText()) {
      const p = (a || n).getBuilder(
        t.getZIndex(),
        "Text"
      );
      p.setTextStyle(c), p.drawText(e, i);
    }
  }
  class mne extends aN {
    /**
     * @param {import("../../layer/BaseVector.js").default} vectorLayer Vector layer.
     */
    constructor(e) {
      super(e), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = Su(), this.wrappedRenderedExtent_ = Su(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1;
    }
    /**
     * @param {ExecutorGroup} executorGroup Executor group.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {import("rbush").default} [declutterTree] Declutter tree.
     */
    renderWorlds(e, t, i) {
      const a = t.extent, o = t.viewState, u = o.center, c = o.resolution, p = o.projection, y = o.rotation, _ = p.getExtent(), S = this.getLayer().getSource(), b = t.pixelRatio, T = t.viewHints, O = !(T[ws.ANIMATING] || T[ws.INTERACTING]), N = this.compositionContext_, D = Math.round(t.size[0] * b), k = Math.round(t.size[1] * b), $ = S.getWrapX() && p.canWrapX(), B = $ ? _i(_) : null, V = $ ? Math.ceil((a[2] - _[2]) / B) + 1 : 1;
      let z = $ ? Math.floor((a[0] - _[0]) / B) : 0;
      do {
        const G = this.getRenderTransform(
          u,
          c,
          y,
          b,
          D,
          k,
          z * B
        );
        e.execute(
          N,
          1,
          G,
          y,
          O,
          void 0,
          i
        );
      } while (++z < V);
    }
    setupCompositionContext_() {
      if (this.opacity_ !== 1) {
        const e = tl(
          this.context.canvas.width,
          this.context.canvas.height,
          f2
        );
        this.compositionContext_ = e;
      } else
        this.compositionContext_ = this.context;
    }
    releaseCompositionContext_() {
      if (this.opacity_ !== 1) {
        const e = this.context.globalAlpha;
        this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = e, Kw(this.compositionContext_), f2.push(this.compositionContext_.canvas), this.compositionContext_ = null;
      }
    }
    /**
     * Render declutter items for this layer
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     */
    renderDeclutter(e) {
      this.declutterExecutorGroup && (this.setupCompositionContext_(), this.renderWorlds(
        this.declutterExecutorGroup,
        e,
        e.declutterTree
      ), this.releaseCompositionContext_());
    }
    /**
     * Render the layer.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {HTMLElement|null} target Target that may be used to render content to.
     * @return {HTMLElement|null} The rendered element.
     */
    renderFrame(e, t) {
      const i = e.pixelRatio, a = e.layerStatesArray[e.layerIndex];
      RJ(this.pixelTransform, 1 / i, 1 / i), Xw(this.inversePixelTransform, this.pixelTransform);
      const o = DL(this.pixelTransform);
      this.useContainer(t, o, this.getBackground(e));
      const u = this.context, c = u.canvas, p = this.replayGroup_, y = this.declutterExecutorGroup;
      let _ = p && !p.isEmpty() || y && !y.isEmpty();
      if (!_ && !(this.getLayer().hasListener(Hh.PRERENDER) || this.getLayer().hasListener(Hh.POSTRENDER)))
        return null;
      const S = Math.round(e.size[0] * i), b = Math.round(e.size[1] * i);
      c.width != S || c.height != b ? (c.width = S, c.height = b, c.style.transform !== o && (c.style.transform = o)) : this.containerReused || u.clearRect(0, 0, S, b), this.preRender(u, e);
      const T = e.viewState;
      T.projection, this.opacity_ = a.opacity, this.setupCompositionContext_();
      let O = !1;
      if (_ && a.extent && this.clipping) {
        const N = yp(a.extent);
        _ = Zo(N, e.extent), O = _ && !xf(N, e.extent), O && this.clipUnrotated(this.compositionContext_, e, N);
      }
      return _ && this.renderWorlds(p, e), O && this.compositionContext_.restore(), this.releaseCompositionContext_(), this.postRender(u, e), this.renderedRotation_ !== T.rotation && (this.renderedRotation_ = T.rotation, this.hitDetectionImageData_ = null), this.container;
    }
    /**
     * Asynchronous layer level hit detection.
     * @param {import("../../pixel.js").Pixel} pixel Pixel.
     * @return {Promise<Array<import("../../Feature").default>>} Promise
     * that resolves with an array of features.
     */
    getFeatures(e) {
      return new Promise((t) => {
        if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {
          const i = [this.context.canvas.width, this.context.canvas.height];
          os(this.pixelTransform, i);
          const a = this.renderedCenter_, o = this.renderedResolution_, u = this.renderedRotation_, c = this.renderedProjection_, p = this.wrappedRenderedExtent_, y = this.getLayer(), _ = [], S = i[0] * Fh, b = i[1] * Fh;
          _.push(
            this.getRenderTransform(
              a,
              o,
              u,
              Fh,
              S,
              b,
              0
            ).slice()
          );
          const T = y.getSource(), O = c.getExtent();
          if (T.getWrapX() && c.canWrapX() && !xf(O, p)) {
            let N = p[0];
            const D = _i(O);
            let k = 0, $;
            for (; N < O[0]; )
              --k, $ = D * k, _.push(
                this.getRenderTransform(
                  a,
                  o,
                  u,
                  Fh,
                  S,
                  b,
                  $
                ).slice()
              ), N += D;
            for (k = 0, N = p[2]; N > O[2]; )
              ++k, $ = D * k, _.push(
                this.getRenderTransform(
                  a,
                  o,
                  u,
                  Fh,
                  S,
                  b,
                  $
                ).slice()
              ), N -= D;
          }
          this.hitDetectionImageData_ = nne(
            i,
            _,
            this.renderedFeatures_,
            y.getStyleFunction(),
            p,
            o,
            u
          );
        }
        t(
          ine(e, this.renderedFeatures_, this.hitDetectionImageData_)
        );
      });
    }
    /**
     * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {number} hitTolerance Hit tolerance in pixels.
     * @param {import("../vector.js").FeatureCallback<T>} callback Feature callback.
     * @param {Array<import("../Map.js").HitMatch<T>>} matches The hit detected matches with tolerance.
     * @return {T|undefined} Callback result.
     * @template T
     */
    forEachFeatureAtCoordinate(e, t, i, a, o) {
      if (!this.replayGroup_)
        return;
      const u = t.viewState.resolution, c = t.viewState.rotation, p = this.getLayer(), y = {}, _ = function(T, O, N) {
        const D = Pi(T), k = y[D];
        if (k) {
          if (k !== !0 && N < k.distanceSq) {
            if (N === 0)
              return y[D] = !0, o.splice(o.lastIndexOf(k), 1), a(T, p, O);
            k.geometry = O, k.distanceSq = N;
          }
        } else {
          if (N === 0)
            return y[D] = !0, a(T, p, O);
          o.push(
            y[D] = {
              feature: T,
              layer: p,
              geometry: O,
              distanceSq: N,
              callback: a
            }
          );
        }
      };
      let S;
      const b = [this.replayGroup_];
      return this.declutterExecutorGroup && b.push(this.declutterExecutorGroup), b.some((T) => S = T.forEachFeatureAtCoordinate(
        e,
        u,
        c,
        i,
        _,
        T === this.declutterExecutorGroup && t.declutterTree ? t.declutterTree.all().map((O) => O.value) : null
      )), S;
    }
    /**
     * Perform action necessary to get the layer rendered after new fonts have loaded
     */
    handleFontsChanged() {
      const e = this.getLayer();
      e.getVisible() && this.replayGroup_ && e.changed();
    }
    /**
     * Handle changes in image style state.
     * @param {import("../../events/Event.js").default} event Image style change event.
     * @private
     */
    handleStyleImageChange_(e) {
      this.renderIfReadyAndVisible();
    }
    /**
     * Determine whether render should be called.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @return {boolean} Layer is ready to be rendered.
     */
    prepareFrame(e) {
      const t = this.getLayer(), i = t.getSource();
      if (!i)
        return !1;
      const a = e.viewHints[ws.ANIMATING], o = e.viewHints[ws.INTERACTING], u = t.getUpdateWhileAnimating(), c = t.getUpdateWhileInteracting();
      if (this.ready && !u && a || !c && o)
        return this.animatingOrInteracting_ = !0, !0;
      this.animatingOrInteracting_ = !1;
      const p = e.extent, y = e.viewState, _ = y.projection, S = y.resolution, b = e.pixelRatio, T = t.getRevision(), O = t.getRenderBuffer();
      let N = t.getRenderOrder();
      N === void 0 && (N = ane);
      const D = y.center.slice(), k = TE(
        p,
        O * S
      ), $ = k.slice(), B = [k.slice()], V = _.getExtent();
      if (i.getWrapX() && _.canWrapX() && !xf(V, e.extent)) {
        const Q = _i(V), ae = Math.max(_i(k) / 2, Q);
        k[0] = V[0] - ae, k[2] = V[2] + ae, K2(D, _);
        const le = X2(B[0], _);
        le[0] < V[0] && le[2] < V[2] ? B.push([
          le[0] + Q,
          le[1],
          le[2] + Q,
          le[3]
        ]) : le[0] > V[0] && le[2] > V[2] && B.push([
          le[0] - Q,
          le[1],
          le[2] - Q,
          le[3]
        ]);
      }
      if (this.ready && this.renderedResolution_ == S && this.renderedRevision_ == T && this.renderedRenderOrder_ == N && xf(this.wrappedRenderedExtent_, k))
        return hm(this.renderedExtent_, $) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = $), this.renderedCenter_ = D, this.replayGroupChanged = !1, !0;
      this.replayGroup_ = null;
      const z = new c2(
        DA(S, b),
        k,
        S,
        b
      );
      let G;
      this.getLayer().getDeclutter() && (G = new c2(
        DA(S, b),
        k,
        S,
        b
      ));
      let ie;
      for (let Q = 0, ae = B.length; Q < ae; ++Q)
        i.loadFeatures(B[Q], S, _);
      const ue = sne(S, b);
      let Re = !0;
      const Oe = (
        /**
         * @param {import("../../Feature.js").default} feature Feature.
         */
        (Q) => {
          let ae;
          const le = Q.getStyleFunction() || t.getStyleFunction();
          if (le && (ae = le(Q, S)), ae) {
            const se = this.renderFeature(
              Q,
              ue,
              ae,
              z,
              ie,
              G
            );
            Re = Re && !se;
          }
        }
      ), $e = nF(k), Ee = i.getFeaturesInExtent($e);
      N && Ee.sort(N);
      for (let Q = 0, ae = Ee.length; Q < ae; ++Q)
        Oe(Ee[Q]);
      this.renderedFeatures_ = Ee, this.ready = Re;
      const Fe = z.finish(), Ne = new p2(
        k,
        S,
        b,
        i.getOverlaps(),
        Fe,
        t.getRenderBuffer()
      );
      return G && (this.declutterExecutorGroup = new p2(
        k,
        S,
        b,
        i.getOverlaps(),
        G.finish(),
        t.getRenderBuffer()
      )), this.renderedResolution_ = S, this.renderedRevision_ = T, this.renderedRenderOrder_ = N, this.renderedExtent_ = $, this.wrappedRenderedExtent_ = k, this.renderedCenter_ = D, this.renderedProjection_ = _, this.replayGroup_ = Ne, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0;
    }
    /**
     * @param {import("../../Feature.js").default} feature Feature.
     * @param {number} squaredTolerance Squared render tolerance.
     * @param {import("../../style/Style.js").default|Array<import("../../style/Style.js").default>} styles The style or array of styles.
     * @param {import("../../render/canvas/BuilderGroup.js").default} builderGroup Builder group.
     * @param {import("../../proj.js").TransformFunction} [transform] Transform from user to view projection.
     * @param {import("../../render/canvas/BuilderGroup.js").default} [declutterBuilderGroup] Builder for decluttering.
     * @return {boolean} `true` if an image is loading.
     */
    renderFeature(e, t, i, a, o, u) {
      if (!i)
        return !1;
      let c = !1;
      if (Array.isArray(i))
        for (let p = 0, y = i.length; p < y; ++p)
          c = g2(
            a,
            e,
            i[p],
            t,
            this.boundHandleStyleImageChange_,
            o,
            u
          ) || c;
      else
        c = g2(
          a,
          e,
          i,
          t,
          this.boundHandleStyleImageChange_,
          o,
          u
        );
      return c;
    }
  }
  const vne = mne;
  class yne extends Ate {
    /**
     * @param {import("./BaseVector.js").Options<VectorSourceType>} [options] Options.
     */
    constructor(e) {
      super(e);
    }
    createRenderer() {
      return new vne(this);
    }
  }
  const _ne = yne;
  class Ene {
    /**
     * @param {number} [maxEntries] Max entries.
     */
    constructor(e) {
      this.rbush_ = new eU(e), this.items_ = {};
    }
    /**
     * Insert a value into the RBush.
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {T} value Value.
     */
    insert(e, t) {
      const i = {
        minX: e[0],
        minY: e[1],
        maxX: e[2],
        maxY: e[3],
        value: t
      };
      this.rbush_.insert(i), this.items_[Pi(t)] = i;
    }
    /**
     * Bulk-insert values into the RBush.
     * @param {Array<import("../extent.js").Extent>} extents Extents.
     * @param {Array<T>} values Values.
     */
    load(e, t) {
      const i = new Array(t.length);
      for (let a = 0, o = t.length; a < o; a++) {
        const u = e[a], c = t[a], p = {
          minX: u[0],
          minY: u[1],
          maxX: u[2],
          maxY: u[3],
          value: c
        };
        i[a] = p, this.items_[Pi(c)] = p;
      }
      this.rbush_.load(i);
    }
    /**
     * Remove a value from the RBush.
     * @param {T} value Value.
     * @return {boolean} Removed.
     */
    remove(e) {
      const t = Pi(e), i = this.items_[t];
      return delete this.items_[t], this.rbush_.remove(i) !== null;
    }
    /**
     * Update the extent of a value in the RBush.
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {T} value Value.
     */
    update(e, t) {
      const i = this.items_[Pi(t)], a = [i.minX, i.minY, i.maxX, i.maxY];
      K0(a, e) || (this.remove(t), this.insert(e, t));
    }
    /**
     * Return all values in the RBush.
     * @return {Array<T>} All.
     */
    getAll() {
      return this.rbush_.all().map(function(t) {
        return t.value;
      });
    }
    /**
     * Return all values in the given extent.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {Array<T>} All in extent.
     */
    getInExtent(e) {
      const t = {
        minX: e[0],
        minY: e[1],
        maxX: e[2],
        maxY: e[3]
      };
      return this.rbush_.search(t).map(function(a) {
        return a.value;
      });
    }
    /**
     * Calls a callback function with each value in the tree.
     * If the callback returns a truthy value, this value is returned without
     * checking the rest of the tree.
     * @param {function(T): *} callback Callback.
     * @return {*} Callback return value.
     */
    forEach(e) {
      return this.forEach_(this.getAll(), e);
    }
    /**
     * Calls a callback function with each value in the provided extent.
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {function(T): *} callback Callback.
     * @return {*} Callback return value.
     */
    forEachInExtent(e, t) {
      return this.forEach_(this.getInExtent(e), t);
    }
    /**
     * @param {Array<T>} values Values.
     * @param {function(T): *} callback Callback.
     * @private
     * @return {*} Callback return value.
     */
    forEach_(e, t) {
      let i;
      for (let a = 0, o = e.length; a < o; a++)
        if (i = t(e[a]), i)
          return i;
      return i;
    }
    /**
     * @return {boolean} Is empty.
     */
    isEmpty() {
      return q0(this.items_);
    }
    /**
     * Remove all values from the RBush.
     */
    clear() {
      this.rbush_.clear(), this.items_ = {};
    }
    /**
     * @param {import("../extent.js").Extent} [extent] Extent.
     * @return {import("../extent.js").Extent} Extent.
     */
    getExtent(e) {
      const t = this.rbush_.toJSON();
      return wp(t.minX, t.minY, t.maxX, t.maxY, e);
    }
    /**
     * @param {RBush} rbush R-Tree.
     */
    concat(e) {
      this.rbush_.load(e.rbush_.all());
      for (const t in e.items_)
        this.items_[t] = e.items_[t];
    }
  }
  const m2 = Ene;
  class sN extends hS {
    /**
     * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
     *     For internal use, flat coordinates in combination with `layout` are also accepted.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     */
    constructor(e, t) {
      super(), t && !Array.isArray(e[0]) ? this.setFlatCoordinates(
        t,
        /** @type {Array<number>} */
        e
      ) : this.setCoordinates(
        /** @type {Array<import("../coordinate.js").Coordinate>} */
        e,
        t
      );
    }
    /**
     * Append the passed point to this multipoint.
     * @param {Point} point Point.
     * @api
     */
    appendPoint(e) {
      o_(this.flatCoordinates, e.getFlatCoordinates()), this.changed();
    }
    /**
     * Make a complete copy of the geometry.
     * @return {!MultiPoint} Clone.
     * @api
     */
    clone() {
      const e = new sN(
        this.flatCoordinates.slice(),
        this.layout
      );
      return e.applyProperties(this), e;
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      if (a < Rw(this.getExtent(), e, t))
        return a;
      const o = this.flatCoordinates, u = this.stride;
      for (let c = 0, p = o.length; c < p; c += u) {
        const y = Pv(
          e,
          t,
          o[c],
          o[c + 1]
        );
        if (y < a) {
          a = y;
          for (let _ = 0; _ < u; ++_)
            i[_] = o[c + _];
          i.length = u;
        }
      }
      return a;
    }
    /**
     * Return the coordinates of the multipoint.
     * @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
     * @api
     */
    getCoordinates() {
      return Av(
        this.flatCoordinates,
        0,
        this.flatCoordinates.length,
        this.stride
      );
    }
    /**
     * Return the point at the specified index.
     * @param {number} index Index.
     * @return {Point} Point.
     * @api
     */
    getPoint(e) {
      const t = this.flatCoordinates.length / this.stride;
      return e < 0 || t <= e ? null : new dw(
        this.flatCoordinates.slice(
          e * this.stride,
          (e + 1) * this.stride
        ),
        this.layout
      );
    }
    /**
     * Return the points of this multipoint.
     * @return {Array<Point>} Points.
     * @api
     */
    getPoints() {
      const e = this.flatCoordinates, t = this.layout, i = this.stride, a = [];
      for (let o = 0, u = e.length; o < u; o += i) {
        const c = new dw(e.slice(o, o + i), t);
        a.push(c);
      }
      return a;
    }
    /**
     * Get the type of this geometry.
     * @return {import("./Geometry.js").Type} Geometry type.
     * @api
     */
    getType() {
      return "MultiPoint";
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     * @api
     */
    intersectsExtent(e) {
      const t = this.flatCoordinates, i = this.stride;
      for (let a = 0, o = t.length; a < o; a += i) {
        const u = t[a], c = t[a + 1];
        if (HA(e, u, c))
          return !0;
      }
      return !1;
    }
    /**
     * Set the coordinates of the multipoint.
     * @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @api
     */
    setCoordinates(e, t) {
      this.setLayout(t, e, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = IL(
        this.flatCoordinates,
        0,
        e,
        this.stride
      ), this.changed();
    }
  }
  const Sne = sN;
  function vU(n, e, t, i) {
    const a = [];
    let o = Su();
    for (let u = 0, c = t.length; u < c; ++u) {
      const p = t[u];
      o = WA(
        n,
        e,
        p[0],
        i
      ), a.push((o[0] + o[2]) / 2, (o[1] + o[3]) / 2), e = p[p.length - 1];
    }
    return a;
  }
  class Sw extends hS {
    /**
     * @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
     *     For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @param {Array<Array<number>>} [endss] Array of ends for internal use with flat coordinates.
     */
    constructor(e, t, i) {
      if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !i && !Array.isArray(e[0])) {
        const a = (
          /** @type {Array<Polygon>} */
          e
        ), o = [], u = [];
        for (let c = 0, p = a.length; c < p; ++c) {
          const y = a[c], _ = o.length, S = y.getEnds();
          for (let b = 0, T = S.length; b < T; ++b)
            S[b] += _;
          o_(o, y.getFlatCoordinates()), u.push(S);
        }
        t = a.length === 0 ? this.getLayout() : a[0].getLayout(), e = o, i = u;
      }
      t !== void 0 && i ? (this.setFlatCoordinates(
        t,
        /** @type {Array<number>} */
        e
      ), this.endss_ = i) : this.setCoordinates(
        /** @type {Array<Array<Array<import("../coordinate.js").Coordinate>>>} */
        e,
        t
      );
    }
    /**
     * Append the passed polygon to this multipolygon.
     * @param {Polygon} polygon Polygon.
     * @api
     */
    appendPolygon(e) {
      let t;
      if (!this.flatCoordinates)
        this.flatCoordinates = e.getFlatCoordinates().slice(), t = e.getEnds().slice(), this.endss_.push();
      else {
        const i = this.flatCoordinates.length;
        o_(this.flatCoordinates, e.getFlatCoordinates()), t = e.getEnds().slice();
        for (let a = 0, o = t.length; a < o; ++a)
          t[a] += i;
      }
      this.endss_.push(t), this.changed();
    }
    /**
     * Make a complete copy of the geometry.
     * @return {!MultiPolygon} Clone.
     * @api
     */
    clone() {
      const e = this.endss_.length, t = new Array(e);
      for (let a = 0; a < e; ++a)
        t[a] = this.endss_[a].slice();
      const i = new Sw(
        this.flatCoordinates.slice(),
        this.layout,
        t
      );
      return i.applyProperties(this), i;
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
     * @param {number} minSquaredDistance Minimum squared distance.
     * @return {number} Minimum squared distance.
     */
    closestPointXY(e, t, i, a) {
      return a < Rw(this.getExtent(), e, t) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
        kJ(
          this.flatCoordinates,
          0,
          this.endss_,
          this.stride,
          0
        )
      ), this.maxDeltaRevision_ = this.getRevision()), FJ(
        this.getOrientedFlatCoordinates(),
        0,
        this.endss_,
        this.stride,
        this.maxDelta_,
        !0,
        e,
        t,
        i,
        a
      ));
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     * @return {boolean} Contains (x, y).
     */
    containsXY(e, t) {
      return WJ(
        this.getOrientedFlatCoordinates(),
        0,
        this.endss_,
        this.stride,
        e,
        t
      );
    }
    /**
     * Return the area of the multipolygon on projected plane.
     * @return {number} Area (on projected plane).
     * @api
     */
    getArea() {
      return VJ(
        this.getOrientedFlatCoordinates(),
        0,
        this.endss_,
        this.stride
      );
    }
    /**
     * Get the coordinate array for this geometry.  This array has the structure
     * of a GeoJSON coordinate array for multi-polygons.
     *
     * @param {boolean} [right] Orient coordinates according to the right-hand
     *     rule (counter-clockwise for exterior and clockwise for interior rings).
     *     If `false`, coordinates will be oriented according to the left-hand rule
     *     (clockwise for exterior and counter-clockwise for interior rings).
     *     By default, coordinate orientation will depend on how the geometry was
     *     constructed.
     * @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
     * @api
     */
    getCoordinates(e) {
      let t;
      return e !== void 0 ? (t = this.getOrientedFlatCoordinates().slice(), U3(
        t,
        0,
        this.endss_,
        this.stride,
        e
      )) : t = this.flatCoordinates, MA(
        t,
        0,
        this.endss_,
        this.stride
      );
    }
    /**
     * @return {Array<Array<number>>} Endss.
     */
    getEndss() {
      return this.endss_;
    }
    /**
     * @return {Array<number>} Flat interior points.
     */
    getFlatInteriorPoints() {
      if (this.flatInteriorPointsRevision_ != this.getRevision()) {
        const e = vU(
          this.flatCoordinates,
          0,
          this.endss_,
          this.stride
        );
        this.flatInteriorPoints_ = kj(
          this.getOrientedFlatCoordinates(),
          0,
          this.endss_,
          this.stride,
          e
        ), this.flatInteriorPointsRevision_ = this.getRevision();
      }
      return (
        /** @type {Array<number>} */
        this.flatInteriorPoints_
      );
    }
    /**
     * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
     * @return {MultiPoint} Interior points as XYM coordinates, where M is
     * the length of the horizontal intersection that the point belongs to.
     * @api
     */
    getInteriorPoints() {
      return new Sne(this.getFlatInteriorPoints().slice(), "XYM");
    }
    /**
     * @return {Array<number>} Oriented flat coordinates.
     */
    getOrientedFlatCoordinates() {
      if (this.orientedRevision_ != this.getRevision()) {
        const e = this.flatCoordinates;
        XJ(e, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = e : (this.orientedFlatCoordinates_ = e.slice(), this.orientedFlatCoordinates_.length = U3(
          this.orientedFlatCoordinates_,
          0,
          this.endss_,
          this.stride
        )), this.orientedRevision_ = this.getRevision();
      }
      return (
        /** @type {Array<number>} */
        this.orientedFlatCoordinates_
      );
    }
    /**
     * @param {number} squaredTolerance Squared tolerance.
     * @return {MultiPolygon} Simplified MultiPolygon.
     * @protected
     */
    getSimplifiedGeometryInternal(e) {
      const t = [], i = [];
      return t.length = BJ(
        this.flatCoordinates,
        0,
        this.endss_,
        this.stride,
        Math.sqrt(e),
        t,
        0,
        i
      ), new Sw(t, "XY", i);
    }
    /**
     * Return the polygon at the specified index.
     * @param {number} index Index.
     * @return {Polygon} Polygon.
     * @api
     */
    getPolygon(e) {
      if (e < 0 || this.endss_.length <= e)
        return null;
      let t;
      if (e === 0)
        t = 0;
      else {
        const o = this.endss_[e - 1];
        t = o[o.length - 1];
      }
      const i = this.endss_[e].slice(), a = i[i.length - 1];
      if (t !== 0)
        for (let o = 0, u = i.length; o < u; ++o)
          i[o] -= t;
      return new qv(
        this.flatCoordinates.slice(t, a),
        this.layout,
        i
      );
    }
    /**
     * Return the polygons of this multipolygon.
     * @return {Array<Polygon>} Polygons.
     * @api
     */
    getPolygons() {
      const e = this.layout, t = this.flatCoordinates, i = this.endss_, a = [];
      let o = 0;
      for (let u = 0, c = i.length; u < c; ++u) {
        const p = i[u].slice(), y = p[p.length - 1];
        if (o !== 0)
          for (let S = 0, b = p.length; S < b; ++S)
            p[S] -= o;
        const _ = new qv(
          t.slice(o, y),
          e,
          p
        );
        a.push(_), o = y;
      }
      return a;
    }
    /**
     * Get the type of this geometry.
     * @return {import("./Geometry.js").Type} Geometry type.
     * @api
     */
    getType() {
      return "MultiPolygon";
    }
    /**
     * Test if the geometry and the passed extent intersect.
     * @param {import("../extent.js").Extent} extent Extent.
     * @return {boolean} `true` if the geometry and the extent intersect.
     * @api
     */
    intersectsExtent(e) {
      return YJ(
        this.getOrientedFlatCoordinates(),
        0,
        this.endss_,
        this.stride,
        e
      );
    }
    /**
     * Set the coordinates of the multipolygon.
     * @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
     * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
     * @api
     */
    setCoordinates(e, t) {
      this.setLayout(t, e, 3), this.flatCoordinates || (this.flatCoordinates = []);
      const i = UJ(
        this.flatCoordinates,
        0,
        e,
        this.stride,
        this.endss_
      );
      if (i.length === 0)
        this.flatCoordinates.length = 0;
      else {
        const a = i[i.length - 1];
        this.flatCoordinates.length = a.length === 0 ? 0 : a[a.length - 1];
      }
      this.changed();
    }
  }
  const xne = Sw, v2 = Tf();
  class f_ {
    /**
     * @param {Type} type Geometry type.
     * @param {Array<number>} flatCoordinates Flat coordinates. These always need
     *     to be right-handed for polygons.
     * @param {Array<number>} ends Ends.
     * @param {number} stride Stride.
     * @param {Object<string, *>} properties Properties.
     * @param {number|string|undefined} id Feature id.
     */
    constructor(e, t, i, a, o, u) {
      this.styleFunction, this.extent_, this.id_ = u, this.type_ = e, this.flatCoordinates_ = t, this.flatInteriorPoints_ = null, this.flatMidpoints_ = null, this.ends_ = i, this.properties_ = o, this.squaredTolerance_, this.stride_ = a, this.simplifiedGeometry_;
    }
    /**
     * Get a feature property by its key.
     * @param {string} key Key
     * @return {*} Value for the requested key.
     * @api
     */
    get(e) {
      return this.properties_[e];
    }
    /**
     * Get the extent of this feature's geometry.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getExtent() {
      return this.extent_ || (this.extent_ = this.type_ === "Point" ? G2(this.flatCoordinates_) : WA(
        this.flatCoordinates_,
        0,
        this.flatCoordinates_.length,
        2
      )), this.extent_;
    }
    /**
     * @return {Array<number>} Flat interior points.
     */
    getFlatInteriorPoint() {
      if (!this.flatInteriorPoints_) {
        const e = Cp(this.getExtent());
        this.flatInteriorPoints_ = UL(
          this.flatCoordinates_,
          0,
          /** @type {Array<number>} */
          this.ends_,
          2,
          e,
          0
        );
      }
      return this.flatInteriorPoints_;
    }
    /**
     * @return {Array<number>} Flat interior points.
     */
    getFlatInteriorPoints() {
      if (!this.flatInteriorPoints_) {
        const e = KJ(this.flatCoordinates_, this.ends_), t = vU(this.flatCoordinates_, 0, e, 2);
        this.flatInteriorPoints_ = kj(
          this.flatCoordinates_,
          0,
          e,
          2,
          t
        );
      }
      return this.flatInteriorPoints_;
    }
    /**
     * @return {Array<number>} Flat midpoint.
     */
    getFlatMidpoint() {
      return this.flatMidpoints_ || (this.flatMidpoints_ = $3(
        this.flatCoordinates_,
        0,
        this.flatCoordinates_.length,
        2,
        0.5
      )), this.flatMidpoints_;
    }
    /**
     * @return {Array<number>} Flat midpoints.
     */
    getFlatMidpoints() {
      if (!this.flatMidpoints_) {
        this.flatMidpoints_ = [];
        const e = this.flatCoordinates_;
        let t = 0;
        const i = (
          /** @type {Array<number>} */
          this.ends_
        );
        for (let a = 0, o = i.length; a < o; ++a) {
          const u = i[a], c = $3(e, t, u, 2, 0.5);
          o_(this.flatMidpoints_, c), t = u;
        }
      }
      return this.flatMidpoints_;
    }
    /**
     * Get the feature identifier.  This is a stable identifier for the feature and
     * is set when reading data from a remote source.
     * @return {number|string|undefined} Id.
     * @api
     */
    getId() {
      return this.id_;
    }
    /**
     * @return {Array<number>} Flat coordinates.
     */
    getOrientedFlatCoordinates() {
      return this.flatCoordinates_;
    }
    /**
     * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when
     * determining the geometry type in style function (see {@link #getType}).
     * @return {RenderFeature} Feature.
     * @api
     */
    getGeometry() {
      return this;
    }
    /**
     * @param {number} squaredTolerance Squared tolerance.
     * @return {RenderFeature} Simplified geometry.
     */
    getSimplifiedGeometry(e) {
      return this;
    }
    /**
     * Get a transformed and simplified version of the geometry.
     * @param {number} squaredTolerance Squared tolerance.
     * @param {import("../proj.js").TransformFunction} [transform] Optional transform function.
     * @return {RenderFeature} Simplified geometry.
     */
    simplifyTransformed(e, t) {
      return this;
    }
    /**
     * Get the feature properties.
     * @return {Object<string, *>} Feature properties.
     * @api
     */
    getProperties() {
      return this.properties_;
    }
    /**
     * Get an object of all property names and values.  This has the same behavior as getProperties,
     * but is here to conform with the {@link module:ol/Feature~Feature} interface.
     * @return {Object<string, *>?} Object.
     */
    getPropertiesInternal() {
      return this.properties_;
    }
    /**
     * @return {number} Stride.
     */
    getStride() {
      return this.stride_;
    }
    /**
     * @return {import('../style/Style.js').StyleFunction|undefined} Style
     */
    getStyleFunction() {
      return this.styleFunction;
    }
    /**
     * Get the type of this feature's geometry.
     * @return {Type} Geometry type.
     * @api
     */
    getType() {
      return this.type_;
    }
    /**
     * Transform geometry coordinates from tile pixel space to projected.
     *
     * @param {import("../proj.js").ProjectionLike} projection The data projection
     */
    transform(e) {
      e = Er(e);
      const t = e.getExtent(), i = e.getWorldExtent();
      if (t && i) {
        const a = Cs(i) / Cs(t);
        Rf(
          v2,
          i[0],
          i[3],
          a,
          -a,
          0,
          0,
          0
        ), Qg(
          this.flatCoordinates_,
          0,
          this.flatCoordinates_.length,
          2,
          v2,
          this.flatCoordinates_
        );
      }
    }
    /**
     * Apply a transform function to the coordinates of the geometry.
     * The geometry is modified in place.
     * If you do not want the geometry modified in place, first `clone()` it and
     * then use this function on the clone.
     * @param {import("../proj.js").TransformFunction} transformFn Transform function.
     */
    applyTransform(e) {
      e(this.flatCoordinates_, this.flatCoordinates_, this.stride_);
    }
    /**
     * @return {RenderFeature} A cloned render feature.
     */
    clone() {
      return new f_(
        this.type_,
        this.flatCoordinates_.slice(),
        this.ends_.slice(),
        this.stride_,
        Object.assign({}, this.properties_),
        this.id_
      );
    }
    /**
     * @return {Array<number>} Ends.
     */
    getEnds() {
      return this.ends_;
    }
    /**
     * Add transform and resolution based geometry simplification to this instance.
     * @return {RenderFeature} This render feature.
     */
    enableSimplifyTransformed() {
      return this.simplifyTransformed = hj((e, t) => {
        if (e === this.squaredTolerance_)
          return this.simplifiedGeometry_;
        this.simplifiedGeometry_ = this.clone(), t && this.simplifiedGeometry_.applyTransform(t);
        const i = this.simplifiedGeometry_.getFlatCoordinates();
        let a;
        switch (this.type_) {
          case "LineString":
            i.length = PL(
              i,
              0,
              this.simplifiedGeometry_.flatCoordinates_.length,
              this.simplifiedGeometry_.stride_,
              e,
              i,
              0
            ), a = [i.length];
            break;
          case "MultiLineString":
            a = [], i.length = zJ(
              i,
              0,
              this.simplifiedGeometry_.ends_,
              this.simplifiedGeometry_.stride_,
              e,
              i,
              0,
              a
            );
            break;
          case "Polygon":
            a = [], i.length = kL(
              i,
              0,
              this.simplifiedGeometry_.ends_,
              this.simplifiedGeometry_.stride_,
              Math.sqrt(e),
              i,
              0,
              a
            );
            break;
        }
        return a && (this.simplifiedGeometry_ = new f_(
          this.type_,
          i,
          a,
          2,
          this.properties_,
          this.id_
        )), this.squaredTolerance_ = e, this.simplifiedGeometry_;
      }), this;
    }
  }
  f_.prototype.getFlatCoordinates = f_.prototype.getOrientedFlatCoordinates;
  const wv = f_;
  class bne extends Of {
    /**
     * @param {Options} options Source options.
     */
    constructor(e) {
      super(), this.projection = Er(e.projection), this.attributions_ = y2(e.attributions), this.attributionsCollapsible_ = e.attributionsCollapsible !== void 0 ? e.attributionsCollapsible : !0, this.loading = !1, this.state_ = e.state !== void 0 ? e.state : "ready", this.wrapX_ = e.wrapX !== void 0 ? e.wrapX : !1, this.interpolate_ = !!e.interpolate, this.viewResolver = null, this.viewRejector = null;
      const t = this;
      this.viewPromise_ = new Promise(function(i, a) {
        t.viewResolver = i, t.viewRejector = a;
      });
    }
    /**
     * Get the attribution function for the source.
     * @return {?Attribution} Attribution function.
     * @api
     */
    getAttributions() {
      return this.attributions_;
    }
    /**
     * @return {boolean} Attributions are collapsible.
     * @api
     */
    getAttributionsCollapsible() {
      return this.attributionsCollapsible_;
    }
    /**
     * Get the projection of the source.
     * @return {import("../proj/Projection.js").default|null} Projection.
     * @api
     */
    getProjection() {
      return this.projection;
    }
    /**
     * @param {import("../proj/Projection").default} [projection] Projection.
     * @return {Array<number>|null} Resolutions.
     */
    getResolutions(e) {
      return null;
    }
    /**
     * @return {Promise<import("../View.js").ViewOptions>} A promise for view-related properties.
     */
    getView() {
      return this.viewPromise_;
    }
    /**
     * Get the state of the source, see {@link import("./Source.js").State} for possible states.
     * @return {import("./Source.js").State} State.
     * @api
     */
    getState() {
      return this.state_;
    }
    /**
     * @return {boolean|undefined} Wrap X.
     */
    getWrapX() {
      return this.wrapX_;
    }
    /**
     * @return {boolean} Use linear interpolation when resampling.
     */
    getInterpolate() {
      return this.interpolate_;
    }
    /**
     * Refreshes the source. The source will be cleared, and data from the server will be reloaded.
     * @api
     */
    refresh() {
      this.changed();
    }
    /**
     * Set the attributions of the source.
     * @param {AttributionLike|undefined} attributions Attributions.
     *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},
     *     or `undefined`.
     * @api
     */
    setAttributions(e) {
      this.attributions_ = y2(e), this.changed();
    }
    /**
     * Set the state of the source.
     * @param {import("./Source.js").State} state State.
     */
    setState(e) {
      this.state_ = e, this.changed();
    }
  }
  function y2(n) {
    return n ? Array.isArray(n) ? function(e) {
      return n;
    } : typeof n == "function" ? n : function(e) {
      return [n];
    } : null;
  }
  const oN = bne, Ef = {
    /**
     * Triggered when a feature is added to the source.
     * @event module:ol/source/Vector.VectorSourceEvent#addfeature
     * @api
     */
    ADDFEATURE: "addfeature",
    /**
     * Triggered when a feature is updated.
     * @event module:ol/source/Vector.VectorSourceEvent#changefeature
     * @api
     */
    CHANGEFEATURE: "changefeature",
    /**
     * Triggered when the clear method is called on the source.
     * @event module:ol/source/Vector.VectorSourceEvent#clear
     * @api
     */
    CLEAR: "clear",
    /**
     * Triggered when a feature is removed from the source.
     * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.
     * @event module:ol/source/Vector.VectorSourceEvent#removefeature
     * @api
     */
    REMOVEFEATURE: "removefeature",
    /**
     * Triggered when features starts loading.
     * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart
     * @api
     */
    FEATURESLOADSTART: "featuresloadstart",
    /**
     * Triggered when features finishes loading.
     * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend
     * @api
     */
    FEATURESLOADEND: "featuresloadend",
    /**
     * Triggered if feature loading results in an error.
     * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror
     * @api
     */
    FEATURESLOADERROR: "featuresloaderror"
  };
  function wne(n, e) {
    return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]];
  }
  let Cne = !1;
  function Tne(n, e, t, i, a, o, u) {
    const c = new XMLHttpRequest();
    c.open(
      "GET",
      typeof n == "function" ? n(t, i, a) : n,
      !0
    ), e.getType() == "arraybuffer" && (c.responseType = "arraybuffer"), c.withCredentials = Cne, c.onload = function(p) {
      if (!c.status || c.status >= 200 && c.status < 300) {
        const y = e.getType();
        let _;
        y == "json" ? _ = JSON.parse(c.responseText) : y == "text" ? _ = c.responseText : y == "xml" ? (_ = c.responseXML, _ || (_ = new DOMParser().parseFromString(
          c.responseText,
          "application/xml"
        ))) : y == "arraybuffer" && (_ = /** @type {ArrayBuffer} */
        c.response), _ ? o(
          /** @type {Array<import("./Feature.js").default>} */
          e.readFeatures(_, {
            extent: t,
            featureProjection: a
          }),
          e.readProjection(_)
        ) : u();
      } else
        u();
    }, c.onerror = u, c.send();
  }
  function _2(n, e) {
    return function(t, i, a, o, u) {
      const c = (
        /** @type {import("./source/Vector").default} */
        this
      );
      Tne(
        n,
        e,
        t,
        i,
        a,
        /**
         * @param {Array<import("./Feature.js").default>} features The loaded features.
         * @param {import("./proj/Projection.js").default} dataProjection Data
         * projection.
         */
        function(p, y) {
          c.addFeatures(p), o !== void 0 && o(p);
        },
        /* FIXME handle error */
        u || l_
      );
    };
  }
  class zg extends Xh {
    /**
     * @param {string} type Type.
     * @param {FeatureClass} [feature] Feature.
     * @param {Array<FeatureClass>} [features] Features.
     */
    constructor(e, t, i) {
      super(e), this.feature = t, this.features = i;
    }
  }
  class Rne extends oN {
    /**
     * @param {Options<FeatureClass>} [options] Vector source options.
     */
    constructor(e) {
      e = e || {}, super({
        attributions: e.attributions,
        interpolate: !0,
        projection: void 0,
        state: "ready",
        wrapX: e.wrapX !== void 0 ? e.wrapX : !0
      }), this.on, this.once, this.un, this.loader_ = l_, this.format_ = e.format, this.overlaps_ = e.overlaps === void 0 ? !0 : e.overlaps, this.url_ = e.url, e.loader !== void 0 ? this.loader_ = e.loader : this.url_ !== void 0 && (Ei(this.format_, "`format` must be set when `url` is set"), this.loader_ = _2(
        this.url_,
        /** @type {import("../format/Feature.js").default} */
        this.format_
      )), this.strategy_ = e.strategy !== void 0 ? e.strategy : wne;
      const t = e.useSpatialIndex !== void 0 ? e.useSpatialIndex : !0;
      this.featuresRtree_ = t ? new m2() : null, this.loadedExtentsRtree_ = new m2(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null;
      let i, a;
      Array.isArray(e.features) ? a = e.features : e.features && (i = e.features, a = i.getArray()), !t && i === void 0 && (i = new bf(a)), a !== void 0 && this.addFeaturesInternal(a), i !== void 0 && this.bindFeaturesCollection_(i);
    }
    /**
     * Add a single feature to the source.  If you want to add a batch of features
     * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}
     * instead. A feature will not be added to the source if feature with
     * the same id is already there. The reason for this behavior is to avoid
     * feature duplication when using bbox or tile loading strategies.
     * Note: this also applies if an {@link module:ol/Collection~Collection} is used for features,
     * meaning that if a feature with a duplicate id is added in the collection, it will
     * be removed from it right away.
     * @param {FeatureClass} feature Feature to add.
     * @api
     */
    addFeature(e) {
      this.addFeatureInternal(e), this.changed();
    }
    /**
     * Add a feature without firing a `change` event.
     * @param {FeatureClass} feature Feature.
     * @protected
     */
    addFeatureInternal(e) {
      const t = Pi(e);
      if (!this.addToIndex_(t, e)) {
        this.featuresCollection_ && this.featuresCollection_.remove(e);
        return;
      }
      this.setupChangeEvents_(t, e);
      const i = e.getGeometry();
      if (i) {
        const a = i.getExtent();
        this.featuresRtree_ && this.featuresRtree_.insert(a, e);
      } else
        this.nullGeometryFeatures_[t] = e;
      this.dispatchEvent(
        new zg(Ef.ADDFEATURE, e)
      );
    }
    /**
     * @param {string} featureKey Unique identifier for the feature.
     * @param {FeatureClass} feature The feature.
     * @private
     */
    setupChangeEvents_(e, t) {
      t instanceof wv || (this.featureChangeKeys_[e] = [
        di(t, Cn.CHANGE, this.handleFeatureChange_, this),
        di(
          t,
          s_.PROPERTYCHANGE,
          this.handleFeatureChange_,
          this
        )
      ]);
    }
    /**
     * @param {string} featureKey Unique identifier for the feature.
     * @param {FeatureClass} feature The feature.
     * @return {boolean} The feature is "valid", in the sense that it is also a
     *     candidate for insertion into the Rtree.
     * @private
     */
    addToIndex_(e, t) {
      let i = !0;
      if (t.getId() !== void 0) {
        const a = String(t.getId());
        if (!(a in this.idIndex_))
          this.idIndex_[a] = t;
        else if (t instanceof wv) {
          const o = this.idIndex_[a];
          o instanceof wv ? Array.isArray(o) ? o.push(t) : this.idIndex_[a] = [o, t] : i = !1;
        } else
          i = !1;
      }
      return i && (Ei(
        !(e in this.uidIndex_),
        "The passed `feature` was already added to the source"
      ), this.uidIndex_[e] = t), i;
    }
    /**
     * Add a batch of features to the source.
     * @param {Array<FeatureClass>} features Features to add.
     * @api
     */
    addFeatures(e) {
      this.addFeaturesInternal(e), this.changed();
    }
    /**
     * Add features without firing a `change` event.
     * @param {Array<FeatureClass>} features Features.
     * @protected
     */
    addFeaturesInternal(e) {
      const t = [], i = [], a = [];
      for (let o = 0, u = e.length; o < u; o++) {
        const c = e[o], p = Pi(c);
        this.addToIndex_(p, c) && i.push(c);
      }
      for (let o = 0, u = i.length; o < u; o++) {
        const c = i[o], p = Pi(c);
        this.setupChangeEvents_(p, c);
        const y = c.getGeometry();
        if (y) {
          const _ = y.getExtent();
          t.push(_), a.push(c);
        } else
          this.nullGeometryFeatures_[p] = c;
      }
      if (this.featuresRtree_ && this.featuresRtree_.load(t, a), this.hasListener(Ef.ADDFEATURE))
        for (let o = 0, u = i.length; o < u; o++)
          this.dispatchEvent(
            new zg(Ef.ADDFEATURE, i[o])
          );
    }
    /**
     * @param {!Collection<FeatureClass>} collection Collection.
     * @private
     */
    bindFeaturesCollection_(e) {
      let t = !1;
      this.addEventListener(
        Ef.ADDFEATURE,
        /**
         * @param {VectorSourceEvent<FeatureClass>} evt The vector source event
         */
        function(i) {
          t || (t = !0, e.push(i.feature), t = !1);
        }
      ), this.addEventListener(
        Ef.REMOVEFEATURE,
        /**
         * @param {VectorSourceEvent<FeatureClass>} evt The vector source event
         */
        function(i) {
          t || (t = !0, e.remove(i.feature), t = !1);
        }
      ), e.addEventListener(
        Al.ADD,
        /**
         * @param {import("../Collection.js").CollectionEvent<FeatureClass>} evt The collection event
         */
        (i) => {
          t || (t = !0, this.addFeature(i.element), t = !1);
        }
      ), e.addEventListener(
        Al.REMOVE,
        /**
         * @param {import("../Collection.js").CollectionEvent<FeatureClass>} evt The collection event
         */
        (i) => {
          t || (t = !0, this.removeFeature(i.element), t = !1);
        }
      ), this.featuresCollection_ = e;
    }
    /**
     * Remove all features from the source.
     * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature} events.
     * @api
     */
    clear(e) {
      if (e) {
        for (const i in this.featureChangeKeys_)
          this.featureChangeKeys_[i].forEach(Or);
        this.featuresCollection_ || (this.featureChangeKeys_ = {}, this.idIndex_ = {}, this.uidIndex_ = {});
      } else if (this.featuresRtree_) {
        const i = (a) => {
          this.removeFeatureInternal(a);
        };
        this.featuresRtree_.forEach(i);
        for (const a in this.nullGeometryFeatures_)
          this.removeFeatureInternal(this.nullGeometryFeatures_[a]);
      }
      this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {};
      const t = new zg(Ef.CLEAR);
      this.dispatchEvent(t), this.changed();
    }
    /**
     * Iterate through all features on the source, calling the provided callback
     * with each one.  If the callback returns any "truthy" value, iteration will
     * stop and the function will return the same value.
     * Note: this function only iterate through the feature that have a defined geometry.
     *
     * @param {function(FeatureClass): T} callback Called with each feature
     *     on the source.  Return a truthy value to stop iteration.
     * @return {T|undefined} The return value from the last call to the callback.
     * @template T
     * @api
     */
    forEachFeature(e) {
      if (this.featuresRtree_)
        return this.featuresRtree_.forEach(e);
      this.featuresCollection_ && this.featuresCollection_.forEach(e);
    }
    /**
     * Iterate through all features whose geometries contain the provided
     * coordinate, calling the callback with each feature.  If the callback returns
     * a "truthy" value, iteration will stop and the function will return the same
     * value.
     *
     * For {@link module:ol/render/Feature~RenderFeature} features, the callback will be
     * called for all features.
     *
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {function(FeatureClass): T} callback Called with each feature
     *     whose goemetry contains the provided coordinate.
     * @return {T|undefined} The return value from the last call to the callback.
     * @template T
     */
    forEachFeatureAtCoordinateDirect(e, t) {
      const i = [e[0], e[1], e[0], e[1]];
      return this.forEachFeatureInExtent(i, function(a) {
        const o = a.getGeometry();
        if (o instanceof wv || o.intersectsCoordinate(e))
          return t(a);
      });
    }
    /**
     * Iterate through all features whose bounding box intersects the provided
     * extent (note that the feature's geometry may not intersect the extent),
     * calling the callback with each feature.  If the callback returns a "truthy"
     * value, iteration will stop and the function will return the same value.
     *
     * If you are interested in features whose geometry intersects an extent, call
     * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.
     *
     * When `useSpatialIndex` is set to false, this method will loop through all
     * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.
     *
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {function(FeatureClass): T} callback Called with each feature
     *     whose bounding box intersects the provided extent.
     * @return {T|undefined} The return value from the last call to the callback.
     * @template T
     * @api
     */
    forEachFeatureInExtent(e, t) {
      if (this.featuresRtree_)
        return this.featuresRtree_.forEachInExtent(e, t);
      this.featuresCollection_ && this.featuresCollection_.forEach(t);
    }
    /**
     * Iterate through all features whose geometry intersects the provided extent,
     * calling the callback with each feature.  If the callback returns a "truthy"
     * value, iteration will stop and the function will return the same value.
     *
     * If you only want to test for bounding box intersection, call the
     * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.
     *
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {function(FeatureClass): T} callback Called with each feature
     *     whose geometry intersects the provided extent.
     * @return {T|undefined} The return value from the last call to the callback.
     * @template T
     * @api
     */
    forEachFeatureIntersectingExtent(e, t) {
      return this.forEachFeatureInExtent(
        e,
        /**
         * @param {FeatureClass} feature Feature.
         * @return {T|undefined} The return value from the last call to the callback.
         */
        function(i) {
          const a = i.getGeometry();
          if (a instanceof wv || a.intersectsExtent(e)) {
            const o = t(i);
            if (o)
              return o;
          }
        }
      );
    }
    /**
     * Get the features collection associated with this source. Will be `null`
     * unless the source was configured with `useSpatialIndex` set to `false`, or
     * with an {@link module:ol/Collection~Collection} as `features`.
     * @return {Collection<FeatureClass>|null} The collection of features.
     * @api
     */
    getFeaturesCollection() {
      return this.featuresCollection_;
    }
    /**
     * Get a snapshot of the features currently on the source in random order. The returned array
     * is a copy, the features are references to the features in the source.
     * @return {Array<FeatureClass>} Features.
     * @api
     */
    getFeatures() {
      let e;
      return this.featuresCollection_ ? e = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (e = this.featuresRtree_.getAll(), q0(this.nullGeometryFeatures_) || o_(e, Object.values(this.nullGeometryFeatures_))), e;
    }
    /**
     * Get all features whose geometry intersects the provided coordinate.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @return {Array<import("../Feature.js").default>} Features.
     * @api
     */
    getFeaturesAtCoordinate(e) {
      const t = [];
      return this.forEachFeatureAtCoordinateDirect(e, function(i) {
        t.push(i);
      }), t;
    }
    /**
     * Get all features whose bounding box intersects the provided extent.  Note that this returns an array of
     * all features intersecting the given extent in random order (so it may include
     * features whose geometries do not intersect the extent).
     *
     * When `useSpatialIndex` is set to false, this method will return all
     * features.
     *
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {import("../proj/Projection.js").default} [projection] Include features
     * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.
     * @return {Array<FeatureClass>} Features.
     * @api
     */
    getFeaturesInExtent(e, t) {
      if (this.featuresRtree_) {
        if (!(t && t.canWrapX() && this.getWrapX()))
          return this.featuresRtree_.getInExtent(e);
        const a = zB(e, t);
        return [].concat(
          ...a.map((o) => this.featuresRtree_.getInExtent(o))
        );
      }
      return this.featuresCollection_ ? this.featuresCollection_.getArray().slice(0) : [];
    }
    /**
     * Get the closest feature to the provided coordinate.
     *
     * This method is not available when the source is configured with
     * `useSpatialIndex` set to `false` and the features in this source are of type
     * {@link module:ol/Feature~Feature}.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {function(FeatureClass):boolean} [filter] Feature filter function.
     *     The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}
     *     and it should return a boolean value. By default, no filtering is made.
     * @return {FeatureClass} Closest feature.
     * @api
     */
    getClosestFeatureToCoordinate(e, t) {
      const i = e[0], a = e[1];
      let o = null;
      const u = [NaN, NaN];
      let c = 1 / 0;
      const p = [-1 / 0, -1 / 0, 1 / 0, 1 / 0];
      return t = t || FE, this.featuresRtree_.forEachInExtent(
        p,
        /**
         * @param {FeatureClass} feature Feature.
         */
        function(y) {
          if (t(y)) {
            const _ = y.getGeometry(), S = c;
            if (c = _ instanceof wv ? 0 : _.closestPointXY(i, a, u, c), c < S) {
              o = y;
              const b = Math.sqrt(c);
              p[0] = i - b, p[1] = a - b, p[2] = i + b, p[3] = a + b;
            }
          }
        }
      ), o;
    }
    /**
     * Get the extent of the features currently in the source.
     *
     * This method is not available when the source is configured with
     * `useSpatialIndex` set to `false`.
     * @param {import("../extent.js").Extent} [extent] Destination extent. If provided, no new extent
     *     will be created. Instead, that extent's coordinates will be overwritten.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getExtent(e) {
      return this.featuresRtree_.getExtent(e);
    }
    /**
     * Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s
     * are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling
     * of `GeometryCollection` geometries, where format readers create one `RenderFeature` per
     * `GeometryCollection` member.
     * Note that the index treats string and numeric identifiers as the same.  So
     * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
     *
     * @param {string|number} id Feature identifier.
     * @return {FeatureClass|Array<RenderFeature>|null} The feature (or `null` if not found).
     * @api
     */
    getFeatureById(e) {
      const t = this.idIndex_[e.toString()];
      return t !== void 0 ? t : null;
    }
    /**
     * Get a feature by its internal unique identifier (using `getUid`).
     *
     * @param {string} uid Feature identifier.
     * @return {FeatureClass|null} The feature (or `null` if not found).
     */
    getFeatureByUid(e) {
      const t = this.uidIndex_[e];
      return t !== void 0 ? t : null;
    }
    /**
     * Get the format associated with this source.
     *
     * @return {import("../format/Feature.js").default|undefined} The feature format.
     * @api
     */
    getFormat() {
      return this.format_;
    }
    /**
     * @return {boolean} The source can have overlapping geometries.
     */
    getOverlaps() {
      return this.overlaps_;
    }
    /**
     * Get the url associated with this source.
     *
     * @return {string|import("../featureloader.js").FeatureUrlFunction|undefined} The url.
     * @api
     */
    getUrl() {
      return this.url_;
    }
    /**
     * @param {Event} event Event.
     * @private
     */
    handleFeatureChange_(e) {
      const t = (
        /** @type {FeatureClass} */
        e.target
      ), i = Pi(t), a = t.getGeometry();
      if (!a)
        i in this.nullGeometryFeatures_ || (this.featuresRtree_ && this.featuresRtree_.remove(t), this.nullGeometryFeatures_[i] = t);
      else {
        const u = a.getExtent();
        i in this.nullGeometryFeatures_ ? (delete this.nullGeometryFeatures_[i], this.featuresRtree_ && this.featuresRtree_.insert(u, t)) : this.featuresRtree_ && this.featuresRtree_.update(u, t);
      }
      const o = t.getId();
      if (o !== void 0) {
        const u = o.toString();
        this.idIndex_[u] !== t && (this.removeFromIdIndex_(t), this.idIndex_[u] = t);
      } else
        this.removeFromIdIndex_(t), this.uidIndex_[i] = t;
      this.changed(), this.dispatchEvent(
        new zg(Ef.CHANGEFEATURE, t)
      );
    }
    /**
     * Returns true if the feature is contained within the source.
     * @param {FeatureClass} feature Feature.
     * @return {boolean} Has feature.
     * @api
     */
    hasFeature(e) {
      const t = e.getId();
      return t !== void 0 ? t in this.idIndex_ : Pi(e) in this.uidIndex_;
    }
    /**
     * @return {boolean} Is empty.
     */
    isEmpty() {
      return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && q0(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0;
    }
    /**
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} resolution Resolution.
     * @param {import("../proj/Projection.js").default} projection Projection.
     */
    loadFeatures(e, t, i) {
      const a = this.loadedExtentsRtree_, o = this.strategy_(e, t, i);
      for (let u = 0, c = o.length; u < c; ++u) {
        const p = o[u];
        a.forEachInExtent(
          p,
          /**
           * @param {{extent: import("../extent.js").Extent}} object Object.
           * @return {boolean} Contains.
           */
          function(_) {
            return xf(_.extent, p);
          }
        ) || (++this.loadingExtentsCount_, this.dispatchEvent(
          new zg(Ef.FEATURESLOADSTART)
        ), this.loader_.call(
          this,
          p,
          t,
          i,
          (_) => {
            --this.loadingExtentsCount_, this.dispatchEvent(
              new zg(
                Ef.FEATURESLOADEND,
                void 0,
                _
              )
            );
          },
          () => {
            --this.loadingExtentsCount_, this.dispatchEvent(
              new zg(Ef.FEATURESLOADERROR)
            );
          }
        ), a.insert(p, { extent: p.slice() }));
      }
      this.loading = this.loader_.length < 4 ? !1 : this.loadingExtentsCount_ > 0;
    }
    refresh() {
      this.clear(!0), this.loadedExtentsRtree_.clear(), super.refresh();
    }
    /**
     * Remove an extent from the list of loaded extents.
     * @param {import("../extent.js").Extent} extent Extent.
     * @api
     */
    removeLoadedExtent(e) {
      const t = this.loadedExtentsRtree_;
      let i;
      t.forEachInExtent(e, function(a) {
        if (K0(a.extent, e))
          return i = a, !0;
      }), i && t.remove(i);
    }
    /**
     * Remove a single feature from the source.  If you want to remove all features
     * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method
     * instead.
     * @param {FeatureClass} feature Feature to remove.
     * @api
     */
    removeFeature(e) {
      if (!e)
        return;
      const t = Pi(e);
      t in this.nullGeometryFeatures_ ? delete this.nullGeometryFeatures_[t] : this.featuresRtree_ && this.featuresRtree_.remove(e), this.removeFeatureInternal(e) && this.changed();
    }
    /**
     * Remove feature without firing a `change` event.
     * @param {FeatureClass} feature Feature.
     * @return {FeatureClass|undefined} The removed feature
     *     (or undefined if the feature was not found).
     * @protected
     */
    removeFeatureInternal(e) {
      const t = Pi(e), i = this.featureChangeKeys_[t];
      if (!i)
        return;
      i.forEach(Or), delete this.featureChangeKeys_[t];
      const a = e.getId();
      return a !== void 0 && delete this.idIndex_[a.toString()], delete this.uidIndex_[t], this.dispatchEvent(
        new zg(Ef.REMOVEFEATURE, e)
      ), e;
    }
    /**
     * Remove a feature from the id index.  Called internally when the feature id
     * may have changed.
     * @param {FeatureClass} feature The feature.
     * @return {boolean} Removed the feature from the index.
     * @private
     */
    removeFromIdIndex_(e) {
      let t = !1;
      for (const i in this.idIndex_) {
        const a = this.idIndex_[i];
        if (e instanceof wv && Array.isArray(a) && a.includes(e))
          a.splice(a.indexOf(e), 1);
        else if (this.idIndex_[i] === e) {
          delete this.idIndex_[i], t = !0;
          break;
        }
      }
      return t;
    }
    /**
     * Set the new loader of the source. The next render cycle will use the
     * new loader.
     * @param {import("../featureloader.js").FeatureLoader} loader The loader to set.
     * @api
     */
    setLoader(e) {
      this.loader_ = e;
    }
    /**
     * Points the source to a new url. The next render cycle will use the new url.
     * @param {string|import("../featureloader.js").FeatureUrlFunction} url Url.
     * @api
     */
    setUrl(e) {
      Ei(this.format_, "`format` must be set when `url` is set"), this.url_ = e, this.setLoader(_2(e, this.format_));
    }
  }
  const Mne = Rne, Jt = {
    IDLE: 0,
    LOADING: 1,
    LOADED: 2,
    /**
     * Indicates that tile loading failed
     * @type {number}
     */
    ERROR: 3,
    EMPTY: 4
  };
  class One extends fS {
    /**
     * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("./TileState.js").default} state State.
     * @param {Options} [options] Tile options.
     */
    constructor(e, t, i) {
      super(), i = i || {}, this.tileCoord = e, this.state = t, this.interimTile = null, this.key = "", this.transition_ = i.transition === void 0 ? 250 : i.transition, this.transitionStarts_ = {}, this.interpolate = !!i.interpolate;
    }
    /**
     * @protected
     */
    changed() {
      this.dispatchEvent(Cn.CHANGE);
    }
    /**
     * Called by the tile cache when the tile is removed from the cache due to expiry
     */
    release() {
      this.state === Jt.ERROR && this.setState(Jt.EMPTY);
    }
    /**
     * @return {string} Key.
     */
    getKey() {
      return this.key + "/" + this.tileCoord;
    }
    /**
     * Get the interim tile most suitable for rendering using the chain of interim
     * tiles. This corresponds to the  most recent tile that has been loaded, if no
     * such tile exists, the original tile is returned.
     * @return {!Tile} Best tile for rendering.
     */
    getInterimTile() {
      let e = this.interimTile;
      if (!e)
        return this;
      do {
        if (e.getState() == Jt.LOADED)
          return this.transition_ = 0, e;
        e = e.interimTile;
      } while (e);
      return this;
    }
    /**
     * Goes through the chain of interim tiles and discards sections of the chain
     * that are no longer relevant.
     */
    refreshInterimChain() {
      let e = this.interimTile;
      if (!e)
        return;
      let t = this;
      do {
        if (e.getState() == Jt.LOADED) {
          e.interimTile = null;
          break;
        }
        e.getState() == Jt.LOADING ? t = e : e.getState() == Jt.IDLE ? t.interimTile = e.interimTile : t = e, e = t.interimTile;
      } while (e);
    }
    /**
     * Get the tile coordinate for this tile.
     * @return {import("./tilecoord.js").TileCoord} The tile coordinate.
     * @api
     */
    getTileCoord() {
      return this.tileCoord;
    }
    /**
     * @return {import("./TileState.js").default} State.
     */
    getState() {
      return this.state;
    }
    /**
     * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,
     * it is important to set the state correctly to {@link module:ol/TileState~ERROR}
     * when the tile cannot be loaded. Otherwise the tile cannot be removed from
     * the tile queue and will block other requests.
     * @param {import("./TileState.js").default} state State.
     * @api
     */
    setState(e) {
      if (this.state !== Jt.ERROR && this.state > e)
        throw new Error("Tile load sequence violation");
      this.state = e, this.changed();
    }
    /**
     * Load the image or retry if loading previously failed.
     * Loading is taken care of by the tile queue, and calling this method is
     * only needed for preloading or for reloading in case of an error.
     * @abstract
     * @api
     */
    load() {
      yi();
    }
    /**
     * Get the alpha value for rendering.
     * @param {string} id An id for the renderer.
     * @param {number} time The render frame time.
     * @return {number} A number between 0 and 1.
     */
    getAlpha(e, t) {
      if (!this.transition_)
        return 1;
      let i = this.transitionStarts_[e];
      if (!i)
        i = t, this.transitionStarts_[e] = i;
      else if (i === -1)
        return 1;
      const a = t - i + 1e3 / 60;
      return a >= this.transition_ ? 1 : Qj(a / this.transition_);
    }
    /**
     * Determine if a tile is in an alpha transition.  A tile is considered in
     * transition if tile.getAlpha() has not yet been called or has been called
     * and returned 1.
     * @param {string} id An id for the renderer.
     * @return {boolean} The tile is in transition.
     */
    inTransition(e) {
      return this.transition_ ? this.transitionStarts_[e] !== -1 : !1;
    }
    /**
     * Mark a transition as complete.
     * @param {string} id An id for the renderer.
     */
    endTransition(e) {
      this.transition_ && (this.transitionStarts_[e] = -1);
    }
  }
  const yU = One;
  class Ane extends yU {
    /**
     * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("./TileState.js").default} state State.
     * @param {string} src Image source URI.
     * @param {?string} crossOrigin Cross origin.
     * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
     * @param {import("./Tile.js").Options} [options] Tile options.
     */
    constructor(e, t, i, a, o, u) {
      super(e, t, u), this.crossOrigin_ = a, this.src_ = i, this.key = i, this.image_ = new Image(), a !== null && (this.image_.crossOrigin = a), this.unlisten_ = null, this.tileLoadFunction_ = o;
    }
    /**
     * Get the HTML image element for this tile (may be a Canvas, Image, or Video).
     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
     * @api
     */
    getImage() {
      return this.image_;
    }
    /**
     * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).
     * @param {HTMLCanvasElement|HTMLImageElement} element Element.
     */
    setImage(e) {
      this.image_ = e, this.state = Jt.LOADED, this.unlistenImage_(), this.changed();
    }
    /**
     * Tracks loading or read errors.
     *
     * @private
     */
    handleImageError_() {
      this.state = Jt.ERROR, this.unlistenImage_(), this.image_ = Lne(), this.changed();
    }
    /**
     * Tracks successful image load.
     *
     * @private
     */
    handleImageLoad_() {
      const e = (
        /** @type {HTMLImageElement} */
        this.image_
      );
      e.naturalWidth && e.naturalHeight ? this.state = Jt.LOADED : this.state = Jt.EMPTY, this.unlistenImage_(), this.changed();
    }
    /**
     * Load the image or retry if loading previously failed.
     * Loading is taken care of by the tile queue, and calling this method is
     * only needed for preloading or for reloading in case of an error.
     *
     * To retry loading tiles on failed requests, use a custom `tileLoadFunction`
     * that checks for error status codes and reloads only when the status code is
     * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been
     * made already:
     *
     * ```js
     * const retryCodes = [408, 429, 500, 502, 503, 504];
     * const retries = {};
     * source.setTileLoadFunction((tile, src) => {
     *   const image = tile.getImage();
     *   fetch(src)
     *     .then((response) => {
     *       if (retryCodes.includes(response.status)) {
     *         retries[src] = (retries[src] || 0) + 1;
     *         if (retries[src] <= 3) {
     *           setTimeout(() => tile.load(), retries[src] * 1000);
     *         }
     *         return Promise.reject();
     *       }
     *       return response.blob();
     *     })
     *     .then((blob) => {
     *       const imageUrl = URL.createObjectURL(blob);
     *       image.src = imageUrl;
     *       setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);
     *     })
     *     .catch(() => tile.setState(3)); // error
     * });
     * ```
     *
     * @api
     */
    load() {
      this.state == Jt.ERROR && (this.state = Jt.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == Jt.IDLE && (this.state = Jt.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = $ee(
        this.image_,
        this.handleImageLoad_.bind(this),
        this.handleImageError_.bind(this)
      ));
    }
    /**
     * Discards event handlers which listen for load completion or errors.
     *
     * @private
     */
    unlistenImage_() {
      this.unlisten_ && (this.unlisten_(), this.unlisten_ = null);
    }
  }
  function Lne() {
    const n = tl(1, 1);
    return n.fillStyle = "rgba(0,0,0,0)", n.fillRect(0, 0, 1, 1), n.canvas;
  }
  const _U = Ane;
  class Nne {
    /**
     * @param {number} decay Rate of decay (must be negative).
     * @param {number} minVelocity Minimum velocity (pixels/millisecond).
     * @param {number} delay Delay to consider to calculate the kinetic
     *     initial values (milliseconds).
     */
    constructor(e, t, i) {
      this.decay_ = e, this.minVelocity_ = t, this.delay_ = i, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0;
    }
    /**
     * FIXME empty description for jsdoc
     */
    begin() {
      this.points_.length = 0, this.angle_ = 0, this.initialVelocity_ = 0;
    }
    /**
     * @param {number} x X.
     * @param {number} y Y.
     */
    update(e, t) {
      this.points_.push(e, t, Date.now());
    }
    /**
     * @return {boolean} Whether we should do kinetic animation.
     */
    end() {
      if (this.points_.length < 6)
        return !1;
      const e = Date.now() - this.delay_, t = this.points_.length - 3;
      if (this.points_[t + 2] < e)
        return !1;
      let i = t - 3;
      for (; i > 0 && this.points_[i + 2] > e; )
        i -= 3;
      const a = this.points_[t + 2] - this.points_[i + 2];
      if (a < 1e3 / 60)
        return !1;
      const o = this.points_[t] - this.points_[i], u = this.points_[t + 1] - this.points_[i + 1];
      return this.angle_ = Math.atan2(u, o), this.initialVelocity_ = Math.sqrt(o * o + u * u) / a, this.initialVelocity_ > this.minVelocity_;
    }
    /**
     * @return {number} Total distance travelled (pixels).
     */
    getDistance() {
      return (this.minVelocity_ - this.initialVelocity_) / this.decay_;
    }
    /**
     * @return {number} Angle of the kinetic panning animation (radians).
     */
    getAngle() {
      return this.angle_;
    }
  }
  const Dne = Nne;
  class Ine extends TL {
    /**
     * @param {import("../Map.js").default} map Map.
     */
    constructor(e) {
      super(), this.map_ = e;
    }
    /**
     * @abstract
     * @param {import("../render/EventType.js").default} type Event type.
     * @param {import("../Map.js").FrameState} frameState Frame state.
     */
    dispatchRenderEvent(e, t) {
      yi();
    }
    /**
     * @param {import("../Map.js").FrameState} frameState FrameState.
     * @protected
     */
    calculateMatrices2D(e) {
      const t = e.viewState, i = e.coordinateToPixelTransform, a = e.pixelToCoordinateTransform;
      Rf(
        i,
        e.size[0] / 2,
        e.size[1] / 2,
        1 / t.resolution,
        -1 / t.resolution,
        -t.rotation,
        -t.center[0],
        -t.center[1]
      ), Xw(a, i);
    }
    /**
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("../Map.js").FrameState} frameState FrameState.
     * @param {number} hitTolerance Hit tolerance in pixels.
     * @param {boolean} checkWrapped Check for wrapped geometries.
     * @param {import("./vector.js").FeatureCallback<T>} callback Feature callback.
     * @param {S} thisArg Value to use as `this` when executing `callback`.
     * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter
     *     function, only layers which are visible and for which this function
     *     returns `true` will be tested for features.  By default, all visible
     *     layers will be tested.
     * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.
     * @return {T|undefined} Callback result.
     * @template S,T,U
     */
    forEachFeatureAtCoordinate(e, t, i, a, o, u, c, p) {
      let y;
      const _ = t.viewState;
      function S(V, z, G, ie) {
        return o.call(u, z, V ? G : null, ie);
      }
      const b = _.projection, T = K2(e.slice(), b), O = [[0, 0]];
      if (b.canWrapX() && a) {
        const V = b.getExtent(), z = _i(V);
        O.push([-z, 0], [z, 0]);
      }
      const N = t.layerStatesArray, D = N.length, k = (
        /** @type {Array<HitMatch<T>>} */
        []
      ), $ = [];
      for (let V = 0; V < O.length; V++)
        for (let z = D - 1; z >= 0; --z) {
          const G = N[z], ie = G.layer;
          if (ie.hasRenderer() && nN(G, _) && c.call(p, ie)) {
            const ue = ie.getRenderer(), Re = ie.getSource();
            if (ue && Re) {
              const Oe = Re.getWrapX() ? T : e, $e = S.bind(
                null,
                G.managed
              );
              $[0] = Oe[0] + O[V][0], $[1] = Oe[1] + O[V][1], y = ue.forEachFeatureAtCoordinate(
                $,
                t,
                i,
                $e,
                k
              );
            }
            if (y)
              return y;
          }
        }
      if (k.length === 0)
        return;
      const B = 1 / k.length;
      return k.forEach((V, z) => V.distanceSq += z * B), k.sort((V, z) => V.distanceSq - z.distanceSq), k.some((V) => y = V.callback(V.feature, V.layer, V.geometry)), y;
    }
    /**
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {import("../Map.js").FrameState} frameState FrameState.
     * @param {number} hitTolerance Hit tolerance in pixels.
     * @param {boolean} checkWrapped Check for wrapped geometries.
     * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter
     *     function, only layers which are visible and for which this function
     *     returns `true` will be tested for features.  By default, all visible
     *     layers will be tested.
     * @param {U} thisArg Value to use as `this` when executing `layerFilter`.
     * @return {boolean} Is there a feature at the given coordinate?
     * @template U
     */
    hasFeatureAtCoordinate(e, t, i, a, o, u) {
      return this.forEachFeatureAtCoordinate(
        e,
        t,
        i,
        a,
        FE,
        this,
        o,
        u
      ) !== void 0;
    }
    /**
     * @return {import("../Map.js").default} Map.
     */
    getMap() {
      return this.map_;
    }
    /**
     * Render.
     * @abstract
     * @param {?import("../Map.js").FrameState} frameState Frame state.
     */
    renderFrame(e) {
      yi();
    }
    /**
     * @param {import("../Map.js").FrameState} frameState Frame state.
     */
    flushDeclutterItems(e) {
    }
    /**
     * @param {import("../Map.js").FrameState} frameState Frame state.
     * @protected
     */
    scheduleExpireIconCache(e) {
      yw.canExpireCache() && e.postRenderFunctions.push(Pne);
    }
  }
  function Pne(n, e) {
    yw.expire();
  }
  const kne = Ine;
  class Fne extends kne {
    /**
     * @param {import("../Map.js").default} map Map.
     */
    constructor(e) {
      super(e), this.fontChangeListenerKey_ = di(
        mp,
        s_.PROPERTYCHANGE,
        e.redrawText.bind(e)
      ), this.element_ = document.createElement("div");
      const t = this.element_.style;
      t.position = "absolute", t.width = "100%", t.height = "100%", t.zIndex = "0", this.element_.className = dS + " ol-layers";
      const i = e.getViewport();
      i.insertBefore(this.element_, i.firstChild || null), this.children_ = [], this.renderedVisible_ = !0, this.declutterLayers_ = [];
    }
    /**
     * @param {import("../render/EventType.js").default} type Event type.
     * @param {import("../Map.js").FrameState} frameState Frame state.
     */
    dispatchRenderEvent(e, t) {
      const i = this.getMap();
      if (i.hasListener(e)) {
        const a = new pU(e, void 0, t);
        i.dispatchEvent(a);
      }
    }
    disposeInternal() {
      Or(this.fontChangeListenerKey_), this.element_.parentNode.removeChild(this.element_), super.disposeInternal();
    }
    /**
     * Render.
     * @param {?import("../Map.js").FrameState} frameState Frame state.
     */
    renderFrame(e) {
      if (!e) {
        this.renderedVisible_ && (this.element_.style.display = "none", this.renderedVisible_ = !1);
        return;
      }
      this.calculateMatrices2D(e), this.dispatchRenderEvent(Hh.PRECOMPOSE, e);
      const t = e.layerStatesArray.sort(function(u, c) {
        return u.zIndex - c.zIndex;
      }), i = e.viewState;
      this.children_.length = 0;
      const a = this.declutterLayers_;
      a.length = 0;
      let o = null;
      for (let u = 0, c = t.length; u < c; ++u) {
        const p = t[u];
        e.layerIndex = u;
        const y = p.layer, _ = y.getSourceState();
        if (!nN(p, i) || _ != "ready" && _ != "undefined") {
          y.unrender();
          continue;
        }
        const S = y.render(e, o);
        S && (S !== o && (this.children_.push(S), o = S), "getDeclutter" in y && a.push(
          /** @type {import("../layer/BaseVector.js").default} */
          y
        ));
      }
      this.flushDeclutterItems(e), lee(this.element_, this.children_), this.dispatchRenderEvent(Hh.POSTCOMPOSE, e), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(e);
    }
    /**
     * @param {import("../Map.js").FrameState} frameState Frame state.
     */
    flushDeclutterItems(e) {
      const t = this.declutterLayers_;
      for (let i = t.length - 1; i >= 0; --i)
        t[i].renderDeclutter(e);
      t.length = 0;
    }
  }
  const jne = Fne;
  class Une extends Xh {
    /**
     * @param {string} type Event type.
     * @param {import("./Map.js").default} map Map.
     * @param {?import("./Map.js").FrameState} [frameState] Frame state.
     */
    constructor(e, t, i) {
      super(e), this.map = t, this.frameState = i !== void 0 ? i : null;
    }
  }
  const I0 = Une;
  class zne extends I0 {
    /**
     * @param {string} type Event type.
     * @param {import("./Map.js").default} map Map.
     * @param {EVENT} originalEvent Original event.
     * @param {boolean} [dragging] Is the map currently being dragged?
     * @param {import("./Map.js").FrameState} [frameState] Frame state.
     * @param {Array<PointerEvent>} [activePointers] Active pointers.
     */
    constructor(e, t, i, a, o, u) {
      super(e, t, o), this.originalEvent = i, this.pixel_ = null, this.coordinate_ = null, this.dragging = a !== void 0 ? a : !1, this.activePointers = u;
    }
    /**
     * The map pixel relative to the viewport corresponding to the original event.
     * @type {import("./pixel.js").Pixel}
     * @api
     */
    get pixel() {
      return this.pixel_ || (this.pixel_ = this.map.getEventPixel(this.originalEvent)), this.pixel_;
    }
    set pixel(e) {
      this.pixel_ = e;
    }
    /**
     * The coordinate corresponding to the original browser event.  This will be in the user
     * projection if one is set.  Otherwise it will be in the view projection.
     * @type {import("./coordinate.js").Coordinate}
     * @api
     */
    get coordinate() {
      return this.coordinate_ || (this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel)), this.coordinate_;
    }
    set coordinate(e) {
      this.coordinate_ = e;
    }
    /**
     * Prevents the default browser action.
     * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.
     * @api
     */
    preventDefault() {
      super.preventDefault(), "preventDefault" in this.originalEvent && this.originalEvent.preventDefault();
    }
    /**
     * Prevents further propagation of the current event.
     * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.
     * @api
     */
    stopPropagation() {
      super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation();
    }
  }
  const Vg = zne, ha = {
    /**
     * A true single click with no dragging and no double click. Note that this
     * event is delayed by 250 ms to ensure that it is not a double click.
     * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick
     * @api
     */
    SINGLECLICK: "singleclick",
    /**
     * A click with no dragging. A double click will fire two of this.
     * @event module:ol/MapBrowserEvent~MapBrowserEvent#click
     * @api
     */
    CLICK: Cn.CLICK,
    /**
     * A true double click, with no dragging.
     * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick
     * @api
     */
    DBLCLICK: Cn.DBLCLICK,
    /**
     * Triggered when a pointer is dragged.
     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag
     * @api
     */
    POINTERDRAG: "pointerdrag",
    /**
     * Triggered when a pointer is moved. Note that on touch devices this is
     * triggered when the map is panned, so is not the same as mousemove.
     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove
     * @api
     */
    POINTERMOVE: "pointermove",
    POINTERDOWN: "pointerdown",
    POINTERUP: "pointerup",
    POINTEROVER: "pointerover",
    POINTEROUT: "pointerout",
    POINTERENTER: "pointerenter",
    POINTERLEAVE: "pointerleave",
    POINTERCANCEL: "pointercancel"
  }, IA = {
    POINTERMOVE: "pointermove",
    POINTERDOWN: "pointerdown",
    POINTERUP: "pointerup",
    POINTEROVER: "pointerover",
    POINTEROUT: "pointerout",
    POINTERENTER: "pointerenter",
    POINTERLEAVE: "pointerleave",
    POINTERCANCEL: "pointercancel"
  };
  class $ne extends fS {
    /**
     * @param {import("./Map.js").default} map The map with the viewport to listen to events on.
     * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.
     */
    constructor(e, t) {
      super(e), this.map_ = e, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = t === void 0 ? 1 : t, this.down_ = null;
      const i = this.map_.getViewport();
      this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = i, this.pointerdownListenerKey_ = di(
        i,
        IA.POINTERDOWN,
        this.handlePointerDown_,
        this
      ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = di(
        i,
        IA.POINTERMOVE,
        this.relayMoveEvent_,
        this
      ), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener(
        Cn.TOUCHMOVE,
        this.boundHandleTouchMove_,
        Rj ? { passive: !1 } : !1
      );
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    emulateClick_(e) {
      let t = new Vg(
        ha.CLICK,
        this.map_,
        e
      );
      this.dispatchEvent(t), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, t = new Vg(
        ha.DBLCLICK,
        this.map_,
        e
      ), this.dispatchEvent(t)) : this.clickTimeoutId_ = setTimeout(() => {
        this.clickTimeoutId_ = void 0;
        const i = new Vg(
          ha.SINGLECLICK,
          this.map_,
          e
        );
        this.dispatchEvent(i);
      }, 250);
    }
    /**
     * Keeps track on how many pointers are currently active.
     *
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    updateActivePointers_(e) {
      const t = e, i = t.pointerId;
      if (t.type == ha.POINTERUP || t.type == ha.POINTERCANCEL) {
        delete this.trackedTouches_[i];
        for (const a in this.trackedTouches_)
          if (this.trackedTouches_[a].target !== t.target) {
            delete this.trackedTouches_[a];
            break;
          }
      } else
        (t.type == ha.POINTERDOWN || t.type == ha.POINTERMOVE) && (this.trackedTouches_[i] = t);
      this.activePointers_ = Object.values(this.trackedTouches_);
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    handlePointerUp_(e) {
      this.updateActivePointers_(e);
      const t = new Vg(
        ha.POINTERUP,
        this.map_,
        e,
        void 0,
        void 0,
        this.activePointers_
      );
      this.dispatchEvent(t), this.emulateClicks_ && !t.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(e) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(Or), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null);
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @return {boolean} If the left mouse button was pressed.
     * @private
     */
    isMouseActionButton_(e) {
      return e.button === 0;
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    handlePointerDown_(e) {
      this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(e);
      const t = new Vg(
        ha.POINTERDOWN,
        this.map_,
        e,
        void 0,
        void 0,
        this.activePointers_
      );
      if (this.dispatchEvent(t), this.down_ = new PointerEvent(e.type, e), Object.defineProperty(this.down_, "target", {
        writable: !1,
        value: e.target
      }), this.dragListenerKeys_.length === 0) {
        const i = this.map_.getOwnerDocument();
        this.dragListenerKeys_.push(
          di(
            i,
            ha.POINTERMOVE,
            this.handlePointerMove_,
            this
          ),
          di(i, ha.POINTERUP, this.handlePointerUp_, this),
          /* Note that the listener for `pointercancel is set up on
           * `pointerEventHandler_` and not `documentPointerEventHandler_` like
           * the `pointerup` and `pointermove` listeners.
           *
           * The reason for this is the following: `TouchSource.vacuumTouches_()`
           * issues `pointercancel` events, when there was no `touchend` for a
           * `touchstart`. Now, let's say a first `touchstart` is registered on
           * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.
           * But `documentPointerEventHandler_` doesn't know about the first
           * `touchstart`. If there is no `touchend` for the `touchstart`, we can
           * only receive a `touchcancel` from `pointerEventHandler_`, because it is
           * only registered there.
           */
          di(
            this.element_,
            ha.POINTERCANCEL,
            this.handlePointerUp_,
            this
          )
        ), this.element_.getRootNode && this.element_.getRootNode() !== i && this.dragListenerKeys_.push(
          di(
            this.element_.getRootNode(),
            ha.POINTERUP,
            this.handlePointerUp_,
            this
          )
        );
      }
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    handlePointerMove_(e) {
      if (this.isMoving_(e)) {
        this.updateActivePointers_(e), this.dragging_ = !0;
        const t = new Vg(
          ha.POINTERDRAG,
          this.map_,
          e,
          this.dragging_,
          void 0,
          this.activePointers_
        );
        this.dispatchEvent(t);
      }
    }
    /**
     * Wrap and relay a pointermove event.
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @private
     */
    relayMoveEvent_(e) {
      this.originalPointerMoveEvent_ = e;
      const t = !!(this.down_ && this.isMoving_(e));
      this.dispatchEvent(
        new Vg(
          ha.POINTERMOVE,
          this.map_,
          e,
          t
        )
      );
    }
    /**
     * Flexible handling of a `touch-action: none` css equivalent: because calling
     * `preventDefault()` on a `pointermove` event does not stop native page scrolling
     * and zooming, we also listen for `touchmove` and call `preventDefault()` on it
     * when an interaction (currently `DragPan` handles the event.
     * @param {TouchEvent} event Event.
     * @private
     */
    handleTouchMove_(e) {
      const t = this.originalPointerMoveEvent_;
      (!t || t.defaultPrevented) && (typeof e.cancelable != "boolean" || e.cancelable === !0) && e.preventDefault();
    }
    /**
     * @param {PointerEvent} pointerEvent Pointer
     * event.
     * @return {boolean} Is moving.
     * @private
     */
    isMoving_(e) {
      return this.dragging_ || Math.abs(e.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(e.clientY - this.down_.clientY) > this.moveTolerance_;
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.relayedListenerKey_ && (Or(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener(
        Cn.TOUCHMOVE,
        this.boundHandleTouchMove_
      ), this.pointerdownListenerKey_ && (Or(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(Or), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal();
    }
  }
  const Bne = $ne, vp = {
    /**
     * Triggered after a map frame is rendered.
     * @event module:ol/MapEvent~MapEvent#postrender
     * @api
     */
    POSTRENDER: "postrender",
    /**
     * Triggered when the map starts moving.
     * @event module:ol/MapEvent~MapEvent#movestart
     * @api
     */
    MOVESTART: "movestart",
    /**
     * Triggered after the map is moved.
     * @event module:ol/MapEvent~MapEvent#moveend
     * @api
     */
    MOVEEND: "moveend",
    /**
     * Triggered when loading of additional map data (tiles, images, features) starts.
     * @event module:ol/MapEvent~MapEvent#loadstart
     * @api
     */
    LOADSTART: "loadstart",
    /**
     * Triggered when loading of additional map data has completed.
     * @event module:ol/MapEvent~MapEvent#loadend
     * @api
     */
    LOADEND: "loadend"
  }, Co = {
    LAYERGROUP: "layergroup",
    SIZE: "size",
    TARGET: "target",
    VIEW: "view"
  }, xw = 1 / 0;
  class Vne {
    /**
     * @param {function(T): number} priorityFunction Priority function.
     * @param {function(T): string} keyFunction Key function.
     */
    constructor(e, t) {
      this.priorityFunction_ = e, this.keyFunction_ = t, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {};
    }
    /**
     * FIXME empty description for jsdoc
     */
    clear() {
      this.elements_.length = 0, this.priorities_.length = 0, XE(this.queuedElements_);
    }
    /**
     * Remove and return the highest-priority element. O(log N).
     * @return {T} Element.
     */
    dequeue() {
      const e = this.elements_, t = this.priorities_, i = e[0];
      e.length == 1 ? (e.length = 0, t.length = 0) : (e[0] = /** @type {T} */
      e.pop(), t[0] = /** @type {number} */
      t.pop(), this.siftUp_(0));
      const a = this.keyFunction_(i);
      return delete this.queuedElements_[a], i;
    }
    /**
     * Enqueue an element. O(log N).
     * @param {T} element Element.
     * @return {boolean} The element was added to the queue.
     */
    enqueue(e) {
      Ei(
        !(this.keyFunction_(e) in this.queuedElements_),
        "Tried to enqueue an `element` that was already added to the queue"
      );
      const t = this.priorityFunction_(e);
      return t != xw ? (this.elements_.push(e), this.priorities_.push(t), this.queuedElements_[this.keyFunction_(e)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1;
    }
    /**
     * @return {number} Count.
     */
    getCount() {
      return this.elements_.length;
    }
    /**
     * Gets the index of the left child of the node at the given index.
     * @param {number} index The index of the node to get the left child for.
     * @return {number} The index of the left child.
     * @private
     */
    getLeftChildIndex_(e) {
      return e * 2 + 1;
    }
    /**
     * Gets the index of the right child of the node at the given index.
     * @param {number} index The index of the node to get the right child for.
     * @return {number} The index of the right child.
     * @private
     */
    getRightChildIndex_(e) {
      return e * 2 + 2;
    }
    /**
     * Gets the index of the parent of the node at the given index.
     * @param {number} index The index of the node to get the parent for.
     * @return {number} The index of the parent.
     * @private
     */
    getParentIndex_(e) {
      return e - 1 >> 1;
    }
    /**
     * Make this a heap. O(N).
     * @private
     */
    heapify_() {
      let e;
      for (e = (this.elements_.length >> 1) - 1; e >= 0; e--)
        this.siftUp_(e);
    }
    /**
     * @return {boolean} Is empty.
     */
    isEmpty() {
      return this.elements_.length === 0;
    }
    /**
     * @param {string} key Key.
     * @return {boolean} Is key queued.
     */
    isKeyQueued(e) {
      return e in this.queuedElements_;
    }
    /**
     * @param {T} element Element.
     * @return {boolean} Is queued.
     */
    isQueued(e) {
      return this.isKeyQueued(this.keyFunction_(e));
    }
    /**
     * @param {number} index The index of the node to move down.
     * @private
     */
    siftUp_(e) {
      const t = this.elements_, i = this.priorities_, a = t.length, o = t[e], u = i[e], c = e;
      for (; e < a >> 1; ) {
        const p = this.getLeftChildIndex_(e), y = this.getRightChildIndex_(e), _ = y < a && i[y] < i[p] ? y : p;
        t[e] = t[_], i[e] = i[_], e = _;
      }
      t[e] = o, i[e] = u, this.siftDown_(c, e);
    }
    /**
     * @param {number} startIndex The index of the root.
     * @param {number} index The index of the node to move up.
     * @private
     */
    siftDown_(e, t) {
      const i = this.elements_, a = this.priorities_, o = i[t], u = a[t];
      for (; t > e; ) {
        const c = this.getParentIndex_(t);
        if (a[c] > u)
          i[t] = i[c], a[t] = a[c], t = c;
        else
          break;
      }
      i[t] = o, a[t] = u;
    }
    /**
     * FIXME empty description for jsdoc
     */
    reprioritize() {
      const e = this.priorityFunction_, t = this.elements_, i = this.priorities_;
      let a = 0;
      const o = t.length;
      let u, c, p;
      for (c = 0; c < o; ++c)
        u = t[c], p = e(u), p == xw ? delete this.queuedElements_[this.keyFunction_(u)] : (i[a] = p, t[a++] = u);
      t.length = a, i.length = a, this.heapify_();
    }
  }
  const Hne = Vne;
  class Wne extends Hne {
    /**
     * @param {PriorityFunction} tilePriorityFunction Tile priority function.
     * @param {function(): ?} tileChangeCallback Function called on each tile change event.
     */
    constructor(e, t) {
      super(
        /**
         * @param {Array} element Element.
         * @return {number} Priority.
         */
        function(i) {
          return e.apply(null, i);
        },
        /**
         * @param {Array} element Element.
         * @return {string} Key.
         */
        function(i) {
          return (
            /** @type {import("./Tile.js").default} */
            i[0].getKey()
          );
        }
      ), this.boundHandleTileChange_ = this.handleTileChange.bind(this), this.tileChangeCallback_ = t, this.tilesLoading_ = 0, this.tilesLoadingKeys_ = {};
    }
    /**
     * @param {Array} element Element.
     * @return {boolean} The element was added to the queue.
     */
    enqueue(e) {
      const t = super.enqueue(e);
      return t && e[0].addEventListener(Cn.CHANGE, this.boundHandleTileChange_), t;
    }
    /**
     * @return {number} Number of tiles loading.
     */
    getTilesLoading() {
      return this.tilesLoading_;
    }
    /**
     * @param {import("./events/Event.js").default} event Event.
     * @protected
     */
    handleTileChange(e) {
      const t = (
        /** @type {import("./Tile.js").default} */
        e.target
      ), i = t.getState();
      if (i === Jt.LOADED || i === Jt.ERROR || i === Jt.EMPTY) {
        i !== Jt.ERROR && t.removeEventListener(Cn.CHANGE, this.boundHandleTileChange_);
        const a = t.getKey();
        a in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[a], --this.tilesLoading_), this.tileChangeCallback_();
      }
    }
    /**
     * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.
     * @param {number} maxNewLoads Maximum number of new tiles to load.
     */
    loadMoreTiles(e, t) {
      let i = 0, a, o, u;
      for (; this.tilesLoading_ < e && i < t && this.getCount() > 0; )
        o = /** @type {import("./Tile.js").default} */
        this.dequeue()[0], u = o.getKey(), a = o.getState(), a === Jt.IDLE && !(u in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[u] = !0, ++this.tilesLoading_, ++i, o.load());
    }
  }
  const Gne = Wne;
  function Yne(n, e, t, i, a) {
    if (!n || !(t in n.wantedTiles) || !n.wantedTiles[t][e.getKey()])
      return xw;
    const o = n.viewState.center, u = i[0] - o[0], c = i[1] - o[1];
    return 65536 * Math.log(a) + Math.sqrt(u * u + c * c) / a;
  }
  class qne extends Of {
    /**
     * @param {Options} options Control options.
     */
    constructor(e) {
      super();
      const t = e.element;
      t && !e.target && !t.style.pointerEvents && (t.style.pointerEvents = "auto"), this.element = t || null, this.target_ = null, this.map_ = null, this.listenerKeys = [], e.render && (this.render = e.render), e.target && this.setTarget(e.target);
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      gw(this.element), super.disposeInternal();
    }
    /**
     * Get the map associated with this control.
     * @return {import("../Map.js").default|null} Map.
     * @api
     */
    getMap() {
      return this.map_;
    }
    /**
     * Remove the control from its current map and attach it to the new map.
     * Pass `null` to just remove the control from the current map.
     * Subclasses may set up event handlers to get notified about changes to
     * the map here.
     * @param {import("../Map.js").default|null} map Map.
     * @api
     */
    setMap(e) {
      this.map_ && gw(this.element);
      for (let t = 0, i = this.listenerKeys.length; t < i; ++t)
        Or(this.listenerKeys[t]);
      this.listenerKeys.length = 0, this.map_ = e, e && ((this.target_ ? this.target_ : e.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== l_ && this.listenerKeys.push(
        di(e, vp.POSTRENDER, this.render, this)
      ), e.render());
    }
    /**
     * Renders the control.
     * @param {import("../MapEvent.js").default} mapEvent Map event.
     * @api
     */
    render(e) {
    }
    /**
     * This function is used to set a target element for the control. It has no
     * effect if it is called after the control has been added to the map (i.e.
     * after `setMap` is called on the control). If no `target` is set in the
     * options passed to the control constructor and if `setTarget` is not called
     * then the control is added to the map's overlay container.
     * @param {HTMLElement|string} target Target.
     * @api
     */
    setTarget(e) {
      this.target_ = typeof e == "string" ? document.getElementById(e) : e;
    }
  }
  const eC = qne;
  class Xne extends eC {
    /**
     * @param {Options} [options] Attribution options.
     */
    constructor(e) {
      e = e || {}, super({
        element: document.createElement("div"),
        render: e.render,
        target: e.target
      }), this.ulElement_ = document.createElement("ul"), this.collapsed_ = e.collapsed !== void 0 ? e.collapsed : !0, this.userCollapsed_ = this.collapsed_, this.overrideCollapsible_ = e.collapsible !== void 0, this.collapsible_ = e.collapsible !== void 0 ? e.collapsible : !0, this.collapsible_ || (this.collapsed_ = !1);
      const t = e.className !== void 0 ? e.className : "ol-attribution", i = e.tipLabel !== void 0 ? e.tipLabel : "Attributions", a = e.expandClassName !== void 0 ? e.expandClassName : t + "-expand", o = e.collapseLabel !== void 0 ? e.collapseLabel : "›", u = e.collapseClassName !== void 0 ? e.collapseClassName : t + "-collapse";
      typeof o == "string" ? (this.collapseLabel_ = document.createElement("span"), this.collapseLabel_.textContent = o, this.collapseLabel_.className = u) : this.collapseLabel_ = o;
      const c = e.label !== void 0 ? e.label : "i";
      typeof c == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = c, this.label_.className = a) : this.label_ = c;
      const p = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;
      this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = i, this.toggleButton_.appendChild(p), this.toggleButton_.addEventListener(
        Cn.CLICK,
        this.handleClick_.bind(this),
        !1
      );
      const y = t + " " + dS + " " + qL + (this.collapsed_ && this.collapsible_ ? " " + Y3 : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), _ = this.element;
      _.className = y, _.appendChild(this.toggleButton_), _.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0;
    }
    /**
     * Collect a list of visible attributions and set the collapsible state.
     * @param {import("../Map.js").FrameState} frameState Frame state.
     * @return {Array<string>} Attributions.
     * @private
     */
    collectSourceAttributions_(e) {
      const t = Array.from(
        new Set(
          this.getMap().getAllLayers().flatMap((a) => a.getAttributions(e))
        )
      ), i = !this.getMap().getAllLayers().some(
        (a) => a.getSource() && a.getSource().getAttributionsCollapsible() === !1
      );
      return this.overrideCollapsible_ || this.setCollapsible(i), t;
    }
    /**
     * @private
     * @param {?import("../Map.js").FrameState} frameState Frame state.
     */
    updateElement_(e) {
      if (!e) {
        this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1);
        return;
      }
      const t = this.collectSourceAttributions_(e), i = t.length > 0;
      if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !hm(t, this.renderedAttributions_)) {
        Gj(this.ulElement_);
        for (let a = 0, o = t.length; a < o; ++a) {
          const u = document.createElement("li");
          u.innerHTML = t[a], this.ulElement_.appendChild(u);
        }
        this.renderedAttributions_ = t;
      }
    }
    /**
     * @param {MouseEvent} event The event to handle
     * @private
     */
    handleClick_(e) {
      e.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_;
    }
    /**
     * @private
     */
    handleToggle_() {
      this.element.classList.toggle(Y3), this.collapsed_ ? G3(this.collapseLabel_, this.label_) : G3(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_));
    }
    /**
     * Return `true` if the attribution is collapsible, `false` otherwise.
     * @return {boolean} True if the widget is collapsible.
     * @api
     */
    getCollapsible() {
      return this.collapsible_;
    }
    /**
     * Set whether the attribution should be collapsible.
     * @param {boolean} collapsible True if the widget is collapsible.
     * @api
     */
    setCollapsible(e) {
      this.collapsible_ !== e && (this.collapsible_ = e, this.element.classList.toggle("ol-uncollapsible"), this.userCollapsed_ && this.handleToggle_());
    }
    /**
     * Collapse or expand the attribution according to the passed parameter. Will
     * not do anything if the attribution isn't collapsible or if the current
     * collapsed state is already the one requested.
     * @param {boolean} collapsed True if the widget is collapsed.
     * @api
     */
    setCollapsed(e) {
      this.userCollapsed_ = e, !(!this.collapsible_ || this.collapsed_ === e) && this.handleToggle_();
    }
    /**
     * Return `true` when the attribution is currently collapsed or `false`
     * otherwise.
     * @return {boolean} True if the widget is collapsed.
     * @api
     */
    getCollapsed() {
      return this.collapsed_;
    }
    /**
     * Update the attribution element.
     * @param {import("../MapEvent.js").default} mapEvent Map event.
     * @override
     */
    render(e) {
      this.updateElement_(e.frameState);
    }
  }
  const EU = Xne;
  class Kne extends eC {
    /**
     * @param {Options} [options] Rotate options.
     */
    constructor(e) {
      e = e || {}, super({
        element: document.createElement("div"),
        render: e.render,
        target: e.target
      });
      const t = e.className !== void 0 ? e.className : "ol-rotate", i = e.label !== void 0 ? e.label : "⇧", a = e.compassClassName !== void 0 ? e.compassClassName : "ol-compass";
      this.label_ = null, typeof i == "string" ? (this.label_ = document.createElement("span"), this.label_.className = a, this.label_.textContent = i) : (this.label_ = i, this.label_.classList.add(a));
      const o = e.tipLabel ? e.tipLabel : "Reset rotation", u = document.createElement("button");
      u.className = t + "-reset", u.setAttribute("type", "button"), u.title = o, u.appendChild(this.label_), u.addEventListener(
        Cn.CLICK,
        this.handleClick_.bind(this),
        !1
      );
      const c = t + " " + dS + " " + qL, p = this.element;
      p.className = c, p.appendChild(u), this.callResetNorth_ = e.resetNorth ? e.resetNorth : void 0, this.duration_ = e.duration !== void 0 ? e.duration : 250, this.autoHide_ = e.autoHide !== void 0 ? e.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(bb);
    }
    /**
     * @param {MouseEvent} event The event to handle
     * @private
     */
    handleClick_(e) {
      e.preventDefault(), this.callResetNorth_ !== void 0 ? this.callResetNorth_() : this.resetNorth_();
    }
    /**
     * @private
     */
    resetNorth_() {
      const t = this.getMap().getView();
      if (!t)
        return;
      const i = t.getRotation();
      i !== void 0 && (this.duration_ > 0 && i % (2 * Math.PI) !== 0 ? t.animate({
        rotation: 0,
        duration: this.duration_,
        easing: x_
      }) : t.setRotation(0));
    }
    /**
     * Update the rotate control element.
     * @param {import("../MapEvent.js").default} mapEvent Map event.
     * @override
     */
    render(e) {
      const t = e.frameState;
      if (!t)
        return;
      const i = t.viewState.rotation;
      if (i != this.rotation_) {
        const a = "rotate(" + i + "rad)";
        if (this.autoHide_) {
          const o = this.element.classList.contains(bb);
          !o && i === 0 ? this.element.classList.add(bb) : o && i !== 0 && this.element.classList.remove(bb);
        }
        this.label_.style.transform = a;
      }
      this.rotation_ = i;
    }
  }
  const Zne = Kne;
  class Qne extends eC {
    /**
     * @param {Options} [options] Zoom options.
     */
    constructor(e) {
      e = e || {}, super({
        element: document.createElement("div"),
        target: e.target
      });
      const t = e.className !== void 0 ? e.className : "ol-zoom", i = e.delta !== void 0 ? e.delta : 1, a = e.zoomInClassName !== void 0 ? e.zoomInClassName : t + "-in", o = e.zoomOutClassName !== void 0 ? e.zoomOutClassName : t + "-out", u = e.zoomInLabel !== void 0 ? e.zoomInLabel : "+", c = e.zoomOutLabel !== void 0 ? e.zoomOutLabel : "–", p = e.zoomInTipLabel !== void 0 ? e.zoomInTipLabel : "Zoom in", y = e.zoomOutTipLabel !== void 0 ? e.zoomOutTipLabel : "Zoom out", _ = document.createElement("button");
      _.className = a, _.setAttribute("type", "button"), _.title = p, _.appendChild(
        typeof u == "string" ? document.createTextNode(u) : u
      ), _.addEventListener(
        Cn.CLICK,
        this.handleClick_.bind(this, i),
        !1
      );
      const S = document.createElement("button");
      S.className = o, S.setAttribute("type", "button"), S.title = y, S.appendChild(
        typeof c == "string" ? document.createTextNode(c) : c
      ), S.addEventListener(
        Cn.CLICK,
        this.handleClick_.bind(this, -i),
        !1
      );
      const b = t + " " + dS + " " + qL, T = this.element;
      T.className = b, T.appendChild(_), T.appendChild(S), this.duration_ = e.duration !== void 0 ? e.duration : 250;
    }
    /**
     * @param {number} delta Zoom delta.
     * @param {MouseEvent} event The event to handle
     * @private
     */
    handleClick_(e, t) {
      t.preventDefault(), this.zoomByDelta_(e);
    }
    /**
     * @param {number} delta Zoom delta.
     * @private
     */
    zoomByDelta_(e) {
      const i = this.getMap().getView();
      if (!i)
        return;
      const a = i.getZoom();
      if (a !== void 0) {
        const o = i.getConstrainedZoom(a + e);
        this.duration_ > 0 ? (i.getAnimating() && i.cancelAnimations(), i.animate({
          zoom: o,
          duration: this.duration_,
          easing: x_
        })) : i.setZoom(o);
      }
    }
  }
  const Jne = Qne;
  function SU(n) {
    n = n || {};
    const e = new bf();
    return (n.zoom !== void 0 ? n.zoom : !0) && e.push(new Jne(n.zoomOptions)), (n.rotate !== void 0 ? n.rotate : !0) && e.push(new Zne(n.rotateOptions)), (n.attribution !== void 0 ? n.attribution : !0) && e.push(new EU(n.attributionOptions)), e;
  }
  const E2 = {
    ACTIVE: "active"
  };
  class eie extends Of {
    /**
     * @param {InteractionOptions} [options] Options.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, e && e.handleEvent && (this.handleEvent = e.handleEvent), this.map_ = null, this.setActive(!0);
    }
    /**
     * Return whether the interaction is currently active.
     * @return {boolean} `true` if the interaction is active, `false` otherwise.
     * @observable
     * @api
     */
    getActive() {
      return (
        /** @type {boolean} */
        this.get(E2.ACTIVE)
      );
    }
    /**
     * Get the map associated with this interaction.
     * @return {import("../Map.js").default|null} Map.
     * @api
     */
    getMap() {
      return this.map_;
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event}.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     * @api
     */
    handleEvent(e) {
      return !0;
    }
    /**
     * Activate or deactivate the interaction.
     * @param {boolean} active Active.
     * @observable
     * @api
     */
    setActive(e) {
      this.set(E2.ACTIVE, e);
    }
    /**
     * Remove the interaction from its current map and attach it to the new map.
     * Subclasses may set up event handlers to get notified about changes to
     * the map here.
     * @param {import("../Map.js").default|null} map Map.
     */
    setMap(e) {
      this.map_ = e;
    }
  }
  function tie(n, e, t) {
    const i = n.getCenterInternal();
    if (i) {
      const a = [i[0] + e[0], i[1] + e[1]];
      n.animateInternal({
        duration: t !== void 0 ? t : 250,
        easing: Ree,
        center: n.getConstrainedCenter(a)
      });
    }
  }
  function lN(n, e, t, i) {
    const a = n.getZoom();
    if (a === void 0)
      return;
    const o = n.getConstrainedZoom(a + e), u = n.getResolutionForZoom(o);
    n.getAnimating() && n.cancelAnimations(), n.animate({
      resolution: u,
      anchor: t,
      duration: i !== void 0 ? i : 250,
      easing: x_
    });
  }
  const yS = eie;
  class nie extends yS {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      super(), e = e || {}, this.delta_ = e.delta ? e.delta : 1, this.duration_ = e.duration !== void 0 ? e.duration : 250;
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a
     * doubleclick) and eventually zooms the map.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     */
    handleEvent(e) {
      let t = !1;
      if (e.type == ha.DBLCLICK) {
        const i = (
          /** @type {MouseEvent} */
          e.originalEvent
        ), a = e.map, o = e.coordinate, u = i.shiftKey ? -this.delta_ : this.delta_, c = a.getView();
        lN(c, u, o, this.duration_), i.preventDefault(), t = !0;
      }
      return !t;
    }
  }
  const iie = nie;
  class rie extends yS {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, super(
        /** @type {import("./Interaction.js").InteractionOptions} */
        e
      ), e.handleDownEvent && (this.handleDownEvent = e.handleDownEvent), e.handleDragEvent && (this.handleDragEvent = e.handleDragEvent), e.handleMoveEvent && (this.handleMoveEvent = e.handleMoveEvent), e.handleUpEvent && (this.handleUpEvent = e.handleUpEvent), e.stopDown && (this.stopDown = e.stopDown), this.handlingDownUpSequence = !1, this.targetPointers = [];
    }
    /**
     * Returns the current number of pointers involved in the interaction,
     * e.g. `2` when two fingers are used.
     * @return {number} The number of pointers.
     * @api
     */
    getPointerCount() {
      return this.targetPointers.length;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     * @protected
     */
    handleDownEvent(e) {
      return !1;
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @protected
     */
    handleDragEvent(e) {
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into
     * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
     * detected.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     * @api
     */
    handleEvent(e) {
      if (!e.originalEvent)
        return !0;
      let t = !1;
      if (this.updateTrackedPointers_(e), this.handlingDownUpSequence) {
        if (e.type == ha.POINTERDRAG)
          this.handleDragEvent(e), e.originalEvent.preventDefault();
        else if (e.type == ha.POINTERUP) {
          const i = this.handleUpEvent(e);
          this.handlingDownUpSequence = i && this.targetPointers.length > 0;
        }
      } else if (e.type == ha.POINTERDOWN) {
        const i = this.handleDownEvent(e);
        this.handlingDownUpSequence = i, t = this.stopDown(i);
      } else
        e.type == ha.POINTERMOVE && this.handleMoveEvent(e);
      return !t;
    }
    /**
     * Handle pointer move events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @protected
     */
    handleMoveEvent(e) {
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     * @protected
     */
    handleUpEvent(e) {
      return !1;
    }
    /**
     * This function is used to determine if "down" events should be propagated
     * to other interactions or should be stopped.
     * @param {boolean} handled Was the event handled by the interaction?
     * @return {boolean} Should the `down` event be stopped?
     */
    stopDown(e) {
      return e;
    }
    /**
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @private
     */
    updateTrackedPointers_(e) {
      e.activePointers && (this.targetPointers = e.activePointers);
    }
  }
  function uN(n) {
    const e = n.length;
    let t = 0, i = 0;
    for (let a = 0; a < e; a++)
      t += n[a].clientX, i += n[a].clientY;
    return { clientX: t / e, clientY: i / e };
  }
  const _S = rie;
  function PA(n) {
    const e = arguments;
    return function(t) {
      let i = !0;
      for (let a = 0, o = e.length; a < o && (i = i && e[a](t), !!i); ++a)
        ;
      return i;
    };
  }
  const aie = function(n) {
    const e = (
      /** @type {KeyboardEvent|MouseEvent|TouchEvent} */
      n.originalEvent
    );
    return e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey;
  }, sie = function(n) {
    const e = n.map.getTargetElement(), t = n.map.getOwnerDocument().activeElement;
    return e.contains(t);
  }, xU = function(n) {
    return n.map.getTargetElement().hasAttribute("tabindex") ? sie(n) : !0;
  }, oie = FE, bU = function(n) {
    const e = (
      /** @type {MouseEvent} */
      n.originalEvent
    );
    return e.button == 0 && !(bJ && Cj && e.ctrlKey);
  }, wU = function(n) {
    const e = (
      /** @type {KeyboardEvent|MouseEvent|TouchEvent} */
      n.originalEvent
    );
    return !e.altKey && !(e.metaKey || e.ctrlKey) && !e.shiftKey;
  }, lie = function(n) {
    const e = (
      /** @type {KeyboardEvent|MouseEvent|TouchEvent} */
      n.originalEvent
    );
    return Cj ? e.metaKey : e.ctrlKey;
  }, uie = function(n) {
    const e = (
      /** @type {KeyboardEvent|MouseEvent|TouchEvent} */
      n.originalEvent
    );
    return !e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey;
  }, CU = function(n) {
    const e = (
      /** @type {KeyboardEvent|MouseEvent|TouchEvent} */
      n.originalEvent
    ), t = (
      /** @type {Element} */
      e.target.tagName
    );
    return t !== "INPUT" && t !== "SELECT" && t !== "TEXTAREA" && // `isContentEditable` is only available on `HTMLElement`, but it may also be a
    // different type like `SVGElement`.
    // @ts-ignore
    !e.target.isContentEditable;
  }, PO = function(n) {
    const e = (
      /** @type {import("../MapBrowserEvent").default} */
      n.originalEvent
    );
    return Ei(
      e !== void 0,
      "mapBrowserEvent must originate from a pointer event"
    ), e.pointerType == "mouse";
  }, cie = function(n) {
    const e = (
      /** @type {import("../MapBrowserEvent").default} */
      n.originalEvent
    );
    return Ei(
      e !== void 0,
      "mapBrowserEvent must originate from a pointer event"
    ), e.isPrimary && e.button === 0;
  };
  class fie extends _S {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      super({
        stopDown: Yw
      }), e = e || {}, this.kinetic_ = e.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1;
      const t = e.condition ? e.condition : PA(wU, cie);
      this.condition_ = e.onFocusOnly ? PA(xU, t) : t, this.noKinetic_ = !1;
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     */
    handleDragEvent(e) {
      const t = e.map;
      this.panning_ || (this.panning_ = !0, t.getView().beginInteraction());
      const i = this.targetPointers, a = t.getEventPixel(uN(i));
      if (i.length == this.lastPointersCount_) {
        if (this.kinetic_ && this.kinetic_.update(a[0], a[1]), this.lastCentroid) {
          const o = [
            this.lastCentroid[0] - a[0],
            a[1] - this.lastCentroid[1]
          ], c = e.map.getView();
          HB(o, c.getResolution()), YA(o, c.getRotation()), c.adjustCenterInternal(o);
        }
      } else
        this.kinetic_ && this.kinetic_.begin();
      this.lastCentroid = a, this.lastPointersCount_ = i.length, e.originalEvent.preventDefault();
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleUpEvent(e) {
      const t = e.map, i = t.getView();
      if (this.targetPointers.length === 0) {
        if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {
          const a = this.kinetic_.getDistance(), o = this.kinetic_.getAngle(), u = i.getCenterInternal(), c = t.getPixelFromCoordinateInternal(u), p = t.getCoordinateFromPixelInternal([
            c[0] - a * Math.cos(o),
            c[1] - a * Math.sin(o)
          ]);
          i.animateInternal({
            center: i.getConstrainedCenter(p),
            duration: 500,
            easing: x_
          });
        }
        return this.panning_ && (this.panning_ = !1, i.endInteraction()), !1;
      }
      return this.kinetic_ && this.kinetic_.begin(), this.lastCentroid = null, !0;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleDownEvent(e) {
      if (this.targetPointers.length > 0 && this.condition_(e)) {
        const i = e.map.getView();
        return this.lastCentroid = null, i.getAnimating() && i.cancelAnimations(), this.kinetic_ && this.kinetic_.begin(), this.noKinetic_ = this.targetPointers.length > 1, !0;
      }
      return !1;
    }
  }
  const hie = fie;
  class die extends _S {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, super({
        stopDown: Yw
      }), this.condition_ = e.condition ? e.condition : aie, this.lastAngle_ = void 0, this.duration_ = e.duration !== void 0 ? e.duration : 250;
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     */
    handleDragEvent(e) {
      if (!PO(e))
        return;
      const t = e.map, i = t.getView();
      if (i.getConstraints().rotation === tN)
        return;
      const a = t.getSize(), o = e.pixel, u = Math.atan2(a[1] / 2 - o[1], o[0] - a[0] / 2);
      if (this.lastAngle_ !== void 0) {
        const c = u - this.lastAngle_;
        i.adjustRotationInternal(-c);
      }
      this.lastAngle_ = u;
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleUpEvent(e) {
      return PO(e) ? (e.map.getView().endInteraction(this.duration_), !1) : !0;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleDownEvent(e) {
      return PO(e) && bU(e) && this.condition_(e) ? (e.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1;
    }
  }
  const pie = die;
  class gie extends TL {
    /**
     * @param {string} className CSS class name.
     */
    constructor(e) {
      super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + e, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null;
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.setMap(null);
    }
    /**
     * @private
     */
    render_() {
      const e = this.startPixel_, t = this.endPixel_, i = "px", a = this.element_.style;
      a.left = Math.min(e[0], t[0]) + i, a.top = Math.min(e[1], t[1]) + i, a.width = Math.abs(t[0] - e[0]) + i, a.height = Math.abs(t[1] - e[1]) + i;
    }
    /**
     * @param {import("../Map.js").default|null} map Map.
     */
    setMap(e) {
      if (this.map_) {
        this.map_.getOverlayContainer().removeChild(this.element_);
        const t = this.element_.style;
        t.left = "inherit", t.top = "inherit", t.width = "inherit", t.height = "inherit";
      }
      this.map_ = e, this.map_ && this.map_.getOverlayContainer().appendChild(this.element_);
    }
    /**
     * @param {import("../pixel.js").Pixel} startPixel Start pixel.
     * @param {import("../pixel.js").Pixel} endPixel End pixel.
     */
    setPixels(e, t) {
      this.startPixel_ = e, this.endPixel_ = t, this.createOrUpdateGeometry(), this.render_();
    }
    /**
     * Creates or updates the cached geometry.
     */
    createOrUpdateGeometry() {
      const e = this.startPixel_, t = this.endPixel_, a = [
        e,
        [e[0], t[1]],
        t,
        [t[0], e[1]]
      ].map(
        this.map_.getCoordinateFromPixelInternal,
        this.map_
      );
      a[4] = a[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([a]) : this.geometry_ = new qv([a]);
    }
    /**
     * @return {import("../geom/Polygon.js").default} Geometry.
     */
    getGeometry() {
      return this.geometry_;
    }
  }
  const mie = gie, Mb = {
    /**
     * Triggered upon drag box start.
     * @event DragBoxEvent#boxstart
     * @api
     */
    BOXSTART: "boxstart",
    /**
     * Triggered on drag when box is active.
     * @event DragBoxEvent#boxdrag
     * @api
     */
    BOXDRAG: "boxdrag",
    /**
     * Triggered upon drag box end.
     * @event DragBoxEvent#boxend
     * @api
     */
    BOXEND: "boxend",
    /**
     * Triggered upon drag box canceled.
     * @event DragBoxEvent#boxcancel
     * @api
     */
    BOXCANCEL: "boxcancel"
  };
  class kO extends Xh {
    /**
     * @param {string} type The event type.
     * @param {import("../coordinate.js").Coordinate} coordinate The event coordinate.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Originating event.
     */
    constructor(e, t, i) {
      super(e), this.coordinate = t, this.mapBrowserEvent = i;
    }
  }
  class vie extends _S {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, e = e || {}, this.box_ = new mie(e.className || "ol-dragbox"), this.minArea_ = e.minArea !== void 0 ? e.minArea : 64, e.onBoxEnd && (this.onBoxEnd = e.onBoxEnd), this.startPixel_ = null, this.condition_ = e.condition ? e.condition : bU, this.boxEndCondition_ = e.boxEndCondition ? e.boxEndCondition : this.defaultBoxEndCondition;
    }
    /**
     * The default condition for determining whether the boxend event
     * should fire.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent The originating MapBrowserEvent
     *     leading to the box end.
     * @param {import("../pixel.js").Pixel} startPixel The starting pixel of the box.
     * @param {import("../pixel.js").Pixel} endPixel The end pixel of the box.
     * @return {boolean} Whether or not the boxend condition should be fired.
     */
    defaultBoxEndCondition(e, t, i) {
      const a = i[0] - t[0], o = i[1] - t[1];
      return a * a + o * o >= this.minArea_;
    }
    /**
     * Returns geometry of last drawn box.
     * @return {import("../geom/Polygon.js").default} Geometry.
     * @api
     */
    getGeometry() {
      return this.box_.getGeometry();
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     */
    handleDragEvent(e) {
      this.box_.setPixels(this.startPixel_, e.pixel), this.dispatchEvent(
        new kO(
          Mb.BOXDRAG,
          e.coordinate,
          e
        )
      );
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleUpEvent(e) {
      this.box_.setMap(null);
      const t = this.boxEndCondition_(
        e,
        this.startPixel_,
        e.pixel
      );
      return t && this.onBoxEnd(e), this.dispatchEvent(
        new kO(
          t ? Mb.BOXEND : Mb.BOXCANCEL,
          e.coordinate,
          e
        )
      ), !1;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleDownEvent(e) {
      return this.condition_(e) ? (this.startPixel_ = e.pixel, this.box_.setMap(e.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(
        new kO(
          Mb.BOXSTART,
          e.coordinate,
          e
        )
      ), !0) : !1;
    }
    /**
     * Function to execute just before `onboxend` is fired
     * @param {import("../MapBrowserEvent.js").default} event Event.
     */
    onBoxEnd(e) {
    }
  }
  const yie = vie;
  class _ie extends yie {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {};
      const t = e.condition ? e.condition : uie;
      super({
        condition: t,
        className: e.className || "ol-dragzoom",
        minArea: e.minArea
      }), this.duration_ = e.duration !== void 0 ? e.duration : 200, this.out_ = e.out !== void 0 ? e.out : !1;
    }
    /**
     * Function to execute just before `onboxend` is fired
     * @param {import("../MapBrowserEvent.js").default} event Event.
     */
    onBoxEnd(e) {
      const i = (
        /** @type {!import("../View.js").default} */
        this.getMap().getView()
      );
      let a = this.getGeometry();
      if (this.out_) {
        const o = i.rotatedExtentForGeometry(a), u = i.getResolutionForExtentInternal(o), c = i.getResolution() / u;
        a = a.clone(), a.scale(c * c);
      }
      i.fitInternal(a, {
        duration: this.duration_,
        easing: x_
      });
    }
  }
  const Eie = _ie, Cv = {
    LEFT: "ArrowLeft",
    UP: "ArrowUp",
    RIGHT: "ArrowRight",
    DOWN: "ArrowDown"
  };
  class Sie extends yS {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      super(), e = e || {}, this.defaultCondition_ = function(t) {
        return wU(t) && CU(t);
      }, this.condition_ = e.condition !== void 0 ? e.condition : this.defaultCondition_, this.duration_ = e.duration !== void 0 ? e.duration : 100, this.pixelDelta_ = e.pixelDelta !== void 0 ? e.pixelDelta : 128;
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
     * `KeyEvent`, and decides the direction to pan to (if an arrow key was
     * pressed).
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     */
    handleEvent(e) {
      let t = !1;
      if (e.type == Cn.KEYDOWN) {
        const i = (
          /** @type {KeyboardEvent} */
          e.originalEvent
        ), a = i.key;
        if (this.condition_(e) && (a == Cv.DOWN || a == Cv.LEFT || a == Cv.RIGHT || a == Cv.UP)) {
          const u = e.map.getView(), c = u.getResolution() * this.pixelDelta_;
          let p = 0, y = 0;
          a == Cv.DOWN ? y = -c : a == Cv.LEFT ? p = -c : a == Cv.RIGHT ? p = c : y = c;
          const _ = [p, y];
          YA(_, u.getRotation()), tie(u, _, this.duration_), i.preventDefault(), t = !0;
        }
      }
      return !t;
    }
  }
  const xie = Sie;
  class bie extends yS {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      super(), e = e || {}, this.condition_ = e.condition ? e.condition : function(t) {
        return !lie(t) && CU(t);
      }, this.delta_ = e.delta ? e.delta : 1, this.duration_ = e.duration !== void 0 ? e.duration : 100;
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a
     * `KeyEvent`, and decides whether to zoom in or out (depending on whether the
     * key pressed was '+' or '-').
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     */
    handleEvent(e) {
      let t = !1;
      if (e.type == Cn.KEYDOWN || e.type == Cn.KEYPRESS) {
        const i = (
          /** @type {KeyboardEvent} */
          e.originalEvent
        ), a = i.key;
        if (this.condition_(e) && (a === "+" || a === "-")) {
          const o = e.map, u = a === "+" ? this.delta_ : -this.delta_, c = o.getView();
          lN(c, u, void 0, this.duration_), i.preventDefault(), t = !0;
        }
      }
      return !t;
    }
  }
  const wie = bie;
  class Cie extends yS {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {}, super(
        /** @type {import("./Interaction.js").InteractionOptions} */
        e
      ), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = e.maxDelta !== void 0 ? e.maxDelta : 1, this.duration_ = e.duration !== void 0 ? e.duration : 250, this.timeout_ = e.timeout !== void 0 ? e.timeout : 80, this.useAnchor_ = e.useAnchor !== void 0 ? e.useAnchor : !0, this.constrainResolution_ = e.constrainResolution !== void 0 ? e.constrainResolution : !1;
      const t = e.condition ? e.condition : oie;
      this.condition_ = e.onFocusOnly ? PA(xU, t) : t, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300;
    }
    /**
     * @private
     */
    endInteraction_() {
      this.trackpadTimeoutId_ = void 0;
      const e = this.getMap();
      if (!e)
        return;
      e.getView().endInteraction(
        void 0,
        this.lastDelta_ ? this.lastDelta_ > 0 ? 1 : -1 : 0,
        this.lastAnchor_
      );
    }
    /**
     * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually
     * zooms the map.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
     * @return {boolean} `false` to stop event propagation.
     */
    handleEvent(e) {
      if (!this.condition_(e) || e.type !== Cn.WHEEL)
        return !0;
      const i = e.map, a = (
        /** @type {WheelEvent} */
        e.originalEvent
      );
      a.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = e.coordinate);
      let o;
      if (e.type == Cn.WHEEL && (o = a.deltaY, SJ && a.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (o /= Tj), a.deltaMode === WheelEvent.DOM_DELTA_LINE && (o *= 40)), o === 0)
        return !1;
      this.lastDelta_ = o;
      const u = Date.now();
      this.startTime_ === void 0 && (this.startTime_ = u), (!this.mode_ || u - this.startTime_ > this.trackpadEventGap_) && (this.mode_ = Math.abs(o) < 4 ? "trackpad" : "wheel");
      const c = i.getView();
      if (this.mode_ === "trackpad" && !(c.getConstrainResolution() || this.constrainResolution_))
        return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (c.getAnimating() && c.cancelAnimations(), c.beginInteraction()), this.trackpadTimeoutId_ = setTimeout(
          this.endInteraction_.bind(this),
          this.timeout_
        ), c.adjustZoom(-o / this.deltaPerZoom_, this.lastAnchor_), this.startTime_ = u, !1;
      this.totalDelta_ += o;
      const p = Math.max(this.timeout_ - (u - this.startTime_), 0);
      return clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout(
        this.handleWheelZoom_.bind(this, i),
        p
      ), !1;
    }
    /**
     * @private
     * @param {import("../Map.js").default} map Map.
     */
    handleWheelZoom_(e) {
      const t = e.getView();
      t.getAnimating() && t.cancelAnimations();
      let i = -da(
        this.totalDelta_,
        -this.maxDelta_ * this.deltaPerZoom_,
        this.maxDelta_ * this.deltaPerZoom_
      ) / this.deltaPerZoom_;
      (t.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), lN(t, i, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0;
    }
    /**
     * Enable or disable using the mouse's location as an anchor when zooming
     * @param {boolean} useAnchor true to zoom to the mouse's location, false
     * to zoom to the center of the map
     * @api
     */
    setMouseAnchor(e) {
      this.useAnchor_ = e, e || (this.lastAnchor_ = null);
    }
  }
  const Tie = Cie;
  class Rie extends _S {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {};
      const t = (
        /** @type {import("./Pointer.js").Options} */
        e
      );
      t.stopDown || (t.stopDown = Yw), super(t), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = e.threshold !== void 0 ? e.threshold : 0.3, this.duration_ = e.duration !== void 0 ? e.duration : 250;
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     */
    handleDragEvent(e) {
      let t = 0;
      const i = this.targetPointers[0], a = this.targetPointers[1], o = Math.atan2(
        a.clientY - i.clientY,
        a.clientX - i.clientX
      );
      if (this.lastAngle_ !== void 0) {
        const p = o - this.lastAngle_;
        this.rotationDelta_ += p, !this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_ && (this.rotating_ = !0), t = p;
      }
      this.lastAngle_ = o;
      const u = e.map, c = u.getView();
      c.getConstraints().rotation !== tN && (this.anchor_ = u.getCoordinateFromPixelInternal(
        u.getEventPixel(uN(this.targetPointers))
      ), this.rotating_ && (u.render(), c.adjustRotationInternal(t, this.anchor_)));
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleUpEvent(e) {
      return this.targetPointers.length < 2 ? (e.map.getView().endInteraction(this.duration_), !1) : !0;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleDownEvent(e) {
      if (this.targetPointers.length >= 2) {
        const t = e.map;
        return this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.handlingDownUpSequence || t.getView().beginInteraction(), !0;
      }
      return !1;
    }
  }
  const Mie = Rie;
  class Oie extends _S {
    /**
     * @param {Options} [options] Options.
     */
    constructor(e) {
      e = e || {};
      const t = (
        /** @type {import("./Pointer.js").Options} */
        e
      );
      t.stopDown || (t.stopDown = Yw), super(t), this.anchor_ = null, this.duration_ = e.duration !== void 0 ? e.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1;
    }
    /**
     * Handle pointer drag events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     */
    handleDragEvent(e) {
      let t = 1;
      const i = this.targetPointers[0], a = this.targetPointers[1], o = i.clientX - a.clientX, u = i.clientY - a.clientY, c = Math.sqrt(o * o + u * u);
      this.lastDistance_ !== void 0 && (t = this.lastDistance_ / c), this.lastDistance_ = c;
      const p = e.map, y = p.getView();
      t != 1 && (this.lastScaleDelta_ = t), this.anchor_ = p.getCoordinateFromPixelInternal(
        p.getEventPixel(uN(this.targetPointers))
      ), p.render(), y.adjustResolutionInternal(t, this.anchor_);
    }
    /**
     * Handle pointer up events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleUpEvent(e) {
      if (this.targetPointers.length < 2) {
        const i = e.map.getView(), a = this.lastScaleDelta_ > 1 ? 1 : -1;
        return i.endInteraction(this.duration_, a), !1;
      }
      return !0;
    }
    /**
     * Handle pointer down events.
     * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
     * @return {boolean} If the event was consumed.
     */
    handleDownEvent(e) {
      if (this.targetPointers.length >= 2) {
        const t = e.map;
        return this.anchor_ = null, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1, this.handlingDownUpSequence || t.getView().beginInteraction(), !0;
      }
      return !1;
    }
  }
  const Aie = Oie;
  function Lie(n) {
    n = n || {};
    const e = new bf(), t = new Dne(-5e-3, 0.05, 100);
    return (n.altShiftDragRotate !== void 0 ? n.altShiftDragRotate : !0) && e.push(new pie()), (n.doubleClickZoom !== void 0 ? n.doubleClickZoom : !0) && e.push(
      new iie({
        delta: n.zoomDelta,
        duration: n.zoomDuration
      })
    ), (n.dragPan !== void 0 ? n.dragPan : !0) && e.push(
      new hie({
        onFocusOnly: n.onFocusOnly,
        kinetic: t
      })
    ), (n.pinchRotate !== void 0 ? n.pinchRotate : !0) && e.push(new Mie()), (n.pinchZoom !== void 0 ? n.pinchZoom : !0) && e.push(
      new Aie({
        duration: n.zoomDuration
      })
    ), (n.keyboard !== void 0 ? n.keyboard : !0) && (e.push(new xie()), e.push(
      new wie({
        delta: n.zoomDelta,
        duration: n.zoomDuration
      })
    )), (n.mouseWheelZoom !== void 0 ? n.mouseWheelZoom : !0) && e.push(
      new Tie({
        onFocusOnly: n.onFocusOnly,
        duration: n.zoomDuration
      })
    ), (n.shiftDragZoom !== void 0 ? n.shiftDragZoom : !0) && e.push(
      new Eie({
        duration: n.zoomDuration
      })
    ), e;
  }
  function TU(n) {
    if (n instanceof pS) {
      n.setMapInternal(null);
      return;
    }
    n instanceof S_ && n.getLayers().forEach(TU);
  }
  function RU(n, e) {
    if (n instanceof pS) {
      n.setMapInternal(e);
      return;
    }
    if (n instanceof S_) {
      const t = n.getLayers().getArray();
      for (let i = 0, a = t.length; i < a; ++i)
        RU(t[i], e);
    }
  }
  let Nie = class extends Of {
    /**
     * @param {MapOptions} [options] Map options.
     */
    constructor(e) {
      super(), e = e || {}, this.on, this.once, this.un;
      const t = Die(e);
      this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = e.maxTilesLoading !== void 0 ? e.maxTilesLoading : 16, this.pixelRatio_ = e.pixelRatio !== void 0 ? e.pixelRatio : Tj, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Tf(), this.pixelToCoordinateTransform_ = Tf(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = e.moveTolerance, this.keyboardEventTarget_ = t.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.targetElement_ = null, this.resizeObserver_ = new ResizeObserver(() => this.updateSize()), this.controls = t.controls || SU(), this.interactions = t.interactions || Lie({
        onFocusOnly: !0
      }), this.overlays_ = t.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new Gne(
        this.getTilePriority.bind(this),
        this.handleTileChange_.bind(this)
      ), this.addChangeListener(
        Co.LAYERGROUP,
        this.handleLayerGroupChanged_
      ), this.addChangeListener(Co.VIEW, this.handleViewChanged_), this.addChangeListener(Co.SIZE, this.handleSizeChanged_), this.addChangeListener(Co.TARGET, this.handleTargetChanged_), this.setProperties(t.values);
      const i = this;
      e.view && !(e.view instanceof kh) && e.view.then(function(a) {
        i.setView(new kh(a));
      }), this.controls.addEventListener(
        Al.ADD,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent
         */
        (a) => {
          a.element.setMap(this);
        }
      ), this.controls.addEventListener(
        Al.REMOVE,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent.
         */
        (a) => {
          a.element.setMap(null);
        }
      ), this.interactions.addEventListener(
        Al.ADD,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
         */
        (a) => {
          a.element.setMap(this);
        }
      ), this.interactions.addEventListener(
        Al.REMOVE,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
         */
        (a) => {
          a.element.setMap(null);
        }
      ), this.overlays_.addEventListener(
        Al.ADD,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
         */
        (a) => {
          this.addOverlayInternal_(a.element);
        }
      ), this.overlays_.addEventListener(
        Al.REMOVE,
        /**
         * @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
         */
        (a) => {
          const o = a.element.getId();
          o !== void 0 && delete this.overlayIdIndex_[o.toString()], a.element.setMap(null);
        }
      ), this.controls.forEach(
        /**
         * @param {import("./control/Control.js").default} control Control.
         */
        (a) => {
          a.setMap(this);
        }
      ), this.interactions.forEach(
        /**
         * @param {import("./interaction/Interaction.js").default} interaction Interaction.
         */
        (a) => {
          a.setMap(this);
        }
      ), this.overlays_.forEach(this.addOverlayInternal_.bind(this));
    }
    /**
     * Add the given control to the map.
     * @param {import("./control/Control.js").default} control Control.
     * @api
     */
    addControl(e) {
      this.getControls().push(e);
    }
    /**
     * Add the given interaction to the map. If you want to add an interaction
     * at another point of the collection use `getInteractions()` and the methods
     * available on {@link module:ol/Collection~Collection}. This can be used to
     * stop the event propagation from the handleEvent function. The interactions
     * get to handle the events in the reverse order of this collection.
     * @param {import("./interaction/Interaction.js").default} interaction Interaction to add.
     * @api
     */
    addInteraction(e) {
      this.getInteractions().push(e);
    }
    /**
     * Adds the given layer to the top of this map. If you want to add a layer
     * elsewhere in the stack, use `getLayers()` and the methods available on
     * {@link module:ol/Collection~Collection}.
     * @param {import("./layer/Base.js").default} layer Layer.
     * @api
     */
    addLayer(e) {
      this.getLayerGroup().getLayers().push(e);
    }
    /**
     * @param {import("./layer/Group.js").GroupEvent} event The layer add event.
     * @private
     */
    handleLayerAdd_(e) {
      RU(e.layer, this);
    }
    /**
     * Add the given overlay to the map.
     * @param {import("./Overlay.js").default} overlay Overlay.
     * @api
     */
    addOverlay(e) {
      this.getOverlays().push(e);
    }
    /**
     * This deals with map's overlay collection changes.
     * @param {import("./Overlay.js").default} overlay Overlay.
     * @private
     */
    addOverlayInternal_(e) {
      const t = e.getId();
      t !== void 0 && (this.overlayIdIndex_[t.toString()] = e), e.setMap(this);
    }
    /**
     *
     * Clean up.
     */
    disposeInternal() {
      this.controls.clear(), this.interactions.clear(), this.overlays_.clear(), this.resizeObserver_.disconnect(), this.setTarget(null), super.disposeInternal();
    }
    /**
     * Detect features that intersect a pixel on the viewport, and execute a
     * callback with each intersecting feature. Layers included in the detection can
     * be configured through the `layerFilter` option in `options`.
     * @param {import("./pixel.js").Pixel} pixel Pixel.
     * @param {function(import("./Feature.js").FeatureLike, import("./layer/Layer.js").default<import("./source/Source").default>, import("./geom/SimpleGeometry.js").default): T} callback Feature callback. The callback will be
     *     called with two arguments. The first argument is one
     *     {@link module:ol/Feature~Feature feature} or
     *     {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is
     *     the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for
     *     unmanaged layers. To stop detection, callback functions can return a
     *     truthy value.
     * @param {AtPixelOptions} [options] Optional options.
     * @return {T|undefined} Callback result, i.e. the return value of last
     * callback execution, or the first truthy callback return value.
     * @template T
     * @api
     */
    forEachFeatureAtPixel(e, t, i) {
      if (!this.frameState_ || !this.renderer_)
        return;
      const a = this.getCoordinateFromPixelInternal(e);
      i = i !== void 0 ? i : {};
      const o = i.hitTolerance !== void 0 ? i.hitTolerance : 0, u = i.layerFilter !== void 0 ? i.layerFilter : FE, c = i.checkWrapped !== !1;
      return this.renderer_.forEachFeatureAtCoordinate(
        a,
        this.frameState_,
        o,
        c,
        t,
        null,
        u,
        null
      );
    }
    /**
     * Get all features that intersect a pixel on the viewport.
     * @param {import("./pixel.js").Pixel} pixel Pixel.
     * @param {AtPixelOptions} [options] Optional options.
     * @return {Array<import("./Feature.js").FeatureLike>} The detected features or
     * an empty array if none were found.
     * @api
     */
    getFeaturesAtPixel(e, t) {
      const i = [];
      return this.forEachFeatureAtPixel(
        e,
        function(a) {
          i.push(a);
        },
        t
      ), i;
    }
    /**
     * Get all layers from all layer groups.
     * @return {Array<import("./layer/Layer.js").default>} Layers.
     * @api
     */
    getAllLayers() {
      const e = [];
      function t(i) {
        i.forEach(function(a) {
          a instanceof S_ ? t(a.getLayers()) : e.push(a);
        });
      }
      return t(this.getLayers()), e;
    }
    /**
     * Detect if features intersect a pixel on the viewport. Layers included in the
     * detection can be configured through the `layerFilter` option.
     * @param {import("./pixel.js").Pixel} pixel Pixel.
     * @param {AtPixelOptions} [options] Optional options.
     * @return {boolean} Is there a feature at the given pixel?
     * @api
     */
    hasFeatureAtPixel(e, t) {
      if (!this.frameState_ || !this.renderer_)
        return !1;
      const i = this.getCoordinateFromPixelInternal(e);
      t = t !== void 0 ? t : {};
      const a = t.layerFilter !== void 0 ? t.layerFilter : FE, o = t.hitTolerance !== void 0 ? t.hitTolerance : 0, u = t.checkWrapped !== !1;
      return this.renderer_.hasFeatureAtCoordinate(
        i,
        this.frameState_,
        o,
        u,
        a,
        null
      );
    }
    /**
     * Returns the coordinate in user projection for a browser event.
     * @param {MouseEvent} event Event.
     * @return {import("./coordinate.js").Coordinate} Coordinate.
     * @api
     */
    getEventCoordinate(e) {
      return this.getCoordinateFromPixel(this.getEventPixel(e));
    }
    /**
     * Returns the coordinate in view projection for a browser event.
     * @param {MouseEvent} event Event.
     * @return {import("./coordinate.js").Coordinate} Coordinate.
     */
    getEventCoordinateInternal(e) {
      return this.getCoordinateFromPixelInternal(this.getEventPixel(e));
    }
    /**
     * Returns the map pixel position for a browser event relative to the viewport.
     * @param {UIEvent|{clientX: number, clientY: number}} event Event.
     * @return {import("./pixel.js").Pixel} Pixel.
     * @api
     */
    getEventPixel(e) {
      const i = this.viewport_.getBoundingClientRect(), a = this.getSize(), o = i.width / a[0], u = i.height / a[1], c = (
        //FIXME Are we really calling this with a TouchEvent anywhere?
        "changedTouches" in e ? (
          /** @type {TouchEvent} */
          e.changedTouches[0]
        ) : (
          /** @type {MouseEvent} */
          e
        )
      );
      return [
        (c.clientX - i.left) / o,
        (c.clientY - i.top) / u
      ];
    }
    /**
     * Get the target in which this map is rendered.
     * Note that this returns what is entered as an option or in setTarget:
     * if that was an element, it returns an element; if a string, it returns that.
     * @return {HTMLElement|string|undefined} The Element or id of the Element that the
     *     map is rendered in.
     * @observable
     * @api
     */
    getTarget() {
      return (
        /** @type {HTMLElement|string|undefined} */
        this.get(Co.TARGET)
      );
    }
    /**
     * Get the DOM element into which this map is rendered. In contrast to
     * `getTarget` this method always return an `Element`, or `null` if the
     * map has no target.
     * @return {HTMLElement} The element that the map is rendered in.
     * @api
     */
    getTargetElement() {
      return this.targetElement_;
    }
    /**
     * Get the coordinate for a given pixel.  This returns a coordinate in the
     * user projection.
     * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport.
     * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position.
     * @api
     */
    getCoordinateFromPixel(e) {
      return rA(
        this.getCoordinateFromPixelInternal(e),
        this.getView().getProjection()
      );
    }
    /**
     * Get the coordinate for a given pixel.  This returns a coordinate in the
     * map view projection.
     * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport.
     * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position.
     */
    getCoordinateFromPixelInternal(e) {
      const t = this.frameState_;
      return t ? os(t.pixelToCoordinateTransform, e.slice()) : null;
    }
    /**
     * Get the map controls. Modifying this collection changes the controls
     * associated with the map.
     * @return {Collection<import("./control/Control.js").default>} Controls.
     * @api
     */
    getControls() {
      return this.controls;
    }
    /**
     * Get the map overlays. Modifying this collection changes the overlays
     * associated with the map.
     * @return {Collection<import("./Overlay.js").default>} Overlays.
     * @api
     */
    getOverlays() {
      return this.overlays_;
    }
    /**
     * Get an overlay by its identifier (the value returned by overlay.getId()).
     * Note that the index treats string and numeric identifiers as the same. So
     * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.
     * @param {string|number} id Overlay identifier.
     * @return {import("./Overlay.js").default} Overlay.
     * @api
     */
    getOverlayById(e) {
      const t = this.overlayIdIndex_[e.toString()];
      return t !== void 0 ? t : null;
    }
    /**
     * Get the map interactions. Modifying this collection changes the interactions
     * associated with the map.
     *
     * Interactions are used for e.g. pan, zoom and rotate.
     * @return {Collection<import("./interaction/Interaction.js").default>} Interactions.
     * @api
     */
    getInteractions() {
      return this.interactions;
    }
    /**
     * Get the layergroup associated with this map.
     * @return {LayerGroup} A layer group containing the layers in this map.
     * @observable
     * @api
     */
    getLayerGroup() {
      return (
        /** @type {LayerGroup} */
        this.get(Co.LAYERGROUP)
      );
    }
    /**
     * Clear any existing layers and add layers to the map.
     * @param {Array<import("./layer/Base.js").default>|Collection<import("./layer/Base.js").default>} layers The layers to be added to the map.
     * @api
     */
    setLayers(e) {
      const t = this.getLayerGroup();
      if (e instanceof bf) {
        t.setLayers(e);
        return;
      }
      const i = t.getLayers();
      i.clear(), i.extend(e);
    }
    /**
     * Get the collection of layers associated with this map.
     * @return {!Collection<import("./layer/Base.js").default>} Layers.
     * @api
     */
    getLayers() {
      return this.getLayerGroup().getLayers();
    }
    /**
     * @return {boolean} Layers have sources that are still loading.
     */
    getLoadingOrNotReady() {
      const e = this.getLayerGroup().getLayerStatesArray();
      for (let t = 0, i = e.length; t < i; ++t) {
        const a = e[t];
        if (!a.visible)
          continue;
        const o = a.layer.getRenderer();
        if (o && !o.ready)
          return !0;
        const u = a.layer.getSource();
        if (u && u.loading)
          return !0;
      }
      return !1;
    }
    /**
     * Get the pixel for a coordinate.  This takes a coordinate in the user
     * projection and returns the corresponding pixel.
     * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate.
     * @return {import("./pixel.js").Pixel} A pixel position in the map viewport.
     * @api
     */
    getPixelFromCoordinate(e) {
      const t = gp(
        e,
        this.getView().getProjection()
      );
      return this.getPixelFromCoordinateInternal(t);
    }
    /**
     * Get the pixel for a coordinate.  This takes a coordinate in the map view
     * projection and returns the corresponding pixel.
     * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate.
     * @return {import("./pixel.js").Pixel} A pixel position in the map viewport.
     */
    getPixelFromCoordinateInternal(e) {
      const t = this.frameState_;
      return t ? os(
        t.coordinateToPixelTransform,
        e.slice(0, 2)
      ) : null;
    }
    /**
     * Get the map renderer.
     * @return {import("./renderer/Map.js").default|null} Renderer
     */
    getRenderer() {
      return this.renderer_;
    }
    /**
     * Get the size of this map.
     * @return {import("./size.js").Size|undefined} The size in pixels of the map in the DOM.
     * @observable
     * @api
     */
    getSize() {
      return (
        /** @type {import("./size.js").Size|undefined} */
        this.get(Co.SIZE)
      );
    }
    /**
     * Get the view associated with this map. A view manages properties such as
     * center and resolution.
     * @return {View} The view that controls this map.
     * @observable
     * @api
     */
    getView() {
      return (
        /** @type {View} */
        this.get(Co.VIEW)
      );
    }
    /**
     * Get the element that serves as the map viewport.
     * @return {HTMLElement} Viewport.
     * @api
     */
    getViewport() {
      return this.viewport_;
    }
    /**
     * Get the element that serves as the container for overlays.  Elements added to
     * this container will let mousedown and touchstart events through to the map,
     * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}
     * events.
     * @return {!HTMLElement} The map's overlay container.
     */
    getOverlayContainer() {
      return this.overlayContainer_;
    }
    /**
     * Get the element that serves as a container for overlays that don't allow
     * event propagation. Elements added to this container won't let mousedown and
     * touchstart events through to the map, so clicks and gestures on an overlay
     * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
     * @return {!HTMLElement} The map's overlay container that stops events.
     */
    getOverlayContainerStopEvent() {
      return this.overlayContainerStopEvent_;
    }
    /**
     * @return {!Document} The document where the map is displayed.
     */
    getOwnerDocument() {
      const e = this.getTargetElement();
      return e ? e.ownerDocument : document;
    }
    /**
     * @param {import("./Tile.js").default} tile Tile.
     * @param {string} tileSourceKey Tile source key.
     * @param {import("./coordinate.js").Coordinate} tileCenter Tile center.
     * @param {number} tileResolution Tile resolution.
     * @return {number} Tile priority.
     */
    getTilePriority(e, t, i, a) {
      return Yne(
        this.frameState_,
        e,
        t,
        i,
        a
      );
    }
    /**
     * @param {UIEvent} browserEvent Browser event.
     * @param {string} [type] Type.
     */
    handleBrowserEvent(e, t) {
      t = t || e.type;
      const i = new Vg(t, this, e);
      this.handleMapBrowserEvent(i);
    }
    /**
     * @param {MapBrowserEvent} mapBrowserEvent The event to handle.
     */
    handleMapBrowserEvent(e) {
      if (!this.frameState_)
        return;
      const t = (
        /** @type {PointerEvent} */
        e.originalEvent
      ), i = t.type;
      if (i === IA.POINTERDOWN || i === Cn.WHEEL || i === Cn.KEYDOWN) {
        const a = this.getOwnerDocument(), o = this.viewport_.getRootNode ? this.viewport_.getRootNode() : a, u = (
          /** @type {Node} */
          t.target
        );
        if (
          // Abort if the target is a child of the container for elements whose events are not meant
          // to be handled by map interactions.
          this.overlayContainerStopEvent_.contains(u) || // Abort if the event target is a child of the container that is no longer in the page.
          // It's possible for the target to no longer be in the page if it has been removed in an
          // event listener, this might happen in a Control that recreates it's content based on
          // user interaction either manually or via a render in something like https://reactjs.org/
          !(o === a ? a.documentElement : o).contains(u)
        )
          return;
      }
      if (e.frameState = this.frameState_, this.dispatchEvent(e) !== !1) {
        const a = this.getInteractions().getArray().slice();
        for (let o = a.length - 1; o >= 0; o--) {
          const u = a[o];
          if (u.getMap() !== this || !u.getActive() || !this.getTargetElement())
            continue;
          if (!u.handleEvent(e) || e.propagationStopped)
            break;
        }
      }
    }
    /**
     * @protected
     */
    handlePostRender() {
      const e = this.frameState_, t = this.tileQueue_;
      if (!t.isEmpty()) {
        let a = this.maxTilesLoading_, o = a;
        if (e) {
          const u = e.viewHints;
          if (u[ws.ANIMATING] || u[ws.INTERACTING]) {
            const c = Date.now() - e.time > 8;
            a = c ? 0 : 8, o = c ? 0 : 2;
          }
        }
        t.getTilesLoading() < a && (t.reprioritize(), t.loadMoreTiles(a, o));
      }
      e && this.renderer_ && !e.animate && (this.renderComplete_ === !0 ? (this.hasListener(Hh.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent(
        Hh.RENDERCOMPLETE,
        e
      ), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent(
        new I0(vp.LOADEND, this, e)
      ))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent(
        new I0(vp.LOADSTART, this, e)
      )));
      const i = this.postRenderFunctions_;
      for (let a = 0, o = i.length; a < o; ++a)
        i[a](this, e);
      i.length = 0;
    }
    /**
     * @private
     */
    handleSizeChanged_() {
      this.getView() && !this.getView().getAnimating() && this.getView().resolveConstraints(0), this.render();
    }
    /**
     * @private
     */
    handleTargetChanged_() {
      if (this.mapBrowserEventHandler_) {
        for (let i = 0, a = this.targetChangeHandlerKeys_.length; i < a; ++i)
          Or(this.targetChangeHandlerKeys_[i]);
        this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener(
          Cn.CONTEXTMENU,
          this.boundHandleBrowserEvent_
        ), this.viewport_.removeEventListener(
          Cn.WHEEL,
          this.boundHandleBrowserEvent_
        ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, gw(this.viewport_);
      }
      if (this.targetElement_) {
        this.resizeObserver_.unobserve(this.targetElement_);
        const i = this.targetElement_.getRootNode();
        i instanceof ShadowRoot && this.resizeObserver_.unobserve(i.host), this.setSize(void 0);
      }
      const e = this.getTarget(), t = typeof e == "string" ? document.getElementById(e) : e;
      if (this.targetElement_ = t, !t)
        this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0);
      else {
        t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new jne(this)), this.mapBrowserEventHandler_ = new Bne(
          this,
          this.moveTolerance_
        );
        for (const o in ha)
          this.mapBrowserEventHandler_.addEventListener(
            ha[o],
            this.handleMapBrowserEvent.bind(this)
          );
        this.viewport_.addEventListener(
          Cn.CONTEXTMENU,
          this.boundHandleBrowserEvent_,
          !1
        ), this.viewport_.addEventListener(
          Cn.WHEEL,
          this.boundHandleBrowserEvent_,
          Rj ? { passive: !1 } : !1
        );
        const i = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : t;
        this.targetChangeHandlerKeys_ = [
          di(
            i,
            Cn.KEYDOWN,
            this.handleBrowserEvent,
            this
          ),
          di(
            i,
            Cn.KEYPRESS,
            this.handleBrowserEvent,
            this
          )
        ];
        const a = t.getRootNode();
        a instanceof ShadowRoot && this.resizeObserver_.observe(a.host), this.resizeObserver_.observe(t);
      }
      this.updateSize();
    }
    /**
     * @private
     */
    handleTileChange_() {
      this.render();
    }
    /**
     * @private
     */
    handleViewPropertyChanged_() {
      this.render();
    }
    /**
     * @private
     */
    handleViewChanged_() {
      this.viewPropertyListenerKey_ && (Or(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (Or(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null);
      const e = this.getView();
      e && (this.updateViewportSize_(this.getSize()), this.viewPropertyListenerKey_ = di(
        e,
        s_.PROPERTYCHANGE,
        this.handleViewPropertyChanged_,
        this
      ), this.viewChangeListenerKey_ = di(
        e,
        Cn.CHANGE,
        this.handleViewPropertyChanged_,
        this
      ), e.resolveConstraints(0)), this.render();
    }
    /**
     * @private
     */
    handleLayerGroupChanged_() {
      this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(Or), this.layerGroupPropertyListenerKeys_ = null);
      const e = this.getLayerGroup();
      e && (this.handleLayerAdd_(new Hg("addlayer", e)), this.layerGroupPropertyListenerKeys_ = [
        di(e, s_.PROPERTYCHANGE, this.render, this),
        di(e, Cn.CHANGE, this.render, this),
        di(e, "addlayer", this.handleLayerAdd_, this),
        di(e, "removelayer", this.handleLayerRemove_, this)
      ]), this.render();
    }
    /**
     * @return {boolean} Is rendered.
     */
    isRendered() {
      return !!this.frameState_;
    }
    /**
     * @private
     */
    animationDelay_() {
      this.animationDelayKey_ = void 0, this.renderFrame_(Date.now());
    }
    /**
     * Requests an immediate render in a synchronous manner.
     * @api
     */
    renderSync() {
      this.animationDelayKey_ && cancelAnimationFrame(this.animationDelayKey_), this.animationDelay_();
    }
    /**
     * Redraws all text after new fonts have loaded
     */
    redrawText() {
      const e = this.getLayerGroup().getLayerStatesArray();
      for (let t = 0, i = e.length; t < i; ++t) {
        const a = e[t].layer;
        a.hasRenderer() && a.getRenderer().handleFontsChanged();
      }
    }
    /**
     * Request a map rendering (at the next animation frame).
     * @api
     */
    render() {
      this.renderer_ && this.animationDelayKey_ === void 0 && (this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_));
    }
    /**
     * This method is meant to be called in a layer's `prerender` listener. It causes all collected
     * declutter items to be decluttered and rendered on the map immediately. This is useful for
     * layers that need to appear entirely above the decluttered items of layers lower in the layer
     * stack.
     * @api
     */
    flushDeclutterItems() {
      const e = this.frameState_;
      e && this.renderer_.flushDeclutterItems(e);
    }
    /**
     * Remove the given control from the map.
     * @param {import("./control/Control.js").default} control Control.
     * @return {import("./control/Control.js").default|undefined} The removed control (or undefined
     *     if the control was not found).
     * @api
     */
    removeControl(e) {
      return this.getControls().remove(e);
    }
    /**
     * Remove the given interaction from the map.
     * @param {import("./interaction/Interaction.js").default} interaction Interaction to remove.
     * @return {import("./interaction/Interaction.js").default|undefined} The removed interaction (or
     *     undefined if the interaction was not found).
     * @api
     */
    removeInteraction(e) {
      return this.getInteractions().remove(e);
    }
    /**
     * Removes the given layer from the map.
     * @param {import("./layer/Base.js").default} layer Layer.
     * @return {import("./layer/Base.js").default|undefined} The removed layer (or undefined if the
     *     layer was not found).
     * @api
     */
    removeLayer(e) {
      return this.getLayerGroup().getLayers().remove(e);
    }
    /**
     * @param {import("./layer/Group.js").GroupEvent} event The layer remove event.
     * @private
     */
    handleLayerRemove_(e) {
      TU(e.layer);
    }
    /**
     * Remove the given overlay from the map.
     * @param {import("./Overlay.js").default} overlay Overlay.
     * @return {import("./Overlay.js").default|undefined} The removed overlay (or undefined
     *     if the overlay was not found).
     * @api
     */
    removeOverlay(e) {
      return this.getOverlays().remove(e);
    }
    /**
     * @param {number} time Time.
     * @private
     */
    renderFrame_(e) {
      const t = this.getSize(), i = this.getView(), a = this.frameState_;
      let o = null;
      if (t !== void 0 && B3(t) && i && i.isDef()) {
        const u = i.getHints(
          this.frameState_ ? this.frameState_.viewHints : void 0
        ), c = i.getState();
        if (o = {
          animate: !1,
          coordinateToPixelTransform: this.coordinateToPixelTransform_,
          declutterTree: null,
          extent: RE(
            c.center,
            c.resolution,
            c.rotation,
            t
          ),
          index: this.frameIndex_++,
          layerIndex: 0,
          layerStatesArray: this.getLayerGroup().getLayerStatesArray(),
          pixelRatio: this.pixelRatio_,
          pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
          postRenderFunctions: [],
          size: t,
          tileQueue: this.tileQueue_,
          time: e,
          usedTiles: {},
          viewState: c,
          viewHints: u,
          wantedTiles: {},
          mapId: Pi(this),
          renderTargets: {}
        }, c.nextCenter && c.nextResolution) {
          const p = isNaN(c.nextRotation) ? c.rotation : c.nextRotation;
          o.nextExtent = RE(
            c.nextCenter,
            c.nextResolution,
            p,
            t
          );
        }
      }
      this.frameState_ = o, this.renderer_.renderFrame(o), o && (o.animate && this.render(), Array.prototype.push.apply(
        this.postRenderFunctions_,
        o.postRenderFunctions
      ), a && (!this.previousExtent_ || !Kv(this.previousExtent_) && !K0(o.extent, this.previousExtent_)) && (this.dispatchEvent(
        new I0(vp.MOVESTART, this, a)
      ), this.previousExtent_ = ZE(this.previousExtent_)), this.previousExtent_ && !o.viewHints[ws.ANIMATING] && !o.viewHints[ws.INTERACTING] && !K0(o.extent, this.previousExtent_) && (this.dispatchEvent(
        new I0(vp.MOVEEND, this, o)
      ), W2(o.extent, this.previousExtent_))), this.dispatchEvent(new I0(vp.POSTRENDER, this, o)), this.renderComplete_ = this.hasListener(vp.LOADSTART) || this.hasListener(vp.LOADEND) || this.hasListener(Hh.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => {
        this.postRenderTimeoutHandle_ = void 0, this.handlePostRender();
      }, 0));
    }
    /**
     * Sets the layergroup of this map.
     * @param {LayerGroup} layerGroup A layer group containing the layers in this map.
     * @observable
     * @api
     */
    setLayerGroup(e) {
      const t = this.getLayerGroup();
      t && this.handleLayerRemove_(new Hg("removelayer", t)), this.set(Co.LAYERGROUP, e);
    }
    /**
     * Set the size of this map.
     * @param {import("./size.js").Size|undefined} size The size in pixels of the map in the DOM.
     * @observable
     * @api
     */
    setSize(e) {
      this.set(Co.SIZE, e);
    }
    /**
     * Set the target element to render this map into.
     * @param {HTMLElement|string} [target] The Element or id of the Element
     *     that the map is rendered in.
     * @observable
     * @api
     */
    setTarget(e) {
      this.set(Co.TARGET, e);
    }
    /**
     * Set the view for this map.
     * @param {View|Promise<import("./View.js").ViewOptions>} view The view that controls this map.
     * It is also possible to pass a promise that resolves to options for constructing a view.  This
     * alternative allows view properties to be resolved by sources or other components that load
     * view-related metadata.
     * @observable
     * @api
     */
    setView(e) {
      if (!e || e instanceof kh) {
        this.set(Co.VIEW, e);
        return;
      }
      this.set(Co.VIEW, new kh());
      const t = this;
      e.then(function(i) {
        t.setView(new kh(i));
      });
    }
    /**
     * Force a recalculation of the map viewport size.  This should be called when
     * third-party code changes the size of the map viewport.
     * @api
     */
    updateSize() {
      const e = this.getTargetElement();
      let t;
      if (e) {
        const a = getComputedStyle(e), o = e.offsetWidth - parseFloat(a.borderLeftWidth) - parseFloat(a.paddingLeft) - parseFloat(a.paddingRight) - parseFloat(a.borderRightWidth), u = e.offsetHeight - parseFloat(a.borderTopWidth) - parseFloat(a.paddingTop) - parseFloat(a.paddingBottom) - parseFloat(a.borderBottomWidth);
        !isNaN(o) && !isNaN(u) && (t = [o, u], !B3(t) && (e.offsetWidth || e.offsetHeight || e.getClientRects().length) && J2(
          "No map visible because the map container's width or height are 0."
        ));
      }
      const i = this.getSize();
      t && (!i || !hm(t, i)) && (this.setSize(t), this.updateViewportSize_(t));
    }
    /**
     * Recomputes the viewport size and save it on the view object (if any)
     * @param {import("./size.js").Size|undefined} size The size.
     * @private
     */
    updateViewportSize_(e) {
      const t = this.getView();
      t && t.setViewportSize(e);
    }
  };
  function Die(n) {
    let e = null;
    n.keyboardEventTarget !== void 0 && (e = typeof n.keyboardEventTarget == "string" ? document.getElementById(n.keyboardEventTarget) : n.keyboardEventTarget);
    const t = {}, i = n.layers && typeof /** @type {?} */
    n.layers.getLayers == "function" ? (
      /** @type {LayerGroup} */
      n.layers
    ) : new S_({
      layers: (
        /** @type {Collection<import("./layer/Base.js").default>|Array<import("./layer/Base.js").default>} */
        n.layers
      )
    });
    t[Co.LAYERGROUP] = i, t[Co.TARGET] = n.target, t[Co.VIEW] = n.view instanceof kh ? n.view : new kh();
    let a;
    n.controls !== void 0 && (Array.isArray(n.controls) ? a = new bf(n.controls.slice()) : (Ei(
      typeof /** @type {?} */
      n.controls.getArray == "function",
      "Expected `controls` to be an array or an `ol/Collection.js`"
    ), a = n.controls));
    let o;
    n.interactions !== void 0 && (Array.isArray(n.interactions) ? o = new bf(n.interactions.slice()) : (Ei(
      typeof /** @type {?} */
      n.interactions.getArray == "function",
      "Expected `interactions` to be an array or an `ol/Collection.js`"
    ), o = n.interactions));
    let u;
    return n.overlays !== void 0 ? Array.isArray(n.overlays) ? u = new bf(n.overlays.slice()) : (Ei(
      typeof /** @type {?} */
      n.overlays.getArray == "function",
      "Expected `overlays` to be an array or an `ol/Collection.js`"
    ), u = n.overlays) : u = new bf(), {
      controls: a,
      interactions: o,
      keyboardEventTarget: e,
      overlays: u,
      values: t
    };
  }
  const S2 = Nie, wo = {
    ELEMENT: "element",
    MAP: "map",
    OFFSET: "offset",
    POSITION: "position",
    POSITIONING: "positioning"
  };
  class Iie extends Of {
    /**
     * @param {Options} options Overlay options.
     */
    constructor(e) {
      super(), this.on, this.once, this.un, this.options = e, this.id = e.id, this.insertFirst = e.insertFirst !== void 0 ? e.insertFirst : !0, this.stopEvent = e.stopEvent !== void 0 ? e.stopEvent : !0, this.element = document.createElement("div"), this.element.className = e.className !== void 0 ? e.className : "ol-overlay-container " + uee, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.autoPan = e.autoPan === !0 ? {} : e.autoPan || void 0, this.rendered = {
        transform_: "",
        visible: !0
      }, this.mapPostrenderListenerKey = null, this.addChangeListener(wo.ELEMENT, this.handleElementChanged), this.addChangeListener(wo.MAP, this.handleMapChanged), this.addChangeListener(wo.OFFSET, this.handleOffsetChanged), this.addChangeListener(wo.POSITION, this.handlePositionChanged), this.addChangeListener(wo.POSITIONING, this.handlePositioningChanged), e.element !== void 0 && this.setElement(e.element), this.setOffset(e.offset !== void 0 ? e.offset : [0, 0]), this.setPositioning(e.positioning || "top-left"), e.position !== void 0 && this.setPosition(e.position);
    }
    /**
     * Get the DOM element of this overlay.
     * @return {HTMLElement|undefined} The Element containing the overlay.
     * @observable
     * @api
     */
    getElement() {
      return (
        /** @type {HTMLElement|undefined} */
        this.get(wo.ELEMENT)
      );
    }
    /**
     * Get the overlay identifier which is set on constructor.
     * @return {number|string|undefined} Id.
     * @api
     */
    getId() {
      return this.id;
    }
    /**
     * Get the map associated with this overlay.
     * @return {import("./Map.js").default|null} The map that the
     * overlay is part of.
     * @observable
     * @api
     */
    getMap() {
      return (
        /** @type {import("./Map.js").default|null} */
        this.get(wo.MAP) || null
      );
    }
    /**
     * Get the offset of this overlay.
     * @return {Array<number>} The offset.
     * @observable
     * @api
     */
    getOffset() {
      return (
        /** @type {Array<number>} */
        this.get(wo.OFFSET)
      );
    }
    /**
     * Get the current position of this overlay.
     * @return {import("./coordinate.js").Coordinate|undefined} The spatial point that the overlay is
     *     anchored at.
     * @observable
     * @api
     */
    getPosition() {
      return (
        /** @type {import("./coordinate.js").Coordinate|undefined} */
        this.get(wo.POSITION)
      );
    }
    /**
     * Get the current positioning of this overlay.
     * @return {Positioning} How the overlay is positioned
     *     relative to its point on the map.
     * @observable
     * @api
     */
    getPositioning() {
      return (
        /** @type {Positioning} */
        this.get(wo.POSITIONING)
      );
    }
    /**
     * @protected
     */
    handleElementChanged() {
      Gj(this.element);
      const e = this.getElement();
      e && this.element.appendChild(e);
    }
    /**
     * @protected
     */
    handleMapChanged() {
      this.mapPostrenderListenerKey && (gw(this.element), Or(this.mapPostrenderListenerKey), this.mapPostrenderListenerKey = null);
      const e = this.getMap();
      if (e) {
        this.mapPostrenderListenerKey = di(
          e,
          vp.POSTRENDER,
          this.render,
          this
        ), this.updatePixelPosition();
        const t = this.stopEvent ? e.getOverlayContainerStopEvent() : e.getOverlayContainer();
        this.insertFirst ? t.insertBefore(this.element, t.childNodes[0] || null) : t.appendChild(this.element), this.performAutoPan();
      }
    }
    /**
     * @protected
     */
    render() {
      this.updatePixelPosition();
    }
    /**
     * @protected
     */
    handleOffsetChanged() {
      this.updatePixelPosition();
    }
    /**
     * @protected
     */
    handlePositionChanged() {
      this.updatePixelPosition(), this.performAutoPan();
    }
    /**
     * @protected
     */
    handlePositioningChanged() {
      this.updatePixelPosition();
    }
    /**
     * Set the DOM element to be associated with this overlay.
     * @param {HTMLElement|undefined} element The Element containing the overlay.
     * @observable
     * @api
     */
    setElement(e) {
      this.set(wo.ELEMENT, e);
    }
    /**
     * Set the map to be associated with this overlay.
     * @param {import("./Map.js").default|null} map The map that the
     * overlay is part of. Pass `null` to just remove the overlay from the current map.
     * @observable
     * @api
     */
    setMap(e) {
      this.set(wo.MAP, e);
    }
    /**
     * Set the offset for this overlay.
     * @param {Array<number>} offset Offset.
     * @observable
     * @api
     */
    setOffset(e) {
      this.set(wo.OFFSET, e);
    }
    /**
     * Set the position for this overlay. If the position is `undefined` the
     * overlay is hidden.
     * @param {import("./coordinate.js").Coordinate|undefined} position The spatial point that the overlay
     *     is anchored at.
     * @observable
     * @api
     */
    setPosition(e) {
      this.set(wo.POSITION, e);
    }
    /**
     * Pan the map so that the overlay is entirely visible in the current viewport
     * (if necessary) using the configured autoPan parameters
     * @protected
     */
    performAutoPan() {
      this.autoPan && this.panIntoView(this.autoPan);
    }
    /**
     * Pan the map so that the overlay is entirely visible in the current viewport
     * (if necessary).
     * @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action
     * @api
     */
    panIntoView(e) {
      const t = this.getMap();
      if (!t || !t.getTargetElement() || !this.get(wo.POSITION))
        return;
      const i = this.getRect(t.getTargetElement(), t.getSize()), a = this.getElement(), o = this.getRect(a, [
        see(a),
        oee(a)
      ]);
      e = e || {};
      const u = e.margin === void 0 ? 20 : e.margin;
      if (!xf(i, o)) {
        const c = o[0] - i[0], p = i[2] - o[2], y = o[1] - i[1], _ = i[3] - o[3], S = [0, 0];
        if (c < 0 ? S[0] = c - u : p < 0 && (S[0] = Math.abs(p) + u), y < 0 ? S[1] = y - u : _ < 0 && (S[1] = Math.abs(_) + u), S[0] !== 0 || S[1] !== 0) {
          const b = (
            /** @type {import("./coordinate.js").Coordinate} */
            t.getView().getCenterInternal()
          ), T = t.getPixelFromCoordinateInternal(b);
          if (!T)
            return;
          const O = [T[0] + S[0], T[1] + S[1]], N = e.animation || {};
          t.getView().animateInternal({
            center: t.getCoordinateFromPixelInternal(O),
            duration: N.duration,
            easing: N.easing
          });
        }
      }
    }
    /**
     * Get the extent of an element relative to the document
     * @param {HTMLElement} element The element.
     * @param {import("./size.js").Size} size The size of the element.
     * @return {import("./extent.js").Extent} The extent.
     * @protected
     */
    getRect(e, t) {
      const i = e.getBoundingClientRect(), a = i.left + window.pageXOffset, o = i.top + window.pageYOffset;
      return [a, o, a + t[0], o + t[1]];
    }
    /**
     * Set the positioning for this overlay.
     * @param {Positioning} positioning how the overlay is
     *     positioned relative to its point on the map.
     * @observable
     * @api
     */
    setPositioning(e) {
      this.set(wo.POSITIONING, e);
    }
    /**
     * Modify the visibility of the element.
     * @param {boolean} visible Element visibility.
     * @protected
     */
    setVisible(e) {
      this.rendered.visible !== e && (this.element.style.display = e ? "" : "none", this.rendered.visible = e);
    }
    /**
     * Update pixel position.
     * @protected
     */
    updatePixelPosition() {
      const e = this.getMap(), t = this.getPosition();
      if (!e || !e.isRendered() || !t) {
        this.setVisible(!1);
        return;
      }
      const i = e.getPixelFromCoordinate(t), a = e.getSize();
      this.updateRenderedPosition(i, a);
    }
    /**
     * @param {import("./pixel.js").Pixel} pixel The pixel location.
     * @param {import("./size.js").Size|undefined} mapSize The map size.
     * @protected
     */
    updateRenderedPosition(e, t) {
      const i = this.element.style, a = this.getOffset(), o = this.getPositioning();
      this.setVisible(!0);
      const u = Math.round(e[0] + a[0]) + "px", c = Math.round(e[1] + a[1]) + "px";
      let p = "0%", y = "0%";
      o == "bottom-right" || o == "center-right" || o == "top-right" ? p = "-100%" : (o == "bottom-center" || o == "center-center" || o == "top-center") && (p = "-50%"), o == "bottom-left" || o == "bottom-center" || o == "bottom-right" ? y = "-100%" : (o == "center-left" || o == "center-center" || o == "center-right") && (y = "-50%");
      const _ = `translate(${p}, ${y}) translate(${u}, ${c})`;
      this.rendered.transform_ != _ && (this.rendered.transform_ = _, i.transform = _);
    }
    /**
     * returns the options this Overlay has been created with
     * @return {Options} overlay options
     */
    getOptions() {
      return this.options;
    }
  }
  const Pie = Iie;
  class kie {
    /**
     * @param {number} [highWaterMark] High water mark.
     */
    constructor(e) {
      this.highWaterMark = e !== void 0 ? e : 2048, this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null;
    }
    /**
     * @return {boolean} Can expire cache.
     */
    canExpireCache() {
      return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;
    }
    /**
     * Expire the cache.
     * @param {!Object<string, boolean>} [keep] Keys to keep. To be implemented by subclasses.
     */
    expireCache(e) {
      for (; this.canExpireCache(); )
        this.pop();
    }
    /**
     * FIXME empty description for jsdoc
     */
    clear() {
      this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null;
    }
    /**
     * @param {string} key Key.
     * @return {boolean} Contains key.
     */
    containsKey(e) {
      return this.entries_.hasOwnProperty(e);
    }
    /**
     * @param {function(T, string, LRUCache<T>): ?} f The function
     *     to call for every entry from the oldest to the newer. This function takes
     *     3 arguments (the entry value, the entry key and the LRUCache object).
     *     The return value is ignored.
     */
    forEach(e) {
      let t = this.oldest_;
      for (; t; )
        e(t.value_, t.key_, this), t = t.newer;
    }
    /**
     * @param {string} key Key.
     * @param {*} [options] Options (reserved for subclasses).
     * @return {T} Value.
     */
    get(e, t) {
      const i = this.entries_[e];
      return Ei(
        i !== void 0,
        "Tried to get a value for a key that does not exist in the cache"
      ), i === this.newest_ || (i === this.oldest_ ? (this.oldest_ = /** @type {Entry} */
      this.oldest_.newer, this.oldest_.older = null) : (i.newer.older = i.older, i.older.newer = i.newer), i.newer = null, i.older = this.newest_, this.newest_.newer = i, this.newest_ = i), i.value_;
    }
    /**
     * Remove an entry from the cache.
     * @param {string} key The entry key.
     * @return {T} The removed entry.
     */
    remove(e) {
      const t = this.entries_[e];
      return Ei(
        t !== void 0,
        "Tried to get a value for a key that does not exist in the cache"
      ), t === this.newest_ ? (this.newest_ = /** @type {Entry} */
      t.older, this.newest_ && (this.newest_.newer = null)) : t === this.oldest_ ? (this.oldest_ = /** @type {Entry} */
      t.newer, this.oldest_ && (this.oldest_.older = null)) : (t.newer.older = t.older, t.older.newer = t.newer), delete this.entries_[e], --this.count_, t.value_;
    }
    /**
     * @return {number} Count.
     */
    getCount() {
      return this.count_;
    }
    /**
     * @return {Array<string>} Keys.
     */
    getKeys() {
      const e = new Array(this.count_);
      let t = 0, i;
      for (i = this.newest_; i; i = i.older)
        e[t++] = i.key_;
      return e;
    }
    /**
     * @return {Array<T>} Values.
     */
    getValues() {
      const e = new Array(this.count_);
      let t = 0, i;
      for (i = this.newest_; i; i = i.older)
        e[t++] = i.value_;
      return e;
    }
    /**
     * @return {T} Last value.
     */
    peekLast() {
      return this.oldest_.value_;
    }
    /**
     * @return {string} Last key.
     */
    peekLastKey() {
      return this.oldest_.key_;
    }
    /**
     * Get the key of the newest item in the cache.  Throws if the cache is empty.
     * @return {string} The newest key.
     */
    peekFirstKey() {
      return this.newest_.key_;
    }
    /**
     * Return an entry without updating least recently used time.
     * @param {string} key Key.
     * @return {T|undefined} Value.
     */
    peek(e) {
      var t;
      return (t = this.entries_[e]) == null ? void 0 : t.value_;
    }
    /**
     * @return {T} value Value.
     */
    pop() {
      const e = this.oldest_;
      return delete this.entries_[e.key_], e.newer && (e.newer.older = null), this.oldest_ = /** @type {Entry} */
      e.newer, this.oldest_ || (this.newest_ = null), --this.count_, e.value_;
    }
    /**
     * @param {string} key Key.
     * @param {T} value Value.
     */
    replace(e, t) {
      this.get(e), this.entries_[e].value_ = t;
    }
    /**
     * @param {string} key Key.
     * @param {T} value Value.
     */
    set(e, t) {
      Ei(
        !(e in this.entries_),
        "Tried to set a value for a key that is used already"
      );
      const i = {
        key_: e,
        newer: null,
        older: this.newest_,
        value_: t
      };
      this.newest_ ? this.newest_.newer = i : this.oldest_ = i, this.newest_ = i, this.entries_[e] = i, ++this.count_;
    }
    /**
     * Set a maximum number of entries for the cache.
     * @param {number} size Cache size.
     * @api
     */
    setSize(e) {
      this.highWaterMark = e;
    }
  }
  const Fie = kie;
  function x2(n, e, t, i) {
    return i !== void 0 ? (i[0] = n, i[1] = e, i[2] = t, i) : [n, e, t];
  }
  function tC(n, e, t) {
    return n + "/" + e + "/" + t;
  }
  function MU(n) {
    return tC(n[0], n[1], n[2]);
  }
  function jie(n) {
    return n.split("/").map(Number);
  }
  function OU(n) {
    return (n[1] << n[0]) + n[2];
  }
  function Uie(n, e) {
    const t = n[0], i = n[1], a = n[2];
    if (e.getMinZoom() > t || t > e.getMaxZoom())
      return !1;
    const o = e.getFullTileRange(t);
    return o ? o.containsXY(i, a) : !0;
  }
  class zie extends Fie {
    clear() {
      for (; this.getCount() > 0; )
        this.pop().release();
      super.clear();
    }
    /**
     * @param {!Object<string, boolean>} usedTiles Used tiles.
     */
    expireCache(e) {
      for (; this.canExpireCache() && !(this.peekLast().getKey() in e); )
        this.pop().release();
    }
    /**
     * Prune all tiles from the cache that don't have the same z as the newest tile.
     */
    pruneExceptNewestZ() {
      if (this.getCount() === 0)
        return;
      const e = this.peekFirstKey(), i = jie(e)[0];
      this.forEach((a) => {
        a.tileCoord[0] !== i && (this.remove(MU(a.tileCoord)), a.release());
      });
    }
  }
  const AU = zie;
  class LU {
    /**
     * @param {number} minX Minimum X.
     * @param {number} maxX Maximum X.
     * @param {number} minY Minimum Y.
     * @param {number} maxY Maximum Y.
     */
    constructor(e, t, i, a) {
      this.minX = e, this.maxX = t, this.minY = i, this.maxY = a;
    }
    /**
     * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @return {boolean} Contains tile coordinate.
     */
    contains(e) {
      return this.containsXY(e[1], e[2]);
    }
    /**
     * @param {TileRange} tileRange Tile range.
     * @return {boolean} Contains.
     */
    containsTileRange(e) {
      return this.minX <= e.minX && e.maxX <= this.maxX && this.minY <= e.minY && e.maxY <= this.maxY;
    }
    /**
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @return {boolean} Contains coordinate.
     */
    containsXY(e, t) {
      return this.minX <= e && e <= this.maxX && this.minY <= t && t <= this.maxY;
    }
    /**
     * @param {TileRange} tileRange Tile range.
     * @return {boolean} Equals.
     */
    equals(e) {
      return this.minX == e.minX && this.minY == e.minY && this.maxX == e.maxX && this.maxY == e.maxY;
    }
    /**
     * @param {TileRange} tileRange Tile range.
     */
    extend(e) {
      e.minX < this.minX && (this.minX = e.minX), e.maxX > this.maxX && (this.maxX = e.maxX), e.minY < this.minY && (this.minY = e.minY), e.maxY > this.maxY && (this.maxY = e.maxY);
    }
    /**
     * @return {number} Height.
     */
    getHeight() {
      return this.maxY - this.minY + 1;
    }
    /**
     * @return {import("./size.js").Size} Size.
     */
    getSize() {
      return [this.getWidth(), this.getHeight()];
    }
    /**
     * @return {number} Width.
     */
    getWidth() {
      return this.maxX - this.minX + 1;
    }
    /**
     * @param {TileRange} tileRange Tile range.
     * @return {boolean} Intersects.
     */
    intersects(e) {
      return this.minX <= e.maxX && this.maxX >= e.minX && this.minY <= e.maxY && this.maxY >= e.minY;
    }
  }
  function C0(n, e, t, i, a) {
    return a !== void 0 ? (a.minX = n, a.maxX = e, a.minY = t, a.maxY = i, a) : new LU(n, e, t, i);
  }
  const NU = LU, FO = "units", $ie = [1, 2, 5], lE = 25.4 / 0.28;
  class Bie extends eC {
    /**
     * @param {Options} [options] Scale line options.
     */
    constructor(e) {
      e = e || {};
      const t = document.createElement("div");
      t.style.pointerEvents = "none", super({
        element: t,
        render: e.render,
        target: e.target
      }), this.on, this.once, this.un;
      const i = e.className !== void 0 ? e.className : e.bar ? "ol-scale-bar" : "ol-scale-line";
      this.innerElement_ = document.createElement("div"), this.innerElement_.className = i + "-inner", this.element.className = i + " " + dS, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = e.minWidth !== void 0 ? e.minWidth : 64, this.maxWidth_ = e.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(FO, this.handleUnitsChanged_), this.setUnits(e.units || "metric"), this.scaleBar_ = e.bar || !1, this.scaleBarSteps_ = e.steps || 4, this.scaleBarText_ = e.text || !1, this.dpi_ = e.dpi || void 0;
    }
    /**
     * Return the units to use in the scale line.
     * @return {Units} The units
     * to use in the scale line.
     * @observable
     * @api
     */
    getUnits() {
      return this.get(FO);
    }
    /**
     * @private
     */
    handleUnitsChanged_() {
      this.updateElement_();
    }
    /**
     * Set the units to use in the scale line.
     * @param {Units} units The units to use in the scale line.
     * @observable
     * @api
     */
    setUnits(e) {
      this.set(FO, e);
    }
    /**
     * Specify the dpi of output device such as printer.
     * @param {number|undefined} dpi The dpi of output device.
     * @api
     */
    setDpi(e) {
      this.dpi_ = e;
    }
    /**
     * @private
     */
    updateElement_() {
      const e = this.viewState_;
      if (!e) {
        this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1);
        return;
      }
      const t = e.center, i = e.projection, a = this.getUnits(), o = a == "degrees" ? "degrees" : "m";
      let u = qb(
        i,
        e.resolution,
        t,
        o
      );
      const c = this.minWidth_ * (this.dpi_ || lE) / lE, p = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || lE) / lE : void 0;
      let y = c * u, _ = "";
      if (a == "degrees") {
        const B = Y0.degrees;
        y *= B, y < B / 60 ? (_ = "″", u *= 3600) : y < B ? (_ = "′", u *= 60) : _ = "°";
      } else if (a == "imperial")
        y < 0.9144 ? (_ = "in", u /= 0.0254) : y < 1609.344 ? (_ = "ft", u /= 0.3048) : (_ = "mi", u /= 1609.344);
      else if (a == "nautical")
        u /= 1852, _ = "NM";
      else if (a == "metric")
        y < 1e-3 ? (_ = "μm", u *= 1e6) : y < 1 ? (_ = "mm", u *= 1e3) : y < 1e3 ? _ = "m" : (_ = "km", u /= 1e3);
      else if (a == "us")
        y < 0.9144 ? (_ = "in", u *= 39.37) : y < 1609.344 ? (_ = "ft", u /= 0.30480061) : (_ = "mi", u /= 1609.3472);
      else
        throw new Error("Invalid units");
      let S = 3 * Math.floor(Math.log(c * u) / Math.log(10)), b, T, O, N, D, k;
      for (; ; ) {
        O = Math.floor(S / 3);
        const B = Math.pow(10, O);
        if (b = $ie[(S % 3 + 3) % 3] * B, T = Math.round(b / u), isNaN(T)) {
          this.element.style.display = "none", this.renderedVisible_ = !1;
          return;
        }
        if (p !== void 0 && T >= p) {
          b = N, T = D, O = k;
          break;
        } else if (T >= c)
          break;
        N = b, D = T, k = O, ++S;
      }
      const $ = this.scaleBar_ ? this.createScaleBar(T, b, _) : b.toFixed(O < 0 ? -O : 0) + " " + _;
      this.renderedHTML_ != $ && (this.innerElement_.innerHTML = $, this.renderedHTML_ = $), this.renderedWidth_ != T && (this.innerElement_.style.width = T + "px", this.renderedWidth_ = T), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0);
    }
    /**
     * @private
     * @param {number} width The current width of the scalebar.
     * @param {number} scale The current scale.
     * @param {string} suffix The suffix to append to the scale text.
     * @return {string} The stringified HTML of the scalebar.
     */
    createScaleBar(e, t, i) {
      const a = this.getScaleForResolution(), o = a < 1 ? Math.round(1 / a).toLocaleString() + " : 1" : "1 : " + Math.round(a).toLocaleString(), u = this.scaleBarSteps_, c = e / u, p = [this.createMarker("absolute")];
      for (let _ = 0; _ < u; ++_) {
        const S = _ % 2 === 0 ? "ol-scale-singlebar-odd" : "ol-scale-singlebar-even";
        p.push(
          `<div><div class="ol-scale-singlebar ${S}" style="width: ${c}px;"></div>` + this.createMarker("relative") + // render text every second step, except when only 2 steps
          (_ % 2 === 0 || u === 2 ? this.createStepText(_, e, !1, t, i) : "") + "</div>"
        );
      }
      return p.push(this.createStepText(u, e, !0, t, i)), (this.scaleBarText_ ? `<div class="ol-scale-text" style="width: ${e}px;">` + o + "</div>" : "") + p.join("");
    }
    /**
     * Creates a marker at given position
     * @param {'absolute'|'relative'} position The position, absolute or relative
     * @return {string} The stringified div containing the marker
     */
    createMarker(e) {
      return `<div class="ol-scale-step-marker" style="position: ${e}; top: ${e === "absolute" ? 3 : -10}px;"></div>`;
    }
    /**
     * Creates the label for a marker marker at given position
     * @param {number} i The iterator
     * @param {number} width The width the scalebar will currently use
     * @param {boolean} isLast Flag indicating if we add the last step text
     * @param {number} scale The current scale for the whole scalebar
     * @param {string} suffix The suffix for the scale
     * @return {string} The stringified div containing the step text
     */
    createStepText(e, t, i, a, o) {
      const c = (e === 0 ? 0 : Math.round(a / this.scaleBarSteps_ * e * 100) / 100) + (e === 0 ? "" : " " + o), p = e === 0 ? -3 : t / this.scaleBarSteps_ * -1, y = e === 0 ? 0 : t / this.scaleBarSteps_ * 2;
      return `<div class="ol-scale-step-text" style="margin-left: ${p}px;text-align: ${e === 0 ? "left" : "center"};min-width: ${y}px;left: ${i ? t + "px" : "unset"};">` + c + "</div>";
    }
    /**
     * Returns the appropriate scale for the given resolution and units.
     * @return {number} The appropriate scale.
     */
    getScaleForResolution() {
      const e = qb(
        this.viewState_.projection,
        this.viewState_.resolution,
        this.viewState_.center,
        "m"
      ), t = this.dpi_ || lE, i = 1e3 / 25.4;
      return e * i * t;
    }
    /**
     * Update the scale line element.
     * @param {import("../MapEvent.js").default} mapEvent Map event.
     * @override
     */
    render(e) {
      const t = e.frameState;
      t ? this.viewState_ = t.viewState : this.viewState_ = null, this.updateElement_();
    }
  }
  const Vie = Bie;
  function cN(n, e) {
    return DU(n, e, []).join("");
  }
  function DU(n, e, t) {
    if (n.nodeType == Node.CDATA_SECTION_NODE || n.nodeType == Node.TEXT_NODE)
      e ? t.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : t.push(n.nodeValue);
    else {
      let i;
      for (i = n.firstChild; i; i = i.nextSibling)
        DU(i, e, t);
    }
    return t;
  }
  function Hie(n) {
    return "documentElement" in n;
  }
  function Wie(n) {
    return new DOMParser().parseFromString(n, "application/xml");
  }
  function kA(n, e) {
    return (
      /**
       * @param {Element} node Node.
       * @param {Array<*>} objectStack Object stack.
       */
      function(t, i) {
        const a = n.call(
          e !== void 0 ? e : this,
          t,
          i
        );
        a !== void 0 && /** @type {Array<*>} */
        i[i.length - 1].push(a);
      }
    );
  }
  function yu(n, e, t) {
    return (
      /**
       * @param {Element} node Node.
       * @param {Array<*>} objectStack Object stack.
       */
      function(i, a) {
        const o = n.call(
          t !== void 0 ? t : this,
          i,
          a
        );
        if (o !== void 0) {
          const u = (
            /** @type {!Object} */
            a[a.length - 1]
          ), c = e !== void 0 ? e : i.localName;
          let p;
          c in u ? p = u[c] : (p = [], u[c] = p), p.push(o);
        }
      }
    );
  }
  function Yt(n, e, t) {
    return (
      /**
       * @param {Element} node Node.
       * @param {Array<*>} objectStack Object stack.
       */
      function(i, a) {
        const o = n.call(
          t !== void 0 ? t : this,
          i,
          a
        );
        if (o !== void 0) {
          const u = (
            /** @type {!Object} */
            a[a.length - 1]
          ), c = e !== void 0 ? e : i.localName;
          u[c] = o;
        }
      }
    );
  }
  function Xi(n, e, t) {
    t = t !== void 0 ? t : {};
    let i, a;
    for (i = 0, a = n.length; i < a; ++i)
      t[n[i]] = e;
    return t;
  }
  function Gie(n, e, t, i) {
    let a;
    for (a = e.firstElementChild; a; a = a.nextElementSibling) {
      const o = n[a.namespaceURI];
      if (o !== void 0) {
        const u = o[a.localName];
        u !== void 0 && u.call(i, a, t);
      }
    }
  }
  function Hr(n, e, t, i, a) {
    return i.push(n), Gie(e, t, i, a), /** @type {T} */
    i.pop();
  }
  class Yie {
    /**
     * Read the source document.
     *
     * @param {Document|Element|string} source The XML source.
     * @return {Object|null} An object representing the source.
     * @api
     */
    read(e) {
      if (!e)
        return null;
      if (typeof e == "string") {
        const t = Wie(e);
        return this.readFromDocument(t);
      }
      return Hie(e) ? this.readFromDocument(
        /** @type {Document} */
        e
      ) : this.readFromNode(
        /** @type {Element} */
        e
      );
    }
    /**
     * @param {Document} doc Document.
     * @return {Object|null} Object
     */
    readFromDocument(e) {
      for (let t = e.firstChild; t; t = t.nextSibling)
        if (t.nodeType == Node.ELEMENT_NODE)
          return this.readFromNode(
            /** @type {Element} */
            t
          );
      return null;
    }
    /**
     * @abstract
     * @param {Element} node Node.
     * @return {Object|null} Object
     */
    readFromNode(e) {
      yi();
    }
  }
  const IU = Yie, qie = "http://www.w3.org/1999/xlink";
  function fN(n) {
    return n.getAttributeNS(qie, "href");
  }
  function Xie(n) {
    const e = cN(n, !1);
    return Kie(e);
  }
  function Kie(n) {
    const e = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);
    if (e)
      return parseFloat(e[1]);
  }
  function Xg(n) {
    const e = cN(n, !1);
    return Zie(e);
  }
  function Zie(n) {
    const e = /^\s*(\d+)\s*$/.exec(n);
    if (e)
      return parseInt(e[1], 10);
  }
  function pi(n) {
    return cN(n, !1).trim();
  }
  const jl = [null, "http://www.opengis.net/ows/1.1"], Qie = Xi(jl, {
    ServiceIdentification: Yt(bre),
    ServiceProvider: Yt(Cre),
    OperationsMetadata: Yt(Sre)
  });
  class Jie extends IU {
    constructor() {
      super();
    }
    /**
     * @param {Element} node Node.
     * @return {Object|null} Object
     */
    readFromNode(e) {
      const t = Hr({}, Qie, e, []);
      return t || null;
    }
  }
  const ere = Xi(jl, {
    DeliveryPoint: Yt(pi),
    City: Yt(pi),
    AdministrativeArea: Yt(pi),
    PostalCode: Yt(pi),
    Country: Yt(pi),
    ElectronicMailAddress: Yt(pi)
  }), tre = Xi(jl, {
    Value: yu(Tre)
  }), nre = Xi(jl, {
    AllowedValues: Yt(pre)
  }), ire = Xi(jl, {
    Phone: Yt(xre),
    Address: Yt(dre)
  }), rre = Xi(jl, {
    HTTP: Yt(_re)
  }), are = Xi(jl, {
    Get: yu(yre),
    Post: void 0
    // TODO
  }), sre = Xi(jl, {
    DCP: Yt(vre)
  }), ore = Xi(jl, {
    Operation: Ere
  }), lre = Xi(jl, {
    Voice: Yt(pi),
    Facsimile: Yt(pi)
  }), ure = Xi(jl, {
    Constraint: yu(gre)
  }), cre = Xi(jl, {
    IndividualName: Yt(pi),
    PositionName: Yt(pi),
    ContactInfo: Yt(mre)
  }), fre = Xi(jl, {
    Abstract: Yt(pi),
    AccessConstraints: Yt(pi),
    Fees: Yt(pi),
    Title: Yt(pi),
    ServiceTypeVersion: Yt(pi),
    ServiceType: Yt(pi)
  }), hre = Xi(jl, {
    ProviderName: Yt(pi),
    ProviderSite: Yt(fN),
    ServiceContact: Yt(wre)
  });
  function dre(n, e) {
    return Hr({}, ere, n, e);
  }
  function pre(n, e) {
    return Hr({}, tre, n, e);
  }
  function gre(n, e) {
    const t = n.getAttribute("name");
    if (t)
      return Hr({ name: t }, nre, n, e);
  }
  function mre(n, e) {
    return Hr({}, ire, n, e);
  }
  function vre(n, e) {
    return Hr({}, rre, n, e);
  }
  function yre(n, e) {
    const t = fN(n);
    if (t)
      return Hr(
        { href: t },
        ure,
        n,
        e
      );
  }
  function _re(n, e) {
    return Hr({}, are, n, e);
  }
  function Ere(n, e) {
    const t = n.getAttribute("name"), i = Hr({}, sre, n, e);
    if (!i)
      return;
    const a = (
      /** @type {Object} */
      e[e.length - 1]
    );
    a[t] = i;
  }
  function Sre(n, e) {
    return Hr({}, ore, n, e);
  }
  function xre(n, e) {
    return Hr({}, lre, n, e);
  }
  function bre(n, e) {
    return Hr({}, fre, n, e);
  }
  function wre(n, e) {
    return Hr({}, cre, n, e);
  }
  function Cre(n, e) {
    return Hr({}, hre, n, e);
  }
  function Tre(n, e) {
    return pi(n);
  }
  const Rre = Jie, Kh = [null, "http://www.opengis.net/wmts/1.0"], C_ = [null, "http://www.opengis.net/ows/1.1"], Mre = Xi(Kh, {
    Contents: Yt(zre)
  });
  class Ore extends IU {
    constructor() {
      super(), this.owsParser_ = new Rre();
    }
    /**
     * @param {Element} node Node.
     * @return {Object|null} Object
     */
    readFromNode(e) {
      let t = e.getAttribute("version");
      t && (t = t.trim());
      let i = this.owsParser_.readFromNode(e);
      return i ? (i.version = t, i = Hr(
        i,
        Mre,
        e,
        []
      ), i || null) : null;
    }
  }
  const Are = Xi(Kh, {
    Layer: yu($re),
    TileMatrixSet: yu(Bre)
  }), Lre = Xi(
    Kh,
    {
      Style: yu(Vre),
      Format: yu(pi),
      TileMatrixSetLink: yu(Hre),
      Dimension: yu(Wre),
      ResourceURL: yu(Gre)
    },
    Xi(C_, {
      Title: Yt(pi),
      Abstract: Yt(pi),
      WGS84BoundingBox: Yt(PU),
      Identifier: Yt(pi)
    })
  ), Nre = Xi(
    Kh,
    {
      LegendURL: yu(Yre)
    },
    Xi(C_, {
      Title: Yt(pi),
      Identifier: Yt(pi)
    })
  ), Dre = Xi(Kh, {
    TileMatrixSet: Yt(pi),
    TileMatrixSetLimits: Yt(Xre)
  }), Ire = Xi(Kh, {
    TileMatrixLimits: kA(Kre)
  }), Pre = Xi(Kh, {
    TileMatrix: Yt(pi),
    MinTileRow: Yt(Xg),
    MaxTileRow: Yt(Xg),
    MinTileCol: Yt(Xg),
    MaxTileCol: Yt(Xg)
  }), kre = Xi(
    Kh,
    {
      Default: Yt(pi),
      Value: yu(pi)
    },
    Xi(C_, {
      Identifier: Yt(pi)
    })
  ), Fre = Xi(C_, {
    LowerCorner: kA(FA),
    UpperCorner: kA(FA)
  }), jre = Xi(
    Kh,
    {
      WellKnownScaleSet: Yt(pi),
      TileMatrix: yu(qre)
    },
    Xi(C_, {
      SupportedCRS: Yt(pi),
      Identifier: Yt(pi),
      BoundingBox: Yt(PU)
    })
  ), Ure = Xi(
    Kh,
    {
      TopLeftCorner: Yt(FA),
      ScaleDenominator: Yt(Xie),
      TileWidth: Yt(Xg),
      TileHeight: Yt(Xg),
      MatrixWidth: Yt(Xg),
      MatrixHeight: Yt(Xg)
    },
    Xi(C_, {
      Identifier: Yt(pi)
    })
  );
  function zre(n, e) {
    return Hr({}, Are, n, e);
  }
  function $re(n, e) {
    return Hr({}, Lre, n, e);
  }
  function Bre(n, e) {
    return Hr({}, jre, n, e);
  }
  function Vre(n, e) {
    const t = Hr({}, Nre, n, e);
    if (!t)
      return;
    const i = n.getAttribute("isDefault") === "true";
    return t.isDefault = i, t;
  }
  function Hre(n, e) {
    return Hr({}, Dre, n, e);
  }
  function Wre(n, e) {
    return Hr({}, kre, n, e);
  }
  function Gre(n, e) {
    const t = n.getAttribute("format"), i = n.getAttribute("template"), a = n.getAttribute("resourceType"), o = {};
    return t && (o.format = t), i && (o.template = i), a && (o.resourceType = a), o;
  }
  function PU(n, e) {
    const t = Hr(
      [],
      Fre,
      n,
      e
    );
    if (t.length == 2)
      return QO(t);
  }
  function Yre(n, e) {
    const t = {};
    return t.format = n.getAttribute("format"), t.href = fN(n), t;
  }
  function FA(n, e) {
    const t = pi(n).split(/\s+/);
    if (!t || t.length != 2)
      return;
    const i = +t[0], a = +t[1];
    if (!(isNaN(i) || isNaN(a)))
      return [i, a];
  }
  function qre(n, e) {
    return Hr({}, Ure, n, e);
  }
  function Xre(n, e) {
    return Hr([], Ire, n, e);
  }
  function Kre(n, e) {
    return Hr({}, Pre, n, e);
  }
  const Zre = Ore;
  class Qre extends pS {
    /**
     * @param {Options<ImageSourceType>} [options] Layer options.
     */
    constructor(e) {
      e = e || {}, super(e);
    }
  }
  const Jre = Qre;
  class eae extends aN {
    /**
     * @param {import("../../layer/Image.js").default} imageLayer Image layer.
     */
    constructor(e) {
      super(e), this.image_ = null;
    }
    /**
     * @return {import('../../DataTile.js').ImageLike} Image.
     */
    getImage() {
      return this.image_ ? this.image_.getImage() : null;
    }
    /**
     * Determine whether render should be called.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @return {boolean} Layer is ready to be rendered.
     */
    prepareFrame(e) {
      const t = e.layerStatesArray[e.layerIndex], i = e.pixelRatio, a = e.viewState, o = a.resolution, u = this.getLayer().getSource(), c = e.viewHints;
      let p = e.extent;
      if (t.extent !== void 0 && (p = Iv(
        p,
        yp(t.extent, a.projection)
      )), !c[ws.ANIMATING] && !c[ws.INTERACTING] && !Kv(p))
        if (u) {
          const y = a.projection, _ = u.getImage(
            p,
            o,
            i,
            y
          );
          _ && (this.loadImage(_) ? this.image_ = _ : _.getState() === _n.EMPTY && (this.image_ = null));
        } else
          this.image_ = null;
      return !!this.image_;
    }
    /**
     * @param {import("../../pixel.js").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray} Data at the pixel location.
     */
    getData(e) {
      const t = this.frameState;
      if (!t)
        return null;
      const i = this.getLayer(), a = os(
        t.pixelToCoordinateTransform,
        e.slice()
      ), o = i.getExtent();
      if (o && !KE(o, a))
        return null;
      const u = this.image_.getExtent(), c = this.image_.getImage(), p = _i(u), y = Math.floor(
        c.width * ((a[0] - u[0]) / p)
      );
      if (y < 0 || y >= c.width)
        return null;
      const _ = Cs(u), S = Math.floor(
        c.height * ((u[3] - a[1]) / _)
      );
      return S < 0 || S >= c.height ? null : this.getImageData(c, y, S);
    }
    /**
     * Render the layer.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {HTMLElement} target Target that may be used to render content to.
     * @return {HTMLElement} The rendered element.
     */
    renderFrame(e, t) {
      const i = this.image_, a = i.getExtent(), o = i.getResolution(), [u, c] = Array.isArray(o) ? o : [o, o], p = i.getPixelRatio(), y = e.layerStatesArray[e.layerIndex], _ = e.pixelRatio, S = e.viewState, b = S.center, T = S.resolution, O = _ * u / (T * p), N = _ * c / (T * p), D = e.extent, k = S.resolution, $ = S.rotation, B = Math.round(_i(D) / k * _), V = Math.round(Cs(D) / k * _);
      Rf(
        this.pixelTransform,
        e.size[0] / 2,
        e.size[1] / 2,
        1 / _,
        1 / _,
        $,
        -B / 2,
        -V / 2
      ), Xw(this.inversePixelTransform, this.pixelTransform);
      const z = DL(this.pixelTransform);
      this.useContainer(t, z, this.getBackground(e));
      const G = this.context, ie = G.canvas;
      ie.width != B || ie.height != V ? (ie.width = B, ie.height = V) : this.containerReused || G.clearRect(0, 0, B, V);
      let ue = !1, Re = !0;
      if (y.extent) {
        const Ne = yp(
          y.extent,
          S.projection
        );
        Re = Zo(Ne, e.extent), ue = Re && !xf(Ne, e.extent), ue && this.clipUnrotated(G, e, Ne);
      }
      const Oe = i.getImage(), $e = Rf(
        this.tempTransform,
        B / 2,
        V / 2,
        O,
        N,
        0,
        p * (a[0] - b[0]) / u,
        p * (b[1] - a[3]) / c
      );
      this.renderedResolution = c * _ / p;
      const Ee = Oe.width * $e[0], Fe = Oe.height * $e[3];
      if (this.getLayer().getSource().getInterpolate() || (G.imageSmoothingEnabled = !1), this.preRender(G, e), Re && Ee >= 0.5 && Fe >= 0.5) {
        const Ne = $e[4], Q = $e[5], ae = y.opacity;
        let le;
        ae !== 1 && (le = G.globalAlpha, G.globalAlpha = ae), G.drawImage(Oe, 0, 0, +Oe.width, +Oe.height, Ne, Q, Ee, Fe), ae !== 1 && (G.globalAlpha = le);
      }
      return this.postRender(G, e), ue && G.restore(), G.imageSmoothingEnabled = !0, z !== ie.style.transform && (ie.style.transform = z), this.container;
    }
  }
  const tae = eae;
  class nae extends Jre {
    /**
     * @param {import("./BaseImage.js").Options<ImageSourceType>} [options] Layer options.
     */
    constructor(e) {
      super(e);
    }
    createRenderer() {
      return new tae(this);
    }
    /**
     * Get data for a pixel location.  A four element RGBA array will be returned.  For requests outside the
     * layer extent, `null` will be returned.  Data for an image can only be retrieved if the
     * source's `crossOrigin` property is set.
     *
     * ```js
     * // display layer data on every pointer move
     * map.on('pointermove', (event) => {
     *   console.log(layer.getData(event.pixel));
     * });
     * ```
     * @param {import("../pixel").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
     * @api
     */
    getData(e) {
      return super.getData(e);
    }
  }
  const kU = nae, Ob = {
    PRELOAD: "preload",
    USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError"
  };
  class iae extends pS {
    /**
     * @param {Options<TileSourceType>} [options] Tile layer options.
     */
    constructor(e) {
      e = e || {};
      const t = Object.assign({}, e);
      delete t.preload, delete t.useInterimTilesOnError, super(t), this.on, this.once, this.un, this.setPreload(e.preload !== void 0 ? e.preload : 0), this.setUseInterimTilesOnError(
        e.useInterimTilesOnError !== void 0 ? e.useInterimTilesOnError : !0
      );
    }
    /**
     * Return the level as number to which we will preload tiles up to.
     * @return {number} The level to preload tiles up to.
     * @observable
     * @api
     */
    getPreload() {
      return (
        /** @type {number} */
        this.get(Ob.PRELOAD)
      );
    }
    /**
     * Set the level as number to which we will preload tiles up to.
     * @param {number} preload The level to preload tiles up to.
     * @observable
     * @api
     */
    setPreload(e) {
      this.set(Ob.PRELOAD, e);
    }
    /**
     * Whether we use interim tiles on error.
     * @return {boolean} Use interim tiles on error.
     * @observable
     * @api
     */
    getUseInterimTilesOnError() {
      return (
        /** @type {boolean} */
        this.get(Ob.USE_INTERIM_TILES_ON_ERROR)
      );
    }
    /**
     * Set whether we use interim tiles on error.
     * @param {boolean} useInterimTilesOnError Use interim tiles on error.
     * @observable
     * @api
     */
    setUseInterimTilesOnError(e) {
      this.set(Ob.USE_INTERIM_TILES_ON_ERROR, e);
    }
    /**
     * Get data for a pixel location.  The return type depends on the source data.  For image tiles,
     * a four element RGBA array will be returned.  For data tiles, the array length will match the
     * number of bands in the dataset.  For requests outside the layer extent, `null` will be returned.
     * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.
     *
     * ```js
     * // display layer data on every pointer move
     * map.on('pointermove', (event) => {
     *   console.log(layer.getData(event.pixel));
     * });
     * ```
     * @param {import("../pixel").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
     * @api
     */
    getData(e) {
      return super.getData(e);
    }
  }
  const rae = iae, FU = 0.5, aae = 10, b2 = 0.25;
  class sae {
    /**
     * @param {import("../proj/Projection.js").default} sourceProj Source projection.
     * @param {import("../proj/Projection.js").default} targetProj Target projection.
     * @param {import("../extent.js").Extent} targetExtent Target extent to triangulate.
     * @param {import("../extent.js").Extent} maxSourceExtent Maximal source extent that can be used.
     * @param {number} errorThreshold Acceptable error (in source units).
     * @param {?number} destinationResolution The (optional) resolution of the destination.
     */
    constructor(e, t, i, a, o, u) {
      this.sourceProj_ = e, this.targetProj_ = t;
      let c = {};
      const p = ME(this.targetProj_, this.sourceProj_);
      this.transformInv_ = function($) {
        const B = $[0] + "/" + $[1];
        return c[B] || (c[B] = p($)), c[B];
      }, this.maxSourceExtent_ = a, this.errorThresholdSquared_ = o * o, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!a && !!this.sourceProj_.getExtent() && _i(a) >= _i(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? _i(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? _i(this.targetProj_.getExtent()) : null;
      const y = Xv(i), _ = Aw(i), S = Ow(i), b = Mw(i), T = this.transformInv_(y), O = this.transformInv_(_), N = this.transformInv_(S), D = this.transformInv_(b), k = aae + (u ? Math.max(
        0,
        Math.ceil(
          Math.log2(
            eA(i) / (u * u * 256 * 256)
          )
        )
      ) : 0);
      if (this.addQuad_(
        y,
        _,
        S,
        b,
        T,
        O,
        N,
        D,
        k
      ), this.wrapsXInSource_) {
        let $ = 1 / 0;
        this.triangles_.forEach(function(B, V, z) {
          $ = Math.min(
            $,
            B.source[0][0],
            B.source[1][0],
            B.source[2][0]
          );
        }), this.triangles_.forEach((B) => {
          if (Math.max(
            B.source[0][0],
            B.source[1][0],
            B.source[2][0]
          ) - $ > this.sourceWorldWidth_ / 2) {
            const V = [
              [B.source[0][0], B.source[0][1]],
              [B.source[1][0], B.source[1][1]],
              [B.source[2][0], B.source[2][1]]
            ];
            V[0][0] - $ > this.sourceWorldWidth_ / 2 && (V[0][0] -= this.sourceWorldWidth_), V[1][0] - $ > this.sourceWorldWidth_ / 2 && (V[1][0] -= this.sourceWorldWidth_), V[2][0] - $ > this.sourceWorldWidth_ / 2 && (V[2][0] -= this.sourceWorldWidth_);
            const z = Math.min(
              V[0][0],
              V[1][0],
              V[2][0]
            );
            Math.max(
              V[0][0],
              V[1][0],
              V[2][0]
            ) - z < this.sourceWorldWidth_ / 2 && (B.source = V);
          }
        });
      }
      c = {};
    }
    /**
     * Adds triangle to the triangulation.
     * @param {import("../coordinate.js").Coordinate} a The target a coordinate.
     * @param {import("../coordinate.js").Coordinate} b The target b coordinate.
     * @param {import("../coordinate.js").Coordinate} c The target c coordinate.
     * @param {import("../coordinate.js").Coordinate} aSrc The source a coordinate.
     * @param {import("../coordinate.js").Coordinate} bSrc The source b coordinate.
     * @param {import("../coordinate.js").Coordinate} cSrc The source c coordinate.
     * @private
     */
    addTriangle_(e, t, i, a, o, u) {
      this.triangles_.push({
        source: [a, o, u],
        target: [e, t, i]
      });
    }
    /**
     * Adds quad (points in clock-wise order) to the triangulation
     * (and reprojects the vertices) if valid.
     * Performs quad subdivision if needed to increase precision.
     *
     * @param {import("../coordinate.js").Coordinate} a The target a coordinate.
     * @param {import("../coordinate.js").Coordinate} b The target b coordinate.
     * @param {import("../coordinate.js").Coordinate} c The target c coordinate.
     * @param {import("../coordinate.js").Coordinate} d The target d coordinate.
     * @param {import("../coordinate.js").Coordinate} aSrc The source a coordinate.
     * @param {import("../coordinate.js").Coordinate} bSrc The source b coordinate.
     * @param {import("../coordinate.js").Coordinate} cSrc The source c coordinate.
     * @param {import("../coordinate.js").Coordinate} dSrc The source d coordinate.
     * @param {number} maxSubdivision Maximal allowed subdivision of the quad.
     * @private
     */
    addQuad_(e, t, i, a, o, u, c, p, y) {
      const _ = QO([o, u, c, p]), S = this.sourceWorldWidth_ ? _i(_) / this.sourceWorldWidth_ : null, b = (
        /** @type {number} */
        this.sourceWorldWidth_
      ), T = this.sourceProj_.canWrapX() && S > 0.5 && S < 1;
      let O = !1;
      if (y > 0) {
        if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
          const D = QO([e, t, i, a]);
          O = _i(D) / this.targetWorldWidth_ > b2 || O;
        }
        !T && this.sourceProj_.isGlobal() && S && (O = S > b2 || O);
      }
      if (!O && this.maxSourceExtent_ && isFinite(_[0]) && isFinite(_[1]) && isFinite(_[2]) && isFinite(_[3]) && !Zo(_, this.maxSourceExtent_))
        return;
      let N = 0;
      if (!O && (!isFinite(o[0]) || !isFinite(o[1]) || !isFinite(u[0]) || !isFinite(u[1]) || !isFinite(c[0]) || !isFinite(c[1]) || !isFinite(p[0]) || !isFinite(p[1]))) {
        if (y > 0)
          O = !0;
        else if (N = (!isFinite(o[0]) || !isFinite(o[1]) ? 8 : 0) + (!isFinite(u[0]) || !isFinite(u[1]) ? 4 : 0) + (!isFinite(c[0]) || !isFinite(c[1]) ? 2 : 0) + (!isFinite(p[0]) || !isFinite(p[1]) ? 1 : 0), N != 1 && N != 2 && N != 4 && N != 8)
          return;
      }
      if (y > 0) {
        if (!O) {
          const D = [(e[0] + i[0]) / 2, (e[1] + i[1]) / 2], k = this.transformInv_(D);
          let $;
          T ? $ = (kv(o[0], b) + kv(c[0], b)) / 2 - kv(k[0], b) : $ = (o[0] + c[0]) / 2 - k[0];
          const B = (o[1] + c[1]) / 2 - k[1];
          O = $ * $ + B * B > this.errorThresholdSquared_;
        }
        if (O) {
          if (Math.abs(e[0] - i[0]) <= Math.abs(e[1] - i[1])) {
            const D = [(t[0] + i[0]) / 2, (t[1] + i[1]) / 2], k = this.transformInv_(D), $ = [(a[0] + e[0]) / 2, (a[1] + e[1]) / 2], B = this.transformInv_($);
            this.addQuad_(
              e,
              t,
              D,
              $,
              o,
              u,
              k,
              B,
              y - 1
            ), this.addQuad_(
              $,
              D,
              i,
              a,
              B,
              k,
              c,
              p,
              y - 1
            );
          } else {
            const D = [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2], k = this.transformInv_(D), $ = [(i[0] + a[0]) / 2, (i[1] + a[1]) / 2], B = this.transformInv_($);
            this.addQuad_(
              e,
              D,
              $,
              a,
              o,
              k,
              B,
              p,
              y - 1
            ), this.addQuad_(
              D,
              t,
              i,
              $,
              k,
              u,
              c,
              B,
              y - 1
            );
          }
          return;
        }
      }
      if (T) {
        if (!this.canWrapXInSource_)
          return;
        this.wrapsXInSource_ = !0;
      }
      N & 11 || this.addTriangle_(e, i, a, o, c, p), N & 14 || this.addTriangle_(e, i, t, o, c, u), N && (N & 13 || this.addTriangle_(t, a, e, u, p, o), N & 7 || this.addTriangle_(t, a, i, u, p, c));
    }
    /**
     * Calculates extent of the `source` coordinates from all the triangles.
     *
     * @return {import("../extent.js").Extent} Calculated extent.
     */
    calculateSourceExtent() {
      const e = Su();
      return this.triangles_.forEach(function(t, i, a) {
        const o = t.source;
        vE(e, o[0]), vE(e, o[1]), vE(e, o[2]);
      }), e;
    }
    /**
     * @return {Array<Triangle>} Array of the calculated triangles.
     */
    getTriangles() {
      return this.triangles_;
    }
  }
  const jU = sae;
  let jO;
  const G0 = [];
  function w2(n, e, t, i, a) {
    n.beginPath(), n.moveTo(0, 0), n.lineTo(e, t), n.lineTo(i, a), n.closePath(), n.save(), n.clip(), n.fillRect(0, 0, Math.max(e, i) + 1, Math.max(t, a)), n.restore();
  }
  function UO(n, e) {
    return Math.abs(n[e * 4] - 210) > 2 || Math.abs(n[e * 4 + 3] - 0.75 * 255) > 2;
  }
  function oae() {
    if (jO === void 0) {
      const n = tl(6, 6, G0);
      n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", w2(n, 4, 5, 4, 0), w2(n, 4, 5, 0, 5);
      const e = n.getImageData(0, 0, 3, 3).data;
      jO = UO(e, 0) || UO(e, 4) || UO(e, 8), Kw(n), G0.push(n.canvas);
    }
    return jO;
  }
  function GE(n, e, t, i) {
    const a = ZA(t, e, n);
    let o = qb(
      e,
      i,
      t
    );
    const u = e.getMetersPerUnit();
    u !== void 0 && (o *= u);
    const c = n.getMetersPerUnit();
    c !== void 0 && (o /= c);
    const p = n.getExtent();
    if (!p || KE(p, a)) {
      const y = qb(n, o, a) / o;
      isFinite(y) && y > 0 && (o /= y);
    }
    return o;
  }
  function lae(n, e, t, i) {
    const a = Cp(t);
    let o = GE(
      n,
      e,
      a,
      i
    );
    return (!isFinite(o) || o <= 0) && q2(t, function(u) {
      return o = GE(
        n,
        e,
        u,
        i
      ), isFinite(o) && o > 0;
    }), o;
  }
  function UU(n, e, t, i, a, o, u, c, p, y, _, S, b) {
    const T = tl(
      Math.round(t * n),
      Math.round(t * e),
      G0
    );
    if (S || (T.imageSmoothingEnabled = !1), p.length === 0)
      return T.canvas;
    T.scale(t, t);
    function O($) {
      return Math.round($ * t) / t;
    }
    T.globalCompositeOperation = "lighter";
    const N = Su();
    p.forEach(function($, B, V) {
      IB(N, $.extent);
    });
    let D;
    if (!b || p.length !== 1 || y !== 0) {
      const $ = _i(N), B = Cs(N);
      D = tl(
        Math.round(t * $ / i),
        Math.round(t * B / i),
        G0
      ), S || (D.imageSmoothingEnabled = !1);
      const V = t / i;
      p.forEach(function(z, G, ie) {
        const ue = z.extent[0] - N[0], Re = -(z.extent[3] - N[3]), Oe = _i(z.extent), $e = Cs(z.extent);
        z.image.width > 0 && z.image.height > 0 && D.drawImage(
          z.image,
          y,
          y,
          z.image.width - 2 * y,
          z.image.height - 2 * y,
          ue * V,
          Re * V,
          Oe * V,
          $e * V
        );
      });
    }
    const k = Xv(u);
    return c.getTriangles().forEach(function($, B, V) {
      const z = $.source, G = $.target;
      let ie = z[0][0], ue = z[0][1], Re = z[1][0], Oe = z[1][1], $e = z[2][0], Ee = z[2][1];
      const Fe = O((G[0][0] - k[0]) / o), Ne = O(
        -(G[0][1] - k[1]) / o
      ), Q = O((G[1][0] - k[0]) / o), ae = O(
        -(G[1][1] - k[1]) / o
      ), le = O((G[2][0] - k[0]) / o), se = O(
        -(G[2][1] - k[1]) / o
      ), Ae = ie, q = ue;
      ie = 0, ue = 0, Re -= Ae, Oe -= q, $e -= Ae, Ee -= q;
      const Z = [
        [Re, Oe, 0, 0, Q - Fe],
        [$e, Ee, 0, 0, le - Fe],
        [0, 0, Re, Oe, ae - Ne],
        [0, 0, $e, Ee, se - Ne]
      ], ee = BB(Z);
      if (!ee)
        return;
      if (T.save(), T.beginPath(), oae() || !S) {
        T.moveTo(Q, ae);
        const Me = 4, De = Fe - Q, Ye = Ne - ae;
        for (let Ze = 0; Ze < Me; Ze++)
          T.lineTo(
            Q + O((Ze + 1) * De / Me),
            ae + O(Ze * Ye / (Me - 1))
          ), Ze != Me - 1 && T.lineTo(
            Q + O((Ze + 1) * De / Me),
            ae + O((Ze + 1) * Ye / (Me - 1))
          );
        T.lineTo(le, se);
      } else
        T.moveTo(Q, ae), T.lineTo(Fe, Ne), T.lineTo(le, se);
      T.clip(), T.transform(
        ee[0],
        ee[2],
        ee[1],
        ee[3],
        Fe,
        Ne
      ), T.translate(
        N[0] - Ae,
        N[3] - q
      );
      let Le;
      if (D)
        Le = D.canvas, T.scale(
          i / t,
          -i / t
        );
      else {
        const Me = p[0], De = Me.extent;
        Le = Me.image, T.scale(
          _i(De) / Le.width,
          -Cs(De) / Le.height
        );
      }
      T.drawImage(Le, 0, 0), T.restore();
    }), D && (Kw(D), G0.push(D.canvas)), _ && (T.save(), T.globalCompositeOperation = "source-over", T.strokeStyle = "black", T.lineWidth = 1, c.getTriangles().forEach(function($, B, V) {
      const z = $.target, G = (z[0][0] - k[0]) / o, ie = -(z[0][1] - k[1]) / o, ue = (z[1][0] - k[0]) / o, Re = -(z[1][1] - k[1]) / o, Oe = (z[2][0] - k[0]) / o, $e = -(z[2][1] - k[1]) / o;
      T.beginPath(), T.moveTo(ue, Re), T.lineTo(G, ie), T.lineTo(Oe, $e), T.closePath(), T.stroke();
    }), T.restore()), T.canvas;
  }
  class uae extends yU {
    /**
     * @param {import("../proj/Projection.js").default} sourceProj Source projection.
     * @param {import("../tilegrid/TileGrid.js").default} sourceTileGrid Source tile grid.
     * @param {import("../proj/Projection.js").default} targetProj Target projection.
     * @param {import("../tilegrid/TileGrid.js").default} targetTileGrid Target tile grid.
     * @param {import("../tilecoord.js").TileCoord} tileCoord Coordinate of the tile.
     * @param {import("../tilecoord.js").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
     * @param {number} pixelRatio Pixel ratio.
     * @param {number} gutter Gutter of the source tiles.
     * @param {FunctionType} getTileFunction
     *     Function returning source tiles (z, x, y, pixelRatio).
     * @param {number} [errorThreshold] Acceptable reprojection error (in px).
     * @param {boolean} [renderEdges] Render reprojection edges.
     * @param {import("../Tile.js").Options} [options] Tile options.
     */
    constructor(e, t, i, a, o, u, c, p, y, _, S, b) {
      super(o, Jt.IDLE, b), this.renderEdges_ = S !== void 0 ? S : !1, this.pixelRatio_ = c, this.gutter_ = p, this.canvas_ = null, this.sourceTileGrid_ = t, this.targetTileGrid_ = a, this.wrappedTileCoord_ = u || o, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0;
      const T = a.getTileCoordExtent(
        this.wrappedTileCoord_
      ), O = this.targetTileGrid_.getExtent();
      let N = this.sourceTileGrid_.getExtent();
      const D = O ? Iv(T, O) : T;
      if (eA(D) === 0) {
        this.state = Jt.EMPTY;
        return;
      }
      const k = e.getExtent();
      k && (N ? N = Iv(N, k) : N = k);
      const $ = a.getResolution(
        this.wrappedTileCoord_[0]
      ), B = lae(
        e,
        i,
        D,
        $
      );
      if (!isFinite(B) || B <= 0) {
        this.state = Jt.EMPTY;
        return;
      }
      const V = _ !== void 0 ? _ : FU;
      if (this.triangulation_ = new jU(
        e,
        i,
        D,
        N,
        B * V,
        $
      ), this.triangulation_.getTriangles().length === 0) {
        this.state = Jt.EMPTY;
        return;
      }
      this.sourceZ_ = t.getZForResolution(B);
      let z = this.triangulation_.calculateSourceExtent();
      if (N && (e.canWrapX() ? (z[1] = da(
        z[1],
        N[1],
        N[3]
      ), z[3] = da(
        z[3],
        N[1],
        N[3]
      )) : z = Iv(z, N)), !eA(z))
        this.state = Jt.EMPTY;
      else {
        const G = t.getTileRangeForExtentAndZ(
          z,
          this.sourceZ_
        );
        for (let ie = G.minX; ie <= G.maxX; ie++)
          for (let ue = G.minY; ue <= G.maxY; ue++) {
            const Re = y(this.sourceZ_, ie, ue, c);
            Re && this.sourceTiles_.push(Re);
          }
        this.sourceTiles_.length === 0 && (this.state = Jt.EMPTY);
      }
    }
    /**
     * Get the HTML Canvas element for this tile.
     * @return {HTMLCanvasElement} Canvas.
     */
    getImage() {
      return this.canvas_;
    }
    /**
     * @private
     */
    reproject_() {
      const e = [];
      if (this.sourceTiles_.forEach((t) => {
        t && t.getState() == Jt.LOADED && e.push({
          extent: this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),
          image: t.getImage()
        });
      }), this.sourceTiles_.length = 0, e.length === 0)
        this.state = Jt.ERROR;
      else {
        const t = this.wrappedTileCoord_[0], i = this.targetTileGrid_.getTileSize(t), a = typeof i == "number" ? i : i[0], o = typeof i == "number" ? i : i[1], u = this.targetTileGrid_.getResolution(t), c = this.sourceTileGrid_.getResolution(
          this.sourceZ_
        ), p = this.targetTileGrid_.getTileCoordExtent(
          this.wrappedTileCoord_
        );
        this.canvas_ = UU(
          a,
          o,
          this.pixelRatio_,
          c,
          this.sourceTileGrid_.getExtent(),
          u,
          p,
          this.triangulation_,
          e,
          this.gutter_,
          this.renderEdges_,
          this.interpolate
        ), this.state = Jt.LOADED;
      }
      this.changed();
    }
    /**
     * Load not yet loaded URI.
     */
    load() {
      if (this.state == Jt.IDLE) {
        this.state = Jt.LOADING, this.changed();
        let e = 0;
        this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach((t) => {
          const i = t.getState();
          if (i == Jt.IDLE || i == Jt.LOADING) {
            e++;
            const a = di(
              t,
              Cn.CHANGE,
              function(o) {
                const u = t.getState();
                (u == Jt.LOADED || u == Jt.ERROR || u == Jt.EMPTY) && (Or(a), e--, e === 0 && (this.unlistenSources_(), this.reproject_()));
              },
              this
            );
            this.sourcesListenerKeys_.push(a);
          }
        }), e === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(t, i, a) {
          t.getState() == Jt.IDLE && t.load();
        });
      }
    }
    /**
     * @private
     */
    unlistenSources_() {
      this.sourcesListenerKeys_.forEach(Or), this.sourcesListenerKeys_ = null;
    }
    /**
     * Remove from the cache due to expiry
     */
    release() {
      this.canvas_ && (Kw(this.canvas_.getContext("2d")), G0.push(this.canvas_), this.canvas_ = null), super.release();
    }
  }
  const jA = uae;
  class cae extends aN {
    /**
     * @param {LayerType} tileLayer Tile layer.
     */
    constructor(e) {
      super(e), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = Su(), this.tmpTileRange_ = new NU(0, 0, 0, 0);
    }
    /**
     * @protected
     * @param {import("../../Tile.js").default} tile Tile.
     * @return {boolean} Tile is drawable.
     */
    isDrawableTile(e) {
      const t = this.getLayer(), i = e.getState(), a = t.getUseInterimTilesOnError();
      return i == Jt.LOADED || i == Jt.EMPTY || i == Jt.ERROR && !a;
    }
    /**
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @return {!import("../../Tile.js").default} Tile.
     */
    getTile(e, t, i, a) {
      const o = a.pixelRatio, u = a.viewState.projection, c = this.getLayer();
      let y = c.getSource().getTile(e, t, i, o, u);
      return y.getState() == Jt.ERROR && c.getUseInterimTilesOnError() && c.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(y) || (y = y.getInterimTile()), y;
    }
    /**
     * @param {import("../../pixel.js").Pixel} pixel Pixel.
     * @return {Uint8ClampedArray} Data at the pixel location.
     */
    getData(e) {
      const t = this.frameState;
      if (!t)
        return null;
      const i = this.getLayer(), a = os(
        t.pixelToCoordinateTransform,
        e.slice()
      ), o = i.getExtent();
      if (o && !KE(o, a))
        return null;
      const u = t.pixelRatio, c = t.viewState.projection, p = t.viewState, y = i.getRenderSource(), _ = y.getTileGridForProjection(p.projection), S = y.getTilePixelRatio(t.pixelRatio);
      for (let b = _.getZForResolution(p.resolution); b >= _.getMinZoom(); --b) {
        const T = _.getTileCoordForCoordAndZ(a, b), O = y.getTile(
          b,
          T[1],
          T[2],
          u,
          c
        );
        if (!(O instanceof _U || O instanceof jA) || O instanceof jA && O.getState() === Jt.EMPTY)
          return null;
        if (O.getState() !== Jt.LOADED)
          continue;
        const N = _.getOrigin(b), D = Eu(_.getTileSize(b)), k = _.getResolution(b), $ = Math.floor(
          S * ((a[0] - N[0]) / k - T[1] * D[0])
        ), B = Math.floor(
          S * ((N[1] - a[1]) / k - T[2] * D[1])
        ), V = Math.round(
          S * y.getGutterForProjection(p.projection)
        );
        return this.getImageData(O.getImage(), $ + V, B + V);
      }
      return null;
    }
    /**
     * @param {Object<number, Object<string, import("../../Tile.js").default>>} tiles Lookup of loaded tiles by zoom level.
     * @param {number} zoom Zoom level.
     * @param {import("../../Tile.js").default} tile Tile.
     * @return {boolean|void} If `false`, the tile will not be considered loaded.
     */
    loadedTileCallback(e, t, i) {
      return this.isDrawableTile(i) ? super.loadedTileCallback(e, t, i) : !1;
    }
    /**
     * Determine whether render should be called.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @return {boolean} Layer is ready to be rendered.
     */
    prepareFrame(e) {
      return !!this.getLayer().getSource();
    }
    /**
     * Render the layer.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {HTMLElement} target Target that may be used to render content to.
     * @return {HTMLElement} The rendered element.
     */
    renderFrame(e, t) {
      const i = e.layerStatesArray[e.layerIndex], a = e.viewState, o = a.projection, u = a.resolution, c = a.center, p = a.rotation, y = e.pixelRatio, _ = this.getLayer(), S = _.getSource(), b = S.getRevision(), T = S.getTileGridForProjection(o), O = T.getZForResolution(u, S.zDirection), N = T.getResolution(O);
      let D = e.extent;
      const k = e.viewState.resolution, $ = S.getTilePixelRatio(y), B = Math.round(_i(D) / k * y), V = Math.round(Cs(D) / k * y), z = i.extent && yp(i.extent);
      z && (D = Iv(
        D,
        yp(i.extent)
      ));
      const G = N * B / 2 / $, ie = N * V / 2 / $, ue = [
        c[0] - G,
        c[1] - ie,
        c[0] + G,
        c[1] + ie
      ], Re = T.getTileRangeForExtentAndZ(D, O), Oe = {};
      Oe[O] = {};
      const $e = this.createLoadedTileFinder(
        S,
        o,
        Oe
      ), Ee = this.tmpExtent, Fe = this.tmpTileRange_;
      this.newTiles_ = !1;
      const Ne = p ? tA(
        a.center,
        k,
        p,
        e.size
      ) : void 0;
      for (let Le = Re.minX; Le <= Re.maxX; ++Le)
        for (let Me = Re.minY; Me <= Re.maxY; ++Me) {
          if (p && !T.tileCoordIntersectsViewport([O, Le, Me], Ne))
            continue;
          const De = this.getTile(O, Le, Me, e);
          if (this.isDrawableTile(De)) {
            const Xe = Pi(this);
            if (De.getState() == Jt.LOADED) {
              Oe[O][De.tileCoord.toString()] = De;
              let lt = De.inTransition(Xe);
              lt && i.opacity !== 1 && (De.endTransition(Xe), lt = !1), !this.newTiles_ && (lt || !this.renderedTiles.includes(De)) && (this.newTiles_ = !0);
            }
            if (De.getAlpha(Xe, e.time) === 1)
              continue;
          }
          const Ye = T.getTileCoordChildTileRange(
            De.tileCoord,
            Fe,
            Ee
          );
          let Ze = !1;
          Ye && (Ze = $e(O + 1, Ye)), Ze || T.forEachTileCoordParentTileRange(
            De.tileCoord,
            $e,
            Fe,
            Ee
          );
        }
      const Q = N / u * y / $;
      Rf(
        this.pixelTransform,
        e.size[0] / 2,
        e.size[1] / 2,
        1 / y,
        1 / y,
        p,
        -B / 2,
        -V / 2
      );
      const ae = DL(this.pixelTransform);
      this.useContainer(t, ae, this.getBackground(e));
      const le = this.context, se = le.canvas;
      Xw(this.inversePixelTransform, this.pixelTransform), Rf(
        this.tempTransform,
        B / 2,
        V / 2,
        Q,
        Q,
        0,
        -B / 2,
        -V / 2
      ), se.width != B || se.height != V ? (se.width = B, se.height = V) : this.containerReused || le.clearRect(0, 0, B, V), z && this.clipUnrotated(le, e, z), S.getInterpolate() || (le.imageSmoothingEnabled = !1), this.preRender(le, e), this.renderedTiles.length = 0;
      let Ae = Object.keys(Oe).map(Number);
      Ae.sort(sm);
      let q, Z, ee;
      i.opacity === 1 && (!this.containerReused || S.getOpaque(e.viewState.projection)) ? Ae = Ae.reverse() : (q = [], Z = []);
      for (let Le = Ae.length - 1; Le >= 0; --Le) {
        const Me = Ae[Le], De = S.getTilePixelSize(
          Me,
          y,
          o
        ), Ze = T.getResolution(Me) / N, Xe = De[0] * Ze * Q, lt = De[1] * Ze * Q, Dt = T.getTileCoordForCoordAndZ(
          Xv(ue),
          Me
        ), Ct = T.getTileCoordExtent(Dt), hn = os(this.tempTransform, [
          $ * (Ct[0] - ue[0]) / N,
          $ * (ue[3] - Ct[3]) / N
        ]), Je = $ * S.getGutterForProjection(o), Pt = Oe[Me];
        for (const Vn in Pt) {
          const Hn = (
            /** @type {import("../../ImageTile.js").default} */
            Pt[Vn]
          ), Nn = Hn.tileCoord, Si = Dt[1] - Nn[1], Sr = Math.round(hn[0] - (Si - 1) * Xe), In = Dt[2] - Nn[2], Tn = Math.round(hn[1] - (In - 1) * lt), Pn = Math.round(hn[0] - Si * Xe), Qn = Math.round(hn[1] - In * lt), Jn = Sr - Pn, ui = Tn - Qn, Mi = O === Me, ci = Mi && Hn.getAlpha(Pi(this), e.time) !== 1;
          let dn = !1;
          if (!ci)
            if (q) {
              ee = [Pn, Qn, Pn + Jn, Qn, Pn + Jn, Qn + ui, Pn, Qn + ui];
              for (let xr = 0, Wr = q.length; xr < Wr; ++xr)
                if (O !== Me && Me < Z[xr]) {
                  const ai = q[xr];
                  Zo(
                    [Pn, Qn, Pn + Jn, Qn + ui],
                    [ai[0], ai[3], ai[4], ai[7]]
                  ) && (dn || (le.save(), dn = !0), le.beginPath(), le.moveTo(ee[0], ee[1]), le.lineTo(ee[2], ee[3]), le.lineTo(ee[4], ee[5]), le.lineTo(ee[6], ee[7]), le.moveTo(ai[6], ai[7]), le.lineTo(ai[4], ai[5]), le.lineTo(ai[2], ai[3]), le.lineTo(ai[0], ai[1]), le.clip());
                }
              q.push(ee), Z.push(Me);
            } else
              le.clearRect(Pn, Qn, Jn, ui);
          this.drawTileImage(
            Hn,
            e,
            Pn,
            Qn,
            Jn,
            ui,
            Je,
            Mi
          ), q && !ci ? (dn && le.restore(), this.renderedTiles.unshift(Hn)) : this.renderedTiles.push(Hn), this.updateUsedTiles(e.usedTiles, S, Hn);
        }
      }
      return this.renderedRevision = b, this.renderedResolution = N, this.extentChanged = !this.renderedExtent_ || !K0(this.renderedExtent_, ue), this.renderedExtent_ = ue, this.renderedPixelRatio = y, this.renderedProjection = o, this.manageTilePyramid(
        e,
        S,
        T,
        y,
        o,
        D,
        O,
        _.getPreload()
      ), this.scheduleExpireCache(e, S), this.postRender(le, e), i.extent && le.restore(), le.imageSmoothingEnabled = !0, ae !== se.style.transform && (se.style.transform = ae), this.container;
    }
    /**
     * @param {import("../../ImageTile.js").default} tile Tile.
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {number} x Left of the tile.
     * @param {number} y Top of the tile.
     * @param {number} w Width of the tile.
     * @param {number} h Height of the tile.
     * @param {number} gutter Tile gutter.
     * @param {boolean} transition Apply an alpha transition.
     */
    drawTileImage(e, t, i, a, o, u, c, p) {
      const y = this.getTileImage(e);
      if (!y)
        return;
      const _ = Pi(this), S = t.layerStatesArray[t.layerIndex], b = S.opacity * (p ? e.getAlpha(_, t.time) : 1), T = b !== this.context.globalAlpha;
      T && (this.context.save(), this.context.globalAlpha = b), this.context.drawImage(
        y,
        c,
        c,
        y.width - 2 * c,
        y.height - 2 * c,
        i,
        a,
        o,
        u
      ), T && this.context.restore(), b !== S.opacity ? t.animate = !0 : p && e.endTransition(_);
    }
    /**
     * @return {HTMLCanvasElement} Image
     */
    getImage() {
      const e = this.context;
      return e ? e.canvas : null;
    }
    /**
     * Get the image from a tile.
     * @param {import("../../ImageTile.js").default} tile Tile.
     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
     * @protected
     */
    getTileImage(e) {
      return e.getImage();
    }
    /**
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {import("../../source/Tile.js").default} tileSource Tile source.
     * @protected
     */
    scheduleExpireCache(e, t) {
      if (t.canExpireCache()) {
        const i = (function(a, o, u) {
          const c = Pi(a);
          c in u.usedTiles && a.expireCache(
            u.viewState.projection,
            u.usedTiles[c]
          );
        }).bind(null, t);
        e.postRenderFunctions.push(
          /** @type {import("../../Map.js").PostRenderFunction} */
          i
        );
      }
    }
    /**
     * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.
     * @param {import("../../source/Tile.js").default} tileSource Tile source.
     * @param {import('../../Tile.js').default} tile Tile.
     * @protected
     */
    updateUsedTiles(e, t, i) {
      const a = Pi(t);
      a in e || (e[a] = {}), e[a][i.getKey()] = !0;
    }
    /**
     * Manage tile pyramid.
     * This function performs a number of functions related to the tiles at the
     * current zoom and lower zoom levels:
     * - registers idle tiles in frameState.wantedTiles so that they are not
     *   discarded by the tile queue
     * - enqueues missing tiles
     * @param {import("../../Map.js").FrameState} frameState Frame state.
     * @param {import("../../source/Tile.js").default} tileSource Tile source.
     * @param {import("../../tilegrid/TileGrid.js").default} tileGrid Tile grid.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../../proj/Projection.js").default} projection Projection.
     * @param {import("../../extent.js").Extent} extent Extent.
     * @param {number} currentZ Current Z.
     * @param {number} preload Load low resolution tiles up to `preload` levels.
     * @param {function(import("../../Tile.js").default):void} [tileCallback] Tile callback.
     * @protected
     */
    manageTilePyramid(e, t, i, a, o, u, c, p, y) {
      const _ = Pi(t);
      _ in e.wantedTiles || (e.wantedTiles[_] = {});
      const S = e.wantedTiles[_], b = e.tileQueue, T = i.getMinZoom(), O = e.viewState.rotation, N = O ? tA(
        e.viewState.center,
        e.viewState.resolution,
        O,
        e.size
      ) : void 0;
      let D = 0, k, $, B, V, z, G;
      for (G = T; G <= c; ++G)
        for ($ = i.getTileRangeForExtentAndZ(u, G, $), B = i.getResolution(G), V = $.minX; V <= $.maxX; ++V)
          for (z = $.minY; z <= $.maxY; ++z)
            O && !i.tileCoordIntersectsViewport([G, V, z], N) || (c - G <= p ? (++D, k = t.getTile(G, V, z, a, o), k.getState() == Jt.IDLE && (S[k.getKey()] = !0, b.isKeyQueued(k.getKey()) || b.enqueue([
              k,
              _,
              i.getTileCoordCenter(k.tileCoord),
              B
            ])), y !== void 0 && y(k)) : t.useTile(G, V, z, o));
      t.updateCacheSize(D, o);
    }
  }
  const fae = cae;
  class hae extends rae {
    /**
     * @param {import("./BaseTile.js").Options<TileSourceType>} [options] Tile layer options.
     */
    constructor(e) {
      super(e);
    }
    createRenderer() {
      return new fae(this);
    }
  }
  const UA = hae;
  function zA(n) {
    return Array.isArray(n) ? Math.min(...n) : n;
  }
  class dae extends tU {
    /**
     * @param {import("../proj/Projection.js").default} sourceProj Source projection (of the data).
     * @param {import("../proj/Projection.js").default} targetProj Target projection.
     * @param {import("../extent.js").Extent} targetExtent Target extent.
     * @param {number} targetResolution Target resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {FunctionType} getImageFunction
     *     Function returning source images (extent, resolution, pixelRatio).
     * @param {boolean} interpolate Use linear interpolation when resampling.
     */
    constructor(e, t, i, a, o, u, c) {
      let p = e.getExtent();
      p && e.canWrapX() && (p = p.slice(), p[0] = -1 / 0, p[2] = 1 / 0);
      let y = t.getExtent();
      y && t.canWrapX() && (y = y.slice(), y[0] = -1 / 0, y[2] = 1 / 0);
      const _ = y ? Iv(i, y) : i, S = Cp(_), b = GE(
        e,
        t,
        S,
        a
      ), T = FU, O = new jU(
        e,
        t,
        _,
        p,
        b * T,
        a
      ), N = O.calculateSourceExtent(), D = Kv(N) ? null : u(N, b, o), k = D ? _n.IDLE : _n.EMPTY, $ = D ? D.getPixelRatio() : 1;
      super(i, a, $, k), this.targetProj_ = t, this.maxSourceExtent_ = p, this.triangulation_ = O, this.targetResolution_ = a, this.targetExtent_ = i, this.sourceImage_ = D, this.sourcePixelRatio_ = $, this.interpolate_ = c, this.canvas_ = null, this.sourceListenerKey_ = null;
    }
    /**
     * Clean up.
     */
    disposeInternal() {
      this.state == _n.LOADING && this.unlistenSource_(), super.disposeInternal();
    }
    /**
     * @return {HTMLCanvasElement} Image.
     */
    getImage() {
      return this.canvas_;
    }
    /**
     * @return {import("../proj/Projection.js").default} Projection.
     */
    getProjection() {
      return this.targetProj_;
    }
    /**
     * @private
     */
    reproject_() {
      const e = this.sourceImage_.getState();
      if (e == _n.LOADED) {
        const t = _i(this.targetExtent_) / this.targetResolution_, i = Cs(this.targetExtent_) / this.targetResolution_;
        this.canvas_ = UU(
          t,
          i,
          this.sourcePixelRatio_,
          zA(this.sourceImage_.getResolution()),
          this.maxSourceExtent_,
          this.targetResolution_,
          this.targetExtent_,
          this.triangulation_,
          [
            {
              extent: this.sourceImage_.getExtent(),
              image: this.sourceImage_.getImage()
            }
          ],
          0,
          void 0,
          this.interpolate_,
          !0
        );
      }
      this.state = e, this.changed();
    }
    /**
     * Load not yet loaded URI.
     */
    load() {
      if (this.state == _n.IDLE) {
        this.state = _n.LOADING, this.changed();
        const e = this.sourceImage_.getState();
        e == _n.LOADED || e == _n.ERROR ? this.reproject_() : (this.sourceListenerKey_ = di(
          this.sourceImage_,
          Cn.CHANGE,
          function(t) {
            const i = this.sourceImage_.getState();
            (i == _n.LOADED || i == _n.ERROR) && (this.unlistenSource_(), this.reproject_());
          },
          this
        ), this.sourceImage_.load());
      }
    }
    /**
     * @private
     */
    unlistenSource_() {
      Or(
        /** @type {!import("../events.js").EventsKey} */
        this.sourceListenerKey_
      ), this.sourceListenerKey_ = null;
    }
  }
  const pae = dae, Kg = 4, zO = {
    /**
     * Triggered when an image starts loading.
     * @event module:ol/source/Image.ImageSourceEvent#imageloadstart
     * @api
     */
    IMAGELOADSTART: "imageloadstart",
    /**
     * Triggered when an image finishes loading.
     * @event module:ol/source/Image.ImageSourceEvent#imageloadend
     * @api
     */
    IMAGELOADEND: "imageloadend",
    /**
     * Triggered if image loading results in an error.
     * @event module:ol/source/Image.ImageSourceEvent#imageloaderror
     * @api
     */
    IMAGELOADERROR: "imageloaderror"
  };
  class gae extends Xh {
    /**
     * @param {string} type Type.
     * @param {import("../Image.js").default} image The image.
     */
    constructor(e, t) {
      super(e), this.image = t;
    }
  }
  class mae extends oN {
    /**
     * @param {Options} options Single image source options.
     */
    constructor(e) {
      super({
        attributions: e.attributions,
        projection: e.projection,
        state: e.state,
        interpolate: e.interpolate !== void 0 ? e.interpolate : !0
      }), this.on, this.once, this.un, this.loader = e.loader || null, this.resolutions_ = e.resolutions !== void 0 ? e.resolutions : null, this.reprojectedImage_ = null, this.reprojectedRevision_ = 0, this.image = null, this.wantedExtent_, this.wantedResolution_, this.static_ = e.loader ? e.loader.length === 0 : !1, this.wantedProjection_ = null;
    }
    /**
     * @return {Array<number>|null} Resolutions.
     */
    getResolutions() {
      return this.resolutions_;
    }
    /**
     * @param {Array<number>|null} resolutions Resolutions.
     */
    setResolutions(e) {
      this.resolutions_ = e;
    }
    /**
     * @protected
     * @param {number} resolution Resolution.
     * @return {number} Resolution.
     */
    findNearestResolution(e) {
      const t = this.getResolutions();
      if (t) {
        const i = Gw(t, e, 0);
        e = t[i];
      }
      return e;
    }
    /**
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../Image.js").default} Single image.
     */
    getImage(e, t, i, a) {
      const o = this.getProjection();
      if (!o || !a || Ph(o, a))
        return o && (a = o), this.getImageInternal(e, t, i, a);
      if (this.reprojectedImage_) {
        if (this.reprojectedRevision_ == this.getRevision() && Ph(this.reprojectedImage_.getProjection(), a) && this.reprojectedImage_.getResolution() == t && K0(this.reprojectedImage_.getExtent(), e))
          return this.reprojectedImage_;
        this.reprojectedImage_.dispose(), this.reprojectedImage_ = null;
      }
      return this.reprojectedImage_ = new pae(
        o,
        a,
        e,
        t,
        i,
        (u, c, p) => this.getImageInternal(u, c, p, o),
        this.getInterpolate()
      ), this.reprojectedRevision_ = this.getRevision(), this.reprojectedImage_;
    }
    /**
     * @abstract
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../Image.js").default} Single image.
     * @protected
     */
    getImageInternal(e, t, i, a) {
      if (this.loader) {
        const o = zU(e, t, i, 1), u = this.findNearestResolution(t);
        if (this.image && (this.static_ || this.wantedProjection_ === a && (this.wantedExtent_ && xf(this.wantedExtent_, o) || xf(this.image.getExtent(), o)) && (this.wantedResolution_ && zA(this.wantedResolution_) === u || zA(this.image.getResolution()) === u)))
          return this.image;
        this.wantedProjection_ = a, this.wantedExtent_ = o, this.wantedResolution_ = u, this.image = new tU(
          o,
          u,
          i,
          this.loader
        ), this.image.addEventListener(
          Cn.CHANGE,
          this.handleImageChange.bind(this)
        );
      }
      return this.image;
    }
    /**
     * Handle image change events.
     * @param {import("../events/Event.js").default} event Event.
     * @protected
     */
    handleImageChange(e) {
      const t = (
        /** @type {import("../Image.js").default} */
        e.target
      );
      let i;
      switch (t.getState()) {
        case _n.LOADING:
          this.loading = !0, i = zO.IMAGELOADSTART;
          break;
        case _n.LOADED:
          this.loading = !1, i = zO.IMAGELOADEND;
          break;
        case _n.ERROR:
          this.loading = !1, i = zO.IMAGELOADERROR;
          break;
        default:
          return;
      }
      this.hasListener(i) && this.dispatchEvent(new gae(i, t));
    }
  }
  function vae(n, e) {
    n.getImage().src = e;
  }
  function zU(n, e, t, i) {
    const a = e / t, o = Cp(n), u = Gg(_i(n) / a, Kg), c = Gg(Cs(n) / a, Kg), p = Gg((i - 1) * u / 2, Kg), y = u + 2 * p, _ = Gg((i - 1) * c / 2, Kg), S = c + 2 * _;
    return RE(o, a, 0, [
      y,
      S
    ]);
  }
  const yae = mae;
  function YE(n, e) {
    const t = [];
    Object.keys(e).forEach(function(a) {
      e[a] !== null && e[a] !== void 0 && t.push(a + "=" + encodeURIComponent(e[a]));
    });
    const i = t.join("&");
    return n = n.replace(/[?&]$/, ""), n += n.includes("?") ? "&" : "?", n + i;
  }
  const bw = "1.3.0", C2 = [101, 101];
  function $U(n, e, t, i, a) {
    a.WIDTH = t[0], a.HEIGHT = t[1];
    const o = i.getAxisOrientation();
    let u;
    const c = GA(a.VERSION, "1.3") >= 0;
    return a[c ? "CRS" : "SRS"] = i.getCode(), c && o.substr(0, 2) == "ne" ? u = [e[1], e[0], e[3], e[2]] : u = e, a.BBOX = u.join(","), YE(
      /** @type {string} */
      n,
      a
    );
  }
  function BU(n, e, t, i, a, o, u) {
    o = Object.assign({ REQUEST: "GetMap" }, o);
    const c = e / t, p = [
      qP(_i(n) / c, Kg),
      qP(Cs(n) / c, Kg)
    ];
    if (t != 1)
      switch (u) {
        case "geoserver":
          const _ = 90 * t + 0.5 | 0;
          "FORMAT_OPTIONS" in o ? o.FORMAT_OPTIONS += ";dpi:" + _ : o.FORMAT_OPTIONS = "dpi:" + _;
          break;
        case "mapserver":
          o.MAP_RESOLUTION = 90 * t;
          break;
        case "carmentaserver":
        case "qgis":
          o.DPI = 90 * t;
          break;
        default:
          throw new Error("Unknown `serverType` configured");
      }
    return $U(a, n, p, i, o);
  }
  function ww(n, e) {
    return Object.assign(
      {
        REQUEST: e,
        SERVICE: "WMS",
        VERSION: bw,
        FORMAT: "image/png",
        STYLES: "",
        TRANSPARENT: !0
      },
      n
    );
  }
  function _ae(n) {
    const e = n.hidpi === void 0 ? !0 : n.hidpi, t = Er(n.projection || "EPSG:3857"), i = n.ratio || 1.5, a = n.load || iU;
    return (o, u, c) => {
      o = zU(o, u, c, i), c != 1 && (!e || n.serverType === void 0) && (c = 1);
      const p = BU(
        o,
        u,
        c,
        t,
        n.url,
        ww(n.params, "GetMap"),
        n.serverType
      ), y = new Image();
      return n.crossOrigin !== null && (y.crossOrigin = n.crossOrigin), a(y, p).then((_) => ({ image: _, extent: o, pixelRatio: c }));
    };
  }
  function Eae(n, e, t) {
    if (n.url === void 0)
      return;
    const i = Er(n.projection || "EPSG:3857"), a = RE(
      e,
      t,
      0,
      C2
    ), o = {
      QUERY_LAYERS: n.params.LAYERS,
      INFO_FORMAT: "application/json"
    };
    Object.assign(
      o,
      ww(n.params, "GetFeatureInfo"),
      n.params
    );
    const u = k0((e[0] - a[0]) / t, Kg), c = k0((a[3] - e[1]) / t, Kg), p = GA(o.VERSION, "1.3") >= 0;
    return o[p ? "I" : "X"] = u, o[p ? "J" : "Y"] = c, $U(
      n.url,
      a,
      C2,
      i,
      o
    );
  }
  function Sae(n, e) {
    if (n.url === void 0)
      return;
    const t = {
      SERVICE: "WMS",
      VERSION: bw,
      REQUEST: "GetLegendGraphic",
      FORMAT: "image/png"
    };
    if (n.params === void 0 || n.params.LAYER === void 0) {
      const i = n.params.LAYERS;
      if (!(!Array.isArray(i) || i.length === 1))
        return;
      t.LAYER = i;
    }
    if (e !== void 0) {
      const i = Er(n.projection || "EPSG:3857").getMetersPerUnit() || 1, a = 28e-5;
      t.SCALE = e * i / a;
    }
    return Object.assign(t, n.params), YE(n.url, t);
  }
  class xae extends yae {
    /**
     * @param {Options} [options] ImageWMS options.
     */
    constructor(e) {
      e = e || {}, super({
        attributions: e.attributions,
        interpolate: e.interpolate,
        projection: e.projection,
        resolutions: e.resolutions
      }), this.crossOrigin_ = e.crossOrigin !== void 0 ? e.crossOrigin : null, this.url_ = e.url, this.imageLoadFunction_ = e.imageLoadFunction !== void 0 ? e.imageLoadFunction : vae, this.params_ = e.params, this.serverType_ = e.serverType, this.hidpi_ = e.hidpi !== void 0 ? e.hidpi : !0, this.renderedRevision_ = 0, this.ratio_ = e.ratio !== void 0 ? e.ratio : 1.5, this.loaderProjection_ = null;
    }
    /**
     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
     * projection. Return `undefined` if the GetFeatureInfo URL cannot be
     * constructed.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {number} resolution Resolution.
     * @param {import("../proj.js").ProjectionLike} projection Projection.
     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
     *     in the `LAYERS` parameter will be used. `VERSION` should not be
     *     specified here.
     * @return {string|undefined} GetFeatureInfo URL.
     * @api
     */
    getFeatureInfoUrl(e, t, i, a) {
      const o = Er(i), u = this.getProjection();
      u && u !== o && (t = GE(
        u,
        o,
        e,
        t
      ), e = ZA(e, o, u));
      const c = {
        url: this.url_,
        params: {
          ...this.params_,
          ...a
        },
        projection: u || o
      };
      return Eae(c, e, t);
    }
    /**
     * Return the GetLegendGraphic URL, optionally optimized for the passed
     * resolution and possibly including any passed specific parameters. Returns
     * `undefined` if the GetLegendGraphic URL cannot be constructed.
     *
     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`
     *     will not be calculated and included in URL.
     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the
     *     request is generated for this wms layer, else it will try to use the
     *     configured wms layer. Default `FORMAT` is `image/png`.
     *     `VERSION` should not be specified here.
     * @return {string|undefined} GetLegendGraphic URL.
     * @api
     */
    getLegendUrl(e, t) {
      return Sae(
        {
          url: this.url_,
          params: {
            ...this.params_,
            ...t
          }
        },
        e
      );
    }
    /**
     * Get the user-provided params, i.e. those passed to the constructor through
     * the "params" option, and possibly updated using the updateParams method.
     * @return {Object} Params.
     * @api
     */
    getParams() {
      return this.params_;
    }
    /**
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} resolution Resolution.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../Image.js").default} Single image.
     */
    getImageInternal(e, t, i, a) {
      return this.url_ === void 0 ? null : ((!this.loader || this.loaderProjection_ !== a) && (this.loaderProjection_ = a, this.loader = _ae({
        crossOrigin: this.crossOrigin_,
        params: this.params_,
        projection: a,
        serverType: this.serverType_,
        hidpi: this.hidpi_,
        url: this.url_,
        ratio: this.ratio_,
        load: (o, u) => (this.image.setImage(o), this.imageLoadFunction_(this.image, u), iU(o))
      })), super.getImageInternal(e, t, i, a));
    }
    /**
     * Return the image load function of the source.
     * @return {import("../Image.js").LoadFunction} The image load function.
     * @api
     */
    getImageLoadFunction() {
      return this.imageLoadFunction_;
    }
    /**
     * Return the URL used for this WMS source.
     * @return {string|undefined} URL.
     * @api
     */
    getUrl() {
      return this.url_;
    }
    /**
     * Set the image load function of the source.
     * @param {import("../Image.js").LoadFunction} imageLoadFunction Image load function.
     * @api
     */
    setImageLoadFunction(e) {
      this.imageLoadFunction_ = e, this.changed();
    }
    /**
     * Set the URL to use for requests.
     * @param {string|undefined} url URL.
     * @api
     */
    setUrl(e) {
      e != this.url_ && (this.url_ = e, this.loader = null, this.changed());
    }
    /**
     * Update the user-provided params.
     * @param {Object} params Params.
     * @api
     */
    updateParams(e) {
      Object.assign(this.params_, e), this.changed();
    }
    changed() {
      this.image = null, super.changed();
    }
  }
  const VU = xae, $O = {
    /**
     * Triggered when a tile starts loading.
     * @event module:ol/source/Tile.TileSourceEvent#tileloadstart
     * @api
     */
    TILELOADSTART: "tileloadstart",
    /**
     * Triggered when a tile finishes loading, either when its data is loaded,
     * or when loading was aborted because the tile is no longer needed.
     * @event module:ol/source/Tile.TileSourceEvent#tileloadend
     * @api
     */
    TILELOADEND: "tileloadend",
    /**
     * Triggered if tile loading results in an error. Note that this is not the
     * right place to re-fetch tiles. See {@link module:ol/ImageTile~ImageTile#load}
     * for details.
     * @event module:ol/source/Tile.TileSourceEvent#tileloaderror
     * @api
     */
    TILELOADERROR: "tileloaderror"
  }, T0 = [0, 0, 0], $g = 5;
  class bae {
    /**
     * @param {Options} options Tile grid options.
     */
    constructor(e) {
      this.minZoom = e.minZoom !== void 0 ? e.minZoom : 0, this.resolutions_ = e.resolutions, Ei(
        KQ(
          this.resolutions_,
          /**
           * @param {number} a First resolution
           * @param {number} b Second resolution
           * @return {number} Comparison result
           */
          (a, o) => o - a,
          !0
        ),
        "`resolutions` must be sorted in descending order"
      );
      let t;
      if (!e.origins) {
        for (let a = 0, o = this.resolutions_.length - 1; a < o; ++a)
          if (!t)
            t = this.resolutions_[a] / this.resolutions_[a + 1];
          else if (this.resolutions_[a] / this.resolutions_[a + 1] !== t) {
            t = void 0;
            break;
          }
      }
      this.zoomFactor_ = t, this.maxZoom = this.resolutions_.length - 1, this.origin_ = e.origin !== void 0 ? e.origin : null, this.origins_ = null, e.origins !== void 0 && (this.origins_ = e.origins, Ei(
        this.origins_.length == this.resolutions_.length,
        "Number of `origins` and `resolutions` must be equal"
      ));
      const i = e.extent;
      i !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Xv(i)), Ei(
        !this.origin_ && this.origins_ || this.origin_ && !this.origins_,
        "Either `origin` or `origins` must be configured, never both"
      ), this.tileSizes_ = null, e.tileSizes !== void 0 && (this.tileSizes_ = e.tileSizes, Ei(
        this.tileSizes_.length == this.resolutions_.length,
        "Number of `tileSizes` and `resolutions` must be equal"
      )), this.tileSize_ = e.tileSize !== void 0 ? e.tileSize : this.tileSizes_ ? null : QL, Ei(
        !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_,
        "Either `tileSize` or `tileSizes` must be configured, never both"
      ), this.extent_ = i !== void 0 ? i : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], e.sizes !== void 0 ? this.fullTileRanges_ = e.sizes.map((a, o) => {
        const u = new NU(
          Math.min(0, a[0]),
          Math.max(a[0] - 1, -1),
          Math.min(0, a[1]),
          Math.max(a[1] - 1, -1)
        );
        if (i) {
          const c = this.getTileRangeForExtentAndZ(i, o);
          u.minX = Math.max(c.minX, u.minX), u.maxX = Math.min(c.maxX, u.maxX), u.minY = Math.max(c.minY, u.minY), u.maxY = Math.min(c.maxY, u.maxY);
        }
        return u;
      }) : i && this.calculateTileRanges_(i);
    }
    /**
     * Call a function with each tile coordinate for a given extent and zoom level.
     *
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} zoom Integer zoom level.
     * @param {function(import("../tilecoord.js").TileCoord): void} callback Function called with each tile coordinate.
     * @api
     */
    forEachTileCoord(e, t, i) {
      const a = this.getTileRangeForExtentAndZ(e, t);
      for (let o = a.minX, u = a.maxX; o <= u; ++o)
        for (let c = a.minY, p = a.maxY; c <= p; ++c)
          i([t, o, c]);
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {function(number, import("../TileRange.js").default): boolean} callback Callback.
     * @param {import("../TileRange.js").default} [tempTileRange] Temporary import("../TileRange.js").default object.
     * @param {import("../extent.js").Extent} [tempExtent] Temporary import("../extent.js").Extent object.
     * @return {boolean} Callback succeeded.
     */
    forEachTileCoordParentTileRange(e, t, i, a) {
      let o, u, c, p = null, y = e[0] - 1;
      for (this.zoomFactor_ === 2 ? (u = e[1], c = e[2]) : p = this.getTileCoordExtent(e, a); y >= this.minZoom; ) {
        if (u !== void 0 && c !== void 0 ? (u = Math.floor(u / 2), c = Math.floor(c / 2), o = C0(u, u, c, c, i)) : o = this.getTileRangeForExtentAndZ(
          p,
          y,
          i
        ), t(y, o))
          return !0;
        --y;
      }
      return !1;
    }
    /**
     * Get the extent for this tile grid, if it was configured.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getExtent() {
      return this.extent_;
    }
    /**
     * Get the maximum zoom level for the grid.
     * @return {number} Max zoom.
     * @api
     */
    getMaxZoom() {
      return this.maxZoom;
    }
    /**
     * Get the minimum zoom level for the grid.
     * @return {number} Min zoom.
     * @api
     */
    getMinZoom() {
      return this.minZoom;
    }
    /**
     * Get the origin for the grid at the given zoom level.
     * @param {number} z Integer zoom level.
     * @return {import("../coordinate.js").Coordinate} Origin.
     * @api
     */
    getOrigin(e) {
      return this.origin_ ? this.origin_ : this.origins_[e];
    }
    /**
     * Get the resolution for the given zoom level.
     * @param {number} z Integer zoom level.
     * @return {number} Resolution.
     * @api
     */
    getResolution(e) {
      return this.resolutions_[e];
    }
    /**
     * Get the list of resolutions for the tile grid.
     * @return {Array<number>} Resolutions.
     * @api
     */
    getResolutions() {
      return this.resolutions_;
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("../TileRange.js").default} [tempTileRange] Temporary import("../TileRange.js").default object.
     * @param {import("../extent.js").Extent} [tempExtent] Temporary import("../extent.js").Extent object.
     * @return {import("../TileRange.js").default|null} Tile range.
     */
    getTileCoordChildTileRange(e, t, i) {
      if (e[0] < this.maxZoom) {
        if (this.zoomFactor_ === 2) {
          const o = e[1] * 2, u = e[2] * 2;
          return C0(
            o,
            o + 1,
            u,
            u + 1,
            t
          );
        }
        const a = this.getTileCoordExtent(
          e,
          i || this.tmpExtent_
        );
        return this.getTileRangeForExtentAndZ(
          a,
          e[0] + 1,
          t
        );
      }
      return null;
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {number} z Integer zoom level.
     * @param {import("../TileRange.js").default} [tempTileRange] Temporary import("../TileRange.js").default object.
     * @return {import("../TileRange.js").default|null} Tile range.
     */
    getTileRangeForTileCoordAndZ(e, t, i) {
      if (t > this.maxZoom || t < this.minZoom)
        return null;
      const a = e[0], o = e[1], u = e[2];
      if (t === a)
        return C0(
          o,
          u,
          o,
          u,
          i
        );
      if (this.zoomFactor_) {
        const p = Math.pow(this.zoomFactor_, t - a), y = Math.floor(o * p), _ = Math.floor(u * p);
        if (t < a)
          return C0(y, y, _, _, i);
        const S = Math.floor(p * (o + 1)) - 1, b = Math.floor(p * (u + 1)) - 1;
        return C0(y, S, _, b, i);
      }
      const c = this.getTileCoordExtent(e, this.tmpExtent_);
      return this.getTileRangeForExtentAndZ(c, t, i);
    }
    /**
     * Get a tile range for the given extent and integer zoom level.
     * @param {import("../extent.js").Extent} extent Extent.
     * @param {number} z Integer zoom level.
     * @param {import("../TileRange.js").default} [tempTileRange] Temporary tile range object.
     * @return {import("../TileRange.js").default} Tile range.
     */
    getTileRangeForExtentAndZ(e, t, i) {
      this.getTileCoordForXYAndZ_(e[0], e[3], t, !1, T0);
      const a = T0[1], o = T0[2];
      this.getTileCoordForXYAndZ_(e[2], e[1], t, !0, T0);
      const u = T0[1], c = T0[2];
      return C0(a, u, o, c, i);
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @return {import("../coordinate.js").Coordinate} Tile center.
     */
    getTileCoordCenter(e) {
      const t = this.getOrigin(e[0]), i = this.getResolution(e[0]), a = Eu(this.getTileSize(e[0]), this.tmpSize_);
      return [
        t[0] + (e[1] + 0.5) * a[0] * i,
        t[1] - (e[2] + 0.5) * a[1] * i
      ];
    }
    /**
     * Get the extent of a tile coordinate.
     *
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("../extent.js").Extent} [tempExtent] Temporary extent object.
     * @return {import("../extent.js").Extent} Extent.
     * @api
     */
    getTileCoordExtent(e, t) {
      const i = this.getOrigin(e[0]), a = this.getResolution(e[0]), o = Eu(this.getTileSize(e[0]), this.tmpSize_), u = i[0] + e[1] * o[0] * a, c = i[1] - (e[2] + 1) * o[1] * a, p = u + o[0] * a, y = c + o[1] * a;
      return wp(u, c, p, y, t);
    }
    /**
     * Get the tile coordinate for the given map coordinate and resolution.  This
     * method considers that coordinates that intersect tile boundaries should be
     * assigned the higher tile coordinate.
     *
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {number} resolution Resolution.
     * @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
     * @return {import("../tilecoord.js").TileCoord} Tile coordinate.
     * @api
     */
    getTileCoordForCoordAndResolution(e, t, i) {
      return this.getTileCoordForXYAndResolution_(
        e[0],
        e[1],
        t,
        !1,
        i
      );
    }
    /**
     * Note that this method should not be called for resolutions that correspond
     * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.
     * @param {number} x X.
     * @param {number} y Y.
     * @param {number} resolution Resolution (for a non-integer zoom level).
     * @param {boolean} reverseIntersectionPolicy Instead of letting edge
     *     intersections go to the higher tile coordinate, let edge intersections
     *     go to the lower tile coordinate.
     * @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
     * @return {import("../tilecoord.js").TileCoord} Tile coordinate.
     * @private
     */
    getTileCoordForXYAndResolution_(e, t, i, a, o) {
      const u = this.getZForResolution(i), c = i / this.getResolution(u), p = this.getOrigin(u), y = Eu(this.getTileSize(u), this.tmpSize_);
      let _ = c * (e - p[0]) / i / y[0], S = c * (p[1] - t) / i / y[1];
      return a ? (_ = Gg(_, $g) - 1, S = Gg(S, $g) - 1) : (_ = k0(_, $g), S = k0(S, $g)), x2(u, _, S, o);
    }
    /**
     * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
     * they should have separate implementations.  This method is for integer zoom
     * levels.  The other method should only be called for resolutions corresponding
     * to non-integer zoom levels.
     * @param {number} x Map x coordinate.
     * @param {number} y Map y coordinate.
     * @param {number} z Integer zoom level.
     * @param {boolean} reverseIntersectionPolicy Instead of letting edge
     *     intersections go to the higher tile coordinate, let edge intersections
     *     go to the lower tile coordinate.
     * @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
     * @return {import("../tilecoord.js").TileCoord} Tile coordinate.
     * @private
     */
    getTileCoordForXYAndZ_(e, t, i, a, o) {
      const u = this.getOrigin(i), c = this.getResolution(i), p = Eu(this.getTileSize(i), this.tmpSize_);
      let y = (e - u[0]) / c / p[0], _ = (u[1] - t) / c / p[1];
      return a ? (y = Gg(y, $g) - 1, _ = Gg(_, $g) - 1) : (y = k0(y, $g), _ = k0(_, $g)), x2(i, y, _, o);
    }
    /**
     * Get a tile coordinate given a map coordinate and zoom level.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {number} z Integer zoom level, e.g. the result of a `getZForResolution()` method call
     * @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
     * @return {import("../tilecoord.js").TileCoord} Tile coordinate.
     * @api
     */
    getTileCoordForCoordAndZ(e, t, i) {
      return this.getTileCoordForXYAndZ_(
        e[0],
        e[1],
        t,
        !1,
        i
      );
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @return {number} Tile resolution.
     */
    getTileCoordResolution(e) {
      return this.resolutions_[e[0]];
    }
    /**
     * Get the tile size for a zoom level. The type of the return value matches the
     * `tileSize` or `tileSizes` that the tile grid was configured with. To always
     * get an {@link import("../size.js").Size}, run the result through {@link module:ol/size.toSize}.
     * @param {number} z Z.
     * @return {number|import("../size.js").Size} Tile size.
     * @api
     */
    getTileSize(e) {
      return this.tileSize_ ? this.tileSize_ : this.tileSizes_[e];
    }
    /**
     * @param {number} z Zoom level.
     * @return {import("../TileRange.js").default|null} Extent tile range for the specified zoom level.
     */
    getFullTileRange(e) {
      return this.fullTileRanges_ ? this.fullTileRanges_[e] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, e) : null;
    }
    /**
     * @param {number} resolution Resolution.
     * @param {number|import("../array.js").NearestDirectionFunction} [opt_direction]
     *     If 0, the nearest resolution will be used.
     *     If 1, the nearest higher resolution (lower Z) will be used. If -1, the
     *     nearest lower resolution (higher Z) will be used. Default is 0.
     *     Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.
     *
     * For example to change tile Z at the midpoint of zoom levels
     * ```js
     * function(value, high, low) {
     *   return value - low * Math.sqrt(high / low);
     * }
     * ```
     * @return {number} Z.
     * @api
     */
    getZForResolution(e, t) {
      const i = Gw(
        this.resolutions_,
        e,
        t || 0
      );
      return da(i, this.minZoom, this.maxZoom);
    }
    /**
     * The tile with the provided tile coordinate intersects the given viewport.
     * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.
     * @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.
     * @return {boolean} The tile with the provided tile coordinate intersects the given viewport.
     */
    tileCoordIntersectsViewport(e, t) {
      return jj(
        t,
        0,
        t.length,
        2,
        this.getTileCoordExtent(e)
      );
    }
    /**
     * @param {!import("../extent.js").Extent} extent Extent for this tile grid.
     * @private
     */
    calculateTileRanges_(e) {
      const t = this.resolutions_.length, i = new Array(t);
      for (let a = this.minZoom; a < t; ++a)
        i[a] = this.getTileRangeForExtentAndZ(e, a);
      this.fullTileRanges_ = i;
    }
  }
  const HU = bae;
  class wae extends HU {
    /**
     * @param {Options} options WMTS options.
     */
    constructor(e) {
      super({
        extent: e.extent,
        origin: e.origin,
        origins: e.origins,
        resolutions: e.resolutions,
        tileSize: e.tileSize,
        tileSizes: e.tileSizes,
        sizes: e.sizes
      }), this.matrixIds_ = e.matrixIds;
    }
    /**
     * @param {number} z Z.
     * @return {string} MatrixId..
     */
    getMatrixId(e) {
      return this.matrixIds_[e];
    }
    /**
     * Get the list of matrix identifiers.
     * @return {Array<string>} MatrixIds.
     * @api
     */
    getMatrixIds() {
      return this.matrixIds_;
    }
  }
  function Cae(n, e, t) {
    const i = [], a = [], o = [], u = [], c = [];
    t = t !== void 0 ? t : [];
    const p = "SupportedCRS", y = "TileMatrix", _ = "Identifier", S = "ScaleDenominator", b = "TopLeftCorner", T = "TileWidth", O = "TileHeight", N = n[p], D = Er(N), k = D.getMetersPerUnit(), $ = D.getAxisOrientation().substr(0, 2) == "ne";
    return n[y].sort(function(B, V) {
      return V[S] - B[S];
    }), n[y].forEach(function(B) {
      let V;
      if (t.length > 0 ? V = t.find(function(z) {
        return B[_] == z[y] ? !0 : B[_].includes(":") ? !1 : n[_] + ":" + B[_] === z[y];
      }) : V = !0, V) {
        a.push(B[_]);
        const z = B[S] * 28e-5 / k, G = B[T], ie = B[O];
        $ ? o.push([
          B[b][1],
          B[b][0]
        ]) : o.push(B[b]), i.push(z), u.push(
          G == ie ? G : [G, ie]
        ), c.push([B.MatrixWidth, B.MatrixHeight]);
      }
    }), new wae({
      extent: e,
      origins: o,
      resolutions: i,
      matrixIds: a,
      tileSizes: u,
      sizes: c
    });
  }
  function WU(n) {
    let e = n.getDefaultTileGrid();
    return e || (e = Oae(n), n.setDefaultTileGrid(e)), e;
  }
  function Tae(n, e, t) {
    const i = e[0], a = n.getTileCoordCenter(e), o = GU(t);
    if (!KE(o, a)) {
      const u = _i(o), c = Math.ceil(
        (o[0] - a[0]) / u
      );
      return a[0] += u * c, n.getTileCoordForCoordAndZ(a, i);
    }
    return e;
  }
  function Rae(n, e, t, i) {
    i = i !== void 0 ? i : "top-left";
    const a = Mae(n, e, t);
    return new HU({
      extent: n,
      origin: kB(n, i),
      resolutions: a,
      tileSize: t
    });
  }
  function Mae(n, e, t, i) {
    e = e !== void 0 ? e : Eee, t = Eu(t !== void 0 ? t : QL);
    const a = Cs(n), o = _i(n);
    i = i > 0 ? i : Math.max(o / t[0], a / t[1]);
    const u = e + 1, c = new Array(u);
    for (let p = 0; p < u; ++p)
      c[p] = i / Math.pow(2, p);
    return c;
  }
  function Oae(n, e, t, i) {
    const a = GU(n);
    return Rae(a, e, t, i);
  }
  function GU(n) {
    n = Er(n);
    let e = n.getExtent();
    if (!e) {
      const t = 180 * Y0.degrees / n.getMetersPerUnit();
      e = wp(-t, -t, t, t);
    }
    return e;
  }
  class Aae extends oN {
    /**
     * @param {Options} options SourceTile source options.
     */
    constructor(e) {
      super({
        attributions: e.attributions,
        attributionsCollapsible: e.attributionsCollapsible,
        projection: e.projection,
        state: e.state,
        wrapX: e.wrapX,
        interpolate: e.interpolate
      }), this.on, this.once, this.un, this.opaque_ = e.opaque !== void 0 ? e.opaque : !1, this.tilePixelRatio_ = e.tilePixelRatio !== void 0 ? e.tilePixelRatio : 1, this.tileGrid = e.tileGrid !== void 0 ? e.tileGrid : null;
      const t = [256, 256];
      this.tileGrid && Eu(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), t), this.tileCache = new AU(e.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = e.key || "", this.tileOptions = {
        transition: e.transition,
        interpolate: e.interpolate
      }, this.zDirection = e.zDirection ? e.zDirection : 0;
    }
    /**
     * @return {boolean} Can expire cache.
     */
    canExpireCache() {
      return this.tileCache.canExpireCache();
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @param {!Object<string, boolean>} usedTiles Used tiles.
     */
    expireCache(e, t) {
      const i = this.getTileCacheForProjection(e);
      i && i.expireCache(t);
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @param {number} z Zoom level.
     * @param {import("../TileRange.js").default} tileRange Tile range.
     * @param {function(import("../Tile.js").default):(boolean|void)} callback Called with each
     *     loaded tile.  If the callback returns `false`, the tile will not be
     *     considered loaded.
     * @return {boolean} The tile range is fully covered with loaded tiles.
     */
    forEachLoadedTile(e, t, i, a) {
      const o = this.getTileCacheForProjection(e);
      if (!o)
        return !1;
      let u = !0, c, p, y;
      for (let _ = i.minX; _ <= i.maxX; ++_)
        for (let S = i.minY; S <= i.maxY; ++S)
          p = tC(t, _, S), y = !1, o.containsKey(p) && (c = /** @type {!import("../Tile.js").default} */
          o.get(p), y = c.getState() === Jt.LOADED, y && (y = a(c) !== !1)), y || (u = !1);
      return u;
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {number} Gutter.
     */
    getGutterForProjection(e) {
      return 0;
    }
    /**
     * Return the key to be used for all tiles in the source.
     * @return {string} The key for all tiles.
     */
    getKey() {
      return this.key_;
    }
    /**
     * Set the value to be used as the key for all tiles in the source.
     * @param {string} key The key for tiles.
     * @protected
     */
    setKey(e) {
      this.key_ !== e && (this.key_ = e, this.changed());
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {boolean} Opaque.
     */
    getOpaque(e) {
      return this.opaque_;
    }
    /**
     * @param {import("../proj/Projection").default} [projection] Projection.
     * @return {Array<number>|null} Resolutions.
     */
    getResolutions(e) {
      const t = e ? this.getTileGridForProjection(e) : this.tileGrid;
      return t ? t.getResolutions() : null;
    }
    /**
     * @abstract
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {!import("../Tile.js").default} Tile.
     */
    getTile(e, t, i, a, o) {
      return yi();
    }
    /**
     * Return the tile grid of the tile source.
     * @return {import("../tilegrid/TileGrid.js").default|null} Tile grid.
     * @api
     */
    getTileGrid() {
      return this.tileGrid;
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
     */
    getTileGridForProjection(e) {
      return this.tileGrid ? this.tileGrid : WU(e);
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../TileCache.js").default} Tile cache.
     * @protected
     */
    getTileCacheForProjection(e) {
      const t = this.getProjection();
      return Ei(
        t === null || Ph(t, e),
        "A VectorTile source can only be rendered if it has a projection compatible with the view projection."
      ), this.tileCache;
    }
    /**
     * Get the tile pixel ratio for this source. Subclasses may override this
     * method, which is meant to return a supported pixel ratio that matches the
     * provided `pixelRatio` as close as possible.
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} Tile pixel ratio.
     */
    getTilePixelRatio(e) {
      return this.tilePixelRatio_;
    }
    /**
     * @param {number} z Z.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../size.js").Size} Tile size.
     */
    getTilePixelSize(e, t, i) {
      const a = this.getTileGridForProjection(i), o = this.getTilePixelRatio(t), u = Eu(a.getTileSize(e), this.tmpSize);
      return o == 1 ? u : QJ(u, o, this.tmpSize);
    }
    /**
     * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate
     * is outside the resolution and extent range of the tile grid, `null` will be
     * returned.
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("../proj/Projection.js").default} [projection] Projection.
     * @return {import("../tilecoord.js").TileCoord} Tile coordinate to be passed to the tileUrlFunction or
     *     null if no tile URL should be created for the passed `tileCoord`.
     */
    getTileCoordForTileUrlFunction(e, t) {
      t = t !== void 0 ? t : this.getProjection();
      const i = this.getTileGridForProjection(t);
      return this.getWrapX() && t.isGlobal() && (e = Tae(i, e, t)), Uie(e, i) ? e : null;
    }
    /**
     * Remove all cached tiles from the source. The next render cycle will fetch new tiles.
     * @api
     */
    clear() {
      this.tileCache.clear();
    }
    refresh() {
      this.clear(), super.refresh();
    }
    /**
     * Increases the cache size if needed
     * @param {number} tileCount Minimum number of tiles needed.
     * @param {import("../proj/Projection.js").default} projection Projection.
     */
    updateCacheSize(e, t) {
      const i = this.getTileCacheForProjection(t);
      e > i.highWaterMark && (i.highWaterMark = e);
    }
    /**
     * Marks a tile coord as being used, without triggering a load.
     * @abstract
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {import("../proj/Projection.js").default} projection Projection.
     */
    useTile(e, t, i, a) {
    }
  }
  class Lae extends Xh {
    /**
     * @param {string} type Type.
     * @param {import("../Tile.js").default} tile The tile.
     */
    constructor(e, t) {
      super(e), this.tile = t;
    }
  }
  const Nae = Aae;
  function Dae(n, e) {
    const t = /\{z\}/g, i = /\{x\}/g, a = /\{y\}/g, o = /\{-y\}/g;
    return (
      /**
       * @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
       * @param {number} pixelRatio Pixel ratio.
       * @param {import("./proj/Projection.js").default} projection Projection.
       * @return {string|undefined} Tile URL.
       */
      function(u, c, p) {
        if (u)
          return n.replace(t, u[0].toString()).replace(i, u[1].toString()).replace(a, u[2].toString()).replace(o, function() {
            const y = u[0], _ = e.getFullTileRange(y);
            if (!_)
              throw new Error(
                "The {-y} placeholder requires a tile grid with extent"
              );
            return (_.getHeight() - u[2] - 1).toString();
          });
      }
    );
  }
  function Iae(n, e) {
    const t = n.length, i = new Array(t);
    for (let a = 0; a < t; ++a)
      i[a] = Dae(n[a], e);
    return $A(i);
  }
  function $A(n) {
    return n.length === 1 ? n[0] : (
      /**
       * @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
       * @param {number} pixelRatio Pixel ratio.
       * @param {import("./proj/Projection.js").default} projection Projection.
       * @return {string|undefined} Tile URL.
       */
      function(e, t, i) {
        if (!e)
          return;
        const a = OU(e), o = kv(a, n.length);
        return n[o](e, t, i);
      }
    );
  }
  function YU(n) {
    const e = [];
    let t = /\{([a-z])-([a-z])\}/.exec(n);
    if (t) {
      const i = t[1].charCodeAt(0), a = t[2].charCodeAt(0);
      let o;
      for (o = i; o <= a; ++o)
        e.push(n.replace(t[0], String.fromCharCode(o)));
      return e;
    }
    if (t = /\{(\d+)-(\d+)\}/.exec(n), t) {
      const i = parseInt(t[2], 10);
      for (let a = parseInt(t[1], 10); a <= i; a++)
        e.push(n.replace(t[0], a.toString()));
      return e;
    }
    return e.push(n), e;
  }
  class hN extends Nae {
    /**
     * @param {Options} options Image tile options.
     */
    constructor(e) {
      super({
        attributions: e.attributions,
        cacheSize: e.cacheSize,
        opaque: e.opaque,
        projection: e.projection,
        state: e.state,
        tileGrid: e.tileGrid,
        tilePixelRatio: e.tilePixelRatio,
        wrapX: e.wrapX,
        transition: e.transition,
        interpolate: e.interpolate,
        key: e.key,
        attributionsCollapsible: e.attributionsCollapsible,
        zDirection: e.zDirection
      }), this.generateTileUrlFunction_ = this.tileUrlFunction === hN.prototype.tileUrlFunction, this.tileLoadFunction = e.tileLoadFunction, e.tileUrlFunction && (this.tileUrlFunction = e.tileUrlFunction), this.urls = null, e.urls ? this.setUrls(e.urls) : e.url && this.setUrl(e.url), this.tileLoadingKeys_ = {};
    }
    /**
     * Return the tile load function of the source.
     * @return {import("../Tile.js").LoadFunction} TileLoadFunction
     * @api
     */
    getTileLoadFunction() {
      return this.tileLoadFunction;
    }
    /**
     * Return the tile URL function of the source.
     * @return {import("../Tile.js").UrlFunction} TileUrlFunction
     * @api
     */
    getTileUrlFunction() {
      return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction ? this.tileUrlFunction.bind(this) : this.tileUrlFunction;
    }
    /**
     * Return the URLs used for this source.
     * When a tileUrlFunction is used instead of url or urls,
     * null will be returned.
     * @return {!Array<string>|null} URLs.
     * @api
     */
    getUrls() {
      return this.urls;
    }
    /**
     * Handle tile change events.
     * @param {import("../events/Event.js").default} event Event.
     * @protected
     */
    handleTileChange(e) {
      const t = (
        /** @type {import("../Tile.js").default} */
        e.target
      ), i = Pi(t), a = t.getState();
      let o;
      a == Jt.LOADING ? (this.tileLoadingKeys_[i] = !0, o = $O.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], o = a == Jt.ERROR ? $O.TILELOADERROR : a == Jt.LOADED ? $O.TILELOADEND : void 0), o != null && this.dispatchEvent(new Lae(o, t));
    }
    /**
     * Set the tile load function of the source.
     * @param {import("../Tile.js").LoadFunction} tileLoadFunction Tile load function.
     * @api
     */
    setTileLoadFunction(e) {
      this.tileCache.clear(), this.tileLoadFunction = e, this.changed();
    }
    /**
     * Set the tile URL function of the source.
     * @param {import("../Tile.js").UrlFunction} tileUrlFunction Tile URL function.
     * @param {string} [key] Optional new tile key for the source.
     * @api
     */
    setTileUrlFunction(e, t) {
      this.tileUrlFunction = e, this.tileCache.pruneExceptNewestZ(), typeof t < "u" ? this.setKey(t) : this.changed();
    }
    /**
     * Set the URL to use for requests.
     * @param {string} url URL.
     * @api
     */
    setUrl(e) {
      const t = YU(e);
      this.urls = t, this.setUrls(t);
    }
    /**
     * Set the URLs to use for requests.
     * @param {Array<string>} urls URLs.
     * @api
     */
    setUrls(e) {
      this.urls = e;
      const t = e.join(`
`);
      this.generateTileUrlFunction_ ? this.setTileUrlFunction(Iae(e, this.tileGrid), t) : this.setKey(t);
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {string|undefined} Tile URL.
     */
    tileUrlFunction(e, t, i) {
    }
    /**
     * Marks a tile coord as being used, without triggering a load.
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     */
    useTile(e, t, i) {
      const a = tC(e, t, i);
      this.tileCache.containsKey(a) && this.tileCache.get(a);
    }
  }
  const Pae = hN;
  class kae extends Pae {
    /**
     * @param {!Options} options Image tile options.
     */
    constructor(e) {
      super({
        attributions: e.attributions,
        cacheSize: e.cacheSize,
        opaque: e.opaque,
        projection: e.projection,
        state: e.state,
        tileGrid: e.tileGrid,
        tileLoadFunction: e.tileLoadFunction ? e.tileLoadFunction : Fae,
        tilePixelRatio: e.tilePixelRatio,
        tileUrlFunction: e.tileUrlFunction,
        url: e.url,
        urls: e.urls,
        wrapX: e.wrapX,
        transition: e.transition,
        interpolate: e.interpolate !== void 0 ? e.interpolate : !0,
        key: e.key,
        attributionsCollapsible: e.attributionsCollapsible,
        zDirection: e.zDirection
      }), this.crossOrigin = e.crossOrigin !== void 0 ? e.crossOrigin : null, this.tileClass = e.tileClass !== void 0 ? e.tileClass : _U, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = e.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1;
    }
    /**
     * @return {boolean} Can expire cache.
     */
    canExpireCache() {
      if (this.tileCache.canExpireCache())
        return !0;
      for (const e in this.tileCacheForProjection)
        if (this.tileCacheForProjection[e].canExpireCache())
          return !0;
      return !1;
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @param {!Object<string, boolean>} usedTiles Used tiles.
     */
    expireCache(e, t) {
      const i = this.getTileCacheForProjection(e);
      this.tileCache.expireCache(
        this.tileCache == i ? t : {}
      );
      for (const a in this.tileCacheForProjection) {
        const o = this.tileCacheForProjection[a];
        o.expireCache(o == i ? t : {});
      }
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {number} Gutter.
     */
    getGutterForProjection(e) {
      return this.getProjection() && e && !Ph(this.getProjection(), e) ? 0 : this.getGutter();
    }
    /**
     * @return {number} Gutter.
     */
    getGutter() {
      return 0;
    }
    /**
     * Return the key to be used for all tiles in the source.
     * @return {string} The key for all tiles.
     */
    getKey() {
      let e = super.getKey();
      return this.getInterpolate() || (e += ":disable-interpolation"), e;
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {boolean} Opaque.
     */
    getOpaque(e) {
      return this.getProjection() && e && !Ph(this.getProjection(), e) ? !1 : super.getOpaque(e);
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
     */
    getTileGridForProjection(e) {
      const t = this.getProjection();
      if (this.tileGrid && (!t || Ph(t, e)))
        return this.tileGrid;
      const i = Pi(e);
      return i in this.tileGridForProjection || (this.tileGridForProjection[i] = WU(e)), this.tileGridForProjection[i];
    }
    /**
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {import("../TileCache.js").default} Tile cache.
     */
    getTileCacheForProjection(e) {
      const t = this.getProjection();
      if (!t || Ph(t, e))
        return this.tileCache;
      const i = Pi(e);
      return i in this.tileCacheForProjection || (this.tileCacheForProjection[i] = new AU(
        this.tileCache.highWaterMark
      )), this.tileCacheForProjection[i];
    }
    /**
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @param {string} key The key set on the tile.
     * @return {!ImageTile} Tile.
     * @private
     */
    createTile_(e, t, i, a, o, u) {
      const c = [e, t, i], p = this.getTileCoordForTileUrlFunction(
        c,
        o
      ), y = p ? this.tileUrlFunction(p, a, o) : void 0, _ = new this.tileClass(
        c,
        y !== void 0 ? Jt.IDLE : Jt.EMPTY,
        y !== void 0 ? y : "",
        this.crossOrigin,
        this.tileLoadFunction,
        this.tileOptions
      );
      return _.key = u, _.addEventListener(Cn.CHANGE, this.handleTileChange.bind(this)), _;
    }
    /**
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @return {!(ImageTile|ReprojTile)} Tile.
     */
    getTile(e, t, i, a, o) {
      const u = this.getProjection();
      if (!u || !o || Ph(u, o))
        return this.getTileInternal(
          e,
          t,
          i,
          a,
          u || o
        );
      const c = this.getTileCacheForProjection(o), p = [e, t, i];
      let y;
      const _ = MU(p);
      c.containsKey(_) && (y = c.get(_));
      const S = this.getKey();
      if (y && y.key == S)
        return y;
      const b = this.getTileGridForProjection(u), T = this.getTileGridForProjection(o), O = this.getTileCoordForTileUrlFunction(
        p,
        o
      ), N = new jA(
        u,
        b,
        o,
        T,
        p,
        O,
        this.getTilePixelRatio(a),
        this.getGutter(),
        (D, k, $, B) => this.getTileInternal(D, k, $, B, u),
        this.reprojectionErrorThreshold_,
        this.renderReprojectionEdges_,
        this.tileOptions
      );
      return N.key = S, y ? (N.interimTile = y, N.refreshInterimChain(), c.replace(_, N)) : c.set(_, N), N;
    }
    /**
     * @param {number} z Tile coordinate z.
     * @param {number} x Tile coordinate x.
     * @param {number} y Tile coordinate y.
     * @param {number} pixelRatio Pixel ratio.
     * @param {!import("../proj/Projection.js").default} projection Projection.
     * @return {!ImageTile} Tile.
     * @protected
     */
    getTileInternal(e, t, i, a, o) {
      let u = null;
      const c = tC(e, t, i), p = this.getKey();
      if (!this.tileCache.containsKey(c))
        u = this.createTile_(e, t, i, a, o, p), this.tileCache.set(c, u);
      else if (u = this.tileCache.get(c), u.key != p) {
        const y = u;
        u = this.createTile_(e, t, i, a, o, p), y.getState() == Jt.IDLE ? u.interimTile = y.interimTile : u.interimTile = y, u.refreshInterimChain(), this.tileCache.replace(c, u);
      }
      return u;
    }
    /**
     * Sets whether to render reprojection edges or not (usually for debugging).
     * @param {boolean} render Render the edges.
     * @api
     */
    setRenderReprojectionEdges(e) {
      if (this.renderReprojectionEdges_ != e) {
        this.renderReprojectionEdges_ = e;
        for (const t in this.tileCacheForProjection)
          this.tileCacheForProjection[t].clear();
        this.changed();
      }
    }
    /**
     * Sets the tile grid to use when reprojecting the tiles to the given
     * projection instead of the default tile grid for the projection.
     *
     * This can be useful when the default tile grid cannot be created
     * (e.g. projection has no extent defined) or
     * for optimization reasons (custom tile size, resolutions, ...).
     *
     * @param {import("../proj.js").ProjectionLike} projection Projection.
     * @param {import("../tilegrid/TileGrid.js").default} tilegrid Tile grid to use for the projection.
     * @api
     */
    setTileGridForProjection(e, t) {
      const i = Er(e);
      if (i) {
        const a = Pi(i);
        a in this.tileGridForProjection || (this.tileGridForProjection[a] = t);
      }
    }
    clear() {
      super.clear();
      for (const e in this.tileCacheForProjection)
        this.tileCacheForProjection[e].clear();
    }
  }
  function Fae(n, e) {
    n.getImage().src = e;
  }
  const qU = kae;
  class jae extends qU {
    /**
     * @param {Options} [options] Tile WMS options.
     */
    constructor(e) {
      e = e || /** @type {Options} */
      {};
      const t = Object.assign({}, e.params), i = "TRANSPARENT" in t ? t.TRANSPARENT : !0;
      super({
        attributions: e.attributions,
        attributionsCollapsible: e.attributionsCollapsible,
        cacheSize: e.cacheSize,
        crossOrigin: e.crossOrigin,
        interpolate: e.interpolate,
        opaque: !i,
        projection: e.projection,
        reprojectionErrorThreshold: e.reprojectionErrorThreshold,
        tileClass: e.tileClass,
        tileGrid: e.tileGrid,
        tileLoadFunction: e.tileLoadFunction,
        url: e.url,
        urls: e.urls,
        wrapX: e.wrapX !== void 0 ? e.wrapX : !0,
        transition: e.transition,
        zDirection: e.zDirection
      }), this.gutter_ = e.gutter !== void 0 ? e.gutter : 0, this.params_ = t, this.v13_ = !0, this.serverType_ = e.serverType, this.hidpi_ = e.hidpi !== void 0 ? e.hidpi : !0, this.tmpExtent_ = Su(), this.updateV13_(), this.setKey(this.getKeyForParams_());
    }
    /**
     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
     * projection. Return `undefined` if the GetFeatureInfo URL cannot be
     * constructed.
     * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
     * @param {number} resolution Resolution.
     * @param {import("../proj.js").ProjectionLike} projection Projection.
     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
     *     in the `LAYERS` parameter will be used. `VERSION` should not be
     *     specified here.
     * @return {string|undefined} GetFeatureInfo URL.
     * @api
     */
    getFeatureInfoUrl(e, t, i, a) {
      const o = Er(i), u = this.getProjection() || o;
      let c = this.getTileGrid();
      c || (c = this.getTileGridForProjection(u));
      const p = ZA(
        e,
        o,
        u
      ), y = GE(
        u,
        o,
        e,
        t
      ), _ = c.getZForResolution(y, this.zDirection), S = c.getResolution(_), b = c.getTileCoordForCoordAndZ(p, _);
      if (c.getResolutions().length <= b[0])
        return;
      let T = c.getTileCoordExtent(b, this.tmpExtent_);
      const O = this.gutter_;
      O !== 0 && (T = TE(T, S * O, T));
      const N = {
        QUERY_LAYERS: this.params_.LAYERS
      };
      Object.assign(
        N,
        ww(this.params_, "GetFeatureInfo"),
        a
      );
      const D = Math.floor((p[0] - T[0]) / S), k = Math.floor((T[3] - p[1]) / S);
      return N[this.v13_ ? "I" : "X"] = D, N[this.v13_ ? "J" : "Y"] = k, this.getRequestUrl_(
        b,
        T,
        1,
        u || o,
        N
      );
    }
    /**
     * Return the GetLegendGraphic URL, optionally optimized for the passed
     * resolution and possibly including any passed specific parameters. Returns
     * `undefined` if the GetLegendGraphic URL cannot be constructed.
     *
     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`
     *     will not be calculated and included in URL.
     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the
     *     request is generated for this wms layer, else it will try to use the
     *     configured wms layer. Default `FORMAT` is `image/png`.
     *     `VERSION` should not be specified here.
     * @return {string|undefined} GetLegendGraphic URL.
     * @api
     */
    getLegendUrl(e, t) {
      if (this.urls[0] === void 0)
        return;
      const i = {
        SERVICE: "WMS",
        VERSION: bw,
        REQUEST: "GetLegendGraphic",
        FORMAT: "image/png"
      };
      if (t === void 0 || t.LAYER === void 0) {
        const a = this.params_.LAYERS;
        if (!(!Array.isArray(a) || a.length === 1))
          return;
        i.LAYER = a;
      }
      if (e !== void 0) {
        const a = this.getProjection() ? this.getProjection().getMetersPerUnit() : 1, o = 28e-5;
        i.SCALE = e * a / o;
      }
      return Object.assign(i, t), YE(
        /** @type {string} */
        this.urls[0],
        i
      );
    }
    /**
     * @return {number} Gutter.
     */
    getGutter() {
      return this.gutter_;
    }
    /**
     * Get the user-provided params, i.e. those passed to the constructor through
     * the "params" option, and possibly updated using the updateParams method.
     * @return {Object} Params.
     * @api
     */
    getParams() {
      return this.params_;
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
     * @param {import("../extent.js").Extent} tileExtent Tile extent.
     * @param {number} pixelRatio Pixel ratio.
     * @param {import("../proj/Projection.js").default} projection Projection.
     * @param {Object} params Params.
     * @return {string|undefined} Request URL.
     * @private
     */
    getRequestUrl_(e, t, i, a, o) {
      const u = this.urls;
      if (!u)
        return;
      let c;
      if (u.length == 1)
        c = u[0];
      else {
        const p = kv(OU(e), u.length);
        c = u[p];
      }
      return BU(
        t,
        (this.tileGrid || this.getTileGridForProjection(a)).getResolution(e[0]),
        i,
        a,
        c,
        o,
        this.serverType_
      );
    }
    /**
     * Get the tile pixel ratio for this source.
     * @param {number} pixelRatio Pixel ratio.
     * @return {number} Tile pixel ratio.
     */
    getTilePixelRatio(e) {
      return !this.hidpi_ || this.serverType_ === void 0 ? 1 : e;
    }
    /**
     * @private
     * @return {string} The key for the current params.
     */
    getKeyForParams_() {
      let e = 0;
      const t = [];
      for (const i in this.params_)
        t[e++] = i + "-" + this.params_[i];
      return t.join("/");
    }
    /**
     * Update the user-provided params.
     * @param {Object} params Params.
     * @api
     */
    updateParams(e) {
      Object.assign(this.params_, e), this.updateV13_(), this.setKey(this.getKeyForParams_());
    }
    /**
     * @private
     */
    updateV13_() {
      const e = this.params_.VERSION || bw;
      this.v13_ = GA(e, "1.3") >= 0;
    }
    /**
     * @param {import("../tilecoord.js").TileCoord} tileCoord The tile coordinate
     * @param {number} pixelRatio The pixel ratio
     * @param {import("../proj/Projection.js").default} projection The projection
     * @return {string|undefined} The tile URL
     * @override
     */
    tileUrlFunction(e, t, i) {
      let a = this.getTileGrid();
      if (a || (a = this.getTileGridForProjection(i)), a.getResolutions().length <= e[0])
        return;
      t != 1 && (!this.hidpi_ || this.serverType_ === void 0) && (t = 1);
      const o = a.getResolution(e[0]);
      let u = a.getTileCoordExtent(e, this.tmpExtent_);
      const c = this.gutter_;
      c !== 0 && (u = TE(u, o * c, u));
      const p = Object.assign(
        {},
        ww(this.params_, "GetMap")
      );
      return this.getRequestUrl_(
        e,
        u,
        t,
        i,
        p
      );
    }
  }
  const dN = jae;
  class Uae extends qU {
    /**
     * @param {Options} options WMTS options.
     */
    constructor(e) {
      const t = e.requestEncoding !== void 0 ? e.requestEncoding : "KVP", i = e.tileGrid;
      let a = e.urls;
      a === void 0 && e.url !== void 0 && (a = YU(e.url)), super({
        attributions: e.attributions,
        attributionsCollapsible: e.attributionsCollapsible,
        cacheSize: e.cacheSize,
        crossOrigin: e.crossOrigin,
        interpolate: e.interpolate,
        projection: e.projection,
        reprojectionErrorThreshold: e.reprojectionErrorThreshold,
        tileClass: e.tileClass,
        tileGrid: i,
        tileLoadFunction: e.tileLoadFunction,
        tilePixelRatio: e.tilePixelRatio,
        urls: a,
        wrapX: e.wrapX !== void 0 ? e.wrapX : !1,
        transition: e.transition,
        zDirection: e.zDirection
      }), this.version_ = e.version !== void 0 ? e.version : "1.0.0", this.format_ = e.format !== void 0 ? e.format : "image/jpeg", this.dimensions_ = e.dimensions !== void 0 ? e.dimensions : {}, this.layer_ = e.layer, this.matrixSet_ = e.matrixSet, this.style_ = e.style, this.requestEncoding_ = t, this.setKey(this.getKeyForDimensions_()), a && a.length > 0 && (this.tileUrlFunction = $A(
        a.map(this.createFromWMTSTemplate.bind(this))
      ));
    }
    /**
     * Set the URLs to use for requests.
     * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
     * @param {Array<string>} urls URLs.
     */
    setUrls(e) {
      this.urls = e;
      const t = e.join(`
`);
      this.setTileUrlFunction(
        $A(
          e.map(this.createFromWMTSTemplate.bind(this))
        ),
        t
      );
    }
    /**
     * Get the dimensions, i.e. those passed to the constructor through the
     * "dimensions" option, and possibly updated using the updateDimensions
     * method.
     * @return {!Object} Dimensions.
     * @api
     */
    getDimensions() {
      return this.dimensions_;
    }
    /**
     * Return the image format of the WMTS source.
     * @return {string} Format.
     * @api
     */
    getFormat() {
      return this.format_;
    }
    /**
     * Return the layer of the WMTS source.
     * @return {string} Layer.
     * @api
     */
    getLayer() {
      return this.layer_;
    }
    /**
     * Return the matrix set of the WMTS source.
     * @return {string} MatrixSet.
     * @api
     */
    getMatrixSet() {
      return this.matrixSet_;
    }
    /**
     * Return the request encoding, either "KVP" or "REST".
     * @return {RequestEncoding} Request encoding.
     * @api
     */
    getRequestEncoding() {
      return this.requestEncoding_;
    }
    /**
     * Return the style of the WMTS source.
     * @return {string} Style.
     * @api
     */
    getStyle() {
      return this.style_;
    }
    /**
     * Return the version of the WMTS source.
     * @return {string} Version.
     * @api
     */
    getVersion() {
      return this.version_;
    }
    /**
     * @private
     * @return {string} The key for the current dimensions.
     */
    getKeyForDimensions_() {
      const e = this.urls ? this.urls.slice(0) : [];
      for (const t in this.dimensions_)
        e.push(t + "-" + this.dimensions_[t]);
      return e.join("/");
    }
    /**
     * Update the dimensions.
     * @param {Object} dimensions Dimensions.
     * @api
     */
    updateDimensions(e) {
      Object.assign(this.dimensions_, e), this.setKey(this.getKeyForDimensions_());
    }
    /**
     * @param {string} template Template.
     * @return {import("../Tile.js").UrlFunction} Tile URL function.
     */
    createFromWMTSTemplate(e) {
      const t = this.requestEncoding_, i = {
        layer: this.layer_,
        style: this.style_,
        tilematrixset: this.matrixSet_
      };
      t == "KVP" && Object.assign(i, {
        Service: "WMTS",
        Request: "GetTile",
        Version: this.version_,
        Format: this.format_
      }), e = t == "KVP" ? YE(e, i) : e.replace(/\{(\w+?)\}/g, function(u, c) {
        return c.toLowerCase() in i ? i[c.toLowerCase()] : u;
      });
      const a = (
        /** @type {import("../tilegrid/WMTS.js").default} */
        this.tileGrid
      ), o = this.dimensions_;
      return (
        /**
         * @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
         * @param {number} pixelRatio Pixel ratio.
         * @param {import("../proj/Projection.js").default} projection Projection.
         * @return {string|undefined} Tile URL.
         */
        function(u, c, p) {
          if (!u)
            return;
          const y = {
            TileMatrix: a.getMatrixId(u[0]),
            TileCol: u[1],
            TileRow: u[2]
          };
          Object.assign(y, o);
          let _ = e;
          return t == "KVP" ? _ = YE(_, y) : _ = _.replace(/\{(\w+?)\}/g, function(S, b) {
            return y[b];
          }), _;
        }
      );
    }
  }
  const zae = Uae;
  function $ae(n, e) {
    const i = n.Contents.Layer.find(function(Ee) {
      return Ee.Identifier == e.layer;
    });
    if (!i)
      return null;
    const a = n.Contents.TileMatrixSet;
    let o;
    i.TileMatrixSetLink.length > 1 ? "projection" in e ? o = i.TileMatrixSetLink.findIndex(function(Ee) {
      const Ne = a.find(function(le) {
        return le.Identifier == Ee.TileMatrixSet;
      }).SupportedCRS, Q = Er(Ne), ae = Er(e.projection);
      return Q && ae ? Ph(Q, ae) : Ne == e.projection;
    }) : o = i.TileMatrixSetLink.findIndex(function(Ee) {
      return Ee.TileMatrixSet == e.matrixSet;
    }) : o = 0, o < 0 && (o = 0);
    const u = (
      /** @type {string} */
      i.TileMatrixSetLink[o].TileMatrixSet
    ), c = (
      /** @type {Array<Object>} */
      i.TileMatrixSetLink[o].TileMatrixSetLimits
    );
    let p = (
      /** @type {string} */
      i.Format[0]
    );
    "format" in e && (p = e.format), o = i.Style.findIndex(function(Ee) {
      return "style" in e ? Ee.Title == e.style : Ee.isDefault;
    }), o < 0 && (o = 0);
    const y = (
      /** @type {string} */
      i.Style[o].Identifier
    ), _ = {};
    "Dimension" in i && i.Dimension.forEach(function(Ee, Fe, Ne) {
      const Q = Ee.Identifier;
      let ae = Ee.Default;
      ae === void 0 && (ae = Ee.Value[0]), _[Q] = ae;
    });
    const b = n.Contents.TileMatrixSet.find(function(Ee) {
      return Ee.Identifier == u;
    });
    let T;
    const O = b.SupportedCRS;
    if (O && (T = Er(O)), "projection" in e) {
      const Ee = Er(e.projection);
      Ee && (!T || Ph(Ee, T)) && (T = Ee);
    }
    let N = !1;
    const D = T.getAxisOrientation().substr(0, 2) == "ne";
    let k = b.TileMatrix[0], $ = {
      MinTileCol: 0,
      MinTileRow: 0,
      // subtract one to end up at tile top left
      MaxTileCol: k.MatrixWidth - 1,
      MaxTileRow: k.MatrixHeight - 1
    };
    if (c) {
      $ = c[c.length - 1];
      const Ee = b.TileMatrix.find(
        (Fe) => Fe.Identifier === $.TileMatrix || b.Identifier + ":" + Fe.Identifier === $.TileMatrix
      );
      Ee && (k = Ee);
    }
    const B = k.ScaleDenominator * 28e-5 / T.getMetersPerUnit(), V = D ? [k.TopLeftCorner[1], k.TopLeftCorner[0]] : k.TopLeftCorner, z = k.TileWidth * B, G = k.TileHeight * B;
    let ie = b.BoundingBox;
    ie && D && (ie = [
      ie[1],
      ie[0],
      ie[3],
      ie[2]
    ]);
    let ue = [
      V[0] + z * $.MinTileCol,
      // add one to get proper bottom/right coordinate
      V[1] - G * (1 + $.MaxTileRow),
      V[0] + z * (1 + $.MaxTileCol),
      V[1] - G * $.MinTileRow
    ];
    if (ie !== void 0 && !xf(ie, ue)) {
      const Ee = i.WGS84BoundingBox, Fe = Er("EPSG:4326").getExtent();
      if (ue = ie, Ee)
        N = Ee[0] === Fe[0] && Ee[2] === Fe[2];
      else {
        const Ne = ZB(
          ie,
          b.SupportedCRS,
          "EPSG:4326"
        );
        N = Ne[0] - 1e-10 <= Fe[0] && Ne[2] + 1e-10 >= Fe[2];
      }
    }
    const Re = Cae(
      b,
      ue,
      c
    ), Oe = [];
    let $e = e.requestEncoding;
    if ($e = $e !== void 0 ? $e : "", "OperationsMetadata" in n && "GetTile" in n.OperationsMetadata) {
      const Ee = n.OperationsMetadata.GetTile.DCP.HTTP.Get;
      for (let Fe = 0, Ne = Ee.length; Fe < Ne; ++Fe)
        if (Ee[Fe].Constraint) {
          const ae = Ee[Fe].Constraint.find(function(le) {
            return le.name == "GetEncoding";
          }).AllowedValues.Value;
          if ($e === "" && ($e = ae[0]), $e === "KVP")
            ae.includes("KVP") && Oe.push(
              /** @type {string} */
              Ee[Fe].href
            );
          else
            break;
        } else
          Ee[Fe].href && ($e = "KVP", Oe.push(
            /** @type {string} */
            Ee[Fe].href
          ));
    }
    return Oe.length === 0 && ($e = "REST", i.ResourceURL.forEach(function(Ee) {
      Ee.resourceType === "tile" && (p = Ee.format, Oe.push(
        /** @type {string} */
        Ee.template
      ));
    })), {
      urls: Oe,
      layer: e.layer,
      matrixSet: u,
      format: p,
      projection: T,
      requestEncoding: $e,
      tileGrid: Re,
      style: y,
      dimensions: _,
      wrapX: N,
      crossOrigin: e.crossOrigin
    };
  }
  const XU = qh({
    name: "map",
    initialState: {
      map: null,
      topicLayers: null,
      baseLayer: null
    },
    reducers: {
      initMap: (n, e) => {
        n.map = e.payload.map, n.topicLayers = e.payload.topicLayers, n.baseLayer = e.payload.baseLayer;
      }
    }
  }), { initMap: Bae } = XU.actions, Vae = XU.reducer, KU = qh({
    name: "mapQuery",
    initialState: {
      loading: !1,
      visible: !1,
      posX: 0,
      posY: 0,
      results: []
    },
    reducers: {
      loadAt: (n, e) => {
        n.loading || (n.loading = !0, n.visible = !1, n.posX = e.payload.posX, n.posY = e.payload.posY, n.results = []);
      },
      show: (n, e) => {
        n.loading = !1, n.visible = !0, n.results = e.payload.results;
      },
      hide: (n) => {
        n.loading = !1, n.visible = !1;
      }
    }
  }), { loadAt: ZU, show: QU, hide: Uv } = KU.actions, Hae = KU.reducer;
  let Ab;
  const Wae = new Uint8Array(16);
  function Gae() {
    if (!Ab && (Ab = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ab))
      throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
    return Ab(Wae);
  }
  const Ks = [];
  for (let n = 0; n < 256; ++n)
    Ks.push((n + 256).toString(16).slice(1));
  function Yae(n, e = 0) {
    return Ks[n[e + 0]] + Ks[n[e + 1]] + Ks[n[e + 2]] + Ks[n[e + 3]] + "-" + Ks[n[e + 4]] + Ks[n[e + 5]] + "-" + Ks[n[e + 6]] + Ks[n[e + 7]] + "-" + Ks[n[e + 8]] + Ks[n[e + 9]] + "-" + Ks[n[e + 10]] + Ks[n[e + 11]] + Ks[n[e + 12]] + Ks[n[e + 13]] + Ks[n[e + 14]] + Ks[n[e + 15]];
  }
  const qae = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), T2 = {
    randomUUID: qae
  };
  function R2(n, e, t) {
    if (T2.randomUUID && !e && !n)
      return T2.randomUUID();
    n = n || {};
    const i = n.random || (n.rng || Gae)();
    if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, e) {
      t = t || 0;
      for (let a = 0; a < 16; ++a)
        e[t + a] = i[a];
      return e;
    }
    return Yae(i);
  }
  const nC = 1e4, JU = qh({
    name: "message",
    initialState: {
      messages: []
    },
    reducers: {
      warning: (n, e) => {
        n.messages.push({
          id: R2(),
          type: "warning",
          text: e.payload,
          timestamp: Date.now()
        });
      },
      error: (n, e) => {
        n.messages.push({
          id: R2(),
          type: "error",
          text: e.payload,
          timestamp: Date.now()
        });
      },
      cleanMessages: (n) => {
        for (let e = n.messages.length; e > 0; e--)
          Date.now() - n.messages[e - 1].timestamp >= nC && n.messages.splice(e - 1, 1);
      }
    }
  }), { cleanMessages: ez, error: Xae, warning: Kae } = JU.actions, Zae = function(n) {
    return function(e) {
      e(Kae(n)), setTimeout(() => {
        e(ez());
      }, nC);
    };
  }, Qae = function(n) {
    return function(e) {
      e(Xae(n)), setTimeout(() => {
        e(ez());
      }, nC);
    };
  }, Jae = JU.reducer, tz = function(n, e) {
    const t = new URL(n + "getegrid/json/");
    return t.searchParams.append("EN", "" + e[0] + "," + e[1]), t.searchParams.append("_dc", (/* @__PURE__ */ new Date()).getTime()), new Promise((i, a) => {
      fetch(t.toString()).then((o) => {
        o.status === 204 || o.status >= 400 ? a(o) : i(o.json());
      });
    });
  }, nz = function(n) {
    const e = zt((i) => i.availability).visible;
    return n.availabilityLayer.setVisible(e), null;
  };
  nz.propTypes = {
    availabilityLayer: wa.object.isRequired
  };
  const iz = function(n) {
    const e = Fl(), t = zt((N) => N.config).config, i = zt((N) => N.mapQuery), a = Kt.useRef(null), o = zt((N) => N.language), u = o.current, c = o.default, [p, y] = Kt.useState(null), _ = t.service_url, S = n.map;
    Kt.useEffect(() => {
      if (p === null) {
        const N = new Pie({
          element: a.current,
          autoPan: {
            animation: !0,
            margin: Math.min(document.body.offsetWidth, document.body.offsetHeight) / 2
          },
          offset: [-17, -17]
        });
        S.addOverlay(N), y(N);
      }
    });
    const b = function() {
      e(Uv());
    }, T = function(N, D, k) {
      e(Uv()), e(Vv([])), e(d_({
        egrid: N,
        identdn: D,
        number: k,
        zoom: !1
      })), m_(_, N, D, k, t.extract_json_timeout, u).then(($) => {
        e(p_($)), e(g_($));
      }).catch(() => {
        e(Zv());
      });
    }, O = i.results.map((N, D) => {
      const k = N.egrid, $ = N.identDN, B = N.number, V = pa(N.type.Text, u, c);
      return /* @__PURE__ */ K.jsx(
        "button",
        {
          onClick: T.bind(this, k, $, B),
          type: "button",
          className: "list-group-item list-group-item-action",
          children: /* @__PURE__ */ K.jsxs("small", { children: [
            V,
            " ",
            B
          ] })
        },
        D
      );
    });
    return i.loading ? (p.setPosition([i.posX, i.posY]), /* @__PURE__ */ K.jsx("div", { className: "oereb-client-overlay", ref: a, children: /* @__PURE__ */ K.jsx("div", { className: "loader", children: /* @__PURE__ */ K.jsx("div", { className: "spinner-grow" }) }) })) : i.visible ? (p.setPosition([i.posX, i.posY]), /* @__PURE__ */ K.jsx("div", { className: "oereb-client-overlay", ref: a, children: /* @__PURE__ */ K.jsxs("div", { className: "results", children: [
      /* @__PURE__ */ K.jsx("div", { className: "background-icon" }),
      /* @__PURE__ */ K.jsxs("div", { className: "content list-group", children: [
        /* @__PURE__ */ K.jsx(
          "button",
          {
            onClick: b,
            type: "button",
            className: "list-group-item list-group-item-action text-end",
            children: /* @__PURE__ */ K.jsx("strong", { className: "bi bi-x" })
          }
        ),
        O
      ] }),
      /* @__PURE__ */ K.jsx("div", { className: "icon", children: /* @__PURE__ */ K.jsx("div", { className: "icon-outer", children: /* @__PURE__ */ K.jsx("div", { className: "icon-inner" }) }) })
    ] }) })) : /* @__PURE__ */ K.jsx("div", { className: "oereb-client-overlay", ref: a });
  };
  iz.propTypes = {
    /** The OpenLayers map instance. */
    map: wa.object.isRequired
  };
  const rz = function(n) {
    const e = zt((u) => u.extract).data, t = zt((u) => u.extract).highlight, i = zt((u) => u.extract).zoom, a = n.realEstateLayer, o = n.map;
    if (a.getSource().clear(), a.setVisible(t), Reflect.apply(Object.prototype.hasOwnProperty, e, ["GetExtractByIdResponse"])) {
      const u = e.GetExtractByIdResponse.extract.RealEstate.Limit, c = new xne(u.coordinates);
      if (a.getSource().addFeature(new EJ(c)), i) {
        let p = [10, 10, 10, 500];
        document.body.offsetWidth < 1200 && (p = [190, 10, 10, 10]), o.getView().fit(c, {
          padding: p
        });
      }
    }
    return null;
  };
  rz.propTypes = {
    map: wa.object.isRequired,
    realEstateLayer: wa.object.isRequired
  };
  const ese = function(n, e, t) {
    const i = pa(
      n.ReferenceWMS,
      e,
      t
    ).split("?"), o = {
      url: i[0],
      params: {},
      opacity: n.layerOpacity,
      zIndex: 21e3 + n.layerIndex
    }, u = i[1].split("&");
    for (let c = 0; c < u.length; c++) {
      const p = [
        "SERVICE",
        "VERSION",
        "REQUEST",
        "FORMAT",
        "CRS",
        "SRS",
        "LAYERS",
        "STYLES",
        "BBOX",
        "WIDTH",
        "HEIGHT",
        "TRANSPARENT"
      ], y = u[c].split("="), _ = y[0], S = y[1];
      p.indexOf(_.toUpperCase()) > -1 ? o.params[_.toUpperCase()] = decodeURIComponent(S) : o.params[_] = S;
    }
    return o;
  }, az = function(n) {
    const e = n.topicLayers, t = n.tiled, i = zt((y) => y.accordion).viewServices, a = zt((y) => y.accordion).callback, o = zt((y) => y.extract).visible, u = zt((y) => y.language), c = u.current, p = u.default;
    if (e.setVisible(!1), e.getLayers().clear(), o && qt.isArray(i) && i.length > 0) {
      const y = i.map((_) => {
        const S = ese(_, c, p);
        let b = kU, T = VU;
        t && (b = UA, T = dN);
        const O = qt.isNumber(S.opacity) ? S.opacity : 1, N = qt.isNumber(S.zIndex) ? S.zIndex : 1, D = new T({
          url: S.url,
          params: S.params,
          projection: "EPSG:2056"
        });
        return qt.isFunction(a) && (D.on("imageloadstart", () => {
          a(!0);
        }), D.on("imageloadend", () => {
          a(!1);
        }), D.on("imageloaderror", () => {
          a(!1);
        })), new b({
          preload: 1 / 0,
          visible: !0,
          opacity: O,
          zIndex: N,
          source: D
        });
      });
      e.getLayers().extend(y), e.setVisible(!0);
    }
    return null;
  };
  az.propTypes = {
    topicLayers: wa.object.isRequired,
    tiled: wa.bool.isRequired
  };
  class BO extends Error {
    constructor(e) {
      super(e), this.name = "NoDataError";
    }
  }
  const tse = function(n) {
    const e = {
      url: n.url,
      params: n.params,
      projection: "EPSG:2056"
    };
    return (qt.isString(n.attributions) || qt.isArray(n.attributions)) && (e.attributions = n.attributions), Promise.resolve(new dN(e));
  }, nse = function(n) {
    const e = new Zre();
    return new Promise(function(t, i) {
      fetch(n.url).then((a) => a.text()).then((a) => {
        const o = e.read(a), u = {};
        Object.entries(n).forEach(([p, y]) => {
          p !== "url" && (u[p] = y);
        });
        const c = $ae(o, u);
        (qt.isString(n.attributions) || qt.isArray(n.attributions)) && (c.attributions = n.attributions), t(new zae(c));
      }).catch((a) => {
        i(a);
      });
    });
  }, ise = function(n) {
    return n.type.toLowerCase() === "wms" ? tse(n) : n.type.toLowerCase() === "wmts" ? nse(n) : Promise.reject(new Error("Invalid base layer type"));
  }, rse = function() {
    const { t: n } = Rs(), e = Kt.useRef(null), t = zt((Oe) => Oe.config).config, i = zt((Oe) => Oe.language), a = zt((Oe) => Oe.extract).background, o = zt((Oe) => Oe.map).baseLayer, u = i.current, c = Fl(), p = new URLSearchParams(window.location.search), y = t.service_url, [_, S] = Kt.useState(null), b = t.use_tile_wms, T = t.show_scale_bar;
    let O = kU, N = VU;
    b && (O = UA, N = dN);
    const D = {
      preload: 1 / 0,
      source: new N({
        url: t.availability.url,
        params: t.availability.params
      }),
      zIndex: 1e4
    };
    (qt.isString(t.availability.attributions) || qt.isArray(t.availability.attributions)) && (D.attributions = t.availability.attributions);
    const [k] = Kt.useState(new O(D));
    let $ = null;
    if (qt.isObject(t.mask_surrounding)) {
      const Oe = {
        preload: 1 / 0,
        source: new N({
          url: t.mask_surrounding.url,
          params: t.mask_surrounding.params
        }),
        opacity: t.mask_surrounding.opacity,
        zIndex: 4e4
      };
      (qt.isString(t.mask_surrounding.attributions) || qt.isArray(t.mask_surrounding.attributions)) && (Oe.attributions = t.mask_surrounding.attributions), $ = new O(Oe);
    }
    const [B] = Kt.useState($), [V] = Kt.useState(new S_({
      layers: new bf([]),
      visible: !1,
      zIndex: 2e4
    })), [z] = Kt.useState(new _ne({
      source: new Mne({}),
      style: new SE({
        fill: void 0,
        stroke: new HL({
          color: [255, 0, 0, 0.75],
          width: 7,
          lineCap: "square",
          lineJoin: "miter"
        })
      }),
      zIndex: 3e4
    }));
    if (_ === null) {
      const Oe = parseFloat(p.get("map_x")) || t.view.map_x, $e = parseFloat(p.get("map_y")) || t.view.map_y, Ee = parseFloat(p.get("map_zoom")) || t.view.map_zoom, Fe = [];
      Fe.push(new EU({
        collapsible: document.body.offsetWidth < 1200
      })), T && Fe.push(new Vie({
        units: "metric",
        bar: !0,
        steps: 1
      }));
      const Ne = new S2({
        controls: SU({
          attribution: !1
        }).extend(Fe),
        view: new kh({
          center: [Oe, $e],
          zoom: Ee,
          resolutions: t.view.resolutions,
          projection: "EPSG:2056"
        })
      });
      ise(t.base_layer).then(function(Q) {
        const ae = new UA({
          preload: 1 / 0,
          visible: !0,
          source: Q,
          zIndex: 0
        });
        Ne.addLayer(ae), Ne.addLayer(k), B !== null && Ne.addLayer(B), Ne.addLayer(V), Ne.addLayer(z), c(Bae({
          map: Ne,
          topicLayers: V,
          baseLayer: ae
        }));
      }), Ne.on("moveend", function() {
        const Q = new URLSearchParams(window.location.search);
        Q.set("map_x", Ne.getView().getCenter()[0].toFixed(3)), Q.set("map_y", Ne.getView().getCenter()[1].toFixed(3)), Q.set("map_zoom", Ne.getView().getZoom().toFixed(0)), window.history.pushState(null, null, "?" + Q.toString());
      }), Ne.on("singleclick", function(Q) {
        const ae = Ne.getEventCoordinate(Q.originalEvent);
        c(ZU({
          posX: ae[0],
          posY: ae[1]
        })), tz(y, ae).then((le) => {
          const se = le.GetEGRIDResponse;
          if (se.length > 1)
            c(QU({
              results: se
            }));
          else if (se.length === 1) {
            const Ae = se[0].egrid, q = se[0].identDN, Z = se[0].number;
            c(Uv()), c(d_({
              egrid: Ae,
              identdn: q,
              number: Z,
              zoom: !1
            })), m_(y, Ae, q, Z, t.extract_json_timeout, u).then((ee) => {
              c(p_(ee)), c(g_(ee));
            }).catch(() => {
              c(Zv());
            });
          } else
            throw new BO("No data available");
        }, (le) => {
          throw le.status === 204 ? new BO("No data available") : new Error();
        }).catch((le) => {
          le instanceof BO ? c(Zae(n("map.warning.no_data"))) : c(Qae(n("map.error.unknown"))), c(Uv());
        });
      }), S(Ne);
    }
    Kt.useEffect(() => {
      _.setTarget(e.current);
    });
    let G = null, ie = null, ue = null, Re = null;
    return _ instanceof S2 && (G = /* @__PURE__ */ K.jsx(iz, { map: _ }), ie = /* @__PURE__ */ K.jsx(rz, { map: _, realEstateLayer: z }), ue = /* @__PURE__ */ K.jsx(az, { topicLayers: V, tiled: b }), Re = /* @__PURE__ */ K.jsx(nz, { availabilityLayer: k })), o instanceof RL && o.setVisible(a), /* @__PURE__ */ K.jsxs("div", { className: "oereb-client-map-wrapper", children: [
      G,
      ie,
      ue,
      Re,
      /* @__PURE__ */ K.jsx("div", { ref: e, className: "oereb-client-map" })
    ] });
  }, ase = function(n, e, t) {
    const i = new URL(n);
    i.searchParams.append("term", e), i.searchParams.append("lang", t);
    let a;
    return {
      promise: new Promise((u, c) => {
        fetch(i.toString()).then((p) => p.json()).then((p) => {
          u(p);
        }).catch((p) => {
          c(p);
        }), a = function() {
          c(new Error("Request canceled"));
        };
      }),
      cancel: a
    };
  }, sz = new RegExp("^(\\d{7}(\\.\\d+)?)(\\s|,\\s?|;\\s?)(\\d{7}(\\.\\d+)?)"), oz = new RegExp("^(\\d{1}(\\.\\d+)?)(\\s|,\\s?|;\\s?)(\\d{2}(\\.\\d+)?)"), M2 = function(n) {
    return qt.isArray(n) ? [
      parseFloat(n[1]),
      parseFloat(n[4])
    ] : null;
  }, lz = function(n) {
    return sz.test(n);
  }, uz = function(n) {
    return oz.test(n);
  }, O2 = function(n) {
    if (uz(n)) {
      const e = M2(oz.exec(n));
      return new dw(e).transform("EPSG:4326", "EPSG:2056").getCoordinates();
    } else if (lz(n))
      return M2(sz.exec(n));
    return null;
  }, sse = function() {
    const { t: n } = Rs(), e = Fl(), t = zt((_) => _.config).config, i = t.service_url, a = zt((_) => _.language), o = a.current, u = a.available, c = zt((_) => _.extract), p = function(_) {
      _ !== o && (e(kY(_)), c.visible && (e(d_({
        egrid: c.egrid,
        identdn: c.identdn,
        number: c.number,
        zoom: !1
      })), m_(
        i,
        c.egrid,
        c.identdn,
        c.number,
        t.extract_json_timeout,
        _
      ).then((S) => {
        e(p_(S)), e(g_(S));
      }).catch(() => {
        e(Zv());
      })));
    }, y = u.map(
      (_, S) => /* @__PURE__ */ K.jsx("li", { children: /* @__PURE__ */ K.jsx("button", { className: "dropdown-item", onClick: p.bind(this, _), children: _.toUpperCase() }) }, S)
    );
    return /* @__PURE__ */ K.jsxs("div", { className: "oereb-client-language-selector", children: [
      /* @__PURE__ */ K.jsx(
        "button",
        {
          className: "btn btn-outline-secondary dropdown-toggle",
          type: "button",
          "data-bs-toggle": "dropdown",
          "aria-expanded": "false",
          title: n("menu.language.title"),
          children: o.toUpperCase()
        }
      ),
      /* @__PURE__ */ K.jsx("ul", { className: "dropdown-menu", children: y })
    ] });
  }, ose = function() {
    const { t: n } = Rs(), e = zt((a) => a.config).config, t = zt((a) => a.language).current;
    if (!qt.isString(e.user_guide))
      return null;
    const i = function() {
      const a = {
        lang: t
      }, o = e.user_guide;
      window.open(encodeURI(_j(o, a)), "_blank");
    };
    return /* @__PURE__ */ K.jsx(
      "button",
      {
        type: "button",
        className: "btn btn-outline-secondary oereb-client-user-guide",
        title: n("menu.user_guide.title"),
        onClick: i,
        children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-question-circle" })
      }
    );
  }, lse = function() {
    const { t: n } = Rs(), e = zt((Z) => Z.config).config, t = zt((Z) => Z.availability).visible, i = zt((Z) => Z.symbolZoom).enabled;
    zt((Z) => Z.extract).highlight, zt((Z) => Z.extract).background;
    const a = zt((Z) => Z.history).elements.slice().reverse(), o = Fl(), u = e.search_url, c = e.service_url, p = zt((Z) => Z.language), y = p.current, _ = p.default, S = p.available, [b, T] = Kt.useState(""), [O, N] = Kt.useState(null), [D, k] = Kt.useState([]), [$, B] = Kt.useState(!1), V = A3(e.application.logo_oereb, y, _), z = A3(e.application.logo_canton, y, _);
    let G = null;
    qt.isArray(S) && S.length > 1 && (G = /* @__PURE__ */ K.jsx(sse, {}));
    const ie = function(Z, ee, Le) {
      o(Vv([])), o(d_({
        egrid: Z,
        identdn: ee,
        number: Le,
        zoom: !0
      })), m_(c, Z, ee, Le, e.extract_json_timeout, y).then((Me) => {
        o(p_(Me)), o(g_(Me));
      }).catch(() => {
        o(Zv());
      });
    }, ue = function(Z) {
      o(ZU({
        posX: Z[0],
        posY: Z[1]
      })), tz(c, Z).then((ee) => {
        const Le = ee.GetEGRIDResponse;
        Le.length > 1 ? o(QU({
          results: Le
        })) : Le.length === 1 ? (o(Uv()), ie(Le[0].egrid)) : o(Uv());
      }).catch(() => {
        o(Uv());
      });
    }, Re = function() {
      T(""), k([]);
    }, Oe = function(Z) {
      Re(), qt.isString(Z.egrid) ? ie(Z.egrid, null, null) : qt.isString(Z.identdn) && qt.isString(Z.number) ? ie(null, Z.identdn, Z.number) : qt.isArray(Z.coordinates) && ue(Z.coordinates);
    }, $e = function(Z) {
      const ee = Z.target.value;
      if (T(ee), O !== null && O.cancel(), ee.length > 0) {
        B(!0);
        const Le = ase(u, ee, y), Me = Le.promise;
        N(Le), Me.then((De) => {
          let Ye = [];
          lz(ee) && (Ye = Ye.concat([{
            title: n("menu.search.title.coordinates.lv95"),
            results: [{
              label: ee,
              coordinates: O2(ee)
            }]
          }])), uz(ee) && (Ye = Ye.concat([{
            title: n("menu.search.title.coordinates.wgs84"),
            results: [{
              label: ee,
              coordinates: O2(ee)
            }]
          }])), Ye = Ye.concat(De), k(Ye), B(!1);
        }).catch(() => {
          B(!1);
        });
      } else
        Re();
    }, Ee = D.map((Z, ee) => {
      if (Z.results.length > 0) {
        const Le = Z.results.map(
          (De, Ye) => /* @__PURE__ */ K.jsx(
            "button",
            {
              className: "list-group-item list-group-item-action search-result text-start",
              onClick: Oe.bind(this, De),
              children: De.label
            },
            Ye
          )
        );
        return /* @__PURE__ */ K.jsxs("div", { className: "list-group result-list", children: [
          /* @__PURE__ */ K.jsxs("div", { className: "list-group-item", children: [
            /* @__PURE__ */ K.jsx("strong", { children: Z.title }),
            /* @__PURE__ */ K.jsx("span", { className: "badge bg-secondary float-end", children: Z.results.length })
          ] }),
          Le
        ] }, ee);
      }
      return null;
    }), Ne = function() {
      return b.length === 0 ? /* @__PURE__ */ K.jsx(
        "button",
        {
          className: "btn btn-outline-secondary",
          type: "button",
          title: n("menu.search.reset"),
          disabled: !0,
          children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-trash" })
        }
      ) : $ ? /* @__PURE__ */ K.jsx(
        "button",
        {
          className: "btn btn-outline-secondary",
          type: "button",
          disabled: !0,
          children: /* @__PURE__ */ K.jsx("span", { className: "spinner-grow spinner-grow-sm", role: "status" })
        }
      ) : /* @__PURE__ */ K.jsx(
        "button",
        {
          onClick: Re,
          className: "btn btn-outline-secondary",
          title: n("menu.search.reset"),
          type: "button",
          children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-trash" })
        }
      );
    }(), Q = t ? /* @__PURE__ */ K.jsxs("span", { children: [
      /* @__PURE__ */ K.jsx("i", { className: "bi bi-check-square" }),
      " ",
      n("menu.settings.availability")
    ] }) : /* @__PURE__ */ K.jsxs("span", { children: [
      /* @__PURE__ */ K.jsx("i", { className: "bi bi-square" }),
      " ",
      n("menu.settings.availability")
    ] }), ae = function() {
      o(bY(!t));
    }, le = i ? /* @__PURE__ */ K.jsxs("span", { children: [
      /* @__PURE__ */ K.jsx("i", { className: "bi bi-check-square" }),
      " ",
      n("menu.settings.symbol_zoom")
    ] }) : /* @__PURE__ */ K.jsxs("span", { children: [
      /* @__PURE__ */ K.jsx("i", { className: "bi bi-square" }),
      " ",
      n("menu.settings.symbol_zoom")
    ] }), se = function() {
      o(zY(!i));
    }, Ae = a.map(
      (Z, ee) => /* @__PURE__ */ K.jsx("li", { children: /* @__PURE__ */ K.jsxs(
        "button",
        {
          className: "dropdown-item",
          onClick: ie.bind(this, Z.EGRID, Z.IdentDN, Z.Number),
          children: [
            Z.Municipality,
            " ",
            Z.Number,
            " (",
            Z.EGRID,
            ")"
          ]
        }
      ) }, ee)
    );
    let q = "btn btn-outline-secondary dropdown-toggle";
    return a.length < 1 && (q += " disabled"), /* @__PURE__ */ K.jsxs("div", { className: "oereb-client-menu d-flex flex-column pb-3", children: [
      /* @__PURE__ */ K.jsxs("div", { className: "flex-grow-1 row justify-content-evenly", children: [
        /* @__PURE__ */ K.jsx("div", { className: "col", children: /* @__PURE__ */ K.jsx("img", { className: "img-fluid p-2", src: V }) }),
        /* @__PURE__ */ K.jsx("div", { className: "col text-end", children: /* @__PURE__ */ K.jsx("img", { className: "img-fluid p-2", src: z }) })
      ] }),
      /* @__PURE__ */ K.jsx("div", { className: "container-fluid", children: /* @__PURE__ */ K.jsxs("div", { className: "input-group", children: [
        G,
        /* @__PURE__ */ K.jsx(
          "button",
          {
            className: "btn btn-outline-secondary dropdown-toggle",
            type: "button",
            "data-bs-toggle": "dropdown",
            "aria-expanded": "false",
            title: n("menu.settings.title"),
            children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-gear-fill" })
          }
        ),
        /* @__PURE__ */ K.jsxs("ul", { className: "dropdown-menu", children: [
          /* @__PURE__ */ K.jsx("li", { children: /* @__PURE__ */ K.jsx("button", { className: "dropdown-item", onClick: ae, children: Q }) }),
          /* @__PURE__ */ K.jsx("li", { children: /* @__PURE__ */ K.jsx("button", { className: "dropdown-item", onClick: se, children: le }) })
        ] }),
        /* @__PURE__ */ K.jsx(
          "button",
          {
            className: q,
            type: "button",
            "data-bs-toggle": "dropdown",
            "aria-expanded": "false",
            title: n("menu.history.title"),
            children: /* @__PURE__ */ K.jsx("i", { className: "bi bi-clock-history" })
          }
        ),
        /* @__PURE__ */ K.jsx("ul", { className: "dropdown-menu", children: Ae }),
        /* @__PURE__ */ K.jsx(
          "input",
          {
            type: "text",
            className: "form-control",
            value: b,
            onChange: $e,
            placeholder: n("menu.search.placeholder")
          }
        ),
        Ne,
        /* @__PURE__ */ K.jsx(ose, {})
      ] }) }),
      /* @__PURE__ */ K.jsx("div", { className: "container-fluid", children: Ee })
    ] });
  }, cz = function() {
    const n = Kt.useRef(null), t = zt((i) => i.message).messages.map((i, a) => {
      let o, u, c;
      return i.type === "error" ? (o = "toast align-items-center bg-danger", u = "toast-body text-bg-danger", c = /* @__PURE__ */ K.jsx("i", { className: "bi bi-x-octagon-fill text-bg-danger" })) : (o = "toast align-items-center bg-secondary", u = "toast-body text-bg-secondary", c = /* @__PURE__ */ K.jsx("i", { className: "bi bi-exclamation-triangle-fill text-bg-secondary" })), /* @__PURE__ */ K.jsx("div", { className: o, role: "alert", "aria-live": "assertive", "aria-atomic": "true", "data-bs-autohide": "false", children: /* @__PURE__ */ K.jsxs("div", { className: "d-flex", children: [
        /* @__PURE__ */ K.jsx("div", { className: "ms-3 m-auto h4", children: c }),
        /* @__PURE__ */ K.jsx("div", { className: u, children: i.text })
      ] }) }, i.id);
    });
    return Kt.useEffect(() => {
      n.current.querySelectorAll(".toast").forEach((a) => {
        if (!a.hasAttribute("initialized")) {
          const o = cS.getOrCreateInstance(a);
          o.show(), setTimeout(() => {
            o.hide();
          }, nC - 500);
        }
        a.setAttribute("initialized", !0);
      });
    }, [t]), /* @__PURE__ */ K.jsx("div", { ref: n, className: "toast-container position-absolute top-0 end-0 mt-3 me-3", children: t });
  };
  cz.propTypes = {};
  const fz = function(n) {
    const e = Fl(), t = n.config, i = new URLSearchParams(window.location.search);
    if (e(PY({
      available: t.application.languages,
      default: t.application.default_language
    })), e(CY(t)), qt.isString(t.application.local_storage_prefix)) {
      const u = t.application.local_storage_prefix;
      e(NY(u)), e(SY(u)), e(jY(u));
    }
    e(DY()), e(xY()), e(UY());
    const a = i.has("egrid"), o = i.has("identdn") && i.has("number");
    if (a || o) {
      const u = i.get("egrid") || null, c = i.get("identdn") || null, p = i.get("number") || null;
      e(d_({
        egrid: u,
        identdn: c,
        number: p,
        zoom: !0
      })), m_(
        t.service_url,
        u,
        c,
        p,
        t.extract_json_timeout,
        i.get("lang")
      ).then((y) => {
        e(p_(y)), e(g_(y));
      }).catch(() => {
        e(Zv());
      });
    }
    return /* @__PURE__ */ K.jsxs("div", { className: "oereb-client-app", children: [
      /* @__PURE__ */ K.jsx(rse, {}),
      /* @__PURE__ */ K.jsx(yJ, {}),
      /* @__PURE__ */ K.jsx(mJ, {}),
      /* @__PURE__ */ K.jsx(lse, {}),
      /* @__PURE__ */ K.jsx(cz, {})
    ] });
  };
  fz.propTypes = {
    config: wa.object.isRequired
  };
  const use = uY({
    reducer: {
      config: TY,
      map: Vae,
      mapQuery: Hae,
      extract: LY,
      accordion: WY,
      language: FY,
      availability: wY,
      symbolZoom: $Y,
      history: IY,
      message: Jae
    },
    middleware: (n) => n({
      serializableCheck: !1
    })
  });
  Pl.defs(
    "EPSG:2056",
    "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"
  );
  eV(Pl);
  const cse = document.getElementById("app"), fse = cA(cse);
  fse.render(
    /* @__PURE__ */ K.jsx(t7, { store: use, children: /* @__PURE__ */ K.jsx(fz, { config: JSON.parse(document.getElementById("config").textContent) }) })
  );
});
export default hse();
