@factorialco/f0-react 1.273.0 → 1.273.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { jsxs as k, jsx as d, Fragment as De } from "react/jsx-runtime";
4
4
  import { useCopilotChatInternal as Uf, useCopilotContext as nE, useCopilotAction as Y3, CopilotKit as iE } from "@copilotkit/react-core";
5
5
  import { Markdown as rE, useChatContext as oE, CopilotSidebar as sE } from "@copilotkit/react-ui";
6
6
  import * as ne from "react";
7
- import ee, { forwardRef as O, createContext as Kn, useRef as fe, useState as H, useCallback as Pe, useContext as In, useMemo as le, useEffect as ae, PureComponent as aE, useId as Kr, useTransition as lE, useLayoutEffect as Gf, memo as Kf, Fragment as Hr, isValidElement as ny, cloneElement as Zp, useDebugValue as iy, createRef as cE, createElement as dE, version as X3, useImperativeHandle as Zf, Children as ry } from "react";
7
+ import ee, { forwardRef as O, createContext as Kn, useRef as fe, useState as V, useCallback as Pe, useContext as In, useMemo as ae, useEffect as le, PureComponent as aE, useId as Kr, useTransition as lE, useLayoutEffect as Gf, memo as Kf, Fragment as Hr, isValidElement as ny, cloneElement as Zp, useDebugValue as iy, createRef as cE, createElement as dE, version as X3, useImperativeHandle as Zf, Children as ry } from "react";
8
8
  import Jf from "react-dom";
9
9
  import { randomId as fE } from "@copilotkit/shared";
10
10
  import './experimental.css';const uE = (t, e) => k("svg", {
@@ -4435,7 +4435,7 @@ function uI() {
4435
4435
  }), []), t;
4436
4436
  }
