import { Component as c, options as i, createElement as d, Fragment as m, toChildArray as h } from "../../dist/preact.module.js";
import { createContext as Z } from "../../dist/preact.module.js";
import { useCallback as G, useContext as I, useEffect as J, useLayoutEffect as K, useMemo as Q, useReducer as X, useRef as Y, useState as ee } from "../../hooks/dist/hooks.module.js";
function O(e, t) {
  for (var r in t) e[r] = t[r];
  return e;
}
function y(e, t) {
  for (var r in e) if (r !== "__source" && !(r in t)) return !0;
  for (var o in t) if (o !== "__source" && e[o] !== t[o]) return !0;
  return !1;
}
function b(e, t) {
  this.props = e, this.context = t;
}
(b.prototype = new c()).isPureReactComponent = !0, b.prototype.shouldComponentUpdate = function(e, t) {
  return y(this.props, e) || y(this.state, t);
};
var g = i.__b;
i.__b = function(e) {
  e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), g && g(e);
};
var U = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
function D(e) {
  function t(r) {
    var o = O({}, r);
    return delete o.ref, e(o, r.ref || null);
  }
  return t.$$typeof = U, t.render = e, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
}
var A = i.__e;
i.__e = function(e, t, r, o) {
  if (e.then) {
    for (var n, a = t; a = a.__; ) if ((n = a.__c) && n.__c) return t.__e == null && (t.__e = r.__e, t.__k = r.__k), n.__c(e, t);
  }
  A(e, t, r, o);
};
var k = i.unmount;
function E(e, t, r) {
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(o) {
    typeof o.__c == "function" && o.__c();
  }), e.__c.__H = null), (e = O({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(o) {
    return E(o, t, r);
  })), e;
}
function R(e, t, r) {
  return e && r && (e.__v = null, e.__k = e.__k && e.__k.map(function(o) {
    return R(o, t, r);
  }), e.__c && e.__c.__P === t && (e.__e && r.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = r)), e;
}
function v() {
  this.__u = 0, this.o = null, this.__b = null;
}
function N(e) {
  var t = e.__ && e.__.__c;
  return t && t.__a && t.__a(e);
}
function F(e) {
  var t, r, o, n = null;
  function a(_) {
    if (t || (t = e()).then(function(u) {
      u && (n = u.default || u), o = !0;
    }, function(u) {
      r = u, o = !0;
    }), r) throw r;
    if (!o) throw t;
    return n ? d(n, _) : null;
  }
  return a.displayName = "Lazy", a.__f = !0, a;
}
function s() {
  this.i = null, this.l = null;
}
i.unmount = function(e) {
  var t = e.__c;
  t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), k && k(e);
}, (v.prototype = new c()).__c = function(e, t) {
  var r = t.__c, o = this;
  o.o == null && (o.o = []), o.o.push(r);
  var n = N(o.__v), a = !1, _ = function() {
    a || o.__z || (a = !0, r.__R = null, n ? n(l) : l());
  };
  r.__R = _;
  var u = r.__P;
  r.__P = null;
  var l = function() {
    if (!--o.__u) {
      if (o.state.__a) {
        var f = o.state.__a;
        o.__v.__k[0] = R(f, f.__c.__P, f.__c.__O);
      }
      var p;
      for (o.setState({ __a: o.__b = null }); p = o.o.pop(); ) p.__P = u, p.forceUpdate();
    }
  };
  o.__u++ || 32 & t.__u || o.setState({ __a: o.__b = o.__v.__k[0] }), e.then(_, _);
}, v.prototype.componentWillUnmount = function() {
  this.o = [];
}, v.prototype.render = function(e, t) {
  if (this.__b) {
    if (this.__v.__k) {
      var r = document.createElement("div"), o = this.__v.__k[0].__c;
      this.__v.__k[0] = E(this.__b, r, o.__O = o.__P);
    }
    this.__b = null;
  }
  var n = t.__a && d(m, null, e.fallback);
  return n && (n.__u &= -33), [d(m, null, t.__a ? null : e.children), n];
};
var P = function(e, t, r) {
  if (++r[1] === r[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (r = e.i; r; ) {
    for (; r.length > 3; ) r.pop()();
    if (r[1] < r[0]) break;
    e.i = r = r[2];
  }
};
(s.prototype = new c()).__a = function(e) {
  var t = this, r = N(t.__v), o = t.l.get(e);
  return o[0]++, function(n) {
    var a = function() {
      t.props.revealOrder ? (o.push(n), P(t, e, o)) : n();
    };
    r ? r(a) : a();
  };
}, s.prototype.render = function(e) {
  this.i = null, this.l = /* @__PURE__ */ new Map();
  var t = h(e.children);
  e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
  for (var r = t.length; r--; ) this.l.set(t[r], this.i = [1, 0, this.i]);
  return e.children;
}, s.prototype.componentDidUpdate = s.prototype.componentDidMount = function() {
  var e = this;
  this.l.forEach(function(t, r) {
    P(e, r, t);
  });
};
var z = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, L = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, M = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, V = /[A-Z0-9]/g, W = typeof document < "u", H = function(e) {
  return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
};
c.prototype.isReactComponent = !0, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
  Object.defineProperty(c.prototype, e, { configurable: !0, get: function() {
    return this["UNSAFE_" + e];
  }, set: function(t) {
    Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
  } });
});
var C = i.event;
i.event = function(e) {
  return C && (e = C(e)), e.persist = function() {
  }, e.isPropagationStopped = function() {
    return this.cancelBubble;
  }, e.isDefaultPrevented = function() {
    return this.defaultPrevented;
  }, e.nativeEvent = e;
};
var $ = { configurable: !0, get: function() {
  return this.class;
} }, S = i.vnode;
i.vnode = function(e) {
  typeof e.type == "string" && (function(t) {
    var r = t.props, o = t.type, n = {}, a = o.indexOf("-") == -1;
    for (var _ in r) {
      var u = r[_];
      if (!(_ === "value" && "defaultValue" in r && u == null || W && _ === "children" && o === "noscript" || _ === "class" || _ === "className")) {
        var l = _.toLowerCase();
        _ === "defaultValue" && "value" in r && r.value == null ? _ = "value" : _ === "download" && u === !0 ? u = "" : l === "translate" && u === "no" ? u = !1 : l[0] === "o" && l[1] === "n" ? l === "ondoubleclick" ? _ = "ondblclick" : l !== "onchange" || o !== "input" && o !== "textarea" || H(r.type) ? l === "onfocus" ? _ = "onfocusin" : l === "onblur" ? _ = "onfocusout" : M.test(_) && (_ = l) : l = _ = "oninput" : a && L.test(_) ? _ = _.replace(V, "-$&").toLowerCase() : u === null && (u = void 0), l === "oninput" && n[_ = l] && (_ = "oninputCapture"), n[_] = u;
      }
    }
    o == "select" && (n.multiple && Array.isArray(n.value) && (n.value = h(r.children).forEach(function(f) {
      f.props.selected = n.value.indexOf(f.props.value) != -1;
    })), n.defaultValue != null && (n.value = h(r.children).forEach(function(f) {
      f.props.selected = n.multiple ? n.defaultValue.indexOf(f.props.value) != -1 : n.defaultValue == f.props.value;
    }))), r.class && !r.className ? (n.class = r.class, Object.defineProperty(n, "className", $)) : r.className && (n.class = n.className = r.className), t.props = n;
  })(e), e.$$typeof = z, S && S(e);
};
var w = i.__r;
i.__r = function(e) {
  w && w(e), e.__c;
};
var x = i.diffed;
i.diffed = function(e) {
  x && x(e);
  var t = e.props, r = e.__e;
  r != null && e.type === "textarea" && "value" in t && t.value !== r.value && (r.value = t.value == null ? "" : t.value);
};
export {
  c as Component,
  m as Fragment,
  b as PureComponent,
  m as StrictMode,
  v as Suspense,
  s as SuspenseList,
  Z as createContext,
  d as createElement,
  D as forwardRef,
  F as lazy,
  G as useCallback,
  I as useContext,
  J as useEffect,
  K as useLayoutEffect,
  Q as useMemo,
  X as useReducer,
  Y as useRef,
  ee as useState
};
