import y, { useMemo as E, cloneElement as G, useContext as b, createContext as w, forwardRef as L, useCallback as C, useState as j, useRef as F } from "react";
import { a as W } from "./Hidden-X9vuhkMZ.es.js";
import { createPortal as Y } from "react-dom";
import { b as N } from "./useFocusable-Cs6i58WP.es.js";
import { $ as A } from "./SSRProvider-eIEwc-2s.es.js";
class k {
  get childNodes() {
    throw new Error("childNodes is not supported");
  }
  clone() {
    let e = new this.constructor(this.key);
    return e.value = this.value, e.level = this.level, e.hasChildNodes = this.hasChildNodes, e.rendered = this.rendered, e.textValue = this.textValue, e["aria-label"] = this["aria-label"], e.index = this.index, e.parentKey = this.parentKey, e.prevKey = this.prevKey, e.nextKey = this.nextKey, e.firstChildKey = this.firstChildKey, e.lastChildKey = this.lastChildKey, e.props = this.props, e.render = this.render, e.colSpan = this.colSpan, e.colIndex = this.colIndex, e;
  }
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  filter(e, t, n) {
    let i = this.clone();
    return t.addDescendants(i, e), i;
  }
  constructor(e) {
    this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = this.constructor.type, this.key = e;
  }
}
class H extends k {
  filter(e, t, n) {
    let [i, r] = T(e, t, this.firstChildKey, n), s = this.clone();
    return s.firstChildKey = i, s.lastChildKey = r, s;
  }
}
class J extends k {
}
J.type = "header";
class Q extends k {
}
Q.type = "loader";
class X extends H {
  filter(e, t, n) {
    if (n(this.textValue, this)) {
      let i = this.clone();
      return t.addDescendants(i, e), i;
    }
    return null;
  }
}
X.type = "item";
class Z extends H {
  filter(e, t, n) {
    let i = super.filter(e, t, n);
    if (i && i.lastChildKey !== null) {
      let r = e.getItem(i.lastChildKey);
      if (r && r.type !== "header") return i;
    }
    return null;
  }
}
Z.type = "section";
class ee {
  get size() {
    return this.itemCount;
  }
  getKeys() {
    return this.keyMap.keys();
  }
  *[Symbol.iterator]() {
    let e = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
    for (; e; )
      yield e, e = e.nextKey != null ? this.keyMap.get(e.nextKey) : void 0;
  }
  getChildren(e) {
    let t = this.keyMap;
    return {
      *[Symbol.iterator]() {
        let n = t.get(e), i = n?.firstChildKey != null ? t.get(n.firstChildKey) : null;
        for (; i; )
          yield i, i = i.nextKey != null ? t.get(i.nextKey) : void 0;
      }
    };
  }
  getKeyBefore(e) {
    let t = this.keyMap.get(e);
    if (!t) return null;
    if (t.prevKey != null) {
      for (t = this.keyMap.get(t.prevKey); t && t.type !== "item" && t.lastChildKey != null; ) t = this.keyMap.get(t.lastChildKey);
      var n;
      return (n = t?.key) !== null && n !== void 0 ? n : null;
    }
    return t.parentKey;
  }
  getKeyAfter(e) {
    let t = this.keyMap.get(e);
    if (!t) return null;
    if (t.type !== "item" && t.firstChildKey != null) return t.firstChildKey;
    for (; t; ) {
      if (t.nextKey != null) return t.nextKey;
      if (t.parentKey != null) t = this.keyMap.get(t.parentKey);
      else return null;
    }
    return null;
  }
  getFirstKey() {
    return this.firstKey;
  }
  getLastKey() {
    let e = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
    for (; e?.lastChildKey != null; ) e = this.keyMap.get(e.lastChildKey);
    var t;
    return (t = e?.key) !== null && t !== void 0 ? t : null;
  }
  getItem(e) {
    var t;
    return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
  }
  at() {
    throw new Error("Not implemented");
  }
  clone() {
    let e = this.constructor, t = new e();
    return t.keyMap = new Map(this.keyMap), t.firstKey = this.firstKey, t.lastKey = this.lastKey, t.itemCount = this.itemCount, t;
  }
  addNode(e) {
    if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
    e.type === "item" && this.keyMap.get(e.key) == null && this.itemCount++, this.keyMap.set(e.key, e);
  }
  // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection
  addDescendants(e, t) {
    this.addNode(e);
    let n = t.getChildren(e.key);
    for (let i of n) this.addDescendants(i, t);
  }
  removeNode(e) {
    if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
    let t = this.keyMap.get(e);
    t != null && t.type === "item" && this.itemCount--, this.keyMap.delete(e);
  }
  commit(e, t, n = !1) {
    if (this.frozen) throw new Error("Cannot commit a frozen collection");
    this.firstKey = e, this.lastKey = t, this.frozen = !n;
  }
  filter(e) {
    let t = new this.constructor(), [n, i] = T(this, t, this.firstKey, e);
    return t?.commit(n, i), t;
  }
  constructor() {
    this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1, this.itemCount = 0;
  }
}
function T(l, e, t, n) {
  if (t == null) return [
    null,
    null
  ];
  let i = null, r = null, s = l.getItem(t);
  for (; s != null; ) {
    let d = s.filter(l, e, n);
    d != null && (d.nextKey = null, r && (d.prevKey = r.key, r.nextKey = d.key), i == null && (i = d), e.addNode(d), r = d), s = s.nextKey ? l.getItem(s.nextKey) : null;
  }
  if (r && r.type === "separator") {
    let d = r.prevKey;
    e.removeNode(r.key), d ? (r = e.getItem(d), r.nextKey = null) : r = null;
  }
  var o, u;
  return [
    (o = i?.key) !== null && o !== void 0 ? o : null,
    (u = r?.key) !== null && u !== void 0 ? u : null
  ];
}
class q {
  *[Symbol.iterator]() {
    let e = this.firstChild;
    for (; e; )
      yield e, e = e.nextSibling;
  }
  get firstChild() {
    return this._firstChild;
  }
  set firstChild(e) {
    this._firstChild = e, this.ownerDocument.markDirty(this);
  }
  get lastChild() {
    return this._lastChild;
  }
  set lastChild(e) {
    this._lastChild = e, this.ownerDocument.markDirty(this);
  }
  get previousSibling() {
    return this._previousSibling;
  }
  set previousSibling(e) {
    this._previousSibling = e, this.ownerDocument.markDirty(this);
  }
  get nextSibling() {
    return this._nextSibling;
  }
  set nextSibling(e) {
    this._nextSibling = e, this.ownerDocument.markDirty(this);
  }
  get parentNode() {
    return this._parentNode;
  }
  set parentNode(e) {
    this._parentNode = e, this.ownerDocument.markDirty(this);
  }
  get isConnected() {
    var e;
    return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
  }
  invalidateChildIndices(e) {
    (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || e.index < this._minInvalidChildIndex.index) && (this._minInvalidChildIndex = e, this.ownerDocument.markDirty(this));
  }
  updateChildIndices() {
    let e = this._minInvalidChildIndex;
    for (; e; )
      e.index = e.previousSibling ? e.previousSibling.index + 1 : 0, e = e.nextSibling;
    this._minInvalidChildIndex = null;
  }
  appendChild(e) {
    e.parentNode && e.parentNode.removeChild(e), this.firstChild == null && (this.firstChild = e), this.lastChild ? (this.lastChild.nextSibling = e, e.index = this.lastChild.index + 1, e.previousSibling = this.lastChild) : (e.previousSibling = null, e.index = 0), e.parentNode = this, e.nextSibling = null, this.lastChild = e, this.ownerDocument.markDirty(this), this.isConnected && this.ownerDocument.queueUpdate();
  }
  insertBefore(e, t) {
    if (t == null) return this.appendChild(e);
    e.parentNode && e.parentNode.removeChild(e), e.nextSibling = t, e.previousSibling = t.previousSibling, e.index = t.index - 1, this.firstChild === t ? this.firstChild = e : t.previousSibling && (t.previousSibling.nextSibling = e), t.previousSibling = e, e.parentNode = t.parentNode, this.invalidateChildIndices(e), this.isConnected && this.ownerDocument.queueUpdate();
  }
  removeChild(e) {
    e.parentNode === this && (this._minInvalidChildIndex === e && (this._minInvalidChildIndex = null), e.nextSibling && (this.invalidateChildIndices(e.nextSibling), e.nextSibling.previousSibling = e.previousSibling), e.previousSibling && (e.previousSibling.nextSibling = e.nextSibling), this.firstChild === e && (this.firstChild = e.nextSibling), this.lastChild === e && (this.lastChild = e.previousSibling), e.parentNode = null, e.nextSibling = null, e.previousSibling = null, e.index = 0, this.ownerDocument.markDirty(e), this.isConnected && this.ownerDocument.queueUpdate());
  }
  addEventListener() {
  }
  removeEventListener() {
  }
  get previousVisibleSibling() {
    let e = this.previousSibling;
    for (; e && e.isHidden; ) e = e.previousSibling;
    return e;
  }
  get nextVisibleSibling() {
    let e = this.nextSibling;
    for (; e && e.isHidden; ) e = e.nextSibling;
    return e;
  }
  get firstVisibleChild() {
    let e = this.firstChild;
    for (; e && e.isHidden; ) e = e.nextSibling;
    return e;
  }
  get lastVisibleChild() {
    let e = this.lastChild;
    for (; e && e.isHidden; ) e = e.previousSibling;
    return e;
  }
  constructor(e) {
    this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = e;
  }
}
class g extends q {
  get index() {
    return this._index;
  }
  set index(e) {
    this._index = e, this.ownerDocument.markDirty(this);
  }
  get level() {
    var e;
    return this.parentNode instanceof g ? this.parentNode.level + (((e = this.node) === null || e === void 0 ? void 0 : e.type) === "item" ? 1 : 0) : 0;
  }
  /**
  * Lazily gets a mutable instance of a Node. If the node has already
  * been cloned during this update cycle, it just returns the existing one.
  */
  getMutableNode() {
    return this.node == null ? null : (this.isMutated || (this.node = this.node.clone(), this.isMutated = !0), this.ownerDocument.markDirty(this), this.node);
  }
  updateNode() {
    var e, t, n, i, r, s, o, u;
    let d = this.nextVisibleSibling, a = this.getMutableNode();
    if (a != null) {
      a.index = this.index, a.level = this.level;
      var h;
      a.parentKey = this.parentNode instanceof g && (h = (e = this.parentNode.node) === null || e === void 0 ? void 0 : e.key) !== null && h !== void 0 ? h : null;
      var f;
      a.prevKey = (f = (n = this.previousVisibleSibling) === null || n === void 0 || (t = n.node) === null || t === void 0 ? void 0 : t.key) !== null && f !== void 0 ? f : null;
      var c;
      a.nextKey = (c = d == null || (i = d.node) === null || i === void 0 ? void 0 : i.key) !== null && c !== void 0 ? c : null, a.hasChildNodes = !!this.firstChild;
      var p;
      a.firstChildKey = (p = (s = this.firstVisibleChild) === null || s === void 0 || (r = s.node) === null || r === void 0 ? void 0 : r.key) !== null && p !== void 0 ? p : null;
      var v;
      if (a.lastChildKey = (v = (u = this.lastVisibleChild) === null || u === void 0 || (o = u.node) === null || o === void 0 ? void 0 : o.key) !== null && v !== void 0 ? v : null, (a.colSpan != null || a.colIndex != null) && d) {
        var S, m;
        let x = ((S = a.colIndex) !== null && S !== void 0 ? S : a.index) + ((m = a.colSpan) !== null && m !== void 0 ? m : 1);
        if (d.node != null && x !== d.node.colIndex) {
          let z = d.getMutableNode();
          z.colIndex = x;
        }
      }
    }
  }
  setProps(e, t, n, i, r) {
    let s, { value: o, textValue: u, id: d, ...a } = e;
    if (this.node == null ? (s = new n(d ?? `react-aria-${++this.ownerDocument.nodeId}`), this.node = s) : s = this.getMutableNode(), a.ref = t, s.props = a, s.rendered = i, s.render = r, s.value = o, s.textValue = u || (typeof a.children == "string" ? a.children : "") || e["aria-label"] || "", d != null && d !== s.key) throw new Error("Cannot change the id of an item");
    a.colSpan != null && (s.colSpan = a.colSpan), this.isConnected && this.ownerDocument.queueUpdate();
  }
  get style() {
    let e = this;
    return {
      get display() {
        return e.isHidden ? "none" : "";
      },
      set display(t) {
        let n = t === "none";
        if (e.isHidden !== n) {
          var i, r;
          (((i = e.parentNode) === null || i === void 0 ? void 0 : i.firstVisibleChild) === e || ((r = e.parentNode) === null || r === void 0 ? void 0 : r.lastVisibleChild) === e) && e.ownerDocument.markDirty(e.parentNode);
          let s = e.previousVisibleSibling, o = e.nextVisibleSibling;
          s && e.ownerDocument.markDirty(s), o && e.ownerDocument.markDirty(o), e.isHidden = n, e.ownerDocument.markDirty(e);
        }
      }
    };
  }
  hasAttribute() {
  }
  setAttribute() {
  }
  setAttributeNS() {
  }
  removeAttribute() {
  }
  constructor(e, t) {
    super(t), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.isHidden = !1, this.node = null;
  }
}
class te extends q {
  get isConnected() {
    return !0;
  }
  createElement(e) {
    return new g(e, this);
  }
  getMutableCollection() {
    return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
  }
  markDirty(e) {
    this.dirtyNodes.add(e);
  }
  addNode(e) {
    if (e.isHidden || e.node == null) return;
    let t = this.getMutableCollection();
    if (!t.getItem(e.node.key)) for (let n of e) this.addNode(n);
    t.addNode(e.node);
  }
  removeNode(e) {
    for (let t of e) this.removeNode(t);
    e.node && this.getMutableCollection().removeNode(e.node.key);
  }
  /** Finalizes the collection update, updating all nodes and freezing the collection. */
  getCollection() {
    return this.inSubscription ? this.collection.clone() : (this.queuedRender = !1, this.updateCollection(), this.collection);
  }
  updateCollection() {
    for (let o of this.dirtyNodes) o instanceof g && (!o.isConnected || o.isHidden) ? this.removeNode(o) : o.updateChildIndices();
    for (let o of this.dirtyNodes) o instanceof g ? (o.isConnected && !o.isHidden && (o.updateNode(), this.addNode(o)), o.node && this.dirtyNodes.delete(o), o.isMutated = !1) : this.dirtyNodes.delete(o);
    if (this.nextCollection) {
      var e, t, n, i, r, s;
      this.nextCollection.commit((r = (t = this.firstVisibleChild) === null || t === void 0 || (e = t.node) === null || e === void 0 ? void 0 : e.key) !== null && r !== void 0 ? r : null, (s = (i = this.lastVisibleChild) === null || i === void 0 || (n = i.node) === null || n === void 0 ? void 0 : n.key) !== null && s !== void 0 ? s : null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null);
    }
  }
  queueUpdate() {
    if (!(this.dirtyNodes.size === 0 || this.queuedRender)) {
      this.queuedRender = !0, this.inSubscription = !0;
      for (let e of this.subscriptions) e();
      this.inSubscription = !1;
    }
  }
  subscribe(e) {
    return this.subscriptions.add(e), () => this.subscriptions.delete(e);
  }
  resetAfterSSR() {
    this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
  }
  constructor(e) {
    super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = e, this.nextCollection = e;
  }
}
function ie(l) {
  let { children: e, items: t, idScope: n, addIdAndValue: i, dependencies: r = [] } = l, s = E(() => /* @__PURE__ */ new WeakMap(), r);
  return E(() => {
    if (t && typeof e == "function") {
      let d = [];
      for (let a of t) {
        let h = s.get(a);
        if (!h) {
          h = e(a);
          var o, u;
          let f = (u = (o = h.props.id) !== null && o !== void 0 ? o : a.key) !== null && u !== void 0 ? u : a.id;
          if (f == null) throw new Error("Could not determine key for item");
          n && (f = n + ":" + f), h = G(h, i ? {
            key: f,
            id: f,
            value: a
          } : {
            key: f
          }), s.set(a, h);
        }
        d.push(h);
      }
      return d;
    } else if (typeof e != "function") return e;
  }, [
    e,
    t,
    s,
    n,
    i
  ]);
}
var K = { exports: {} }, _ = {};
var M;
function ne() {
  if (M) return _;
  M = 1;
  var l = y;
  function e(h, f) {
    return h === f && (h !== 0 || 1 / h === 1 / f) || h !== h && f !== f;
  }
  var t = typeof Object.is == "function" ? Object.is : e, n = l.useState, i = l.useEffect, r = l.useLayoutEffect, s = l.useDebugValue;
  function o(h, f) {
    var c = f(), p = n({ inst: { value: c, getSnapshot: f } }), v = p[0].inst, S = p[1];
    return r(
      function() {
        v.value = c, v.getSnapshot = f, u(v) && S({ inst: v });
      },
      [h, c, f]
    ), i(
      function() {
        return u(v) && S({ inst: v }), h(function() {
          u(v) && S({ inst: v });
        });
      },
      [h]
    ), s(c), c;
  }
  function u(h) {
    var f = h.getSnapshot;
    h = h.value;
    try {
      var c = f();
      return !t(h, c);
    } catch {
      return !0;
    }
  }
  function d(h, f) {
    return f();
  }
  var a = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : o;
  return _.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : a, _;
}
var D = {};
var R;
function le() {
  return R || (R = 1, process.env.NODE_ENV !== "production" && (function() {
    function l(c, p) {
      return c === p && (c !== 0 || 1 / c === 1 / p) || c !== c && p !== p;
    }
    function e(c, p) {
      a || i.startTransition === void 0 || (a = !0, console.error(
        "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
      ));
      var v = p();
      if (!h) {
        var S = p();
        r(v, S) || (console.error(
          "The result of getSnapshot should be cached to avoid an infinite loop"
        ), h = !0);
      }
      S = s({
        inst: { value: v, getSnapshot: p }
      });
      var m = S[0].inst, x = S[1];
      return u(
        function() {
          m.value = v, m.getSnapshot = p, t(m) && x({ inst: m });
        },
        [c, v, p]
      ), o(
        function() {
          return t(m) && x({ inst: m }), c(function() {
            t(m) && x({ inst: m });
          });
        },
        [c]
      ), d(v), v;
    }
    function t(c) {
      var p = c.getSnapshot;
      c = c.value;
      try {
        var v = p();
        return !r(c, v);
      } catch {
        return !0;
      }
    }
    function n(c, p) {
      return p();
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var i = y, r = typeof Object.is == "function" ? Object.is : l, s = i.useState, o = i.useEffect, u = i.useLayoutEffect, d = i.useDebugValue, a = !1, h = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : e;
    D.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  })()), D;
}
var O;
function re() {
  return O || (O = 1, process.env.NODE_ENV === "production" ? K.exports = ne() : K.exports = le()), K.exports;
}
var se = /* @__PURE__ */ re();
const P = /* @__PURE__ */ w(!1), $ = /* @__PURE__ */ w(null);
function me(l) {
  if (b($))
    return l.content;
  let { collection: t, document: n } = ae(l.createCollection);
  return /* @__PURE__ */ y.createElement(y.Fragment, null, /* @__PURE__ */ y.createElement(W, null, /* @__PURE__ */ y.createElement($.Provider, {
    value: n
  }, l.content)), /* @__PURE__ */ y.createElement(oe, {
    render: l.children,
    collection: t
  }));
}
function oe({ collection: l, render: e }) {
  return e(l);
}
function ue(l, e, t) {
  let n = A(), i = F(n);
  i.current = n;
  let r = C(() => i.current ? t() : e(), [
    e,
    t
  ]);
  return se.useSyncExternalStore(l, r);
}
const de = typeof y.useSyncExternalStore == "function" ? y.useSyncExternalStore : ue;
function ae(l) {
  let [e] = j(() => new te(l?.() || new ee())), t = C((s) => e.subscribe(s), [
    e
  ]), n = C(() => {
    let s = e.getCollection();
    return e.isSSR && e.resetAfterSSR(), s;
  }, [
    e
  ]), i = C(() => (e.isSSR = !0, e.getCollection()), [
    e
  ]);
  return {
    collection: de(t, n, i),
    document: e
  };
}
const I = /* @__PURE__ */ w(null);
function he(l) {
  var e;
  return e = class extends k {
  }, e.type = l, e;
}
function U(l, e, t, n, i, r) {
  typeof l == "string" && (l = he(l));
  let s = C((u) => {
    u?.setProps(e, t, l, n, r);
  }, [
    e,
    t,
    n,
    r,
    l
  ]), o = b(I);
  if (o) {
    let u = o.ownerDocument.nodesByProps.get(e);
    return u || (u = o.ownerDocument.createElement(l.type), u.setProps(e, t, l, n, r), o.appendChild(u), o.ownerDocument.updateCollection(), o.ownerDocument.nodesByProps.set(e, u)), i ? /* @__PURE__ */ y.createElement(I.Provider, {
      value: u
    }, i) : null;
  }
  return /* @__PURE__ */ y.createElement(l.type, {
    ref: s
  }, i);
}
function be(l, e) {
  let t = ({ node: i }) => e(i.props, i.props.ref, i), n = L((i, r) => {
    let s = b(N);
    if (!b(P)) {
      if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
      return e(i, r);
    }
    return U(l, i, r, "children" in i ? i.children : null, null, (u) => (
      // Forward FocusableContext to real DOM tree so tooltips work.
      /* @__PURE__ */ y.createElement(N.Provider, {
        value: s
      }, /* @__PURE__ */ y.createElement(t, {
        node: u
      }))
    ));
  });
  return n.displayName = e.name, n;
}
function xe(l, e, t = B) {
  let n = ({ node: r }) => e(r.props, r.props.ref, r), i = L((r, s) => {
    let o = t(r);
    var u;
    return (u = U(l, r, s, null, o, (d) => /* @__PURE__ */ y.createElement(n, {
      node: d
    }))) !== null && u !== void 0 ? u : /* @__PURE__ */ y.createElement(y.Fragment, null);
  });
  return i.displayName = e.name, i;
}
function B(l) {
  return ie({
    ...l,
    addIdAndValue: !0
  });
}
const V = /* @__PURE__ */ w(null);
function ge(l) {
  let e = b(V), t = (e?.dependencies || []).concat(l.dependencies), n = l.idScope || e?.idScope, i = B({
    ...l,
    idScope: n,
    dependencies: t
  });
  return b($) && (i = /* @__PURE__ */ y.createElement(ce, null, i)), e = E(() => ({
    dependencies: t,
    idScope: n
  }), [
    n,
    ...t
  ]), /* @__PURE__ */ y.createElement(V.Provider, {
    value: e
  }, i);
}
function ce({ children: l }) {
  let e = b($), t = E(() => /* @__PURE__ */ y.createElement($.Provider, {
    value: null
  }, /* @__PURE__ */ y.createElement(P.Provider, {
    value: !0
  }, l)), [
    l
  ]);
  return A() ? /* @__PURE__ */ y.createElement(I.Provider, {
    value: e
  }, t) : /* @__PURE__ */ Y(t, e);
}
export {
  be as $,
  k as a,
  J as b,
  xe as c,
  Z as d,
  X as e,
  me as f,
  ge as g,
  Q as h,
  ie as i,
  ee as j,
  H as k
};
//# sourceMappingURL=CollectionBuilder-BOe312C_.es.js.map