4437
4437
  function hI() {
4438
- const t = uI(), [e, n] = H(0), i = Pe(() => {
4438
+ const t = uI(), [e, n] = V(0), i = Pe(() => {
4439
4439
  t.current && n(e + 1);
4440
4440
  }, [e]);
4441
4441
  return [Pe(() => y8.postRender(i), [i]), e];
@@ -4461,14 +4461,14 @@ const zy = (t) => t === !0, mI = (t) => zy(t === !0) || t === "id", Zs = ({ chil
4461
4461
  id: e,
4462
4462
  group: zy(n) && i.group || Q3()
4463
4463
  });
4464
- const c = le(() => ({ ...a.current, forceRender: o }), [s]);
4464
+ const c = ae(() => ({ ...a.current, forceRender: o }), [s]);
4465
4465
  return d(V3.Provider, { value: c, children: t });
4466
4466
  };
4467
4467
  function Hy(t) {
4468
4468
  const e = Cl(() => Q_(t)), { isStatic: n } = In(eS);
4469
4469
  if (n) {
4470
- const [, i] = H(t);
4471
- ae(() => e.on("change", i), []);
4470
+ const [, i] = V(t);
4471
+ le(() => e.on("change", i), []);
4472
4472
  }
4473
4473
  return e;
4474
4474
  }
@@ -4572,7 +4572,7 @@ function xI({ children: t, as: e = "ul", axis: n = "y", onReorder: i, values: r,
4572
4572
  l !== m && (c.current = !0, i(m.map(CI).filter((g) => r.indexOf(g) !== -1)));
4573
4573
  }
4574
4574
  };
4575
- return ae(() => {
4575
+ return le(() => {
4576
4576
  c.current = !1;
4577
4577
  }), d(a, { ...o, ref: s, ignoreStrict: !0, children: d(jy.Provider, { value: f, children: t }) });
4578
4578
  }
@@ -5520,7 +5520,7 @@ function xm(t) {
5520
5520
  }
5521
5521
  var hD = Zy;
5522
5522
  const Cm = hD, pD = Yy, _m = Xy, Qy = ({ icon: t, title: e, children: n }) => {
5523
- const [i, r] = H(!1), o = qs();
5523
+ const [i, r] = V(!1), o = qs();
5524
5524
  return k(Cm, {
5525
5525
  className: "mb-1 w-full",
5526
5526
  open: i,
@@ -5576,8 +5576,8 @@ const Cm = hD, pD = Yy, _m = Xy, Qy = ({ icon: t, title: e, children: n }) => {
5576
5576
  duration: 0.15,
5577
5577
  ease: "easeOut"
5578
5578
  }, Sm = O(({ valueToCopy: t, onCopy: e, copyTooltipLabel: n, copiedTooltipLabel: i, variant: r = "neutral", size: o = "sm", ...s }, a) => {
5579
- const [l, c] = H(!1), f = Be(), u = n ?? f.actions.copy, p = l ? i ?? "Copied" : u;
5580
- return ae(() => {
5579
+ const [l, c] = V(!1), f = Be(), u = n ?? f.actions.copy, p = l ? i ?? "Copied" : u;
5580
+ return le(() => {
5581
5581
  let g = null;
5582
5582
  return l && (g = setTimeout(() => c(!1), 1e3)), () => {
5583
5583
  g && clearTimeout(g);
@@ -5729,7 +5729,7 @@ const yD = {
5729
5729
  });
5730
5730
  }
5731
5731
  }, e7 = Kn(null), vD = ({ children: t }) => {
5732
- const [e, n] = H(null), i = e ? {
5732
+ const [e, n] = V(null), i = e ? {
5733
5733
  isOpen: !0,
5734
5734
  currentReaction: e.action,
5735
5735
  currentMessage: e.message,
@@ -5761,7 +5761,7 @@ const yD = {
5761
5761
  var w, x;
5762
5762
  const o = (i == null ? void 0 : i.content) || "", s = (i == null ? void 0 : i.role) === "assistant" && ((w = i.toolCalls) == null ? void 0 : w.find((b) => b.function.name === "orchestratorThinking")), a = (x = i == null ? void 0 : i.generativeUI) == null ? void 0 : x.call(i, s ? {
5763
5763
  status: e ? "executing" : "completed"
5764
- } : void 0), l = !o && !a, c = Be(), { open: f } = t7(), [u, h] = H(null), [p, m] = H(!1), g = fe(), y = Pe(() => {
5764
+ } : void 0), l = !o && !a, c = Be(), { open: f } = t7(), [u, h] = V(null), [p, m] = V(!1), g = fe(), y = Pe(() => {
5765
5765
  g.current && clearTimeout(g.current), !e && !t && !a && m(!0);
5766
5766
  }, [t, e, a]), v = Pe(() => {
5767
5767
  g.current = setTimeout(() => {
@@ -5834,16 +5834,16 @@ const yD = {
5834
5834
  })]
5835
5835
  });
5836
5836
  }, bD = () => null, n7 = Kn(null), wD = 15, xD = ({ children: t, enabled: e, agent: n, initialMessage: i, welcomeScreenSuggestions: r = [], onThumbsDown: o, onThumbsUp: s, ...a }) => {
5837
- const [l, c] = H(e), [f, u] = H(!1), [h, p] = H(!0), [m, g] = H(n), [y, v] = H(r), [w, x] = H(wD), [b, _] = H(i), C = fe(null), N = (S) => {
5837
+ const [l, c] = V(e), [f, u] = V(!1), [h, p] = V(!0), [m, g] = V(n), [y, v] = V(r), [w, x] = V(wD), [b, _] = V(i), C = fe(null), N = (S) => {
5838
5838
  g(S);
5839
5839
  }, A = (S) => {
5840
5840
  C.current = S;
5841
5841
  }, L = () => {
5842
5842
  C.current && C.current();
5843
5843
  };
5844
- return ae(() => {
5844
+ return le(() => {
5845
5845
  c(e);
5846
- }, [e]), ae(() => {
5846
+ }, [e]), le(() => {
5847
5847
  if (!f) {
5848
5848
  const S = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
5849
5849
  p(!S);
@@ -5918,8 +5918,8 @@ const CD = (t) => {
5918
5918
  })]
5919
5919
  });
5920
5920
  }, _D = ({ inProgress: t, onSend: e, onStop: n }) => {
5921
- const [i, r] = H(""), [o, s] = H(!1), a = fe(null), l = fe(null), c = Be(), f = i.trim().length > 0;
5922
- ae(() => {
5921
+ const [i, r] = V(""), [o, s] = V(!1), a = fe(null), l = fe(null), c = Be(), f = i.trim().length > 0;
5922
+ le(() => {
5923
5923
  if (l.current && i.length > 0) {
5924
5924
  const { scrollHeight: p } = l.current;
5925
5925
  s(p > 240);
@@ -6019,7 +6019,7 @@ const CD = (t) => {
6019
6019
  isOpen: n
6020
6020
  }) => {
6021
6021
  const i = fe(null);
6022
- ae(() => (n ? i.current && (clearTimeout(i.current), i.current = null) : t !== null && (i.current = setTimeout(
6022
+ le(() => (n ? i.current && (clearTimeout(i.current), i.current = null) : t !== null && (i.current = setTimeout(
6023
6023
  () => {
6024
6024
  e();
6025
6025
  },
@@ -6092,7 +6092,7 @@ const MD = ({ value: t, onChange: e }) => {
6092
6092
  }
6093
6093
  });
6094
6094
  }, ND = ({ type: t, ...e }) => {
6095
- const [n, i] = H(!1), r = le(() => t === "password" ? n ? "text" : "password" : t, [n, t]), o = le(() => t === "password" ? dm : e.icon, [t, e.icon]);
6095
+ const [n, i] = V(!1), r = ae(() => t === "password" ? n ? "text" : "password" : t, [n, t]), o = ae(() => t === "password" ? dm : e.icon, [t, e.icon]);
6096
6096
  return d(x8, {
6097
6097
  ...e,
6098
6098
  type: r,
@@ -6129,43 +6129,37 @@ const MD = ({ value: t, onChange: e }) => {
6129
6129
  }), Lm = () => In(i7), r7 = () => Dp("(max-width: 560px)", {
6130
6130
  initializeWithValue: !1
6131
6131
  }), AD = ({ asBottomSheetInMobile: t = !0, position: e = "center", onClose: n, isOpen: i, contentPadding: r = "md", children: o }) => {
6132
- const [s, a] = H(i);
6133
- ae(() => {
6134
- a(i);
6135
- }, [i]);
6136
- const l = (p) => {
6137
- a(p), p || n();
6138
- }, c = () => {
6139
- a(!1), n();
6140
- }, f = r7(), u = e === "left" || e === "right", h = le(() => f && t ? "max-h-[95vh] bg-f1-background" : u ? T("w-full overflow-x-hidden flex flex-col absolute top-3 bottom-3 translate-y-0 translate-x-0 max-w-[539px] rounded-md border border-solid border-f1-border-secondary", e === "left" && "left-3", e === "right" && "left-auto right-3") : e === "fullscreen" ? "w-[calc(100%-48px)] h-[calc(100%-48px)] overflow-x-hidden" : "flex flex-col max-h-[620px] max-w-[680px] overflow-hidden", [e, f, t, u]);
6141
- return f && t ? d(l4, {
6142
- isOpen: s,
6143
- onClose: c,
6132
+ const s = (f) => {
6133
+ f || n();
6134
+ }, a = r7(), l = e === "left" || e === "right", c = ae(() => a && t ? "max-h-[95vh] bg-f1-background" : l ? T("w-full overflow-x-hidden flex flex-col absolute top-3 bottom-3 translate-y-0 translate-x-0 max-w-[539px] rounded-md border border-solid border-f1-border-secondary", e === "left" && "left-3", e === "right" && "left-auto right-3") : e === "fullscreen" ? "w-[calc(100%-48px)] h-[calc(100%-48px)] overflow-x-hidden" : "flex flex-col max-h-[620px] max-w-[680px] overflow-hidden", [e, a, t, l]);
6135
+ return a && t ? d(l4, {
6136
+ isOpen: i,
6137
+ onClose: n,
6144
6138
  position: e,
6145
6139
  contentPadding: r,
6146
6140
  shownBottomSheet: !0,
6147
6141
  children: k(yS, {
6148
- open: s,
6149
- onOpenChange: l,
6142
+ open: i,
6143
+ onOpenChange: s,
6150
6144
  children: [d(vS, {
6151
6145
  className: "bg-f1-background-overlay"
6152
6146
  }), d(kS, {
6153
- className: h,
6147
+ className: c,
6154
6148
  children: o
6155
6149
  })]
6156
6150
  })
6157
6151
  }) : d(l4, {
6158
- isOpen: s,
6159
- onClose: c,
6152
+ isOpen: i,
6153
+ onClose: n,
6160
6154
  position: e,
6161
6155
  contentPadding: r,
6162
6156
  children: d(C8, {
6163
- open: s,
6164
- onOpenChange: n,
6157
+ open: i,
6158
+ onOpenChange: s,
6165
6159
  modal: e === "center" || e === "fullscreen",
6166
6160
  children: d(_8, {
6167
- withTraslateAnimation: !u,
6168
- className: h,
6161
+ withTraslateAnimation: !l,
6162
+ className: c,
6169
6163
  children: o
6170
6164
  })
6171
6165
  })
@@ -6834,8 +6828,8 @@ const nR = bn({
6834
6828
  children: " "
6835
6829
  })
6836
6830
  }), ya = xt(iR, rR), oR = ({ tabs: t, activeTabId: e, setActiveTabId: n, secondary: i = !1, embedded: r = !1 }) => {
6837
- const o = t[0], [s, a] = H(e ?? ("id" in o ? o.id : void 0));
6838
- ae(() => {
6831
+ const o = t[0], [s, a] = V(e ?? ("id" in o ? o.id : void 0));
6832
+ le(() => {
6839
6833
  s && (n == null || n(s));
6840
6834
  }, [n, s]);
6841
6835
  const { isActive: l } = Bf(), c = r ? [t[0]] : t, u = [...c].sort((h, p) => h.index ? 1 : p.index ? -1 : 0).find((h) => "href" in h ? l(h.href) : s === h.id);
@@ -7047,7 +7041,7 @@ function pR(t, e, n = []) {
7047
7041
  }
7048
7042
  function mR({ breadcrumbs: t, append: e }) {
7049
7043
  var l;
7050
- const n = fe(null), i = fe(null), [, r] = lE(), [o, s] = H(null), a = ((o == null ? void 0 : o.collapsedItems) || []).length > 0;
7044
+ const n = fe(null), i = fe(null), [, r] = lE(), [o, s] = V(null), a = ((o == null ? void 0 : o.collapsedItems) || []).length > 0;
7051
7045
  return Gf(() => {
7052
7046
  const c = n.current, f = i.current;
7053
7047
  if (!c || !f || f.children.length < t.length) return;
@@ -7106,10 +7100,10 @@ function mR({ breadcrumbs: t, append: e }) {
7106
7100
  }, `breadcrumb-${((l = t.at(-1)) == null ? void 0 : l.id) ?? 0}`);
7107
7101
  }
7108
7102
  function gR({ ...t }) {
7109
- const [e, n] = H(t.open), i = (l) => {
7103
+ const [e, n] = V(t.open), i = (l) => {
7110
7104
  var c;
7111
7105
  n(l), (c = t.onOpenChange) == null || c.call(t, l);
7112
- }, [r, o] = H(t.placeholder || t.label);
7106
+ }, [r, o] = V(t.placeholder || t.label);
7113
7107
  return d(bs, {
7114
7108
  ...t,
7115
7109
  onOpenChange: i,
@@ -7159,23 +7153,23 @@ function Ys() {
7159
7153
  } : t;
7160
7154
  }
7161
7155
  function yR({ children: t }) {
7162
- const { currentPath: e } = Bf(), [n, i] = H(!1), [r, o] = H(!1), s = n ? Sh.xl : Sh.md, a = Dp(`(max-width: ${s}px)`, {
7156
+ const { currentPath: e } = Bf(), [n, i] = V(!1), [r, o] = V(!1), s = n ? Sh.xl : Sh.md, a = Dp(`(max-width: ${s}px)`, {
7163
7157
  initializeWithValue: !0
7164
- }), [l, c] = H(() => {
7158
+ }), [l, c] = V(() => {
7165
7159
  const v = localStorage.getItem(u4);
7166
7160
  return v !== null ? !!v : !0;
7167
- }), [f, u] = H(!1), [h, p] = H(null), m = Pe(({ isInvokedByUser: v } = {
7161
+ }), [f, u] = V(!1), [h, p] = V(null), m = Pe(({ isInvokedByUser: v } = {
7168
7162
  isInvokedByUser: !0
7169
7163
  }) => {
7170
7164
  o(v ?? !0), a && u(!f), c(!l);
7171
7165
  }, [a, f, l, c, u]), g = Pe((v) => {
7172
7166
  a || (v.clientX < 32 && u(!0), v.clientX > 280 && u(!1));
7173
- }, [a, u]), y = le(() => a ? f ? "unlocked" : "hidden" : !l && !f ? "hidden" : !l && f ? "unlocked" : "locked", [a, f, l]);
7174
- return ae(() => {
7167
+ }, [a, u]), y = ae(() => a ? f ? "unlocked" : "hidden" : !l && !f ? "hidden" : !l && f ? "unlocked" : "locked", [a, f, l]);
7168
+ return le(() => {
7175
7169
  u(!1);
7176
- }, [e]), ae(() => {
7170
+ }, [e]), le(() => {
7177
7171
  r && localStorage.setItem(u4, l ? "1" : "");
7178
- }, [l, r]), ae(() => () => {
7172
+ }, [l, r]), le(() => () => {
7179
7173
  p(y);
7180
7174
  }, [y]), d(C7.Provider, {
7181
7175
  value: {
@@ -7335,7 +7329,7 @@ const vR = bn({
7335
7329
  })
7336
7330
  });
7337
7331
  }, _7 = O(kR), S7 = ({ className: t, disabled: e }) => {
7338
- const { enabled: n, setOpen: i, open: r } = Zr(), o = Be(), [s, a] = H(!1);
7332
+ const { enabled: n, setOpen: i, open: r } = Zr(), o = Be(), [s, a] = V(!1);
7339
7333
  return n ? d("div", {
7340
7334
  className: "flex items-center",
7341
7335
  children: d(M8, {
@@ -7533,14 +7527,14 @@ const vR = bn({
7533
7527
  })
7534
7528
  });
7535
7529
  }, L7 = O(wR), E7 = Kn(null), xR = 15, CR = ({ children: t, enabled: e, onShow: n, ...i }) => {
7536
- const [r, o] = H(e), [s, a] = H(!1), [l, c] = H(!0), [f, u] = H(xR), h = fe(null), p = (g) => {
7530
+ const [r, o] = V(e), [s, a] = V(!1), [l, c] = V(!0), [f, u] = V(xR), h = fe(null), p = (g) => {
7537
7531
  h.current = g;
7538
7532
  }, m = () => {
7539
7533
  h.current && h.current();
7540
7534
  };
7541
- return ae(() => {
7535
+ return le(() => {
7542
7536
  o(e);
7543
- }, [e]), ae(() => {
7537
+ }, [e]), le(() => {
7544
7538
  if (s && (n == null || n()), !s) {
7545
7539
  const g = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
7546
7540
  c(!g);
@@ -7579,7 +7573,7 @@ function e1() {
7579
7573
  } : t;
7580
7574
  }
7581
7575
  const M7 = ({ className: t, disabled: e }) => {
7582
- const { enabled: n, setOpen: i, open: r } = e1(), o = Be(), [s, a] = H(!1);
7576
+ const { enabled: n, setOpen: i, open: r } = e1(), o = Be(), [s, a] = V(!1);
7583
7577
  return n ? d("div", {
7584
7578
  className: "flex items-center",
7585
7579
  children: d(M8, {
@@ -7652,7 +7646,7 @@ const M7 = ({ className: t, disabled: e }) => {
7652
7646
  scale: 0.8
7653
7647
  }
7654
7648
  }, _R = ({ isMarked: t, onChange: e, label: n }) => {
7655
- const [i, r] = H(!1), o = () => {
7649
+ const [i, r] = V(!1), o = () => {
7656
7650
  r(!0), e(!t);
7657
7651
  };
7658
7652
  return d(Je, {
@@ -7699,8 +7693,8 @@ const M7 = ({ className: t, disabled: e }) => {
7699
7693
  }, onHeaderClick: a = () => {
7700
7694
  }, onItemClick: l = () => {
7701
7695
  }, hasUnread: c = !1, crossSelling: f }) => {
7702
- const [u, h] = H("idle"), [p, m] = H(null), [g, ...y] = p ?? [], [v, w] = H(!1);
7703
- ae(() => {
7696
+ const [u, h] = V("idle"), [p, m] = V(null), [g, ...y] = p ?? [], [v, w] = V(!1);
7697
+ le(() => {
7704
7698
  m(null), h("idle");
7705
7699
  }, [t]);
7706
7700
  const x = Pe(async () => {
@@ -7958,8 +7952,8 @@ const M7 = ({ className: t, disabled: e }) => {
7958
7952
  "aria-hidden": "true",
7959
7953
  className: T("size-2 rounded bg-f1-background-selected-bold", t)
7960
7954
  }), OR = ({ isVisible: t, onClose: e, crossSelling: n, onDropdownClose: i }) => {
7961
- const [r, o] = H(t);
7962
- ae(() => {
7955
+ const [r, o] = V(t);
7956
+ le(() => {
7963
7957
  o(t);
7964
7958
  }, [t]);
7965
7959
  const s = () => {
@@ -8145,7 +8139,7 @@ function Sde({ module: t, statusTag: e = void 0, breadcrumbs: n = [], actions: i
8145
8139
  });
8146
8140
  }
8147
8141
  function IR({ action: t }) {
8148
- const e = fe(null), [n, i] = H(!1);
8142
+ const e = fe(null), [n, i] = V(!1);
8149
8143
  return "actions" in t ? d(mn, {
8150
8144
  items: t.actions,
8151
8145
  open: n,
@@ -8332,12 +8326,12 @@ fo.Header = RR;
8332
8326
  fo.Content = lR;
8333
8327
  fo.Footer = dR;
8334
8328
  const FR = ({ onClose: t, onSubmit: e, reactionType: n, message: i }) => {
8335
- const [r, o] = H(""), s = Be(), { title: a, label: l, placeholder: c } = n === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, f = Pe(() => {
8329
+ const [r, o] = V(""), s = Be(), { title: a, label: l, placeholder: c } = n === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, f = Pe(() => {
8336
8330
  e(i, r);
8337
8331
  }, [r, i, e]), u = () => {
8338
8332
  t(i);
8339
8333
  };
8340
- return ae(() => {
8334
+ return le(() => {
8341
8335
  const h = (p) => {
8342
8336
  p.key === "Enter" && (p.preventDefault(), f());
8343
8337
  };
@@ -8558,10 +8552,10 @@ const zR = ({ greeting: t, initialMessages: e = [], suggestions: n = [] }) => {
8558
8552
  ...t
8559
8553
  })
8560
8554
  }), VR = ({ inProgress: t, children: e, RenderMessage: n, AssistantMessage: i, UserMessage: r, ImageRenderer: o, onRegenerate: s, onCopy: a, markdownTagRenderers: l }) => {
8561
- const c = fe(null), { messages: f, interrupt: u } = Uf(), { threadId: h } = nE(), { close: p, currentReaction: m, currentMessage: g, isOpen: y } = t7(), v = Be(), { greeting: w, initialMessage: x, welcomeScreenSuggestions: b, onThumbsUp: _, onThumbsDown: C } = Zr(), N = le(() => jR(x || v.ai.defaultInitialMessage), [x, v.ai.defaultInitialMessage]), A = f.length == 0 && (w || N.length > 0), { messagesContainerRef: L, messagesEndRef: S, showScrollToBottom: D, scrollToBottom: E } = WR(), { height: R = 0 } = rd({
8555
+ const c = fe(null), { messages: f, interrupt: u } = Uf(), { threadId: h } = nE(), { close: p, currentReaction: m, currentMessage: g, isOpen: y } = t7(), v = Be(), { greeting: w, initialMessage: x, welcomeScreenSuggestions: b, onThumbsUp: _, onThumbsDown: C } = Zr(), N = ae(() => jR(x || v.ai.defaultInitialMessage), [x, v.ai.defaultInitialMessage]), A = f.length == 0 && (w || N.length > 0), { messagesContainerRef: L, messagesEndRef: S, showScrollToBottom: D, scrollToBottom: E } = WR(), { height: R = 0 } = rd({
8562
8556
  ref: L,
8563
8557
  box: "border-box"
8564
- }), B = le(() => qR(f), [f]);
8558
+ }), B = ae(() => qR(f), [f]);
8565
8559
  return k(De, {
8566
8560
  children: [k(te.div, {
8567
8561
  layout: !0,
@@ -8668,7 +8662,7 @@ function jR(t) {
8668
8662
  }));
8669
8663
  }
8670
8664
  function WR() {
8671
- const t = fe(null), e = fe(null), n = fe(!1), i = fe(!1), [r, o] = H(!1), s = (f = "smooth") => {
8665
+ const t = fe(null), e = fe(null), n = fe(!1), i = fe(!1), [r, o] = V(!1), s = (f = "smooth") => {
8672
8666
  e.current && t.current && (o(!1), n.current = !0, t.current.scrollIntoView({
8673
8667
  behavior: f
8674
8668
  }));
@@ -8692,7 +8686,7 @@ function WR() {
8692
8686
  }
8693
8687
  a(), l();
8694
8688
  }, []);
8695
- return RS("scroll", c, e), ae(() => {
8689
+ return RS("scroll", c, e), le(() => {
8696
8690
  const f = e.current;
8697
8691
  if (!f)
8698
8692
  return;
@@ -8787,7 +8781,7 @@ const GR = (t) => {
8787
8781
  }, i))
8788
8782
  }), JR = ({ message: t, ImageRenderer: e }) => {
8789
8783
  const n = t && "image" in t && t.image, i = fe(null);
8790
- if (ae(() => {
8784
+ if (le(() => {
8791
8785
  i.current && i.current.scrollIntoView({
8792
8786
  behavior: "smooth"
8793
8787
  });
@@ -8828,7 +8822,7 @@ const GR = (t) => {
8828
8822
  });
8829
8823
  }, QR = () => {
8830
8824
  const { setClearFunction: t } = Zr(), { reset: e } = Uf();
8831
- return ae(() => (t(e), () => {
8825
+ return le(() => (t(e), () => {
8832
8826
  t(null);
8833
8827
  }), [t, e]), null;
8834
8828
  }, eF = () => {
@@ -8946,7 +8940,7 @@ const GR = (t) => {
8946
8940
  isOpen: n
8947
8941
  }) => {
8948
8942
  const i = fe(null);
8949
- ae(() => (n ? i.current && (clearTimeout(i.current), i.current = null) : t !== null && (i.current = setTimeout(
8943
+ le(() => (n ? i.current && (clearTimeout(i.current), i.current = null) : t !== null && (i.current = setTimeout(
8950
8944
  () => {
8951
8945
  },
8952
8946
  t * 60 * 1e3
@@ -15241,8 +15235,8 @@ function PH(t, e, n) {
15241
15235
  ])
15242
15236
  ) : be(B);
15243
15237
  function be(Le) {
15244
- return V;
15245
- function V(G) {
15238
+ return H;
15239
+ function H(G) {
15246
15240
  const me = G !== null && Le[G], ke = G !== null && Le.null, ge = [
15247
15241
  // To do: add more extension tests.
15248
15242
  /* c8 ignore next 2 */
@@ -15256,8 +15250,8 @@ function PH(t, e, n) {
15256
15250
  return U = Le, Q = 0, Le.length === 0 ? z : I(Le[Q]);
15257
15251
  }
15258
15252
  function I(Le) {
15259
- return V;
15260
- function V(G) {
15253
+ return H;
15254
+ function H(G) {
15261
15255
  return M = L(), ie = Le, Le.partial || (c.currentConstruct = Le), Le.name && c.parser.constructs.disable.null.includes(Le.name) ? Re() : Le.tokenize.call(
15262
15256
  // If we do have fields, create an object w/ `context` as its
15263
15257
  // prototype.
@@ -15485,7 +15479,7 @@ function WH(t) {
15485
15479
  characterReferenceMarkerHexadecimal: Re,
15486
15480
  characterReferenceMarkerNumeric: Re,
15487
15481
  characterReferenceValue: Le,
15488
- characterReference: V,
15482
+ characterReference: H,
15489
15483
  codeFenced: l(y),
15490
15484
  codeFencedFence: g,
15491
15485
  codeFencedFenceInfo: p,
@@ -15818,7 +15812,7 @@ function WH(t) {
15818
15812
  const Ke = this.stack[this.stack.length - 1];
15819
15813
  Ke.value += $e;
15820
15814
  }
15821
- function V(j) {
15815
+ function H(j) {
15822
15816
  const Z = this.stack.pop();
15823
15817
  Z.position.end = vr(j.end);
15824
15818
  }
@@ -18022,7 +18016,7 @@ function tj(t) {
18022
18016
  return !!(t && typeof t == "object" && "byteLength" in t && "byteOffset" in t);
18023
18017
  }
18024
18018
  const nj = XV().use(UH).use(mH).use(IV).use(EP), ij = O(function({ content: e, className: n, format: i = "html", ...r }, o) {
18025
- const s = le(() => D8.sanitize(i === "markdown" ? String(nj.processSync(e)) : e, {
18019
+ const s = ae(() => D8.sanitize(i === "markdown" ? String(nj.processSync(e)) : e, {
18026
18020
  ADD_ATTR: ["target"],
18027
18021
  ALLOWED_ATTR: ["href", "target", "rel", "class"]
18028
18022
  }), [i, e]), a = /<[^>]*>/.test(s);
@@ -18462,7 +18456,7 @@ const hj = ({ entity: t, selected: e, onSelect: n, onRemove: i, marginLeft: r, s
18462
18456
  });
18463
18457
  }, Oc = ({ groupView: t, expanded: e, search: n, entity: i, selected: r, partialSelected: o, onSelect: s, onRemove: a, onExpand: l, goToFirst: c, goToLast: f, isChild: u = !1, hideLine: h = !1, showGroupIcon: p = !1, singleSelector: m = !1, disabled: g = !1, hiddenAvatar: y = !1 }) => {
18464
18458
  var C, N;
18465
- const [v, w] = H(!1);
18459
+ const [v, w] = V(!1);
18466
18460
  if (!t)
18467
18461
  return d(hj, {
18468
18462
  marginLeft: u ? "ml-6" : "ml-0",
@@ -18660,13 +18654,13 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18660
18654
  })]
18661
18655
  });
18662
18656
  }, vu = 384, ku = 36, gj = 37, l5 = 1, c5 = 200, d5 = '[data-avatarname-navigator-element="true"]', yj = ({ groupView: t, entities: e, groups: n, selectedGroup: i, search: r, onSelect: o, onRemove: s, onSubItemRemove: a, onSubItemSelect: l, onClear: c, onSelectAll: f, onSearch: u, selectedEntities: h = [], onGroupChange: p, onToggleExpand: m, searchPlaceholder: g, selectAllLabel: y, clearLabel: v, notFoundTitle: w, notFoundSubtitle: x, className: b, actions: _, onCreate: C, onCreateLabel: N, singleSelector: A = !1, loading: L = !1, disabled: S = !1, hiddenAvatar: D = !1 }) => {
18663
- const E = ee.useRef(null), R = le(() => t ? e.reduce((V, G) => {
18657
+ const E = ee.useRef(null), R = ae(() => t ? e.reduce((H, G) => {
18664
18658
  var me;
18665
- return V + (((me = G.subItems) == null ? void 0 : me.length) ?? 0);
18659
+ return H + (((me = G.subItems) == null ? void 0 : me.length) ?? 0);
18666
18660
  }, 0) : e.length, [e, t]), B = Pe(() => {
18667
18661
  setTimeout(() => {
18668
- var V;
18669
- (V = E.current) == null || V.scrollTo({
18662
+ var H;
18663
+ (H = E.current) == null || H.scrollTo({
18670
18664
  top: 0
18671
18665
  });
18672
18666
  }, l5), setTimeout(() => {
@@ -18675,40 +18669,40 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18675
18669
  }, c5);
18676
18670
  }, []), F = Pe(() => {
18677
18671
  setTimeout(() => {
18678
- var V, G;
18672
+ var H, G;
18679
18673
  (G = E.current) == null || G.scrollTo({
18680
- top: (V = E.current) == null ? void 0 : V.scrollHeight
18674
+ top: (H = E.current) == null ? void 0 : H.scrollHeight
18681
18675
  });
18682
18676
  }, l5), setTimeout(() => {
18683
18677
  var G;
18684
- const V = Array.from(document.querySelectorAll(d5));
18685
- (G = V[V.length - 1]) == null || G.focus();
18678
+ const H = Array.from(document.querySelectorAll(d5));
18679
+ (G = H[H.length - 1]) == null || G.focus();
18686
18680
  }, c5);
18687
- }, []), z = le(() => new Map(h.map((V) => [V.id, V])), [h]), U = Pe((V) => {
18681
+ }, []), z = ae(() => new Map(h.map((H) => [H.id, H])), [h]), U = Pe((H) => {
18688
18682
  var Qe;
18689
- const G = z.get(V.id);
18683
+ const G = z.get(H.id);
18690
18684
  if (!t)
18691
18685
  return {
18692
18686
  selected: !!G,
18693
18687
  partialSelected: !!G
18694
18688
  };
18695
- const me = (V.subItems ?? []).filter((ot) => {
18689
+ const me = (H.subItems ?? []).filter((ot) => {
18696
18690
  var Ne;
18697
18691
  return (Ne = G == null ? void 0 : G.subItems) == null ? void 0 : Ne.some((wt) => wt.subId === ot.subId);
18698
- }), ke = (((Qe = V.subItems) == null ? void 0 : Qe.length) ?? 0) === me.length, ge = !ke && me.length > 0;
18692
+ }), ke = (((Qe = H.subItems) == null ? void 0 : Qe.length) ?? 0) === me.length, ge = !ke && me.length > 0;
18699
18693
  return {
18700
18694
  selected: ke,
18701
18695
  partialSelected: ge
18702
18696
  };
18703
- }, [t, z]), Q = Pe((V) => {
18704
- if (V.index === 0 && C)
18697
+ }, [t, z]), Q = Pe((H) => {
18698
+ if (H.index === 0 && C)
18705
18699
  return d(a5, {
18706
18700
  label: N ?? "",
18707
18701
  onCreate: () => C == null ? void 0 : C(r),
18708
18702
  goToFirst: B,
18709
18703
  goToLast: F
18710
18704
  });
18711
- const G = C ? V.index - 1 : V.index, me = e[G], { selected: ke, partialSelected: ge } = U(me);
18705
+ const G = C ? H.index - 1 : H.index, me = e[G], { selected: ke, partialSelected: ge } = U(me);
18712
18706
  return d(Oc, {
18713
18707
  expanded: me.expanded ?? !1,
18714
18708
  onExpand: () => m(me, !0),
@@ -18726,43 +18720,43 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18726
18720
  disabled: S,
18727
18721
  hiddenAvatar: D
18728
18722
  }, me.id);
18729
- }, [C, N, S, e, U, B, F, t, n, D, s, o, m, r, i, A]), ie = le(() => t ? e.flatMap((V) => {
18730
- const G = rc(h ?? [], V.id);
18723
+ }, [C, N, S, e, U, B, F, t, n, D, s, o, m, r, i, A]), ie = ae(() => t ? e.flatMap((H) => {
18724
+ const G = rc(h ?? [], H.id);
18731
18725
  return [{
18732
18726
  parent: null,
18733
18727
  subItem: {
18734
- subId: V.id,
18735
- subName: V.name,
18736
- subAvatar: V.avatar,
18737
- expanded: V.expanded ?? (G == null ? void 0 : G.expanded) ?? !1,
18738
- subItems: V.subItems,
18739
- subSearchKeys: V.searchKeys
18740
- }
18741
- }, ...(V.subItems ?? []).map((me) => ({
18728
+ subId: H.id,
18729
+ subName: H.name,
18730
+ subAvatar: H.avatar,
18731
+ expanded: H.expanded ?? (G == null ? void 0 : G.expanded) ?? !1,
18732
+ subItems: H.subItems,
18733
+ subSearchKeys: H.searchKeys
18734
+ }
18735
+ }, ...(H.subItems ?? []).map((me) => ({
18742
18736
  parent: {
18743
- ...V,
18744
- expanded: V.expanded ?? (G == null ? void 0 : G.expanded) ?? !1
18737
+ ...H,
18738
+ expanded: H.expanded ?? (G == null ? void 0 : G.expanded) ?? !1
18745
18739
  },
18746
18740
  subItem: me
18747
18741
  }))];
18748
- }).filter((V) => (!V.parent || V.parent.expanded) && (!!V.parent || !!V.subItem.subItems && V.subItem.subItems.length > 0)) : e.map((V) => ({
18742
+ }).filter((H) => (!H.parent || H.parent.expanded) && (!!H.parent || !!H.subItem.subItems && H.subItem.subItems.length > 0)) : e.map((H) => ({
18749
18743
  parent: null,
18750
18744
  subItem: {
18751
- subId: V.id,
18752
- subName: V.name,
18753
- subAvatar: V.avatar,
18754
- subSearchKeys: V.searchKeys
18745
+ subId: H.id,
18746
+ subName: H.name,
18747
+ subAvatar: H.avatar,
18748
+ subSearchKeys: H.searchKeys
18755
18749
  }
18756
- })), [t, e, h]), M = Pe((V) => {
18750
+ })), [t, e, h]), M = Pe((H) => {
18757
18751
  var Qe, ot;
18758
- if (V.index === 0 && C)
18752
+ if (H.index === 0 && C)
18759
18753
  return d(a5, {
18760
18754
  label: N ?? "",
18761
18755
  onCreate: () => C == null ? void 0 : C(r),
18762
18756
  goToFirst: B,
18763
18757
  goToLast: F
18764
18758
  });
18765
- const G = C ? V.index - 1 : V.index, me = ie[G].parent, ke = ie[G].subItem;
18759
+ const G = C ? H.index - 1 : H.index, me = ie[G].parent, ke = ie[G].subItem;
18766
18760
  if (!me) {
18767
18761
  const Ne = {
18768
18762
  id: ke.subId,
@@ -18825,12 +18819,12 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18825
18819
  isChild: !0,
18826
18820
  hiddenAvatar: D
18827
18821
  });
18828
- }, [ie, h, r, A, B, F, o, s, n, S, m, i, l, a, D, C, N]), [be, de] = le(() => {
18822
+ }, [ie, h, r, A, B, F, o, s, n, S, m, i, l, a, D, C, N]), [be, de] = ae(() => {
18829
18823
  if (!e.length)
18830
18824
  return [!1, !1];
18831
- let V = 0, G = 0;
18825
+ let H = 0, G = 0;
18832
18826
  if (!t)
18833
- V = e.length, G = e.reduce((ge, { id: Qe }) => ge + (z.has(Qe) ? 1 : 0), 0);
18827
+ H = e.length, G = e.reduce((ge, { id: Qe }) => ge + (z.has(Qe) ? 1 : 0), 0);
18834
18828
  else {
18835
18829
  const ge = new Set([...z.values()].flatMap((Qe) => {
18836
18830
  var ot;
@@ -18838,10 +18832,10 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18838
18832
  }));
18839
18833
  e.forEach((Qe) => {
18840
18834
  const ot = Qe.subItems ?? [];
18841
- V += ot.length, G += ot.filter((Ne) => ge.has(Ne.subId)).length;
18835
+ H += ot.length, G += ot.filter((Ne) => ge.has(Ne.subId)).length;
18842
18836
  });
18843
18837
  }
18844
- const me = V > 0 && G === V, ke = G > 0;
18838
+ const me = H > 0 && G === H, ke = G > 0;
18845
18839
  return [me, ke];
18846
18840
  }, [e, z, t]), I = ie.length, we = !A && (y || v), Re = _ && _.length > 0, Le = !L && (!A && we || Re);
18847
18841
  return k("div", {
@@ -18891,10 +18885,10 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18891
18885
  children: t ? d(kd, {
18892
18886
  height: vu,
18893
18887
  itemCount: I + (C ? 1 : 0),
18894
- itemSize: (V) => {
18888
+ itemSize: (H) => {
18895
18889
  var me;
18896
- if (V === 0 && C) return ku;
18897
- const G = C ? V - 1 : V;
18890
+ if (H === 0 && C) return ku;
18891
+ const G = C ? H - 1 : H;
18898
18892
  return ((me = ie[G]) == null ? void 0 : me.parent) === null ? gj : ku;
18899
18893
  },
18900
18894
  renderer: M,
@@ -18942,7 +18936,7 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
18942
18936
  text: t.subName
18943
18937
  })
18944
18938
  }), bj = ({ groupView: t, onSubItemRemove: e, onRemove: n, selectedEntities: i, selectedLabel: r, disabled: o = !1, hiddenAvatar: s = !1 }) => {
18945
- const a = le(() => {
18939
+ const a = ae(() => {
18946
18940
  const c = t ? i.flatMap((u) => (u.subItems ?? []).map((h) => ({
18947
18941
  parent: u,
18948
18942
  subItem: h
@@ -19034,7 +19028,7 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
19034
19028
  })]
19035
19029
  });
19036
19030
  }, xj = ({ placeholder: t, selected: e, selectedEntities: n, disabled: i = !1, hiddenAvatar: r = !1, label: o, labelIcon: s, icon: a, error: l, status: c, hint: f, onClickContent: u, hideLabel: h = !1, maxLength: p, loading: m = !1, required: g = !1, readonly: y = !1, append: v, size: w = "sm", open: x }) => {
19037
- const b = le(() => n.some((A) => A.subItems && A.subItems.length > 0), [n]), _ = le(() => b ? n.flatMap((A) => (A.subItems ?? []).map((L) => ({
19031
+ const b = ae(() => n.some((A) => A.subItems && A.subItems.length > 0), [n]), _ = ae(() => b ? n.flatMap((A) => (A.subItems ?? []).map((L) => ({
19038
19032
  parent: A,
19039
19033
  subItem: L
19040
19034
  }))) : n.map((A) => ({
@@ -19089,15 +19083,15 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
19089
19083
  });
19090
19084
  }, Ade = (t) => {
19091
19085
  var C;
19092
- const [e, n] = H((t.alwaysOpen || t.defaultOpen) ?? !1), i = (N) => {
19086
+ const [e, n] = V((t.alwaysOpen || t.defaultOpen) ?? !1), i = (N) => {
19093
19087
  var A;
19094
19088
  n(N), (A = t.onOpenChange) == null || A.call(t, N);
19095
19089
  };
19096
- ae(() => {
19090
+ le(() => {
19097
19091
  var N;
19098
19092
  t.defaultOpen && e && ((N = t.onOpenChange) == null || N.call(t, !0));
19099
19093
  }, [t.defaultOpen]);
19100
- const [r, o] = H(t.entities), [s, a] = H(""), [l, c] = KS("", 300), f = le(() => t.entities.some((N) => N.subItems && N.subItems.length > 0), [t.entities]);
19094
+ const [r, o] = V(t.entities), [s, a] = V(""), [l, c] = KS("", 300), f = ae(() => t.entities.some((N) => N.subItems && N.subItems.length > 0), [t.entities]);
19101
19095
  function u(N) {
19102
19096
  if (t.singleSelector) {
19103
19097
  t.onSelect(N), n(!1);
@@ -19246,7 +19240,7 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
19246
19240
  expanded: !N.expanded
19247
19241
  } : L));
19248
19242
  };
19249
- ae(() => {
19243
+ le(() => {
19250
19244
  if (!l) {
19251
19245
  o(t.entities);
19252
19246
  return;
@@ -19277,7 +19271,7 @@ const a5 = ({ label: t, onCreate: e, goToFirst: n, goToLast: i }) => d("div", {
19277
19271
  o(N);
19278
19272
  }
19279
19273
  }, [l, t.entities, t.applySearchToGroup, f, o]);
19280
- const x = fe(null), [b, _] = H(0);
19274
+ const x = fe(null), [b, _] = V(0);
19281
19275
  return Gf(() => {
19282
19276
  const N = () => {
19283
19277
  x.current && _(x.current.offsetWidth);
@@ -20403,7 +20397,7 @@ function Uj(t = {}) {
20403
20397
  ...n,
20404
20398
  ...$.keepDirty ? { isDirty: E() } : {}
20405
20399
  }), !$.keepIsValid && y();
20406
- }, V = ({ disabled: P, name: $, field: W, fields: oe }) => {
20400
+ }, H = ({ disabled: P, name: $, field: W, fields: oe }) => {
20407
20401
  (ei(P) && s.mount || P || a.disabled.has($)) && (P ? a.disabled.add($) : a.disabled.delete($), C($, xu(W ? W._f : pe(oe, $)._f), !1, !1, !0));
20408
20402
  }, G = (P, $ = {}) => {
20409
20403
  let W = pe(i, P);
@@ -20416,7 +20410,7 @@ function Uj(t = {}) {
20416
20410
  mount: !0,
20417
20411
  ...$
20418
20412
  }
20419
- }), a.mount.add(P), W ? V({
20413
+ }), a.mount.add(P), W ? H({
20420
20414
  field: W,
20421
20415
  disabled: ei($.disabled) ? $.disabled : e.disabled,
20422
20416
  name: P
@@ -20563,7 +20557,7 @@ function Uj(t = {}) {
20563
20557
  _updateValid: y,
20564
20558
  _removeUnmounted: D,
20565
20559
  _updateFieldArray: w,
20566
- _updateDisabledField: V,
20560
+ _updateDisabledField: H,
20567
20561
  _getFieldArray: B,
20568
20562
  _reset: ot,
20569
20563
  _resetDefaultValues: () => Ii(e.defaultValues) && e.defaultValues().then((P) => {
@@ -24005,7 +23999,7 @@ button {
24005
23999
  `;
24006
24000
  function nq(t) {
24007
24001
  const e = fe(null), n = fe(null);
24008
- return n.current && n.current.update(t), ae(() => (n.current = new a2({
24002
+ return n.current && n.current.update(t), le(() => (n.current = new a2({
24009
24003
  ...t,
24010
24004
  ref: e
24011
24005
  }), () => {
@@ -24016,7 +24010,7 @@ function nq(t) {
24016
24010
  }
24017
24011
  const iq = 36, rq = "10px", oq = 24, sq = 2;
24018
24012
  function l2({ onSelect: t, locale: e = "en", size: n = "md", variant: i = "outline", lastEmojiReaction: r }) {
24019
- const [o, s] = H(!1);
24013
+ const [o, s] = V(!1);
24020
24014
  return k(Bp, {
24021
24015
  open: o,
24022
24016
  onOpenChange: s,
@@ -24150,8 +24144,8 @@ function dq(t) {
24150
24144
  return { canvasRef: e, handleMouseEnter: i, handleMouseLeave: r };
24151
24145
  }
24152
24146
  const fq = ({ link: t, firstName: e, lastName: n, src: i, onClick: r, canReact: o = !0, lastEmojiReaction: s, onReactionSelect: a, type: l, typeLabel: c, date: f }) => {
24153
- const [u, h] = H(s), p = fe(null);
24154
- ae(() => {
24147
+ const [u, h] = V(s), p = fe(null);
24148
+ le(() => {
24155
24149
  h(s);
24156
24150
  }, [s]);
24157
24151
  const m = (b) => {
@@ -24256,7 +24250,7 @@ const fq = ({ link: t, firstName: e, lastName: n, src: i, onClick: r, canReact:
24256
24250
  })]
24257
24251
  });
24258
24252
  function hq({ emoji: t, initialCount: e, hasReacted: n = !1, users: i, onInteraction: r }) {
24259
- const [o, s] = H(n), [a, l] = H(e), c = fe(null), { fireEmojiConfetti: f } = rL(), u = (m, g) => {
24253
+ const [o, s] = V(n), [a, l] = V(e), c = fe(null), { fireEmojiConfetti: f } = rL(), u = (m, g) => {
24260
24254
  m.stopPropagation(), l(a + (o ? -1 : 1)), s(!o), r == null || r(g), o || f(g, c);
24261
24255
  }, h = (i == null ? void 0 : i.map((m) => m.name).join(", ")) || "", p = d(zo, {
24262
24256
  ref: c,
@@ -24653,12 +24647,12 @@ const K5 = (t) => {
24653
24647
  })]
24654
24648
  })]
24655
24649
  }), jde = xt(wq, xq), Cq = ({ description: t }) => {
24656
- const [e, n] = H(!1), [i, r] = H(!1), o = Be(), s = fe(null), a = fe(null), l = rd({
24650
+ const [e, n] = V(!1), [i, r] = V(!1), o = Be(), s = fe(null), a = fe(null), l = rd({
24657
24651
  ref: s
24658
24652
  }), c = rd({
24659
24653
  ref: a
24660
24654
  });
24661
- return ae(() => {
24655
+ return le(() => {
24662
24656
  c.height && l.height && r(c.height > l.height);
24663
24657
  }, [c.height, l.height]), k("div", {
24664
24658
  className: "flex max-w-[640px] flex-col gap-1",
@@ -24784,7 +24778,7 @@ function Eu({ item: t, collapse: e = !1 }) {
24784
24778
  const Sq = (t) => (t == null ? void 0 : t.type) !== "copy", Lq = (t) => (t == null ? void 0 : t.type) === "copy";
24785
24779
  function Eq({ item: t }) {
24786
24780
  var a, l, c;
24787
- const [e, n] = H(!1), i = t.value.type === "data-list" && t.value.data.length > 1 || t.value.type === "tag-list" && t.value.tags.length > 1, r = !!((a = t.actions) != null && a.length), o = r || i, s = (f, u) => {
24781
+ const [e, n] = V(!1), i = t.value.type === "data-list" && t.value.data.length > 1 || t.value.type === "tag-list" && t.value.tags.length > 1, r = !!((a = t.actions) != null && a.length), o = r || i, s = (f, u) => {
24788
24782
  if (u)
24789
24783
  return u;
24790
24784
  let h;
@@ -25125,8 +25119,8 @@ const Wde = ({ avatar: t, title: e, description: n, primaryAction: i, secondaryA
25125
25119
  }, s))
25126
25120
  });
25127
25121
  }), Tq = 750, Oq = ({ text: t, children: e }) => {
25128
- const [n, i] = H(!1);
25129
- ae(() => {
25122
+ const [n, i] = V(!1);
25123
+ le(() => {
25130
25124
  if (n) {
25131
25125
  const o = setTimeout(() => i(!1), Tq);
25132
25126
  return () => clearTimeout(o);
@@ -25511,7 +25505,7 @@ function Bq(t, e, n) {
25511
25505
  }
25512
25506
  function $q(t, e) {
25513
25507
  const { sidebarState: n, toggleSidebar: i } = Ys(), r = fe(t);
25514
- ae(() => {
25508
+ le(() => {
25515
25509
  e && Bq(t, r.current, n) && i({
25516
25510
  isInvokedByUser: !1
25517
25511
  }), r.current = t;
@@ -25521,9 +25515,9 @@ function zq({ ai: t, aiPromotion: e, children: n, sidebar: i, banner: r }) {
25521
25515
  const { sidebarState: o, toggleSidebar: s, isSmallScreen: a, setForceFloat: l } = Ys(), c = qs(), { open: f } = Zr(), { open: u } = e1(), h = Dp(`(max-width: ${Sh.xl}px)`, {
25522
25516
  initializeWithValue: !0
25523
25517
  });
25524
- return ae(() => {
25518
+ return le(() => {
25525
25519
  l(f);
25526
- }, [f, l]), ae(() => {
25520
+ }, [f, l]), le(() => {
25527
25521
  l(u);
25528
25522
  }, [u, l]), $q(f, h), d(De, {
25529
25523
  children: d(W8, {
@@ -25606,7 +25600,7 @@ const d0 = {
25606
25600
  positive: "mood-positive",
25607
25601
  superPositive: "mood-super-positive"
25608
25602
  }, cb = ({ firstName: t, lastName: e, src: n, "aria-label": i, "aria-labelledby": r, pulse: o, onPulseClick: s }) => {
25609
- const a = Be(), [l, c] = H(!o);
25603
+ const a = Be(), [l, c] = V(!o);
25610
25604
  return d("div", {
25611
25605
  className: "relative h-10 w-10",
25612
25606
  children: d(Je, {
@@ -25830,7 +25824,7 @@ function Vq({ children: t, header: e, period: n, embedded: i = !1 }) {
25830
25824
  Vq.displayName = "DaytimePage";
25831
25825
  const jq = Kn(void 0);
25832
25826
  function Wq({ children: t }) {
25833
- const [e, n] = H(!1), [i, r] = H(null);
25827
+ const [e, n] = V(!1), [i, r] = V(null);
25834
25828
  return d(jq.Provider, {
25835
25829
  value: {
25836
25830
  isDragging: e,
@@ -26021,7 +26015,7 @@ function Y5({ item: t, counter: e, isActive: n, sortable: i, collapsible: r = !1
26021
26015
  }
26022
26016
  function c2({ item: t, counter: e, isActive: n, collapsible: i = !1, isExpanded: r = !1, onToggleExpanded: o = () => {
26023
26017
  }, sortable: s, children: a }) {
26024
- const l = vm(), [c, f] = H(!1), [u, h] = H(!1);
26018
+ const l = vm(), [c, f] = V(!1), [u, h] = V(!1);
26025
26019
  return s ? d(Qf, {
26026
26020
  as: "div",
26027
26021
  value: t,
@@ -26198,10 +26192,10 @@ function Od(t, e, n, i, r, o, s, a, l) {
26198
26192
  }, t.id);
26199
26193
  }
26200
26194
  function Zq({ title: t, items: e, className: n, activeItem: i, collapsible: r = !1, sortable: o = !1, showSearchBox: s = !1, searchPlaceholder: a, onReorder: l, hideChildrenCounter: c = !1 }) {
26201
- const f = Be(), [u, h] = H(""), p = (L) => {
26195
+ const f = Be(), [u, h] = V(""), p = (L) => {
26202
26196
  h(L);
26203
- }, m = le(() => Q5(e, u), [e, u]), [g, y] = H(Kq(e, i)), [v, w] = H(e);
26204
- ae(() => {
26197
+ }, m = ae(() => Q5(e, u), [e, u]), [g, y] = V(Kq(e, i)), [v, w] = V(e);
26198
+ le(() => {
26205
26199
  w(e);
26206
26200
  }, [e]);
26207
26201
  const x = fe(null), b = Pe((L) => L.map((S) => ({
@@ -26222,7 +26216,7 @@ function Zq({ title: t, items: e, className: n, activeItem: i, collapsible: r =
26222
26216
  children: D(B.children)
26223
26217
  } : B), E = D(v);
26224
26218
  w(E), l && l(b(E));
26225
- }, [v, l, b]), A = le(() => Q5(v, u), [v, u]);
26219
+ }, [v, l, b]), A = ae(() => Q5(v, u), [v, u]);
26226
26220
  return k("nav", {
26227
26221
  className: T("flex h-full w-[248px] flex-col overflow-hidden", n),
26228
26222
  "aria-label": t,
@@ -26314,7 +26308,7 @@ function Yq({ children: t, header: e, embedded: n = !1 }) {
26314
26308
  }
26315
26309
  Yq.displayName = "Page";
26316
26310
  function Xq({ companies: t, selected: e, onChange: n, isLoading: i = !1, withNotification: r = !1, additionalOptions: o = [] }) {
26317
- const s = le(() => t.find((a) => a.id === e) || t[0], [t, e]);
26311
+ const s = ae(() => t.find((a) => a.id === e) || t[0], [t, e]);
26318
26312
  return i ? k("div", {
26319
26313
  className: "flex w-fit items-center gap-2 p-1.5",
26320
26314
  children: [d(X, {
@@ -26346,7 +26340,7 @@ function Xq({ companies: t, selected: e, onChange: n, isLoading: i = !1, withNot
26346
26340
  });
26347
26341
  }
26348
26342
  const Qq = ({ companies: t, selected: e, onChange: n, children: i, additionalOptions: r = [] }) => {
26349
- const o = Be(), [s, a] = H(!1), l = le(() => [...t.map((f) => ({
26343
+ const o = Be(), [s, a] = V(!1), l = ae(() => [...t.map((f) => ({
26350
26344
  value: f.id,
26351
26345
  label: f.name,
26352
26346
  avatar: {
@@ -26496,7 +26490,7 @@ function eU({ isExpanded: t }) {
26496
26490
  }
26497
26491
  function tU() {
26498
26492
  const { prevSidebarState: t, sidebarState: e, toggleSidebar: n, isSmallScreen: i } = Ys(), r = fe(null);
26499
- return ae(() => {
26493
+ return le(() => {
26500
26494
  var o;
26501
26495
  t === "hidden" && e === "locked" && ((o = r.current) == null || o.focus());
26502
26496
  }, [t, e]), k(zo, {
@@ -26540,14 +26534,14 @@ function Xde({ companies: t, selected: e, onChange: n, withNotification: i = !1,
26540
26534
  });
26541
26535
  }
26542
26536
  function nU() {
26543
- const [t, e] = H(!1);
26544
- return ae(() => {
26537
+ const [t, e] = V(!1);
26538
+ return le(() => {
26545
26539
  e(window.matchMedia("(pointer: coarse)").matches);
26546
26540
  }, []), t;
26547
26541
  }
26548
26542
  const db = Kn(void 0);
26549
26543
  function iU({ children: t }) {
26550
- const [e, n] = H(!1), [i, r] = H(null);
26544
+ const [e, n] = V(!1), [i, r] = V(null);
26551
26545
  return d(db.Provider, {
26552
26546
  value: {
26553
26547
  isDragging: e,
@@ -26595,7 +26589,7 @@ const rU = ({ item: t, active: e }) => k("div", {
26595
26589
  }, sU = ({ item: t, tooltip: e, dragConstraints: n, onRemove: i, index: r, total: o, onMove: s, onReorderFinish: a, isSortable: l = !0 }) => {
26596
26590
  const c = Be(), { isDragging: f, setIsDragging: u, draggedItemId: h, setDraggedItemId: p } = d2(), { isActive: m } = Bf(), g = m(t.href, {
26597
26591
  exact: t.exactMatch
26598
- }), y = fe(!1), [v, w] = H(!1), x = r === 0, b = r === o - 1, _ = o === 1, C = le(() => {
26592
+ }), y = fe(!1), [v, w] = V(!1), x = r === 0, b = r === o - 1, _ = o === 1, C = ae(() => {
26599
26593
  const E = [];
26600
26594
  return !_ && !x && E.push({
26601
26595
  label: c.actions.moveUp,
@@ -26619,7 +26613,7 @@ const rU = ({ item: t, active: e }) => k("div", {
26619
26613
  u(!1), p(null), a(), setTimeout(() => {
26620
26614
  y.current = !1;
26621
26615
  }, 0);
26622
- }, L = f && h === t.href, S = le(() => T("group relative cursor-pointer select-none list-none rounded backdrop-blur-sm active:cursor-grabbing", l && "touch-none", g ? "bg-f1-background-secondary text-f1-foreground" : "hover:bg-f1-background-secondary", v && "bg-f1-background-secondary", L && "bg-f1-background-secondary"), [g, v, L, l]), D = le(() => k(De, {
26616
+ }, L = f && h === t.href, S = ae(() => T("group relative cursor-pointer select-none list-none rounded backdrop-blur-sm active:cursor-grabbing", l && "touch-none", g ? "bg-f1-background-secondary text-f1-foreground" : "hover:bg-f1-background-secondary", v && "bg-f1-background-secondary", L && "bg-f1-background-secondary"), [g, v, L, l]), D = ae(() => k(De, {
26623
26617
  children: [d("div", {
26624
26618
  className: "flex w-full items-center justify-between px-1.5 py-1.5",
26625
26619
  children: d(lU, {
@@ -26680,7 +26674,7 @@ const rU = ({ item: t, active: e }) => k("div", {
26680
26674
  children: D
26681
26675
  });
26682
26676
  }, fb = ({ title: t, isOpen: e = !0, isRoot: n, onCollapse: i, children: r, isDragging: o, wasDragging: s }) => {
26683
- const [a, l] = H(e), c = qs(), f = () => {
26677
+ const [a, l] = V(e), c = qs(), f = () => {
26684
26678
  if (o || s != null && s.current) return;
26685
26679
  const u = !a;
26686
26680
  l(u), i == null || i(u);
@@ -26810,7 +26804,7 @@ const rU = ({ item: t, active: e }) => k("div", {
26810
26804
  }) : p;
26811
26805
  };
26812
26806
  function Qde({ tree: t, onCollapse: e, onSort: n, onFavoritesChange: i, favorites: r }) {
26813
- const o = fe(null), s = t.filter((m) => m.isSortable === !1), [a, l] = H(t.filter((m) => m.isSortable !== !1)), [c, f] = H(0), u = Pe((m) => {
26807
+ const o = fe(null), s = t.filter((m) => m.isSortable === !1), [a, l] = V(t.filter((m) => m.isSortable !== !1)), [c, f] = V(0), u = Pe((m) => {
26814
26808
  l(m);
26815
26809
  }, []), h = Pe((m) => {
26816
26810
  n == null || n(m);
@@ -26834,8 +26828,8 @@ function Qde({ tree: t, onCollapse: e, onSort: n, onFavoritesChange: i, favorite
26834
26828
  });
26835
26829
  }
26836
26830
  function aU({ nonSortableItems: t, sortableItems: e, setSortableItems: n, containerRef: i, onCollapse: r, onDragEnd: o, favorites: s = [], onFavoritesChange: a, forceUpdate: l, disableDragging: c = !1 }) {
26837
- const f = Be(), { isDragging: u } = d2(), h = t.some((B) => B.isRoot), p = t.filter((B) => !B.isRoot).length > 0, m = e.length > 0, g = fe(null), [y, v] = H(s), w = s.length > 0;
26838
- ae(() => {
26831
+ const f = Be(), { isDragging: u } = d2(), h = t.some((B) => B.isRoot), p = t.filter((B) => !B.isRoot).length > 0, m = e.length > 0, g = fe(null), [y, v] = V(s), w = s.length > 0;
26832
+ le(() => {
26839
26833
  JSON.stringify(s) !== JSON.stringify(y) && v(s);
26840
26834
  }, [s]);
26841
26835
  const x = (B) => {
@@ -26847,10 +26841,10 @@ function aU({ nonSortableItems: t, sortableItems: e, setSortableItems: n, contai
26847
26841
  if (F < 0 || F >= y.length) return;
26848
26842
  const z = [...y], [U] = z.splice(B, 1);
26849
26843
  z.splice(F, 0, U), v(z), a == null || a(z);
26850
- }, [y, a]), [C, N] = H(!1), A = fe(null);
26851
- ae(() => {
26844
+ }, [y, a]), [C, N] = V(!1), A = fe(null);
26845
+ le(() => {
26852
26846
  e.length > 0 && !C && (n([...e]), N(!0));
26853
- }, [e, n, C]), ae(() => {
26847
+ }, [e, n, C]), le(() => {
26854
26848
  const B = () => {
26855
26849
  A.current !== null && window.clearTimeout(A.current), A.current = window.setTimeout(() => {
26856
26850
  i.current && e.length > 0 && l();
@@ -26860,7 +26854,7 @@ function aU({ nonSortableItems: t, sortableItems: e, setSortableItems: n, contai
26860
26854
  window.removeEventListener("resize", B), A.current !== null && window.clearTimeout(A.current);
26861
26855
  };
26862
26856
  }, [i, e, l]);
26863
- const L = "flex flex-col gap-0.5", S = le(() => y.reduce((B, F, z) => (F.label in B || (B[F.label] = []), B[F.label].push(z), B), {}), [y]), D = le(() => w && y.map((B, F) => d(sU, {
26857
+ const L = "flex flex-col gap-0.5", S = ae(() => y.reduce((B, F, z) => (F.label in B || (B[F.label] = []), B[F.label].push(z), B), {}), [y]), D = ae(() => w && y.map((B, F) => d(sU, {
26864
26858
  isSortable: !c,
26865
26859
  tooltip: (S[B.label] ?? []).length > 1 ? B.tooltip : void 0,
26866
26860
  item: B,
@@ -26872,7 +26866,7 @@ function aU({ nonSortableItems: t, sortableItems: e, setSortableItems: n, contai
26872
26866
  onReorderFinish: () => {
26873
26867
  a == null || a(y);
26874
26868
  }
26875
- }, `${B.href}-${B.label}`)), [w, y, S, b, _, a, c]), E = "flex flex-col gap-3", R = le(() => e.map((B) => d(Nu, {
26869
+ }, `${B.href}-${B.label}`)), [w, y, S, b, _, a, c]), E = "flex flex-col gap-3", R = ae(() => e.map((B) => d(Nu, {
26876
26870
  category: B,
26877
26871
  isSortable: !c,
26878
26872
  dragConstraints: i,
@@ -27143,7 +27137,7 @@ function ig(t) {
27143
27137
  return hU[t ?? "neutral"] ?? 0;
27144
27138
  }
27145
27139
  const mU = ({ title: t, approvalsRequired: e = 1, status: n, approvers: i }) => {
27146
- const r = Be(), o = e === 1 ? r.approvals.requiredNumbers.one : r.approvals.requiredNumbers.other.replace("{{count}}", e.toString()), s = r.approvals.statuses[n], a = le(() => i.map((l) => {
27140
+ const r = Be(), o = e === 1 ? r.approvals.requiredNumbers.one : r.approvals.requiredNumbers.other.replace("{{count}}", e.toString()), s = r.approvals.statuses[n], a = ae(() => i.map((l) => {
27147
27141
  const c = pU(l.status);
27148
27142
  return {
27149
27143
  firstName: l.firstName,
@@ -27274,7 +27268,7 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27274
27268
  const s = Be(), a = n === 1 ? s.status.selected.singular : s.status.selected.plural, l = e.slice(0, 2), c = e.slice(2).map((m) => ({
27275
27269
  ...m,
27276
27270
  critical: m.critical || !1
27277
- })), f = le(() => yU(o.primaryActions ?? []), [o.primaryActions]), u = le(() => f.map((m) => ({
27271
+ })), f = ae(() => yU(o.primaryActions ?? []), [o.primaryActions]), u = ae(() => f.map((m) => ({
27278
27272
  ...m,
27279
27273
  items: m.items.map((g) => ({
27280
27274
  value: g.label,
@@ -27284,7 +27278,7 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27284
27278
  description: g.description,
27285
27279
  disabled: g.disabled
27286
27280
  }))
27287
- })), [f]), h = le(() => f.length === 1 && f[0].items.length === 1 ? f[0].items[0] : null, [f]), p = Pe((m) => f.flatMap((g) => g.items).find((g) => g.label === m), [f]);
27281
+ })), [f]), h = ae(() => f.length === 1 && f[0].items.length === 1 ? f[0].items[0] : null, [f]), p = Pe((m) => f.flatMap((g) => g.items).find((g) => g.label === m), [f]);
27288
27282
  return d(Je, {
27289
27283
  children: t && k(te.div, {
27290
27284
  initial: {
@@ -27397,9 +27391,9 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27397
27391
  ...e,
27398
27392
  items: e.items.filter((n) => n.enabled === void 0 || n.enabled)
27399
27393
  })), SU = ({ primaryActions: t, secondaryActions: e, otherActions: n }) => {
27400
- const i = (Array.isArray(t) ? t : [t]).filter((l) => l !== void 0), r = e || [], o = le(() => (n || []).map((l) => l.items).reduce((l, c) => (l.length > 0 && l.push({
27394
+ const i = (Array.isArray(t) ? t : [t]).filter((l) => l !== void 0), r = e || [], o = ae(() => (n || []).map((l) => l.items).reduce((l, c) => (l.length > 0 && l.push({
27401
27395
  type: "separator"
27402
- }), l.push(...c), l), []), [n]), [s, a] = H(!1);
27396
+ }), l.push(...c), l), []), [n]), [s, a] = V(!1);
27403
27397
  return i.length === 0 && r.length === 0 && o.length === 0 ? null : k("div", {
27404
27398
  className: "flex flex-row-reverse items-center gap-2",
27405
27399
  children: [i.length === 1 ? d(he, {
@@ -27451,7 +27445,7 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27451
27445
  icon: Ff,
27452
27446
  className: "text"
27453
27447
  }), LU = ({ value: t, onChange: e, loading: n = !1 }) => {
27454
- const [i, r] = H(!1), o = Kr(), s = fe(null), a = fe(null), l = Be(), c = () => {
27448
+ const [i, r] = V(!1), o = Kr(), s = fe(null), a = fe(null), l = Be(), c = () => {
27455
27449
  e(void 0), r(!1), a != null && a.current && (a.current.value = "");
27456
27450
  };
27457
27451
  uL(s, () => {
@@ -27614,7 +27608,7 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27614
27608
  }
27615
27609
  ]
27616
27610
  }
27617
- }, [r, o] = H(void 0);
27611
+ }, [r, o] = V(void 0);
27618
27612
  return { emptyState: r, setEmptyStateType: (a, l) => {
27619
27613
  if (!a) {
27620
27614
  o(void 0);
@@ -27635,7 +27629,7 @@ const yU = (t) => Array.isArray(t) ? t.every((e) => gU(e)) ? t : [{
27635
27629
  } };
27636
27630
  };
27637
27631
  function MU(t, { filters: e, onError: n } = {}) {
27638
- const [i, r] = H(void 0);
27632
+ const [i, r] = V(void 0);
27639
27633
  return {
27640
27634
  ...hL(t, {
27641
27635
  filters: e,
@@ -27715,7 +27709,7 @@ yb.displayName = "PaginationEllipsis";
27715
27709
  function NU({ totalPages: t, currentPage: e = 1, onPageChange: n, showControls: i = !0, ariaLabel: r = "Page navigation", visibleRange: o = 3, hasNextPage: s = !0, disabled: a = !1 }) {
27716
27710
  const l = t === 0, c = Pe((u) => {
27717
27711
  n && (l || u >= 1 && u <= t) && n(u);
27718
- }, [n, t, l]), f = le(() => {
27712
+ }, [n, t, l]), f = ae(() => {
27719
27713
  if (l) return [];
27720
27714
  const u = [];
27721
27715
  if (t <= 5)
@@ -27866,7 +27860,7 @@ const f2 = ({ paginationInfo: t, setPage: e, className: n }) => {
27866
27860
  });
27867
27861
  }, TU = ({ cardProperties: t, title: e, description: n, avatar: i, image: r, compact: o, source: s, onSelectItems: a, onLoadData: l, onLoadError: c, tmpFullWidth: f }) => {
27868
27862
  var A, L;
27869
- const u = le(() => {
27863
+ const u = ae(() => {
27870
27864
  if (s.dataAdapter.paginationType === "pages") {
27871
27865
  const S = s.dataAdapter.perPage, D = AU(S ?? 24);
27872
27866
  return {
@@ -27883,7 +27877,7 @@ const f2 = ({ paginationInfo: t, setPage: e, className: n }) => {
27883
27877
  c(S);
27884
27878
  }
27885
27879
  });
27886
- ae(() => {
27880
+ le(() => {
27887
27881
  l({
27888
27882
  totalItems: (p == null ? void 0 : p.total) || h.records.length,
27889
27883
  filters: s.currentFilters,
@@ -27986,26 +27980,26 @@ function OU(t, e) {
27986
27980
  return n;
27987
27981
  }
27988
27982
  const IU = ({ source: t, lane: e, onError: n, onHookUpdate: i }) => {
27989
- const r = le(() => OU(t.currentFilters, e.filters), [t.currentFilters, e.filters]), o = h1(t, {
27983
+ const r = ae(() => OU(t.currentFilters, e.filters), [t.currentFilters, e.filters]), o = h1(t, {
27990
27984
  filters: r,
27991
27985
  onError: n
27992
27986
  });
27993
- return ae(() => {
27987
+ return le(() => {
27994
27988
  i == null || i(o);
27995
27989
  }, [o]), null;
27996
27990
  };
27997
27991
  function DU(t, e = {}) {
27998
27992
  const { lanes: n } = t;
27999
- if (!le(() => n && n.length > 0, [n]))
27993
+ if (!ae(() => n && n.length > 0, [n]))
28000
27994
  throw new Error("Lanes has not been configured on data source");
28001
- const [r, o] = H({}), s = Pe((y, v) => {
27995
+ const [r, o] = V({}), s = Pe((y, v) => {
28002
27996
  o((w) => ({
28003
27997
  ...w,
28004
27998
  [y]: v
28005
27999
  }));
28006
- }, []), a = le(() => JSON.stringify(n), [n]), l = le(() => JSON.stringify(t.currentFilters), [t.currentFilters]), c = le(() => JSON.stringify(t.currentNavigationFilters), [t.currentNavigationFilters]), f = le(() => JSON.stringify(t.currentSortings), [t.currentSortings]), u = le(() => JSON.stringify(t.currentGrouping), [t.currentGrouping]), h = le(() => JSON.stringify(t.currentSearch), [t.currentSearch]), p = le(() => JSON.stringify(t.grouping), [t.grouping]), m = le(() => JSON.stringify(t.dataAdapter), [t.dataAdapter]);
28000
+ }, []), a = ae(() => JSON.stringify(n), [n]), l = ae(() => JSON.stringify(t.currentFilters), [t.currentFilters]), c = ae(() => JSON.stringify(t.currentNavigationFilters), [t.currentNavigationFilters]), f = ae(() => JSON.stringify(t.currentSortings), [t.currentSortings]), u = ae(() => JSON.stringify(t.currentGrouping), [t.currentGrouping]), h = ae(() => JSON.stringify(t.currentSearch), [t.currentSearch]), p = ae(() => JSON.stringify(t.grouping), [t.grouping]), m = ae(() => JSON.stringify(t.dataAdapter), [t.dataAdapter]);
28007
28001
  return {
28008
- lanesProvider: le(() => (n || []).map((y) => d(IU, {
28002
+ lanesProvider: ae(() => (n || []).map((y) => d(IU, {
28009
28003
  lane: y,
28010
28004
  onError: e.onError,
28011
28005
  source: t,
@@ -28044,24 +28038,24 @@ const RU = (t) => {
28044
28038
  records: [],
28045
28039
  groups: []
28046
28040
  }, t.paginationInfo, t.source, t.onSelectItems, t.source.defaultSelectedItems);
28047
- return ae(() => {
28041
+ return le(() => {
28048
28042
  t.onHookUpdate(e);
28049
28043
  }, [e]), null;
28050
28044
  }, PU = (t, e, n) => {
28051
- const [i, r] = H(/* @__PURE__ */ new Map()), [o, s] = H({
28045
+ const [i, r] = V(/* @__PURE__ */ new Map()), [o, s] = V({
28052
28046
  selectItemsStatus: /* @__PURE__ */ new Map(),
28053
28047
  clearCallback: /* @__PURE__ */ new Map()
28054
28048
  }), a = Pe(() => {
28055
28049
  o.clearCallback.forEach((c) => c());
28056
28050
  }, [o.clearCallback]);
28057
- ae(() => {
28051
+ le(() => {
28058
28052
  const c = Object.fromEntries(o.selectItemsStatus);
28059
28053
  n == null || n({
28060
28054
  ...RU(o.selectItemsStatus),
28061
28055
  byLane: c
28062
28056
  }, a);
28063
28057
  }, [o]);
28064
- const l = le(() => (t || []).map((c) => d(FU, {
28058
+ const l = ae(() => (t || []).map((c) => d(FU, {
28065
28059
  source: e,
28066
28060
  data: c.data || {
28067
28061
  type: "flat",
@@ -28181,7 +28175,7 @@ function GU(t) {
28181
28175
  }
28182
28176
  const KU = 'button, a[href], input, select, textarea, [role="button"], [role="checkbox"], [role="menuitem"], [role="option"], [role="radio"], [role="switch"]', ZU = (t) => t instanceof HTMLElement ? !!t.closest(KU) : !1;
28183
28177
  function JU({ drag: t, id: e, index: n, total: i, laneId: r, draggable: o = !1, showIndicator: s = !0, disabledEdges: a = [], forcedEdge: l = null, ...c }) {
28184
- const f = fe(null), u = fe(null), [h, p] = H(null);
28178
+ const f = fe(null), u = fe(null), [h, p] = V(null);
28185
28179
  gL({
28186
28180
  ref: f,
28187
28181
  payload: {
@@ -28189,7 +28183,7 @@ function JU({ drag: t, id: e, index: n, total: i, laneId: r, draggable: o = !1,
28189
28183
  id: t.id,
28190
28184
  data: t.data
28191
28185
  }
28192
- }), ae(() => {
28186
+ }), le(() => {
28193
28187
  if (f.current)
28194
28188
  return Nh({
28195
28189
  element: f.current,
@@ -28264,7 +28258,7 @@ function JU({ drag: t, id: e, index: n, total: i, laneId: r, draggable: o = !1,
28264
28258
  }
28265
28259
  const u2 = (t, e, n, i) => {
28266
28260
  const r = fe(null);
28267
- return ae(() => {
28261
+ return le(() => {
28268
28262
  if (!ad(t) || !t.hasMore)
28269
28263
  return;
28270
28264
  const o = r.current;
@@ -28469,12 +28463,12 @@ function iG(t) {
28469
28463
  };
28470
28464
  }
28471
28465
  function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28472
- const r = fe(null), o = fe(null), s = fe(null), [a, l] = H(!1), [c, f] = H(null), u = !!(t && e), h = fe(null), p = fe(null), m = fe(null), g = fe(0), y = fe(null), [v, w] = H(!1), [x, b] = H(null), [_, C] = H(null), [N, A] = H(!1), [L, S] = H(-1);
28466
+ const r = fe(null), o = fe(null), s = fe(null), [a, l] = V(!1), [c, f] = V(null), u = !!(t && e), h = fe(null), p = fe(null), m = fe(null), g = fe(0), y = fe(null), [v, w] = V(!1), [x, b] = V(null), [_, C] = V(null), [N, A] = V(!1), [L, S] = V(-1);
28473
28467
  return kL(u ? {
28474
28468
  ref: r,
28475
28469
  id: t,
28476
28470
  accepts: ["list-card"]
28477
- } : void 0), ae(() => {
28471
+ } : void 0), le(() => {
28478
28472
  const D = () => {
28479
28473
  const E = performance.now(), R = y.current ?? E, B = (E - R) / 1e3;
28480
28474
  y.current = E;
@@ -28488,7 +28482,7 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28488
28482
  return m.current == null && v && g.current !== 0 && (y.current = null, m.current = window.requestAnimationFrame(D)), () => {
28489
28483
  m.current != null && (window.cancelAnimationFrame(m.current), m.current = null), y.current = null, g.current = 0;
28490
28484
  };
28491
- }, [v]), ae(() => {
28485
+ }, [v]), le(() => {
28492
28486
  if (!t) return;
28493
28487
  const D = () => {
28494
28488
  m.current == null && g.current !== 0 && (y.current = null, m.current = window.requestAnimationFrame(() => {
@@ -28509,17 +28503,17 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28509
28503
  onDropTargetChange: ({ location: R, source: B }) => {
28510
28504
  var be, de, I, we, Re;
28511
28505
  const F = R.current.dropTargets.some((Le) => {
28512
- const V = Le.data;
28513
- return V.type === "list-droppable" && V.id === t;
28506
+ const H = Le.data;
28507
+ return H.type === "list-droppable" && H.id === t;
28514
28508
  });
28515
28509
  l(F);
28516
- const z = String(B.data.id), Q = String(((be = B.data.data) == null ? void 0 : be.laneId) ?? "") || String(((I = (de = R.initial.dropTargets.find((Le) => Le.data.type === "list-droppable")) == null ? void 0 : de.data) == null ? void 0 : I.id) ?? ""), ie = String(Q) === String(t), M = i.items.findIndex((Le, V) => String(i.getKey(Le, V)) === z);
28510
+ const z = String(B.data.id), Q = String(((be = B.data.data) == null ? void 0 : be.laneId) ?? "") || String(((I = (de = R.initial.dropTargets.find((Le) => Le.data.type === "list-droppable")) == null ? void 0 : de.data) == null ? void 0 : I.id) ?? ""), ie = String(Q) === String(t), M = i.items.findIndex((Le, H) => String(i.getKey(Le, H)) === z);
28517
28511
  if (F && ie ? S(M) : (!F || !ie) && S(-1), F && v && i.items.length === 0 ? (A(!0), b(null), C(null)) : F && v && i.items.length > 0 && A(!1), F && v) {
28518
28512
  const Le = p.current || r.current;
28519
28513
  if (Le) {
28520
- const V = Le.getBoundingClientRect(), G = (we = R.current.input) == null ? void 0 : we.clientY, me = (Re = R.current.input) == null ? void 0 : Re.clientX;
28514
+ const H = Le.getBoundingClientRect(), G = (we = R.current.input) == null ? void 0 : we.clientY, me = (Re = R.current.input) == null ? void 0 : Re.clientX;
28521
28515
  if (typeof G == "number" && typeof me == "number") {
28522
- const ke = V.top + V.height / 2, ge = G - ke, Qe = 24, ot = 300, Ne = V.height / 2;
28516
+ const ke = H.top + H.height / 2, ge = G - ke, Qe = 24, ot = 300, Ne = H.height / 2;
28523
28517
  let wt = 0;
28524
28518
  if (Math.abs(ge) > Qe) {
28525
28519
  const P = Math.min(Math.abs(ge) - Qe, Ne) / Ne;
@@ -28551,11 +28545,11 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28551
28545
  l(!1), A(!1);
28552
28546
  const F = String(B.data.id);
28553
28547
  B.data.data;
28554
- const z = i.items.findIndex((V, G) => String(i.getKey(V, G)) === F), Q = String(((we = B.data.data) == null ? void 0 : we.laneId) ?? "") || String(((Le = (Re = R.initial.dropTargets.find((V) => V.data.type === "list-droppable")) == null ? void 0 : Re.data) == null ? void 0 : Le.id) ?? ""), ie = String(Q) !== String(t);
28548
+ const z = i.items.findIndex((H, G) => String(i.getKey(H, G)) === F), Q = String(((we = B.data.data) == null ? void 0 : we.laneId) ?? "") || String(((Le = (Re = R.initial.dropTargets.find((H) => H.data.type === "list-droppable")) == null ? void 0 : Re.data) == null ? void 0 : Le.id) ?? ""), ie = String(Q) !== String(t);
28555
28549
  if (!ie && z >= 0) {
28556
- const V = R.current.dropTargets.find((G) => G.data.type === "list-card-target");
28557
- if (V) {
28558
- const G = V.data.index, me = V.data.closestEdge;
28550
+ const H = R.current.dropTargets.find((G) => G.data.type === "list-card-target");
28551
+ if (H) {
28552
+ const G = H.data.index, me = H.data.closestEdge;
28559
28553
  if (G !== void 0 && me) {
28560
28554
  let ke = !1;
28561
28555
  if ((G === z || G === z - 1 && me === "bottom" || G === z + 1 && me === "top") && (ke = !0), ke)
@@ -28567,8 +28561,8 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28567
28561
  b(null), C(null);
28568
28562
  return;
28569
28563
  }
28570
- if (!R.current.dropTargets.some((V) => {
28571
- const G = V.data;
28564
+ if (!R.current.dropTargets.some((H) => {
28565
+ const G = H.data;
28572
28566
  return G.type === "list-droppable" && G.id === t;
28573
28567
  }))
28574
28568
  return;
@@ -28606,15 +28600,15 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28606
28600
  sourceId: F
28607
28601
  }), !!be) {
28608
28602
  if (!ie && be.indexOfTarget !== void 0) {
28609
- const V = be.indexOfTarget, G = be.position;
28610
- if (V === z && G === "above" || V === z && G === "below" || V === z - 1 && G === "below" || V === z + 1 && G === "above")
28603
+ const H = be.indexOfTarget, G = be.position;
28604
+ if (H === z && G === "above" || H === z && G === "below" || H === z - 1 && G === "below" || H === z + 1 && G === "above")
28611
28605
  return;
28612
28606
  }
28613
28607
  await (n == null ? void 0 : n(be)), b(null), C(null);
28614
28608
  }
28615
28609
  }
28616
28610
  });
28617
- }, [t, e, n, v, i.items, i.getKey, x, _]), ae(() => {
28611
+ }, [t, e, n, v, i.items, i.getKey, x, _]), le(() => {
28618
28612
  const D = () => {
28619
28613
  const B = r.current;
28620
28614
  return B ? (p.current = B.querySelector("[data-scroll-container]"), p.current) : null;
@@ -28631,7 +28625,7 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28631
28625
  }), () => R.disconnect();
28632
28626
  }, [t]), K8(({ phase: D }) => {
28633
28627
  D === "start" && w(!0), (D === "drop" || D === "cancel") && (w(!1), A(!1), b(null), C(null), S(-1));
28634
- }), ae(() => {
28628
+ }), le(() => {
28635
28629
  const D = (E) => {
28636
28630
  if (!t) return;
28637
28631
  const R = E.detail;
@@ -28705,8 +28699,8 @@ function rG({ id: t, getLaneResourceIndexById: e, onMove: n, ...i }) {
28705
28699
  });
28706
28700
  }
28707
28701
  function lg(t) {
28708
- const { lanes: e, renderCard: n, getKey: i, className: r, dnd: o, loading: s, onCreate: a } = t, [l, c] = H(() => e), f = fe(""), u = fe(null);
28709
- ae(() => {
28702
+ const { lanes: e, renderCard: n, getKey: i, className: r, dnd: o, loading: s, onCreate: a } = t, [l, c] = V(() => e), f = fe(""), u = fe(null);
28703
+ le(() => {
28710
28704
  const C = e.map((N) => `${N.id}:[${N.items.map((A, L) => i(A, L, N.id)).join(",")}]`).join("|");
28711
28705
  if (u.current !== null)
28712
28706
  if (C === u.current)
@@ -28715,10 +28709,10 @@ function lg(t) {
28715
28709
  return;
28716
28710
  else C !== f.current && (f.current = C, c(e));
28717
28711
  }, [e, i, l]);
28718
- const [h, p] = H(!1), m = fe(null), g = fe(null), y = fe(null), v = fe(null), w = fe(0), x = fe(null);
28712
+ const [h, p] = V(!1), m = fe(null), g = fe(null), y = fe(null), v = fe(null), w = fe(0), x = fe(null);
28719
28713
  K8(({ phase: C }) => {
28720
28714
  C === "start" && p(!0), (C === "drop" || C === "cancel") && p(!1);
28721
- }), ae(() => {
28715
+ }), le(() => {
28722
28716
  const C = () => {
28723
28717
  const S = performance.now(), D = x.current ?? S, E = (S - D) / 1e3;
28724
28718
  x.current = S;
@@ -28821,14 +28815,14 @@ function lg(t) {
28821
28815
  position: D ?? "above"
28822
28816
  } : null));
28823
28817
  return I && c((we) => {
28824
- const Re = we.map((V) => {
28825
- if (V.id !== A) return V;
28826
- const G = [...V.items], me = G.findIndex((ke, ge) => String(i(ke, ge, A)) === String(L));
28818
+ const Re = we.map((H) => {
28819
+ if (H.id !== A) return H;
28820
+ const G = [...H.items], me = G.findIndex((ke, ge) => String(i(ke, ge, A)) === String(L));
28827
28821
  return me !== -1 && G.splice(me, 1, I), {
28828
- ...V,
28822
+ ...H,
28829
28823
  items: G
28830
28824
  };
28831
- }), Le = Re.map((V) => `${V.id}:[${V.items.map((G, me) => i(G, me, V.id)).join(",")}]`).join("|");
28825
+ }), Le = Re.map((H) => `${H.id}:[${H.items.map((G, me) => i(G, me, H.id)).join(",")}]`).join("|");
28832
28826
  return f.current = Le, Re;
28833
28827
  }), I;
28834
28828
  } catch (de) {
@@ -28884,7 +28878,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
28884
28878
  }), p = wL();
28885
28879
  if (a.currentGrouping && p)
28886
28880
  throw new Error("Grouping is not supported in Kanban yet");
28887
- const [m] = H(() => Symbol("kanban-visualization")), g = a.idProvider, y = le(() => JSON.stringify(Object.values(h).map((E) => E.data)), [h]), v = le(() => t.map((E) => {
28881
+ const [m] = V(() => Symbol("kanban-visualization")), g = a.idProvider, y = ae(() => JSON.stringify(Object.values(h).map((E) => E.data)), [h]), v = ae(() => t.map((E) => {
28888
28882
  var R, B;
28889
28883
  return {
28890
28884
  ...E,
@@ -28951,7 +28945,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
28951
28945
  }, z);
28952
28946
  },
28953
28947
  onCreate: s
28954
- }, _ = le(() => {
28948
+ }, _ = ae(() => {
28955
28949
  const E = Object.values(h);
28956
28950
  if (E.length !== 0)
28957
28951
  return E.reduce((R, B) => {
@@ -28959,11 +28953,11 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
28959
28953
  const F = ((z = B.paginationInfo) == null ? void 0 : z.total) ?? B.data.records.length;
28960
28954
  return R + (typeof F == "number" ? F : 0);
28961
28955
  }, 0);
28962
- }, [h]), C = le(() => {
28956
+ }, [h]), C = ae(() => {
28963
28957
  const E = Object.values(h);
28964
28958
  return E.length === 0 ? !0 : E.some((R) => R.isInitialLoading);
28965
28959
  }, [h]);
28966
- ae(() => {
28960
+ le(() => {
28967
28961
  f({
28968
28962
  totalItems: _,
28969
28963
  filters: a.currentFilters,
@@ -28972,7 +28966,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
28972
28966
  data: Object.values(h).flatMap((E) => E.data.records)
28973
28967
  });
28974
28968
  }, [_, C]);
28975
- const N = a.currentSortings === null, A = le(() => {
28969
+ const N = a.currentSortings === null, A = ae(() => {
28976
28970
  const E = /* @__PURE__ */ new Map();
28977
28971
  return v.forEach((R) => {
28978
28972
  const B = /* @__PURE__ */ new Map();
@@ -28991,7 +28985,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
28991
28985
  },
28992
28986
  onMove: o
28993
28987
  };
28994
- const L = le(() => t.map((E) => {
28988
+ const L = ae(() => t.map((E) => {
28995
28989
  var R, B;
28996
28990
  return {
28997
28991
  id: E.id,
@@ -29019,8 +29013,8 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29019
29013
  value: t,
29020
29014
  delay: e
29021
29015
  }) => {
29022
- const [n, i] = H(!1);
29023
- return ae(() => {
29016
+ const [n, i] = V(!1);
29017
+ return le(() => {
29024
29018
  let r;
29025
29019
  return t ? r = setTimeout(() => {
29026
29020
  i(t);
@@ -29029,7 +29023,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29029
29023
  };
29030
29024
  }, [t, e]), n;
29031
29025
  }, bb = ({ items: t, onOpenChange: e, align: n = "end", label: i = "Actions", className: r }) => {
29032
- const [o, s] = H(!1);
29026
+ const [o, s] = V(!1);
29033
29027
  return !t || t.length === 0 ? null : d("div", {
29034
29028
  className: T("pointer-events-auto", r),
29035
29029
  children: d(mn, {
@@ -29081,7 +29075,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29081
29075
  source: t,
29082
29076
  item: e
29083
29077
  }) => {
29084
- const [n, i] = H(!1), [r, o] = H(null);
29078
+ const [n, i] = V(!1), [r, o] = V(null);
29085
29079
  if (!t.itemActions)
29086
29080
  return {
29087
29081
  primaryItemActions: [],
@@ -29310,7 +29304,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29310
29304
  o(D);
29311
29305
  }
29312
29306
  });
29313
- ae(() => {
29307
+ le(() => {
29314
29308
  r({
29315
29309
  totalItems: (l == null ? void 0 : l.total) || a.records.length,
29316
29310
  filters: n.currentFilters,
@@ -29437,7 +29431,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29437
29431
  throw new Error("useTableSettings must be used within a TableSettingsProvider");
29438
29432
  return t;
29439
29433
  }, hG = ({ children: t }) => {
29440
- const [e, n] = H({
29434
+ const [e, n] = V({
29441
29435
  visualization: uG()
29442
29436
  }), i = (r, o) => {
29443
29437
  n(typeof o == "function" ? (s) => ({
@@ -29463,17 +29457,17 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29463
29457
  children: t
29464
29458
  });
29465
29459
  }, so = (t) => t.id ?? t.label ?? "column", pG = (t) => [...t].sort((e, n) => (e.order ?? t.length) - (n.order ?? t.length)).map((e) => so(e)), mG = (t) => t.filter((e) => e.hidden && !e.noHiding).map((e) => so(e)), Eb = (t, e, n, i, r) => {
29466
- const [o, s] = H(
29460
+ const [o, s] = V(
29467
29461
  (r ? n == null ? void 0 : n.hidden : void 0) ?? mG(t)
29468
- ), [a, l] = H(
29462
+ ), [a, l] = V(
29469
29463
  (i ? n == null ? void 0 : n.order : void 0) ?? pG(t)
29470
29464
  );
29471
- ae(() => {
29465
+ le(() => {
29472
29466
  n != null && n.hidden && s(n.hidden);
29473
- }, [JSON.stringify(n == null ? void 0 : n.hidden)]), ae(() => {
29467
+ }, [JSON.stringify(n == null ? void 0 : n.hidden)]), le(() => {
29474
29468
  n != null && n.order && l(n.order);
29475
29469
  }, [JSON.stringify(n == null ? void 0 : n.order)]);
29476
- const c = le(() => {
29470
+ const c = ae(() => {
29477
29471
  const u = [...t], h = e || 1;
29478
29472
  return [
29479
29473
  // Frozen columns can not be hidden even if the id is in status
@@ -29511,7 +29505,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29511
29505
  r
29512
29506
  ]);
29513
29507
  return {
29514
- columns: le(() => c.filter((u) => u.visible).map((u) => u.column), [c]),
29508
+ columns: ae(() => c.filter((u) => u.visible).map((u) => u.column), [c]),
29515
29509
  columnsWithStatus: c,
29516
29510
  colsHidden: o,
29517
29511
  setColsHidden: s,
@@ -29587,7 +29581,7 @@ const oG = ({ lanes: t, title: e, description: n, avatar: i, metadata: r, onMove
29587
29581
  }, s.id))
29588
29582
  });
29589
29583
  }, vG = ({ columns: t, frozenColumns: e, allowSorting: n, allowHiding: i }) => {
29590
- const { settings: r, setVisualizationSettings: o } = m1(), { columnsWithStatus: s } = Eb(t, e, r.visualization.table, n, i), a = le(() => s.filter((c) => i || c.visible).map((c) => ({
29584
+ const { settings: r, setVisualizationSettings: o } = m1(), { columnsWithStatus: s } = Eb(t, e, r.visualization.table, n, i), a = ae(() => s.filter((c) => i || c.visible).map((c) => ({
29591
29585
  id: c.column.id,
29592
29586
  label: c.column.label,
29593
29587
  sortable: c.sortable,
@@ -29870,8 +29864,8 @@ const Ar = O(({ children: t, selected: e, className: n, sticky: i }, r) => d(Tb,
29870
29864
  }));
29871
29865
  Ar.displayName = "TableRow";
29872
29866
  function CG({ children: t, loading: e = !1 }) {
29873
- const [n, i] = H(!1), [r, o] = H(!1), s = fe(null);
29874
- return ae(() => {
29867
+ const [n, i] = V(!1), [r, o] = V(!1), s = fe(null);
29868
+ return le(() => {
29875
29869
  const a = s.current;
29876
29870
  if (!a) return;
29877
29871
  const l = () => {
@@ -30033,12 +30027,12 @@ const Bb = (t, e, n) => {
30033
30027
  }, m);
30034
30028
  }, hg = O(LG), EG = ({ columns: t, source: e, frozenColumns: n = 0, onSelectItems: i, onLoadData: r, onLoadError: o, allowColumnHiding: s, allowColumnReordering: a }) => {
30035
30029
  var we, Re, Le;
30036
- const l = Be(), [c] = H(() => te.create(hg)), { settings: f } = m1(), { columns: u } = Eb(t, n, (we = f.visualization) == null ? void 0 : we.table, a, s), { data: h, paginationInfo: p, setPage: m, isInitialLoading: g, isLoadingMore: y, loadMore: v, summaries: w } = h1(e, {
30037
- onError: (V) => {
30038
- o(V);
30030
+ const l = Be(), [c] = V(() => te.create(hg)), { settings: f } = m1(), { columns: u } = Eb(t, n, (we = f.visualization) == null ? void 0 : we.table, a, s), { data: h, paginationInfo: p, setPage: m, isInitialLoading: g, isLoadingMore: y, loadMore: v, summaries: w } = h1(e, {
30031
+ onError: (H) => {
30032
+ o(H);
30039
30033
  }
30040
30034
  }), { currentSortings: x, setCurrentSortings: b, isLoading: _ } = e, { loadingIndicatorRef: C } = u2(p, _, y, v);
30041
- ae(() => {
30035
+ le(() => {
30042
30036
  r({
30043
30037
  totalItems: (p == null ? void 0 : p.total) || h.records.length,
30044
30038
  filters: e.currentFilters,
@@ -30047,29 +30041,29 @@ const Bb = (t, e, n) => {
30047
30041
  data: h.records
30048
30042
  });
30049
30043
  }, [p == null ? void 0 : p.total, h.records]);
30050
- const N = le(() => n, [n]), { selectedItems: A, allSelectedStatus: L, groupAllSelectedStatus: S, handleSelectItemChange: D, handleSelectAll: E, handleSelectGroupChange: R } = Hf(h, p, e, i, e.defaultSelectedItems), B = le(() => {
30051
- var V;
30044
+ const N = ae(() => n, [n]), { selectedItems: A, allSelectedStatus: L, groupAllSelectedStatus: S, handleSelectItemChange: D, handleSelectAll: E, handleSelectGroupChange: R } = Hf(h, p, e, i, e.defaultSelectedItems), B = ae(() => {
30045
+ var H;
30052
30046
  return !w || !e.summaries ? null : {
30053
30047
  data: w,
30054
30048
  sticky: !0,
30055
- label: (V = e.summaries) == null ? void 0 : V.label
30049
+ label: (H = e.summaries) == null ? void 0 : H.label
30056
30050
  };
30057
- }, [w, e.summaries]), F = (V, G, me) => {
30058
- if (!(!V || !G))
30059
- return me === null ? "none" : me.field === V ? me.order : "none";
30060
- }, z = (V) => {
30061
- b(() => !x || x.field !== V ? {
30062
- field: V,
30051
+ }, [w, e.summaries]), F = (H, G, me) => {
30052
+ if (!(!H || !G))
30053
+ return me === null ? "none" : me.field === H ? me.order : "none";
30054
+ }, z = (H) => {
30055
+ b(() => !x || x.field !== H ? {
30056
+ field: H,
30063
30057
  order: "asc"
30064
30058
  } : x.order === "asc" ? {
30065
- field: V,
30059
+ field: H,
30066
30060
  order: "desc"
30067
30061
  } : null);
30068
30062
  }, U = (Re = e.grouping) == null ? void 0 : Re.collapsible, Q = (Le = e.grouping) == null ? void 0 : Le.defaultOpenGroups, { openGroups: ie, setGroupOpen: M } = jp((h == null ? void 0 : h.type) === "grouped" ? h.groups : [], Q), be = u.length + (e.itemActions ? 1 : 0) + (e.selectable ? 1 : 0), { getStickyPosition: de, checkColumnWidth: I } = Bb(N, u, !!e.selectable);
30069
30063
  return g ? d(ug.Skeleton, {
30070
30064
  columns: be
30071
- }) : (e.sortings || u.forEach((V) => {
30072
- V.sorting && console.warn("Sorting is defined on a column but no sortings are provided in the data source");
30065
+ }) : (e.sortings || u.forEach((H) => {
30066
+ H.sorting && console.warn("Sorting is defined on a column but no sortings are provided in the data source");
30073
30067
  }), k("div", {
30074
30068
  className: "flex h-full min-h-0 flex-col gap-4",
30075
30069
  children: [k(ug, {
@@ -30094,15 +30088,15 @@ const Bb = (t, e, n) => {
30094
30088
  disabled: (h == null ? void 0 : h.records.length) === 0
30095
30089
  })
30096
30090
  })
30097
- }), u.map(({ sorting: V, label: G, ...me }, ke) => d(Bc, {
30098
- sortState: F(V, e.sortings, x),
30091
+ }), u.map(({ sorting: H, label: G, ...me }, ke) => d(Bc, {
30092
+ sortState: F(H, e.sortings, x),
30099
30093
  width: me.width,
30100
30094
  align: me.align,
30101
30095
  sticky: de(ke),
30102
30096
  ...me,
30103
30097
  hidden: !1,
30104
- onSortClick: V ? () => {
30105
- V && z(V);
30098
+ onSortClick: H ? () => {
30099
+ H && z(H);
30106
30100
  } : void 0,
30107
30101
  children: G
30108
30102
  }, `table-head-${ke}`)), e.itemActions && k(De, {
@@ -30118,8 +30112,8 @@ const Bb = (t, e, n) => {
30118
30112
  })]
30119
30113
  })
30120
30114
  }), k(Rb, {
30121
- children: [(h == null ? void 0 : h.type) === "grouped" && h.groups.map((V, G) => {
30122
- const me = V.itemCount;
30115
+ children: [(h == null ? void 0 : h.type) === "grouped" && h.groups.map((H, G) => {
30116
+ const me = H.itemCount;
30123
30117
  return k(Hr, {
30124
30118
  children: [k(Ar, {
30125
30119
  sticky: !0,
@@ -30131,20 +30125,20 @@ const Bb = (t, e, n) => {
30131
30125
  children: d(Wp, {
30132
30126
  className: "px-3",
30133
30127
  selectable: !!e.selectable,
30134
- select: aG(S[V.key]),
30135
- onSelectChange: (ke) => R(V, ke),
30128
+ select: aG(S[H.key]),
30129
+ onSelectChange: (ke) => R(H, ke),
30136
30130
  showOpenChange: U,
30137
- label: V.label,
30131
+ label: H.label,
30138
30132
  itemCount: me,
30139
- open: ie[V.key],
30140
- onOpenChange: (ke) => M(V.key, ke)
30133
+ open: ie[H.key],
30134
+ onOpenChange: (ke) => M(H.key, ke)
30141
30135
  })
30142
30136
  }), d(Ti, {
30143
30137
  colSpan: u.length - (N || 1) + (e.selectable ? 1 : 0),
30144
30138
  children: " "
30145
30139
  })]
30146
- }, `group-header-${V.key}`), d(Je, {
30147
- children: c && (!U || ie[V.key]) && V.records.map((ke, ge) => d(c, {
30140
+ }, `group-header-${H.key}`), d(Je, {
30141
+ children: c && (!U || ie[H.key]) && H.records.map((ke, ge) => d(c, {
30148
30142
  variants: G8(),
30149
30143
  initial: U ? "hidden" : "visible",
30150
30144
  animate: "visible",
@@ -30162,20 +30156,20 @@ const Bb = (t, e, n) => {
30162
30156
  checkColumnWidth: I
30163
30157
  }, `row-${G}-${ge}`))
30164
30158
  }, `group-animate-${G}`)]
30165
- }, `group-${V.key}`);
30166
- }), (h == null ? void 0 : h.type) === "flat" && h.records.map((V, G) => d(hg, {
30159
+ }, `group-${H.key}`);
30160
+ }), (h == null ? void 0 : h.type) === "flat" && h.records.map((H, G) => d(hg, {
30167
30161
  groupIndex: 0,
30168
30162
  source: e,
30169
- item: V,
30163
+ item: H,
30170
30164
  index: G,
30171
- onCheckedChange: (me) => D(V, me),
30165
+ onCheckedChange: (me) => D(H, me),
30172
30166
  selectedItems: A,
30173
30167
  columns: u,
30174
30168
  frozenColumnsLeft: N,
30175
30169
  checkColumnWidth: I
30176
30170
  }, `row-${G}`)), (p == null ? void 0 : p.type) === "infinite-scroll" && y && Array.from({
30177
30171
  length: 5
30178
- }).map((V, G) => d(Ar, {
30172
+ }).map((H, G) => d(Ar, {
30179
30173
  children: Array.from({
30180
30174
  length: be
30181
30175
  }).map((me, ke) => d(Ti, {
@@ -30203,26 +30197,26 @@ const Bb = (t, e, n) => {
30203
30197
  className: "font-medium text-f1-foreground-secondary",
30204
30198
  children: B.label
30205
30199
  })
30206
- }), u.map((V, G) => {
30200
+ }), u.map((H, G) => {
30207
30201
  var me;
30208
30202
  return d(Ti, {
30209
30203
  firstCell: G === 0,
30210
- width: V.width,
30204
+ width: H.width,
30211
30205
  sticky: de(G),
30212
30206
  children: G === 0 && !e.selectable && B.label ? d("div", {
30213
30207
  className: "font-medium text-f1-foreground-secondary",
30214
30208
  children: B.label
30215
30209
  }) : d("div", {
30216
- className: T(V.align === "right" ? "justify-end" : "", "flex"),
30217
- children: V.summary && e.summaries && ((me = e.summaries[V.summary]) == null ? void 0 : me.type) === "sum" ? k("div", {
30210
+ className: T(H.align === "right" ? "justify-end" : "", "flex"),
30211
+ children: H.summary && e.summaries && ((me = e.summaries[H.summary]) == null ? void 0 : me.type) === "sum" ? k("div", {
30218
30212
  className: "flex gap-1",
30219
30213
  children: [d("span", {
30220
30214
  className: "text-f1-foreground-secondary",
30221
30215
  children: l.collections.summaries.types.sum
30222
- }), `${B.data[V.summary]}`]
30216
+ }), `${B.data[H.summary]}`]
30223
30217
  }) : "-"
30224
30218
  })
30225
- }, `summary-${String(V.label)}`);
30219
+ }, `summary-${String(H.label)}`);
30226
30220
  }), e.itemActions && k(De, {
30227
30221
  children: [d("th", {
30228
30222
  className: "hidden md:table-cell"
@@ -30315,8 +30309,8 @@ const Bb = (t, e, n) => {
30315
30309
  }, ...Object.entries(e || {}).map(([l, c]) => ({
30316
30310
  label: c.label,
30317
30311
  value: l
30318
- }))], [o, s] = H(t);
30319
- ae(() => {
30312
+ }))], [o, s] = V(t);
30313
+ le(() => {
30320
30314
  s(t || {
30321
30315
  field: ac,
30322
30316
  order: "asc"
@@ -30400,13 +30394,13 @@ const Bb = (t, e, n) => {
30400
30394
  const e = $b(t);
30401
30395
  return e ? e(t.options) : null;
30402
30396
  }, DG = ({ visualizations: t, currentVisualization: e, onVisualizationChange: n, grouping: i, currentGrouping: r, onGroupingChange: o, sortings: s, currentSortings: a, onSortingsChange: l }) => {
30403
- const c = Be(), f = i ? Object.keys(i.groupBy).length + (i.mandatory ? 1 : 0) : 0, [u, h] = H(!1), p = (A) => {
30397
+ const c = Be(), f = i ? Object.keys(i.groupBy).length + (i.mandatory ? 1 : 0) : 0, [u, h] = V(!1), p = (A) => {
30404
30398
  h(!1), n(A);
30405
30399
  }, m = (A) => {
30406
30400
  o(A);
30407
- }, g = t && t.length > 1, y = i && f > 0, v = s && Object.keys(s).length > 0, w = le(() => t[e], [e]), x = le(() => d(IG, {
30401
+ }, g = t && t.length > 1, y = i && f > 0, v = s && Object.keys(s).length > 0, w = ae(() => t[e], [e]), x = ae(() => d(IG, {
30408
30402
  visualization: w
30409
- }, "visualization-settings"), [w]), b = le(() => OG(w), [w]), _ = le(() => {
30403
+ }, "visualization-settings"), [w]), b = ae(() => OG(w), [w]), _ = ae(() => {
30410
30404
  var S;
30411
30405
  const A = (S = t[e]) == null ? void 0 : S.type;
30412
30406
  if (!A) return "-";
@@ -30483,23 +30477,23 @@ const Bb = (t, e, n) => {
30483
30477
  });
30484
30478
  }, zb = O(({ value: t, compareToValue: e, onDateChange: n, disabled: i, error: r, className: o, highlighted: s, onClick: a, navigation: l, granularity: c, hideGoToCurrent: f, ...u }, h) => {
30485
30479
  var N;
30486
- const p = Be(), m = le(() => {
30480
+ const p = Be(), m = ae(() => {
30487
30481
  if (!t || !t.value)
30488
30482
  return [p.date.selectDate];
30489
30483
  const A = Up[t.granularity];
30490
30484
  return [t.value, Array.isArray(e) ? e[0] : e].filter((S) => S !== void 0).sort((S, D) => (S == null ? void 0 : S.from.getTime()) - (D == null ? void 0 : D.from.getTime())).map((S) => A.toString(S, p, "long"));
30491
- }, [t, p, e]), g = le(() => Object.values(m).join(" ⸱ "), [m]), y = (A) => {
30485
+ }, [t, p, e]), g = ae(() => Object.values(m).join(" ⸱ "), [m]), y = (A) => {
30492
30486
  A && (n == null || n(A));
30493
- }, v = le(() => {
30487
+ }, v = ae(() => {
30494
30488
  var A;
30495
30489
  if (u.minDate)
30496
30490
  return (A = c == null ? void 0 : c.toRange(u.minDate)) == null ? void 0 : A.from;
30497
- }, [u.minDate, c]), w = le(() => {
30491
+ }, [u.minDate, c]), w = ae(() => {
30498
30492
  var A;
30499
30493
  if (u.maxDate)
30500
30494
  return (A = c == null ? void 0 : c.toRange(u.maxDate)) == null ? void 0 : A.to;
30501
- }, [u.maxDate, c]), [x, b] = H(null);
30502
- ae(() => {
30495
+ }, [u.maxDate, c]), [x, b] = V(null);
30496
+ le(() => {
30503
30497
  b((c == null ? void 0 : c.toRange(/* @__PURE__ */ new Date())) ?? null);
30504
30498
  const A = () => {
30505
30499
  const S = (c == null ? void 0 : c.toRange(/* @__PURE__ */ new Date())) ?? null;
@@ -30562,11 +30556,11 @@ const Bb = (t, e, n) => {
30562
30556
  });
30563
30557
  zb.displayName = "DatePickerTrigger";
30564
30558
  function RG({ onSelect: t, defaultValue: e, presets: n = [], granularities: i = ["day"], hideNavigation: r = !1, hideGoToCurrent: o = !1, compareTo: s, defaultCompareTo: a, onCompareToChange: l, value: c, ...f }) {
30565
- const [u, h] = H(e ?? c);
30566
- ae(() => {
30559
+ const [u, h] = V(e ?? c);
30560
+ le(() => {
30567
30561
  ML(c, u) || h(c || e);
30568
30562
  }, [c, e]);
30569
- const [p, m] = H(), [g, y] = H(!1), v = le(() => Up[(u == null ? void 0 : u.granularity) ?? "day"], [u == null ? void 0 : u.granularity]), w = (_) => {
30563
+ const [p, m] = V(), [g, y] = V(!1), v = ae(() => Up[(u == null ? void 0 : u.granularity) ?? "day"], [u == null ? void 0 : u.granularity]), w = (_) => {
30570
30564
  h(_), t == null || t(_);
30571
30565
  }, x = (_) => {
30572
30566
  m(_), l == null || l(_);
@@ -30693,17 +30687,17 @@ const PG = (t) => "date" in t, BG = {
30693
30687
  const n = t.substring(0, e), i = t.substring(e + 1);
30694
30688
  return !(!n || n.trim() === "" || !i || !/^v[0-9]+$/.test(i));
30695
30689
  }, VG = (t, e, n, i) => {
30696
- const [r, o] = H(!1), s = TL();
30690
+ const [r, o] = V(!1), s = TL();
30697
30691
  t && !HG(t) && console.error(
30698
30692
  `Invalid storage key format: "${t}". Key must follow the format "name/version" where name can be a path (e.g., "employees/list/") and version must start with "v" (e.g., "v1", "v2.1").`
30699
30693
  );
30700
- const a = le(
30694
+ const a = ae(
30701
30695
  // Settings is always included
30702
30696
  () => [...zG(e), "settings"],
30703
30697
  // eslint-disable-next-line react-hooks/exhaustive-deps -- This is intentional
30704
30698
  [JSON.stringify(e)]
30705
- ), l = le(() => !i && !!t, [i, t]);
30706
- ae(() => {
30699
+ ), l = ae(() => !i && !!t, [i, t]);
30700
+ le(() => {
30707
30701
  if (!l) {
30708
30702
  o(!0);
30709
30703
  return;
@@ -30723,7 +30717,7 @@ const PG = (t) => "date" in t, BG = {
30723
30717
  );
30724
30718
  }), o(!0);
30725
30719
  }, [t, l]);
30726
- const c = le(
30720
+ const c = ae(
30727
30721
  () => JSON.stringify(
30728
30722
  Object.entries(n).map(
30729
30723
  ([u, h]) => [
@@ -30748,7 +30742,7 @@ const PG = (t) => "date" in t, BG = {
30748
30742
  },
30749
30743
  200
30750
30744
  );
30751
- return ae(() => {
30745
+ return le(() => {
30752
30746
  f(n);
30753
30747
  }, [
30754
30748
  t,
@@ -30760,22 +30754,22 @@ const PG = (t) => "date" in t, BG = {
30760
30754
  storageReady: r
30761
30755
  };
30762
30756
  }, jG = ({ source: t, visualizations: e, onSelectItems: n, onBulkAction: i, onStateChange: r, emptyStates: o, fullHeight: s, storage: a, id: l, tmpFullWidth: c }) => {
30763
- const { filters: f, currentFilters: u, setCurrentFilters: h, presets: p, presetsLoading: m, currentNavigationFilters: g, navigationFilters: y, setCurrentNavigationFilters: v, search: w, currentSearch: x, setCurrentSearch: b, isLoading: _, primaryActions: C, secondaryActions: N, totalItemSummary: A, currentGrouping: L, setCurrentGrouping: S, grouping: D, currentSortings: E, setCurrentSortings: R, sortings: B } = t, [F, z] = H(0), U = fe(E), { emitSortingChange: Q } = IL({
30757
+ const { filters: f, currentFilters: u, setCurrentFilters: h, presets: p, presetsLoading: m, currentNavigationFilters: g, navigationFilters: y, setCurrentNavigationFilters: v, search: w, currentSearch: x, setCurrentSearch: b, isLoading: _, primaryActions: C, secondaryActions: N, totalItemSummary: A, currentGrouping: L, setCurrentGrouping: S, grouping: D, currentSortings: E, setCurrentSortings: R, sortings: B } = t, [F, z] = V(0), U = fe(E), { emitSortingChange: Q } = IL({
30764
30758
  defaultSorting: U.current
30765
30759
  });
30766
- ae(() => {
30760
+ le(() => {
30767
30761
  Q(E);
30768
30762
  }, [Q, E]);
30769
- const ie = le(() => kU(C), [C]), M = le(() => _U(CU(N)), [N]), be = le(() => Math.min(N && "expanded" in N && N.expanded || 0, bU), [N]), de = le(() => {
30763
+ const ie = ae(() => kU(C), [C]), M = ae(() => _U(CU(N)), [N]), be = ae(() => Math.min(N && "expanded" in N && N.expanded || 0, bU), [N]), de = ae(() => {
30770
30764
  var qe;
30771
30765
  return ((qe = M[0]) == null ? void 0 : qe.items.slice(0, be)) || [];
30772
- }, [M, be]), I = le(() => {
30766
+ }, [M, be]), I = ae(() => {
30773
30767
  var qe;
30774
30768
  return [{
30775
30769
  ...M[0],
30776
30770
  items: ((qe = M[0]) == null ? void 0 : qe.items.slice(be)) || []
30777
30771
  }, ...M.slice(1)].filter((ut) => ut.items.length > 0);
30778
- }, [M, be]), we = (ie == null ? void 0 : ie.length) > 0 || (M == null ? void 0 : M.length) > 0, [Re, Le] = H(void 0), V = V8(), [G, me] = H(void 0), ke = Pe((qe) => {
30772
+ }, [M, be]), we = (ie == null ? void 0 : ie.length) > 0 || (M == null ? void 0 : M.length) > 0, [Re, Le] = V(void 0), H = V8(), [G, me] = V(void 0), ke = Pe((qe) => {
30779
30773
  if (!qe)
30780
30774
  return [];
30781
30775
  const ut = [];
@@ -30787,7 +30781,7 @@ const PG = (t) => "date" in t, BG = {
30787
30781
  return st.length > 0 && ut.push({
30788
30782
  items: st
30789
30783
  }), ut;
30790
- }, []), ge = le(() => {
30784
+ }, []), ge = ae(() => {
30791
30785
  if (G)
30792
30786
  return "warningMessage" in G ? {
30793
30787
  warningMessage: G.warningMessage
@@ -30795,7 +30789,7 @@ const PG = (t) => "date" in t, BG = {
30795
30789
  primary: ke(G.primary ?? []),
30796
30790
  secondary: ((G == null ? void 0 : G.secondary) ?? []).filter((qe) => !("type" in qe && qe.type === "separator"))
30797
30791
  };
30798
- }, [G, ke]), [Qe, ot] = H(!1), [Ne, wt] = H(0), Ct = Be(), ft = le(() => A === !0 ? (qe) => qe !== void 0 ? `${qe} ${Ct.collections.itemsCount}` : null : A || void 0, [A, Ct]), P = (qe, ut) => {
30792
+ }, [G, ke]), [Qe, ot] = V(!1), [Ne, wt] = V(0), Ct = Be(), ft = ae(() => A === !0 ? (qe) => qe !== void 0 ? `${qe} ${Ct.collections.itemsCount}` : null : A || void 0, [A, Ct]), P = (qe, ut) => {
30799
30793
  n == null || n(qe, ut), ot(!!qe.allSelected || qe.itemsStatus.some((dn) => dn.checked)), wt(qe.selectedCount), Le(() => ut);
30800
30794
  const st = t.bulkActions ? t.bulkActions(qe) : void 0, Jt = (dn) => {
30801
30795
  if ("type" in dn && dn.type === "separator")
@@ -30816,7 +30810,7 @@ const PG = (t) => "date" in t, BG = {
30816
30810
  }) : "warningMessage" in st && me({
30817
30811
  warningMessage: st.warningMessage
30818
30812
  }));
30819
- }, [$, W] = H(void 0), [oe, ce] = H(!0), Y = le(() => [w == null ? void 0 : w.enabled, e.length > 1].some(Boolean), [w, e]), { emptyState: ve, setEmptyStateType: Ae } = EU(o, {
30813
+ }, [$, W] = V(void 0), [oe, ce] = V(!0), Y = ae(() => [w == null ? void 0 : w.enabled, e.length > 1].some(Boolean), [w, e]), { emptyState: ve, setEmptyStateType: Ae } = EU(o, {
30820
30814
  retry: () => {
30821
30815
  Ae(!1), h({
30822
30816
  ...u
@@ -30833,10 +30827,10 @@ const PG = (t) => "date" in t, BG = {
30833
30827
  value: !!m,
30834
30828
  delay: 100
30835
30829
  });
30836
- ae(() => {
30830
+ le(() => {
30837
30831
  Ae(!1);
30838
30832
  }, [u, x, g, t.dataAdapter]);
30839
- const Ke = le(() => ft !== void 0, [ft]), Ot = ft === void 0 ? null : $ !== void 0 ? ft($) : null, { settings: cn, setSettings: Zt } = m1(), { storageReady: q } = VG(l, typeof a == "object" ? (a == null ? void 0 : a.features) ?? ["*"] : ["*"], {
30833
+ const Ke = ae(() => ft !== void 0, [ft]), Ot = ft === void 0 ? null : $ !== void 0 ? ft($) : null, { settings: cn, setSettings: Zt } = m1(), { storageReady: q } = VG(l, typeof a == "object" ? (a == null ? void 0 : a.features) ?? ["*"] : ["*"], {
30840
30834
  settings: {
30841
30835
  value: cn,
30842
30836
  setValue: Zt
@@ -30880,15 +30874,15 @@ const PG = (t) => "date" in t, BG = {
30880
30874
  settings: cn
30881
30875
  });
30882
30876
  }, [u, x, g, E, F, L, cn]);
30883
- const xe = le(() => {
30877
+ const xe = ae(() => {
30884
30878
  var Jt, dn;
30885
30879
  const qe = D ? Object.keys(D.groupBy).length + (D.mandatory ? 1 : 0) : 0, ut = Object.values(e).find((to) => to.type === "table"), st = !!ut && (!!((Jt = ut.options) != null && Jt.allowColumnHiding) || !!((dn = ut.options) != null && dn.allowColumnReordering));
30886
30880
  return e && e.length > 1 || qe > 0 && !(D != null && D.hideSelector) || B && Object.keys(B).length > 0 || st;
30887
- }, [e, D, B]), ze = le(() => Y || we || xe || w && w.enabled, [Y, we, xe, w]), Fe = le(() => Ke ? f ? "top" : "bottom" : !1, [f, Ke]), _t = le(() => y ? ze ? "top" : "bottom" : !1, [y, ze]), wn = le(() => Fe === "top" || _t === "top", [Fe, _t]), yr = le(() => f || ze || _t === "bottom" || Fe === "bottom", [f, ze, _t, Fe]);
30881
+ }, [e, D, B]), ze = ae(() => Y || we || xe || w && w.enabled, [Y, we, xe, w]), Fe = ae(() => Ke ? f ? "top" : "bottom" : !1, [f, Ke]), _t = ae(() => y ? ze ? "top" : "bottom" : !1, [y, ze]), wn = ae(() => Fe === "top" || _t === "top", [Fe, _t]), yr = ae(() => f || ze || _t === "bottom" || Fe === "bottom", [f, ze, _t, Fe]);
30888
30882
  return k("div", {
30889
- className: T("flex flex-col gap-4", V === "standard" && "-mx-6", s && "h-full flex-1"),
30883
+ className: T("flex flex-col gap-4", H === "standard" && "-mx-6", s && "h-full flex-1"),
30890
30884
  style: {
30891
- width: V === "standard" && !c ? "calc(100% + 48px)" : "100%"
30885
+ width: H === "standard" && !c ? "calc(100% + 48px)" : "100%"
30892
30886
  },
30893
30887
  children: [wn && k("div", {
30894
30888
  className: "border-f1-border-primary flex gap-4 px-4",
@@ -31002,7 +30996,7 @@ const PG = (t) => "date" in t, BG = {
31002
30996
  dataAdapter: t.dataAdapter
31003
30997
  },
31004
30998
  e
31005
- ), [a, l] = H(() => i ? Object.fromEntries(
30999
+ ), [a, l] = V(() => i ? Object.fromEntries(
31006
31000
  Object.entries(i).map(([f, u]) => {
31007
31001
  const h = Hb[u.type];
31008
31002
  return [
@@ -31014,7 +31008,7 @@ const PG = (t) => "date" in t, BG = {
31014
31008
  J8(() => {
31015
31009
  o && l(o);
31016
31010
  }, [o]);
31017
- const c = le(() => r, e);
31011
+ const c = ae(() => r, e);
31018
31012
  return {
31019
31013
  ...s,
31020
31014
  summaries: c,
@@ -31023,7 +31017,7 @@ const PG = (t) => "date" in t, BG = {
31023
31017
  setCurrentNavigationFilters: l
31024
31018
  };
31025
31019
  }, Vb = O(({ header: t, actions: e, open: n, onClose: i }, r) => {
31026
- const [o, s] = H(!1), a = Pe(() => {
31020
+ const [o, s] = V(!1), a = Pe(() => {
31027
31021
  s(!0);
31028
31022
  const l = setTimeout(() => {
31029
31023
  i == null || i(), s(!1);
@@ -43978,8 +43972,8 @@ function wQ(t) {
43978
43972
  }
43979
43973
  if (A)
43980
43974
  for (var M = m ? 3 : 1, be = function(Re) {
43981
- var Le = b.find(function(V) {
43982
- var G = N.get(V);
43975
+ var Le = b.find(function(H) {
43976
+ var G = N.get(H);
43983
43977
  if (G)
43984
43978
  return G.slice(0, Re).every(function(me) {
43985
43979
  return me;
@@ -44109,7 +44103,7 @@ function TQ(t) {
44109
44103
  var R, B = b === "y" ? Nn : An, F = b === "y" ? ci : di, z = b === "y" ? "height" : "width", U = C[b], Q = U + y[B], ie = U - y[F], M = p ? -A[z] / 2 : 0, be = w === Os ? N[z] : A[z], de = w === Os ? -A[z] : -N[z], I = e.elements.arrow, we = p && I ? j2(I) : {
44110
44104
  width: 0,
44111
44105
  height: 0
44112
- }, Re = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ix(), Le = Re[B], V = Re[F], G = Oa(0, N[z], we[z]), me = x ? N[z] / 2 - M - G - Le - S.mainAxis : be - G - Le - S.mainAxis, ke = x ? -N[z] / 2 + M + G + V + S.mainAxis : de + G + V + S.mainAxis, ge = e.elements.arrow && Wl(e.elements.arrow), Qe = ge ? b === "y" ? ge.clientTop || 0 : ge.clientLeft || 0 : 0, ot = (R = D == null ? void 0 : D[b]) != null ? R : 0, Ne = U + me - ot - Qe, wt = U + ke - ot, Ct = Oa(p ? qd(Q, Ne) : Q, U, p ? wo(ie, wt) : ie);
44106
+ }, Re = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ix(), Le = Re[B], H = Re[F], G = Oa(0, N[z], we[z]), me = x ? N[z] / 2 - M - G - Le - S.mainAxis : be - G - Le - S.mainAxis, ke = x ? -N[z] / 2 + M + G + H + S.mainAxis : de + G + H + S.mainAxis, ge = e.elements.arrow && Wl(e.elements.arrow), Qe = ge ? b === "y" ? ge.clientTop || 0 : ge.clientLeft || 0 : 0, ot = (R = D == null ? void 0 : D[b]) != null ? R : 0, Ne = U + me - ot - Qe, wt = U + ke - ot, Ct = Oa(p ? qd(Q, Ne) : Q, U, p ? wo(ie, wt) : ie);
44113
44107
  C[b] = Ct, E[b] = Ct - U;
44114
44108
  }
44115
44109
  if (a) {
@@ -44819,7 +44813,7 @@ function yee(t, e) {
44819
44813
  var q = B();
44820
44814
  q.removeEventListener("mousedown", de, !0), q.removeEventListener("touchend", de, oo), q.removeEventListener("touchstart", we, oo), q.removeEventListener("touchmove", I, oo);
44821
44815
  }
44822
- function V(q, ye) {
44816
+ function H(q, ye) {
44823
44817
  me(q, function() {
44824
44818
  !b.state.isVisible && C.parentNode && C.parentNode.contains(C) && ye();
44825
44819
  });
@@ -45064,7 +45058,7 @@ function yee(t, e) {
45064
45058
  var Fe = F(), _t = Fe.box, wn = Fe.content;
45065
45059
  b.props.animation && (Ju([_t, wn], ze), F6([_t, wn], "hidden"));
45066
45060
  }
45067
- ie(), M(), b.props.animation ? E() && V(ze, b.unmount) : b.unmount();
45061
+ ie(), M(), b.props.animation ? E() && H(ze, b.unmount) : b.unmount();
45068
45062
  }
45069
45063
  }
45070
45064
  function Ot(q) {
@@ -45634,7 +45628,7 @@ function Aee() {
45634
45628
  }
45635
45629
  process.env.NODE_ENV === "production" ? H0.exports = Nee() : H0.exports = Aee();
45636
45630
  var Tee = H0.exports;
45637
- const Oee = typeof window < "u" ? Gf : ae;
45631
+ const Oee = typeof window < "u" ? Gf : le;
45638
45632
  class Iee {
45639
45633
  constructor(e) {
45640
45634
  this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = { editor: e, transactionNumber: 0 }, this.getSnapshot = this.getSnapshot.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.watch = this.watch.bind(this), this.subscribe = this.subscribe.bind(this);
@@ -45675,7 +45669,7 @@ class Iee {
45675
45669
  }
45676
45670
  function Dee(t) {
45677
45671
  var e;
45678
- const [n] = H(() => new Iee(t.editor)), i = Tee.useSyncExternalStoreWithSelector(n.subscribe, n.getSnapshot, n.getServerSnapshot, t.selector, (e = t.equalityFn) !== null && e !== void 0 ? e : Mee);
45672
+ const [n] = V(() => new Iee(t.editor)), i = Tee.useSyncExternalStoreWithSelector(n.subscribe, n.getSnapshot, n.getServerSnapshot, t.selector, (e = t.equalityFn) !== null && e !== void 0 ? e : Mee);
45679
45673
  return Oee(() => n.watch(t.editor), [t.editor, n]), iy(i), i;
45680
45674
  }
45681
45675
  const G6 = process.env.NODE_ENV !== "production", V0 = typeof window > "u", Ree = V0 || !!(typeof window < "u" && window.next);
@@ -45819,8 +45813,8 @@ class Z2 {
45819
45813
  function J2(t = {}, e = []) {
45820
45814
  const n = fe(t);
45821
45815
  n.current = t;
45822
- const [i] = H(() => new Z2(n)), r = O1.useSyncExternalStore(i.subscribe, i.getEditor, i.getServerSnapshot);
45823
- return iy(r), ae(i.onRender(e)), Dee({
45816
+ const [i] = V(() => new Z2(n)), r = O1.useSyncExternalStore(i.subscribe, i.getEditor, i.getServerSnapshot);
45817
+ return iy(r), le(i.onRender(e)), Dee({
45824
45818
  editor: r,
45825
45819
  selector: ({ transactionNumber: o }) => t.shouldRerenderOnTransaction === !1 ? null : t.immediatelyRender && o === 0 ? 0 : o + 1
45826
45820
  }), r;
@@ -45830,8 +45824,8 @@ const Yx = Kn({
45830
45824
  });
45831
45825
  Yx.Consumer;
45832
45826
  const Fee = () => In(Yx), Pee = (t) => {
45833
- const [e, n] = H(null), { editor: i } = Fee();
45834
- return ae(() => {
45827
+ const [e, n] = V(null), { editor: i } = Fee();
45828
+ return le(() => {
45835
45829
  var r;
45836
45830
  if (!e || !((r = t.editor) === null || r === void 0) && r.isDestroyed || i != null && i.isDestroyed)
45837
45831
  return;
@@ -46088,7 +46082,7 @@ function R1(t, e) {
46088
46082
  return (n) => n.editor.contentComponent ? new Hee(t, n, e) : {};
46089
46083
  }
46090
46084
  const Vee = ({ editor: t, disabled: e, labels: n }) => {
46091
- const i = Be(), [r, o] = H(!1), [s, a] = H(t.getAttributes("link").href || ""), l = (m) => {
46085
+ const i = Be(), [r, o] = V(!1), [s, a] = V(t.getAttributes("link").href || ""), l = (m) => {
46092
46086
  e || o(!r);
46093
46087
  }, c = (m) => {
46094
46088
  const g = m.trim();
@@ -46244,7 +46238,7 @@ const Vee = ({ editor: t, disabled: e, labels: n }) => {
46244
46238
  });
46245
46239
  eC.displayName = "ToolbarButton";
46246
46240
  const J6 = ({ items: t, disabled: e = !1, activator: n, darkMode: i = !1, position: r = "top" }) => {
46247
- const [o, s] = H(!1), a = (c) => {
46241
+ const [o, s] = V(!1), a = (c) => {
46248
46242
  c(), s(!1);
46249
46243
  }, l = () => {
46250
46244
  e || s(!o);
@@ -52197,7 +52191,7 @@ const wre = ({ item: t, selected: e }) => k("div", {
52197
52191
  children: t.label
52198
52192
  })]
52199
52193
  }), AC = O(({ items: t, command: e, component: n = wre }, i) => {
52200
- const [r, o] = H(0), s = Pe((f) => {
52194
+ const [r, o] = V(0), s = Pe((f) => {
52201
52195
  const u = t[f];
52202
52196
  u && e(u);
52203
52197
  }, [t, e]), a = Pe(() => {
@@ -52207,7 +52201,7 @@ const wre = ({ item: t, selected: e }) => k("div", {
52207
52201
  }, [t.length]), c = Pe(() => {
52208
52202
  s(r);
52209
52203
  }, [r, s]);
52210
- return ae(() => {
52204
+ return le(() => {
52211
52205
  o(0);
52212
52206
  }, [t]), Zf(i, () => ({
52213
52207
  onKeyDown: ({ event: f }) => f.key === "ArrowUp" ? (a(), !0) : f.key === "ArrowDown" ? (l(), !0) : f.key === "Enter" ? (c(), !0) : !1
@@ -52480,7 +52474,7 @@ const Cre = kre.extend({
52480
52474
  placeholder: t
52481
52475
  }), Lre = ({ node: t, deleteNode: e, extension: n, updateAttributes: i }) => {
52482
52476
  var f, u, h, p, m;
52483
- const [r, o] = H(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
52477
+ const [r, o] = V(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
52484
52478
  if (!s) return null;
52485
52479
  const l = () => {
52486
52480
  const g = !r;
@@ -52622,7 +52616,7 @@ const Cre = kre.extend({
52622
52616
  }
52623
52617
  }), TC = Ere, Mre = ({ node: t, deleteNode: e, extension: n, updateAttributes: i }) => {
52624
52618
  var h, p, m, g, y;
52625
- const [r, o] = H(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
52619
+ const [r, o] = V(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
52626
52620
  if (!s) return null;
52627
52621
  const l = () => {
52628
52622
  const v = !r;
@@ -52790,7 +52784,7 @@ const Cre = kre.extend({
52790
52784
  currentConfig: l
52791
52785
  }), w3, b3(t), k3(t), FC(e, n)];
52792
52786
  }, Tre = (t, e, n, i, r) => {
52793
- const o = le(() => Are(r.placeholder || "", r.toolbarLabels, r.slashCommandGroupLabels, r.moodTrackerLabels, r.liveCompanionLabels, r.transcriptLabels), [r]), s = fe(null), a = Pe(({ editor: c }) => {
52787
+ const o = ae(() => Are(r.placeholder || "", r.toolbarLabels, r.slashCommandGroupLabels, r.moodTrackerLabels, r.liveCompanionLabels, r.transcriptLabels), [r]), s = fe(null), a = Pe(({ editor: c }) => {
52794
52788
  s.current && clearTimeout(s.current), s.current = setTimeout(() => {
52795
52789
  const { from: f, to: u } = c.state.selection, h = c.isEmpty;
52796
52790
  h && (t != null && t.selectedAction) && !e ? i({
@@ -52826,7 +52820,7 @@ const Cre = kre.extend({
52826
52820
  },
52827
52821
  onUpdate: a
52828
52822
  }, [n]);
52829
- return ae(() => {
52823
+ return le(() => {
52830
52824
  if (l && (t != null && t.content)) {
52831
52825
  const { from: c, to: f } = l.state.selection, u = c !== f;
52832
52826
  l.commands.setContent(t.content), t != null && t.isEditable && setTimeout(() => l.commands.focus(), 10), u && l.isFocused && setTimeout(() => l.commands.setTextSelection({
@@ -52834,19 +52828,19 @@ const Cre = kre.extend({
52834
52828
  to: f
52835
52829
  }), 10);
52836
52830
  }
52837
- }, [l, t == null ? void 0 : t.content, t == null ? void 0 : t.isEditable]), ae(() => () => {
52831
+ }, [l, t == null ? void 0 : t.content, t == null ? void 0 : t.isEditable]), le(() => () => {
52838
52832
  s.current && clearTimeout(s.current);
52839
52833
  }, []), l;
52840
52834
  }, Ore = (t) => {
52841
- const [e, n] = H(!1);
52842
- return ae(() => {
52835
+ const [e, n] = V(!1);
52836
+ return le(() => {
52843
52837
  const i = (t == null ? void 0 : t.selectedAction) && !(t != null && t.content), r = (t == null ? void 0 : t.content) && e;
52844
52838
  i && !e ? n(!0) : r && n(!1);
52845
52839
  }, [t == null ? void 0 : t.selectedAction, t == null ? void 0 : t.content, e]), {
52846
52840
  isLoading: e,
52847
52841
  setIsLoading: n
52848
52842
  };
52849
- }, Ire = (t, e) => le(() => {
52843
+ }, Ire = (t, e) => ae(() => {
52850
52844
  var i;
52851
52845
  if (t != null && t.selectedTitle || t != null && t.selectedEmoji)
52852
52846
  return {
@@ -52881,14 +52875,14 @@ const Cre = kre.extend({
52881
52875
  }, Rre = ({ node: t, updateAttributes: e, deleteNode: n, extension: i, editor: r, getPos: o }) => {
52882
52876
  var x;
52883
52877
  const s = t.attrs.data, a = i.options.currentConfig || t.attrs.config, l = fe(Math.random().toString(36).substr(2, 9)).current, { isLoading: c, setIsLoading: f } = Ore(s), { title: u, emoji: h } = Ire(s, a), p = Tre(s, c, l, e, a);
52884
- ae(() => {
52878
+ le(() => {
52885
52879
  if (s != null && s.content && (s != null && s.isEditable) && r && o) {
52886
52880
  const b = o();
52887
52881
  b !== void 0 && (n(), setTimeout(() => {
52888
52882
  s.content && r.chain().focus().setTextSelection(b).insertContent(s.content).run();
52889
52883
  }, 10));
52890
52884
  }
52891
- }, [s == null ? void 0 : s.content, s == null ? void 0 : s.isEditable, r, o, t.nodeSize, n]), ae(() => {
52885
+ }, [s == null ? void 0 : s.content, s == null ? void 0 : s.isEditable, r, o, t.nodeSize, n]), le(() => {
52892
52886
  if (s != null && s.selectedAction && (a != null && a.buttons) && (!(s != null && s.selectedTitle) || !(s != null && s.selectedEmoji) || (s == null ? void 0 : s.isEditable) === void 0)) {
52893
52887
  const _ = a.buttons.find((C) => C.type === s.selectedAction);
52894
52888
  _ && e({
@@ -53093,7 +53087,7 @@ const Cre = kre.extend({
53093
53087
  }
53094
53088
  }), $re = ({ node: t, deleteNode: e, extension: n, updateAttributes: i }) => {
53095
53089
  var f, u, h;
53096
- const [r, o] = H(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
53090
+ const [r, o] = V(t.attrs.isOpen ?? !1), s = t.attrs.data, a = n.options.currentConfig || t.attrs.config || {};
53097
53091
  if (!s) return null;
53098
53092
  const l = () => {
53099
53093
  const p = !r;
@@ -53449,7 +53443,7 @@ const Cre = kre.extend({
53449
53443
  icon: Ap
53450
53444
  }]
53451
53445
  }], RC = O(({ items: t, groups: e, command: n }, i) => {
53452
- const [r, o] = H(0), s = fe(null), a = fe(null), l = e || [{
53446
+ const [r, o] = V(0), s = fe(null), a = fe(null), l = e || [{
53453
53447
  title: "",
53454
53448
  commands: t
53455
53449
  }], c = l.flatMap((y) => y.commands), f = Pe((y) => {
@@ -53467,9 +53461,9 @@ const Cre = kre.extend({
53467
53461
  }, [c.length]), m = Pe(() => {
53468
53462
  f(r);
53469
53463
  }, [r, f]);
53470
- ae(() => {
53464
+ le(() => {
53471
53465
  a.current && u(a.current);
53472
- }, [r, u]), ae(() => {
53466
+ }, [r, u]), le(() => {
53473
53467
  o(0);
53474
53468
  }, [t.length]), Zf(i, () => ({
53475
53469
  onKeyDown: ({ event: y }) => y.key === "ArrowUp" ? (y.preventDefault(), h(), !0) : y.key === "ArrowDown" ? (y.preventDefault(), p(), !0) : y.key === "Enter" ? (y.preventDefault(), m(), !0) : !1
@@ -60993,8 +60987,8 @@ rt.create({
60993
60987
  }
60994
60988
  });
60995
60989
  const hle = (t) => {
60996
- const { className: e = "drag-handle", children: n, editor: i, pluginKey: r = z_, onNodeChange: o, tippyOptions: s } = t, [a, l] = H(null), c = fe(null);
60997
- return ae(() => a ? i.isDestroyed ? () => {
60990
+ const { className: e = "drag-handle", children: n, editor: i, pluginKey: r = z_, onNodeChange: o, tippyOptions: s } = t, [a, l] = V(null), c = fe(null);
60991
+ return le(() => a ? i.isDestroyed ? () => {
60998
60992
  c.current = null;
60999
60993
  } : (c.current || (c.current = H_({
61000
60994
  editor: i,
@@ -61098,8 +61092,8 @@ const hle = (t) => {
61098
61092
  }, r))]
61099
61093
  })]
61100
61094
  }), dfe = O(function({ onChange: e, placeholder: n, initialEditorState: i, readonly: r = !1, labels: o, aiBlockConfig: s, onTitleChange: a, actions: l, secondaryActions: c, metadata: f, withPadding: u = !1 }, h) {
61101
- const { toolbarLabels: p, slashCommandGroupLabels: m, aiBlockLabels: g, moodTrackerLabels: y, liveCompanionLabels: v, transcriptLabels: w } = o, x = fe(null), b = fe(null), _ = Kr(), [C] = H(() => (i == null ? void 0 : i.content) || ""), [N, A] = H((i == null ? void 0 : i.title) || "");
61102
- ae(() => {
61095
+ const { toolbarLabels: p, slashCommandGroupLabels: m, aiBlockLabels: g, moodTrackerLabels: y, liveCompanionLabels: v, transcriptLabels: w } = o, x = fe(null), b = fe(null), _ = Kr(), [C] = V(() => (i == null ? void 0 : i.content) || ""), [N, A] = V((i == null ? void 0 : i.title) || "");
61096
+ le(() => {
61103
61097
  a && a(N);
61104
61098
  }, [N, a]);
61105
61099
  const L = J2({
@@ -61173,7 +61167,7 @@ const hle = (t) => {
61173
61167
  L && L.chain().focus().insertContentAt(L.state.doc.content.size, F).run();
61174
61168
  }
61175
61169
  }));
61176
- const S = le(() => ({
61170
+ const S = ae(() => ({
61177
61171
  offset: [0, 5]
61178
61172
  }), []), D = Pe(({ node: F, pos: z }) => {
61179
61173
  b.current = F ? {
@@ -61530,10 +61524,10 @@ const hle = (t) => {
61530
61524
  className: "text-f1-icon"
61531
61525
  })]
61532
61526
  }), _le = ({ onSelect: t, onClose: e, enhancementOptions: n, inputPlaceholder: i }) => {
61533
- const [r, o] = H(null), [s, a] = H(""), l = fe(null), c = fe(null), f = fe(null);
61534
- ae(() => {
61527
+ const [r, o] = V(null), [s, a] = V(""), l = fe(null), c = fe(null), f = fe(null);
61528
+ le(() => {
61535
61529
  l.current && l.current.focus();
61536
- }, []), ae(() => {
61530
+ }, []), le(() => {
61537
61531
  const g = (y) => {
61538
61532
  var b, _;
61539
61533
  if (!r || !(y.target instanceof Element)) return;
@@ -61624,7 +61618,7 @@ const hle = (t) => {
61624
61618
  })]
61625
61619
  });
61626
61620
  }, Sle = ({ editor: t, onEnhanceWithAI: e, isLoadingEnhance: n, enhanceConfig: i, disableButtons: r, hideLabel: o, position: s = "bottom", setLastIntent: a }) => {
61627
- const l = fe(null), [c, f] = H(!1), u = (h) => {
61621
+ const l = fe(null), [c, f] = V(!1), u = (h) => {
61628
61622
  h.preventDefault(), l.current ? f((p) => !p) : f(!1);
61629
61623
  };
61630
61624
  return k(El, {
@@ -61816,8 +61810,8 @@ const hle = (t) => {
61816
61810
  })]
61817
61811
  });
61818
61812
  }, Ole = ({ editor: t, maxCharacters: e, secondaryAction: n, primaryAction: i, fileInputRef: r, canUseFiles: o, onEnhanceWithAI: s, isLoadingEnhance: a, enhanceConfig: l, isFullscreen: c, setLastIntent: f, toolbarLabels: u, disableButtons: h, setIsToolbarOpen: p, isToolbarOpen: m, plainHtmlMode: g }) => {
61819
- const [y, v] = H(!1), w = fe(null), [x, b] = H(0);
61820
- ae(() => {
61813
+ const [y, v] = V(!1), w = fe(null), [x, b] = V(0);
61814
+ le(() => {
61821
61815
  w.current && b(w.current.offsetWidth);
61822
61816
  const C = () => {
61823
61817
  w.current && b(w.current.offsetWidth);
@@ -62066,13 +62060,13 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
62066
62060
  if (!t) return null;
62067
62061
  t.commands.setContent(e);
62068
62062
  }, Ule = O(function({ mentionsConfig: e, enhanceConfig: n, filesConfig: i, secondaryAction: r, primaryAction: o, maxCharacters: s, initialEditorState: a, onChange: l, placeholder: c, toolbarLabels: f, title: u, errorConfig: h, height: p = "auto", plainHtmlMode: m = !1, fullScreenMode: g = !0 }, y) {
62069
- const v = Kr(), w = fe(null), x = fe(null), b = fe(null), [_, C] = H(!1), [N, A] = H(!0), [L, S] = H(!1), [D, E] = H(!1), [R, B] = H(!1), [F, z] = H(!1), [U, Q] = H(null), [ie, M] = H(!1), [be, de] = H(null), [I, we] = H((a == null ? void 0 : a.files) || []), [Re, Le] = H((e == null ? void 0 : e.users) || []), [V, G] = H({
62063
+ const v = Kr(), w = fe(null), x = fe(null), b = fe(null), [_, C] = V(!1), [N, A] = V(!0), [L, S] = V(!1), [D, E] = V(!1), [R, B] = V(!1), [F, z] = V(!1), [U, Q] = V(null), [ie, M] = V(!1), [be, de] = V(null), [I, we] = V((a == null ? void 0 : a.files) || []), [Re, Le] = V((e == null ? void 0 : e.users) || []), [H, G] = V({
62070
62064
  html: (a == null ? void 0 : a.content) || "",
62071
62065
  json: null
62072
62066
  });
62073
- ae(() => (D ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
62067
+ le(() => (D ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
62074
62068
  document.body.style.overflow = "";
62075
- }), [D]), ae(() => {
62069
+ }), [D]), le(() => {
62076
62070
  const Ne = D ? window.innerHeight : Hle(p);
62077
62071
  return jle({
62078
62072
  containerRef: b,
@@ -62080,7 +62074,7 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
62080
62074
  onScrollChange: A,
62081
62075
  heightThreshold: Ne
62082
62076
  });
62083
- }, [p, D]), ae(() => {
62077
+ }, [p, D]), le(() => {
62084
62078
  if (L && b.current) {
62085
62079
  const Ne = b.current.getBoundingClientRect().height;
62086
62080
  z(Ne < 64);
@@ -62098,7 +62092,7 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
62098
62092
  maxCharacters: s,
62099
62093
  plainHtmlMode: m
62100
62094
  }),
62101
- content: V.html,
62095
+ content: H.html,
62102
62096
  onUpdate: ({ editor: Ne }) => {
62103
62097
  Wle({
62104
62098
  editor: Ne,
@@ -62107,7 +62101,7 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
62107
62101
  });
62108
62102
  }
62109
62103
  });
62110
- ae(() => {
62104
+ le(() => {
62111
62105
  U && ge && ge.setEditable(!1);
62112
62106
  }, [U, ge]), Zf(y, () => ({
62113
62107
  clear: () => ge == null ? void 0 : ge.commands.clearContent(),
@@ -62542,7 +62536,7 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
62542
62536
  className: "min-h-[0.15rem] min-w-[0.15rem] rounded-full bg-f1-foreground-secondary"
62543
62537
  }), ice = O(function({ header: e, children: n, action: i, summaries: r, alert: o, status: s, fullHeight: a = !1 }, l) {
62544
62538
  const { enabled: c, toggle: f } = X8();
62545
- ae(() => {
62539
+ le(() => {
62546
62540
  if (o && s)
62547
62541
  throw Error("You cannot pass both alert and status at the same time to this component");
62548
62542
  }, [o, s]);
@@ -63058,7 +63052,7 @@ const $le = ({ mentionsConfig: t, mentionSuggestions: e, setMentionSuggestions:
63058
63052
  });
63059
63053
  });
63060
63054
  function wce(t, e) {
63061
- const n = fe(null), i = fe(null), [r, o] = H({
63055
+ const n = fe(null), i = fe(null), [r, o] = V({
63062
63056
  visibleItems: [],
63063
63057
  overflowItems: []
63064
63058
  });
@@ -63095,7 +63089,7 @@ function wce(t, e) {
63095
63089
  overflowItems: t.slice(h)
63096
63090
  });
63097
63091
  }, [t, a, l]);
63098
- return ae(() => {
63092
+ return le(() => {
63099
63093
  c();
63100
63094
  }, [c]), {
63101
63095
  containerRef: n,
@@ -63106,7 +63100,7 @@ function wce(t, e) {
63106
63100
  }
63107
63101
  const K1 = function({ items: e, renderListItem: n, className: i, gap: r = 0, minSize: o, onVisibleItemsChange: s }) {
63108
63102
  const { containerRef: a, measurementContainerRef: l, visibleItems: c } = wce(e, r);
63109
- return ae(() => {
63103
+ return le(() => {
63110
63104
  s == null || s(c);
63111
63105
  }, [s, c]), k("div", {
63112
63106
  ref: a,
@@ -63356,7 +63350,7 @@ function Sfe({ trackedMinutes: t, remainingMinutes: e, data: n = [], labels: i,
63356
63350
  label: M.duration ? `${M.name} · ${M.duration}` : M.name,
63357
63351
  description: M.description,
63358
63352
  tag: M.isPaid ? i.paid : i.unpaid
63359
- }))) ?? [], [S, D] = H(!1), E = () => {
63353
+ }))) ?? [], [S, D] = V(!1), E = () => {
63360
63354
  var M;
63361
63355
  if (L.length > 1)
63362
63356
  S || D(!0);
@@ -63370,7 +63364,7 @@ function Sfe({ trackedMinutes: t, remainingMinutes: e, data: n = [], labels: i,
63370
63364
  value: M.id,
63371
63365
  label: M.name,
63372
63366
  icon: M.icon
63373
- })), U = b === "break", [Q, ie] = H(!1);
63367
+ })), U = b === "break", [Q, ie] = V(!1);
63374
63368
  return d("div", {
63375
63369
  className: "@container",
63376
63370
  children: k("div", {
@@ -63745,7 +63739,7 @@ function Ice({ task: t, status: e, onClick: n, hideIcon: i = !1 }) {
63745
63739
  var s;
63746
63740
  const r = () => {
63747
63741
  n == null || n(t);
63748
- }, o = le(() => {
63742
+ }, o = ae(() => {
63749
63743
  if (!i) {
63750
63744
  if (e === "todo")
63751
63745
  return Lp;
@@ -63912,8 +63906,8 @@ var ede = ({ stones: t, containerSize: e }) => {
63912
63906
  let i = n.getBoundingClientRect();
63913
63907
  return e.push({ width: i.width, height: i.height }), e;
63914
63908
  }, []), nde = ({ boxesRefs: t, wrapperRef: e, children: n, windowWidth: i, wrapperWidth: r }) => {
63915
- let [{ positions: o, containerHeight: s, stones: a, availableSpots: l }, c] = H({ positions: [], containerHeight: null, stones: [], availableSpots: [] });
63916
- return ae(() => {
63909
+ let [{ positions: o, containerHeight: s, stones: a, availableSpots: l }, c] = V({ positions: [], containerHeight: null, stones: [], availableSpots: [] });
63910
+ return le(() => {
63917
63911
  var f, u;
63918
63912
  let h = tde(t.current), p = (u = (f = e.current) == null ? void 0 : f.offsetWidth) != null ? u : 0;
63919
63913
  if (p === null) return;
@@ -63937,8 +63931,8 @@ function ade(t, e, n) {
63937
63931
  };
63938
63932
  }
63939
63933
  var lde = () => {
63940
- let [t, e] = H(), n = fe(ade(e, 300));
63941
- return ae(() => {
63934
+ let [t, e] = V(), n = fe(ade(e, 300));
63935
+ return le(() => {
63942
63936
  let i = () => {
63943
63937
  n.current(window.innerWidth);
63944
63938
  };
@@ -63947,8 +63941,8 @@ var lde = () => {
63947
63941
  };
63948
63942
  }, []), t;
63949
63943
  }, cde = (t) => {
63950
- let [e, n] = H(null);
63951
- return ae(() => {
63944
+ let [e, n] = V(null);
63945
+ return le(() => {
63952
63946
  let i = new ResizeObserver((r) => {
63953
63947
  for (let o of r) n(o.contentRect.width);
63954
63948
  });
@@ -63970,8 +63964,8 @@ const fde = {
63970
63964
  md: 480,
63971
63965
  lg: 640
63972
63966
  }, u8 = O(function({ children: e, widgetWidth: n = "sm" }, i) {
63973
- const r = fde[n], [o, s] = H(), a = ry.toArray(e), l = fe(null);
63974
- return ae(() => {
63967
+ const r = fde[n], [o, s] = V(), a = ry.toArray(e), l = fe(null);
63968
+ return le(() => {
63975
63969
  const c = () => {
63976
63970
  var u;
63977
63971
  const f = (u = l.current) == null ? void 0 : u.offsetWidth;