@omg-dev/app 0.1.388 → 0.1.389

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.
@@ -2723,7 +2723,7 @@ function Lr({
2723
2723
  const w = d.current, M = u.current, _ = m.current, S = f.current;
2724
2724
  if (!w || !M || !_ || !S) return;
2725
2725
  const k = Qb(), D = o % 10 * 0.7;
2726
- let B = (Bo[p.current] ?? cs).slice(), W = B.slice(), se = B.slice(), V = 0, z = 0, ne = null, ie = null;
2726
+ let B = (Bo[p.current] ?? cs).slice(), W = B.slice(), ne = B.slice(), V = 0, z = 0, re = null, ie = null;
2727
2727
  const me = { ...Fo[h.current].pupil };
2728
2728
  if (k) {
2729
2729
  const U = Fo[h.current], R = (Bo[p.current] ?? cs).map(
@@ -2740,17 +2740,17 @@ function Lr({
2740
2740
  };
2741
2741
  q();
2742
2742
  const ae = Zb((U, R) => {
2743
- const I = Fo[h.current], T = (Bo[p.current] ?? cs).map((Q, re) => Q * (I.radii[re] / Rn));
2744
- ne !== h.current || ie !== p.current ? (B = se.slice(), W = T, V = R, z = I.dur, ne = h.current, ie = p.current, _.style.transform = `rotate(${I.tilt}deg)`, S.style.transform = I.closed ? Bc : aa) : z === 0 && (W = T);
2743
+ const I = Fo[h.current], T = (Bo[p.current] ?? cs).map((Q, se) => Q * (I.radii[se] / Rn));
2744
+ re !== h.current || ie !== p.current ? (B = ne.slice(), W = T, V = R, z = I.dur, re = h.current, ie = p.current, _.style.transform = `rotate(${I.tilt}deg)`, S.style.transform = I.closed ? Bc : aa) : z === 0 && (W = T);
2745
2745
  let E;
2746
2746
  if (z > 0) {
2747
- const Q = Math.min(1, (R - V) / z), re = Bb(Q);
2748
- E = B.map((ye, ge) => ye + (W[ge] - ye) * re), Q >= 1 && (z = 0);
2747
+ const Q = Math.min(1, (R - V) / z), se = Bb(Q);
2748
+ E = B.map((ye, ge) => ye + (W[ge] - ye) * se), Q >= 1 && (z = 0);
2749
2749
  } else
2750
2750
  E = W.slice();
2751
2751
  E = E.map(
2752
- (Q, re) => Q * (1 + I.wobbleAmp * Math.sin(U * I.wobbleSpeed + D + re * 0.55))
2753
- ), se = E, w.setAttribute("d", ia(E)), me.x = Uc(me.x, I.pupil.x, 0.12), me.y = Uc(me.y, I.pupil.y, 0.12), M.setAttribute("transform", `translate(${me.x.toFixed(2)},${me.y.toFixed(2)})`);
2752
+ (Q, se) => Q * (1 + I.wobbleAmp * Math.sin(U * I.wobbleSpeed + D + se * 0.55))
2753
+ ), ne = E, w.setAttribute("d", ia(E)), me.x = Uc(me.x, I.pupil.x, 0.12), me.y = Uc(me.y, I.pupil.y, 0.12), M.setAttribute("transform", `translate(${me.x.toFixed(2)},${me.y.toFixed(2)})`);
2754
2754
  });
2755
2755
  return () => {
2756
2756
  ae(), K && clearTimeout(K);
@@ -3147,11 +3147,11 @@ function xx({
3147
3147
  D && a((B) => {
3148
3148
  const W = la(_, $n, qo);
3149
3149
  if (W === $n) return Sr;
3150
- const se = D.getBoundingClientRect(), V = S - se.left, z = k - se.top, ne = W / B.scale;
3150
+ const ne = D.getBoundingClientRect(), V = S - ne.left, z = k - ne.top, re = W / B.scale;
3151
3151
  return {
3152
3152
  scale: W,
3153
- ox: B.ox + V * (1 - ne),
3154
- oy: B.oy + z * (1 - ne)
3153
+ ox: B.ox + V * (1 - re),
3154
+ oy: B.oy + z * (1 - re)
3155
3155
  };
3156
3156
  });
3157
3157
  }, []), p = oe(
@@ -3163,8 +3163,8 @@ function xx({
3163
3163
  if (!D) return k;
3164
3164
  const B = la(k.scale * S, $n, qo);
3165
3165
  if (B === $n) return Sr;
3166
- const W = D.getBoundingClientRect(), se = _.clientX - W.left, V = _.clientY - W.top, z = B / k.scale;
3167
- return { scale: B, ox: k.ox + se * (1 - z), oy: k.oy + V * (1 - z) };
3166
+ const W = D.getBoundingClientRect(), ne = _.clientX - W.left, V = _.clientY - W.top, z = B / k.scale;
3167
+ return { scale: B, ox: k.ox + ne * (1 - z), oy: k.oy + V * (1 - z) };
3168
3168
  });
3169
3169
  },
3170
3170
  []
@@ -3184,9 +3184,9 @@ function xx({
3184
3184
  if (!k) return;
3185
3185
  const D = { x: _.clientX, y: _.clientY };
3186
3186
  if (S.set(_.pointerId, D), S.size >= 2 && d.current) {
3187
- const [B, W] = [...S.values()], se = Math.hypot(B.x - W.x, B.y - W.y), V = (B.x + W.x) / 2, z = (B.y + W.y) / 2, ne = o.current;
3188
- if (ne && d.current.dist > 0) {
3189
- const ie = ne.getBoundingClientRect(), me = se / d.current.dist, K = V - d.current.mx, q = z - d.current.my, ae = V - ie.left, U = z - ie.top;
3187
+ const [B, W] = [...S.values()], ne = Math.hypot(B.x - W.x, B.y - W.y), V = (B.x + W.x) / 2, z = (B.y + W.y) / 2, re = o.current;
3188
+ if (re && d.current.dist > 0) {
3189
+ const ie = re.getBoundingClientRect(), me = ne / d.current.dist, K = V - d.current.mx, q = z - d.current.my, ae = V - ie.left, U = z - ie.top;
3190
3190
  a((R) => {
3191
3191
  const I = la(R.scale * me, $n, qo);
3192
3192
  if (I === $n) return Sr;
@@ -3198,12 +3198,12 @@ function xx({
3198
3198
  };
3199
3199
  }), u.current = !0;
3200
3200
  }
3201
- d.current = { dist: se, mx: V, my: z };
3201
+ d.current = { dist: ne, mx: V, my: z };
3202
3202
  return;
3203
3203
  }
3204
3204
  if (S.size === 1) {
3205
3205
  const B = D.x - k.x, W = D.y - k.y;
3206
- (Math.abs(B) > 2 || Math.abs(W) > 2) && (u.current = !0), a((se) => se.scale <= $n ? se : { ...se, ox: se.ox + B, oy: se.oy + W });
3206
+ (Math.abs(B) > 2 || Math.abs(W) > 2) && (u.current = !0), a((ne) => ne.scale <= $n ? ne : { ...ne, ox: ne.ox + B, oy: ne.oy + W });
3207
3207
  }
3208
3208
  }
3209
3209
  function y(_) {
@@ -4259,9 +4259,9 @@ function ly(e, t, r = {}) {
4259
4259
  Z.sessionId && be && ($[Z.sessionId] = be);
4260
4260
  }
4261
4261
  return $;
4262
- }, [e]), [u, m] = v({}), [f, h] = v({}), [p, b] = v({}), [x, y] = v({}), [w, M] = v({}), _ = j(null), S = j(!1), k = j(/* @__PURE__ */ new Set()), D = j(/* @__PURE__ */ new Set()), B = j(/* @__PURE__ */ new Map()), W = j(/* @__PURE__ */ new Set()), se = j(/* @__PURE__ */ new Set()), V = j({}), z = j({}), ne = j({}), ie = j({}), me = j({}), K = j(u), q = j(w), ae = j({}), U = j(/* @__PURE__ */ new Set()), R = j(/* @__PURE__ */ new Set()), I = j(0), C = j(0), T = j(!1), E = j(Wo), Q = j(null), re = j(!1), ye = j(0), ge = j(null), J = j(null), de = j(() => {
4262
+ }, [e]), [u, m] = v({}), [f, h] = v({}), [p, b] = v({}), [x, y] = v({}), [w, M] = v({}), _ = j(null), S = j(!1), k = j(/* @__PURE__ */ new Set()), D = j(/* @__PURE__ */ new Set()), B = j(/* @__PURE__ */ new Map()), W = j(/* @__PURE__ */ new Set()), ne = j(/* @__PURE__ */ new Set()), V = j({}), z = j({}), re = j({}), ie = j({}), me = j({}), K = j(u), q = j(w), ae = j({}), U = j(/* @__PURE__ */ new Set()), R = j(/* @__PURE__ */ new Set()), I = j(0), C = j(0), T = j(!1), E = j(Wo), Q = j(null), se = j(!1), ye = j(0), ge = j(null), J = j(null), de = j(() => {
4263
4263
  }), [we, Se] = v(ay), Fe = oe(($, Z) => {
4264
- const be = ne.current[$];
4264
+ const be = re.current[$];
4265
4265
  if (be != null && be.size)
4266
4266
  for (const Oe of be) Oe(Z);
4267
4267
  }, []);
@@ -4427,7 +4427,7 @@ function ly(e, t, r = {}) {
4427
4427
  }, [Fe, Je, Be]);
4428
4428
  F(() => {
4429
4429
  if (!s) return;
4430
- T.current = !1, re.current = !1;
4430
+ T.current = !1, se.current = !1;
4431
4431
  const $ = () => {
4432
4432
  var Y;
4433
4433
  const Ge = _.current;
@@ -4440,7 +4440,7 @@ function ly(e, t, r = {}) {
4440
4440
  }, Oe = () => {
4441
4441
  if (T.current || S.current) return;
4442
4442
  const Ge = _.current;
4443
- Ge && (Ge.readyState === WebSocket.OPEN || Ge.readyState === WebSocket.CONNECTING) || (Q.current != null && (clearTimeout(Q.current), Q.current = null), re.current = !1, Se((te) => ({
4443
+ Ge && (Ge.readyState === WebSocket.OPEN || Ge.readyState === WebSocket.CONNECTING) || (Q.current != null && (clearTimeout(Q.current), Q.current = null), se.current = !1, Se((te) => ({
4444
4444
  ...te,
4445
4445
  status: te.status === "offline" ? "offline" : te.attempt > 0 ? "reconnecting" : "connecting"
4446
4446
  })), S.current = !0, vh().then((te) => {
@@ -4477,7 +4477,7 @@ function ly(e, t, r = {}) {
4477
4477
  lastCloseReason: gt,
4478
4478
  latencyMs: null
4479
4479
  })), typeof document < "u" && document.hidden) {
4480
- re.current = !0;
4480
+ se.current = !0;
4481
4481
  return;
4482
4482
  }
4483
4483
  const bt = Wc(E.current);
@@ -4515,10 +4515,10 @@ function ly(e, t, r = {}) {
4515
4515
  if (typeof document > "u" || document.visibilityState !== "visible") return;
4516
4516
  const Ge = _.current, te = Zx(
4517
4517
  (Ge == null ? void 0 : Ge.readyState) ?? null,
4518
- re.current
4518
+ se.current
4519
4519
  );
4520
4520
  if (te === "connect") {
4521
- re.current = !1, qe(), Oe();
4521
+ se.current = !1, qe(), Oe();
4522
4522
  return;
4523
4523
  }
4524
4524
  if (te !== "probe" || !Ge) return;
@@ -4541,13 +4541,13 @@ function ly(e, t, r = {}) {
4541
4541
  }, Yc);
4542
4542
  J.current = { id: he, ws: Ge, timer: Le };
4543
4543
  }, Ze = () => {
4544
- re.current = !1, S.current = !1, qe(), Oe();
4544
+ se.current = !1, S.current = !1, qe(), Oe();
4545
4545
  };
4546
4546
  return document.addEventListener("visibilitychange", De), window.addEventListener("online", Ze), Oe(), () => {
4547
4547
  var te;
4548
4548
  T.current = !0, document.removeEventListener("visibilitychange", De), window.removeEventListener("online", Ze), window.clearInterval(Z), ge.current = null;
4549
4549
  const Ge = J.current;
4550
- Ge && (clearTimeout(Ge.timer), J.current = null), Q.current != null && (clearTimeout(Q.current), Q.current = null), re.current = !1;
4550
+ Ge && (clearTimeout(Ge.timer), J.current = null), Q.current != null && (clearTimeout(Q.current), Q.current = null), se.current = !1;
4551
4551
  try {
4552
4552
  (te = _.current) == null || te.close();
4553
4553
  } catch {
@@ -4558,12 +4558,12 @@ function ly(e, t, r = {}) {
4558
4558
  };
4559
4559
  }, [s, We]);
4560
4560
  const ze = oe(() => {
4561
- re.current = !1, Q.current != null && (clearTimeout(Q.current), Q.current = null), E.current = Wo, de.current();
4561
+ se.current = !1, Q.current != null && (clearTimeout(Q.current), Q.current = null), E.current = Wo, de.current();
4562
4562
  }, []);
4563
4563
  F(() => {
4564
4564
  const $ = new Set(i);
4565
- se.current = $;
4566
- const Z = /* @__PURE__ */ new Set([...$, ...Object.keys(ne.current)]), be = new Set(Object.keys(l));
4565
+ ne.current = $;
4566
+ const Z = /* @__PURE__ */ new Set([...$, ...Object.keys(re.current)]), be = new Set(Object.keys(l));
4567
4567
  ie.current = Object.fromEntries(
4568
4568
  Object.entries(ie.current).filter(([Y]) => be.has(Y))
4569
4569
  );
@@ -4696,13 +4696,13 @@ function ly(e, t, r = {}) {
4696
4696
  delete z.current[$], B.current.delete(Oe), s && _e([be]) && W.current.delete(Oe);
4697
4697
  };
4698
4698
  }, [s, ve, _e]), O = oe(($, Z) => {
4699
- (ne.current[$] || (ne.current[$] = /* @__PURE__ */ new Set())).add(Z);
4699
+ (re.current[$] || (re.current[$] = /* @__PURE__ */ new Set())).add(Z);
4700
4700
  const Oe = ie.current[$];
4701
4701
  Oe && Z({ type: "queue", queue: Oe });
4702
4702
  const qe = Vo($), De = hn(qe);
4703
4703
  return k.current.add($), B.current.set(De, qe), s && !W.current.has(De) && ve([qe]) && (W.current.add(De), D.current.add($)), () => {
4704
- const Ze = ne.current[$];
4705
- Ze && (Ze.delete(Z), !Ze.size && (delete ne.current[$], !se.current.has($) && (k.current.delete($), B.current.delete(De), s && W.current.has(De) && _e([qe]) && (W.current.delete(De), D.current.delete($)))));
4704
+ const Ze = re.current[$];
4705
+ Ze && (Ze.delete(Z), !Ze.size && (delete re.current[$], !ne.current.has($) && (k.current.delete($), B.current.delete(De), s && W.current.has(De) && _e([qe]) && (W.current.delete(De), D.current.delete($)))));
4706
4706
  };
4707
4707
  }, [s, ve, _e]), ce = je(() => ({ ...l, ...f }), [l, f]);
4708
4708
  return {
@@ -5721,7 +5721,7 @@ function hv(e) {
5721
5721
  }
5722
5722
  const gv = (e) => {
5723
5723
  var t, r, s, o, i, a, l, d, u;
5724
- const { invert: m, toast: f, unstyled: h, interacting: p, setHeights: b, visibleToasts: x, heights: y, index: w, toasts: M, expanded: _, removeToast: S, defaultRichColors: k, closeButton: D, style: B, cancelButtonStyle: W, actionButtonStyle: se, className: V = "", descriptionClassName: z = "", duration: ne, position: ie, gap: me, expandByDefault: K, classNames: q, icons: ae, closeButtonAriaLabel: U = "Close toast" } = e, [R, I] = Ie.useState(null), [C, T] = Ie.useState(null), [E, Q] = Ie.useState(!1), [re, ye] = Ie.useState(!1), [ge, J] = Ie.useState(!1), [de, we] = Ie.useState(!1), [Se, Fe] = Ie.useState(!1), [Be, xe] = Ie.useState(0), [ve, _e] = Ie.useState(0), Je = Ie.useRef(f.duration || ne || ed), We = Ie.useRef(null), ze = Ie.useRef(null), pe = w === 0, ee = w + 1 <= x, X = f.type, Ce = f.dismissible !== !1, Re = f.className || "", tt = f.descriptionClassName || "", O = Ie.useMemo(() => y.findIndex((le) => le.toastId === f.id) || 0, [
5724
+ const { invert: m, toast: f, unstyled: h, interacting: p, setHeights: b, visibleToasts: x, heights: y, index: w, toasts: M, expanded: _, removeToast: S, defaultRichColors: k, closeButton: D, style: B, cancelButtonStyle: W, actionButtonStyle: ne, className: V = "", descriptionClassName: z = "", duration: re, position: ie, gap: me, expandByDefault: K, classNames: q, icons: ae, closeButtonAriaLabel: U = "Close toast" } = e, [R, I] = Ie.useState(null), [C, T] = Ie.useState(null), [E, Q] = Ie.useState(!1), [se, ye] = Ie.useState(!1), [ge, J] = Ie.useState(!1), [de, we] = Ie.useState(!1), [Se, Fe] = Ie.useState(!1), [Be, xe] = Ie.useState(0), [ve, _e] = Ie.useState(0), Je = Ie.useRef(f.duration || re || ed), We = Ie.useRef(null), ze = Ie.useRef(null), pe = w === 0, ee = w + 1 <= x, X = f.type, Ce = f.dismissible !== !1, Re = f.className || "", tt = f.descriptionClassName || "", O = Ie.useMemo(() => y.findIndex((le) => le.toastId === f.id) || 0, [
5725
5725
  y,
5726
5726
  f.id
5727
5727
  ]), ce = Ie.useMemo(() => {
@@ -5730,9 +5730,9 @@ const gv = (e) => {
5730
5730
  }, [
5731
5731
  f.closeButton,
5732
5732
  D
5733
- ]), $ = Ie.useMemo(() => f.duration || ne || ed, [
5733
+ ]), $ = Ie.useMemo(() => f.duration || re || ed, [
5734
5734
  f.duration,
5735
- ne
5735
+ re
5736
5736
  ]), Z = Ie.useRef(0), be = Ie.useRef(0), Oe = Ie.useRef(0), qe = Ie.useRef(null), [De, Ze] = ie.split("-"), Ge = Ie.useMemo(() => y.reduce((le, bt, lt) => lt >= O ? le : le + bt.height, 0), [
5737
5737
  y,
5738
5738
  O
@@ -5851,7 +5851,7 @@ const gv = (e) => {
5851
5851
  "data-mounted": E,
5852
5852
  "data-promise": !!f.promise,
5853
5853
  "data-swiped": Se,
5854
- "data-removed": re,
5854
+ "data-removed": se,
5855
5855
  "data-visible": ee,
5856
5856
  "data-y-position": De,
5857
5857
  "data-x-position": Ze,
@@ -5869,7 +5869,7 @@ const gv = (e) => {
5869
5869
  "--index": w,
5870
5870
  "--toasts-before": w,
5871
5871
  "--z-index": M.length - w,
5872
- "--offset": `${re ? Be : be.current}px`,
5872
+ "--offset": `${se ? Be : be.current}px`,
5873
5873
  "--initial-height": K ? "auto" : `${ve}px`,
5874
5874
  ...B,
5875
5875
  ...f.style
@@ -5958,7 +5958,7 @@ const gv = (e) => {
5958
5958
  }, f.cancel.label) : null, /* @__PURE__ */ Ie.isValidElement(f.action) ? f.action : f.action && Ko(f.action) ? /* @__PURE__ */ Ie.createElement("button", {
5959
5959
  "data-button": !0,
5960
5960
  "data-action": !0,
5961
- style: f.actionButtonStyle || se,
5961
+ style: f.actionButtonStyle || ne,
5962
5962
  onClick: (le) => {
5963
5963
  Ko(f.action) && (f.action.onClick == null || f.action.onClick.call(f.action, le), !le.defaultPrevented && Le());
5964
5964
  },
@@ -6004,38 +6004,38 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6004
6004
  ], expand: l, closeButton: d, className: u, offset: m, mobileOffset: f, theme: h = "light", richColors: p, duration: b, style: x, visibleToasts: y = lv, toastOptions: w, dir: M = td(), gap: _ = fv, icons: S, containerAriaLabel: k = "Notifications" } = t, [D, B] = Ie.useState([]), W = Ie.useMemo(() => s ? D.filter((E) => E.toasterId === s) : D.filter((E) => !E.toasterId), [
6005
6005
  D,
6006
6006
  s
6007
- ]), se = Ie.useMemo(() => Array.from(new Set([
6007
+ ]), ne = Ie.useMemo(() => Array.from(new Set([
6008
6008
  i
6009
6009
  ].concat(W.filter((E) => E.position).map((E) => E.position)))), [
6010
6010
  W,
6011
6011
  i
6012
- ]), [V, z] = Ie.useState([]), [ne, ie] = Ie.useState(!1), [me, K] = Ie.useState(!1), [q, ae] = Ie.useState(h !== "system" ? h : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), U = Ie.useRef(null), R = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), I = Ie.useRef(null), C = Ie.useRef(!1), T = Ie.useCallback((E) => {
6012
+ ]), [V, z] = Ie.useState([]), [re, ie] = Ie.useState(!1), [me, K] = Ie.useState(!1), [q, ae] = Ie.useState(h !== "system" ? h : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), U = Ie.useRef(null), R = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), I = Ie.useRef(null), C = Ie.useRef(!1), T = Ie.useCallback((E) => {
6013
6013
  B((Q) => {
6014
- var re;
6015
- return (re = Q.find((ye) => ye.id === E.id)) != null && re.delete || tn.dismiss(E.id), Q.filter(({ id: ye }) => ye !== E.id);
6014
+ var se;
6015
+ return (se = Q.find((ye) => ye.id === E.id)) != null && se.delete || tn.dismiss(E.id), Q.filter(({ id: ye }) => ye !== E.id);
6016
6016
  });
6017
6017
  }, []);
6018
6018
  return Ie.useEffect(() => tn.subscribe((E) => {
6019
6019
  if (E.dismiss) {
6020
6020
  requestAnimationFrame(() => {
6021
- B((Q) => Q.map((re) => re.id === E.id ? {
6022
- ...re,
6021
+ B((Q) => Q.map((se) => se.id === E.id ? {
6022
+ ...se,
6023
6023
  delete: !0
6024
- } : re));
6024
+ } : se));
6025
6025
  });
6026
6026
  return;
6027
6027
  }
6028
6028
  setTimeout(() => {
6029
6029
  Lp.flushSync(() => {
6030
6030
  B((Q) => {
6031
- const re = Q.findIndex((ye) => ye.id === E.id);
6032
- return re !== -1 ? [
6033
- ...Q.slice(0, re),
6031
+ const se = Q.findIndex((ye) => ye.id === E.id);
6032
+ return se !== -1 ? [
6033
+ ...Q.slice(0, se),
6034
6034
  {
6035
- ...Q[re],
6035
+ ...Q[se],
6036
6036
  ...E
6037
6037
  },
6038
- ...Q.slice(re + 1)
6038
+ ...Q.slice(se + 1)
6039
6039
  ] : [
6040
6040
  E,
6041
6041
  ...Q
@@ -6057,9 +6057,9 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6057
6057
  ae(Q ? "dark" : "light");
6058
6058
  });
6059
6059
  } catch {
6060
- E.addListener(({ matches: re }) => {
6060
+ E.addListener(({ matches: se }) => {
6061
6061
  try {
6062
- ae(re ? "dark" : "light");
6062
+ ae(se ? "dark" : "light");
6063
6063
  } catch (ye) {
6064
6064
  console.error(ye);
6065
6065
  }
@@ -6073,12 +6073,12 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6073
6073
  D
6074
6074
  ]), Ie.useEffect(() => {
6075
6075
  const E = (Q) => {
6076
- var re;
6076
+ var se;
6077
6077
  if (a.every((J) => Q[J] || Q.code === J)) {
6078
6078
  var ge;
6079
6079
  ie(!0), (ge = U.current) == null || ge.focus();
6080
6080
  }
6081
- Q.code === "Escape" && (document.activeElement === U.current || (re = U.current) != null && re.contains(document.activeElement)) && ie(!1);
6081
+ Q.code === "Escape" && (document.activeElement === U.current || (se = U.current) != null && se.contains(document.activeElement)) && ie(!1);
6082
6082
  };
6083
6083
  return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
6084
6084
  }, [
@@ -6101,8 +6101,8 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6101
6101
  "aria-relevant": "additions text",
6102
6102
  "aria-atomic": "false",
6103
6103
  suppressHydrationWarning: !0
6104
- }, se.map((E, Q) => {
6105
- var re;
6104
+ }, ne.map((E, Q) => {
6105
+ var se;
6106
6106
  const [ye, ge] = E.split("-");
6107
6107
  return W.length ? /* @__PURE__ */ Ie.createElement("ol", {
6108
6108
  key: E,
@@ -6115,7 +6115,7 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6115
6115
  "data-y-position": ye,
6116
6116
  "data-x-position": ge,
6117
6117
  style: {
6118
- "--front-toast-height": `${((re = V[0]) == null ? void 0 : re.height) || 0}px`,
6118
+ "--front-toast-height": `${((se = V[0]) == null ? void 0 : se.height) || 0}px`,
6119
6119
  "--width": `${uv}px`,
6120
6120
  "--gap": `${_}px`,
6121
6121
  ...x,
@@ -6167,7 +6167,7 @@ const xv = /* @__PURE__ */ Ie.forwardRef(function(t, r) {
6167
6167
  setHeights: z,
6168
6168
  expandByDefault: l,
6169
6169
  gap: _,
6170
- expanded: ne,
6170
+ expanded: re,
6171
6171
  swipeDirections: t.swipeDirections
6172
6172
  });
6173
6173
  })) : null;
@@ -7351,7 +7351,7 @@ function bw({
7351
7351
  ), [S, k] = v(""), [D, B] = v(!1), W = je(
7352
7352
  () => a ? Math.max(4, Math.round(a.w / 220)) : 6,
7353
7353
  [a]
7354
- ), se = je(
7354
+ ), ne = je(
7355
7355
  () => a ? Math.max(18, Math.round(a.w / 22)) : 24,
7356
7356
  [a]
7357
7357
  );
@@ -7396,7 +7396,7 @@ function bw({
7396
7396
  }
7397
7397
  I.currentTarget.setPointerCapture(I.pointerId), x([]), w(d === "pen" ? { type: "path", points: [C], color: m, width: W } : { type: d, x0: C.x, y0: C.y, x1: C.x, y1: C.y, color: m, width: W });
7398
7398
  }
7399
- function ne(I) {
7399
+ function re(I) {
7400
7400
  if (!y) return;
7401
7401
  const C = V(I);
7402
7402
  w((T) => T && (T.type === "path" ? { ...T, points: [...T.points, C] } : T.type === "text" ? T : { ...T, x1: C.x, y1: C.y }));
@@ -7407,7 +7407,7 @@ function bw({
7407
7407
  function me() {
7408
7408
  M && S.trim() && (p((I) => [
7409
7409
  ...I,
7410
- { type: "text", x: M.x, y: M.y, text: S.trim(), color: m, fontSize: se }
7410
+ { type: "text", x: M.x, y: M.y, text: S.trim(), color: m, fontSize: ne }
7411
7411
  ]), x([])), _(null), k("");
7412
7412
  }
7413
7413
  function K() {
@@ -7518,7 +7518,7 @@ function bw({
7518
7518
  ref: o,
7519
7519
  className: "max-h-[calc(92dvh-14rem)] max-w-full touch-none rounded-2xl",
7520
7520
  onPointerDown: z,
7521
- onPointerMove: ne,
7521
+ onPointerMove: re,
7522
7522
  onPointerUp: ie,
7523
7523
  onPointerLeave: ie,
7524
7524
  onPointerCancel: ie
@@ -7788,7 +7788,7 @@ const Cw = Ms(function({
7788
7788
  ] }) : null;
7789
7789
  }), Mw = Hr(
7790
7790
  "session-files-panel",
7791
- () => import("./SessionFilesPanel-Be_6sdA3.js")
7791
+ () => import("./SessionFilesPanel-Dx0i8Ooe.js")
7792
7792
  );
7793
7793
  function El({ className: e, ...t }) {
7794
7794
  return /* @__PURE__ */ n(
@@ -8512,7 +8512,7 @@ async function zS() {
8512
8512
  }
8513
8513
  }
8514
8514
  const Jw = Ni(
8515
- () => import("./streamdown-response-ChjxDLfU.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
8515
+ () => import("./streamdown-response-CmJUqevp.js").then((e) => e.a).then((e) => ({ default: e.StreamdownResponse }))
8516
8516
  );
8517
8517
  function Us({ className: e, from: t, ...r }) {
8518
8518
  return /* @__PURE__ */ n(
@@ -10387,12 +10387,12 @@ function tk({
10387
10387
  for (const R of U.windows ?? [])
10388
10388
  if (R.resetsAt === B) return `${U.label} · ${R.label}`;
10389
10389
  return null;
10390
- }, [D, B]), se = je(
10390
+ }, [D, B]), ne = je(
10391
10391
  () => k && B != null ? (k.windows ?? []).filter(
10392
10392
  (U) => U.resetsAt != null && U.resetsAt > o && U.resetsAt !== B
10393
10393
  ).sort((U, R) => (U.resetsAt ?? 0) - (R.resetsAt ?? 0)) : [],
10394
10394
  [k, B, o]
10395
- ), V = (S == null ? void 0 : S.members) ?? [], z = k ? Ed(k) : null, ne = k != null && B == null && (z == null ? void 0 : z.pct) != null, ie = u ? "60%" : "55%", me = nm(p, u), K = me.logo, q = me.ring, ae = me.logo;
10395
+ ), V = (S == null ? void 0 : S.members) ?? [], z = k ? Ed(k) : null, re = k != null && B == null && (z == null ? void 0 : z.pct) != null, ie = u ? "60%" : "55%", me = nm(p, u), K = me.logo, q = me.ring, ae = me.logo;
10396
10396
  return /* @__PURE__ */ c(
10397
10397
  "div",
10398
10398
  {
@@ -10469,7 +10469,7 @@ function tk({
10469
10469
  {
10470
10470
  className: "text-[10px] font-semibold uppercase tracking-[0.18em] sm:text-[11px]",
10471
10471
  style: { letterSpacing: "0.18em" },
10472
- children: ne ? "Used" : "Next restore"
10472
+ children: re ? "Used" : "Next restore"
10473
10473
  }
10474
10474
  )
10475
10475
  ]
@@ -10498,7 +10498,7 @@ function tk({
10498
10498
  animation: "lfg-ember-shimmer 1.4s ease-in-out infinite"
10499
10499
  }
10500
10500
  }
10501
- ) : ne && (z == null ? void 0 : z.pct) != null ? `${Math.round(z.pct)}%` : B ? /* @__PURE__ */ n(H1, { resetsAt: B, now: o }) : "—"
10501
+ ) : re && (z == null ? void 0 : z.pct) != null ? `${Math.round(z.pct)}%` : B ? /* @__PURE__ */ n(H1, { resetsAt: B, now: o }) : "—"
10502
10502
  }
10503
10503
  ),
10504
10504
  /* @__PURE__ */ n(
@@ -10506,16 +10506,16 @@ function tk({
10506
10506
  {
10507
10507
  className: "min-h-[1.15rem] max-w-[16rem] text-[12px] sm:text-[13px]",
10508
10508
  style: { color: S ? Bt.label : Bt.soft },
10509
- children: s || (h ? "Reading agent limits…" : ne && k && z ? `${k.label} · ${z.label}` : W || (S && !k ? `Reading ${S.label}…` : d.length ? "No upcoming resets reported" : "No agents reporting usage"))
10509
+ children: s || (h ? "Reading agent limits…" : re && k && z ? `${k.label} · ${z.label}` : W || (S && !k ? `Reading ${S.label}…` : d.length ? "No upcoming resets reported" : "No agents reporting usage"))
10510
10510
  }
10511
10511
  ),
10512
- se.length ? /* @__PURE__ */ n(
10512
+ ne.length ? /* @__PURE__ */ n(
10513
10513
  "div",
10514
10514
  {
10515
10515
  className: "mt-0.5 flex flex-col items-center gap-0.5 text-[10px] tabular-nums sm:text-[11px]",
10516
10516
  style: { color: Bt.soft },
10517
10517
  "aria-label": "Other upcoming resets",
10518
- children: se.map((U) => /* @__PURE__ */ c("span", { children: [
10518
+ children: ne.map((U) => /* @__PURE__ */ c("span", { children: [
10519
10519
  /* @__PURE__ */ n("span", { style: { color: Bt.label }, children: U.label }),
10520
10520
  " restores ",
10521
10521
  V1(U.resetsAt, o)
@@ -10577,7 +10577,7 @@ function tk({
10577
10577
  `skeleton-${R}`
10578
10578
  )) : null,
10579
10579
  d.map((U, R) => {
10580
- const I = U.usage, C = b[R] ?? { x: 0, y: 0 }, T = I ? Ed(I) : null, E = (T == null ? void 0 : T.pct) ?? (I ? X1(I) : null), Q = x === U.id, re = x != null && !Q, ye = I == null, ge = !ye && !Td(I);
10580
+ const I = U.usage, C = b[R] ?? { x: 0, y: 0 }, T = I ? Ed(I) : null, E = (T == null ? void 0 : T.pct) ?? (I ? X1(I) : null), Q = x === U.id, se = x != null && !Q, ye = I == null, ge = !ye && !Td(I);
10581
10581
  return /* @__PURE__ */ c(
10582
10582
  "button",
10583
10583
  {
@@ -10618,7 +10618,7 @@ function tk({
10618
10618
  top: `calc(${ie} + ${C.y}px)`,
10619
10619
  transform: "translate(-50%, -50%) scale(var(--lfg-arc-scale))",
10620
10620
  // Emphasis: the hovered agent stays lit, the rest recede.
10621
- opacity: re ? 0.42 : ge ? 0.62 : 1,
10621
+ opacity: se ? 0.42 : ge ? 0.62 : 1,
10622
10622
  animationDelay: `${R * 40}ms`
10623
10623
  },
10624
10624
  children: [
@@ -10918,26 +10918,26 @@ function mk({ className: e, isStreaming: t, children: r, ...s }) {
10918
10918
  function pk({ className: e, children: t, ...r }) {
10919
10919
  return /* @__PURE__ */ n(If, { className: P("mt-2 text-sm", e), ...r, children: /* @__PURE__ */ n(Ao, { className: "ai-live-text max-w-full opacity-90", children: t }) });
10920
10920
  }
10921
- const hk = Ni(() => import("./chat-engine-DYiSkucI.js"));
10921
+ const hk = Ni(() => import("./chat-engine-DK16dq4L.js"));
10922
10922
  function gk() {
10923
- const e = () => void import("./chat-engine-DYiSkucI.js"), t = globalThis.requestIdleCallback;
10923
+ const e = () => void import("./chat-engine-DK16dq4L.js"), t = globalThis.requestIdleCallback;
10924
10924
  typeof t == "function" ? t(e, { timeout: 3e3 }) : setTimeout(e, 1500);
10925
10925
  }
10926
10926
  const sm = Hr(
10927
10927
  "TermView",
10928
- () => import("./TermView-BGLYHLEG.js").then((e) => ({ default: e.TermView }))
10929
- ), $d = Hr("ShippedPage", () => import("./shipped-page-BZZiKL8H.js")), bk = Hr(
10928
+ () => import("./TermView-BI80KyPL.js").then((e) => ({ default: e.TermView }))
10929
+ ), $d = Hr("ShippedPage", () => import("./shipped-page-ClLo0IaC.js")), bk = Hr(
10930
10930
  "SessionTokenUsageDialog",
10931
- () => import("./session-token-usage-KYKslFs8.js")
10931
+ () => import("./session-token-usage-f0zoKDdN.js")
10932
10932
  ), xk = Hr(
10933
10933
  "CodingAgentsPage",
10934
- () => import("./coding-agents-page-CrWl1uOR.js")
10934
+ () => import("./coding-agents-page-akvWVczZ.js")
10935
10935
  ), zd = Hr(
10936
10936
  "ResumeSessionSheet",
10937
- () => import("./resume-session-sheet-EJedarp9.js")
10937
+ () => import("./resume-session-sheet-Ctzovog7.js")
10938
10938
  ), yk = Hr(
10939
10939
  "ChangelogPage",
10940
- () => import("./ChangelogPage-C-Y9l96v.js")
10940
+ () => import("./ChangelogPage-BnVVCD5q.js")
10941
10941
  ), zi = Ht("configured"), vk = {
10942
10942
  claude: "Claude",
10943
10943
  codex: "Codex",
@@ -11639,8 +11639,8 @@ function ql({
11639
11639
  preparing: !1
11640
11640
  } : { preparing: !1 };
11641
11641
  p(R.id, Q);
11642
- const re = { ...E, ...Q };
11643
- return b(re), re;
11642
+ const se = { ...E, ...Q };
11643
+ return b(se), se;
11644
11644
  });
11645
11645
  return _.current.set(R.id, I), I;
11646
11646
  },
@@ -11704,7 +11704,7 @@ function ql({
11704
11704
  _.current.delete(R), y(R);
11705
11705
  },
11706
11706
  [y]
11707
- ), se = oe(() => {
11707
+ ), ne = oe(() => {
11708
11708
  _.current.clear(), w();
11709
11709
  }, [w]), V = oe(
11710
11710
  async (R) => {
@@ -11720,7 +11720,7 @@ function ql({
11720
11720
  });
11721
11721
  },
11722
11722
  [W]
11723
- ), ne = {
11723
+ ), re = {
11724
11724
  onDragEnter: (R) => {
11725
11725
  Array.from(R.dataTransfer.types).includes("Files") && l(!0);
11726
11726
  },
@@ -11797,8 +11797,8 @@ function ql({
11797
11797
  startAttachmentUpload: k,
11798
11798
  resolveUpload: V,
11799
11799
  forgetUpload: W,
11800
- forgetAllUploads: se,
11801
- dropZoneProps: ne,
11800
+ forgetAllUploads: ne,
11801
+ dropZoneProps: re,
11802
11802
  onPasteFiles: ie,
11803
11803
  openFilePicker: me,
11804
11804
  // Ready-to-render pieces: drop these into the composer markup.
@@ -12049,7 +12049,7 @@ function ym(e) {
12049
12049
  }, []), M = oe(() => {
12050
12050
  var q;
12051
12051
  (q = x.current) == null || q.getAudioTracks().forEach((ae) => ae.enabled = !1), y.current !== null && clearTimeout(y.current), y.current = setTimeout(w, Dd);
12052
- }, [w]), _ = j(e.onText), S = j(e.onAutoSubmit), k = j(e.onInterim), D = j(e.onCancel), B = j(e.baseText ?? ""), W = j(""), se = e.silenceMs ?? 2500;
12052
+ }, [w]), _ = j(e.onText), S = j(e.onAutoSubmit), k = j(e.onInterim), D = j(e.onCancel), B = j(e.baseText ?? ""), W = j(""), ne = e.silenceMs ?? 2500;
12053
12053
  _.current = e.onText, S.current = e.onAutoSubmit, k.current = e.onInterim, D.current = e.onCancel, B.current = e.baseText ?? "";
12054
12054
  const V = typeof navigator < "u" && !!((K = navigator.mediaDevices) != null && K.getUserMedia), z = oe(
12055
12055
  async (q = !1, ae = !1) => {
@@ -12113,9 +12113,9 @@ function ym(e) {
12113
12113
  return;
12114
12114
  }
12115
12115
  const Q = new Float32Array(E);
12116
- let re = 0;
12116
+ let se = 0;
12117
12117
  for (const J of U.chunks)
12118
- Q.set(J, re), re += J.length;
12118
+ Q.set(J, se), se += J.length;
12119
12119
  try {
12120
12120
  const J = await Ot("/api/voice/stt", {
12121
12121
  method: "POST",
@@ -12129,7 +12129,7 @@ function ym(e) {
12129
12129
  R();
12130
12130
  },
12131
12131
  [w]
12132
- ), ne = oe(async (q) => {
12132
+ ), re = oe(async (q) => {
12133
12133
  const ae = (q == null ? void 0 : q.autoStop) ?? !0;
12134
12134
  if (d.current || f.current) return;
12135
12135
  if (f.current = !0, h.current = null, W.current = B.current, r("starting"), Sf() === !1) {
@@ -12148,7 +12148,7 @@ function ym(e) {
12148
12148
  C = window.setTimeout(() => ge(Hs), dN);
12149
12149
  }), E = (ge) => Promise.race([ge, I, T]), Q = () => {
12150
12150
  clearTimeout(C), b.current === R && (b.current = null);
12151
- }, re = (ge) => {
12151
+ }, se = (ge) => {
12152
12152
  var de;
12153
12153
  Q(), f.current = !1;
12154
12154
  const J = h.current;
@@ -12182,7 +12182,7 @@ function ym(e) {
12182
12182
  }
12183
12183
  x.current = Se, M();
12184
12184
  }).catch(() => {
12185
- }), re(
12185
+ }), se(
12186
12186
  de === Hs ? "Microphone didn't respond — check for a blocked permission prompt" : void 0
12187
12187
  );
12188
12188
  return;
@@ -12190,24 +12190,24 @@ function ym(e) {
12190
12190
  ye = de, x.current = ye;
12191
12191
  }
12192
12192
  } catch (ge) {
12193
- re(jd(ge));
12193
+ se(jd(ge));
12194
12194
  return;
12195
12195
  }
12196
12196
  if (h.current) {
12197
- M(), re();
12197
+ M(), se();
12198
12198
  return;
12199
12199
  }
12200
12200
  try {
12201
12201
  if (!m.current) {
12202
12202
  const pe = await E(Jv("input"));
12203
12203
  if (pe === Qo || pe === Hs) {
12204
- M(), re(
12204
+ M(), se(
12205
12205
  pe === Hs ? "Voice setup check timed out — try again" : void 0
12206
12206
  );
12207
12207
  return;
12208
12208
  }
12209
12209
  if (!pe) {
12210
- M(), re();
12210
+ M(), se();
12211
12211
  return;
12212
12212
  }
12213
12213
  }
@@ -12295,7 +12295,7 @@ function ym(e) {
12295
12295
  S.current && Ce > sN && (ve = !0, _e = Date.now());
12296
12296
  };
12297
12297
  const Je = ae && S.current ? setInterval(() => {
12298
- !d.current || !ve || Date.now() - _e >= se && z(!0);
12298
+ !d.current || !ve || Date.now() - _e >= ne && z(!0);
12299
12299
  }, 200) : null;
12300
12300
  d.current = {
12301
12301
  ac: J,
@@ -12325,11 +12325,11 @@ function ym(e) {
12325
12325
  const ze = h.current;
12326
12326
  ze && (h.current = null, z(ze.auto, ze.discard));
12327
12327
  } catch (ge) {
12328
- M(), re(jd(ge));
12328
+ M(), se(jd(ge));
12329
12329
  }
12330
- }, [se, z, M]), ie = oe(() => {
12331
- t !== "transcribing" && (d.current || f.current ? z(!0) : ne());
12332
- }, [t, ne, z]), me = oe(() => {
12330
+ }, [ne, z, M]), ie = oe(() => {
12331
+ t !== "transcribing" && (d.current || f.current ? z(!0) : re());
12332
+ }, [t, re, z]), me = oe(() => {
12333
12333
  t !== "transcribing" && z(!1, !0);
12334
12334
  }, [t, z]);
12335
12335
  return F(
@@ -12338,7 +12338,7 @@ function ym(e) {
12338
12338
  p.current += 1, (q = b.current) == null || q.call(b), w();
12339
12339
  },
12340
12340
  [w]
12341
- ), { state: t, toggle: ie, start: ne, stop: z, cancel: me, supported: V, level: s };
12341
+ ), { state: t, toggle: ie, start: re, stop: z, cancel: me, supported: V, level: s };
12342
12342
  }
12343
12343
  const vm = 300, wm = 48, wa = 10, ka = 32;
12344
12344
  function uN({
@@ -12421,9 +12421,9 @@ const Di = wi(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12421
12421
  };
12422
12422
  return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
12423
12423
  }, [f, x]);
12424
- const M = j(null), _ = j(!1), S = j(null), k = j(!1), D = j(!1), B = j(!1), [W, se] = v(!1), V = j(null), z = oe(() => {
12424
+ const M = j(null), _ = j(!1), S = j(null), k = j(!1), D = j(!1), B = j(!1), [W, ne] = v(!1), V = j(null), z = oe(() => {
12425
12425
  M.current !== null && (clearTimeout(M.current), M.current = null);
12426
- }, []), ne = oe(
12426
+ }, []), re = oe(
12427
12427
  (I) => {
12428
12428
  if (I.button === 0 && f !== "transcribing") {
12429
12429
  D.current = !0, _.current = !1, k.current = !1, S.current = { x: I.clientX, y: I.clientY };
@@ -12443,7 +12443,7 @@ const Di = wi(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12443
12443
  const C = S.current;
12444
12444
  if (!C) return;
12445
12445
  const E = Math.hypot(I.clientX - C.x, I.clientY - C.y) > wm;
12446
- E !== k.current && (k.current = E, se(E), ft(E ? "warning" : "selection"));
12446
+ E !== k.current && (k.current = E, ne(E), ft(E ? "warning" : "selection"));
12447
12447
  },
12448
12448
  [f]
12449
12449
  ), me = oe(
@@ -12454,14 +12454,14 @@ const Di = wi(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12454
12454
  I.currentTarget.releasePointerCapture(I.pointerId);
12455
12455
  } catch {
12456
12456
  }
12457
- z(), se(!1);
12457
+ z(), ne(!1);
12458
12458
  const C = k.current;
12459
12459
  k.current = !1, C ? (_.current = !1, ft("selection"), x()) : _.current ? (_.current = !1, b(!0)) : (ft("medium"), h());
12460
12460
  },
12461
12461
  [b, h, x, z]
12462
12462
  ), K = oe(() => {
12463
12463
  if (!D.current) return;
12464
- D.current = !1, z(), se(!1);
12464
+ D.current = !1, z(), ne(!1);
12465
12465
  const I = k.current;
12466
12466
  k.current = !1, I ? (_.current = !1, x()) : _.current && (_.current = !1, b(!0));
12467
12467
  }, [b, x, z]), q = oe(() => {
@@ -12472,7 +12472,7 @@ const Di = wi(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12472
12472
  f !== "transcribing" && (ft("medium"), h());
12473
12473
  }, [f, h]);
12474
12474
  if (F(() => (u == null || u(f === "recording"), () => u == null ? void 0 : u(!1)), [f, u]), F(() => {
12475
- f !== "recording" && se(!1);
12475
+ f !== "recording" && ne(!1);
12476
12476
  }, [f]), !y) return null;
12477
12477
  const ae = f === "recording", U = Xv(), R = ae ? xm(w) : void 0;
12478
12478
  return /* @__PURE__ */ c(Ve, { children: [
@@ -12489,7 +12489,7 @@ const Di = wi(function({ onText: t, onAutoSubmit: r, onInterim: s, onCancel: o,
12489
12489
  {
12490
12490
  ref: V,
12491
12491
  type: "button",
12492
- onPointerDown: ne,
12492
+ onPointerDown: re,
12493
12493
  onPointerMove: ie,
12494
12494
  onPointerUp: me,
12495
12495
  onPointerCancel: K,
@@ -12543,7 +12543,7 @@ function fN({
12543
12543
  };
12544
12544
  return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
12545
12545
  }, [f, b]);
12546
- const w = j(null), M = j(null), _ = j(null), S = j(!1), k = j(!1), D = j(!1), [B, W] = v(!1), se = oe(() => {
12546
+ const w = j(null), M = j(null), _ = j(null), S = j(!1), k = j(!1), D = j(!1), [B, W] = v(!1), ne = oe(() => {
12547
12547
  w.current !== null && (clearTimeout(w.current), w.current = null);
12548
12548
  }, []), V = oe(
12549
12549
  (R) => {
@@ -12553,7 +12553,7 @@ function fN({
12553
12553
  R.currentTarget.setPointerCapture(R.pointerId);
12554
12554
  } catch {
12555
12555
  }
12556
- f === "idle" && (!e && !x || (se(), w.current = window.setTimeout(() => {
12556
+ f === "idle" && (!e && !x || (ne(), w.current = window.setTimeout(() => {
12557
12557
  if (w.current = null, M.current = e ? "queue" : "voice", ft("heavy"), e) {
12558
12558
  o();
12559
12559
  return;
@@ -12562,7 +12562,7 @@ function fN({
12562
12562
  }, vm)));
12563
12563
  }
12564
12564
  },
12565
- [f, t, e, o, x, h, se]
12565
+ [f, t, e, o, x, h, ne]
12566
12566
  ), z = oe(
12567
12567
  (R) => {
12568
12568
  if (!k.current || M.current === "queue" || !M.current && f !== "recording" && f !== "starting") return;
@@ -12572,7 +12572,7 @@ function fN({
12572
12572
  T !== S.current && (S.current = T, W(T), ft(T ? "warning" : "selection"));
12573
12573
  },
12574
12574
  [f]
12575
- ), ne = oe(
12575
+ ), re = oe(
12576
12576
  (R) => {
12577
12577
  if (!k.current) return;
12578
12578
  k.current = !1, D.current = !0;
@@ -12580,7 +12580,7 @@ function fN({
12580
12580
  R.currentTarget.releasePointerCapture(R.pointerId);
12581
12581
  } catch {
12582
12582
  }
12583
- se(), W(!1);
12583
+ ne(), W(!1);
12584
12584
  const I = S.current;
12585
12585
  if (S.current = !1, I) {
12586
12586
  M.current = null, ft("selection"), b();
@@ -12596,13 +12596,13 @@ function fN({
12596
12596
  }
12597
12597
  e && !t && (ft("selection"), s());
12598
12598
  },
12599
- [p, b, f, e, t, s, se]
12599
+ [p, b, f, e, t, s, ne]
12600
12600
  ), ie = oe(() => {
12601
12601
  if (!k.current) return;
12602
- k.current = !1, se(), W(!1);
12602
+ k.current = !1, ne(), W(!1);
12603
12603
  const R = S.current;
12604
12604
  S.current = !1, R ? (M.current = null, b()) : M.current === "voice" ? (M.current = null, p(!0)) : M.current = null;
12605
- }, [p, b, se]), me = oe(() => {
12605
+ }, [p, b, ne]), me = oe(() => {
12606
12606
  if (D.current) {
12607
12607
  D.current = !1;
12608
12608
  return;
@@ -12619,7 +12619,7 @@ function fN({
12619
12619
  type: "button",
12620
12620
  onPointerDown: V,
12621
12621
  onPointerMove: z,
12622
- onPointerUp: ne,
12622
+ onPointerUp: re,
12623
12623
  onPointerCancel: ie,
12624
12624
  onClick: me,
12625
12625
  onContextMenu: (R) => R.preventDefault(),
@@ -12769,8 +12769,8 @@ function NN(e, t) {
12769
12769
  }, [e]), i = je(() => {
12770
12770
  const V = {};
12771
12771
  for (const z of e) {
12772
- const ne = tN(z);
12773
- z.sessionId && ne && (V[z.sessionId] = ne);
12772
+ const re = tN(z);
12773
+ z.sessionId && re && (V[z.sessionId] = re);
12774
12774
  }
12775
12775
  return V;
12776
12776
  }, [e]), [a, l] = v({}), [d, u] = v({}), [m, f] = v({}), [h, p] = v({}), [b, x] = v({}), y = j({}), w = j(a), M = j(b);
@@ -12805,18 +12805,18 @@ function NN(e, t) {
12805
12805
  (T = w.current[E]) != null && T.some((Q) => !Q.seed) || (C[E] = !0);
12806
12806
  return C;
12807
12807
  }), !r.length) return;
12808
- const ne = ((R = crypto.randomUUID) == null ? void 0 : R.call(crypto)) ?? `live-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, ie = performance.now(), me = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
12809
- rr("live_stream_client_start", { rid: ne, ids: r, idsCount: r.length });
12810
- const ae = new EventSource(`/api/live/stream?ids=${r.join(",")}&rid=${encodeURIComponent(ne)}`);
12808
+ const re = ((R = crypto.randomUUID) == null ? void 0 : R.call(crypto)) ?? `live-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, ie = performance.now(), me = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
12809
+ rr("live_stream_client_start", { rid: re, ids: r, idsCount: r.length });
12810
+ const ae = new EventSource(`/api/live/stream?ids=${r.join(",")}&rid=${encodeURIComponent(re)}`);
12811
12811
  ae.onopen = () => {
12812
12812
  rr("live_stream_client_open", {
12813
- rid: ne,
12813
+ rid: re,
12814
12814
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12815
12815
  });
12816
12816
  };
12817
12817
  const U = window.setTimeout(() => {
12818
12818
  rr("live_stream_client_loading_fallback", {
12819
- rid: ne,
12819
+ rid: re,
12820
12820
  ids: [...V],
12821
12821
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12822
12822
  }), p((I) => {
@@ -12834,18 +12834,18 @@ function NN(e, t) {
12834
12834
  const T = C.sid, E = C.m;
12835
12835
  if (!V.has(T)) return;
12836
12836
  if (me.has(T) || (me.add(T), rr("live_stream_client_first_msg", {
12837
- rid: ne,
12837
+ rid: re,
12838
12838
  sid: T,
12839
12839
  kind: E.kind,
12840
12840
  role: E.role,
12841
12841
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12842
- })), p((re) => ({ ...re, [T]: !1 })), E.id && E.kind !== "thinking") {
12843
- const re = y.current[T] || (y.current[T] = /* @__PURE__ */ new Set());
12844
- if (re.has(E.id)) return;
12845
- re.add(E.id), re.size > 800 && (y.current[T] = new Set(Array.from(re).slice(-400)));
12842
+ })), p((se) => ({ ...se, [T]: !1 })), E.id && E.kind !== "thinking") {
12843
+ const se = y.current[T] || (y.current[T] = /* @__PURE__ */ new Set());
12844
+ if (se.has(E.id)) return;
12845
+ se.add(E.id), se.size > 800 && (y.current[T] = new Set(Array.from(se).slice(-400)));
12846
12846
  }
12847
- l((re) => {
12848
- const ye = re[T] ?? [];
12847
+ l((se) => {
12848
+ const ye = se[T] ?? [];
12849
12849
  let ge = ye;
12850
12850
  if (E.kind === "thinking")
12851
12851
  ge = [...ye.filter((J) => J.kind !== "thinking"), E];
@@ -12854,13 +12854,13 @@ function NN(e, t) {
12854
12854
  let de = !1;
12855
12855
  ge = J ? ye.filter((we) => !we.pending || de || !os(E.text, we.text) ? !0 : (de = !0, !1)) : ye.filter((we) => !(we.kind === "thinking" || E.role === "assistant" && E.kind === "text" && po(we))), ge = Qk(ge, E);
12856
12856
  }
12857
- return { ...re, [T]: ge.slice(-80) };
12857
+ return { ...se, [T]: ge.slice(-80) };
12858
12858
  });
12859
12859
  const Q = _.current;
12860
12860
  Q[T] && clearTimeout(Q[T]), E.kind === "thinking" ? Q[T] = setTimeout(() => {
12861
- delete Q[T], l((re) => {
12862
- const ye = re[T];
12863
- return ye != null && ye.some((ge) => ge.kind === "thinking") ? { ...re, [T]: ye.filter((ge) => ge.kind !== "thinking") } : re;
12861
+ delete Q[T], l((se) => {
12862
+ const ye = se[T];
12863
+ return ye != null && ye.some((ge) => ge.kind === "thinking") ? { ...se, [T]: ye.filter((ge) => ge.kind !== "thinking") } : se;
12864
12864
  });
12865
12865
  }, 2500) : delete Q[T];
12866
12866
  }), ae.addEventListener("ai_part", (I) => {
@@ -12871,13 +12871,13 @@ function NN(e, t) {
12871
12871
  p((ye) => ({ ...ye, [T]: !1 }));
12872
12872
  const Q = _.current;
12873
12873
  Q[T] && (clearTimeout(Q[T]), delete Q[T]);
12874
- const re = !q.has(T);
12874
+ const se = !q.has(T);
12875
12875
  q.add(T), l((ye) => {
12876
12876
  const ge = ye[T] ?? [], J = ge.find(
12877
12877
  (Fe) => po(Fe) && Fe.id === E.id
12878
12878
  ), de = E.reset ? E.text ?? E.delta ?? "" : `${(J == null ? void 0 : J.text) ?? ""}${E.delta ?? ""}`;
12879
12879
  if (!de) return ye;
12880
- const we = (J == null ? void 0 : J.catchUp) ?? (re && !!E.reset && de.length > kk), Se = {
12880
+ const we = (J == null ? void 0 : J.catchUp) ?? (se && !!E.reset && de.length > kk), Se = {
12881
12881
  id: E.id,
12882
12882
  role: "assistant",
12883
12883
  kind: "text",
@@ -12898,29 +12898,29 @@ function NN(e, t) {
12898
12898
  if (!C || !V.has(C.sid)) return;
12899
12899
  const T = C.sid, E = no(Array.isArray(C.messages) ? C.messages : []);
12900
12900
  if (!me.has(T) && E.length) {
12901
- const re = E[0];
12901
+ const se = E[0];
12902
12902
  me.add(T), rr("live_stream_client_first_msg", {
12903
- rid: ne,
12903
+ rid: re,
12904
12904
  sid: T,
12905
- kind: re.kind,
12906
- role: re.role,
12905
+ kind: se.kind,
12906
+ role: se.role,
12907
12907
  batch: !0,
12908
12908
  count: E.length,
12909
12909
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12910
12910
  });
12911
12911
  }
12912
- p((re) => ({ ...re, [T]: !1 }));
12912
+ p((se) => ({ ...se, [T]: !1 }));
12913
12913
  const Q = y.current[T] || (y.current[T] = /* @__PURE__ */ new Set());
12914
- for (const re of E)
12915
- re.id && re.kind !== "thinking" && Q.add(re.id);
12916
- Q.size > 800 && (y.current[T] = new Set(Array.from(Q).slice(-400))), x((re) => ({ ...re, [T]: C.nextBefore ?? null })), l((re) => {
12917
- const ye = re[T] ?? [];
12918
- return { ...re, [T]: Od(ye, E) };
12914
+ for (const se of E)
12915
+ se.id && se.kind !== "thinking" && Q.add(se.id);
12916
+ Q.size > 800 && (y.current[T] = new Set(Array.from(Q).slice(-400))), x((se) => ({ ...se, [T]: C.nextBefore ?? null })), l((se) => {
12917
+ const ye = se[T] ?? [];
12918
+ return { ...se, [T]: Od(ye, E) };
12919
12919
  });
12920
12920
  }), ae.addEventListener("ready", (I) => {
12921
12921
  const C = sr(I.data);
12922
12922
  !C || !V.has(C.sid) || (K.has(C.sid) || (K.add(C.sid), rr("live_stream_client_ready", {
12923
- rid: ne,
12923
+ rid: re,
12924
12924
  sid: C.sid,
12925
12925
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12926
12926
  })), p((T) => ({ ...T, [C.sid]: !1 })));
@@ -12930,7 +12930,7 @@ function NN(e, t) {
12930
12930
  const T = _.current[C.sid];
12931
12931
  T && (clearTimeout(T), delete _.current[C.sid]), l((E) => {
12932
12932
  const Q = E[C.sid];
12933
- return Q != null && Q.some((re) => re.kind === "thinking") ? { ...E, [C.sid]: Q.filter((re) => re.kind !== "thinking") } : E;
12933
+ return Q != null && Q.some((se) => se.kind === "thinking") ? { ...E, [C.sid]: Q.filter((se) => se.kind !== "thinking") } : E;
12934
12934
  });
12935
12935
  }
12936
12936
  }), ae.addEventListener("prompt", (I) => {
@@ -12946,7 +12946,7 @@ function NN(e, t) {
12946
12946
  }));
12947
12947
  }), ae.onerror = () => {
12948
12948
  rr("live_stream_client_error", {
12949
- rid: ne,
12949
+ rid: re,
12950
12950
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3
12951
12951
  }), p((I) => {
12952
12952
  var E;
@@ -12958,7 +12958,7 @@ function NN(e, t) {
12958
12958
  });
12959
12959
  }, () => {
12960
12960
  rr("live_stream_client_close", {
12961
- rid: ne,
12961
+ rid: re,
12962
12962
  elapsedMs: Math.round((performance.now() - ie) * 1e3) / 1e3,
12963
12963
  firstMsgCount: me.size,
12964
12964
  readyCount: K.size
@@ -12968,7 +12968,7 @@ function NN(e, t) {
12968
12968
  };
12969
12969
  }, [s]);
12970
12970
  const S = oe((V, z) => {
12971
- const ne = {
12971
+ const re = {
12972
12972
  id: `optimistic-${Date.now()}`,
12973
12973
  role: "user",
12974
12974
  kind: "text",
@@ -12979,16 +12979,16 @@ function NN(e, t) {
12979
12979
  };
12980
12980
  l((ie) => ({
12981
12981
  ...ie,
12982
- [V]: [...(ie[V] ?? []).filter((me) => me.kind !== "thinking"), ne].slice(-80)
12982
+ [V]: [...(ie[V] ?? []).filter((me) => me.kind !== "thinking"), re].slice(-80)
12983
12983
  })), u((ie) => ({ ...ie, [V]: !0 }));
12984
12984
  }, []), k = oe((V, z) => {
12985
- l((ne) => {
12986
- const ie = ne[V] ?? [];
12985
+ l((re) => {
12986
+ const ie = re[V] ?? [];
12987
12987
  let me = !1;
12988
12988
  const K = ie.filter((q) => me || !q.pending || !os(q.text, z) ? !0 : (me = !0, !1));
12989
- return K.length === ie.length ? ne : { ...ne, [V]: K };
12989
+ return K.length === ie.length ? re : { ...re, [V]: K };
12990
12990
  });
12991
- }, []), D = oe(async (V, z, ne = {}) => {
12991
+ }, []), D = oe(async (V, z, re = {}) => {
12992
12992
  const ie = await Ne(
12993
12993
  `/api/sessions/${encodeURIComponent(V)}/messages?limit=80`
12994
12994
  ), me = no(Array.isArray(ie.messages) ? ie.messages : []), K = y.current[V] || (y.current[V] = /* @__PURE__ */ new Set());
@@ -12996,15 +12996,15 @@ function NN(e, t) {
12996
12996
  q.id && q.kind !== "thinking" && K.add(q.id);
12997
12997
  return K.size > 800 && (y.current[V] = new Set(Array.from(K).slice(-400))), p((q) => ({ ...q, [V]: !1 })), l((q) => {
12998
12998
  const ae = q[V] ?? [], U = Od(ae, me);
12999
- return !ne.dropOptimistic || !z ? { ...q, [V]: U } : {
12999
+ return !re.dropOptimistic || !z ? { ...q, [V]: U } : {
13000
13000
  ...q,
13001
13001
  [V]: U.filter((R) => !R.pending || !os(R.text, z))
13002
13002
  };
13003
13003
  }), me;
13004
13004
  }, []), B = oe(
13005
- (V, z, ne) => {
13005
+ (V, z, re) => {
13006
13006
  (async () => {
13007
- const ie = ne == null ? void 0 : ne.id;
13007
+ const ie = re == null ? void 0 : re.id;
13008
13008
  for (let me = 0; me < 45; me++) {
13009
13009
  me > 0 && await new Promise((K) => window.setTimeout(K, me < 8 ? 500 : 1200));
13010
13010
  try {
@@ -13037,24 +13037,24 @@ function NN(e, t) {
13037
13037
  if (!(V in M.current)) return !0;
13038
13038
  const z = M.current[V];
13039
13039
  if (z == null) return !1;
13040
- const ne = await Ne(
13040
+ const re = await Ne(
13041
13041
  `/api/sessions/${encodeURIComponent(V)}/messages?page=backward&before=${z}&limit=80`
13042
- ), ie = no(Array.isArray(ne.messages) ? ne.messages : []);
13043
- if (x((K) => ({ ...K, [V]: ne.nextBefore ?? null })), !ie.length) return (ne.nextBefore ?? null) !== null;
13042
+ ), ie = no(Array.isArray(re.messages) ? re.messages : []);
13043
+ if (x((K) => ({ ...K, [V]: re.nextBefore ?? null })), !ie.length) return (re.nextBefore ?? null) !== null;
13044
13044
  const me = y.current[V] || (y.current[V] = /* @__PURE__ */ new Set());
13045
13045
  for (const K of ie)
13046
13046
  K.id && K.kind !== "thinking" && me.add(K.id);
13047
13047
  return l((K) => {
13048
13048
  const q = K[V] ?? [], ae = new Set(q.map((R) => R.id).filter(Boolean)), U = ie.filter((R) => !R.id || !ae.has(R.id));
13049
13049
  return U.length ? { ...K, [V]: [...U, ...q.filter((R) => !R.seed)] } : K;
13050
- }), (ne.nextBefore ?? null) !== null;
13051
- }, []), se = je(
13050
+ }), (re.nextBefore ?? null) !== null;
13051
+ }, []), ne = je(
13052
13052
  () => ({ ...o, ...d }),
13053
13053
  [o, d]
13054
13054
  );
13055
13055
  return {
13056
13056
  messagesBySid: a,
13057
- busyBySid: se,
13057
+ busyBySid: ne,
13058
13058
  promptsBySid: m,
13059
13059
  loadingBySid: h,
13060
13060
  addOptimisticMessage: S,
@@ -13214,9 +13214,9 @@ function _N() {
13214
13214
  window.removeEventListener("message", A), window.removeEventListener("pageshow", g), window.removeEventListener("focus", g), document.removeEventListener("visibilitychange", H);
13215
13215
  };
13216
13216
  }, [w]);
13217
- const B = Jr(), W = Cm(), [se, V] = v(null);
13217
+ const B = Jr(), W = Cm(), [ne, V] = v(null);
13218
13218
  qt(() => {
13219
- const g = se;
13219
+ const g = ne;
13220
13220
  if (!B || !g) {
13221
13221
  document.documentElement.style.removeProperty("--lfg-mobile-header-height");
13222
13222
  return;
@@ -13232,8 +13232,8 @@ function _N() {
13232
13232
  return H.observe(g), window.addEventListener("resize", A), () => {
13233
13233
  H.disconnect(), window.removeEventListener("resize", A), document.documentElement.style.removeProperty("--lfg-mobile-header-height");
13234
13234
  };
13235
- }, [B, se]), F(() => {
13236
- const g = o.current, A = se, H = s.current;
13235
+ }, [B, ne]), F(() => {
13236
+ const g = o.current, A = ne, H = s.current;
13237
13237
  if (!B || !g || !A || !H) return;
13238
13238
  let fe = 0;
13239
13239
  const Pe = () => {
@@ -13263,8 +13263,8 @@ function _N() {
13263
13263
  return Ue.observe(g, { childList: !0, subtree: !0, characterData: !0 }), () => {
13264
13264
  g.removeEventListener("scroll", Pe), window.removeEventListener("resize", Pe), Xe.disconnect(), Ue.disconnect(), fe && cancelAnimationFrame(fe), A.style.removeProperty("--lfg-mobile-header-fade-opacity"), H.style.removeProperty("--lfg-mobile-composer-fade-opacity");
13265
13265
  };
13266
- }, [B, se]);
13267
- const [z, ne] = v(!1), [ie, me] = v([]), [K, q] = v(null), [ae, U] = v(null), [R, I] = v(null), [C, T] = v(null), [E, Q] = v(!1), re = j(!1), [ye, ge] = v(), [J, de] = v(
13266
+ }, [B, ne]);
13267
+ const [z, re] = v(!1), [ie, me] = v([]), [K, q] = v(null), [ae, U] = v(null), [R, I] = v(null), [C, T] = v(null), [E, Q] = v(!1), se = j(!1), [ye, ge] = v(), [J, de] = v(
13268
13268
  () => ss()
13269
13269
  ), [we, Se] = v([]), [Fe, Be] = v([]), xe = j(
13270
13270
  /* @__PURE__ */ new Map()
@@ -13358,7 +13358,7 @@ function _N() {
13358
13358
  }, [be]), F(() => {
13359
13359
  const g = window.visualViewport, A = () => {
13360
13360
  const ct = s.current;
13361
- ct && (ct.style.height = "", ct.style.transform = ""), document.documentElement.style.removeProperty("--lfg-app-height"), document.documentElement.classList.remove("lfg-keyboard-open"), document.documentElement.style.removeProperty("--lfg-keyboard-height"), document.documentElement.style.removeProperty("--lfg-visual-offset-top"), document.documentElement.style.removeProperty("--lfg-visual-height"), ne(!1);
13361
+ ct && (ct.style.height = "", ct.style.transform = ""), document.documentElement.style.removeProperty("--lfg-app-height"), document.documentElement.classList.remove("lfg-keyboard-open"), document.documentElement.style.removeProperty("--lfg-keyboard-height"), document.documentElement.style.removeProperty("--lfg-visual-offset-top"), document.documentElement.style.removeProperty("--lfg-visual-height"), re(!1);
13362
13362
  };
13363
13363
  if (!g) {
13364
13364
  A();
@@ -13393,7 +13393,7 @@ function _N() {
13393
13393
  document.documentElement.style.setProperty("--lfg-app-height", Qi), document.documentElement.style.setProperty("--lfg-visual-height", Qi), document.documentElement.style.setProperty("--lfg-visual-offset-top", Sp), !Nn && yc > 0 && requestAnimationFrame(() => window.scrollTo(0, 0)), Qr && !M && (lt || !Nn || le === "live" && B ? Qr.style.height = Qi : Qr.style.height = "", Qr.style.transform = lt && Zi ? `translateY(${Zi}px)` : ""), document.documentElement.style.setProperty(
13394
13394
  "--lfg-keyboard-height",
13395
13395
  `${Nn ? Math.round(qn) : 0}px`
13396
- ), document.documentElement.classList.toggle("lfg-keyboard-open", Nn), ne(Nn);
13396
+ ), document.documentElement.classList.toggle("lfg-keyboard-open", Nn), re(Nn);
13397
13397
  };
13398
13398
  et(), g.addEventListener("resize", et, { passive: !0 }), g.addEventListener("scroll", et, { passive: !0 });
13399
13399
  const ut = () => {
@@ -14138,7 +14138,7 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14138
14138
  localStorage.removeItem(Wa);
14139
14139
  } catch {
14140
14140
  }
14141
- Q(!1), re.current = !1;
14141
+ Q(!1), se.current = !1;
14142
14142
  } catch (g) {
14143
14143
  ke.error(g instanceof Error ? g.message : "Couldn't restart the tour");
14144
14144
  }
@@ -14366,8 +14366,8 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14366
14366
  // window is covered by connectGateStarted below, which only latches after
14367
14367
  // a real "yes".
14368
14368
  dismissed: E || hc || !!y.current
14369
- }) && (re.current = !0);
14370
- const Xi = w && !M && _ && !E && !hc && !y.current && re.current;
14369
+ }) && (se.current = !0);
14370
+ const Xi = w && !M && _ && !E && !hc && !y.current && se.current;
14371
14371
  if (F(() => {
14372
14372
  if (!Xi) return;
14373
14373
  Lo();
@@ -14511,15 +14511,24 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14511
14511
  // reach Bots, and so no way to create one. A trimmed island (no
14512
14512
  // user filter, no Settings) keeps the host's chrome the only
14513
14513
  // identity surface while still giving Live a way out.
14514
- /* @__PURE__ */ n(is, { className: "shrink-0", children: /* @__PURE__ */ n("div", { className: "glass-island flex h-11 items-center gap-1.5 rounded-full px-2", children: /* @__PURE__ */ n(
14515
- ei,
14516
- {
14517
- tab: le,
14518
- onOpenTab: Qe,
14519
- extraTabs: xt,
14520
- showSettings: !1
14521
- }
14522
- ) }) })
14514
+ /* @__PURE__ */ n(is, { className: "shrink-0", children: /* @__PURE__ */ c("div", { className: "glass-island flex h-11 items-center gap-1.5 rounded-full px-2", children: [
14515
+ /* @__PURE__ */ n(
14516
+ ei,
14517
+ {
14518
+ tab: le,
14519
+ onOpenTab: Qe,
14520
+ extraTabs: xt,
14521
+ showSettings: !1
14522
+ }
14523
+ ),
14524
+ /* @__PURE__ */ n(
14525
+ "span",
14526
+ {
14527
+ "data-lfg-host-slot": "header-actions",
14528
+ className: "flex items-center gap-1.5"
14529
+ }
14530
+ )
14531
+ ] }) })
14523
14532
  ) : /* @__PURE__ */ n(is, { className: "shrink-0", children: /* @__PURE__ */ c("div", { className: "glass-island flex h-11 items-center gap-1.5 rounded-full px-2", children: [
14524
14533
  /* @__PURE__ */ n(
14525
14534
  Ga,
@@ -14546,19 +14555,28 @@ ${g.reasoning.map((qn) => `- ${qn}`).join(`
14546
14555
  /* Secondary pages sit below Live in the mobile hierarchy. The host
14547
14556
  keeps its own right-side island; LFG supplies the page-level back
14548
14557
  action in the space where the Live welcome normally sits. */
14549
- /* @__PURE__ */ n("header", { className: "z-40 flex shrink-0 items-center pb-3 pl-3 pr-[calc(0.75rem+var(--lfg-host-top-inset))] pt-[calc(0.5rem+env(safe-area-inset-top))]", children: /* @__PURE__ */ n(is, { className: "shrink-0", children: /* @__PURE__ */ c(
14550
- "button",
14551
- {
14552
- type: "button",
14553
- onClick: () => Qe("live"),
14554
- "aria-label": "Back to Live",
14555
- className: "glass-island flex h-11 items-center gap-1 rounded-full pl-2 pr-3 text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground active:scale-[0.96]",
14556
- children: [
14557
- /* @__PURE__ */ n(Ar, { className: "size-[18px]" }),
14558
- /* @__PURE__ */ n("span", { children: "Live" })
14559
- ]
14560
- }
14561
- ) }) })
14558
+ /* @__PURE__ */ n("header", { className: "z-40 flex shrink-0 items-center pb-3 pl-3 pr-[calc(0.75rem+var(--lfg-host-top-inset))] pt-[calc(0.5rem+env(safe-area-inset-top))]", children: /* @__PURE__ */ c(is, { className: "shrink-0 flex items-center gap-1.5", children: [
14559
+ /* @__PURE__ */ c(
14560
+ "button",
14561
+ {
14562
+ type: "button",
14563
+ onClick: () => Qe("live"),
14564
+ "aria-label": "Back to Live",
14565
+ className: "glass-island flex h-11 items-center gap-1 rounded-full pl-2 pr-3 text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground active:scale-[0.96]",
14566
+ children: [
14567
+ /* @__PURE__ */ n(Ar, { className: "size-[18px]" }),
14568
+ /* @__PURE__ */ n("span", { children: "Live" })
14569
+ ]
14570
+ }
14571
+ ),
14572
+ /* @__PURE__ */ n(
14573
+ "span",
14574
+ {
14575
+ "data-lfg-host-slot": "header-actions",
14576
+ className: "glass-island flex h-11 items-center gap-1.5 rounded-full px-2"
14577
+ }
14578
+ )
14579
+ ] }) })
14562
14580
  ) : Ji ? null : (
14563
14581
  /* Embedded used to be suppressed here too, which left Shipped and
14564
14582
  Artifacts with no chrome at all — no way back to Live except browser
@@ -15120,7 +15138,7 @@ function EN({
15120
15138
  x(!1), w("idle");
15121
15139
  return;
15122
15140
  }
15123
- const W = b ? 2800 : 8e3, se = window.setTimeout(() => {
15141
+ const W = b ? 2800 : 8e3, ne = window.setTimeout(() => {
15124
15142
  w("exit");
15125
15143
  const V = Number.parseFloat(
15126
15144
  window.getComputedStyle(document.documentElement).getPropertyValue("--text-swap-dur")
@@ -15130,15 +15148,15 @@ function EN({
15130
15148
  }, V);
15131
15149
  }, W);
15132
15150
  return () => {
15133
- window.clearTimeout(se), _.current !== null && (window.clearTimeout(_.current), _.current = null);
15151
+ window.clearTimeout(ne), _.current !== null && (window.clearTimeout(_.current), _.current = null);
15134
15152
  };
15135
15153
  }, [p, e, f, b]), qt(() => {
15136
15154
  if (y !== "enter") return;
15137
15155
  const W = M.current;
15138
15156
  if (!W) return;
15139
15157
  W.offsetHeight;
15140
- const se = window.requestAnimationFrame(() => w("idle"));
15141
- return () => window.cancelAnimationFrame(se);
15158
+ const ne = window.requestAnimationFrame(() => w("idle"));
15159
+ return () => window.cancelAnimationFrame(ne);
15142
15160
  }, [y, b]), /* @__PURE__ */ n(
15143
15161
  is,
15144
15162
  {
@@ -15642,25 +15660,25 @@ function PN({
15642
15660
  var Re, tt;
15643
15661
  const d = e == null ? void 0 : e.steps, [u, m] = v(
15644
15662
  () => d != null && d.profile ? d != null && d.agents ? d != null && d.repo ? "session" : "repo" : "agents" : "profile"
15645
- ), [f, h] = v(!1), [p, b] = v(null), [x, y] = v(() => /* @__PURE__ */ new Set()), [w, M] = v({ lines: [], running: !1, error: null }), _ = j(null), S = (e == null ? void 0 : e.profiles.find((O) => O.email === o)) ?? (e == null ? void 0 : e.profiles[0]), [k, D] = v((S == null ? void 0 : S.name) ?? ""), [B, W] = v((S == null ? void 0 : S.email) ?? ""), [se, V] = v(null), z = je(() => se ? URL.createObjectURL(se) : null, [se]);
15663
+ ), [f, h] = v(!1), [p, b] = v(null), [x, y] = v(() => /* @__PURE__ */ new Set()), [w, M] = v({ lines: [], running: !1, error: null }), _ = j(null), S = (e == null ? void 0 : e.profiles.find((O) => O.email === o)) ?? (e == null ? void 0 : e.profiles[0]), [k, D] = v((S == null ? void 0 : S.name) ?? ""), [B, W] = v((S == null ? void 0 : S.email) ?? ""), [ne, V] = v(null), z = je(() => ne ? URL.createObjectURL(ne) : null, [ne]);
15646
15664
  F(() => () => {
15647
15665
  z && URL.revokeObjectURL(z);
15648
15666
  }, [z]);
15649
- const [ne, ie] = v(s);
15667
+ const [re, ie] = v(s);
15650
15668
  F(() => {
15651
15669
  s.length && ie((O) => O.length ? O : s);
15652
15670
  }, [s]);
15653
- const [me, K] = v(""), [q, ae] = v(!1), [U, R] = v(() => localStorage.getItem("lfg_v2_repo") || ""), [I, C] = v(""), T = U || ((Re = ne[0]) == null ? void 0 : Re.cwd) || "", E = r.filter((O) => O.visible && O.status.configured), Q = r.filter(
15671
+ const [me, K] = v(""), [q, ae] = v(!1), [U, R] = v(() => localStorage.getItem("lfg_v2_repo") || ""), [I, C] = v(""), T = U || ((Re = re[0]) == null ? void 0 : Re.cwd) || "", E = r.filter((O) => O.visible && O.status.configured), Q = r.filter(
15654
15672
  (O) => !O.status.configured && O.status.canAutoSetup
15655
- ), re = r.some((O) => O.status.setupRunning), ye = Q.length > 0 && Q.every((O) => x.has(O.key)), ge = Q.filter(
15673
+ ), se = r.some((O) => O.status.setupRunning), ye = Q.length > 0 && Q.every((O) => x.has(O.key)), ge = Q.filter(
15656
15674
  (O) => x.has(O.key)
15657
15675
  ).length;
15658
15676
  F(() => {
15659
- if (u !== "agents" || !re) return;
15677
+ if (u !== "agents" || !se) return;
15660
15678
  const O = window.setInterval(a, 1e3);
15661
15679
  return () => window.clearInterval(O);
15662
- }, [re, a, u]), F(() => {
15663
- if (u !== "agents" || !re && !w.running) return;
15680
+ }, [se, a, u]), F(() => {
15681
+ if (u !== "agents" || !se && !w.running) return;
15664
15682
  let O = !1;
15665
15683
  const ce = async () => {
15666
15684
  try {
@@ -15680,7 +15698,7 @@ function PN({
15680
15698
  return () => {
15681
15699
  O = !0, window.clearInterval($);
15682
15700
  };
15683
- }, [u, re, w.running]), F(() => {
15701
+ }, [u, se, w.running]), F(() => {
15684
15702
  const O = _.current;
15685
15703
  O && (O.scrollTop = O.scrollHeight);
15686
15704
  }, [w.lines]);
@@ -15701,9 +15719,9 @@ function PN({
15701
15719
  body: JSON.stringify({ email: B.trim(), name: k.trim() })
15702
15720
  }
15703
15721
  );
15704
- se && (O = await Ne(
15722
+ ne && (O = await Ne(
15705
15723
  `/api/onboarding/avatar?email=${encodeURIComponent(B.trim().toLowerCase())}`,
15706
- { method: "POST", headers: { "Content-Type": se.type }, body: se }
15724
+ { method: "POST", headers: { "Content-Type": ne.type }, body: ne }
15707
15725
  ).catch(() => O)), i(B.trim().toLowerCase(), O.users ?? []), m("agents"), a();
15708
15726
  } catch (O) {
15709
15727
  b(O instanceof Error ? O.message : "Couldn't save profile");
@@ -15843,7 +15861,7 @@ function PN({
15843
15861
  className: "size-14 shrink-0 rounded-full border border-border object-cover"
15844
15862
  }
15845
15863
  ) : /* @__PURE__ */ n("span", { className: "flex size-14 shrink-0 items-center justify-center rounded-full border border-dashed border-border bg-muted/40", children: /* @__PURE__ */ n(cn, { className: "size-5 text-muted-foreground" }) }),
15846
- /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: se ? se.name : "Add a photo (optional)" })
15864
+ /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: ne ? ne.name : "Add a photo (optional)" })
15847
15865
  ] }),
15848
15866
  /* @__PURE__ */ n(
15849
15867
  "input",
@@ -15894,7 +15912,7 @@ function PN({
15894
15912
  {
15895
15913
  type: "checkbox",
15896
15914
  checked: ye,
15897
- disabled: f || re,
15915
+ disabled: f || se,
15898
15916
  onChange: We,
15899
15917
  className: "size-4 rounded border-border accent-foreground"
15900
15918
  }
@@ -15908,7 +15926,7 @@ function PN({
15908
15926
  {
15909
15927
  className: P(
15910
15928
  "flex items-center gap-3 rounded-xl border border-border bg-muted/40 px-3 py-2.5",
15911
- !O.status.configured && O.status.canAutoSetup && !re ? "cursor-pointer" : "cursor-default"
15929
+ !O.status.configured && O.status.canAutoSetup && !se ? "cursor-pointer" : "cursor-default"
15912
15930
  ),
15913
15931
  children: [
15914
15932
  !O.status.configured && O.status.canAutoSetup ? /* @__PURE__ */ n(
@@ -15916,7 +15934,7 @@ function PN({
15916
15934
  {
15917
15935
  type: "checkbox",
15918
15936
  checked: x.has(O.key),
15919
- disabled: f || re,
15937
+ disabled: f || se,
15920
15938
  onChange: () => Je(O.key),
15921
15939
  className: "size-4 shrink-0 rounded border-border accent-foreground"
15922
15940
  }
@@ -15952,12 +15970,12 @@ function PN({
15952
15970
  "button",
15953
15971
  {
15954
15972
  type: "button",
15955
- disabled: f || re || ge === 0,
15973
+ disabled: f || se || ge === 0,
15956
15974
  onClick: () => void ze(),
15957
15975
  className: "mt-4 flex w-full items-center justify-center gap-2 rounded-xl bg-foreground px-3 py-2.5 text-sm font-medium text-background transition-opacity disabled:opacity-50",
15958
15976
  children: [
15959
- f || re ? /* @__PURE__ */ n(mt, { className: "size-4 animate-spin" }) : null,
15960
- re ? "Installing selected agents…" : ge > 0 ? `Install ${ge} selected ${ge === 1 ? "agent" : "agents"}` : "Select agents to install"
15977
+ f || se ? /* @__PURE__ */ n(mt, { className: "size-4 animate-spin" }) : null,
15978
+ se ? "Installing selected agents…" : ge > 0 ? `Install ${ge} selected ${ge === 1 ? "agent" : "agents"}` : "Select agents to install"
15961
15979
  ]
15962
15980
  }
15963
15981
  ),
@@ -15986,7 +16004,7 @@ function PN({
15986
16004
  /* @__PURE__ */ n("h1", { className: "text-xl font-semibold", children: "Set up a repository" }),
15987
16005
  /* @__PURE__ */ n("p", { className: "mb-5 mt-1 text-sm text-muted-foreground", children: "Agents work inside git repos. Clone one to get started, or continue with what's already on this machine." }),
15988
16006
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
15989
- ne.length > 0 && /* @__PURE__ */ n("div", { className: "flex max-h-40 flex-col gap-2 overflow-y-auto", children: ne.map((O) => /* @__PURE__ */ c(
16007
+ re.length > 0 && /* @__PURE__ */ n("div", { className: "flex max-h-40 flex-col gap-2 overflow-y-auto", children: re.map((O) => /* @__PURE__ */ c(
15990
16008
  "div",
15991
16009
  {
15992
16010
  className: "flex items-center gap-3 rounded-xl border border-border bg-muted/40 px-3 py-2.5",
@@ -16043,10 +16061,10 @@ function PN({
16043
16061
  "button",
16044
16062
  {
16045
16063
  type: "button",
16046
- disabled: !ne.length,
16064
+ disabled: !re.length,
16047
16065
  onClick: _e,
16048
16066
  className: "mt-2 rounded-xl bg-foreground px-3 py-2.5 text-sm font-medium text-background disabled:opacity-40",
16049
- children: ne.length ? "Continue" : "Choose a project to continue"
16067
+ children: re.length ? "Continue" : "Choose a project to continue"
16050
16068
  }
16051
16069
  ),
16052
16070
  /* @__PURE__ */ n(
@@ -16083,13 +16101,13 @@ function PN({
16083
16101
  O.key
16084
16102
  )) }),
16085
16103
  we.length ? null : /* @__PURE__ */ n("p", { className: "rounded-xl border border-border bg-muted/40 px-3 py-2.5 text-sm text-muted-foreground", children: "Set up and sign in to a coding agent before starting a session." }),
16086
- ne.length > 0 && /* @__PURE__ */ n(
16104
+ re.length > 0 && /* @__PURE__ */ n(
16087
16105
  "select",
16088
16106
  {
16089
16107
  value: T,
16090
16108
  onChange: (O) => R(O.target.value),
16091
16109
  className: "rounded-xl border border-border bg-muted/40 px-3 py-2.5 text-sm outline-none",
16092
- children: ne.map((O) => /* @__PURE__ */ n("option", { value: O.cwd, children: O.name }, O.cwd))
16110
+ children: re.map((O) => /* @__PURE__ */ n("option", { value: O.cwd, children: O.name }, O.cwd))
16093
16111
  }
16094
16112
  ),
16095
16113
  /* @__PURE__ */ n(
@@ -16426,10 +16444,10 @@ function UN({
16426
16444
  onUserChange: D,
16427
16445
  onOpenSettings: B,
16428
16446
  onOpenAsk: W,
16429
- onOpenBots: se,
16447
+ onOpenBots: ne,
16430
16448
  onOpenSessions: V,
16431
16449
  railSurface: z = "sessions",
16432
- bots: ne = [],
16450
+ bots: re = [],
16433
16451
  selectedBotId: ie = null,
16434
16452
  onOpenBot: me,
16435
16453
  onNewBot: K,
@@ -16442,7 +16460,7 @@ function UN({
16442
16460
  onClearIdle: T,
16443
16461
  repos: E = [],
16444
16462
  onReposChanged: Q,
16445
- hosted: re = !1,
16463
+ hosted: se = !1,
16446
16464
  focus: ye
16447
16465
  }) {
16448
16466
  const ge = Cm(), J = jN(
@@ -16603,10 +16621,10 @@ function UN({
16603
16621
  onUserChange: D,
16604
16622
  onOpenSettings: B,
16605
16623
  onOpenAsk: W,
16606
- onOpenBots: se,
16624
+ onOpenBots: ne,
16607
16625
  onOpenSessions: V,
16608
16626
  railSurface: z,
16609
- bots: ne,
16627
+ bots: re,
16610
16628
  selectedBotId: ie,
16611
16629
  onOpenBot: me,
16612
16630
  onNewBot: K,
@@ -16618,7 +16636,7 @@ function UN({
16618
16636
  onClearIdle: T,
16619
16637
  repos: E,
16620
16638
  onReposChanged: Q,
16621
- hosted: re,
16639
+ hosted: se,
16622
16640
  focus: ye,
16623
16641
  topPinned: Se,
16624
16642
  onToggleTopPin: xe,
@@ -16776,10 +16794,10 @@ function BN({
16776
16794
  onOpenBots: B,
16777
16795
  onOpenSessions: W = () => {
16778
16796
  },
16779
- railSurface: se = "sessions",
16797
+ railSurface: ne = "sessions",
16780
16798
  bots: V = [],
16781
16799
  selectedBotId: z = null,
16782
- onOpenBot: ne,
16800
+ onOpenBot: re,
16783
16801
  onNewBot: ie,
16784
16802
  onEditBot: me,
16785
16803
  onRefreshBots: K,
@@ -16792,7 +16810,7 @@ function BN({
16792
16810
  hosted: T = !1,
16793
16811
  focus: E,
16794
16812
  topPinned: Q,
16795
- onToggleTopPin: re,
16813
+ onToggleTopPin: se,
16796
16814
  recentShipped: ye
16797
16815
  }) {
16798
16816
  const ge = Tl(), J = 4, de = s || "__all", we = encodeURIComponent(de), Se = `lfg_stage_pinned:${we}`, Fe = `lfg_rail_collapsed:${we}`, Be = oe(() => {
@@ -16970,8 +16988,8 @@ function BN({
16970
16988
  [V, z]
16971
16989
  ), Nt = z ? Qe(z) : null;
16972
16990
  F(() => {
16973
- se !== "chat" || !Nt || (We((L) => L === Nt ? L : Nt), X(Nt));
16974
- }, [se, Nt]);
16991
+ ne !== "chat" || !Nt || (We((L) => L === Nt ? L : Nt), X(Nt));
16992
+ }, [ne, Nt]);
16975
16993
  const xt = je(
16976
16994
  () => _m(e, (L) => !!i[L.sessionId ?? ""]),
16977
16995
  [e, i]
@@ -17209,7 +17227,7 @@ function BN({
17209
17227
  onRefresh: d,
17210
17228
  onRemove: m,
17211
17229
  topPinned: vt.has(N),
17212
- onToggleTopPin: re,
17230
+ onToggleTopPin: se,
17213
17231
  stagePinned: it.includes(N),
17214
17232
  onToggleStagePin: () => bt(N),
17215
17233
  onOpen: () => Vt(N, !1),
@@ -17307,7 +17325,7 @@ function BN({
17307
17325
  entering: ho.has(G),
17308
17326
  focusGlow: (Ze == null ? void 0 : Ze.sid) === G ? Ze.n : 0,
17309
17327
  pinned: !L.shippedReview && vt.has(G),
17310
- onTogglePin: L.shippedReview ? void 0 : re
17328
+ onTogglePin: L.shippedReview ? void 0 : se
17311
17329
  }
17312
17330
  )
17313
17331
  }
@@ -17348,10 +17366,10 @@ function BN({
17348
17366
  ))
17349
17367
  }
17350
17368
  ) : null, jn = je(() => {
17351
- if (se !== "chat" || !Nt) return [];
17369
+ if (ne !== "chat" || !Nt) return [];
17352
17370
  const L = xt.nodeForSessionId(Nt), N = (L == null ? void 0 : L.session) ?? e.find((G) => G.sessionId === Nt) ?? null;
17353
17371
  return N ? [{ sid: Nt, session: N }] : [];
17354
- }, [se, Nt, xt, e]), Zt = se === "chat" ? jn : tr, Un = /* @__PURE__ */ c("div", { className: "flex flex-col gap-0.5", children: [
17372
+ }, [ne, Nt, xt, e]), Zt = ne === "chat" ? jn : tr, Un = /* @__PURE__ */ c("div", { className: "flex flex-col gap-0.5", children: [
17355
17373
  !ze && ie ? /* @__PURE__ */ c(
17356
17374
  "button",
17357
17375
  {
@@ -17373,7 +17391,7 @@ function BN({
17373
17391
  type: "button",
17374
17392
  title: ze ? L.name : void 0,
17375
17393
  onClick: () => {
17376
- ne == null || ne(L.id), N && Vt(N, !1);
17394
+ re == null || re(L.id), N && Vt(N, !1);
17377
17395
  },
17378
17396
  className: P(
17379
17397
  "flex w-full items-center rounded-lg text-left transition-colors",
@@ -17522,9 +17540,9 @@ function BN({
17522
17540
  }
17523
17541
  )
17524
17542
  ] }),
17525
- /* @__PURE__ */ n(Km, { active: se, onOpenSessions: W, onOpenBots: B })
17543
+ /* @__PURE__ */ n(Km, { active: ne, onOpenSessions: W, onOpenBots: B })
17526
17544
  ] }),
17527
- /* @__PURE__ */ n("div", { className: "session-list-scroll min-h-0 flex-1 overflow-y-auto px-1.5 py-2", children: se === "chat" ? Un : /* @__PURE__ */ c(Ve, { children: [
17545
+ /* @__PURE__ */ n("div", { className: "session-list-scroll min-h-0 flex-1 overflow-y-auto px-1.5 py-2", children: ne === "chat" ? Un : /* @__PURE__ */ c(Ve, { children: [
17528
17546
  zt.length ? /* @__PURE__ */ n(
17529
17547
  Tr,
17530
17548
  {
@@ -17595,11 +17613,11 @@ function BN({
17595
17613
  className: "h-full min-h-0 min-w-0",
17596
17614
  children: xr(
17597
17615
  N,
17598
- se !== "chat" && (tr.length > 1 || N.shippedReview) ? () => lt(L) : void 0
17616
+ ne !== "chat" && (tr.length > 1 || N.shippedReview) ? () => lt(L) : void 0
17599
17617
  )
17600
17618
  },
17601
17619
  L
17602
- )) : se === "chat" ? /* @__PURE__ */ n(
17620
+ )) : ne === "chat" ? /* @__PURE__ */ n(
17603
17621
  G2,
17604
17622
  {
17605
17623
  bot: yt,
@@ -17759,8 +17777,8 @@ const qN = Ms(function({
17759
17777
  }, _ = (k) => {
17760
17778
  const D = b.current;
17761
17779
  if (!D.dragging) return;
17762
- const B = k.touches[0], W = B.clientX - D.startX, se = B.clientY - D.startY;
17763
- if (!D.decided && (Math.abs(W) > 8 || Math.abs(se) > 8) && (D.decided = !0, D.horizontal = Math.abs(W) > Math.abs(se), D.horizontal && y(!0)), !D.horizontal) return;
17780
+ const B = k.touches[0], W = B.clientX - D.startX, ne = B.clientY - D.startY;
17781
+ if (!D.decided && (Math.abs(W) > 8 || Math.abs(ne) > 8) && (D.decided = !0, D.horizontal = Math.abs(W) > Math.abs(ne), D.horizontal && y(!0)), !D.horizontal) return;
17764
17782
  let V = a ? Math.min(0, W) : Math.max(0, W);
17765
17783
  V = Math.max(-96, Math.min(96, V)), D.x = V, p.current && (p.current.style.transform = `translateX(${V}px)`);
17766
17784
  }, S = () => {
@@ -18283,8 +18301,8 @@ function Oo({
18283
18301
  }) {
18284
18302
  const u = j(null), m = j(null), f = j(a), h = j(!1), [p, b] = v(null), x = oe((S = m.current) => {
18285
18303
  if (S && (S.style.height = "0px", S.style.height = `${S.scrollHeight}px`, l)) {
18286
- const k = window.getComputedStyle(S), D = Number.parseFloat(k.lineHeight), B = Number.parseFloat(k.paddingTop) + Number.parseFloat(k.paddingBottom), W = S.scrollHeight - B, se = Number.isFinite(D) && W > D * 1.5;
18287
- h.current !== se && (h.current = se, l(se));
18304
+ const k = window.getComputedStyle(S), D = Number.parseFloat(k.lineHeight), B = Number.parseFloat(k.paddingTop) + Number.parseFloat(k.paddingBottom), W = S.scrollHeight - B, ne = Number.isFinite(D) && W > D * 1.5;
18305
+ h.current !== ne && (h.current = ne, l(ne));
18288
18306
  }
18289
18307
  }, [l]), y = oe(
18290
18308
  (S) => {
@@ -18419,17 +18437,17 @@ function XN({
18419
18437
  var xe;
18420
18438
  return ((xe = Ea(f)) == null ? void 0 : xe.text) ?? "";
18421
18439
  }
18422
- ), [b, x] = v(!1), [y, w] = v(!1), [M, _] = v(null), [S, k] = v(!1), D = j(null), [B, W] = v(0), [se, V] = v(!1), z = ql({
18440
+ ), [b, x] = v(!1), [y, w] = v(!1), [M, _] = v(null), [S, k] = v(!1), D = j(null), [B, W] = v(0), [ne, V] = v(!1), z = ql({
18423
18441
  endpoint: (xe) => u ? m ? `/api/uploads?filename=${encodeURIComponent(xe.name)}` : `/api/sessions/${u}/upload?filename=${encodeURIComponent(xe.name)}` : null,
18424
18442
  disabled: b
18425
18443
  }), {
18426
- attachments: ne,
18444
+ attachments: re,
18427
18445
  setAttachments: ie,
18428
18446
  draggingFiles: me,
18429
18447
  removeAttachment: K,
18430
18448
  resolveUpload: q,
18431
18449
  forgetAllUploads: ae
18432
- } = z, [U] = v(() => new cy()), R = Fx(), { messages: I, setMessages: C, sendMessage: T, status: E } = R, Q = je(() => my(I), [I]), [re, ye] = v(!1), ge = r || re || E === "submitted" || E === "streaming", J = oe(
18450
+ } = z, [U] = v(() => new cy()), R = Fx(), { messages: I, setMessages: C, sendMessage: T, status: E } = R, Q = je(() => my(I), [I]), [se, ye] = v(!1), ge = r || se || E === "submitted" || E === "streaming", J = oe(
18433
18451
  (xe) => {
18434
18452
  p(xe), u && pf({
18435
18453
  contextKey: f,
@@ -18513,7 +18531,7 @@ function XN({
18513
18531
  async function Se(xe, ve, _e = "steer") {
18514
18532
  var ee;
18515
18533
  xe == null || xe.preventDefault();
18516
- const Je = (ve ?? h).trim(), We = ne;
18534
+ const Je = (ve ?? h).trim(), We = re;
18517
18535
  if (!u || !Je && !We.length) return;
18518
18536
  const ze = _e === "queue" && ge;
18519
18537
  (ee = D.current) == null || ee.blur();
@@ -18639,7 +18657,7 @@ function XN({
18639
18657
  Fl,
18640
18658
  {
18641
18659
  className: "mb-2",
18642
- items: ne.map((xe) => ({ att: xe })),
18660
+ items: re.map((xe) => ({ att: xe })),
18643
18661
  disabled: b,
18644
18662
  onAnnotate: z.setAnnotatingId,
18645
18663
  onRemove: K,
@@ -18651,7 +18669,7 @@ function XN({
18651
18669
  {
18652
18670
  className: P(
18653
18671
  "flex gap-2",
18654
- se ? "items-end" : "items-center"
18672
+ ne ? "items-end" : "items-center"
18655
18673
  ),
18656
18674
  children: [
18657
18675
  /* @__PURE__ */ n(
@@ -18691,7 +18709,7 @@ function XN({
18691
18709
  (ve = xe.currentTarget.form) == null || ve.requestSubmit();
18692
18710
  }
18693
18711
  },
18694
- placeholder: ne.length ? "Add a note" : t ? `Message ${t.name}…` : m ? "Message to resume" : "Message",
18712
+ placeholder: re.length ? "Add a note" : t ? `Message ${t.name}…` : m ? "Message to resume" : "Message",
18695
18713
  disabled: b,
18696
18714
  rows: 1,
18697
18715
  className: P(
@@ -18736,7 +18754,7 @@ function XN({
18736
18754
  {
18737
18755
  className: "size-11 md:size-9",
18738
18756
  sending: b,
18739
- canSend: !!(h.trim() || ne.length),
18757
+ canSend: !!(h.trim() || re.length),
18740
18758
  baseText: h,
18741
18759
  onSend: () => void Se(),
18742
18760
  onQueue: () => void Se(void 0, void 0, "queue"),
@@ -19016,8 +19034,8 @@ function zm({
19016
19034
  {
19017
19035
  value: D.value,
19018
19036
  onValueChange: (W) => {
19019
- W !== "full" && W !== "user-lfg-output" || D.onChange(W).catch((se) => {
19020
- ke.error(se instanceof Error ? se.message : "Couldn’t change message view");
19037
+ W !== "full" && W !== "user-lfg-output" || D.onChange(W).catch((ne) => {
19038
+ ke.error(ne instanceof Error ? ne.message : "Couldn’t change message view");
19021
19039
  });
19022
19040
  },
19023
19041
  children: [
@@ -19325,13 +19343,13 @@ function t2({
19325
19343
  onClose: b
19326
19344
  }) {
19327
19345
  var I;
19328
- const [x, y] = v(null), [w, M] = v(!1), _ = j(null), S = j(null), k = j(null), D = j(!1), B = j(null), W = !!o[e], se = i[e] ?? null, V = s.indexOf(e), z = V > 0 ? s[V - 1] : null, ne = V >= 0 && V < s.length - 1 ? s[V + 1] : null, ie = oe(
19346
+ const [x, y] = v(null), [w, M] = v(!1), _ = j(null), S = j(null), k = j(null), D = j(!1), B = j(null), W = !!o[e], ne = i[e] ?? null, V = s.indexOf(e), z = V > 0 ? s[V - 1] : null, re = V >= 0 && V < s.length - 1 ? s[V + 1] : null, ie = oe(
19329
19347
  (C) => {
19330
19348
  if (!C || D.current) return;
19331
19349
  const E = s.indexOf(C) > V ? 1 : -1;
19332
19350
  B.current = E, ft("selection");
19333
19351
  const Q = k.current;
19334
- Q && (Q.getAnimations().forEach((re) => re.cancel()), Q.style.transition = "", Q.style.transform = "", Q.style.opacity = ""), l(C);
19352
+ Q && (Q.getAnimations().forEach((se) => se.cancel()), Q.style.transition = "", Q.style.transform = "", Q.style.opacity = ""), l(C);
19335
19353
  },
19336
19354
  [V, l, s]
19337
19355
  );
@@ -19359,7 +19377,7 @@ function t2({
19359
19377
  );
19360
19378
  const q = j(!0);
19361
19379
  F(() => {
19362
- var re;
19380
+ var se;
19363
19381
  if (q.current) {
19364
19382
  q.current = !1;
19365
19383
  return;
@@ -19368,7 +19386,7 @@ function t2({
19368
19386
  if (!C) return;
19369
19387
  const T = B.current;
19370
19388
  B.current = null;
19371
- const E = ((re = window.matchMedia) == null ? void 0 : re.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
19389
+ const E = ((se = window.matchMedia) == null ? void 0 : se.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
19372
19390
  if (!T || E) return;
19373
19391
  const Q = T === 1 ? 18 : -18;
19374
19392
  C.getAnimations().forEach((ye) => ye.cancel()), C.style.transition = "", C.style.transform = "", C.animate(
@@ -19383,7 +19401,7 @@ function t2({
19383
19401
  if (!C) return;
19384
19402
  const T = 60, E = { active: !1, decided: !1, horizontal: !1, x0: 0, y0: 0, dx: 0 }, Q = (de) => {
19385
19403
  C.style.transition = "none", C.style.transform = de ? `translateX(${de}px)` : "";
19386
- }, re = (de) => {
19404
+ }, se = (de) => {
19387
19405
  C.style.transition = "transform 180ms cubic-bezier(0.22,1,0.36,1)", C.style.transform = "";
19388
19406
  }, ye = (de) => {
19389
19407
  if (D.current || de.touches.length !== 1) return;
@@ -19406,19 +19424,19 @@ function t2({
19406
19424
  }
19407
19425
  if (!E.horizontal) return;
19408
19426
  de.preventDefault(), E.dx = Se;
19409
- const Be = Se > 0 ? !z : !ne;
19427
+ const Be = Se > 0 ? !z : !re;
19410
19428
  Q(Se * (Be ? 0.18 : 0.5));
19411
19429
  }, J = () => {
19412
19430
  if (!E.active) return;
19413
19431
  const { horizontal: de, dx: we } = E;
19414
19432
  if (E.active = !1, !de) return;
19415
- const Se = we > T ? z : we < -T ? ne : null;
19416
- Se ? ie(Se) : re();
19433
+ const Se = we > T ? z : we < -T ? re : null;
19434
+ Se ? ie(Se) : se();
19417
19435
  };
19418
19436
  return C.addEventListener("touchstart", ye, { passive: !0 }), C.addEventListener("touchmove", ge, { passive: !1 }), C.addEventListener("touchend", J, { passive: !0 }), C.addEventListener("touchcancel", J, { passive: !0 }), () => {
19419
19437
  C.removeEventListener("touchstart", ye), C.removeEventListener("touchmove", ge), C.removeEventListener("touchend", J), C.removeEventListener("touchcancel", J);
19420
19438
  };
19421
- }, [ie, z, ne]);
19439
+ }, [ie, z, re]);
19422
19440
  const ae = oe(() => {
19423
19441
  const C = window.innerWidth || 1, T = window.innerHeight || 1, E = Math.max(a.width / C, 1e-4), Q = Math.max(a.height / T, 1e-4);
19424
19442
  return `translate(${a.left}px, ${a.top}px) scale(${E}, ${Q})`;
@@ -19450,9 +19468,9 @@ function t2({
19450
19468
  if (D.current) return;
19451
19469
  D.current = !0, ft("selection");
19452
19470
  const C = _.current, T = S.current, E = k.current, Q = ae();
19453
- let re = !1;
19471
+ let se = !1;
19454
19472
  const ye = () => {
19455
- re || (re = !0, b());
19473
+ se || (se = !0, b());
19456
19474
  };
19457
19475
  if (C) {
19458
19476
  const ge = C.animate(
@@ -19493,7 +19511,7 @@ function t2({
19493
19511
  Be.propertyName === "transform" && (C.removeEventListener("transitionend", Fe), Se());
19494
19512
  };
19495
19513
  C.addEventListener("transitionend", Fe), window.setTimeout(Se, 340), J && (J.style.transition = "opacity 240ms ease-out", J.style.opacity = "0"), de && (de.style.transition = "transform 260ms cubic-bezier(0.32,0.72,0,1), opacity 180ms ease-out", de.style.transform = "translate3d(0, -18px, 0)", de.style.opacity = "0");
19496
- }, re = (J) => {
19514
+ }, se = (J) => {
19497
19515
  if (D.current || J.touches.length !== 1) return;
19498
19516
  const de = J.target;
19499
19517
  if (!(de != null && de.closest("form"))) return;
@@ -19531,8 +19549,8 @@ function t2({
19531
19549
  C.style.transition = "", C.style.transform = "", C.style.opacity = "";
19532
19550
  }, 200);
19533
19551
  };
19534
- return C.addEventListener("touchstart", re, { passive: !0 }), C.addEventListener("touchmove", ye, { passive: !1 }), C.addEventListener("touchend", ge, { passive: !0 }), C.addEventListener("touchcancel", ge, { passive: !0 }), () => {
19535
- C.removeEventListener("touchstart", re), C.removeEventListener("touchmove", ye), C.removeEventListener("touchend", ge), C.removeEventListener("touchcancel", ge);
19552
+ return C.addEventListener("touchstart", se, { passive: !0 }), C.addEventListener("touchmove", ye, { passive: !1 }), C.addEventListener("touchend", ge, { passive: !0 }), C.addEventListener("touchcancel", ge, { passive: !0 }), () => {
19553
+ C.removeEventListener("touchstart", se), C.removeEventListener("touchmove", ye), C.removeEventListener("touchend", ge), C.removeEventListener("touchcancel", ge);
19536
19554
  };
19537
19555
  }, [b]), F(() => {
19538
19556
  const C = (E) => {
@@ -19541,14 +19559,14 @@ function t2({
19541
19559
  U();
19542
19560
  return;
19543
19561
  }
19544
- Dr(E.target) || Dr() || w || (E.key === "ArrowLeft" || E.key === "ArrowUp" ? (E.preventDefault(), ie(z)) : (E.key === "ArrowRight" || E.key === "ArrowDown") && (E.preventDefault(), ie(ne)));
19562
+ Dr(E.target) || Dr() || w || (E.key === "ArrowLeft" || E.key === "ArrowUp" ? (E.preventDefault(), ie(z)) : (E.key === "ArrowRight" || E.key === "ArrowDown") && (E.preventDefault(), ie(re)));
19545
19563
  };
19546
19564
  document.addEventListener("keydown", C);
19547
19565
  const T = document.body.style.overflow;
19548
19566
  return document.body.style.overflow = "hidden", () => {
19549
19567
  document.removeEventListener("keydown", C), document.body.style.overflow = T;
19550
19568
  };
19551
- }, [U, ie, z, ne, w]);
19569
+ }, [U, ie, z, re, w]);
19552
19570
  const R = Xn(t);
19553
19571
  return ur(
19554
19572
  /* @__PURE__ */ c(
@@ -19649,7 +19667,7 @@ function t2({
19649
19667
  {
19650
19668
  session: t,
19651
19669
  busy: W,
19652
- prompt: se,
19670
+ prompt: ne,
19653
19671
  error: x,
19654
19672
  onError: y,
19655
19673
  onSubscribeTranscript: d,
@@ -19683,24 +19701,24 @@ function Pm({
19683
19701
  [l, a]
19684
19702
  ), u = (z) => i.defaults[z] ?? Ur[z], m = n2(e.agent, d), [f, h] = v(() => m), [p, b] = v(""), [x, y] = v(
19685
19703
  () => localStorage.getItem(`lfg_fork_model_${m}`) || u(m)
19686
- ), [w, M] = v(() => Qn()), [_, S] = v(""), k = e.sessionId, D = i.models[f] ?? Jn[f], B = Oi(f), W = f === "aisdk" && p ? `aisdk:${p}` : f, se = ql({
19704
+ ), [w, M] = v(() => Qn()), [_, S] = v(""), k = e.sessionId, D = i.models[f] ?? Jn[f], B = Oi(f), W = f === "aisdk" && p ? `aisdk:${p}` : f, ne = ql({
19687
19705
  endpoint: (z) => `/api/uploads?filename=${encodeURIComponent(z.name)}`
19688
19706
  });
19689
19707
  F(() => {
19690
19708
  D.includes(x) || y(D[0]);
19691
19709
  }, [D, x]), F(() => {
19692
- var ne;
19710
+ var re;
19693
19711
  if (d.some((ie) => ie.key === f)) return;
19694
- const z = (ne = d[0]) == null ? void 0 : ne.key;
19712
+ const z = (re = d[0]) == null ? void 0 : re.key;
19695
19713
  z && (h(z), y(localStorage.getItem(`lfg_fork_model_${z}`) || u(z)));
19696
19714
  }, [f, d]), F(() => {
19697
- if (f !== "aisdk" || d.some((ne) => (ne.selectorId ?? ne.key) === W)) return;
19698
- const z = d.find((ne) => ne.key === "aisdk");
19715
+ if (f !== "aisdk" || d.some((re) => (re.selectorId ?? re.key) === W)) return;
19716
+ const z = d.find((re) => re.key === "aisdk");
19699
19717
  b((z == null ? void 0 : z.accountId) ?? "");
19700
19718
  }, [f, d, W]), F(() => {
19701
19719
  B.length && !B.includes(w) && M(B.includes("high") ? "high" : B[0]);
19702
19720
  }, [w, B]);
19703
- function V(z, ne) {
19721
+ function V(z, re) {
19704
19722
  if (z == null || z.preventDefault(), !k) return;
19705
19723
  if (!d.some((K) => K.key === f)) {
19706
19724
  ke.error(
@@ -19709,10 +19727,10 @@ function Pm({
19709
19727
  return;
19710
19728
  }
19711
19729
  localStorage.setItem("lfg_fork_agent", f), localStorage.setItem(`lfg_fork_model_${f}`, x), un(f) && localStorage.setItem("lfg_thinking_level", w);
19712
- const ie = (ne ?? _).trim(), me = se.attachments;
19730
+ const ie = (re ?? _).trim(), me = ne.attachments;
19713
19731
  r(), ke.promise(
19714
19732
  (async () => {
19715
- const K = me.length ? await Promise.all(me.map(se.resolveUpload)) : [], q = yi(ie, K);
19733
+ const K = me.length ? await Promise.all(me.map(ne.resolveUpload)) : [], q = yi(ie, K);
19716
19734
  return Ne(`/api/sessions/${k}/fork`, {
19717
19735
  method: "POST",
19718
19736
  headers: { "Content-Type": "application/json" },
@@ -19753,10 +19771,10 @@ function Pm({
19753
19771
  "form",
19754
19772
  {
19755
19773
  onSubmit: V,
19756
- ...se.dropZoneProps,
19774
+ ...ne.dropZoneProps,
19757
19775
  className: P(
19758
19776
  "min-w-0 px-4 pb-5 pt-3 transition-colors",
19759
- se.draggingFiles && "bg-primary/8"
19777
+ ne.draggingFiles && "bg-primary/8"
19760
19778
  ),
19761
19779
  children: [
19762
19780
  /* @__PURE__ */ c("div", { className: "mb-3 flex items-center gap-2", children: [
@@ -19766,19 +19784,19 @@ function Pm({
19766
19784
  /* @__PURE__ */ n("div", { className: "truncate text-xs text-muted-foreground", children: o ? `Archives this session after opening the replacement · ${Xn(e)}` : Xn(e) })
19767
19785
  ] })
19768
19786
  ] }),
19769
- se.fileInput,
19787
+ ne.fileInput,
19770
19788
  /* @__PURE__ */ c("div", { className: "lfg-gfield relative rounded-2xl px-2 py-1", children: [
19771
19789
  /* @__PURE__ */ n(
19772
19790
  Oo,
19773
19791
  {
19774
19792
  value: _,
19775
19793
  onValueChange: S,
19776
- onPaste: se.onPasteFiles,
19794
+ onPaste: ne.onPasteFiles,
19777
19795
  onKeyDown: (z) => {
19778
- var ne;
19779
- (z.metaKey || z.ctrlKey) && z.key === "Enter" && (z.preventDefault(), (ne = z.currentTarget.form) == null || ne.requestSubmit());
19796
+ var re;
19797
+ (z.metaKey || z.ctrlKey) && z.key === "Enter" && (z.preventDefault(), (re = z.currentTarget.form) == null || re.requestSubmit());
19780
19798
  },
19781
- placeholder: se.attachments.length ? "Add a note for the files…" : "Extra prompt for the new agent…",
19799
+ placeholder: ne.attachments.length ? "Add a note for the files…" : "Extra prompt for the new agent…",
19782
19800
  className: "min-h-32 max-h-[42dvh] resize-none overflow-y-auto border-0 bg-transparent px-1 py-1 pr-10 text-base leading-relaxed shadow-none focus-visible:border-0 focus-visible:ring-0"
19783
19801
  }
19784
19802
  ),
@@ -19789,17 +19807,17 @@ function Pm({
19789
19807
  className: "absolute bottom-1 right-1 size-9 shrink-0",
19790
19808
  silenceMs: 2500,
19791
19809
  baseText: _,
19792
- onText: (z, ne) => S(ne.trim() ? `${ne.trimEnd()} ${z}` : z),
19793
- onInterim: (z, ne) => S(ne.trim() ? `${ne.trimEnd()} ${z}` : z),
19794
- onAutoSubmit: (z, ne) => {
19795
- const ie = ne.trim() ? `${ne.trimEnd()} ${z}` : z;
19810
+ onText: (z, re) => S(re.trim() ? `${re.trimEnd()} ${z}` : z),
19811
+ onInterim: (z, re) => S(re.trim() ? `${re.trimEnd()} ${z}` : z),
19812
+ onAutoSubmit: (z, re) => {
19813
+ const ie = re.trim() ? `${re.trimEnd()} ${z}` : z;
19796
19814
  S(ie), V(void 0, ie);
19797
19815
  },
19798
19816
  onCancel: (z) => S(z)
19799
19817
  }
19800
19818
  )
19801
19819
  ] }),
19802
- se.attachments.length ? /* @__PURE__ */ n("div", { className: "mt-2", children: se.chips }) : null,
19820
+ ne.attachments.length ? /* @__PURE__ */ n("div", { className: "mt-2", children: ne.chips }) : null,
19803
19821
  /* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: [
19804
19822
  /* @__PURE__ */ n(
19805
19823
  Bl,
@@ -19807,8 +19825,8 @@ function Pm({
19807
19825
  options: d,
19808
19826
  value: f,
19809
19827
  selectedId: W,
19810
- onSelect: (z, ne) => {
19811
- h(z), z === "aisdk" && b((ne == null ? void 0 : ne.accountId) ?? ""), y(localStorage.getItem(`lfg_fork_model_${z}`) || u(z));
19828
+ onSelect: (z, re) => {
19829
+ h(z), z === "aisdk" && b((re == null ? void 0 : re.accountId) ?? ""), y(localStorage.getItem(`lfg_fork_model_${z}`) || u(z));
19812
19830
  }
19813
19831
  }
19814
19832
  ),
@@ -19830,9 +19848,9 @@ function Pm({
19830
19848
  {
19831
19849
  size: "icon-sm",
19832
19850
  type: "button",
19833
- variant: se.draggingFiles ? "brand-soft" : "outline",
19851
+ variant: ne.draggingFiles ? "brand-soft" : "outline",
19834
19852
  className: "size-8 rounded-full shadow-sm",
19835
- onClick: se.openFilePicker,
19853
+ onClick: ne.openFilePicker,
19836
19854
  "aria-label": "Attach files",
19837
19855
  title: "Attach files",
19838
19856
  children: /* @__PURE__ */ n(vo, { className: "size-4" })
@@ -19849,7 +19867,7 @@ function Pm({
19849
19867
  ]
19850
19868
  }
19851
19869
  ),
19852
- se.annotator
19870
+ ne.annotator
19853
19871
  ]
19854
19872
  }
19855
19873
  )
@@ -19875,7 +19893,7 @@ const Om = Ms(function({
19875
19893
  onTogglePin: y
19876
19894
  }) {
19877
19895
  var pe, ee;
19878
- const w = Tl(), M = Xr(), _ = Jr(), [S, k] = v(null), [D, B] = v(!1), W = Mt($o), se = t.botId ? W.get(t.botId) ?? null : null, V = Mt(am), z = t.sessionId, ne = oe(() => {
19896
+ const w = Tl(), M = Xr(), _ = Jr(), [S, k] = v(null), [D, B] = v(!1), W = Mt($o), ne = t.botId ? W.get(t.botId) ?? null : null, V = Mt(am), z = t.sessionId, re = oe(() => {
19879
19897
  z && (ft("selection"), B(!0));
19880
19898
  }, [z]), ie = oe(
19881
19899
  async (X) => {
@@ -19914,7 +19932,7 @@ const Om = Ms(function({
19914
19932
  const Ce = window.setTimeout(() => X.classList.remove("lfg-card-focus-glow"), 2e3);
19915
19933
  return () => window.clearTimeout(Ce);
19916
19934
  }, [b]);
19917
- const [ae, U] = v(!1), R = j(null), [I, C] = v(44), [T, E] = v(!1), [Q, re] = v(null), [ye, ge] = v(!1), J = j({
19935
+ const [ae, U] = v(!1), R = j(null), [I, C] = v(44), [T, E] = v(!1), [Q, se] = v(null), [ye, ge] = v(!1), J = j({
19918
19936
  startX: 0,
19919
19937
  startY: 0,
19920
19938
  x: 0,
@@ -19969,7 +19987,7 @@ const Om = Ms(function({
19969
19987
  }
19970
19988
  function xe() {
19971
19989
  const X = q.current;
19972
- X && (X.style.transition = ""), E(!1), re(null), de.current = "none", Se(0);
19990
+ X && (X.style.transition = ""), E(!1), se(null), de.current = "none", Se(0);
19973
19991
  }
19974
19992
  const ve = (X) => {
19975
19993
  if (!_ || X.touches.length !== 1 || X.target.closest("form")) return;
@@ -19992,13 +20010,13 @@ const Om = Ms(function({
19992
20010
  }
19993
20011
  if (Ce.horizontal) {
19994
20012
  let ce = (de.current === "archive" ? -116 : 0) + tt;
19995
- ce < -Ce.w && (ce = -Ce.w), ce > 0 && (ce = 0), Ce.x = ce, re(ce < -6 ? "archive" : null), Se(ce);
20013
+ ce < -Ce.w && (ce = -Ce.w), ce > 0 && (ce = 0), Ce.x = ce, se(ce < -6 ? "archive" : null), Se(ce);
19996
20014
  return;
19997
20015
  }
19998
20016
  }, Je = () => {
19999
20017
  const X = J.current;
20000
20018
  if (!X.dragging) return;
20001
- X.dragging = !1, re(null);
20019
+ X.dragging = !1, se(null);
20002
20020
  const Ce = q.current;
20003
20021
  if (Ce && (Ce.style.transition = ""), !X.decided) {
20004
20022
  ge(!1);
@@ -20069,7 +20087,7 @@ const Om = Ms(function({
20069
20087
  ref: R,
20070
20088
  className: "flex min-h-[3.75rem] min-w-0 items-center gap-2 border-b border-border px-3 py-2",
20071
20089
  children: [
20072
- se ? /* @__PURE__ */ n("div", { className: "flex size-7 shrink-0 items-center justify-center", children: /* @__PURE__ */ n(Kn, { bot: se, working: o, size: 28 }) }) : t.botId ? (
20090
+ ne ? /* @__PURE__ */ n("div", { className: "flex size-7 shrink-0 items-center justify-center", children: /* @__PURE__ */ n(Kn, { bot: ne, working: o, size: 28 }) }) : t.botId ? (
20073
20091
  // The bot directory hasn't resolved this bot yet (fetch in flight,
20074
20092
  // race on mount, etc). The session is still bot-driven — the title
20075
20093
  // already says so — so a neutral creature is the honest "loading"
@@ -20109,7 +20127,7 @@ const Om = Ms(function({
20109
20127
  type: "button",
20110
20128
  onClick: We,
20111
20129
  onDoubleClick: (X) => {
20112
- _ || t.shippedReview || (X.preventDefault(), X.stopPropagation(), ne());
20130
+ _ || t.shippedReview || (X.preventDefault(), X.stopPropagation(), re());
20113
20131
  },
20114
20132
  onDragStart: (X) => X.preventDefault(),
20115
20133
  onSelect: (X) => X.preventDefault(),
@@ -20120,7 +20138,7 @@ const Om = Ms(function({
20120
20138
  !_ && !t.shippedReview && "cursor-text rounded-md hover:bg-muted/50"
20121
20139
  ),
20122
20140
  children: /* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col", children: [
20123
- /* @__PURE__ */ n("div", { className: "truncate text-[15px] font-semibold leading-tight", children: se ? se.name : Xn(t) }),
20141
+ /* @__PURE__ */ n("div", { className: "truncate text-[15px] font-semibold leading-tight", children: ne ? ne.name : Xn(t) }),
20124
20142
  _ && K ? /* @__PURE__ */ n("div", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: K }) : null
20125
20143
  ] })
20126
20144
  }
@@ -20134,19 +20152,19 @@ const Om = Ms(function({
20134
20152
  children: /* @__PURE__ */ n(ir, { className: "size-3.5", fill: "currentColor" })
20135
20153
  }
20136
20154
  ) : null,
20137
- !ze && se && V ? /* @__PURE__ */ n(
20155
+ !ze && ne && V ? /* @__PURE__ */ n(
20138
20156
  Me,
20139
20157
  {
20140
20158
  variant: "tint",
20141
20159
  size: "icon-sm",
20142
- onClick: () => V(se),
20143
- "aria-label": `${se.name} settings`,
20144
- title: `${se.name} settings`,
20160
+ onClick: () => V(ne),
20161
+ "aria-label": `${ne.name} settings`,
20162
+ title: `${ne.name} settings`,
20145
20163
  className: "shrink-0",
20146
20164
  children: /* @__PURE__ */ n(ci, { className: "size-4" })
20147
20165
  }
20148
20166
  ) : null,
20149
- !ze && !se && t.botId && t.botName ? /* @__PURE__ */ n(Y2, { session: t }) : null,
20167
+ !ze && !ne && t.botId && t.botName ? /* @__PURE__ */ n(Y2, { session: t }) : null,
20150
20168
  !ze && ((t.agent === "claude" || t.agent === "opencode") && (t.tmuxTarget || t.agent === "opencode") && z ? /* @__PURE__ */ c(Kr, { children: [
20151
20169
  /* @__PURE__ */ n(
20152
20170
  Yr,
@@ -20174,13 +20192,22 @@ const Om = Ms(function({
20174
20192
  }
20175
20193
  ) })
20176
20194
  ] }) : t.model ? /* @__PURE__ */ n("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: t.model }) : null),
20177
- t.shippedReview ? /* @__PURE__ */ n("span", { className: "shrink-0 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold text-emerald-600 dark:text-emerald-400", children: t.reviewLabel || "Shipped" }) : /* @__PURE__ */ n(
20178
- gm,
20179
- {
20180
- busy: o,
20181
- paused: t.status === "blocked",
20182
- className: "lg:hidden"
20183
- }
20195
+ t.shippedReview ? /* @__PURE__ */ n("span", { className: "shrink-0 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-semibold text-emerald-600 dark:text-emerald-400", children: t.reviewLabel || "Shipped" }) : (
20196
+ /* A bot-backed card is exempt from the idle/busy dot for the same
20197
+ reason the header drops the spinner and the rail row drops its
20198
+ dot: the creature carries state in its own posture, so the dot is
20199
+ the same fact said twice — and "idle" is the resting state of a
20200
+ bot you are simply not talking to right now, which is not news.
20201
+ Blocked still shows, because there is no pose for it. */
20202
+ /* @__PURE__ */ n(
20203
+ gm,
20204
+ {
20205
+ busy: o && !ne,
20206
+ paused: t.status === "blocked",
20207
+ className: "lg:hidden",
20208
+ variant: ne ? "avatar" : "inline"
20209
+ }
20210
+ )
20184
20211
  ),
20185
20212
  !ze && /* @__PURE__ */ n(
20186
20213
  zm,
@@ -20191,7 +20218,7 @@ const Om = Ms(function({
20191
20218
  onRefresh: l,
20192
20219
  onRemove: u,
20193
20220
  onError: k,
20194
- onRename: t.shippedReview ? void 0 : ne,
20221
+ onRename: t.shippedReview ? void 0 : re,
20195
20222
  pinned: x,
20196
20223
  onTogglePin: t.shippedReview ? void 0 : y
20197
20224
  }
@@ -20255,9 +20282,9 @@ const Om = Ms(function({
20255
20282
  ), { items: k, queued: D } = je(
20256
20283
  () => Tv(wf(S)),
20257
20284
  [S]
20258
- ), B = k[k.length - 1], W = (B == null ? void 0 : B.type) === "msg" ? B.message : void 0, se = s && (W == null ? void 0 : W.kind) !== "thinking", V = j(/* @__PURE__ */ new Set()), z = j(/* @__PURE__ */ new Map()), ne = j(null);
20259
- if (ne.current !== t)
20260
- ne.current = t, V.current = new Set(
20285
+ ), B = k[k.length - 1], W = (B == null ? void 0 : B.type) === "msg" ? B.message : void 0, ne = s && (W == null ? void 0 : W.kind) !== "thinking", V = j(/* @__PURE__ */ new Set()), z = j(/* @__PURE__ */ new Map()), re = j(null);
20286
+ if (re.current !== t)
20287
+ re.current = t, V.current = new Set(
20261
20288
  S.filter((K) => K.id && Rd(K)).map((K) => K.id)
20262
20289
  ), z.current = /* @__PURE__ */ new Map();
20263
20290
  else {
@@ -20335,7 +20362,7 @@ const Om = Ms(function({
20335
20362
  K.key
20336
20363
  )
20337
20364
  ),
20338
- /* @__PURE__ */ n(Lm, { visible: se, bot: l }),
20365
+ /* @__PURE__ */ n(Lm, { visible: ne, bot: l }),
20339
20366
  D.map(
20340
20367
  (K) => K.type === "msg" ? /* @__PURE__ */ n(
20341
20368
  Hd,
@@ -21257,7 +21284,7 @@ function Ql({
21257
21284
  headers: { "Content-Type": "application/json" },
21258
21285
  body: JSON.stringify(D)
21259
21286
  });
21260
- await o(((B = W.repos) == null ? void 0 : B.find((se) => se.cwd === W.repo.cwd)) ?? W.repo), s(!1), ke.success("Project ready");
21287
+ await o(((B = W.repos) == null ? void 0 : B.find((ne) => ne.cwd === W.repo.cwd)) ?? W.repo), s(!1), ke.success("Project ready");
21261
21288
  } catch (W) {
21262
21289
  x(W instanceof Error ? W.message : "Couldn't create project");
21263
21290
  } finally {
@@ -21429,7 +21456,7 @@ function jm({
21429
21456
  }
21430
21457
  const B = je(() => k ? t.filter(
21431
21458
  (V) => V.name.toLowerCase().includes(k) || V.cwd.toLowerCase().includes(k)
21432
- ) : t, [t, k]), W = l && !r, se = P(
21459
+ ) : t, [t, k]), W = l && !r, ne = P(
21433
21460
  "flex w-full items-center gap-2.5 border-b border-border px-3 text-left last:border-0 active:bg-muted",
21434
21461
  m ? "py-2.5" : "py-2"
21435
21462
  );
@@ -21514,7 +21541,7 @@ function jm({
21514
21541
  {
21515
21542
  type: "button",
21516
21543
  onClick: d,
21517
- className: se,
21544
+ className: ne,
21518
21545
  children: [
21519
21546
  /* @__PURE__ */ n("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: /* @__PURE__ */ n(an, { className: "size-4" }) }),
21520
21547
  /* @__PURE__ */ c("span", { className: "min-w-0 flex-1", children: [
@@ -21529,7 +21556,7 @@ function jm({
21529
21556
  (V) => p ? (
21530
21557
  // A div, not a button: the row carries two buttons of its own,
21531
21558
  // and nested buttons are invalid HTML.
21532
- /* @__PURE__ */ c("div", { className: se, children: [
21559
+ /* @__PURE__ */ c("div", { className: ne, children: [
21533
21560
  /* @__PURE__ */ n("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500", children: /* @__PURE__ */ n(an, { className: "size-4" }) }),
21534
21561
  /* @__PURE__ */ c("span", { className: "min-w-0 flex-1", children: [
21535
21562
  /* @__PURE__ */ n("span", { className: "block truncate text-sm font-medium", children: V.name }),
@@ -21565,7 +21592,7 @@ function jm({
21565
21592
  {
21566
21593
  type: "button",
21567
21594
  onClick: () => o(V),
21568
- className: se,
21595
+ className: ne,
21569
21596
  children: [
21570
21597
  /* @__PURE__ */ n("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500", children: /* @__PURE__ */ n(an, { className: "size-4" }) }),
21571
21598
  /* @__PURE__ */ c("span", { className: "min-w-0 flex-1", children: [
@@ -21624,7 +21651,7 @@ function Vd({
21624
21651
  var Un, L;
21625
21652
  const w = Xr(), M = Mt(zi), { defaultAgent: _ } = go(), S = (N) => w.defaults[N] ?? Ur[N], [k, D] = v(
21626
21653
  () => Va(localStorage.getItem("lfg_v2_agent"), _)
21627
- ), [B, W] = v(""), [se, V] = v(() => localStorage.getItem("lfg_v2_repo") || ""), [z, ne] = v(
21654
+ ), [B, W] = v(""), [ne, V] = v(() => localStorage.getItem("lfg_v2_repo") || ""), [z, re] = v(
21628
21655
  () => localStorage.getItem(`lfg_model_${k}`) || localStorage.getItem("lfg_model") || S(k)
21629
21656
  ), [ie, me] = v(
21630
21657
  () => Qn()
@@ -21637,9 +21664,9 @@ function Vd({
21637
21664
  }
21638
21665
  ), R = j(ae);
21639
21666
  R.current = ae;
21640
- const [I, C] = v(0), [T, E] = v(!1), [Q, re] = v([]), [ye, ge] = v(0), [J, de] = v(null), we = ql({
21667
+ const [I, C] = v(0), [T, E] = v(!1), [Q, se] = v([]), [ye, ge] = v(0), [J, de] = v(null), we = ql({
21641
21668
  endpoint: (N) => `/api/uploads?filename=${encodeURIComponent(N.name)}`,
21642
- onPatchExtra: (N, G) => re(
21669
+ onPatchExtra: (N, G) => se(
21643
21670
  (ue) => ue.map((Ee) => Ee.id === N ? { ...Ee, ...G } : Ee)
21644
21671
  )
21645
21672
  }), {
@@ -21842,7 +21869,7 @@ function Vd({
21842
21869
  }, [e, s, r]);
21843
21870
  const Qe = w.models[k] ?? Jn[k], yt = Oi(k), Nt = o !== "__all" ? t.find((N) => Tn(N) === o) : void 0, xt = !!Nt, vt = jy({
21844
21871
  scopedCwd: Nt == null ? void 0 : Nt.cwd,
21845
- lastCwd: se,
21872
+ lastCwd: ne,
21846
21873
  repos: t
21847
21874
  }), _t = ((Un = t.find((N) => N.cwd === vt)) == null ? void 0 : Un.name) || (vt ? Zn(vt) : "Project"), rn = ye > 0, Rt = (() => {
21848
21875
  const N = t.find((G) => G.cwd === vt);
@@ -21872,7 +21899,7 @@ function Vd({
21872
21899
  enabled: e
21873
21900
  });
21874
21901
  F(() => {
21875
- Qe.includes(z) || ne(Qe[0]);
21902
+ Qe.includes(z) || re(Qe[0]);
21876
21903
  }, [Qe, z]), F(() => {
21877
21904
  yt.length && !yt.includes(ie) && me(yt.includes("high") ? "high" : yt[0]);
21878
21905
  }, [ie, yt]);
@@ -21881,7 +21908,7 @@ function Vd({
21881
21908
  var G;
21882
21909
  if (Ut.some((ue) => ue.key === k)) return;
21883
21910
  const N = (G = Ut[0]) == null ? void 0 : G.key;
21884
- N && (D(N), ne(localStorage.getItem(`lfg_model_${N}`) || S(N)));
21911
+ N && (D(N), re(localStorage.getItem(`lfg_model_${N}`) || S(N)));
21885
21912
  }, [k, Ut]), F(() => {
21886
21913
  if (k !== "aisdk" || Ut.find(
21887
21914
  (ue) => (ue.selectorId ?? ue.key) === Jt
@@ -21891,7 +21918,7 @@ function Vd({
21891
21918
  }, [k, Jt, Ut]);
21892
21919
  const Dn = j(null);
21893
21920
  if (F(() => {
21894
- y && Dn.current !== y.nonce && (Dn.current = y.nonce, D(y.kind), y.kind === "aisdk" && W(y.accountId ?? ""), ne(
21921
+ y && Dn.current !== y.nonce && (Dn.current = y.nonce, D(y.kind), y.kind === "aisdk" && W(y.accountId ?? ""), re(
21895
21922
  localStorage.getItem(`lfg_model_${y.kind}`) || S(y.kind)
21896
21923
  ));
21897
21924
  }, [y]), !e && !ze) return null;
@@ -21911,7 +21938,7 @@ function Vd({
21911
21938
  text: Ee,
21912
21939
  project: Rt
21913
21940
  }), Pt = new Set($e.map((rt) => rt.id));
21914
- de(null), ke.dismiss(fm("create")), U(""), Fe([]), re((rt) => [
21941
+ de(null), ke.dismiss(fm("create")), U(""), Fe([]), se((rt) => [
21915
21942
  ...rt,
21916
21943
  ...$e.map(
21917
21944
  (kt) => kt.status === "ready" ? { ...kt, status: "uploading", progress: 0, error: void 0 } : kt
@@ -21968,7 +21995,7 @@ function Vd({
21968
21995
  const at = new Set(
21969
21996
  $e.map((st) => st.previewUrl).filter((st) => !!st)
21970
21997
  );
21971
- _e.current = _e.current.filter((st) => !at.has(st)), re((st) => st.filter((Ft) => !Pt.has(Ft.id)));
21998
+ _e.current = _e.current.filter((st) => !at.has(st)), se((st) => st.filter((Ft) => !Pt.has(Ft.id)));
21972
21999
  for (const st of Pt) We(st);
21973
22000
  ge((st) => Math.max(0, st - 1));
21974
22001
  }
@@ -21983,7 +22010,7 @@ function Vd({
21983
22010
  const G = Ut;
21984
22011
  if (G.length < 2) return;
21985
22012
  const ue = G.findIndex((wt) => (wt.selectorId ?? wt.key) === Jt), Ee = ((ue < 0 ? 0 : ue) + N + G.length) % G.length, $e = G[Ee], Ye = $e.key;
21986
- ($e.selectorId ?? Ye) !== Jt && (te(N), he((wt) => wt + 1), D(Ye), Ye === "aisdk" && W($e.accountId ?? ""), ne(localStorage.getItem(`lfg_model_${Ye}`) || S(Ye)), bn.swipe());
22013
+ ($e.selectorId ?? Ye) !== Jt && (te(N), he((wt) => wt + 1), D(Ye), Ye === "aisdk" && W($e.accountId ?? ""), re(localStorage.getItem(`lfg_model_${Ye}`) || S(Ye)), bn.swipe());
21987
22014
  };
21988
22015
  Ze.current = wn;
21989
22016
  const Wt = /* @__PURE__ */ n(
@@ -22001,7 +22028,7 @@ function Vd({
22001
22028
  p == null || p(!1);
22002
22029
  return;
22003
22030
  }
22004
- D(N), N === "aisdk" && W((G == null ? void 0 : G.accountId) ?? ""), ne(localStorage.getItem(`lfg_model_${N}`) || S(N));
22031
+ D(N), N === "aisdk" && W((G == null ? void 0 : G.accountId) ?? ""), re(localStorage.getItem(`lfg_model_${N}`) || S(N));
22005
22032
  }
22006
22033
  }
22007
22034
  ), tr = /* @__PURE__ */ c(Ve, { children: [
@@ -22010,7 +22037,7 @@ function Vd({
22010
22037
  {
22011
22038
  value: z,
22012
22039
  models: Qe,
22013
- onChange: ne,
22040
+ onChange: re,
22014
22041
  flat: f === "inline",
22015
22042
  width: "max-w-28",
22016
22043
  onMobileLayerOpenChange: f === "inline" ? Le : void 0
@@ -22458,14 +22485,14 @@ function Fm({
22458
22485
  openOnDrag: i = !1,
22459
22486
  orientation: a = "horizontal"
22460
22487
  }) {
22461
- const l = j(null), d = j({ x: 0, y: 0 }), u = j(null), m = j(0), f = j(0), h = j(!1), p = j(!1), b = j(!1), x = j(null), y = j(!1), [w, M] = v(!1), [_, S] = v(!1), k = j(!1), D = j(!1), B = j(!1), W = j(null), se = j(null), [V, z] = v(() => Math.max(0, t.indexOf(e))), [ne, ie] = v({}), [me, K] = v("above"), q = Math.max(0, t.indexOf(e)), ae = s && t.length > 1, U = Math.max(0, Math.min(t.length - 1, V)), R = t[U] ?? e, I = t.length > 1 ? U / (t.length - 1) : 0, C = Bm(I), T = a === "vertical", E = Math.round(
22488
+ const l = j(null), d = j({ x: 0, y: 0 }), u = j(null), m = j(0), f = j(0), h = j(!1), p = j(!1), b = j(!1), x = j(null), y = j(!1), [w, M] = v(!1), [_, S] = v(!1), k = j(!1), D = j(!1), B = j(!1), W = j(null), ne = j(null), [V, z] = v(() => Math.max(0, t.indexOf(e))), [re, ie] = v({}), [me, K] = v("above"), q = Math.max(0, t.indexOf(e)), ae = s && t.length > 1, U = Math.max(0, Math.min(t.length - 1, V)), R = t[U] ?? e, I = t.length > 1 ? U / (t.length - 1) : 0, C = Bm(I), T = a === "vertical", E = Math.round(
22462
22489
  Math.max(120, Math.min(260, (t.length - 1) * Gd(t.length)))
22463
22490
  ), Q = () => {
22464
22491
  l.current != null && (window.clearTimeout(l.current), l.current = null);
22465
- }, re = j(!1), ye = () => {
22466
- re.current || (re.current = !0, document.addEventListener("selectstart", ni, !0), document.addEventListener("dragstart", ni, !0));
22492
+ }, se = j(!1), ye = () => {
22493
+ se.current || (se.current = !0, document.addEventListener("selectstart", ni, !0), document.addEventListener("dragstart", ni, !0));
22467
22494
  }, ge = () => {
22468
- re.current && (re.current = !1, document.removeEventListener("selectstart", ni, !0), document.removeEventListener("dragstart", ni, !0));
22495
+ se.current && (se.current = !1, document.removeEventListener("selectstart", ni, !0), document.removeEventListener("dragstart", ni, !0));
22469
22496
  };
22470
22497
  F(
22471
22498
  () => () => {
@@ -22509,7 +22536,7 @@ function Fm({
22509
22536
  k.current && (k.current = !1, D.current = !1, S(!1), f.current = q, z(q));
22510
22537
  }, Fe = (O) => {
22511
22538
  if (!ae || h.current) return;
22512
- se.current = O;
22539
+ ne.current = O;
22513
22540
  const ce = Math.max(0, t.indexOf(e));
22514
22541
  f.current = ce, z(ce), J(O), k.current = !0, S(!0), ft("light");
22515
22542
  }, Be = (O) => {
@@ -22528,7 +22555,7 @@ function Fm({
22528
22555
  const O = ($) => {
22529
22556
  var be, Oe;
22530
22557
  const Z = $.target;
22531
- Z && ((be = W.current) != null && be.contains(Z)) || (Z && ((Oe = se.current) != null && Oe.contains(Z)) && (b.current = !0, B.current = !0), Se());
22558
+ Z && ((be = W.current) != null && be.contains(Z)) || (Z && ((Oe = ne.current) != null && Oe.contains(Z)) && (b.current = !0, B.current = !0), Se());
22532
22559
  }, ce = () => Se();
22533
22560
  return document.addEventListener("pointerdown", O, !0), window.addEventListener("resize", ce), window.addEventListener("scroll", ce, !0), () => {
22534
22561
  document.removeEventListener("pointerdown", O, !0), window.removeEventListener("resize", ce), window.removeEventListener("scroll", ce, !0);
@@ -22632,7 +22659,7 @@ function Fm({
22632
22659
  role: "status",
22633
22660
  "aria-live": "polite",
22634
22661
  "aria-label": `${o} ${R}`,
22635
- style: ne,
22662
+ style: re,
22636
22663
  className: P(
22637
22664
  "fixed z-[220] select-none animate-in fade-in-0 zoom-in-90 duration-200",
22638
22665
  // A gesture panel is pure readout under a captured pointer; a
@@ -23119,11 +23146,11 @@ function k2({
23119
23146
  onDismiss: a,
23120
23147
  onRefineAgent: l
23121
23148
  }) {
23122
- const d = dr((r == null ? void 0 : r.agent) ?? "aisdk"), [u, m] = v(""), [f, h] = v(!1), [p, b] = v(!1), [x, y] = v(!1), [w, M] = v(!1), [_, S] = v(""), [k, D] = v(!1), B = j(null), W = j(null), [se, V] = v((r == null ? void 0 : r.agent) ?? "aisdk"), [z, ne] = v((r == null ? void 0 : r.claudeAccountId) ?? ""), [ie, me] = v(
23149
+ const d = dr((r == null ? void 0 : r.agent) ?? "aisdk"), [u, m] = v(""), [f, h] = v(!1), [p, b] = v(!1), [x, y] = v(!1), [w, M] = v(!1), [_, S] = v(""), [k, D] = v(!1), B = j(null), W = j(null), [ne, V] = v((r == null ? void 0 : r.agent) ?? "aisdk"), [z, re] = v((r == null ? void 0 : r.claudeAccountId) ?? ""), [ie, me] = v(
23123
23150
  (r == null ? void 0 : r.model) ?? d
23124
23151
  ), [K, q] = v(
23125
23152
  (r == null ? void 0 : r.thinkingLevel) ?? Qn()
23126
- ), ae = j(null), U = zo(se), R = dr(se), I = un(se);
23153
+ ), ae = j(null), U = zo(ne), R = dr(ne), I = un(ne);
23127
23154
  F(() => {
23128
23155
  U.includes(ie) || me(R);
23129
23156
  }, [R, U, ie]);
@@ -23136,11 +23163,11 @@ function k2({
23136
23163
  },
23137
23164
  [s]
23138
23165
  ), T = z && C.has(z) ? z : "", E = () => ({
23139
- agent: se,
23166
+ agent: ne,
23140
23167
  model: ie,
23141
23168
  thinkingLevel: I ? K : void 0,
23142
- claudeAccountId: se === "aisdk" && T || void 0
23143
- }), [Q, re] = v(!1), ye = j(null), ge = () => {
23169
+ claudeAccountId: ne === "aisdk" && T || void 0
23170
+ }), [Q, se] = v(!1), ye = j(null), ge = () => {
23144
23171
  ye.current !== null && (window.clearTimeout(ye.current), ye.current = null);
23145
23172
  };
23146
23173
  F(() => ge, []);
@@ -23149,11 +23176,11 @@ function k2({
23149
23176
  var X;
23150
23177
  ye.current = null;
23151
23178
  const ee = (X = W.current) == null ? void 0 : X.closest("[data-slot=drawer-content]");
23152
- ee && ee.contains(Ai()) || u.trim() || _.trim() || (re(!1), D(!1), M(!1));
23179
+ ee && ee.contains(Ai()) || u.trim() || _.trim() || (se(!1), D(!1), M(!1));
23153
23180
  }, 260);
23154
23181
  }
23155
23182
  function de(ee) {
23156
- ge(), re(!0), ee === "instruct" ? D(!0) : M(!0), requestAnimationFrame(() => {
23183
+ ge(), se(!0), ee === "instruct" ? D(!0) : M(!0), requestAnimationFrame(() => {
23157
23184
  window.setTimeout(() => {
23158
23185
  var X;
23159
23186
  (X = (ee === "instruct" ? ae : B).current) == null || X.focus();
@@ -23218,7 +23245,7 @@ function k2({
23218
23245
  p ? /* @__PURE__ */ n(
23219
23246
  Ui,
23220
23247
  {
23221
- backend: se,
23248
+ backend: ne,
23222
23249
  setBackend: V,
23223
23250
  model: ie,
23224
23251
  setModel: me,
@@ -23226,7 +23253,7 @@ function k2({
23226
23253
  setThinkingLevel: q,
23227
23254
  codingAgents: s,
23228
23255
  claudeAccountId: T,
23229
- setClaudeAccountId: ne,
23256
+ setClaudeAccountId: re,
23230
23257
  scheduledOnly: !1
23231
23258
  }
23232
23259
  ) : null
@@ -23237,7 +23264,7 @@ function k2({
23237
23264
  className: "px-2 pb-1 pt-2",
23238
23265
  onPointerDownCapture: ge,
23239
23266
  onFocusCapture: (ee) => {
23240
- Dr(ee.target) && (ge(), re(!0));
23267
+ Dr(ee.target) && (ge(), se(!0));
23241
23268
  },
23242
23269
  onBlurCapture: J,
23243
23270
  children: w ? (
@@ -23275,7 +23302,7 @@ function k2({
23275
23302
  size: "sm",
23276
23303
  className: "text-muted-foreground",
23277
23304
  onClick: () => {
23278
- S(""), M(!1), re(!1);
23305
+ S(""), M(!1), se(!1);
23279
23306
  },
23280
23307
  children: "Cancel"
23281
23308
  }
@@ -23573,18 +23600,18 @@ function S2({
23573
23600
  const Je = { ..._e, ...ve };
23574
23601
  return y(Jx(Je)), Je;
23575
23602
  });
23576
- }, [se, V] = v((m == null ? void 0 : m.enabled) ?? !0), [z, ne] = v((m == null ? void 0 : m.cwd) ?? ((xe = t[0]) == null ? void 0 : xe.cwd) ?? ""), [ie, me] = v((m == null ? void 0 : m.agent) ?? "aisdk"), [K, q] = v((m == null ? void 0 : m.claudeAccountId) ?? ""), ae = dr((m == null ? void 0 : m.agent) ?? "aisdk"), [U, R] = v(
23603
+ }, [ne, V] = v((m == null ? void 0 : m.enabled) ?? !0), [z, re] = v((m == null ? void 0 : m.cwd) ?? ((xe = t[0]) == null ? void 0 : xe.cwd) ?? ""), [ie, me] = v((m == null ? void 0 : m.agent) ?? "aisdk"), [K, q] = v((m == null ? void 0 : m.claudeAccountId) ?? ""), ae = dr((m == null ? void 0 : m.agent) ?? "aisdk"), [U, R] = v(
23577
23604
  (m == null ? void 0 : m.model) ?? ae
23578
23605
  ), [I, C] = v(
23579
23606
  (m == null ? void 0 : m.thinkingLevel) ?? Qn()
23580
- ), [T, E] = v(!1), [Q, re] = v(!1), [ye, ge] = v(null), J = je(() => Ju(x, r), [x, r]), de = zo(ie), we = dr(ie), Se = un(ie);
23607
+ ), [T, E] = v(!1), [Q, se] = v(!1), [ye, ge] = v(null), J = je(() => Ju(x, r), [x, r]), de = zo(ie), we = dr(ie), Se = un(ie);
23581
23608
  F(() => {
23582
23609
  de.includes(U) || R(we);
23583
23610
  }, [we, de, U]);
23584
23611
  async function Fe() {
23585
23612
  var ve;
23586
23613
  if (!(Q || !p.trim())) {
23587
- re(!0), ge(null);
23614
+ se(!0), ge(null);
23588
23615
  try {
23589
23616
  const _e = await Ne("/api/auto/enhance-prompt", {
23590
23617
  method: "POST",
@@ -23598,7 +23625,7 @@ function S2({
23598
23625
  } catch (_e) {
23599
23626
  ge(_e instanceof Error ? _e.message : "enhance failed");
23600
23627
  } finally {
23601
- re(!1);
23628
+ se(!1);
23602
23629
  }
23603
23630
  }
23604
23631
  }
@@ -23611,7 +23638,7 @@ function S2({
23611
23638
  name: f.trim(),
23612
23639
  prompt: p.trim(),
23613
23640
  schedule: x.trim(),
23614
- enabled: se,
23641
+ enabled: ne,
23615
23642
  cwd: z || void 0,
23616
23643
  agent: ie,
23617
23644
  model: U.trim() || void 0,
@@ -23801,7 +23828,7 @@ function S2({
23801
23828
  "select",
23802
23829
  {
23803
23830
  value: z,
23804
- onChange: (ve) => ne(ve.target.value),
23831
+ onChange: (ve) => re(ve.target.value),
23805
23832
  "aria-label": "Repo",
23806
23833
  className: "max-w-44 appearance-none truncate bg-transparent text-right text-[13px] font-medium outline-none",
23807
23834
  children: [
@@ -23842,14 +23869,14 @@ function S2({
23842
23869
  {
23843
23870
  className: P(
23844
23871
  "relative h-6 w-11 rounded-full transition-colors",
23845
- se ? "bg-success" : "bg-border"
23872
+ ne ? "bg-success" : "bg-border"
23846
23873
  ),
23847
23874
  children: /* @__PURE__ */ n(
23848
23875
  "span",
23849
23876
  {
23850
23877
  className: P(
23851
23878
  "absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",
23852
- se ? "translate-x-5" : ""
23879
+ ne ? "translate-x-5" : ""
23853
23880
  )
23854
23881
  }
23855
23882
  )
@@ -25652,7 +25679,7 @@ function Z2({
25652
25679
  a ? e.shape ?? "circle" : sa[Math.floor(Math.random() * sa.length)]
25653
25680
  ), [_, S] = v(
25654
25681
  a ? e.colorway ?? "warm" : oa[Math.floor(Math.random() * oa.length)]
25655
- ), [k, D] = v(l), [B, W] = v(a ? e.model ?? d : d), [se, V] = v(a ? e.thinkingLevel ?? Qn() : Qn()), [z, ne] = v(!1), ie = zo(k), me = dr(k);
25682
+ ), [k, D] = v(l), [B, W] = v(a ? e.model ?? d : d), [ne, V] = v(a ? e.thinkingLevel ?? Qn() : Qn()), [z, re] = v(!1), ie = zo(k), me = dr(k);
25656
25683
  F(() => {
25657
25684
  ie.includes(B) || W(me);
25658
25685
  }, [me, B, ie]);
@@ -25665,7 +25692,7 @@ function Z2({
25665
25692
  persona: f.trim(),
25666
25693
  agent: k,
25667
25694
  model: B || void 0,
25668
- thinkingLevel: un(k) ? se : void 0,
25695
+ thinkingLevel: un(k) ? ne : void 0,
25669
25696
  cwd: x || void 0,
25670
25697
  enabled: p
25671
25698
  });
@@ -25776,7 +25803,7 @@ function Z2({
25776
25803
  /* @__PURE__ */ n("span", { className: "text-sm", children: "Enabled" }),
25777
25804
  /* @__PURE__ */ n(zr, { checked: p, onCheckedChange: b, "aria-label": "Enable bot" })
25778
25805
  ] }) : null,
25779
- /* @__PURE__ */ c(_f, { open: z, onOpenChange: ne, className: "mt-3", children: [
25806
+ /* @__PURE__ */ c(_f, { open: z, onOpenChange: re, className: "mt-3", children: [
25780
25807
  /* @__PURE__ */ c(Ef, { className: "flex w-full items-center justify-between rounded-xl border border-border px-3 py-2 text-sm", children: [
25781
25808
  /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
25782
25809
  /* @__PURE__ */ n(jt, { className: P("size-3.5 transition-transform duration-150", z && "rotate-90") }),
@@ -25814,7 +25841,7 @@ function Z2({
25814
25841
  setBackend: D,
25815
25842
  model: B,
25816
25843
  setModel: W,
25817
- thinkingLevel: se,
25844
+ thinkingLevel: ne,
25818
25845
  setThinkingLevel: V,
25819
25846
  codingAgents: r,
25820
25847
  scheduledOnly: !1