teodor-new-chat-ui 4.1.41 → 4.1.42

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.
package/dist/index.esm.js CHANGED
@@ -2355,22 +2355,22 @@ ut.getAdapter = ru.getAdapter;
2355
2355
  ut.HttpStatusCode = Ti;
2356
2356
  ut.default = ut;
2357
2357
  const {
2358
- Axios: IT,
2359
- AxiosError: NT,
2360
- CanceledError: AT,
2361
- isCancel: jT,
2362
- CancelToken: _T,
2363
- VERSION: PT,
2364
- all: OT,
2365
- Cancel: MT,
2366
- isAxiosError: DT,
2367
- spread: LT,
2368
- toFormData: $T,
2369
- AxiosHeaders: FT,
2370
- HttpStatusCode: zT,
2371
- formToJSON: BT,
2372
- getAdapter: HT,
2373
- mergeConfig: UT
2358
+ Axios: ET,
2359
+ AxiosError: IT,
2360
+ CanceledError: NT,
2361
+ isCancel: AT,
2362
+ CancelToken: jT,
2363
+ VERSION: _T,
2364
+ all: PT,
2365
+ Cancel: OT,
2366
+ isAxiosError: MT,
2367
+ spread: DT,
2368
+ toFormData: LT,
2369
+ AxiosHeaders: $T,
2370
+ HttpStatusCode: FT,
2371
+ formToJSON: zT,
2372
+ getAdapter: BT,
2373
+ mergeConfig: HT
2374
2374
  } = ut, vl = typeof window < "u" ? window.__API_BASE_URL__ : void 0, wl = vl ? gn(vl) : void 0;
2375
2375
  function gn(e) {
2376
2376
  const n = (e != null && e.trim() ? e.trim() : "/api/chat").replace(/\/+$/, "");
@@ -2686,7 +2686,7 @@ function tx(e = []) {
2686
2686
  function Sl(e, t) {
2687
2687
  var n, r, o, s;
2688
2688
  if (t.type === "message_start" && t.role === "assistant") {
2689
- const i = t.id, a = ax(t.model);
2689
+ const i = t.id, a = ix(t.model);
2690
2690
  if (e.messages.some((d) => d.id === i))
2691
2691
  return { ...e, assemblingId: i };
2692
2692
  const u = {
@@ -2770,7 +2770,7 @@ function Sl(e, t) {
2770
2770
  };
2771
2771
  }
2772
2772
  if (t.type === "checkpoint") {
2773
- const i = t.checkpointNs ?? e.lastCheckpointNs ?? null, a = ix(e.messages, t.checkpointId, i);
2773
+ const i = t.checkpointNs ?? e.lastCheckpointNs ?? null, a = sx(e.messages, t.checkpointId, i);
2774
2774
  return { ...e, lastCheckpointId: t.checkpointId, lastCheckpointNs: i, messages: a };
2775
2775
  }
2776
2776
  if (t.type === "branch") {
@@ -2845,44 +2845,18 @@ function ox(e, t) {
2845
2845
  if (!s) continue;
2846
2846
  if ((o == null ? void 0 : o.type) === "text") {
2847
2847
  const i = o, a = i.text ?? "";
2848
- if (console.debug("[MessageReducer] mergeParts", { incomingLength: s.length, previousLength: a.length, incomingSnippet: s.slice(0, 100), previousSnippet: a.slice(-100) }), !a) {
2849
- i.text = s;
2850
- continue;
2851
- }
2852
- if (s.startsWith(a)) {
2853
- const u = s.slice(a.length);
2854
- u ? (console.debug("[MessageReducer] incoming startsWith previous - appending suffix", { suffixLength: u.length }), i.text = s) : console.debug("[MessageReducer] incoming === previous - skipping duplicate");
2855
- continue;
2856
- }
2857
- if (a.endsWith(s)) {
2858
- console.debug("[MessageReducer] previous endsWith incoming - skipping duplicate", { incomingLength: s.length, previousLength: a.length });
2859
- continue;
2860
- }
2861
- const l = sx(a, s);
2862
- if (l === null)
2863
- console.debug("[MessageReducer] no overlap detected - appending incoming", { incomingLength: s.length }), i.text = a + s;
2864
- else if (l === "") {
2865
- console.debug("[MessageReducer] perfect overlap - no change needed");
2866
- continue;
2867
- } else
2868
- console.debug("[MessageReducer] suffix computed", { suffixLength: l.length }), i.text = a + l;
2848
+ console.debug("[MessageReducer] mergeParts - appending delta", {
2849
+ deltaLength: s.length,
2850
+ previousLength: a.length,
2851
+ deltaSnippet: s.slice(0, 50)
2852
+ }), i.text = a + s;
2869
2853
  } else
2870
2854
  n.push({ type: "text", text: s });
2871
2855
  } else
2872
2856
  n.push(r);
2873
2857
  return n;
2874
2858
  }
2875
- function sx(e, t) {
2876
- if (!t) return "";
2877
- if (!e) return null;
2878
- if (e === t) return "";
2879
- const n = Math.min(e.length, t.length);
2880
- for (let r = n; r > 0; r--)
2881
- if (e.slice(-r) === t.slice(0, r))
2882
- return t.slice(r);
2883
- return null;
2884
- }
2885
- function ix(e, t, n) {
2859
+ function sx(e, t, n) {
2886
2860
  for (let r = e.length - 1; r >= 0; r--)
2887
2861
  if (e[r].role === "assistant") {
2888
2862
  const s = { ...e[r], checkpointId: t, checkpointNs: n ?? void 0 };
@@ -2890,12 +2864,12 @@ function ix(e, t, n) {
2890
2864
  }
2891
2865
  return e;
2892
2866
  }
2893
- function ax(e) {
2867
+ function ix(e) {
2894
2868
  if (!e) return null;
2895
2869
  const t = e.split("/");
2896
2870
  return t[t.length - 1] || null;
2897
2871
  }
2898
- function lx(e = {}) {
2872
+ function ax(e = {}) {
2899
2873
  const t = at(() => gn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = xe(e.token ?? null), s = Ge(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = xe(!1), [u, d] = xe(null), [f, h] = xe(""), [p, w] = xe(null), [v, g] = xe(0), [x, y] = xe(!1), S = Ge(null), R = Ge(!0), C = Ge(0), T = Me((j) => {
2900
2874
  o(j);
2901
2875
  }, []), k = Me(() => {
@@ -3000,7 +2974,7 @@ function lx(e = {}) {
3000
2974
  `)) >= 0; ) {
3001
2975
  const ae = G.slice(0, ne);
3002
2976
  G = G.slice(ne + 2);
3003
- const de = ux(ae);
2977
+ const de = cx(ae);
3004
2978
  if (!de) continue;
3005
2979
  let Ne;
3006
2980
  try {
@@ -3009,7 +2983,7 @@ function lx(e = {}) {
3009
2983
  console.debug("[use-chat] malformed SSE:", de.slice(0, 200));
3010
2984
  continue;
3011
2985
  }
3012
- const he = cx(Ne) ? Ne.data : Ne;
2986
+ const he = lx(Ne) ? Ne.data : Ne;
3013
2987
  $e = Date.now();
3014
2988
  const me = he.seq;
3015
2989
  if (me !== void 0) {
@@ -3077,10 +3051,10 @@ function lx(e = {}) {
3077
3051
  setToken: T
3078
3052
  };
3079
3053
  }
3080
- function cx(e) {
3054
+ function lx(e) {
3081
3055
  return !!e && typeof e == "object" && e.protocolVersion === "v1" && "data" in e;
3082
3056
  }
3083
- function ux(e) {
3057
+ function cx(e) {
3084
3058
  const t = e.split(/\r?\n/), n = [];
3085
3059
  for (const r of t)
3086
3060
  if (r && !r.startsWith(":") && r.startsWith("data:")) {
@@ -3090,7 +3064,7 @@ function ux(e) {
3090
3064
  return n.length === 0 ? null : n.join(`
3091
3065
  `);
3092
3066
  }
3093
- function dx({
3067
+ function ux({
3094
3068
  baseUrl: e,
3095
3069
  onThreadInfo: t,
3096
3070
  onMessageEvent: n,
@@ -3120,7 +3094,7 @@ function dx({
3120
3094
  r == null || r(p);
3121
3095
  },
3122
3096
  [n, o, t, r]
3123
- ), { stream: a, stop: l, isStreaming: u, error: d, setToken: f } = lx({
3097
+ ), { stream: a, stop: l, isStreaming: u, error: d, setToken: f } = ax({
3124
3098
  baseUrl: e,
3125
3099
  token: null
3126
3100
  }), h = Me(
@@ -3151,7 +3125,7 @@ function dx({
3151
3125
  [h, l, u, d, f]
3152
3126
  );
3153
3127
  }
3154
- const cu = Jr(null), uu = Jr(null), du = Jr(null), fx = Jr(!1), hx = 20, px = "cachedThreads", mx = "v1", To = 300, ki = 200;
3128
+ const cu = Jr(null), uu = Jr(null), du = Jr(null), dx = Jr(!1), fx = 20, hx = "cachedThreads", px = "v1", To = 300, ki = 200;
3155
3129
  function Cl(e) {
3156
3130
  if (typeof window < "u" && "requestIdleCallback" in window)
3157
3131
  try {
@@ -3186,8 +3160,8 @@ function qs(e) {
3186
3160
  } catch {
3187
3161
  }
3188
3162
  }
3189
- function gx() {
3190
- const e = na(px);
3163
+ function mx() {
3164
+ const e = na(hx);
3191
3165
  if (!e) return [];
3192
3166
  try {
3193
3167
  const t = JSON.parse(e);
@@ -3200,16 +3174,16 @@ function gx() {
3200
3174
  return [];
3201
3175
  }
3202
3176
  }
3203
- function xx(e) {
3177
+ function gx(e) {
3204
3178
  let t = 5381;
3205
3179
  for (let n = 0; n < e.length; n++)
3206
3180
  t = (t << 5) + t ^ e.charCodeAt(n);
3207
3181
  return (t >>> 0).toString(36);
3208
3182
  }
3209
3183
  function Gs(e, t) {
3210
- return `cachedThreads:v1:${e}:${xx(t || "anon")}`;
3184
+ return `cachedThreads:v1:${e}:${gx(t || "anon")}`;
3211
3185
  }
3212
- function vx(e) {
3186
+ function xx(e) {
3213
3187
  const t = na(e);
3214
3188
  if (!t) return [];
3215
3189
  try {
@@ -3230,9 +3204,9 @@ function Ei(e, t) {
3230
3204
  }
3231
3205
  }
3232
3206
  function Tl(e) {
3233
- const t = vx(e);
3207
+ const t = xx(e);
3234
3208
  if (t.length > 0) return t;
3235
- const n = gx();
3209
+ const n = mx();
3236
3210
  if (n.length > 0)
3237
3211
  try {
3238
3212
  Ei(e, n.slice(0, ki));
@@ -3249,7 +3223,7 @@ function Ys(e) {
3249
3223
  function Xs(e) {
3250
3224
  return e.order.map((t) => e.byId[t]).filter(Boolean);
3251
3225
  }
3252
- function wx({
3226
+ function vx({
3253
3227
  children: e,
3254
3228
  initialThreadId: t = null,
3255
3229
  autoLoadInitial: n = !0,
@@ -3265,7 +3239,7 @@ function wx({
3265
3239
  } catch {
3266
3240
  return "unknown";
3267
3241
  }
3268
- }, [u]), h = at(() => `threadPayload:${mx}:${f}:`, [f]), p = Me((E) => `${h}${E}`, [h]), w = Me((E) => {
3242
+ }, [u]), h = at(() => `threadPayload:${px}:${f}:`, [f]), p = Me((E) => `${h}${E}`, [h]), w = Me((E) => {
3269
3243
  if (!E || typeof E != "object") return null;
3270
3244
  const b = E;
3271
3245
  return typeof b.threadId != "string" || !Array.isArray(b.messages) ? null : {
@@ -3482,7 +3456,7 @@ function wx({
3482
3456
  });
3483
3457
  },
3484
3458
  [ee.messages.length]
3485
- ), { startStream: wn, stop: sr, isStreaming: en, error: Mn, setAuthToken: Mt } = dx({
3459
+ ), { startStream: wn, stop: sr, isStreaming: en, error: Mn, setAuthToken: Mt } = ux({
3486
3460
  baseUrl: d,
3487
3461
  onThreadInfo: or,
3488
3462
  onMessageEvent: O,
@@ -3683,7 +3657,7 @@ function wx({
3683
3657
  threadId: N,
3684
3658
  checkpointId: F,
3685
3659
  checkpointNs: pe,
3686
- limit: (E == null ? void 0 : E.limit) ?? hx,
3660
+ limit: (E == null ? void 0 : E.limit) ?? fx,
3687
3661
  beforeId: b
3688
3662
  });
3689
3663
  ot(M, "prepend", N ?? void 0);
@@ -3891,7 +3865,7 @@ function wx({
3891
3865
  Mn
3892
3866
  ]
3893
3867
  );
3894
- return /* @__PURE__ */ c.jsx(fx.Provider, { value: !0, children: /* @__PURE__ */ c.jsx(du.Provider, { value: ar, children: /* @__PURE__ */ c.jsx(cu.Provider, { value: Vt, children: /* @__PURE__ */ c.jsx(uu.Provider, { value: $n, children: e }) }) }) });
3868
+ return /* @__PURE__ */ c.jsx(dx.Provider, { value: !0, children: /* @__PURE__ */ c.jsx(du.Provider, { value: ar, children: /* @__PURE__ */ c.jsx(cu.Provider, { value: Vt, children: /* @__PURE__ */ c.jsx(uu.Provider, { value: $n, children: e }) }) }) });
3895
3869
  }
3896
3870
  function ra() {
3897
3871
  const e = ts(cu);
@@ -3905,7 +3879,7 @@ function hu() {
3905
3879
  throw new Error("useMessages must be used within ChatSessionProvider");
3906
3880
  return e;
3907
3881
  }
3908
- function bx() {
3882
+ function wx() {
3909
3883
  const e = ts(du);
3910
3884
  if (!e)
3911
3885
  throw new Error("useStream must be used within ChatSessionProvider");
@@ -3923,7 +3897,7 @@ function Js({
3923
3897
  onThreadChange: l
3924
3898
  }) {
3925
3899
  return /* @__PURE__ */ c.jsx(Gg, { apiConfig: t, children: /* @__PURE__ */ c.jsx(
3926
- wx,
3900
+ vx,
3927
3901
  {
3928
3902
  initialThreadId: n,
3929
3903
  autoLoadInitial: r,
@@ -3939,7 +3913,7 @@ function Js({
3939
3913
  function te(...e) {
3940
3914
  return fm(dm(e));
3941
3915
  }
3942
- const yx = ns(
3916
+ const bx = ns(
3943
3917
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3944
3918
  {
3945
3919
  variants: {
@@ -3969,7 +3943,7 @@ const yx = ns(
3969
3943
  return /* @__PURE__ */ c.jsx(
3970
3944
  i,
3971
3945
  {
3972
- className: te(yx({ variant: t, size: n, className: e })),
3946
+ className: te(bx({ variant: t, size: n, className: e })),
3973
3947
  ref: s,
3974
3948
  ...o
3975
3949
  }
@@ -3991,7 +3965,7 @@ const pu = m.forwardRef(
3991
3965
  )
3992
3966
  );
3993
3967
  pu.displayName = "Textarea";
3994
- function Sx({
3968
+ function yx({
3995
3969
  initialValue: e = "",
3996
3970
  editingMessageId: t = null,
3997
3971
  placeholder: n = "Type your message...",
@@ -4084,11 +4058,11 @@ function Sx({
4084
4058
  ) })
4085
4059
  ] }) });
4086
4060
  }
4087
- const Cx = V.memo(Sx), cs = 0, Nn = 1, Tr = 2, mu = 4;
4061
+ const Sx = V.memo(yx), cs = 0, Nn = 1, Tr = 2, mu = 4;
4088
4062
  function Rl(e) {
4089
4063
  return () => e;
4090
4064
  }
4091
- function Tx(e) {
4065
+ function Cx(e) {
4092
4066
  e();
4093
4067
  }
4094
4068
  function gu(e, t) {
@@ -4097,15 +4071,15 @@ function gu(e, t) {
4097
4071
  function kl(e, t) {
4098
4072
  return () => e(t);
4099
4073
  }
4100
- function Rx(e, t) {
4074
+ function Tx(e, t) {
4101
4075
  return (n) => e(t, n);
4102
4076
  }
4103
4077
  function oa(e) {
4104
4078
  return e !== void 0;
4105
4079
  }
4106
- function kx(...e) {
4080
+ function Rx(...e) {
4107
4081
  return () => {
4108
- e.map(Tx);
4082
+ e.map(Cx);
4109
4083
  };
4110
4084
  }
4111
4085
  function Rr() {
@@ -4113,7 +4087,7 @@ function Rr() {
4113
4087
  function us(e, t) {
4114
4088
  return t(e), e;
4115
4089
  }
4116
- function Ex(e, t) {
4090
+ function kx(e, t) {
4117
4091
  return t(e);
4118
4092
  }
4119
4093
  function rt(...e) {
@@ -4132,7 +4106,7 @@ function lt(e) {
4132
4106
  return e(mu);
4133
4107
  }
4134
4108
  function fe(e, t) {
4135
- return Ye(e, Rx(t, cs));
4109
+ return Ye(e, Tx(t, cs));
4136
4110
  }
4137
4111
  function qt(e, t) {
4138
4112
  const n = e(Nn, (r) => {
@@ -4171,7 +4145,7 @@ function rn(e) {
4171
4145
  };
4172
4146
  }
4173
4147
  function U(e, ...t) {
4174
- const n = Ix(...t);
4148
+ const n = Ex(...t);
4175
4149
  return (r, o) => {
4176
4150
  switch (r) {
4177
4151
  case Tr:
@@ -4217,10 +4191,10 @@ function De(...e) {
4217
4191
  n === o ? a() : r = a;
4218
4192
  };
4219
4193
  }
4220
- function Ix(...e) {
4221
- return (t) => e.reduceRight(Ex, t);
4194
+ function Ex(...e) {
4195
+ return (t) => e.reduceRight(kx, t);
4222
4196
  }
4223
- function Nx(e) {
4197
+ function Ix(e) {
4224
4198
  let t, n;
4225
4199
  const r = () => t == null ? void 0 : t();
4226
4200
  return function(o, s) {
@@ -4281,12 +4255,12 @@ function Ve(e, t = [], { singleton: n } = { singleton: !0 }) {
4281
4255
  return {
4282
4256
  constructor: e,
4283
4257
  dependencies: t,
4284
- id: Ax(),
4258
+ id: Nx(),
4285
4259
  singleton: n
4286
4260
  };
4287
4261
  }
4288
- const Ax = () => Symbol();
4289
- function jx(e) {
4262
+ const Nx = () => Symbol();
4263
+ function Ax(e) {
4290
4264
  const t = /* @__PURE__ */ new Map(), n = ({ constructor: r, dependencies: o, id: s, singleton: i }) => {
4291
4265
  if (i && t.has(s))
4292
4266
  return t.get(s);
@@ -4324,17 +4298,17 @@ function Ii(...e) {
4324
4298
  case Tr:
4325
4299
  return;
4326
4300
  case Nn:
4327
- return kx(...e.map((r) => Ye(r, n)));
4301
+ return Rx(...e.map((r) => Ye(r, n)));
4328
4302
  }
4329
4303
  };
4330
4304
  }
4331
4305
  var Et = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(Et || {});
4332
- const _x = {
4306
+ const jx = {
4333
4307
  0: "debug",
4334
4308
  3: "error",
4335
4309
  1: "log",
4336
4310
  2: "warn"
4337
- }, Px = () => typeof globalThis > "u" ? window : globalThis, An = Ve(
4311
+ }, _x = () => typeof globalThis > "u" ? window : globalThis, An = Ve(
4338
4312
  () => {
4339
4313
  const e = Z(
4340
4314
  3
@@ -4343,8 +4317,8 @@ const _x = {
4343
4317
  return {
4344
4318
  log: Z((t, n, r = 1) => {
4345
4319
  var o;
4346
- const s = (o = Px().VIRTUOSO_LOG_LEVEL) != null ? o : lt(e);
4347
- r >= s && console[_x[r]](
4320
+ const s = (o = _x().VIRTUOSO_LOG_LEVEL) != null ? o : lt(e);
4321
+ r >= s && console[jx[r]](
4348
4322
  "%creact-virtuoso: %c%s %o",
4349
4323
  "color: #0253b3; font-weight: bold",
4350
4324
  "color: initial",
@@ -4376,10 +4350,10 @@ function ia(e, t, n) {
4376
4350
  i && t ? (s == null || s.observe(i), r.current = i) : (r.current && (s == null || s.unobserve(r.current)), r.current = null);
4377
4351
  }, { callbackRef: o, ref: r };
4378
4352
  }
4379
- function Ox(e, t, n, r, o, s, i, a, l) {
4353
+ function Px(e, t, n, r, o, s, i, a, l) {
4380
4354
  const u = V.useCallback(
4381
4355
  (d) => {
4382
- const f = Mx(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
4356
+ const f = Ox(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
4383
4357
  let h = d.parentElement;
4384
4358
  for (; !h.dataset.virtuosoScroller; )
4385
4359
  h = h.parentElement;
@@ -4399,7 +4373,7 @@ function Ox(e, t, n, r, o, s, i, a, l) {
4399
4373
  );
4400
4374
  return ia(u, n, l);
4401
4375
  }
4402
- function Mx(e, t, n, r) {
4376
+ function Ox(e, t, n, r) {
4403
4377
  const o = e.length;
4404
4378
  if (o === 0)
4405
4379
  return null;
@@ -4542,7 +4516,7 @@ function ds(e, t, n) {
4542
4516
  if (Ze(e))
4543
4517
  return [];
4544
4518
  const r = Gt(e, t)[0];
4545
- return Dx(Ai(e, r, n));
4519
+ return Mx(Ai(e, r, n));
4546
4520
  }
4547
4521
  function Ni(e, t) {
4548
4522
  if (Ze(e)) return Br;
@@ -4634,7 +4608,7 @@ function ji(e) {
4634
4608
  const { lvl: t, r: n } = e;
4635
4609
  return !Ze(n) && !Ze(n.r) && n.lvl === t && n.r.lvl === t ? ht(n, { l: ht(e, { r: n.l }), lvl: t + 1 }) : e;
4636
4610
  }
4637
- function Dx(e) {
4611
+ function Mx(e) {
4638
4612
  return wu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
4639
4613
  }
4640
4614
  function Tu(e, t) {
@@ -4669,7 +4643,7 @@ function $o(e, t, n, r = 0) {
4669
4643
  }
4670
4644
  throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
4671
4645
  }
4672
- function Lx(e, t, n, r) {
4646
+ function Dx(e, t, n, r) {
4673
4647
  const o = $o(e, t, r), s = $o(e, n, r, o);
4674
4648
  return e.slice(o, s + 1);
4675
4649
  }
@@ -4682,7 +4656,7 @@ function fs(e) {
4682
4656
  function la({ index: e }, t) {
4683
4657
  return t === e ? 0 : t < e ? -1 : 1;
4684
4658
  }
4685
- function $x() {
4659
+ function Lx() {
4686
4660
  return {
4687
4661
  groupIndices: [],
4688
4662
  groupOffsetTree: pr(),
@@ -4693,7 +4667,7 @@ function $x() {
4693
4667
  sizeTree: pr()
4694
4668
  };
4695
4669
  }
4696
- function Fx(e, t) {
4670
+ function $x(e, t) {
4697
4671
  let n = Ze(e) ? 0 : 1 / 0;
4698
4672
  for (const r of t) {
4699
4673
  const { endIndex: o, size: s, startIndex: i } = r;
@@ -4702,7 +4676,7 @@ function Fx(e, t) {
4702
4676
  continue;
4703
4677
  }
4704
4678
  const a = ds(e, i - 1, o + 1);
4705
- if (a.some(Kx(r)))
4679
+ if (a.some(Vx(r)))
4706
4680
  continue;
4707
4681
  let l = !1, u = !1;
4708
4682
  for (const { end: d, start: f, value: h } of a)
@@ -4711,10 +4685,10 @@ function Fx(e, t) {
4711
4685
  }
4712
4686
  return [e, n];
4713
4687
  }
4714
- function zx(e) {
4688
+ function Fx(e) {
4715
4689
  return typeof e.groupIndex < "u";
4716
4690
  }
4717
- function Bx({ offset: e }, t) {
4691
+ function zx({ offset: e }, t) {
4718
4692
  return t === e ? 0 : t < e ? -1 : 1;
4719
4693
  }
4720
4694
  function Wr(e, t, n) {
@@ -4732,7 +4706,7 @@ function ku(e, t) {
4732
4706
  return e + n;
4733
4707
  }
4734
4708
  function Eu(e, t, n) {
4735
- if (zx(e))
4709
+ if (Fx(e))
4736
4710
  return t.groupIndices[e.groupIndex] + 1;
4737
4711
  {
4738
4712
  const r = e.index === "LAST" ? n : e.index;
@@ -4740,10 +4714,10 @@ function Eu(e, t, n) {
4740
4714
  return o = Math.max(0, o, Math.min(n, o)), o;
4741
4715
  }
4742
4716
  }
4743
- function Hx(e, t, n, r = 0) {
4744
- return r > 0 && (t = Math.max(t, Ru(e, r, la).offset)), wu(Lx(e, t, n, Bx), Vx);
4717
+ function Bx(e, t, n, r = 0) {
4718
+ return r > 0 && (t = Math.max(t, Ru(e, r, la).offset)), wu(Dx(e, t, n, zx), Wx);
4745
4719
  }
4746
- function Ux(e, [t, n, r, o]) {
4720
+ function Hx(e, [t, n, r, o]) {
4747
4721
  t.length > 0 && r("received item sizes", t, Et.DEBUG);
4748
4722
  const s = e.sizeTree;
4749
4723
  let i = s, a = 0;
@@ -4751,7 +4725,7 @@ function Ux(e, [t, n, r, o]) {
4751
4725
  const h = t[0].size, p = t[1].size;
4752
4726
  i = n.reduce((w, v) => jt(jt(w, v, h), v + 1, p), i);
4753
4727
  } else
4754
- [i, a] = Fx(i, t);
4728
+ [i, a] = $x(i, t);
4755
4729
  if (i === s)
4756
4730
  return e;
4757
4731
  const { lastIndex: l, lastOffset: u, lastSize: d, offsetTree: f } = _i(e.offsetTree, a, i, o);
@@ -4765,7 +4739,7 @@ function Ux(e, [t, n, r, o]) {
4765
4739
  sizeTree: i
4766
4740
  };
4767
4741
  }
4768
- function Wx(e) {
4742
+ function Ux(e) {
4769
4743
  return Hn(e).map(({ k: t, v: n }, r, o) => {
4770
4744
  const s = o[r + 1];
4771
4745
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
@@ -4800,20 +4774,20 @@ function _i(e, t, n, r) {
4800
4774
  offsetTree: o
4801
4775
  };
4802
4776
  }
4803
- function Vx(e) {
4777
+ function Wx(e) {
4804
4778
  return { index: e.index, value: e };
4805
4779
  }
4806
- function Kx(e) {
4780
+ function Vx(e) {
4807
4781
  const { endIndex: t, size: n, startIndex: r } = e;
4808
4782
  return (o) => o.start === r && (o.end === t || o.end === 1 / 0) && o.value === n;
4809
4783
  }
4810
- const qx = {
4784
+ const Kx = {
4811
4785
  offsetHeight: "height",
4812
4786
  offsetWidth: "width"
4813
4787
  }, dn = Ve(
4814
4788
  ([{ log: e }, { recalcInProgress: t }]) => {
4815
- const n = Be(), r = Be(), o = yt(r, 0), s = Be(), i = Be(), a = Z(0), l = Z([]), u = Z(void 0), d = Z(void 0), f = Z((C, T) => Tn(C, qx[T])), h = Z(void 0), p = Z(0), w = $x(), v = yt(
4816
- U(n, De(l, e, p), sn(Ux, w), nt()),
4789
+ const n = Be(), r = Be(), o = yt(r, 0), s = Be(), i = Be(), a = Z(0), l = Z([]), u = Z(void 0), d = Z(void 0), f = Z((C, T) => Tn(C, Kx[T])), h = Z(void 0), p = Z(0), w = Lx(), v = yt(
4790
+ U(n, De(l, e, p), sn(Hx, w), nt()),
4817
4791
  w
4818
4792
  ), g = yt(
4819
4793
  U(
@@ -5046,7 +5020,7 @@ const qx = {
5046
5020
  rt(An, aa),
5047
5021
  { singleton: !0 }
5048
5022
  );
5049
- function Gx(e) {
5023
+ function qx(e) {
5050
5024
  return e.reduce(
5051
5025
  (t, n) => (t.groupIndices.push(t.totalCount), t.totalCount += n + 1, t),
5052
5026
  {
@@ -5057,7 +5031,7 @@ function Gx(e) {
5057
5031
  }
5058
5032
  const Iu = Ve(
5059
5033
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
5060
- const s = Be(), i = Be(), a = _t(U(s, oe(Gx)));
5034
+ const s = Be(), i = Be(), a = _t(U(s, oe(qx)));
5061
5035
  return fe(
5062
5036
  U(
5063
5037
  a,
@@ -5097,10 +5071,10 @@ const Iu = Ve(
5097
5071
  },
5098
5072
  rt(An),
5099
5073
  { singleton: !0 }
5100
- ), Yx = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
5074
+ ), Gx = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
5101
5075
  function Nu(e) {
5102
5076
  const t = typeof e == "number" ? { index: e } : e;
5103
- return t.align || (t.align = "start"), (!t.behavior || !Yx) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
5077
+ return t.align || (t.align = "start"), (!t.behavior || !Gx) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
5104
5078
  }
5105
5079
  const no = Ve(
5106
5080
  ([
@@ -5148,7 +5122,7 @@ const no = Ve(
5148
5122
  pe(ue);
5149
5123
  });
5150
5124
  } else
5151
- g = qt(U(t, Xx(150)), pe);
5125
+ g = qt(U(t, Yx(150)), pe);
5152
5126
  return x = setTimeout(() => {
5153
5127
  S();
5154
5128
  }, 1200), _e(l, !0), D("scrolling from index to", { behavior: J, index: F, top: B }, Et.DEBUG), { behavior: J, top: B };
@@ -5165,7 +5139,7 @@ const no = Ve(
5165
5139
  rt(dn, Ct, An),
5166
5140
  { singleton: !0 }
5167
5141
  );
5168
- function Xx(e) {
5142
+ function Yx(e) {
5169
5143
  return (t) => {
5170
5144
  const n = setTimeout(() => {
5171
5145
  t(!1);
@@ -5231,7 +5205,7 @@ const ro = Ve(
5231
5205
  function Au(e, t) {
5232
5206
  return Math.abs(e - t) < 1.01;
5233
5207
  }
5234
- const Vr = "up", Mr = "down", Jx = "none", Zx = {
5208
+ const Vr = "up", Mr = "down", Xx = "none", Jx = {
5235
5209
  atBottom: !1,
5236
5210
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
5237
5211
  state: {
@@ -5240,8 +5214,8 @@ const Vr = "up", Mr = "down", Jx = "none", Zx = {
5240
5214
  scrollTop: 0,
5241
5215
  viewportHeight: 0
5242
5216
  }
5243
- }, Qx = 0, oo = Ve(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
5244
- const i = Z(!1), a = Z(!0), l = Be(), u = Be(), d = Z(4), f = Z(Qx), h = yt(
5217
+ }, Zx = 0, oo = Ve(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
5218
+ const i = Z(!1), a = Z(!0), l = Be(), u = Be(), d = Z(4), f = Z(Zx), h = yt(
5245
5219
  U(
5246
5220
  Ii(U(Re(o), qn(1), rn(!0)), U(Re(o), qn(1), rn(!1), El(100))),
5247
5221
  nt()
@@ -5283,7 +5257,7 @@ const Vr = "up", Mr = "down", Jx = "none", Zx = {
5283
5257
  notAtBottomBecause: D,
5284
5258
  state: j
5285
5259
  };
5286
- }, Zx),
5260
+ }, Jx),
5287
5261
  nt((y, S) => y && y.atBottom === S.atBottom)
5288
5262
  )
5289
5263
  ), v = yt(
@@ -5340,7 +5314,7 @@ const Vr = "up", Mr = "down", Jx = "none", Zx = {
5340
5314
  oe((y) => y.direction)
5341
5315
  ),
5342
5316
  g
5343
- ), fe(U(r, mn(50), rn(Jx)), g);
5317
+ ), fe(U(r, mn(50), rn(Xx)), g);
5344
5318
  const x = Z(0);
5345
5319
  return fe(
5346
5320
  U(
@@ -5434,7 +5408,7 @@ const da = Ve(
5434
5408
  rt(Ct),
5435
5409
  { singleton: !0 }
5436
5410
  );
5437
- function ev(e, t, n) {
5411
+ function Qx(e, t, n) {
5438
5412
  if (fs(t)) {
5439
5413
  const r = ku(e, t);
5440
5414
  return [
@@ -5571,7 +5545,7 @@ const er = Ve(
5571
5545
  return $ === 0 ? { ...Qs, totalCount: I } : ju($, j, A, W, P, Y || []);
5572
5546
  if (Ze(z))
5573
5547
  return $ > 0 ? null : ko(
5574
- ev(ua(j, I), K, Y),
5548
+ Qx(ua(j, I), K, Y),
5575
5549
  [],
5576
5550
  I,
5577
5551
  P,
@@ -5590,7 +5564,7 @@ const er = Ve(
5590
5564
  }
5591
5565
  if (!D)
5592
5566
  return ko([], F, I, P, K, W);
5593
- const B = L.length > 0 ? L[L.length - 1] + 1 : 0, pe = Hx(J, T, k, B);
5567
+ const B = L.length > 0 ? L[L.length - 1] + 1 : 0, pe = Bx(J, T, k, B);
5594
5568
  if (pe.length === 0)
5595
5569
  return null;
5596
5570
  const ue = I - 1, ee = us([], (Ie) => {
@@ -5706,7 +5680,7 @@ const er = Ve(
5706
5680
  },
5707
5681
  rt(Ct, er),
5708
5682
  { singleton: !0 }
5709
- ), tv = Ve(
5683
+ ), ev = Ve(
5710
5684
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
5711
5685
  const n = Z(!1), r = yt(
5712
5686
  U(
@@ -5724,7 +5698,7 @@ const er = Ve(
5724
5698
  { singleton: !0 }
5725
5699
  ), Pu = Ve(() => ({
5726
5700
  context: Z(null)
5727
- })), nv = ({
5701
+ })), tv = ({
5728
5702
  itemBottom: e,
5729
5703
  itemTop: t,
5730
5704
  locationParams: { align: n, behavior: r, ...o },
@@ -5743,7 +5717,7 @@ const er = Ve(
5743
5717
  De(t, l, n, s, o, r, a),
5744
5718
  De(e),
5745
5719
  oe(([[f, h, p, w, v, g, x, y], S]) => {
5746
- const { align: R, behavior: C, calculateViewLocation: T = nv, done: k, ...I } = f, A = Eu(f, h, w - 1), j = Wr(A, h.offsetTree, S) + v + g, D = j + Gt(h.sizeTree, A)[1], L = y + g, W = y + p - x, P = T({
5720
+ const { align: R, behavior: C, calculateViewLocation: T = tv, done: k, ...I } = f, A = Eu(f, h, w - 1), j = Wr(A, h.offsetTree, S) + v + g, D = j + Gt(h.sizeTree, A)[1], L = y + g, W = y + p - x, P = T({
5747
5721
  itemBottom: D,
5748
5722
  itemTop: j,
5749
5723
  locationParams: { align: R, behavior: C, ...I },
@@ -5774,7 +5748,7 @@ const er = Ve(
5774
5748
  function Ml(e) {
5775
5749
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
5776
5750
  }
5777
- const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5751
+ const nv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), rv = Ve(
5778
5752
  ([
5779
5753
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
5780
5754
  { atBottomState: o, isAtBottom: s },
@@ -5801,7 +5775,7 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5801
5775
  De(Re(w), s, a, f),
5802
5776
  oe(([[C, T], k, I, A, j]) => {
5803
5777
  let D = T && A, L = "auto";
5804
- return D && (L = rv(k, I || j), D = D && !!L), { followOutputBehavior: L, shouldFollow: D, totalCount: C };
5778
+ return D && (L = nv(k, I || j), D = D && !!L), { followOutputBehavior: L, shouldFollow: D, totalCount: C };
5805
5779
  }),
5806
5780
  ke(({ shouldFollow: C }) => C)
5807
5781
  ),
@@ -5879,7 +5853,7 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5879
5853
  Pu,
5880
5854
  Ou
5881
5855
  )
5882
- ), sv = Ve(
5856
+ ), ov = Ve(
5883
5857
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (fe(
5884
5858
  U(
5885
5859
  a,
@@ -5892,7 +5866,7 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5892
5866
  ), {}),
5893
5867
  rt(dn, ro, er, jn),
5894
5868
  { singleton: !0 }
5895
- ), iv = Ve(
5869
+ ), sv = Ve(
5896
5870
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5897
5871
  const r = Z(0);
5898
5872
  return Ye(
@@ -5983,7 +5957,7 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5983
5957
  windowScrollTo: o,
5984
5958
  windowViewportRect: r
5985
5959
  };
5986
- }, rt(Ct)), av = Ve(
5960
+ }, rt(Ct)), iv = Ve(
5987
5961
  ([
5988
5962
  { sizeRanges: e, sizes: t },
5989
5963
  { headerHeight: n, scrollTop: r },
@@ -5998,10 +5972,10 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
5998
5972
  De(t, r, i, f, h, n)
5999
5973
  ),
6000
5974
  ([p, w, v, g, x, y, S]) => {
6001
- const R = Wx(w.sizeTree);
5975
+ const R = Ux(w.sizeTree);
6002
5976
  g && x !== null && y !== null && (v = x.scrollTop - y.offsetTop), v -= S, p({ ranges: R, scrollTop: v });
6003
5977
  }
6004
- ), fe(U(d, ke(oa), oe(lv)), o), fe(
5978
+ ), fe(U(d, ke(oa), oe(av)), o), fe(
6005
5979
  U(
6006
5980
  s,
6007
5981
  De(d),
@@ -6017,10 +5991,10 @@ const rv = (e, t) => typeof e == "function" ? Ml(e(t)) : t && Ml(e), ov = Ve(
6017
5991
  },
6018
5992
  rt(dn, Ct, ro, jn, fa)
6019
5993
  );
6020
- function lv(e) {
5994
+ function av(e) {
6021
5995
  return { align: "start", index: 0, offset: e.scrollTop };
6022
5996
  }
6023
- const cv = Ve(([{ topItemsIndexes: e }]) => {
5997
+ const lv = Ve(([{ topItemsIndexes: e }]) => {
6024
5998
  const t = Z(0);
6025
5999
  return fe(
6026
6000
  U(
@@ -6035,7 +6009,7 @@ function Du(e) {
6035
6009
  let t = !1, n;
6036
6010
  return () => (t || (t = !0, n = e()), n);
6037
6011
  }
6038
- const uv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), dv = Ve(
6012
+ const cv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), uv = Ve(
6039
6013
  ([
6040
6014
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
6041
6015
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -6066,7 +6040,7 @@ const uv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6066
6040
  x > 0 ? (_e(t, { behavior: "auto", top: -x }), _e(e, 0)) : (_e(e, 0), _e(t, { behavior: "auto", top: -x }));
6067
6041
  }
6068
6042
  return Ye(U(v, De(e, s)), ([x, y, S]) => {
6069
- S && uv() ? _e(e, y - x) : g(-x);
6043
+ S && cv() ? _e(e, y - x) : g(-x);
6070
6044
  }), Ye(
6071
6045
  U(
6072
6046
  dt(yt(s, !1), e, w),
@@ -6114,7 +6088,7 @@ const uv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6114
6088
  ), { deviation: e };
6115
6089
  },
6116
6090
  rt(Ct, oo, er, dn, An, aa)
6117
- ), fv = Ve(
6091
+ ), dv = Ve(
6118
6092
  ([
6119
6093
  e,
6120
6094
  t,
@@ -6142,12 +6116,12 @@ const uv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6142
6116
  }),
6143
6117
  rt(
6144
6118
  da,
6145
- sv,
6119
+ ov,
6146
6120
  jn,
6147
6121
  Mu,
6148
6122
  _u,
6149
- iv,
6150
- tv,
6123
+ sv,
6124
+ ev,
6151
6125
  fa,
6152
6126
  Ou,
6153
6127
  An,
@@ -6220,17 +6194,17 @@ const uv = Du(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6220
6194
  dn,
6221
6195
  ro,
6222
6196
  Ct,
6223
- av,
6224
- ov,
6197
+ iv,
6198
+ rv,
6225
6199
  er,
6226
6200
  no,
6227
- dv,
6228
- cv,
6201
+ uv,
6202
+ lv,
6229
6203
  Iu,
6230
- fv
6204
+ dv
6231
6205
  )
6232
6206
  );
6233
- function hv(e, t) {
6207
+ function fv(e, t) {
6234
6208
  const n = {}, r = {};
6235
6209
  let o = 0;
6236
6210
  const s = e.length;
@@ -6263,10 +6237,10 @@ function $u(e, t, n) {
6263
6237
  }, x), {});
6264
6238
  }
6265
6239
  function d(g) {
6266
- return i.reduce((x, y) => (x[y] = Nx(g[t.events[y]]), x), {});
6240
+ return i.reduce((x, y) => (x[y] = Ix(g[t.events[y]]), x), {});
6267
6241
  }
6268
6242
  const f = V.forwardRef((g, x) => {
6269
- const { children: y, ...S } = g, [R] = V.useState(() => us(jx(e), (k) => {
6243
+ const { children: y, ...S } = g, [R] = V.useState(() => us(Ax(e), (k) => {
6270
6244
  l(k, S);
6271
6245
  })), [C] = V.useState(kl(d, R));
6272
6246
  uo(() => {
@@ -6279,7 +6253,7 @@ function $u(e, t, n) {
6279
6253
  l(R, S);
6280
6254
  }), V.useImperativeHandle(x, Rl(u(R)));
6281
6255
  const T = n;
6282
- return /* @__PURE__ */ c.jsx(a.Provider, { value: R, children: n ? /* @__PURE__ */ c.jsx(T, { ...hv([...r, ...o, ...i], S), children: y }) : y });
6256
+ return /* @__PURE__ */ c.jsx(a.Provider, { value: R, children: n ? /* @__PURE__ */ c.jsx(T, { ...fv([...r, ...o, ...i], S), children: y }) : y });
6283
6257
  }), h = (g) => {
6284
6258
  const x = V.useContext(a);
6285
6259
  return V.useCallback(
@@ -6321,7 +6295,7 @@ const Fu = V.createContext(void 0), zu = V.createContext(void 0), Bu = typeof do
6321
6295
  function ei(e) {
6322
6296
  return "self" in e;
6323
6297
  }
6324
- function pv(e) {
6298
+ function hv(e) {
6325
6299
  return "body" in e;
6326
6300
  }
6327
6301
  function Hu(e, t, n, r = Rr, o, s) {
@@ -6329,7 +6303,7 @@ function Hu(e, t, n, r = Rr, o, s) {
6329
6303
  (h) => {
6330
6304
  let p, w, v;
6331
6305
  const g = h.target;
6332
- if (pv(g) || ei(g)) {
6306
+ if (hv(g) || ei(g)) {
6333
6307
  const y = ei(g) ? g : g.defaultView;
6334
6308
  v = s ? y.scrollX : y.scrollY, p = s ? y.document.documentElement.scrollWidth : y.document.documentElement.scrollHeight, w = s ? y.innerWidth : y.innerHeight;
6335
6309
  } else
@@ -6384,7 +6358,7 @@ const ti = "-webkit-sticky", Dl = "sticky", ha = Du(() => {
6384
6358
  function pa(e) {
6385
6359
  return e;
6386
6360
  }
6387
- const mv = /* @__PURE__ */ Ve(() => {
6361
+ const pv = /* @__PURE__ */ Ve(() => {
6388
6362
  const e = Z((a) => `Item ${a}`), t = Z((a) => `Group ${a}`), n = Z({}), r = Z(pa), o = Z("div"), s = Z(Rr), i = (a, l = null) => yt(
6389
6363
  U(
6390
6364
  n,
@@ -6410,11 +6384,11 @@ const mv = /* @__PURE__ */ Ve(() => {
6410
6384
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
6411
6385
  TopItemListComponent: i("TopItemList")
6412
6386
  };
6413
- }), gv = /* @__PURE__ */ Ve(
6387
+ }), mv = /* @__PURE__ */ Ve(
6414
6388
  ([e, t]) => ({ ...e, ...t }),
6415
- rt(Lu, mv)
6416
- ), xv = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), vv = { overflowAnchor: "none", position: ha(), zIndex: 1 }, Uu = { overflowAnchor: "none" }, wv = { ...Uu, display: "inline-block", height: "100%" }, Ll = /* @__PURE__ */ V.memo(function({ showTopList: e = !1 }) {
6417
- const t = Ae("listState"), n = zt("sizeRanges"), r = Ae("useWindowScroll"), o = Ae("customScrollParent"), s = zt("windowScrollContainerState"), i = zt("scrollContainerState"), a = o || r ? s : i, l = Ae("itemContent"), u = Ae("context"), d = Ae("groupContent"), f = Ae("trackItemSizes"), h = Ae("itemSize"), p = Ae("log"), w = zt("gap"), v = Ae("horizontalDirection"), { callbackRef: g } = Ox(
6389
+ rt(Lu, pv)
6390
+ ), gv = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), xv = { overflowAnchor: "none", position: ha(), zIndex: 1 }, Uu = { overflowAnchor: "none" }, vv = { ...Uu, display: "inline-block", height: "100%" }, Ll = /* @__PURE__ */ V.memo(function({ showTopList: e = !1 }) {
6391
+ const t = Ae("listState"), n = zt("sizeRanges"), r = Ae("useWindowScroll"), o = Ae("customScrollParent"), s = zt("windowScrollContainerState"), i = zt("scrollContainerState"), a = o || r ? s : i, l = Ae("itemContent"), u = Ae("context"), d = Ae("groupContent"), f = Ae("trackItemSizes"), h = Ae("itemSize"), p = Ae("log"), w = zt("gap"), v = Ae("horizontalDirection"), { callbackRef: g } = Px(
6418
6392
  n,
6419
6393
  h,
6420
6394
  f,
@@ -6428,7 +6402,7 @@ const mv = /* @__PURE__ */ Ve(() => {
6428
6402
  ma("deviation", (P) => {
6429
6403
  x !== P && y(P);
6430
6404
  });
6431
- const S = Ae("EmptyPlaceholder"), R = Ae("ScrollSeekPlaceholder") || xv, C = Ae("ListComponent"), T = Ae("ItemComponent"), k = Ae("GroupComponent"), I = Ae("computeItemKey"), A = Ae("isSeeking"), j = Ae("groupIndices").length > 0, D = Ae("alignToBottom"), L = Ae("initialItemFinalLocationReached"), W = e ? {} : {
6405
+ const S = Ae("EmptyPlaceholder"), R = Ae("ScrollSeekPlaceholder") || gv, C = Ae("ListComponent"), T = Ae("ItemComponent"), k = Ae("GroupComponent"), I = Ae("computeItemKey"), A = Ae("isSeeking"), j = Ae("groupIndices").length > 0, D = Ae("alignToBottom"), L = Ae("initialItemFinalLocationReached"), W = e ? {} : {
6432
6406
  boxSizing: "border-box",
6433
6407
  ...v ? {
6434
6408
  display: "inline-block",
@@ -6471,33 +6445,33 @@ const mv = /* @__PURE__ */ Ve(() => {
6471
6445
  "data-item-index": P.index,
6472
6446
  "data-known-size": P.size,
6473
6447
  key: K,
6474
- style: vv
6448
+ style: xv
6475
6449
  },
6476
6450
  d(P.index, u)
6477
6451
  ) : /* @__PURE__ */ bo(
6478
6452
  T,
6479
6453
  {
6480
6454
  ...bt(T, u),
6481
- ...Cv(T, P.data),
6455
+ ...Sv(T, P.data),
6482
6456
  "data-index": Y,
6483
6457
  "data-item-group-index": P.groupIndex,
6484
6458
  "data-item-index": P.index,
6485
6459
  "data-known-size": P.size,
6486
6460
  key: K,
6487
- style: v ? wv : Uu
6461
+ style: v ? vv : Uu
6488
6462
  },
6489
6463
  j ? l(P.index, P.groupIndex, P.data, u) : l(P.index, P.data, u)
6490
6464
  );
6491
6465
  })
6492
6466
  }
6493
6467
  );
6494
- }), bv = {
6468
+ }), wv = {
6495
6469
  height: "100%",
6496
6470
  outline: "none",
6497
6471
  overflowY: "auto",
6498
6472
  position: "relative",
6499
6473
  WebkitOverflowScrolling: "touch"
6500
- }, yv = {
6474
+ }, bv = {
6501
6475
  outline: "none",
6502
6476
  overflowX: "auto",
6503
6477
  position: "relative"
@@ -6507,7 +6481,7 @@ const mv = /* @__PURE__ */ Ve(() => {
6507
6481
  top: 0,
6508
6482
  width: "100%",
6509
6483
  ...e ? { display: "flex", flexDirection: "column" } : {}
6510
- }), Sv = {
6484
+ }), yv = {
6511
6485
  position: ha(),
6512
6486
  top: 0,
6513
6487
  width: "100%",
@@ -6517,10 +6491,10 @@ function bt(e, t) {
6517
6491
  if (typeof e != "string")
6518
6492
  return { context: t };
6519
6493
  }
6520
- function Cv(e, t) {
6494
+ function Sv(e, t) {
6521
6495
  return { item: typeof e == "string" ? void 0 : t };
6522
6496
  }
6523
- const Tv = /* @__PURE__ */ V.memo(function() {
6497
+ const Cv = /* @__PURE__ */ V.memo(function() {
6524
6498
  const e = Ae("HeaderComponent"), t = zt("headerHeight"), n = Ae("HeaderFooterTag"), r = Qn(
6525
6499
  V.useMemo(
6526
6500
  () => (s) => {
@@ -6532,7 +6506,7 @@ const Tv = /* @__PURE__ */ V.memo(function() {
6532
6506
  Ae("skipAnimationFrameInResizeObserver")
6533
6507
  ), o = Ae("context");
6534
6508
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...bt(e, o) }) }) : null;
6535
- }), Rv = /* @__PURE__ */ V.memo(function() {
6509
+ }), Tv = /* @__PURE__ */ V.memo(function() {
6536
6510
  const e = Ae("FooterComponent"), t = zt("footerHeight"), n = Ae("HeaderFooterTag"), r = Qn(
6537
6511
  V.useMemo(
6538
6512
  () => (s) => {
@@ -6561,7 +6535,7 @@ function Wu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
6561
6535
  "data-testid": "virtuoso-scroller",
6562
6536
  "data-virtuoso-scroller": !0,
6563
6537
  ref: p,
6564
- style: { ...f ? yv : bv, ...o },
6538
+ style: { ...f ? bv : wv, ...o },
6565
6539
  tabIndex: 0,
6566
6540
  ...i,
6567
6541
  ...bt(l, s),
@@ -6597,7 +6571,7 @@ function Vu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
6597
6571
  );
6598
6572
  });
6599
6573
  }
6600
- const kv = ({ children: e }) => {
6574
+ const Rv = ({ children: e }) => {
6601
6575
  const t = V.useContext(Fu), n = zt("viewportHeight"), r = zt("fixedItemHeight"), o = Ae("alignToBottom"), s = Ae("horizontalDirection"), i = V.useMemo(
6602
6576
  () => gu(n, (l) => Tn(l, s ? "width" : "height")),
6603
6577
  [n, s]
@@ -6605,7 +6579,7 @@ const kv = ({ children: e }) => {
6605
6579
  return V.useEffect(() => {
6606
6580
  t && (n(t.viewportHeight), r(t.itemHeight));
6607
6581
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { "data-viewport-type": "element", ref: a, style: hs(o), children: e });
6608
- }, Ev = ({ children: e }) => {
6582
+ }, kv = ({ children: e }) => {
6609
6583
  const t = V.useContext(Fu), n = zt("windowViewportRect"), r = zt("fixedItemHeight"), o = Ae("customScrollParent"), s = vu(
6610
6584
  n,
6611
6585
  o,
@@ -6614,26 +6588,26 @@ const kv = ({ children: e }) => {
6614
6588
  return V.useEffect(() => {
6615
6589
  t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
6616
6590
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { "data-viewport-type": "window", ref: s, style: hs(i), children: e });
6617
- }, Iv = ({ children: e }) => {
6618
- const t = Ae("TopItemListComponent") || "div", n = Ae("headerHeight"), r = { ...Sv, marginTop: `${n}px` }, o = Ae("context");
6591
+ }, Ev = ({ children: e }) => {
6592
+ const t = Ae("TopItemListComponent") || "div", n = Ae("headerHeight"), r = { ...yv, marginTop: `${n}px` }, o = Ae("context");
6619
6593
  return /* @__PURE__ */ c.jsx(t, { style: r, ...bt(t, o), children: e });
6620
- }, Nv = /* @__PURE__ */ V.memo(function(e) {
6594
+ }, Iv = /* @__PURE__ */ V.memo(function(e) {
6621
6595
  const t = Ae("useWindowScroll"), n = Ae("topItemsIndexes").length > 0, r = Ae("customScrollParent"), o = Ae("context");
6622
- return /* @__PURE__ */ c.jsxs(r || t ? _v : jv, { ...e, context: o, children: [
6623
- n && /* @__PURE__ */ c.jsx(Iv, { children: /* @__PURE__ */ c.jsx(Ll, { showTopList: !0 }) }),
6624
- /* @__PURE__ */ c.jsxs(r || t ? Ev : kv, { children: [
6625
- /* @__PURE__ */ c.jsx(Tv, {}),
6596
+ return /* @__PURE__ */ c.jsxs(r || t ? jv : Av, { ...e, context: o, children: [
6597
+ n && /* @__PURE__ */ c.jsx(Ev, { children: /* @__PURE__ */ c.jsx(Ll, { showTopList: !0 }) }),
6598
+ /* @__PURE__ */ c.jsxs(r || t ? kv : Rv, { children: [
6599
+ /* @__PURE__ */ c.jsx(Cv, {}),
6626
6600
  /* @__PURE__ */ c.jsx(Ll, {}),
6627
- /* @__PURE__ */ c.jsx(Rv, {})
6601
+ /* @__PURE__ */ c.jsx(Tv, {})
6628
6602
  ] })
6629
6603
  ] });
6630
6604
  }), {
6631
- Component: Av,
6605
+ Component: Nv,
6632
6606
  useEmitter: ma,
6633
6607
  useEmitterValue: Ae,
6634
6608
  usePublisher: zt
6635
6609
  } = /* @__PURE__ */ $u(
6636
- gv,
6610
+ mv,
6637
6611
  {
6638
6612
  required: {},
6639
6613
  optional: {
@@ -6690,8 +6664,8 @@ const kv = ({ children: e }) => {
6690
6664
  groupIndices: "groupIndices"
6691
6665
  }
6692
6666
  },
6693
- Nv
6694
- ), jv = /* @__PURE__ */ Wu({ useEmitter: ma, useEmitterValue: Ae, usePublisher: zt }), _v = /* @__PURE__ */ Vu({ useEmitter: ma, useEmitterValue: Ae, usePublisher: zt }), Pv = Av, Ov = /* @__PURE__ */ Ve(() => {
6667
+ Iv
6668
+ ), Av = /* @__PURE__ */ Wu({ useEmitter: ma, useEmitterValue: Ae, usePublisher: zt }), jv = /* @__PURE__ */ Vu({ useEmitter: ma, useEmitterValue: Ae, usePublisher: zt }), _v = Nv, Pv = /* @__PURE__ */ Ve(() => {
6695
6669
  const e = Z((u) => /* @__PURE__ */ c.jsxs("td", { children: [
6696
6670
  "Item $",
6697
6671
  u
@@ -6727,7 +6701,7 @@ const kv = ({ children: e }) => {
6727
6701
  GroupComponent: l("Group", "tr")
6728
6702
  };
6729
6703
  });
6730
- rt(Lu, Ov);
6704
+ rt(Lu, Pv);
6731
6705
  ha();
6732
6706
  const $l = {
6733
6707
  bottom: 0,
@@ -6737,7 +6711,7 @@ const $l = {
6737
6711
  offsetBottom: 0,
6738
6712
  offsetTop: 0,
6739
6713
  top: 0
6740
- }, Mv = {
6714
+ }, Ov = {
6741
6715
  bottom: 0,
6742
6716
  itemHeight: 0,
6743
6717
  items: [{ index: 0 }],
@@ -6749,19 +6723,19 @@ const $l = {
6749
6723
  function Bl(e, t, n) {
6750
6724
  return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
6751
6725
  }
6752
- function Dv(e) {
6726
+ function Mv(e) {
6753
6727
  return {
6754
- ...Mv,
6728
+ ...Ov,
6755
6729
  items: e
6756
6730
  };
6757
6731
  }
6758
6732
  function fo(e, t) {
6759
6733
  return e && e.width === t.width && e.height === t.height;
6760
6734
  }
6761
- function Lv(e, t) {
6735
+ function Dv(e, t) {
6762
6736
  return e && e.column === t.column && e.row === t.row;
6763
6737
  }
6764
- const $v = /* @__PURE__ */ Ve(
6738
+ const Lv = /* @__PURE__ */ Ve(
6765
6739
  ([
6766
6740
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
6767
6741
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: l, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: f },
@@ -6838,7 +6812,7 @@ const $v = /* @__PURE__ */ Ve(
6838
6812
  dt(
6839
6813
  Re(T),
6840
6814
  r,
6841
- Re(Y, Lv),
6815
+ Re(Y, Dv),
6842
6816
  Re(j, fo),
6843
6817
  Re(A, fo),
6844
6818
  Re(P),
@@ -6866,7 +6840,7 @@ const $v = /* @__PURE__ */ Ve(
6866
6840
  return $l;
6867
6841
  if (ft === 0) {
6868
6842
  const gt = ua(Pe, O), It = gt + Math.max(We - 1, 0);
6869
- return Dv(Bl(gt, It, Ke));
6843
+ return Mv(Bl(gt, It, Ke));
6870
6844
  }
6871
6845
  const ae = Ku(ne, ft, et);
6872
6846
  let de, Ne;
@@ -7022,7 +6996,7 @@ function Pi(e, t, n, r) {
7022
6996
  const o = Ku(e.width, n.width, t.column), s = Bo(r / o), i = s * n.height + Dr(0, s - 1) * t.row;
7023
6997
  return i > 0 ? i + t.row : i;
7024
6998
  }
7025
- const Fv = /* @__PURE__ */ Ve(() => {
6999
+ const $v = /* @__PURE__ */ Ve(() => {
7026
7000
  const e = Z((f) => `Item ${f}`), t = Z({}), n = Z(null), r = Z("virtuoso-grid-item"), o = Z("virtuoso-grid-list"), s = Z(pa), i = Z("div"), a = Z(Rr), l = (f, h = null) => yt(
7027
7001
  U(
7028
7002
  t,
@@ -7049,10 +7023,10 @@ const Fv = /* @__PURE__ */ Ve(() => {
7049
7023
  scrollerRef: a,
7050
7024
  ScrollSeekPlaceholder: l("ScrollSeekPlaceholder", "div")
7051
7025
  };
7052
- }), zv = /* @__PURE__ */ Ve(
7026
+ }), Fv = /* @__PURE__ */ Ve(
7053
7027
  ([e, t]) => ({ ...e, ...t }),
7054
- rt($v, Fv)
7055
- ), Bv = /* @__PURE__ */ V.memo(function() {
7028
+ rt(Lv, $v)
7029
+ ), zv = /* @__PURE__ */ V.memo(function() {
7056
7030
  const e = st("gridState"), t = st("listClassName"), n = st("itemClassName"), r = st("itemContent"), o = st("computeItemKey"), s = st("isSeeking"), i = Bt("scrollHeight"), a = st("ItemComponent"), l = st("ListComponent"), u = st("ScrollSeekPlaceholder"), d = st("context"), f = Bt("itemDimensions"), h = Bt("gap"), p = st("log"), w = st("stateRestoreInProgress"), v = Bt("reportReadyState"), g = Qn(
7057
7031
  V.useMemo(
7058
7032
  () => (x) => {
@@ -7107,7 +7081,7 @@ const Fv = /* @__PURE__ */ Ve(() => {
7107
7081
  })
7108
7082
  }
7109
7083
  );
7110
- }), Hv = V.memo(function() {
7084
+ }), Bv = V.memo(function() {
7111
7085
  const e = st("HeaderComponent"), t = Bt("headerHeight"), n = st("headerFooterTag"), r = Qn(
7112
7086
  V.useMemo(
7113
7087
  () => (s) => {
@@ -7119,7 +7093,7 @@ const Fv = /* @__PURE__ */ Ve(() => {
7119
7093
  !1
7120
7094
  ), o = st("context");
7121
7095
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...bt(e, o) }) }) : null;
7122
- }), Uv = V.memo(function() {
7096
+ }), Hv = V.memo(function() {
7123
7097
  const e = st("FooterComponent"), t = Bt("footerHeight"), n = st("headerFooterTag"), r = Qn(
7124
7098
  V.useMemo(
7125
7099
  () => (s) => {
@@ -7131,7 +7105,7 @@ const Fv = /* @__PURE__ */ Ve(() => {
7131
7105
  !1
7132
7106
  ), o = st("context");
7133
7107
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...bt(e, o) }) }) : null;
7134
- }), Wv = ({ children: e }) => {
7108
+ }), Uv = ({ children: e }) => {
7135
7109
  const t = V.useContext(zu), n = Bt("itemDimensions"), r = Bt("viewportDimensions"), o = Qn(
7136
7110
  V.useMemo(
7137
7111
  () => (s) => {
@@ -7145,24 +7119,24 @@ const Fv = /* @__PURE__ */ Ve(() => {
7145
7119
  return V.useEffect(() => {
7146
7120
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
7147
7121
  }, [t, r, n]), /* @__PURE__ */ c.jsx("div", { ref: o, style: hs(!1), children: e });
7148
- }, Vv = ({ children: e }) => {
7122
+ }, Wv = ({ children: e }) => {
7149
7123
  const t = V.useContext(zu), n = Bt("windowViewportRect"), r = Bt("itemDimensions"), o = st("customScrollParent"), s = vu(n, o, !1);
7150
7124
  return V.useEffect(() => {
7151
7125
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
7152
7126
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { ref: s, style: hs(!1), children: e });
7153
- }, Kv = /* @__PURE__ */ V.memo(function({ ...e }) {
7154
- const t = st("useWindowScroll"), n = st("customScrollParent"), r = n || t ? Gv : qv, o = n || t ? Vv : Wv, s = st("context");
7127
+ }, Vv = /* @__PURE__ */ V.memo(function({ ...e }) {
7128
+ const t = st("useWindowScroll"), n = st("customScrollParent"), r = n || t ? qv : Kv, o = n || t ? Wv : Uv, s = st("context");
7155
7129
  return /* @__PURE__ */ c.jsx(r, { ...e, ...bt(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
7156
- /* @__PURE__ */ c.jsx(Hv, {}),
7157
7130
  /* @__PURE__ */ c.jsx(Bv, {}),
7158
- /* @__PURE__ */ c.jsx(Uv, {})
7131
+ /* @__PURE__ */ c.jsx(zv, {}),
7132
+ /* @__PURE__ */ c.jsx(Hv, {})
7159
7133
  ] }) });
7160
7134
  }), {
7161
7135
  useEmitter: qu,
7162
7136
  useEmitterValue: st,
7163
7137
  usePublisher: Bt
7164
7138
  } = /* @__PURE__ */ $u(
7165
- zv,
7139
+ Fv,
7166
7140
  {
7167
7141
  optional: {
7168
7142
  context: "context",
@@ -7201,12 +7175,12 @@ const Fv = /* @__PURE__ */ Ve(() => {
7201
7175
  readyStateChanged: "readyStateChanged"
7202
7176
  }
7203
7177
  },
7204
- Kv
7205
- ), qv = /* @__PURE__ */ Wu({ useEmitter: qu, useEmitterValue: st, usePublisher: Bt }), Gv = /* @__PURE__ */ Vu({ useEmitter: qu, useEmitterValue: st, usePublisher: Bt });
7178
+ Vv
7179
+ ), Kv = /* @__PURE__ */ Wu({ useEmitter: qu, useEmitterValue: st, usePublisher: Bt }), qv = /* @__PURE__ */ Vu({ useEmitter: qu, useEmitterValue: st, usePublisher: Bt });
7206
7180
  function Ul(e, t, n) {
7207
7181
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Et.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
7208
7182
  }
7209
- const Yv = ns(
7183
+ const Gv = ns(
7210
7184
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
7211
7185
  {
7212
7186
  variants: {
@@ -7223,7 +7197,7 @@ const Yv = ns(
7223
7197
  }
7224
7198
  );
7225
7199
  function Oi({ className: e, variant: t, ...n }) {
7226
- return /* @__PURE__ */ c.jsx("div", { className: te(Yv({ variant: t }), e), ...n });
7200
+ return /* @__PURE__ */ c.jsx("div", { className: te(Gv({ variant: t }), e), ...n });
7227
7201
  }
7228
7202
  function le(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
7229
7203
  return function(o) {
@@ -7231,7 +7205,7 @@ function le(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
7231
7205
  return t == null ? void 0 : t(o);
7232
7206
  };
7233
7207
  }
7234
- function Xv(e, t) {
7208
+ function Yv(e, t) {
7235
7209
  const n = m.createContext(t), r = (s) => {
7236
7210
  const { children: i, ...a } = s, l = m.useMemo(() => a, Object.values(a));
7237
7211
  return /* @__PURE__ */ c.jsx(n.Provider, { value: l, children: i });
@@ -7275,9 +7249,9 @@ function fn(e, t = []) {
7275
7249
  );
7276
7250
  };
7277
7251
  };
7278
- return o.scopeName = e, [r, Jv(o, ...t)];
7252
+ return o.scopeName = e, [r, Xv(o, ...t)];
7279
7253
  }
7280
- function Jv(...e) {
7254
+ function Xv(...e) {
7281
7255
  const t = e[0];
7282
7256
  if (e.length === 1) return t;
7283
7257
  const n = () => {
@@ -7296,7 +7270,7 @@ function Jv(...e) {
7296
7270
  return n.scopeName = t.scopeName, n;
7297
7271
  }
7298
7272
  var pt = globalThis != null && globalThis.document ? m.useLayoutEffect : () => {
7299
- }, Zv = m[" useInsertionEffect ".trim().toString()] || pt;
7273
+ }, Jv = m[" useInsertionEffect ".trim().toString()] || pt;
7300
7274
  function Gn({
7301
7275
  prop: e,
7302
7276
  defaultProp: t,
@@ -7304,7 +7278,7 @@ function Gn({
7304
7278
  },
7305
7279
  caller: r
7306
7280
  }) {
7307
- const [o, s, i] = Qv({
7281
+ const [o, s, i] = Zv({
7308
7282
  defaultProp: t,
7309
7283
  onChange: n
7310
7284
  }), a = e !== void 0, l = a ? e : o;
@@ -7321,7 +7295,7 @@ function Gn({
7321
7295
  (d) => {
7322
7296
  var f;
7323
7297
  if (a) {
7324
- const h = ew(d) ? d(e) : d;
7298
+ const h = Qv(d) ? d(e) : d;
7325
7299
  h !== e && ((f = i.current) == null || f.call(i, h));
7326
7300
  } else
7327
7301
  s(d);
@@ -7330,19 +7304,19 @@ function Gn({
7330
7304
  );
7331
7305
  return [l, u];
7332
7306
  }
7333
- function Qv({
7307
+ function Zv({
7334
7308
  defaultProp: e,
7335
7309
  onChange: t
7336
7310
  }) {
7337
7311
  const [n, r] = m.useState(e), o = m.useRef(n), s = m.useRef(t);
7338
- return Zv(() => {
7312
+ return Jv(() => {
7339
7313
  s.current = t;
7340
7314
  }, [t]), m.useEffect(() => {
7341
7315
  var i;
7342
7316
  o.current !== n && ((i = s.current) == null || i.call(s, n), o.current = n);
7343
7317
  }, [n, o]), [n, r, s];
7344
7318
  }
7345
- function ew(e) {
7319
+ function Qv(e) {
7346
7320
  return typeof e == "function";
7347
7321
  }
7348
7322
  function Wl(e, t) {
@@ -7369,7 +7343,7 @@ function ga(...e) {
7369
7343
  function ze(...e) {
7370
7344
  return m.useCallback(ga(...e), e);
7371
7345
  }
7372
- var tw = [
7346
+ var ew = [
7373
7347
  "a",
7374
7348
  "button",
7375
7349
  "div",
@@ -7387,7 +7361,7 @@ var tw = [
7387
7361
  "span",
7388
7362
  "svg",
7389
7363
  "ul"
7390
- ], Ee = tw.reduce((e, t) => {
7364
+ ], Ee = ew.reduce((e, t) => {
7391
7365
  const n = vr(`Primitive.${t}`), r = m.forwardRef((o, s) => {
7392
7366
  const { asChild: i, ...a } = o, l = i ? n : t;
7393
7367
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c.jsx(l, { ...a, ref: s });
@@ -7397,16 +7371,16 @@ var tw = [
7397
7371
  function Gu(e, t) {
7398
7372
  e && rs.flushSync(() => e.dispatchEvent(t));
7399
7373
  }
7400
- function nw(e, t) {
7374
+ function tw(e, t) {
7401
7375
  return m.useReducer((n, r) => t[n][r] ?? n, e);
7402
7376
  }
7403
7377
  var Ot = (e) => {
7404
- const { present: t, children: n } = e, r = rw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : m.Children.only(n), s = ze(r.ref, ow(o));
7378
+ const { present: t, children: n } = e, r = nw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : m.Children.only(n), s = ze(r.ref, rw(o));
7405
7379
  return typeof n == "function" || r.isPresent ? m.cloneElement(o, { ref: s }) : null;
7406
7380
  };
7407
7381
  Ot.displayName = "Presence";
7408
- function rw(e) {
7409
- const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), s = m.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = nw(i, {
7382
+ function nw(e) {
7383
+ const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), s = m.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = tw(i, {
7410
7384
  mounted: {
7411
7385
  UNMOUNT: "unmounted",
7412
7386
  ANIMATION_OUT: "unmountSuspended"
@@ -7457,20 +7431,20 @@ function rw(e) {
7457
7431
  function ho(e) {
7458
7432
  return (e == null ? void 0 : e.animationName) || "none";
7459
7433
  }
7460
- function ow(e) {
7434
+ function rw(e) {
7461
7435
  var r, o;
7462
7436
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
7463
7437
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
7464
7438
  }
7465
- var sw = m[" useId ".trim().toString()] || (() => {
7466
- }), iw = 0;
7439
+ var ow = m[" useId ".trim().toString()] || (() => {
7440
+ }), sw = 0;
7467
7441
  function ln(e) {
7468
- const [t, n] = m.useState(sw());
7442
+ const [t, n] = m.useState(ow());
7469
7443
  return pt(() => {
7470
- n((r) => r ?? String(iw++));
7444
+ n((r) => r ?? String(sw++));
7471
7445
  }, [e]), e || (t ? `radix-${t}` : "");
7472
7446
  }
7473
- var ps = "Collapsible", [aw, WT] = fn(ps), [lw, xa] = aw(ps), Yu = m.forwardRef(
7447
+ var ps = "Collapsible", [iw, UT] = fn(ps), [aw, xa] = iw(ps), Yu = m.forwardRef(
7474
7448
  (e, t) => {
7475
7449
  const {
7476
7450
  __scopeCollapsible: n,
@@ -7486,7 +7460,7 @@ var ps = "Collapsible", [aw, WT] = fn(ps), [lw, xa] = aw(ps), Yu = m.forwardRef(
7486
7460
  caller: ps
7487
7461
  });
7488
7462
  return /* @__PURE__ */ c.jsx(
7489
- lw,
7463
+ aw,
7490
7464
  {
7491
7465
  scope: n,
7492
7466
  disabled: s,
@@ -7527,14 +7501,14 @@ var Xu = "CollapsibleTrigger", Ju = m.forwardRef(
7527
7501
  }
7528
7502
  );
7529
7503
  Ju.displayName = Xu;
7530
- var va = "CollapsibleContent", cw = m.forwardRef(
7504
+ var va = "CollapsibleContent", lw = m.forwardRef(
7531
7505
  (e, t) => {
7532
7506
  const { forceMount: n, ...r } = e, o = xa(va, e.__scopeCollapsible);
7533
- return /* @__PURE__ */ c.jsx(Ot, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(uw, { ...r, ref: t, present: s }) });
7507
+ return /* @__PURE__ */ c.jsx(Ot, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(cw, { ...r, ref: t, present: s }) });
7534
7508
  }
7535
7509
  );
7536
- cw.displayName = va;
7537
- var uw = m.forwardRef((e, t) => {
7510
+ lw.displayName = va;
7511
+ var cw = m.forwardRef((e, t) => {
7538
7512
  const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = xa(va, n), [a, l] = m.useState(r), u = m.useRef(null), d = ze(t, u), f = m.useRef(0), h = f.current, p = m.useRef(0), w = p.current, v = i.open || a, g = m.useRef(v), x = m.useRef(void 0);
7539
7513
  return m.useEffect(() => {
7540
7514
  const y = requestAnimationFrame(() => g.current = !1);
@@ -7570,8 +7544,8 @@ var uw = m.forwardRef((e, t) => {
7570
7544
  function wa(e) {
7571
7545
  return e ? "open" : "closed";
7572
7546
  }
7573
- var dw = Yu;
7574
- const Vl = dw, Kl = Ju, Lr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
7547
+ var uw = Yu;
7548
+ const Vl = uw, Kl = Ju, Lr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
7575
7549
  "div",
7576
7550
  {
7577
7551
  ref: n,
@@ -7649,50 +7623,50 @@ function ed() {
7649
7623
  };
7650
7624
  }
7651
7625
  let tr = ed();
7652
- function fw(e) {
7626
+ function dw(e) {
7653
7627
  tr = e;
7654
7628
  }
7655
- const td = /[&<>"']/, hw = new RegExp(td.source, "g"), nd = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, pw = new RegExp(nd.source, "g"), mw = {
7629
+ const td = /[&<>"']/, fw = new RegExp(td.source, "g"), nd = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, hw = new RegExp(nd.source, "g"), pw = {
7656
7630
  "&": "&amp;",
7657
7631
  "<": "&lt;",
7658
7632
  ">": "&gt;",
7659
7633
  '"': "&quot;",
7660
7634
  "'": "&#39;"
7661
- }, ql = (e) => mw[e];
7635
+ }, ql = (e) => pw[e];
7662
7636
  function vt(e, t) {
7663
7637
  if (t) {
7664
7638
  if (td.test(e))
7665
- return e.replace(hw, ql);
7639
+ return e.replace(fw, ql);
7666
7640
  } else if (nd.test(e))
7667
- return e.replace(pw, ql);
7641
+ return e.replace(hw, ql);
7668
7642
  return e;
7669
7643
  }
7670
- const gw = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
7644
+ const mw = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
7671
7645
  function rd(e) {
7672
- return e.replace(gw, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
7646
+ return e.replace(mw, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
7673
7647
  }
7674
- const xw = /(^|[^\[])\^/g;
7648
+ const gw = /(^|[^\[])\^/g;
7675
7649
  function Qe(e, t) {
7676
7650
  e = typeof e == "string" ? e : e.source, t = t || "";
7677
7651
  const n = {
7678
- replace: (r, o) => (o = o.source || o, o = o.replace(xw, "$1"), e = e.replace(r, o), n),
7652
+ replace: (r, o) => (o = o.source || o, o = o.replace(gw, "$1"), e = e.replace(r, o), n),
7679
7653
  getRegex: () => new RegExp(e, t)
7680
7654
  };
7681
7655
  return n;
7682
7656
  }
7683
- const vw = /[^\w:]/g, ww = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
7657
+ const xw = /[^\w:]/g, vw = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
7684
7658
  function Gl(e, t, n) {
7685
7659
  if (e) {
7686
7660
  let r;
7687
7661
  try {
7688
- r = decodeURIComponent(rd(n)).replace(vw, "").toLowerCase();
7662
+ r = decodeURIComponent(rd(n)).replace(xw, "").toLowerCase();
7689
7663
  } catch {
7690
7664
  return null;
7691
7665
  }
7692
7666
  if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0)
7693
7667
  return null;
7694
7668
  }
7695
- t && !ww.test(n) && (n = Cw(t, n));
7669
+ t && !vw.test(n) && (n = Sw(t, n));
7696
7670
  try {
7697
7671
  n = encodeURI(n).replace(/%25/g, "%");
7698
7672
  } catch {
@@ -7700,11 +7674,11 @@ function Gl(e, t, n) {
7700
7674
  }
7701
7675
  return n;
7702
7676
  }
7703
- const po = {}, bw = /^[^:]+:\/*[^/]*$/, yw = /^([^:]+:)[\s\S]*$/, Sw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
7704
- function Cw(e, t) {
7705
- po[" " + e] || (bw.test(e) ? po[" " + e] = e + "/" : po[" " + e] = Io(e, "/", !0)), e = po[" " + e];
7677
+ const po = {}, ww = /^[^:]+:\/*[^/]*$/, bw = /^([^:]+:)[\s\S]*$/, yw = /^([^:]+:\/*[^/]*)[\s\S]*$/;
7678
+ function Sw(e, t) {
7679
+ po[" " + e] || (ww.test(e) ? po[" " + e] = e + "/" : po[" " + e] = Io(e, "/", !0)), e = po[" " + e];
7706
7680
  const n = e.indexOf(":") === -1;
7707
- return t.substring(0, 2) === "//" ? n ? t : e.replace(yw, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(Sw, "$1") + t : e + t;
7681
+ return t.substring(0, 2) === "//" ? n ? t : e.replace(bw, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(yw, "$1") + t : e + t;
7708
7682
  }
7709
7683
  const Ho = { exec: function() {
7710
7684
  } };
@@ -7739,7 +7713,7 @@ function Io(e, t, n) {
7739
7713
  }
7740
7714
  return e.slice(0, r - o);
7741
7715
  }
7742
- function Tw(e, t) {
7716
+ function Cw(e, t) {
7743
7717
  if (e.indexOf(t[1]) === -1)
7744
7718
  return -1;
7745
7719
  const n = e.length;
@@ -7753,7 +7727,7 @@ function Tw(e, t) {
7753
7727
  return o;
7754
7728
  return -1;
7755
7729
  }
7756
- function Rw(e) {
7730
+ function Tw(e) {
7757
7731
  e && e.sanitize && !e.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options");
7758
7732
  }
7759
7733
  function Xl(e, t) {
@@ -7786,7 +7760,7 @@ function Jl(e, t, n, r) {
7786
7760
  text: vt(i)
7787
7761
  };
7788
7762
  }
7789
- function kw(e, t) {
7763
+ function Rw(e, t) {
7790
7764
  const n = e.match(/^(\s+)(?:```)/);
7791
7765
  if (n === null)
7792
7766
  return t;
@@ -7829,7 +7803,7 @@ class ba {
7829
7803
  fences(t) {
7830
7804
  const n = this.rules.block.fences.exec(t);
7831
7805
  if (n) {
7832
- const r = n[0], o = kw(r, n[3] || "");
7806
+ const r = n[0], o = Rw(r, n[3] || "");
7833
7807
  return {
7834
7808
  type: "code",
7835
7809
  raw: r,
@@ -8054,7 +8028,7 @@ class ba {
8054
8028
  if ((r.length - i.length) % 2 === 0)
8055
8029
  return;
8056
8030
  } else {
8057
- const i = Tw(n[2], "()");
8031
+ const i = Cw(n[2], "()");
8058
8032
  if (i > -1) {
8059
8033
  const l = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + i;
8060
8034
  n[2] = n[2].substring(0, i), n[0] = n[0].substring(0, l).trim(), n[3] = "";
@@ -8342,7 +8316,7 @@ se.breaks = {
8342
8316
  br: Qe(se.br).replace("{2,}", "*").getRegex(),
8343
8317
  text: Qe(se.gfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
8344
8318
  };
8345
- function Ew(e) {
8319
+ function kw(e) {
8346
8320
  return e.replace(/---/g, "—").replace(/--/g, "–").replace(/(^|[-\u2014/(\[{"\s])'/g, "$1‘").replace(/'/g, "’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1“").replace(/"/g, "”").replace(/\.{3}/g, "…");
8347
8321
  }
8348
8322
  function Zl(e) {
@@ -8556,7 +8530,7 @@ class Rn {
8556
8530
  h = p.call({ lexer: this }, f), typeof h == "number" && h >= 0 && (d = Math.min(d, h));
8557
8531
  }), d < 1 / 0 && d >= 0 && (s = t.substring(0, d + 1));
8558
8532
  }
8559
- if (r = this.tokenizer.inlineText(s, Ew)) {
8533
+ if (r = this.tokenizer.inlineText(s, kw)) {
8560
8534
  t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), l = !0, o = n[n.length - 1], o && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r);
8561
8535
  continue;
8562
8536
  }
@@ -8980,7 +8954,7 @@ Ya(Uo, "passThroughHooks", /* @__PURE__ */ new Set([
8980
8954
  "preprocess",
8981
8955
  "postprocess"
8982
8956
  ]));
8983
- function Iw(e, t, n) {
8957
+ function Ew(e, t, n) {
8984
8958
  return (r) => {
8985
8959
  if (r.message += `
8986
8960
  Please report this to https://github.com/markedjs/marked.`, e) {
@@ -9007,12 +8981,12 @@ function id(e, t) {
9007
8981
  typeof r == "function" && (o = r, r = null);
9008
8982
  const s = { ...r };
9009
8983
  r = { ...be.defaults, ...s };
9010
- const i = Iw(r.silent, r.async, o);
8984
+ const i = Ew(r.silent, r.async, o);
9011
8985
  if (typeof n > "u" || n === null)
9012
8986
  return i(new Error("marked(): input parameter is undefined or null"));
9013
8987
  if (typeof n != "string")
9014
8988
  return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
9015
- if (Rw(r), r.hooks && (r.hooks.options = r), o) {
8989
+ if (Tw(r), r.hooks && (r.hooks.options = r), o) {
9016
8990
  const a = r.highlight;
9017
8991
  let l;
9018
8992
  try {
@@ -9060,7 +9034,7 @@ function be(e, t, n) {
9060
9034
  return id(Rn.lex, kn.parse)(e, t, n);
9061
9035
  }
9062
9036
  be.options = be.setOptions = function(e) {
9063
- return be.defaults = { ...be.defaults, ...e }, fw(be.defaults), be;
9037
+ return be.defaults = { ...be.defaults, ...e }, dw(be.defaults), be;
9064
9038
  };
9065
9039
  be.getDefaults = ed;
9066
9040
  be.defaults = tr;
@@ -9213,7 +9187,7 @@ async function ad(e, t) {
9213
9187
  async function ec(e, t) {
9214
9188
  return await (await ad(`/files/${e}/view`, t)).text();
9215
9189
  }
9216
- async function Nw(e, t) {
9190
+ async function Iw(e, t) {
9217
9191
  const n = await ad(`/files/${e}/download`, t), r = URL.createObjectURL(n);
9218
9192
  let o = `file_${e}`;
9219
9193
  try {
@@ -9224,13 +9198,13 @@ async function Nw(e, t) {
9224
9198
  const s = document.createElement("a");
9225
9199
  s.href = r, s.download = o, document.body.appendChild(s), s.click(), s.remove(), setTimeout(() => URL.revokeObjectURL(r), 6e4);
9226
9200
  }
9227
- async function Aw(e, t = 50, n = 0) {
9201
+ async function Nw(e, t = 50, n = 0) {
9228
9202
  const r = { limit: t, offset: n };
9229
9203
  return e && (r.thread_id = e), await Ft("/files", { params: r });
9230
9204
  }
9231
- const jw = 1, _w = 1e6;
9205
+ const Aw = 1, jw = 1e6;
9232
9206
  let ri = 0;
9233
- function Pw() {
9207
+ function _w() {
9234
9208
  return ri = (ri + 1) % Number.MAX_SAFE_INTEGER, ri.toString();
9235
9209
  }
9236
9210
  const oi = /* @__PURE__ */ new Map(), tc = (e) => {
@@ -9241,14 +9215,14 @@ const oi = /* @__PURE__ */ new Map(), tc = (e) => {
9241
9215
  type: "REMOVE_TOAST",
9242
9216
  toastId: e
9243
9217
  });
9244
- }, _w);
9218
+ }, jw);
9245
9219
  oi.set(e, t);
9246
- }, Ow = (e, t) => {
9220
+ }, Pw = (e, t) => {
9247
9221
  switch (t.type) {
9248
9222
  case "ADD_TOAST":
9249
9223
  return {
9250
9224
  ...e,
9251
- toasts: [t.toast, ...e.toasts].slice(0, jw)
9225
+ toasts: [t.toast, ...e.toasts].slice(0, Aw)
9252
9226
  };
9253
9227
  case "UPDATE_TOAST":
9254
9228
  return {
@@ -9283,12 +9257,12 @@ const oi = /* @__PURE__ */ new Map(), tc = (e) => {
9283
9257
  }, No = [];
9284
9258
  let Ao = { toasts: [] };
9285
9259
  function zr(e) {
9286
- Ao = Ow(Ao, e), No.forEach((t) => {
9260
+ Ao = Pw(Ao, e), No.forEach((t) => {
9287
9261
  t(Ao);
9288
9262
  });
9289
9263
  }
9290
- function Mw({ ...e }) {
9291
- const t = Pw(), n = (o) => zr({
9264
+ function Ow({ ...e }) {
9265
+ const t = _w(), n = (o) => zr({
9292
9266
  type: "UPDATE_TOAST",
9293
9267
  toast: { ...o, id: t }
9294
9268
  }), r = () => zr({ type: "DISMISS_TOAST", toastId: t });
@@ -9315,7 +9289,7 @@ function Sa() {
9315
9289
  n > -1 && No.splice(n, 1);
9316
9290
  }), [e]), {
9317
9291
  ...e,
9318
- toast: Mw,
9292
+ toast: Ow,
9319
9293
  dismiss: (n) => zr({ type: "DISMISS_TOAST", toastId: n })
9320
9294
  };
9321
9295
  }
@@ -9328,7 +9302,7 @@ function mt(e) {
9328
9302
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
9329
9303
  }, []);
9330
9304
  }
9331
- function Dw(e, t = globalThis == null ? void 0 : globalThis.document) {
9305
+ function Mw(e, t = globalThis == null ? void 0 : globalThis.document) {
9332
9306
  const n = mt(e);
9333
9307
  m.useEffect(() => {
9334
9308
  const r = (o) => {
@@ -9337,7 +9311,7 @@ function Dw(e, t = globalThis == null ? void 0 : globalThis.document) {
9337
9311
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
9338
9312
  }, [n, t]);
9339
9313
  }
9340
- var Lw = "DismissableLayer", Mi = "dismissableLayer.update", $w = "dismissableLayer.pointerDownOutside", Fw = "dismissableLayer.focusOutside", nc, ld = m.createContext({
9314
+ var Dw = "DismissableLayer", Mi = "dismissableLayer.update", Lw = "dismissableLayer.pointerDownOutside", $w = "dismissableLayer.focusOutside", nc, ld = m.createContext({
9341
9315
  layers: /* @__PURE__ */ new Set(),
9342
9316
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
9343
9317
  branches: /* @__PURE__ */ new Set()
@@ -9351,14 +9325,14 @@ var Lw = "DismissableLayer", Mi = "dismissableLayer.update", $w = "dismissableLa
9351
9325
  onInteractOutside: i,
9352
9326
  onDismiss: a,
9353
9327
  ...l
9354
- } = e, u = m.useContext(ld), [d, f] = m.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = m.useState({}), w = ze(t, (k) => f(k)), v = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(g), y = d ? v.indexOf(d) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, R = y >= x, C = Hw((k) => {
9328
+ } = e, u = m.useContext(ld), [d, f] = m.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = m.useState({}), w = ze(t, (k) => f(k)), v = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(g), y = d ? v.indexOf(d) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, R = y >= x, C = Bw((k) => {
9355
9329
  const I = k.target, A = [...u.branches].some((j) => j.contains(I));
9356
9330
  !R || A || (o == null || o(k), i == null || i(k), k.defaultPrevented || a == null || a());
9357
- }, h), T = Uw((k) => {
9331
+ }, h), T = Hw((k) => {
9358
9332
  const I = k.target;
9359
9333
  [...u.branches].some((j) => j.contains(I)) || (s == null || s(k), i == null || i(k), k.defaultPrevented || a == null || a());
9360
9334
  }, h);
9361
- return Dw((k) => {
9335
+ return Mw((k) => {
9362
9336
  y === u.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && a && (k.preventDefault(), a()));
9363
9337
  }, h), m.useEffect(() => {
9364
9338
  if (d)
@@ -9389,8 +9363,8 @@ var Lw = "DismissableLayer", Mi = "dismissableLayer.update", $w = "dismissableLa
9389
9363
  );
9390
9364
  }
9391
9365
  );
9392
- ms.displayName = Lw;
9393
- var zw = "DismissableLayerBranch", Bw = m.forwardRef((e, t) => {
9366
+ ms.displayName = Dw;
9367
+ var Fw = "DismissableLayerBranch", zw = m.forwardRef((e, t) => {
9394
9368
  const n = m.useContext(ld), r = m.useRef(null), o = ze(t, r);
9395
9369
  return m.useEffect(() => {
9396
9370
  const s = r.current;
@@ -9400,8 +9374,8 @@ var zw = "DismissableLayerBranch", Bw = m.forwardRef((e, t) => {
9400
9374
  };
9401
9375
  }, [n.branches]), /* @__PURE__ */ c.jsx(Ee.div, { ...e, ref: o });
9402
9376
  });
9403
- Bw.displayName = zw;
9404
- function Hw(e, t = globalThis == null ? void 0 : globalThis.document) {
9377
+ zw.displayName = Fw;
9378
+ function Bw(e, t = globalThis == null ? void 0 : globalThis.document) {
9405
9379
  const n = mt(e), r = m.useRef(!1), o = m.useRef(() => {
9406
9380
  });
9407
9381
  return m.useEffect(() => {
@@ -9409,7 +9383,7 @@ function Hw(e, t = globalThis == null ? void 0 : globalThis.document) {
9409
9383
  if (a.target && !r.current) {
9410
9384
  let l = function() {
9411
9385
  cd(
9412
- $w,
9386
+ Lw,
9413
9387
  n,
9414
9388
  u,
9415
9389
  { discrete: !0 }
@@ -9431,11 +9405,11 @@ function Hw(e, t = globalThis == null ? void 0 : globalThis.document) {
9431
9405
  onPointerDownCapture: () => r.current = !0
9432
9406
  };
9433
9407
  }
9434
- function Uw(e, t = globalThis == null ? void 0 : globalThis.document) {
9408
+ function Hw(e, t = globalThis == null ? void 0 : globalThis.document) {
9435
9409
  const n = mt(e), r = m.useRef(!1);
9436
9410
  return m.useEffect(() => {
9437
9411
  const o = (s) => {
9438
- s.target && !r.current && cd(Fw, n, { originalEvent: s }, {
9412
+ s.target && !r.current && cd($w, n, { originalEvent: s }, {
9439
9413
  discrete: !1
9440
9414
  });
9441
9415
  };
@@ -9453,7 +9427,7 @@ function cd(e, t, n, { discrete: r }) {
9453
9427
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
9454
9428
  t && o.addEventListener(e, t, { once: !0 }), r ? Gu(o, s) : o.dispatchEvent(s);
9455
9429
  }
9456
- var si = "focusScope.autoFocusOnMount", ii = "focusScope.autoFocusOnUnmount", oc = { bubbles: !1, cancelable: !0 }, Ww = "FocusScope", gs = m.forwardRef((e, t) => {
9430
+ var si = "focusScope.autoFocusOnMount", ii = "focusScope.autoFocusOnUnmount", oc = { bubbles: !1, cancelable: !0 }, Uw = "FocusScope", gs = m.forwardRef((e, t) => {
9457
9431
  const {
9458
9432
  loop: n = !1,
9459
9433
  trapped: r = !1,
@@ -9496,7 +9470,7 @@ var si = "focusScope.autoFocusOnMount", ii = "focusScope.autoFocusOnUnmount", oc
9496
9470
  const v = document.activeElement;
9497
9471
  if (!a.contains(v)) {
9498
9472
  const x = new CustomEvent(si, oc);
9499
- a.addEventListener(si, u), a.dispatchEvent(x), x.defaultPrevented || (Vw(Xw(ud(a)), { select: !0 }), document.activeElement === v && Sn(a));
9473
+ a.addEventListener(si, u), a.dispatchEvent(x), x.defaultPrevented || (Ww(Yw(ud(a)), { select: !0 }), document.activeElement === v && Sn(a));
9500
9474
  }
9501
9475
  return () => {
9502
9476
  a.removeEventListener(si, u), setTimeout(() => {
@@ -9511,7 +9485,7 @@ var si = "focusScope.autoFocusOnMount", ii = "focusScope.autoFocusOnUnmount", oc
9511
9485
  if (!n && !r || p.paused) return;
9512
9486
  const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, x = document.activeElement;
9513
9487
  if (g && x) {
9514
- const y = v.currentTarget, [S, R] = Kw(y);
9488
+ const y = v.currentTarget, [S, R] = Vw(y);
9515
9489
  S && R ? !v.shiftKey && x === R ? (v.preventDefault(), n && Sn(S, { select: !0 })) : v.shiftKey && x === S && (v.preventDefault(), n && Sn(R, { select: !0 })) : x === y && v.preventDefault();
9516
9490
  }
9517
9491
  },
@@ -9519,13 +9493,13 @@ var si = "focusScope.autoFocusOnMount", ii = "focusScope.autoFocusOnUnmount", oc
9519
9493
  );
9520
9494
  return /* @__PURE__ */ c.jsx(Ee.div, { tabIndex: -1, ...i, ref: h, onKeyDown: w });
9521
9495
  });
9522
- gs.displayName = Ww;
9523
- function Vw(e, { select: t = !1 } = {}) {
9496
+ gs.displayName = Uw;
9497
+ function Ww(e, { select: t = !1 } = {}) {
9524
9498
  const n = document.activeElement;
9525
9499
  for (const r of e)
9526
9500
  if (Sn(r, { select: t }), document.activeElement !== n) return;
9527
9501
  }
9528
- function Kw(e) {
9502
+ function Vw(e) {
9529
9503
  const t = ud(e), n = sc(t, e), r = sc(t.reverse(), e);
9530
9504
  return [n, r];
9531
9505
  }
@@ -9541,9 +9515,9 @@ function ud(e) {
9541
9515
  }
9542
9516
  function sc(e, t) {
9543
9517
  for (const n of e)
9544
- if (!qw(n, { upTo: t })) return n;
9518
+ if (!Kw(n, { upTo: t })) return n;
9545
9519
  }
9546
- function qw(e, { upTo: t }) {
9520
+ function Kw(e, { upTo: t }) {
9547
9521
  if (getComputedStyle(e).visibility === "hidden") return !0;
9548
9522
  for (; e; ) {
9549
9523
  if (t !== void 0 && e === t) return !1;
@@ -9552,17 +9526,17 @@ function qw(e, { upTo: t }) {
9552
9526
  }
9553
9527
  return !1;
9554
9528
  }
9555
- function Gw(e) {
9529
+ function qw(e) {
9556
9530
  return e instanceof HTMLInputElement && "select" in e;
9557
9531
  }
9558
9532
  function Sn(e, { select: t = !1 } = {}) {
9559
9533
  if (e && e.focus) {
9560
9534
  const n = document.activeElement;
9561
- e.focus({ preventScroll: !0 }), e !== n && Gw(e) && t && e.select();
9535
+ e.focus({ preventScroll: !0 }), e !== n && qw(e) && t && e.select();
9562
9536
  }
9563
9537
  }
9564
- var ic = Yw();
9565
- function Yw() {
9538
+ var ic = Gw();
9539
+ function Gw() {
9566
9540
  let e = [];
9567
9541
  return {
9568
9542
  add(t) {
@@ -9579,17 +9553,17 @@ function ac(e, t) {
9579
9553
  const n = [...e], r = n.indexOf(t);
9580
9554
  return r !== -1 && n.splice(r, 1), n;
9581
9555
  }
9582
- function Xw(e) {
9556
+ function Yw(e) {
9583
9557
  return e.filter((t) => t.tagName !== "A");
9584
9558
  }
9585
- var Jw = "Portal", xs = m.forwardRef((e, t) => {
9559
+ var Xw = "Portal", xs = m.forwardRef((e, t) => {
9586
9560
  var a;
9587
9561
  const { container: n, ...r } = e, [o, s] = m.useState(!1);
9588
9562
  pt(() => s(!0), []);
9589
9563
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
9590
9564
  return i ? Dc.createPortal(/* @__PURE__ */ c.jsx(Ee.div, { ...r, ref: t }), i) : null;
9591
9565
  });
9592
- xs.displayName = Jw;
9566
+ xs.displayName = Xw;
9593
9567
  var ai = 0;
9594
9568
  function Ca() {
9595
9569
  m.useEffect(() => {
@@ -9620,16 +9594,16 @@ function dd(e, t) {
9620
9594
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
9621
9595
  return n;
9622
9596
  }
9623
- function Zw(e, t, n) {
9597
+ function Jw(e, t, n) {
9624
9598
  if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++)
9625
9599
  (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
9626
9600
  return e.concat(s || Array.prototype.slice.call(t));
9627
9601
  }
9628
- var jo = "right-scroll-bar-position", _o = "width-before-scroll-bar", Qw = "with-scroll-bars-hidden", eb = "--removed-body-scroll-bar-size";
9602
+ var jo = "right-scroll-bar-position", _o = "width-before-scroll-bar", Zw = "with-scroll-bars-hidden", Qw = "--removed-body-scroll-bar-size";
9629
9603
  function li(e, t) {
9630
9604
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
9631
9605
  }
9632
- function tb(e, t) {
9606
+ function eb(e, t) {
9633
9607
  var n = xe(function() {
9634
9608
  return {
9635
9609
  // value
@@ -9650,14 +9624,14 @@ function tb(e, t) {
9650
9624
  })[0];
9651
9625
  return n.callback = t, n.facade;
9652
9626
  }
9653
- var nb = typeof window < "u" ? m.useLayoutEffect : m.useEffect, cc = /* @__PURE__ */ new WeakMap();
9654
- function rb(e, t) {
9655
- var n = tb(null, function(r) {
9627
+ var tb = typeof window < "u" ? m.useLayoutEffect : m.useEffect, cc = /* @__PURE__ */ new WeakMap();
9628
+ function nb(e, t) {
9629
+ var n = eb(null, function(r) {
9656
9630
  return e.forEach(function(o) {
9657
9631
  return li(o, r);
9658
9632
  });
9659
9633
  });
9660
- return nb(function() {
9634
+ return tb(function() {
9661
9635
  var r = cc.get(n);
9662
9636
  if (r) {
9663
9637
  var o = new Set(r), s = new Set(e), i = n.current;
@@ -9670,11 +9644,11 @@ function rb(e, t) {
9670
9644
  cc.set(n, e);
9671
9645
  }, [e]), n;
9672
9646
  }
9673
- function ob(e) {
9647
+ function rb(e) {
9674
9648
  return e;
9675
9649
  }
9676
- function sb(e, t) {
9677
- t === void 0 && (t = ob);
9650
+ function ob(e, t) {
9651
+ t === void 0 && (t = rb);
9678
9652
  var n = [], r = !1, o = {
9679
9653
  read: function() {
9680
9654
  if (r)
@@ -9728,9 +9702,9 @@ function sb(e, t) {
9728
9702
  };
9729
9703
  return o;
9730
9704
  }
9731
- function ib(e) {
9705
+ function sb(e) {
9732
9706
  e === void 0 && (e = {});
9733
- var t = sb(null);
9707
+ var t = ob(null);
9734
9708
  return t.options = on({ async: !0, ssr: !1 }, e), t;
9735
9709
  }
9736
9710
  var fd = function(e) {
@@ -9743,16 +9717,16 @@ var fd = function(e) {
9743
9717
  return m.createElement(r, on({}, n));
9744
9718
  };
9745
9719
  fd.isSideCarExport = !0;
9746
- function ab(e, t) {
9720
+ function ib(e, t) {
9747
9721
  return e.useMedium(t), fd;
9748
9722
  }
9749
- var hd = ib(), ci = function() {
9723
+ var hd = sb(), ci = function() {
9750
9724
  }, vs = m.forwardRef(function(e, t) {
9751
9725
  var n = m.useRef(null), r = m.useState({
9752
9726
  onScrollCapture: ci,
9753
9727
  onWheelCapture: ci,
9754
9728
  onTouchMoveCapture: ci
9755
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, w = e.noIsolation, v = e.inert, g = e.allowPinchZoom, x = e.as, y = x === void 0 ? "div" : x, S = e.gapMode, R = dd(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, T = rb([n, t]), k = on(on({}, R), o);
9729
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, w = e.noIsolation, v = e.inert, g = e.allowPinchZoom, x = e.as, y = x === void 0 ? "div" : x, S = e.gapMode, R = dd(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, T = nb([n, t]), k = on(on({}, R), o);
9756
9730
  return m.createElement(
9757
9731
  m.Fragment,
9758
9732
  null,
@@ -9769,37 +9743,37 @@ vs.classNames = {
9769
9743
  fullWidth: _o,
9770
9744
  zeroRight: jo
9771
9745
  };
9772
- var lb = function() {
9746
+ var ab = function() {
9773
9747
  if (typeof __webpack_nonce__ < "u")
9774
9748
  return __webpack_nonce__;
9775
9749
  };
9776
- function cb() {
9750
+ function lb() {
9777
9751
  if (!document)
9778
9752
  return null;
9779
9753
  var e = document.createElement("style");
9780
9754
  e.type = "text/css";
9781
- var t = lb();
9755
+ var t = ab();
9782
9756
  return t && e.setAttribute("nonce", t), e;
9783
9757
  }
9784
- function ub(e, t) {
9758
+ function cb(e, t) {
9785
9759
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
9786
9760
  }
9787
- function db(e) {
9761
+ function ub(e) {
9788
9762
  var t = document.head || document.getElementsByTagName("head")[0];
9789
9763
  t.appendChild(e);
9790
9764
  }
9791
- var fb = function() {
9765
+ var db = function() {
9792
9766
  var e = 0, t = null;
9793
9767
  return {
9794
9768
  add: function(n) {
9795
- e == 0 && (t = cb()) && (ub(t, n), db(t)), e++;
9769
+ e == 0 && (t = lb()) && (cb(t, n), ub(t)), e++;
9796
9770
  },
9797
9771
  remove: function() {
9798
9772
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
9799
9773
  }
9800
9774
  };
9801
- }, hb = function() {
9802
- var e = fb();
9775
+ }, fb = function() {
9776
+ var e = db();
9803
9777
  return function(t, n) {
9804
9778
  m.useEffect(function() {
9805
9779
  return e.add(t), function() {
@@ -9808,35 +9782,35 @@ var fb = function() {
9808
9782
  }, [t && n]);
9809
9783
  };
9810
9784
  }, pd = function() {
9811
- var e = hb(), t = function(n) {
9785
+ var e = fb(), t = function(n) {
9812
9786
  var r = n.styles, o = n.dynamic;
9813
9787
  return e(r, o), null;
9814
9788
  };
9815
9789
  return t;
9816
- }, pb = {
9790
+ }, hb = {
9817
9791
  left: 0,
9818
9792
  top: 0,
9819
9793
  right: 0,
9820
9794
  gap: 0
9821
9795
  }, ui = function(e) {
9822
9796
  return parseInt(e || "", 10) || 0;
9823
- }, mb = function(e) {
9797
+ }, pb = function(e) {
9824
9798
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
9825
9799
  return [ui(n), ui(r), ui(o)];
9826
- }, gb = function(e) {
9800
+ }, mb = function(e) {
9827
9801
  if (e === void 0 && (e = "margin"), typeof window > "u")
9828
- return pb;
9829
- var t = mb(e), n = document.documentElement.clientWidth, r = window.innerWidth;
9802
+ return hb;
9803
+ var t = pb(e), n = document.documentElement.clientWidth, r = window.innerWidth;
9830
9804
  return {
9831
9805
  left: t[0],
9832
9806
  top: t[1],
9833
9807
  right: t[2],
9834
9808
  gap: Math.max(0, r - n + t[2] - t[0])
9835
9809
  };
9836
- }, xb = pd(), mr = "data-scroll-locked", vb = function(e, t, n, r) {
9810
+ }, gb = pd(), mr = "data-scroll-locked", xb = function(e, t, n, r) {
9837
9811
  var o = e.left, s = e.top, i = e.right, a = e.gap;
9838
9812
  return n === void 0 && (n = "margin"), `
9839
- .`.concat(Qw, ` {
9813
+ .`.concat(Zw, ` {
9840
9814
  overflow: hidden `).concat(r, `;
9841
9815
  padding-right: `).concat(a, "px ").concat(r, `;
9842
9816
  }
@@ -9874,26 +9848,26 @@ var fb = function() {
9874
9848
  }
9875
9849
 
9876
9850
  body[`).concat(mr, `] {
9877
- `).concat(eb, ": ").concat(a, `px;
9851
+ `).concat(Qw, ": ").concat(a, `px;
9878
9852
  }
9879
9853
  `);
9880
9854
  }, uc = function() {
9881
9855
  var e = parseInt(document.body.getAttribute(mr) || "0", 10);
9882
9856
  return isFinite(e) ? e : 0;
9883
- }, wb = function() {
9857
+ }, vb = function() {
9884
9858
  m.useEffect(function() {
9885
9859
  return document.body.setAttribute(mr, (uc() + 1).toString()), function() {
9886
9860
  var e = uc() - 1;
9887
9861
  e <= 0 ? document.body.removeAttribute(mr) : document.body.setAttribute(mr, e.toString());
9888
9862
  };
9889
9863
  }, []);
9890
- }, bb = function(e) {
9864
+ }, wb = function(e) {
9891
9865
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
9892
- wb();
9866
+ vb();
9893
9867
  var s = m.useMemo(function() {
9894
- return gb(o);
9868
+ return mb(o);
9895
9869
  }, [o]);
9896
- return m.createElement(xb, { styles: vb(s, !t, o, n ? "" : "!important") });
9870
+ return m.createElement(gb, { styles: xb(s, !t, o, n ? "" : "!important") });
9897
9871
  }, Di = !1;
9898
9872
  if (typeof window < "u")
9899
9873
  try {
@@ -9906,7 +9880,7 @@ if (typeof window < "u")
9906
9880
  } catch {
9907
9881
  Di = !1;
9908
9882
  }
9909
- var lr = Di ? { passive: !1 } : !1, yb = function(e) {
9883
+ var lr = Di ? { passive: !1 } : !1, bb = function(e) {
9910
9884
  return e.tagName === "TEXTAREA";
9911
9885
  }, md = function(e, t) {
9912
9886
  if (!(e instanceof Element))
@@ -9915,11 +9889,11 @@ var lr = Di ? { passive: !1 } : !1, yb = function(e) {
9915
9889
  return (
9916
9890
  // not-not-scrollable
9917
9891
  n[t] !== "hidden" && // contains scroll inside self
9918
- !(n.overflowY === n.overflowX && !yb(e) && n[t] === "visible")
9892
+ !(n.overflowY === n.overflowX && !bb(e) && n[t] === "visible")
9919
9893
  );
9920
- }, Sb = function(e) {
9894
+ }, yb = function(e) {
9921
9895
  return md(e, "overflowY");
9922
- }, Cb = function(e) {
9896
+ }, Sb = function(e) {
9923
9897
  return md(e, "overflowX");
9924
9898
  }, dc = function(e, t) {
9925
9899
  var n = t.ownerDocument, r = t;
@@ -9934,14 +9908,14 @@ var lr = Di ? { passive: !1 } : !1, yb = function(e) {
9934
9908
  r = r.parentNode;
9935
9909
  } while (r && r !== n.body);
9936
9910
  return !1;
9937
- }, Tb = function(e) {
9911
+ }, Cb = function(e) {
9938
9912
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
9939
9913
  return [
9940
9914
  t,
9941
9915
  n,
9942
9916
  r
9943
9917
  ];
9944
- }, Rb = function(e) {
9918
+ }, Tb = function(e) {
9945
9919
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
9946
9920
  return [
9947
9921
  t,
@@ -9949,13 +9923,13 @@ var lr = Di ? { passive: !1 } : !1, yb = function(e) {
9949
9923
  r
9950
9924
  ];
9951
9925
  }, gd = function(e, t) {
9952
- return e === "v" ? Sb(t) : Cb(t);
9926
+ return e === "v" ? yb(t) : Sb(t);
9953
9927
  }, xd = function(e, t) {
9954
- return e === "v" ? Tb(t) : Rb(t);
9955
- }, kb = function(e, t) {
9928
+ return e === "v" ? Cb(t) : Tb(t);
9929
+ }, Rb = function(e, t) {
9956
9930
  return e === "h" && t === "rtl" ? -1 : 1;
9957
- }, Eb = function(e, t, n, r, o) {
9958
- var s = kb(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), u = !1, d = i > 0, f = 0, h = 0;
9931
+ }, kb = function(e, t, n, r, o) {
9932
+ var s = Rb(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), u = !1, d = i > 0, f = 0, h = 0;
9959
9933
  do {
9960
9934
  if (!a)
9961
9935
  break;
@@ -9975,22 +9949,22 @@ var lr = Di ? { passive: !1 } : !1, yb = function(e) {
9975
9949
  return [e.deltaX, e.deltaY];
9976
9950
  }, hc = function(e) {
9977
9951
  return e && "current" in e ? e.current : e;
9978
- }, Ib = function(e, t) {
9952
+ }, Eb = function(e, t) {
9979
9953
  return e[0] === t[0] && e[1] === t[1];
9980
- }, Nb = function(e) {
9954
+ }, Ib = function(e) {
9981
9955
  return `
9982
9956
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
9983
9957
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
9984
9958
  `);
9985
- }, Ab = 0, cr = [];
9986
- function jb(e) {
9987
- var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(Ab++)[0], s = m.useState(pd)[0], i = m.useRef(e);
9959
+ }, Nb = 0, cr = [];
9960
+ function Ab(e) {
9961
+ var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(Nb++)[0], s = m.useState(pd)[0], i = m.useRef(e);
9988
9962
  m.useEffect(function() {
9989
9963
  i.current = e;
9990
9964
  }, [e]), m.useEffect(function() {
9991
9965
  if (e.inert) {
9992
9966
  document.body.classList.add("block-interactivity-".concat(o));
9993
- var v = Zw([e.lockRef.current], (e.shards || []).map(hc), !0).filter(Boolean);
9967
+ var v = Jw([e.lockRef.current], (e.shards || []).map(hc), !0).filter(Boolean);
9994
9968
  return v.forEach(function(g) {
9995
9969
  return g.classList.add("allow-interactivity-".concat(o));
9996
9970
  }), function() {
@@ -10014,12 +9988,12 @@ function jb(e) {
10014
9988
  if (!r.current && "changedTouches" in v && (S || R) && (r.current = C), !C)
10015
9989
  return !0;
10016
9990
  var A = r.current || C;
10017
- return Eb(A, g, v, A === "h" ? S : R);
9991
+ return kb(A, g, v, A === "h" ? S : R);
10018
9992
  }, []), l = m.useCallback(function(v) {
10019
9993
  var g = v;
10020
9994
  if (!(!cr.length || cr[cr.length - 1] !== s)) {
10021
9995
  var x = "deltaY" in g ? fc(g) : go(g), y = t.current.filter(function(C) {
10022
- return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Ib(C.delta, x);
9996
+ return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Eb(C.delta, x);
10023
9997
  })[0];
10024
9998
  if (y && y.should) {
10025
9999
  g.cancelable && g.preventDefault();
@@ -10033,7 +10007,7 @@ function jb(e) {
10033
10007
  }
10034
10008
  }
10035
10009
  }, []), u = m.useCallback(function(v, g, x, y) {
10036
- var S = { name: v, delta: g, target: x, should: y, shadowParent: _b(x) };
10010
+ var S = { name: v, delta: g, target: x, should: y, shadowParent: jb(x) };
10037
10011
  t.current.push(S), setTimeout(function() {
10038
10012
  t.current = t.current.filter(function(R) {
10039
10013
  return R !== S;
@@ -10061,28 +10035,28 @@ function jb(e) {
10061
10035
  return m.createElement(
10062
10036
  m.Fragment,
10063
10037
  null,
10064
- w ? m.createElement(s, { styles: Nb(o) }) : null,
10065
- p ? m.createElement(bb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
10038
+ w ? m.createElement(s, { styles: Ib(o) }) : null,
10039
+ p ? m.createElement(wb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
10066
10040
  );
10067
10041
  }
10068
- function _b(e) {
10042
+ function jb(e) {
10069
10043
  for (var t = null; e !== null; )
10070
10044
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
10071
10045
  return t;
10072
10046
  }
10073
- const Pb = ab(hd, jb);
10047
+ const _b = ib(hd, Ab);
10074
10048
  var ws = m.forwardRef(function(e, t) {
10075
- return m.createElement(vs, on({}, e, { ref: t, sideCar: Pb }));
10049
+ return m.createElement(vs, on({}, e, { ref: t, sideCar: _b }));
10076
10050
  });
10077
10051
  ws.classNames = vs.classNames;
10078
- var Ob = function(e) {
10052
+ var Pb = function(e) {
10079
10053
  if (typeof document > "u")
10080
10054
  return null;
10081
10055
  var t = Array.isArray(e) ? e[0] : e;
10082
10056
  return t.ownerDocument.body;
10083
10057
  }, ur = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakMap(), vo = {}, di = 0, vd = function(e) {
10084
10058
  return e && (e.host || vd(e.parentNode));
10085
- }, Mb = function(e, t) {
10059
+ }, Ob = function(e, t) {
10086
10060
  return t.map(function(n) {
10087
10061
  if (e.contains(n))
10088
10062
  return n;
@@ -10091,8 +10065,8 @@ var Ob = function(e) {
10091
10065
  }).filter(function(n) {
10092
10066
  return !!n;
10093
10067
  });
10094
- }, Db = function(e, t, n, r) {
10095
- var o = Mb(t, Array.isArray(e) ? e : [e]);
10068
+ }, Mb = function(e, t, n, r) {
10069
+ var o = Ob(t, Array.isArray(e) ? e : [e]);
10096
10070
  vo[n] || (vo[n] = /* @__PURE__ */ new WeakMap());
10097
10071
  var s = vo[n], i = [], a = /* @__PURE__ */ new Set(), l = new Set(o), u = function(f) {
10098
10072
  !f || a.has(f) || (a.add(f), u(f.parentNode));
@@ -10119,11 +10093,11 @@ var Ob = function(e) {
10119
10093
  };
10120
10094
  }, Ta = function(e, t, n) {
10121
10095
  n === void 0 && (n = "data-aria-hidden");
10122
- var r = Array.from(Array.isArray(e) ? e : [e]), o = Ob(e);
10123
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Db(r, o, n, "aria-hidden")) : function() {
10096
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = Pb(e);
10097
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Mb(r, o, n, "aria-hidden")) : function() {
10124
10098
  return null;
10125
10099
  };
10126
- }, bs = "Dialog", [wd, VT] = fn(bs), [Lb, Zt] = wd(bs), bd = (e) => {
10100
+ }, bs = "Dialog", [wd, WT] = fn(bs), [Db, Zt] = wd(bs), bd = (e) => {
10127
10101
  const {
10128
10102
  __scopeDialog: t,
10129
10103
  children: n,
@@ -10138,7 +10112,7 @@ var Ob = function(e) {
10138
10112
  caller: bs
10139
10113
  });
10140
10114
  return /* @__PURE__ */ c.jsx(
10141
- Lb,
10115
+ Db,
10142
10116
  {
10143
10117
  scope: t,
10144
10118
  triggerRef: a,
@@ -10174,27 +10148,27 @@ var yd = "DialogTrigger", Sd = m.forwardRef(
10174
10148
  }
10175
10149
  );
10176
10150
  Sd.displayName = yd;
10177
- var Ra = "DialogPortal", [$b, Cd] = wd(Ra, {
10151
+ var Ra = "DialogPortal", [Lb, Cd] = wd(Ra, {
10178
10152
  forceMount: void 0
10179
10153
  }), Td = (e) => {
10180
10154
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Zt(Ra, t);
10181
- return /* @__PURE__ */ c.jsx($b, { scope: t, forceMount: n, children: m.Children.map(r, (i) => /* @__PURE__ */ c.jsx(Ot, { present: n || s.open, children: /* @__PURE__ */ c.jsx(xs, { asChild: !0, container: o, children: i }) })) });
10155
+ return /* @__PURE__ */ c.jsx(Lb, { scope: t, forceMount: n, children: m.Children.map(r, (i) => /* @__PURE__ */ c.jsx(Ot, { present: n || s.open, children: /* @__PURE__ */ c.jsx(xs, { asChild: !0, container: o, children: i }) })) });
10182
10156
  };
10183
10157
  Td.displayName = Ra;
10184
10158
  var Wo = "DialogOverlay", Rd = m.forwardRef(
10185
10159
  (e, t) => {
10186
10160
  const n = Cd(Wo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Zt(Wo, e.__scopeDialog);
10187
- return s.modal ? /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: /* @__PURE__ */ c.jsx(zb, { ...o, ref: t }) }) : null;
10161
+ return s.modal ? /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Fb, { ...o, ref: t }) }) : null;
10188
10162
  }
10189
10163
  );
10190
10164
  Rd.displayName = Wo;
10191
- var Fb = vr("DialogOverlay.RemoveScroll"), zb = m.forwardRef(
10165
+ var $b = vr("DialogOverlay.RemoveScroll"), Fb = m.forwardRef(
10192
10166
  (e, t) => {
10193
10167
  const { __scopeDialog: n, ...r } = e, o = Zt(Wo, n);
10194
10168
  return (
10195
10169
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
10196
10170
  // ie. when `Overlay` and `Content` are siblings
10197
- /* @__PURE__ */ c.jsx(ws, { as: Fb, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c.jsx(
10171
+ /* @__PURE__ */ c.jsx(ws, { as: $b, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c.jsx(
10198
10172
  Ee.div,
10199
10173
  {
10200
10174
  "data-state": Ea(o.open),
@@ -10208,11 +10182,11 @@ var Fb = vr("DialogOverlay.RemoveScroll"), zb = m.forwardRef(
10208
10182
  ), Yn = "DialogContent", kd = m.forwardRef(
10209
10183
  (e, t) => {
10210
10184
  const n = Cd(Yn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Zt(Yn, e.__scopeDialog);
10211
- return /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: s.modal ? /* @__PURE__ */ c.jsx(Bb, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(Hb, { ...o, ref: t }) });
10185
+ return /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: s.modal ? /* @__PURE__ */ c.jsx(zb, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(Bb, { ...o, ref: t }) });
10212
10186
  }
10213
10187
  );
10214
10188
  kd.displayName = Yn;
10215
- var Bb = m.forwardRef(
10189
+ var zb = m.forwardRef(
10216
10190
  (e, t) => {
10217
10191
  const n = Zt(Yn, e.__scopeDialog), r = m.useRef(null), o = ze(t, n.contentRef, r);
10218
10192
  return m.useEffect(() => {
@@ -10240,7 +10214,7 @@ var Bb = m.forwardRef(
10240
10214
  }
10241
10215
  );
10242
10216
  }
10243
- ), Hb = m.forwardRef(
10217
+ ), Bb = m.forwardRef(
10244
10218
  (e, t) => {
10245
10219
  const n = Zt(Yn, e.__scopeDialog), r = m.useRef(!1), o = m.useRef(!1);
10246
10220
  return /* @__PURE__ */ c.jsx(
@@ -10291,8 +10265,8 @@ var Bb = m.forwardRef(
10291
10265
  }
10292
10266
  ),
10293
10267
  /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
10294
- /* @__PURE__ */ c.jsx(Ub, { titleId: a.titleId }),
10295
- /* @__PURE__ */ c.jsx(Vb, { contentRef: l, descriptionId: a.descriptionId })
10268
+ /* @__PURE__ */ c.jsx(Hb, { titleId: a.titleId }),
10269
+ /* @__PURE__ */ c.jsx(Wb, { contentRef: l, descriptionId: a.descriptionId })
10296
10270
  ] })
10297
10271
  ] });
10298
10272
  }
@@ -10328,11 +10302,11 @@ _d.displayName = jd;
10328
10302
  function Ea(e) {
10329
10303
  return e ? "open" : "closed";
10330
10304
  }
10331
- var Pd = "DialogTitleWarning", [KT, Od] = Xv(Pd, {
10305
+ var Pd = "DialogTitleWarning", [VT, Od] = Yv(Pd, {
10332
10306
  contentName: Yn,
10333
10307
  titleName: ka,
10334
10308
  docsSlug: "dialog"
10335
- }), Ub = ({ titleId: e }) => {
10309
+ }), Hb = ({ titleId: e }) => {
10336
10310
  const t = Od(Pd), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
10337
10311
 
10338
10312
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -10341,15 +10315,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
10341
10315
  return m.useEffect(() => {
10342
10316
  e && (document.getElementById(e) || console.error(n));
10343
10317
  }, [n, e]), null;
10344
- }, Wb = "DialogDescriptionWarning", Vb = ({ contentRef: e, descriptionId: t }) => {
10345
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Od(Wb).contentName}}.`;
10318
+ }, Ub = "DialogDescriptionWarning", Wb = ({ contentRef: e, descriptionId: t }) => {
10319
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Od(Ub).contentName}}.`;
10346
10320
  return m.useEffect(() => {
10347
10321
  var s;
10348
10322
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
10349
10323
  t && o && (document.getElementById(t) || console.warn(r));
10350
10324
  }, [r, e, t]), null;
10351
- }, Md = bd, Kb = Sd, Dd = Td, ys = Rd, Ss = kd, Wn = Id, Cs = Ad, Ld = _d;
10352
- const qb = Md, Gb = Dd, $d = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10325
+ }, Md = bd, Vb = Sd, Dd = Td, ys = Rd, Ss = kd, Wn = Id, Cs = Ad, Ld = _d;
10326
+ const Kb = Md, qb = Dd, $d = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10353
10327
  ys,
10354
10328
  {
10355
10329
  ref: n,
@@ -10377,7 +10351,7 @@ const Fd = m.forwardRef(({ className: e, children: t, ...n }, r) => {
10377
10351
  }
10378
10352
  return i(t), s;
10379
10353
  }, [t]);
10380
- return /* @__PURE__ */ c.jsxs(Gb, { children: [
10354
+ return /* @__PURE__ */ c.jsxs(qb, { children: [
10381
10355
  /* @__PURE__ */ c.jsx($d, {}),
10382
10356
  /* @__PURE__ */ c.jsxs(
10383
10357
  Ss,
@@ -10427,7 +10401,7 @@ const Bd = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10427
10401
  }
10428
10402
  ));
10429
10403
  Bd.displayName = Wn.displayName;
10430
- const Yb = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10404
+ const Gb = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10431
10405
  Cs,
10432
10406
  {
10433
10407
  ref: n,
@@ -10435,8 +10409,8 @@ const Yb = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
10435
10409
  ...t
10436
10410
  }
10437
10411
  ));
10438
- Yb.displayName = Cs.displayName;
10439
- function Xb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10412
+ Gb.displayName = Cs.displayName;
10413
+ function Yb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10440
10414
  const [s, i] = xe(!1), [a, l] = xe(null), [u, d] = xe(null), { toast: f } = Sa(), h = V.useCallback(async () => {
10441
10415
  if (n) {
10442
10416
  i(!0), d(null), l(null);
@@ -10456,7 +10430,7 @@ function Xb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10456
10430
  const p = async () => {
10457
10431
  if (n)
10458
10432
  try {
10459
- await Nw(n), f({ title: "Download started", description: `Downloading ${r}` });
10433
+ await Iw(n), f({ title: "Download started", description: `Downloading ${r}` });
10460
10434
  } catch (x) {
10461
10435
  console.error("Failed to download file:", x), f({ title: "Download failed", description: String(x), variant: "destructive" });
10462
10436
  }
@@ -10500,7 +10474,7 @@ function Xb({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
10500
10474
  ] }),
10501
10475
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
10502
10476
  ] }) : /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ c.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), g = () => o.startsWith("image/") ? /* @__PURE__ */ c.jsx(Kp, { className: "h-5 w-5" }) : /* @__PURE__ */ c.jsx(Xa, { className: "h-5 w-5" });
10503
- return /* @__PURE__ */ c.jsx(qb, { open: e, onOpenChange: t, children: /* @__PURE__ */ c.jsxs(Fd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
10477
+ return /* @__PURE__ */ c.jsx(Kb, { open: e, onOpenChange: t, children: /* @__PURE__ */ c.jsxs(Fd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
10504
10478
  /* @__PURE__ */ c.jsx(zd, { children: /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
10505
10479
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-3", children: [
10506
10480
  g(),
@@ -10652,17 +10626,17 @@ function Ud(e) {
10652
10626
  return Object.values(n).some((i) => i.length > 0) ? n : null;
10653
10627
  }
10654
10628
  const Po = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words", Fn = 1e5;
10655
- function Jb(e) {
10629
+ function Xb(e) {
10656
10630
  return e.filter((t) => t.type === "text").map((t) => t.text).join("");
10657
10631
  }
10658
- function Zb(e) {
10632
+ function Jb(e) {
10659
10633
  const t = e.find((r) => r.type === "tool_call"), n = e.find((r) => r.type === "tool_end");
10660
10634
  return {
10661
10635
  name: t == null ? void 0 : t.name,
10662
10636
  toolCallId: (n == null ? void 0 : n.toolCallId) ?? (t == null ? void 0 : t.id)
10663
10637
  };
10664
10638
  }
10665
- function Qb(e) {
10639
+ function Zb(e) {
10666
10640
  const t = e.filter((r) => r.type === "tool_call");
10667
10641
  return e.filter((r) => r.type === "tool_end").map((r) => {
10668
10642
  var o;
@@ -10673,7 +10647,7 @@ function Qb(e) {
10673
10647
  };
10674
10648
  });
10675
10649
  }
10676
- function ey(e) {
10650
+ function Qb(e) {
10677
10651
  const t = (r, o = Fn) => {
10678
10652
  try {
10679
10653
  const s = Kr(r), i = typeof s == "string" ? s : JSON.stringify(s ?? "");
@@ -10690,13 +10664,13 @@ function ey(e) {
10690
10664
  }
10691
10665
  return t(e);
10692
10666
  }
10693
- function ty(e) {
10667
+ function ey(e) {
10694
10668
  const t = e.find((r) => r.type === "tool_end");
10695
10669
  if (!t) return null;
10696
10670
  const n = t.output;
10697
10671
  return typeof n == "string" ? n : null;
10698
10672
  }
10699
- function ny(e) {
10673
+ function ty(e) {
10700
10674
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
10701
10675
  }
10702
10676
  function mc(e) {
@@ -10718,7 +10692,7 @@ function mc(e) {
10718
10692
  }).join("|") : "";
10719
10693
  return `${e.id}:${t}:${n}`;
10720
10694
  }
10721
- function ry({ className: e }) {
10695
+ function ny({ className: e }) {
10722
10696
  const [t, n] = xe(0);
10723
10697
  return ct(() => {
10724
10698
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
@@ -10735,7 +10709,7 @@ function ry({ className: e }) {
10735
10709
  }
10736
10710
  );
10737
10711
  }
10738
- const oy = V.memo(function({
10712
+ const ry = V.memo(function({
10739
10713
  message: t,
10740
10714
  messageIndex: n,
10741
10715
  isStreamingMessage: r = !1,
@@ -10767,7 +10741,7 @@ const oy = V.memo(function({
10767
10741
  default:
10768
10742
  return "text-[hsl(var(--chat-bubble-ai-text))]";
10769
10743
  }
10770
- }, [z]), pe = at(() => Jb(t.content), [t.content]), ue = at(() => Zb(t.content), [t.content]), ee = at(
10744
+ }, [z]), pe = at(() => Xb(t.content), [t.content]), ue = at(() => Jb(t.content), [t.content]), ee = at(
10771
10745
  () => t.content.filter((ne) => ne.type === "image_url"),
10772
10746
  [t.content]
10773
10747
  ), Ie = at(
@@ -10776,8 +10750,8 @@ const oy = V.memo(function({
10776
10750
  ), Ce = at(
10777
10751
  () => t.content.filter((ne) => ne.type === "interrupt"),
10778
10752
  [t.content]
10779
- ), G = at(() => ey(t.content), [t.content]);
10780
- at(() => ty(t.content), [t.content]);
10753
+ ), G = at(() => Qb(t.content), [t.content]);
10754
+ at(() => ey(t.content), [t.content]);
10781
10755
  const O = at(() => G.length <= Fn ? G : `${G.slice(0, Fn)}
10782
10756
  … [truncated ${G.length - Fn} chars]`, [G]), Q = V.useCallback(async (ne = "all") => {
10783
10757
  const de = ne === "visible" && $ ? O : $ ? G : pe;
@@ -10825,7 +10799,7 @@ const oy = V.memo(function({
10825
10799
  ne.preventDefault(), L((Oe) => ({ ...Oe, [de]: !0 }));
10826
10800
  const me = `${ae.name}_${ae.size}_${Date.now()}`, He = j({ title: "Fetching file...", description: "", open: !0 });
10827
10801
  try {
10828
- const Oe = await Aw(I ?? void 0);
10802
+ const Oe = await Nw(I ?? void 0);
10829
10803
  if (!Oe || !Array.isArray(Oe))
10830
10804
  throw new Error("Invalid file list response");
10831
10805
  const ot = Oe.find((gt) => !gt || typeof gt != "object" || !((gt.filename ?? "") === (ae.name ?? "")) ? !1 : typeof ae.size == "number" && typeof gt.size == "number" ? gt.size === ae.size : !0);
@@ -10926,7 +10900,7 @@ const oy = V.memo(function({
10926
10900
  }, [A]), et = V.useCallback(({ part: ne, i: ae }) => {
10927
10901
  if (ne.type === "text") {
10928
10902
  const de = ne.text ?? "", Ne = de.trim(), he = pc(Ne);
10929
- return he && z !== "tool" ? /* @__PURE__ */ c.jsx(sy, { data: he }, ae) : z === "user" && f && Ne.length > h ? /* @__PURE__ */ c.jsxs(Vl, { open: T, onOpenChange: k, children: [
10903
+ return he && z !== "tool" ? /* @__PURE__ */ c.jsx(oy, { data: he }, ae) : z === "user" && f && Ne.length > h ? /* @__PURE__ */ c.jsxs(Vl, { open: T, onOpenChange: k, children: [
10930
10904
  /* @__PURE__ */ c.jsx("div", { className: te("text-sm text-[hsl(var(--chat-bubble-user-text))]", J && "text-xs"), children: T ? /* @__PURE__ */ c.jsx(Ql, { content: Ne, allowHtml: !1 }) : /* @__PURE__ */ c.jsxs("pre", { className: te("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", J && "text-xs"), children: [
10931
10905
  Ne.substring(0, h),
10932
10906
  "..."
@@ -10983,7 +10957,7 @@ const oy = V.memo(function({
10983
10957
  );
10984
10958
  }
10985
10959
  return ne.type === "interrupt" ? /* @__PURE__ */ c.jsx(
10986
- ay,
10960
+ iy,
10987
10961
  {
10988
10962
  interruptPart: ne,
10989
10963
  onApprove: Te,
@@ -11011,14 +10985,14 @@ const oy = V.memo(function({
11011
10985
  if (t.model === "reflection") {
11012
10986
  const ae = pe.trim(), de = pc(ae);
11013
10987
  if (de && typeof de == "object")
11014
- return /* @__PURE__ */ c.jsx(ly, { data: de });
10988
+ return /* @__PURE__ */ c.jsx(ay, { data: de });
11015
10989
  }
11016
10990
  if ($ && ue.name === "get_issues") {
11017
10991
  const ae = t.content.find((he) => he.type === "tool_end"), de = (ae == null ? void 0 : ae.output) ?? G, Ne = Ud(de);
11018
- if (Ne) return /* @__PURE__ */ c.jsx(cy, { issues: Ne });
10992
+ if (Ne) return /* @__PURE__ */ c.jsx(ly, { issues: Ne });
11019
10993
  }
11020
10994
  if ($) {
11021
- const ae = Qb(t.content);
10995
+ const ae = Zb(t.content);
11022
10996
  if (ae.length > 0)
11023
10997
  return /* @__PURE__ */ c.jsx("div", { className: "space-y-2", children: ae.map((de, Ne) => {
11024
10998
  const he = typeof de.output == "string" ? de.output : Li(de.output), me = he.length > Fn ? `${he.slice(0, Fn)}
@@ -11041,7 +11015,7 @@ const oy = V.memo(function({
11041
11015
  const ae = /* @__PURE__ */ c.jsx("div", { className: "space-y-2", children: t.content.map((de, Ne) => /* @__PURE__ */ c.jsx(et, { part: de, i: Ne }, Ne)) });
11042
11016
  return r ? /* @__PURE__ */ c.jsxs("div", { "aria-busy": "true", role: "status", children: [
11043
11017
  ae,
11044
- /* @__PURE__ */ c.jsx(ry, { className: B })
11018
+ /* @__PURE__ */ c.jsx(ny, { className: B })
11045
11019
  ] }) : ae;
11046
11020
  }
11047
11021
  }, [
@@ -11058,7 +11032,7 @@ const oy = V.memo(function({
11058
11032
  u,
11059
11033
  Fe,
11060
11034
  B
11061
- ]), ft = at(() => ny(t), [t]);
11035
+ ]), ft = at(() => ty(t), [t]);
11062
11036
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
11063
11037
  /* @__PURE__ */ c.jsx("div", { className: te(Ke(), p.container), children: /* @__PURE__ */ c.jsxs("div", { className: te(We(), p.content), children: [
11064
11038
  (i || a || $) && /* @__PURE__ */ c.jsxs(
@@ -11240,7 +11214,7 @@ const oy = V.memo(function({
11240
11214
  )
11241
11215
  ] }) }),
11242
11216
  Y && /* @__PURE__ */ c.jsx(
11243
- Xb,
11217
+ Yb,
11244
11218
  {
11245
11219
  isOpen: W,
11246
11220
  onClose: () => {
@@ -11268,7 +11242,7 @@ const oy = V.memo(function({
11268
11242
  ].every((w) => e[w] === t[w]), s = ((i = e.customStyles) == null ? void 0 : i.container) === ((a = t.customStyles) == null ? void 0 : a.container) && ((l = e.customStyles) == null ? void 0 : l.content) === ((u = t.customStyles) == null ? void 0 : u.content) && ((d = e.customStyles) == null ? void 0 : d.actions) === ((f = t.customStyles) == null ? void 0 : f.actions) && ((h = e.customStyles) == null ? void 0 : h.header) === ((p = t.customStyles) == null ? void 0 : p.header);
11269
11243
  return o && s;
11270
11244
  });
11271
- function sy({ data: e }) {
11245
+ function oy({ data: e }) {
11272
11246
  if (Array.isArray(e))
11273
11247
  return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ c.jsx("div", { className: Po, children: /* @__PURE__ */ c.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ c.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Li(e) });
11274
11248
  if (e && typeof e == "object") {
@@ -11295,12 +11269,12 @@ function sy({ data: e }) {
11295
11269
  s,
11296
11270
  ":"
11297
11271
  ] }),
11298
- /* @__PURE__ */ c.jsx("dd", { className: "inline", children: iy(i) })
11272
+ /* @__PURE__ */ c.jsx("dd", { className: "inline", children: sy(i) })
11299
11273
  ] }, s)) }) });
11300
11274
  }
11301
11275
  return /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Li(e) });
11302
11276
  }
11303
- function iy(e) {
11277
+ function sy(e) {
11304
11278
  if (e == null) return String(e);
11305
11279
  const t = typeof e;
11306
11280
  if (t === "string" || t === "number" || t === "boolean") return String(e);
@@ -11312,7 +11286,7 @@ function iy(e) {
11312
11286
  return String(e);
11313
11287
  }
11314
11288
  }
11315
- function ay({
11289
+ function iy({
11316
11290
  interruptPart: e,
11317
11291
  onApprove: t,
11318
11292
  onReject: n
@@ -11346,7 +11320,7 @@ function ay({
11346
11320
  ] }) })
11347
11321
  ] });
11348
11322
  }
11349
- function ly({ data: e }) {
11323
+ function ay({ data: e }) {
11350
11324
  return /* @__PURE__ */ c.jsx("dl", { className: "grid grid-cols-1 gap-y-2", children: Object.entries(e).map(([t, n]) => /* @__PURE__ */ c.jsxs("div", { className: "flex", children: [
11351
11325
  /* @__PURE__ */ c.jsxs("dt", { className: "font-semibold mr-2", children: [
11352
11326
  t,
@@ -11358,7 +11332,7 @@ function ly({ data: e }) {
11358
11332
  ] }, o)) : String(n) })
11359
11333
  ] }, t)) });
11360
11334
  }
11361
- function cy({ issues: e }) {
11335
+ function ly({ issues: e }) {
11362
11336
  const t = [
11363
11337
  { key: "desirability", title: "Desirability" },
11364
11338
  { key: "feasibility", title: "Feasibility" },
@@ -11417,7 +11391,7 @@ const gc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Wd = V.forwa
11417
11391
  };
11418
11392
  }, [a]), j = at(() => !w || v ? !1 : T ? "auto" : !1, [T, w, v]);
11419
11393
  return e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: f, style: h, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: p || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: f, style: h, children: /* @__PURE__ */ c.jsx(
11420
- Pv,
11394
+ _v,
11421
11395
  {
11422
11396
  ref: (D) => {
11423
11397
  S.current = D;
@@ -11450,7 +11424,7 @@ const gc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Wd = V.forwa
11450
11424
  containIntrinsicSize: "auto 120px"
11451
11425
  },
11452
11426
  children: /* @__PURE__ */ c.jsx(
11453
- oy,
11427
+ ry,
11454
11428
  {
11455
11429
  message: L,
11456
11430
  messageIndex: D,
@@ -11476,7 +11450,7 @@ const gc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Wd = V.forwa
11476
11450
  });
11477
11451
  Wd.displayName = "MessageList";
11478
11452
  const Oo = 1e4;
11479
- function uy(e) {
11453
+ function cy(e) {
11480
11454
  if (typeof e != "string")
11481
11455
  return String(e);
11482
11456
  const t = [
@@ -11503,16 +11477,16 @@ function uy(e) {
11503
11477
  `).replace(/<li>(.*?)<\/li>/gi, `- $1
11504
11478
  `).trim() : n.replace(/</g, "&lt;").replace(/>/g, "&gt;").trim();
11505
11479
  }
11506
- function dy(e, t = Oo) {
11480
+ function uy(e, t = Oo) {
11507
11481
  if (!e || typeof e != "string")
11508
11482
  throw new Error("Invalid content: must be a non-empty string");
11509
11483
  if (e.length > t)
11510
11484
  throw new Error(`Message exceeds maximum length of ${t} characters`);
11511
11485
  return e;
11512
11486
  }
11513
- function fy(e) {
11487
+ function dy(e) {
11514
11488
  let t;
11515
- return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), dy(t), uy(t);
11489
+ return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), uy(t), cy(t);
11516
11490
  }
11517
11491
  function Ia(e) {
11518
11492
  const t = e + "CollectionProvider", [n, r] = fn(t), [o, s] = n(
@@ -11554,20 +11528,20 @@ function Ia(e) {
11554
11528
  r
11555
11529
  ];
11556
11530
  }
11557
- var hy = m.createContext(void 0);
11531
+ var fy = m.createContext(void 0);
11558
11532
  function Ts(e) {
11559
- const t = m.useContext(hy);
11533
+ const t = m.useContext(fy);
11560
11534
  return e || t || "ltr";
11561
11535
  }
11562
- const py = ["top", "right", "bottom", "left"], En = Math.min, At = Math.max, Vo = Math.round, wo = Math.floor, cn = (e) => ({
11536
+ const hy = ["top", "right", "bottom", "left"], En = Math.min, At = Math.max, Vo = Math.round, wo = Math.floor, cn = (e) => ({
11563
11537
  x: e,
11564
11538
  y: e
11565
- }), my = {
11539
+ }), py = {
11566
11540
  left: "right",
11567
11541
  right: "left",
11568
11542
  bottom: "top",
11569
11543
  top: "bottom"
11570
- }, gy = {
11544
+ }, my = {
11571
11545
  start: "end",
11572
11546
  end: "start"
11573
11547
  };
@@ -11589,48 +11563,48 @@ function Na(e) {
11589
11563
  function Aa(e) {
11590
11564
  return e === "y" ? "height" : "width";
11591
11565
  }
11592
- const xy = /* @__PURE__ */ new Set(["top", "bottom"]);
11566
+ const gy = /* @__PURE__ */ new Set(["top", "bottom"]);
11593
11567
  function an(e) {
11594
- return xy.has(vn(e)) ? "y" : "x";
11568
+ return gy.has(vn(e)) ? "y" : "x";
11595
11569
  }
11596
11570
  function ja(e) {
11597
11571
  return Na(an(e));
11598
11572
  }
11599
- function vy(e, t, n) {
11573
+ function xy(e, t, n) {
11600
11574
  n === void 0 && (n = !1);
11601
11575
  const r = kr(e), o = ja(e), s = Aa(o);
11602
11576
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
11603
11577
  return t.reference[s] > t.floating[s] && (i = Ko(i)), [i, Ko(i)];
11604
11578
  }
11605
- function wy(e) {
11579
+ function vy(e) {
11606
11580
  const t = Ko(e);
11607
11581
  return [Fi(e), t, Fi(t)];
11608
11582
  }
11609
11583
  function Fi(e) {
11610
- return e.replace(/start|end/g, (t) => gy[t]);
11584
+ return e.replace(/start|end/g, (t) => my[t]);
11611
11585
  }
11612
- const xc = ["left", "right"], vc = ["right", "left"], by = ["top", "bottom"], yy = ["bottom", "top"];
11613
- function Sy(e, t, n) {
11586
+ const xc = ["left", "right"], vc = ["right", "left"], wy = ["top", "bottom"], by = ["bottom", "top"];
11587
+ function yy(e, t, n) {
11614
11588
  switch (e) {
11615
11589
  case "top":
11616
11590
  case "bottom":
11617
11591
  return n ? t ? vc : xc : t ? xc : vc;
11618
11592
  case "left":
11619
11593
  case "right":
11620
- return t ? by : yy;
11594
+ return t ? wy : by;
11621
11595
  default:
11622
11596
  return [];
11623
11597
  }
11624
11598
  }
11625
- function Cy(e, t, n, r) {
11599
+ function Sy(e, t, n, r) {
11626
11600
  const o = kr(e);
11627
- let s = Sy(vn(e), n === "start", r);
11601
+ let s = yy(vn(e), n === "start", r);
11628
11602
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Fi)))), s;
11629
11603
  }
11630
11604
  function Ko(e) {
11631
- return e.replace(/left|right|bottom|top/g, (t) => my[t]);
11605
+ return e.replace(/left|right|bottom|top/g, (t) => py[t]);
11632
11606
  }
11633
- function Ty(e) {
11607
+ function Cy(e) {
11634
11608
  return {
11635
11609
  top: 0,
11636
11610
  right: 0,
@@ -11640,7 +11614,7 @@ function Ty(e) {
11640
11614
  };
11641
11615
  }
11642
11616
  function Vd(e) {
11643
- return typeof e != "number" ? Ty(e) : {
11617
+ return typeof e != "number" ? Cy(e) : {
11644
11618
  top: e,
11645
11619
  right: e,
11646
11620
  bottom: e,
@@ -11713,7 +11687,7 @@ function wc(e, t, n) {
11713
11687
  }
11714
11688
  return p;
11715
11689
  }
11716
- const Ry = async (e, t, n) => {
11690
+ const Ty = async (e, t, n) => {
11717
11691
  const {
11718
11692
  placement: r = "bottom",
11719
11693
  strategy: o = "absolute",
@@ -11819,7 +11793,7 @@ async function qr(e, t) {
11819
11793
  right: (C.right - x.right + w.right) / R.x
11820
11794
  };
11821
11795
  }
11822
- const ky = (e) => ({
11796
+ const Ry = (e) => ({
11823
11797
  name: "arrow",
11824
11798
  options: e,
11825
11799
  async fn(t) {
@@ -11856,7 +11830,7 @@ const ky = (e) => ({
11856
11830
  reset: K
11857
11831
  };
11858
11832
  }
11859
- }), Ey = function(e) {
11833
+ }), ky = function(e) {
11860
11834
  return e === void 0 && (e = {}), {
11861
11835
  name: "flip",
11862
11836
  options: e,
@@ -11880,12 +11854,12 @@ const ky = (e) => ({
11880
11854
  } = xn(e, t);
11881
11855
  if ((n = s.arrow) != null && n.alignmentOffset)
11882
11856
  return {};
11883
- const x = vn(o), y = an(a), S = vn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), C = h || (S || !v ? [Ko(a)] : wy(a)), T = w !== "none";
11884
- !h && T && C.push(...Cy(a, v, w, R));
11857
+ const x = vn(o), y = an(a), S = vn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), C = h || (S || !v ? [Ko(a)] : vy(a)), T = w !== "none";
11858
+ !h && T && C.push(...Sy(a, v, w, R));
11885
11859
  const k = [a, ...C], I = await qr(t, g), A = [];
11886
11860
  let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
11887
11861
  if (d && A.push(I[x]), f) {
11888
- const P = vy(o, i, R);
11862
+ const P = xy(o, i, R);
11889
11863
  A.push(I[P[0]], I[P[1]]);
11890
11864
  }
11891
11865
  if (j = [...j, {
@@ -11947,9 +11921,9 @@ function bc(e, t) {
11947
11921
  };
11948
11922
  }
11949
11923
  function yc(e) {
11950
- return py.some((t) => e[t] >= 0);
11924
+ return hy.some((t) => e[t] >= 0);
11951
11925
  }
11952
- const Iy = function(e) {
11926
+ const Ey = function(e) {
11953
11927
  return e === void 0 && (e = {}), {
11954
11928
  name: "hide",
11955
11929
  options: e,
@@ -11991,7 +11965,7 @@ const Iy = function(e) {
11991
11965
  }
11992
11966
  };
11993
11967
  }, Kd = /* @__PURE__ */ new Set(["left", "top"]);
11994
- async function Ny(e, t) {
11968
+ async function Iy(e, t) {
11995
11969
  const {
11996
11970
  placement: n,
11997
11971
  platform: r,
@@ -12018,7 +11992,7 @@ async function Ny(e, t) {
12018
11992
  y: p * d
12019
11993
  };
12020
11994
  }
12021
- const Ay = function(e) {
11995
+ const Ny = function(e) {
12022
11996
  return e === void 0 && (e = 0), {
12023
11997
  name: "offset",
12024
11998
  options: e,
@@ -12029,7 +12003,7 @@ const Ay = function(e) {
12029
12003
  y: s,
12030
12004
  placement: i,
12031
12005
  middlewareData: a
12032
- } = t, l = await Ny(t, e);
12006
+ } = t, l = await Iy(t, e);
12033
12007
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
12034
12008
  x: o + l.x,
12035
12009
  y: s + l.y,
@@ -12040,7 +12014,7 @@ const Ay = function(e) {
12040
12014
  };
12041
12015
  }
12042
12016
  };
12043
- }, jy = function(e) {
12017
+ }, Ay = function(e) {
12044
12018
  return e === void 0 && (e = {}), {
12045
12019
  name: "shift",
12046
12020
  options: e,
@@ -12096,7 +12070,7 @@ const Ay = function(e) {
12096
12070
  };
12097
12071
  }
12098
12072
  };
12099
- }, _y = function(e) {
12073
+ }, jy = function(e) {
12100
12074
  return e === void 0 && (e = {}), {
12101
12075
  options: e,
12102
12076
  fn(t) {
@@ -12138,7 +12112,7 @@ const Ay = function(e) {
12138
12112
  };
12139
12113
  }
12140
12114
  };
12141
- }, Py = function(e) {
12115
+ }, _y = function(e) {
12142
12116
  return e === void 0 && (e = {}), {
12143
12117
  name: "size",
12144
12118
  options: e,
@@ -12205,7 +12179,7 @@ function un(e) {
12205
12179
  function Sc(e) {
12206
12180
  return !Rs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Pt(e).ShadowRoot;
12207
12181
  }
12208
- const Oy = /* @__PURE__ */ new Set(["inline", "contents"]);
12182
+ const Py = /* @__PURE__ */ new Set(["inline", "contents"]);
12209
12183
  function so(e) {
12210
12184
  const {
12211
12185
  overflow: t,
@@ -12213,15 +12187,15 @@ function so(e) {
12213
12187
  overflowY: r,
12214
12188
  display: o
12215
12189
  } = Xt(e);
12216
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Oy.has(o);
12190
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Py.has(o);
12217
12191
  }
12218
- const My = /* @__PURE__ */ new Set(["table", "td", "th"]);
12219
- function Dy(e) {
12220
- return My.has(Er(e));
12192
+ const Oy = /* @__PURE__ */ new Set(["table", "td", "th"]);
12193
+ function My(e) {
12194
+ return Oy.has(Er(e));
12221
12195
  }
12222
- const Ly = [":popover-open", ":modal"];
12196
+ const Dy = [":popover-open", ":modal"];
12223
12197
  function ks(e) {
12224
- return Ly.some((t) => {
12198
+ return Dy.some((t) => {
12225
12199
  try {
12226
12200
  return e.matches(t);
12227
12201
  } catch {
@@ -12229,12 +12203,12 @@ function ks(e) {
12229
12203
  }
12230
12204
  });
12231
12205
  }
12232
- const $y = ["transform", "translate", "scale", "rotate", "perspective"], Fy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], zy = ["paint", "layout", "strict", "content"];
12206
+ const Ly = ["transform", "translate", "scale", "rotate", "perspective"], $y = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Fy = ["paint", "layout", "strict", "content"];
12233
12207
  function _a(e) {
12234
12208
  const t = Pa(), n = Yt(e) ? Xt(e) : e;
12235
- return $y.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Fy.some((r) => (n.willChange || "").includes(r)) || zy.some((r) => (n.contain || "").includes(r));
12209
+ return Ly.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || $y.some((r) => (n.willChange || "").includes(r)) || Fy.some((r) => (n.contain || "").includes(r));
12236
12210
  }
12237
- function By(e) {
12211
+ function zy(e) {
12238
12212
  let t = In(e);
12239
12213
  for (; un(t) && !br(t); ) {
12240
12214
  if (_a(t))
@@ -12248,9 +12222,9 @@ function By(e) {
12248
12222
  function Pa() {
12249
12223
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
12250
12224
  }
12251
- const Hy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
12225
+ const By = /* @__PURE__ */ new Set(["html", "body", "#document"]);
12252
12226
  function br(e) {
12253
- return Hy.has(Er(e));
12227
+ return By.has(Er(e));
12254
12228
  }
12255
12229
  function Xt(e) {
12256
12230
  return Pt(e).getComputedStyle(e);
@@ -12321,15 +12295,15 @@ function gr(e) {
12321
12295
  y: a
12322
12296
  };
12323
12297
  }
12324
- const Uy = /* @__PURE__ */ cn(0);
12298
+ const Hy = /* @__PURE__ */ cn(0);
12325
12299
  function Xd(e) {
12326
12300
  const t = Pt(e);
12327
- return !Pa() || !t.visualViewport ? Uy : {
12301
+ return !Pa() || !t.visualViewport ? Hy : {
12328
12302
  x: t.visualViewport.offsetLeft,
12329
12303
  y: t.visualViewport.offsetTop
12330
12304
  };
12331
12305
  }
12332
- function Wy(e, t, n) {
12306
+ function Uy(e, t, n) {
12333
12307
  return t === void 0 && (t = !1), !n || t && n !== Pt(e) ? !1 : t;
12334
12308
  }
12335
12309
  function Xn(e, t, n, r) {
@@ -12337,7 +12311,7 @@ function Xn(e, t, n, r) {
12337
12311
  const o = e.getBoundingClientRect(), s = Oa(e);
12338
12312
  let i = cn(1);
12339
12313
  t && (r ? Yt(r) && (i = gr(r)) : i = gr(e));
12340
- const a = Wy(s, n, r) ? Xd(s) : cn(0);
12314
+ const a = Uy(s, n, r) ? Xd(s) : cn(0);
12341
12315
  let l = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, f = o.height / i.y;
12342
12316
  if (s) {
12343
12317
  const h = Pt(s), p = r && Yt(r) ? Pt(r) : r;
@@ -12365,7 +12339,7 @@ function Jd(e, t) {
12365
12339
  y: o
12366
12340
  };
12367
12341
  }
12368
- function Vy(e) {
12342
+ function Wy(e) {
12369
12343
  let {
12370
12344
  elements: t,
12371
12345
  rect: n,
@@ -12392,10 +12366,10 @@ function Vy(e) {
12392
12366
  y: n.y * u.y - l.scrollTop * u.y + d.y + h.y
12393
12367
  };
12394
12368
  }
12395
- function Ky(e) {
12369
+ function Vy(e) {
12396
12370
  return Array.from(e.getClientRects());
12397
12371
  }
12398
- function qy(e) {
12372
+ function Ky(e) {
12399
12373
  const t = hn(e), n = Es(e), r = e.ownerDocument.body, o = At(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = At(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
12400
12374
  let i = -n.scrollLeft + Is(e);
12401
12375
  const a = -n.scrollTop;
@@ -12407,7 +12381,7 @@ function qy(e) {
12407
12381
  };
12408
12382
  }
12409
12383
  const Cc = 25;
12410
- function Gy(e, t) {
12384
+ function qy(e, t) {
12411
12385
  const n = Pt(e), r = hn(e), o = n.visualViewport;
12412
12386
  let s = r.clientWidth, i = r.clientHeight, a = 0, l = 0;
12413
12387
  if (o) {
@@ -12427,8 +12401,8 @@ function Gy(e, t) {
12427
12401
  y: l
12428
12402
  };
12429
12403
  }
12430
- const Yy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
12431
- function Xy(e, t) {
12404
+ const Gy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
12405
+ function Yy(e, t) {
12432
12406
  const n = Xn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = un(e) ? gr(e) : cn(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, u = r * s.y;
12433
12407
  return {
12434
12408
  width: i,
@@ -12440,11 +12414,11 @@ function Xy(e, t) {
12440
12414
  function Tc(e, t, n) {
12441
12415
  let r;
12442
12416
  if (t === "viewport")
12443
- r = Gy(e, n);
12417
+ r = qy(e, n);
12444
12418
  else if (t === "document")
12445
- r = qy(hn(e));
12419
+ r = Ky(hn(e));
12446
12420
  else if (Yt(t))
12447
- r = Xy(t, n);
12421
+ r = Yy(t, n);
12448
12422
  else {
12449
12423
  const o = Xd(e);
12450
12424
  r = {
@@ -12460,7 +12434,7 @@ function Zd(e, t) {
12460
12434
  const n = In(e);
12461
12435
  return n === t || !Yt(n) || br(n) ? !1 : Xt(n).position === "fixed" || Zd(n, t);
12462
12436
  }
12463
- function Jy(e, t) {
12437
+ function Xy(e, t) {
12464
12438
  const n = t.get(e);
12465
12439
  if (n)
12466
12440
  return n;
@@ -12469,18 +12443,18 @@ function Jy(e, t) {
12469
12443
  let i = s ? In(e) : e;
12470
12444
  for (; Yt(i) && !br(i); ) {
12471
12445
  const a = Xt(i), l = _a(i);
12472
- !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Yy.has(o.position) || so(i) && !l && Zd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = In(i);
12446
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Gy.has(o.position) || so(i) && !l && Zd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = In(i);
12473
12447
  }
12474
12448
  return t.set(e, r), r;
12475
12449
  }
12476
- function Zy(e) {
12450
+ function Jy(e) {
12477
12451
  let {
12478
12452
  element: t,
12479
12453
  boundary: n,
12480
12454
  rootBoundary: r,
12481
12455
  strategy: o
12482
12456
  } = e;
12483
- const i = [...n === "clippingAncestors" ? ks(t) ? [] : Jy(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((u, d) => {
12457
+ const i = [...n === "clippingAncestors" ? ks(t) ? [] : Xy(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((u, d) => {
12484
12458
  const f = Tc(t, d, o);
12485
12459
  return u.top = At(f.top, u.top), u.right = En(f.right, u.right), u.bottom = En(f.bottom, u.bottom), u.left = At(f.left, u.left), u;
12486
12460
  }, Tc(t, a, o));
@@ -12491,7 +12465,7 @@ function Zy(e) {
12491
12465
  y: l.top
12492
12466
  };
12493
12467
  }
12494
- function Qy(e) {
12468
+ function Zy(e) {
12495
12469
  const {
12496
12470
  width: t,
12497
12471
  height: n
@@ -12501,7 +12475,7 @@ function Qy(e) {
12501
12475
  height: n
12502
12476
  };
12503
12477
  }
12504
- function e0(e, t, n) {
12478
+ function Qy(e, t, n) {
12505
12479
  const r = un(t), o = hn(t), s = n === "fixed", i = Xn(e, !0, s, t);
12506
12480
  let a = {
12507
12481
  scrollLeft: 0,
@@ -12550,14 +12524,14 @@ function Qd(e, t) {
12550
12524
  return n;
12551
12525
  }
12552
12526
  let r = Rc(e, t);
12553
- for (; r && Dy(r) && fi(r); )
12527
+ for (; r && My(r) && fi(r); )
12554
12528
  r = Rc(r, t);
12555
- return r && br(r) && fi(r) && !_a(r) ? n : r || By(e) || n;
12529
+ return r && br(r) && fi(r) && !_a(r) ? n : r || zy(e) || n;
12556
12530
  }
12557
- const t0 = async function(e) {
12531
+ const e0 = async function(e) {
12558
12532
  const t = this.getOffsetParent || Qd, n = this.getDimensions, r = await n(e.floating);
12559
12533
  return {
12560
- reference: e0(e.reference, await t(e.floating), e.strategy),
12534
+ reference: Qy(e.reference, await t(e.floating), e.strategy),
12561
12535
  floating: {
12562
12536
  x: 0,
12563
12537
  y: 0,
@@ -12566,25 +12540,25 @@ const t0 = async function(e) {
12566
12540
  }
12567
12541
  };
12568
12542
  };
12569
- function n0(e) {
12543
+ function t0(e) {
12570
12544
  return Xt(e).direction === "rtl";
12571
12545
  }
12572
- const r0 = {
12573
- convertOffsetParentRelativeRectToViewportRelativeRect: Vy,
12546
+ const n0 = {
12547
+ convertOffsetParentRelativeRectToViewportRelativeRect: Wy,
12574
12548
  getDocumentElement: hn,
12575
- getClippingRect: Zy,
12549
+ getClippingRect: Jy,
12576
12550
  getOffsetParent: Qd,
12577
- getElementRects: t0,
12578
- getClientRects: Ky,
12579
- getDimensions: Qy,
12551
+ getElementRects: e0,
12552
+ getClientRects: Vy,
12553
+ getDimensions: Zy,
12580
12554
  getScale: gr,
12581
12555
  isElement: Yt,
12582
- isRTL: n0
12556
+ isRTL: t0
12583
12557
  };
12584
12558
  function ef(e, t) {
12585
12559
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
12586
12560
  }
12587
- function o0(e, t) {
12561
+ function r0(e, t) {
12588
12562
  let n = null, r;
12589
12563
  const o = hn(e);
12590
12564
  function s() {
@@ -12630,7 +12604,7 @@ function o0(e, t) {
12630
12604
  }
12631
12605
  return i(!0), s;
12632
12606
  }
12633
- function s0(e, t, n, r) {
12607
+ function o0(e, t, n, r) {
12634
12608
  r === void 0 && (r = {});
12635
12609
  const {
12636
12610
  ancestorScroll: o = !0,
@@ -12644,7 +12618,7 @@ function s0(e, t, n, r) {
12644
12618
  passive: !0
12645
12619
  }), s && x.addEventListener("resize", n);
12646
12620
  });
12647
- const f = u && a ? o0(u, n) : null;
12621
+ const f = u && a ? r0(u, n) : null;
12648
12622
  let h = -1, p = null;
12649
12623
  i && (p = new ResizeObserver((x) => {
12650
12624
  let [y] = x;
@@ -12666,21 +12640,21 @@ function s0(e, t, n, r) {
12666
12640
  }), f == null || f(), (x = p) == null || x.disconnect(), p = null, l && cancelAnimationFrame(w);
12667
12641
  };
12668
12642
  }
12669
- const i0 = Ay, a0 = jy, l0 = Ey, c0 = Py, u0 = Iy, kc = ky, d0 = _y, f0 = (e, t, n) => {
12643
+ const s0 = Ny, i0 = Ay, a0 = ky, l0 = _y, c0 = Ey, kc = Ry, u0 = jy, d0 = (e, t, n) => {
12670
12644
  const r = /* @__PURE__ */ new Map(), o = {
12671
- platform: r0,
12645
+ platform: n0,
12672
12646
  ...n
12673
12647
  }, s = {
12674
12648
  ...o.platform,
12675
12649
  _c: r
12676
12650
  };
12677
- return Ry(e, t, {
12651
+ return Ty(e, t, {
12678
12652
  ...o,
12679
12653
  platform: s
12680
12654
  });
12681
12655
  };
12682
- var h0 = typeof document < "u", p0 = function() {
12683
- }, Mo = h0 ? Bp : p0;
12656
+ var f0 = typeof document < "u", h0 = function() {
12657
+ }, Mo = f0 ? Bp : h0;
12684
12658
  function Go(e, t) {
12685
12659
  if (e === t)
12686
12660
  return !0;
@@ -12724,7 +12698,7 @@ function hi(e) {
12724
12698
  t.current = e;
12725
12699
  }), t;
12726
12700
  }
12727
- function m0(e) {
12701
+ function p0(e) {
12728
12702
  e === void 0 && (e = {});
12729
12703
  const {
12730
12704
  placement: t = "bottom",
@@ -12759,7 +12733,7 @@ function m0(e) {
12759
12733
  strategy: n,
12760
12734
  middleware: h
12761
12735
  };
12762
- D.current && (z.platform = D.current), f0(T.current, k.current, z).then(($) => {
12736
+ D.current && (z.platform = D.current), d0(T.current, k.current, z).then(($) => {
12763
12737
  const F = {
12764
12738
  ...$,
12765
12739
  // The floating element's position may be recomputed while it's closed
@@ -12826,7 +12800,7 @@ function m0(e) {
12826
12800
  floatingStyles: J
12827
12801
  }), [d, W, Y, K, J]);
12828
12802
  }
12829
- const g0 = (e) => {
12803
+ const m0 = (e) => {
12830
12804
  function t(n) {
12831
12805
  return {}.hasOwnProperty.call(n, "current");
12832
12806
  }
@@ -12847,14 +12821,17 @@ const g0 = (e) => {
12847
12821
  }).fn(n) : {};
12848
12822
  }
12849
12823
  };
12850
- }, x0 = (e, t) => ({
12824
+ }, g0 = (e, t) => ({
12825
+ ...s0(e),
12826
+ options: [e, t]
12827
+ }), x0 = (e, t) => ({
12851
12828
  ...i0(e),
12852
12829
  options: [e, t]
12853
12830
  }), v0 = (e, t) => ({
12854
- ...a0(e),
12831
+ ...u0(e),
12855
12832
  options: [e, t]
12856
12833
  }), w0 = (e, t) => ({
12857
- ...d0(e),
12834
+ ...a0(e),
12858
12835
  options: [e, t]
12859
12836
  }), b0 = (e, t) => ({
12860
12837
  ...l0(e),
@@ -12863,13 +12840,10 @@ const g0 = (e) => {
12863
12840
  ...c0(e),
12864
12841
  options: [e, t]
12865
12842
  }), S0 = (e, t) => ({
12866
- ...u0(e),
12867
- options: [e, t]
12868
- }), C0 = (e, t) => ({
12869
- ...g0(e),
12843
+ ...m0(e),
12870
12844
  options: [e, t]
12871
12845
  });
12872
- var T0 = "Arrow", nf = m.forwardRef((e, t) => {
12846
+ var C0 = "Arrow", nf = m.forwardRef((e, t) => {
12873
12847
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
12874
12848
  return /* @__PURE__ */ c.jsx(
12875
12849
  Ee.svg,
@@ -12884,8 +12858,8 @@ var T0 = "Arrow", nf = m.forwardRef((e, t) => {
12884
12858
  }
12885
12859
  );
12886
12860
  });
12887
- nf.displayName = T0;
12888
- var R0 = nf;
12861
+ nf.displayName = C0;
12862
+ var T0 = nf;
12889
12863
  function rf(e) {
12890
12864
  const [t, n] = m.useState(void 0);
12891
12865
  return pt(() => {
@@ -12908,9 +12882,9 @@ function rf(e) {
12908
12882
  n(void 0);
12909
12883
  }, [e]), t;
12910
12884
  }
12911
- var Ma = "Popper", [of, Ns] = fn(Ma), [k0, sf] = of(Ma), af = (e) => {
12885
+ var Ma = "Popper", [of, Ns] = fn(Ma), [R0, sf] = of(Ma), af = (e) => {
12912
12886
  const { __scopePopper: t, children: n } = e, [r, o] = m.useState(null);
12913
- return /* @__PURE__ */ c.jsx(k0, { scope: t, anchor: r, onAnchorChange: o, children: n });
12887
+ return /* @__PURE__ */ c.jsx(R0, { scope: t, anchor: r, onAnchorChange: o, children: n });
12914
12888
  };
12915
12889
  af.displayName = Ma;
12916
12890
  var lf = "PopperAnchor", cf = m.forwardRef(
@@ -12923,7 +12897,7 @@ var lf = "PopperAnchor", cf = m.forwardRef(
12923
12897
  }
12924
12898
  );
12925
12899
  cf.displayName = lf;
12926
- var Da = "PopperContent", [E0, I0] = of(Da), uf = m.forwardRef(
12900
+ var Da = "PopperContent", [k0, E0] = of(Da), uf = m.forwardRef(
12927
12901
  (e, t) => {
12928
12902
  var G, O, Q, q, ce, ie;
12929
12903
  const {
@@ -12943,38 +12917,38 @@ var Da = "PopperContent", [E0, I0] = of(Da), uf = m.forwardRef(
12943
12917
  ...v
12944
12918
  } = e, g = sf(Da, n), [x, y] = m.useState(null), S = ze(t, ($e) => y($e)), [R, C] = m.useState(null), T = rf(R), k = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(u) ? u : [u], L = D.length > 0, W = {
12945
12919
  padding: j,
12946
- boundary: D.filter(A0),
12920
+ boundary: D.filter(N0),
12947
12921
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
12948
12922
  altBoundary: L
12949
- }, { refs: P, floatingStyles: Y, placement: K, isPositioned: J, middlewareData: z } = m0({
12923
+ }, { refs: P, floatingStyles: Y, placement: K, isPositioned: J, middlewareData: z } = p0({
12950
12924
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
12951
12925
  strategy: "fixed",
12952
12926
  placement: A,
12953
- whileElementsMounted: (...$e) => s0(...$e, {
12927
+ whileElementsMounted: (...$e) => o0(...$e, {
12954
12928
  animationFrame: p === "always"
12955
12929
  }),
12956
12930
  elements: {
12957
12931
  reference: g.anchor
12958
12932
  },
12959
12933
  middleware: [
12960
- x0({ mainAxis: o + I, alignmentAxis: i }),
12961
- l && v0({
12934
+ g0({ mainAxis: o + I, alignmentAxis: i }),
12935
+ l && x0({
12962
12936
  mainAxis: !0,
12963
12937
  crossAxis: !1,
12964
- limiter: f === "partial" ? w0() : void 0,
12938
+ limiter: f === "partial" ? v0() : void 0,
12965
12939
  ...W
12966
12940
  }),
12967
- l && b0({ ...W }),
12968
- y0({
12941
+ l && w0({ ...W }),
12942
+ b0({
12969
12943
  ...W,
12970
12944
  apply: ({ elements: $e, rects: Ke, availableWidth: We, availableHeight: Te }) => {
12971
12945
  const { width: Pe, height: et } = Ke.reference, Fe = $e.floating.style;
12972
12946
  Fe.setProperty("--radix-popper-available-width", `${We}px`), Fe.setProperty("--radix-popper-available-height", `${Te}px`), Fe.setProperty("--radix-popper-anchor-width", `${Pe}px`), Fe.setProperty("--radix-popper-anchor-height", `${et}px`);
12973
12947
  }
12974
12948
  }),
12975
- R && C0({ element: R, padding: a }),
12976
- j0({ arrowWidth: k, arrowHeight: I }),
12977
- h && S0({ strategy: "referenceHidden", ...W })
12949
+ R && S0({ element: R, padding: a }),
12950
+ A0({ arrowWidth: k, arrowHeight: I }),
12951
+ h && y0({ strategy: "referenceHidden", ...W })
12978
12952
  ]
12979
12953
  }), [$, F] = hf(K), B = mt(w);
12980
12954
  pt(() => {
@@ -13008,7 +12982,7 @@ var Da = "PopperContent", [E0, I0] = of(Da), uf = m.forwardRef(
13008
12982
  },
13009
12983
  dir: e.dir,
13010
12984
  children: /* @__PURE__ */ c.jsx(
13011
- E0,
12985
+ k0,
13012
12986
  {
13013
12987
  scope: n,
13014
12988
  placedSide: $,
@@ -13038,13 +13012,13 @@ var Da = "PopperContent", [E0, I0] = of(Da), uf = m.forwardRef(
13038
13012
  }
13039
13013
  );
13040
13014
  uf.displayName = Da;
13041
- var df = "PopperArrow", N0 = {
13015
+ var df = "PopperArrow", I0 = {
13042
13016
  top: "bottom",
13043
13017
  right: "left",
13044
13018
  bottom: "top",
13045
13019
  left: "right"
13046
13020
  }, ff = m.forwardRef(function(t, n) {
13047
- const { __scopePopper: r, ...o } = t, s = I0(df, r), i = N0[s.placedSide];
13021
+ const { __scopePopper: r, ...o } = t, s = E0(df, r), i = I0[s.placedSide];
13048
13022
  return (
13049
13023
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
13050
13024
  // doesn't report size as we'd expect on SVG elements.
@@ -13073,7 +13047,7 @@ var df = "PopperArrow", N0 = {
13073
13047
  visibility: s.shouldHideArrow ? "hidden" : void 0
13074
13048
  },
13075
13049
  children: /* @__PURE__ */ c.jsx(
13076
- R0,
13050
+ T0,
13077
13051
  {
13078
13052
  ...o,
13079
13053
  ref: n,
@@ -13089,10 +13063,10 @@ var df = "PopperArrow", N0 = {
13089
13063
  );
13090
13064
  });
13091
13065
  ff.displayName = df;
13092
- function A0(e) {
13066
+ function N0(e) {
13093
13067
  return e !== null;
13094
13068
  }
13095
- var j0 = (e) => ({
13069
+ var A0 = (e) => ({
13096
13070
  name: "transformOrigin",
13097
13071
  options: e,
13098
13072
  fn(t) {
@@ -13106,14 +13080,14 @@ function hf(e) {
13106
13080
  const [t, n = "center"] = e.split("-");
13107
13081
  return [t, n];
13108
13082
  }
13109
- var pf = af, mf = cf, gf = uf, xf = ff, pi = "rovingFocusGroup.onEntryFocus", _0 = { bubbles: !1, cancelable: !0 }, io = "RovingFocusGroup", [Bi, vf, P0] = Ia(io), [O0, wf] = fn(
13083
+ var pf = af, mf = cf, gf = uf, xf = ff, pi = "rovingFocusGroup.onEntryFocus", j0 = { bubbles: !1, cancelable: !0 }, io = "RovingFocusGroup", [Bi, vf, _0] = Ia(io), [P0, wf] = fn(
13110
13084
  io,
13111
- [P0]
13112
- ), [M0, D0] = O0(io), bf = m.forwardRef(
13113
- (e, t) => /* @__PURE__ */ c.jsx(Bi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(Bi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(L0, { ...e, ref: t }) }) })
13085
+ [_0]
13086
+ ), [O0, M0] = P0(io), bf = m.forwardRef(
13087
+ (e, t) => /* @__PURE__ */ c.jsx(Bi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(Bi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(D0, { ...e, ref: t }) }) })
13114
13088
  );
13115
13089
  bf.displayName = io;
13116
- var L0 = m.forwardRef((e, t) => {
13090
+ var D0 = m.forwardRef((e, t) => {
13117
13091
  const {
13118
13092
  __scopeRovingFocusGroup: n,
13119
13093
  orientation: r,
@@ -13136,7 +13110,7 @@ var L0 = m.forwardRef((e, t) => {
13136
13110
  if (I)
13137
13111
  return I.addEventListener(pi, S), () => I.removeEventListener(pi, S);
13138
13112
  }, [S]), /* @__PURE__ */ c.jsx(
13139
- M0,
13113
+ O0,
13140
13114
  {
13141
13115
  scope: n,
13142
13116
  orientation: r,
@@ -13170,7 +13144,7 @@ var L0 = m.forwardRef((e, t) => {
13170
13144
  onFocus: le(e.onFocus, (I) => {
13171
13145
  const A = !C.current;
13172
13146
  if (I.target === I.currentTarget && A && !x) {
13173
- const j = new CustomEvent(pi, _0);
13147
+ const j = new CustomEvent(pi, j0);
13174
13148
  if (I.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
13175
13149
  const D = R().filter((K) => K.focusable), L = D.find((K) => K.active), W = D.find((K) => K.id === v), Y = [L, W, ...D].filter(
13176
13150
  Boolean
@@ -13194,7 +13168,7 @@ var L0 = m.forwardRef((e, t) => {
13194
13168
  tabStopId: s,
13195
13169
  children: i,
13196
13170
  ...a
13197
- } = e, l = ln(), u = s || l, d = D0(yf, n), f = d.currentTabStopId === u, h = vf(n), { onFocusableItemAdd: p, onFocusableItemRemove: w, currentTabStopId: v } = d;
13171
+ } = e, l = ln(), u = s || l, d = M0(yf, n), f = d.currentTabStopId === u, h = vf(n), { onFocusableItemAdd: p, onFocusableItemRemove: w, currentTabStopId: v } = d;
13198
13172
  return m.useEffect(() => {
13199
13173
  if (r)
13200
13174
  return p(), () => w();
@@ -13222,7 +13196,7 @@ var L0 = m.forwardRef((e, t) => {
13222
13196
  return;
13223
13197
  }
13224
13198
  if (g.target !== g.currentTarget) return;
13225
- const x = z0(g, d.orientation, d.dir);
13199
+ const x = F0(g, d.orientation, d.dir);
13226
13200
  if (x !== void 0) {
13227
13201
  if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
13228
13202
  g.preventDefault();
@@ -13231,7 +13205,7 @@ var L0 = m.forwardRef((e, t) => {
13231
13205
  else if (x === "prev" || x === "next") {
13232
13206
  x === "prev" && S.reverse();
13233
13207
  const R = S.indexOf(g.currentTarget);
13234
- S = d.loop ? B0(S, R + 1) : S.slice(R + 1);
13208
+ S = d.loop ? z0(S, R + 1) : S.slice(R + 1);
13235
13209
  }
13236
13210
  setTimeout(() => Cf(S));
13237
13211
  }
@@ -13244,7 +13218,7 @@ var L0 = m.forwardRef((e, t) => {
13244
13218
  }
13245
13219
  );
13246
13220
  Sf.displayName = yf;
13247
- var $0 = {
13221
+ var L0 = {
13248
13222
  ArrowLeft: "prev",
13249
13223
  ArrowUp: "prev",
13250
13224
  ArrowRight: "next",
@@ -13254,33 +13228,33 @@ var $0 = {
13254
13228
  PageDown: "last",
13255
13229
  End: "last"
13256
13230
  };
13257
- function F0(e, t) {
13231
+ function $0(e, t) {
13258
13232
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
13259
13233
  }
13260
- function z0(e, t, n) {
13261
- const r = F0(e.key, n);
13234
+ function F0(e, t, n) {
13235
+ const r = $0(e.key, n);
13262
13236
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
13263
- return $0[r];
13237
+ return L0[r];
13264
13238
  }
13265
13239
  function Cf(e, t = !1) {
13266
13240
  const n = document.activeElement;
13267
13241
  for (const r of e)
13268
13242
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
13269
13243
  }
13270
- function B0(e, t) {
13244
+ function z0(e, t) {
13271
13245
  return e.map((n, r) => e[(t + r) % e.length]);
13272
13246
  }
13273
- var H0 = bf, U0 = Sf, Hi = ["Enter", " "], W0 = ["ArrowDown", "PageUp", "Home"], Tf = ["ArrowUp", "PageDown", "End"], V0 = [...W0, ...Tf], K0 = {
13247
+ var B0 = bf, H0 = Sf, Hi = ["Enter", " "], U0 = ["ArrowDown", "PageUp", "Home"], Tf = ["ArrowUp", "PageDown", "End"], W0 = [...U0, ...Tf], V0 = {
13274
13248
  ltr: [...Hi, "ArrowRight"],
13275
13249
  rtl: [...Hi, "ArrowLeft"]
13276
- }, q0 = {
13250
+ }, K0 = {
13277
13251
  ltr: ["ArrowLeft"],
13278
13252
  rtl: ["ArrowRight"]
13279
- }, ao = "Menu", [Yr, G0, Y0] = Ia(ao), [nr, Rf] = fn(ao, [
13280
- Y0,
13253
+ }, ao = "Menu", [Yr, q0, G0] = Ia(ao), [nr, Rf] = fn(ao, [
13254
+ G0,
13281
13255
  Ns,
13282
13256
  wf
13283
- ]), As = Ns(), kf = wf(), [X0, rr] = nr(ao), [J0, lo] = nr(ao), Ef = (e) => {
13257
+ ]), As = Ns(), kf = wf(), [Y0, rr] = nr(ao), [X0, lo] = nr(ao), Ef = (e) => {
13284
13258
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = As(t), [l, u] = m.useState(null), d = m.useRef(!1), f = mt(s), h = Ts(o);
13285
13259
  return m.useEffect(() => {
13286
13260
  const p = () => {
@@ -13290,7 +13264,7 @@ var H0 = bf, U0 = Sf, Hi = ["Enter", " "], W0 = ["ArrowDown", "PageUp", "Home"],
13290
13264
  document.removeEventListener("keydown", p, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
13291
13265
  };
13292
13266
  }, []), /* @__PURE__ */ c.jsx(pf, { ...a, children: /* @__PURE__ */ c.jsx(
13293
- X0,
13267
+ Y0,
13294
13268
  {
13295
13269
  scope: t,
13296
13270
  open: n,
@@ -13298,7 +13272,7 @@ var H0 = bf, U0 = Sf, Hi = ["Enter", " "], W0 = ["ArrowDown", "PageUp", "Home"],
13298
13272
  content: l,
13299
13273
  onContentChange: u,
13300
13274
  children: /* @__PURE__ */ c.jsx(
13301
- J0,
13275
+ X0,
13302
13276
  {
13303
13277
  scope: t,
13304
13278
  onClose: m.useCallback(() => f(!1), [f]),
@@ -13312,26 +13286,26 @@ var H0 = bf, U0 = Sf, Hi = ["Enter", " "], W0 = ["ArrowDown", "PageUp", "Home"],
13312
13286
  ) });
13313
13287
  };
13314
13288
  Ef.displayName = ao;
13315
- var Z0 = "MenuAnchor", La = m.forwardRef(
13289
+ var J0 = "MenuAnchor", La = m.forwardRef(
13316
13290
  (e, t) => {
13317
13291
  const { __scopeMenu: n, ...r } = e, o = As(n);
13318
13292
  return /* @__PURE__ */ c.jsx(mf, { ...o, ...r, ref: t });
13319
13293
  }
13320
13294
  );
13321
- La.displayName = Z0;
13322
- var $a = "MenuPortal", [Q0, If] = nr($a, {
13295
+ La.displayName = J0;
13296
+ var $a = "MenuPortal", [Z0, If] = nr($a, {
13323
13297
  forceMount: void 0
13324
13298
  }), Nf = (e) => {
13325
13299
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = rr($a, t);
13326
- return /* @__PURE__ */ c.jsx(Q0, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(Ot, { present: n || s.open, children: /* @__PURE__ */ c.jsx(xs, { asChild: !0, container: o, children: r }) }) });
13300
+ return /* @__PURE__ */ c.jsx(Z0, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(Ot, { present: n || s.open, children: /* @__PURE__ */ c.jsx(xs, { asChild: !0, container: o, children: r }) }) });
13327
13301
  };
13328
13302
  Nf.displayName = $a;
13329
- var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13303
+ var Ht = "MenuContent", [Q0, Fa] = nr(Ht), Af = m.forwardRef(
13330
13304
  (e, t) => {
13331
13305
  const n = If(Ht, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = rr(Ht, e.__scopeMenu), i = lo(Ht, e.__scopeMenu);
13332
- return /* @__PURE__ */ c.jsx(Yr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Yr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(tS, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(nS, { ...o, ref: t }) }) }) });
13306
+ return /* @__PURE__ */ c.jsx(Yr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(Ot, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Yr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(eS, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(tS, { ...o, ref: t }) }) }) });
13333
13307
  }
13334
- ), tS = m.forwardRef(
13308
+ ), eS = m.forwardRef(
13335
13309
  (e, t) => {
13336
13310
  const n = rr(Ht, e.__scopeMenu), r = m.useRef(null), o = ze(t, r);
13337
13311
  return m.useEffect(() => {
@@ -13354,7 +13328,7 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13354
13328
  }
13355
13329
  );
13356
13330
  }
13357
- ), nS = m.forwardRef((e, t) => {
13331
+ ), tS = m.forwardRef((e, t) => {
13358
13332
  const n = rr(Ht, e.__scopeMenu);
13359
13333
  return /* @__PURE__ */ c.jsx(
13360
13334
  za,
@@ -13367,7 +13341,7 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13367
13341
  onDismiss: () => n.onOpenChange(!1)
13368
13342
  }
13369
13343
  );
13370
- }), rS = vr("MenuContent.ScrollLock"), za = m.forwardRef(
13344
+ }), nS = vr("MenuContent.ScrollLock"), za = m.forwardRef(
13371
13345
  (e, t) => {
13372
13346
  const {
13373
13347
  __scopeMenu: n,
@@ -13384,9 +13358,9 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13384
13358
  onDismiss: p,
13385
13359
  disableOutsideScroll: w,
13386
13360
  ...v
13387
- } = e, g = rr(Ht, n), x = lo(Ht, n), y = As(n), S = kf(n), R = G0(n), [C, T] = m.useState(null), k = m.useRef(null), I = ze(t, k, g.onContentChange), A = m.useRef(0), j = m.useRef(""), D = m.useRef(0), L = m.useRef(null), W = m.useRef("right"), P = m.useRef(0), Y = w ? ws : m.Fragment, K = w ? { as: rS, allowPinchZoom: !0 } : void 0, J = ($) => {
13361
+ } = e, g = rr(Ht, n), x = lo(Ht, n), y = As(n), S = kf(n), R = q0(n), [C, T] = m.useState(null), k = m.useRef(null), I = ze(t, k, g.onContentChange), A = m.useRef(0), j = m.useRef(""), D = m.useRef(0), L = m.useRef(null), W = m.useRef("right"), P = m.useRef(0), Y = w ? ws : m.Fragment, K = w ? { as: nS, allowPinchZoom: !0 } : void 0, J = ($) => {
13388
13362
  var G, O;
13389
- const F = j.current + $, B = R().filter((Q) => !Q.disabled), pe = document.activeElement, ue = (G = B.find((Q) => Q.ref.current === pe)) == null ? void 0 : G.textValue, ee = B.map((Q) => Q.textValue), Ie = mS(ee, F, ue), Ce = (O = B.find((Q) => Q.textValue === Ie)) == null ? void 0 : O.ref.current;
13363
+ const F = j.current + $, B = R().filter((Q) => !Q.disabled), pe = document.activeElement, ue = (G = B.find((Q) => Q.ref.current === pe)) == null ? void 0 : G.textValue, ee = B.map((Q) => Q.textValue), Ie = pS(ee, F, ue), Ce = (O = B.find((Q) => Q.textValue === Ie)) == null ? void 0 : O.ref.current;
13390
13364
  (function Q(q) {
13391
13365
  j.current = q, window.clearTimeout(A.current), q !== "" && (A.current = window.setTimeout(() => Q(""), 1e3));
13392
13366
  })(F), Ce && setTimeout(() => Ce.focus());
@@ -13394,10 +13368,10 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13394
13368
  m.useEffect(() => () => window.clearTimeout(A.current), []), Ca();
13395
13369
  const z = m.useCallback(($) => {
13396
13370
  var B, pe;
13397
- return W.current === ((B = L.current) == null ? void 0 : B.side) && xS($, (pe = L.current) == null ? void 0 : pe.area);
13371
+ return W.current === ((B = L.current) == null ? void 0 : B.side) && gS($, (pe = L.current) == null ? void 0 : pe.area);
13398
13372
  }, []);
13399
13373
  return /* @__PURE__ */ c.jsx(
13400
- eS,
13374
+ Q0,
13401
13375
  {
13402
13376
  scope: n,
13403
13377
  searchRef: j,
@@ -13445,7 +13419,7 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13445
13419
  onInteractOutside: h,
13446
13420
  onDismiss: p,
13447
13421
  children: /* @__PURE__ */ c.jsx(
13448
- H0,
13422
+ B0,
13449
13423
  {
13450
13424
  asChild: !0,
13451
13425
  ...S,
@@ -13474,10 +13448,10 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13474
13448
  const B = $.target.closest("[data-radix-menu-content]") === $.currentTarget, pe = $.ctrlKey || $.altKey || $.metaKey, ue = $.key.length === 1;
13475
13449
  B && ($.key === "Tab" && $.preventDefault(), !pe && ue && J($.key));
13476
13450
  const ee = k.current;
13477
- if ($.target !== ee || !V0.includes($.key)) return;
13451
+ if ($.target !== ee || !W0.includes($.key)) return;
13478
13452
  $.preventDefault();
13479
13453
  const Ce = R().filter((G) => !G.disabled).map((G) => G.ref.current);
13480
- Tf.includes($.key) && Ce.reverse(), hS(Ce);
13454
+ Tf.includes($.key) && Ce.reverse(), fS(Ce);
13481
13455
  }),
13482
13456
  onBlur: le(e.onBlur, ($) => {
13483
13457
  $.currentTarget.contains($.target) || (window.clearTimeout(A.current), j.current = "");
@@ -13505,20 +13479,20 @@ var Ht = "MenuContent", [eS, Fa] = nr(Ht), Af = m.forwardRef(
13505
13479
  }
13506
13480
  );
13507
13481
  Af.displayName = Ht;
13508
- var oS = "MenuGroup", Ba = m.forwardRef(
13482
+ var rS = "MenuGroup", Ba = m.forwardRef(
13509
13483
  (e, t) => {
13510
13484
  const { __scopeMenu: n, ...r } = e;
13511
13485
  return /* @__PURE__ */ c.jsx(Ee.div, { role: "group", ...r, ref: t });
13512
13486
  }
13513
13487
  );
13514
- Ba.displayName = oS;
13515
- var sS = "MenuLabel", jf = m.forwardRef(
13488
+ Ba.displayName = rS;
13489
+ var oS = "MenuLabel", jf = m.forwardRef(
13516
13490
  (e, t) => {
13517
13491
  const { __scopeMenu: n, ...r } = e;
13518
13492
  return /* @__PURE__ */ c.jsx(Ee.div, { ...r, ref: t });
13519
13493
  }
13520
13494
  );
13521
- jf.displayName = sS;
13495
+ jf.displayName = oS;
13522
13496
  var Yo = "MenuItem", Ic = "menu.itemSelect", js = m.forwardRef(
13523
13497
  (e, t) => {
13524
13498
  const { disabled: n = !1, onSelect: r, ...o } = e, s = m.useRef(null), i = lo(Yo, e.__scopeMenu), a = Fa(Yo, e.__scopeMenu), l = ze(t, s), u = m.useRef(!1), d = () => {
@@ -13564,7 +13538,7 @@ var _f = m.forwardRef(
13564
13538
  scope: n,
13565
13539
  disabled: r,
13566
13540
  textValue: o ?? h,
13567
- children: /* @__PURE__ */ c.jsx(U0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ c.jsx(
13541
+ children: /* @__PURE__ */ c.jsx(H0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ c.jsx(
13568
13542
  Ee.div,
13569
13543
  {
13570
13544
  role: "menuitem",
@@ -13590,7 +13564,7 @@ var _f = m.forwardRef(
13590
13564
  }
13591
13565
  );
13592
13566
  }
13593
- ), iS = "MenuCheckboxItem", Pf = m.forwardRef(
13567
+ ), sS = "MenuCheckboxItem", Pf = m.forwardRef(
13594
13568
  (e, t) => {
13595
13569
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
13596
13570
  return /* @__PURE__ */ c.jsx($f, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ c.jsx(
@@ -13610,21 +13584,21 @@ var _f = m.forwardRef(
13610
13584
  ) });
13611
13585
  }
13612
13586
  );
13613
- Pf.displayName = iS;
13614
- var Of = "MenuRadioGroup", [aS, lS] = nr(
13587
+ Pf.displayName = sS;
13588
+ var Of = "MenuRadioGroup", [iS, aS] = nr(
13615
13589
  Of,
13616
13590
  { value: void 0, onValueChange: () => {
13617
13591
  } }
13618
13592
  ), Mf = m.forwardRef(
13619
13593
  (e, t) => {
13620
13594
  const { value: n, onValueChange: r, ...o } = e, s = mt(r);
13621
- return /* @__PURE__ */ c.jsx(aS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(Ba, { ...o, ref: t }) });
13595
+ return /* @__PURE__ */ c.jsx(iS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(Ba, { ...o, ref: t }) });
13622
13596
  }
13623
13597
  );
13624
13598
  Mf.displayName = Of;
13625
13599
  var Df = "MenuRadioItem", Lf = m.forwardRef(
13626
13600
  (e, t) => {
13627
- const { value: n, ...r } = e, o = lS(Df, e.__scopeMenu), s = n === o.value;
13601
+ const { value: n, ...r } = e, o = aS(Df, e.__scopeMenu), s = n === o.value;
13628
13602
  return /* @__PURE__ */ c.jsx($f, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ c.jsx(
13629
13603
  js,
13630
13604
  {
@@ -13646,12 +13620,12 @@ var Df = "MenuRadioItem", Lf = m.forwardRef(
13646
13620
  }
13647
13621
  );
13648
13622
  Lf.displayName = Df;
13649
- var Ha = "MenuItemIndicator", [$f, cS] = nr(
13623
+ var Ha = "MenuItemIndicator", [$f, lS] = nr(
13650
13624
  Ha,
13651
13625
  { checked: !1 }
13652
13626
  ), Ff = m.forwardRef(
13653
13627
  (e, t) => {
13654
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = cS(Ha, n);
13628
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = lS(Ha, n);
13655
13629
  return /* @__PURE__ */ c.jsx(
13656
13630
  Ot,
13657
13631
  {
@@ -13669,7 +13643,7 @@ var Ha = "MenuItemIndicator", [$f, cS] = nr(
13669
13643
  }
13670
13644
  );
13671
13645
  Ff.displayName = Ha;
13672
- var uS = "MenuSeparator", zf = m.forwardRef(
13646
+ var cS = "MenuSeparator", zf = m.forwardRef(
13673
13647
  (e, t) => {
13674
13648
  const { __scopeMenu: n, ...r } = e;
13675
13649
  return /* @__PURE__ */ c.jsx(
@@ -13683,15 +13657,15 @@ var uS = "MenuSeparator", zf = m.forwardRef(
13683
13657
  );
13684
13658
  }
13685
13659
  );
13686
- zf.displayName = uS;
13687
- var dS = "MenuArrow", Bf = m.forwardRef(
13660
+ zf.displayName = cS;
13661
+ var uS = "MenuArrow", Bf = m.forwardRef(
13688
13662
  (e, t) => {
13689
13663
  const { __scopeMenu: n, ...r } = e, o = As(n);
13690
13664
  return /* @__PURE__ */ c.jsx(xf, { ...o, ...r, ref: t });
13691
13665
  }
13692
13666
  );
13693
- Bf.displayName = dS;
13694
- var fS = "MenuSub", [qT, Hf] = nr(fS), Pr = "MenuSubTrigger", Uf = m.forwardRef(
13667
+ Bf.displayName = uS;
13668
+ var dS = "MenuSub", [KT, Hf] = nr(dS), Pr = "MenuSubTrigger", Uf = m.forwardRef(
13695
13669
  (e, t) => {
13696
13670
  const n = rr(Pr, e.__scopeMenu), r = lo(Pr, e.__scopeMenu), o = Hf(Pr, e.__scopeMenu), s = Fa(Pr, e.__scopeMenu), i = m.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, u = { __scopeMenu: e.__scopeMenu }, d = m.useCallback(() => {
13697
13671
  i.current && window.clearTimeout(i.current), i.current = null;
@@ -13755,7 +13729,7 @@ var fS = "MenuSub", [qT, Hf] = nr(fS), Pr = "MenuSubTrigger", Uf = m.forwardRef(
13755
13729
  onKeyDown: le(e.onKeyDown, (f) => {
13756
13730
  var p;
13757
13731
  const h = s.searchRef.current !== "";
13758
- e.disabled || h && f.key === " " || K0[r.dir].includes(f.key) && (n.onOpenChange(!0), (p = n.content) == null || p.focus(), f.preventDefault());
13732
+ e.disabled || h && f.key === " " || V0[r.dir].includes(f.key) && (n.onOpenChange(!0), (p = n.content) == null || p.focus(), f.preventDefault());
13759
13733
  })
13760
13734
  }
13761
13735
  ) });
@@ -13790,7 +13764,7 @@ var Wf = "MenuSubContent", Vf = m.forwardRef(
13790
13764
  }),
13791
13765
  onKeyDown: le(e.onKeyDown, (d) => {
13792
13766
  var p;
13793
- const f = d.currentTarget.contains(d.target), h = q0[i.dir].includes(d.key);
13767
+ const f = d.currentTarget.contains(d.target), h = K0[i.dir].includes(d.key);
13794
13768
  f && h && (s.onOpenChange(!1), (p = a.trigger) == null || p.focus(), d.preventDefault());
13795
13769
  })
13796
13770
  }
@@ -13807,24 +13781,24 @@ function Xo(e) {
13807
13781
  function Ua(e) {
13808
13782
  return Xo(e) ? "indeterminate" : e ? "checked" : "unchecked";
13809
13783
  }
13810
- function hS(e) {
13784
+ function fS(e) {
13811
13785
  const t = document.activeElement;
13812
13786
  for (const n of e)
13813
13787
  if (n === t || (n.focus(), document.activeElement !== t)) return;
13814
13788
  }
13815
- function pS(e, t) {
13789
+ function hS(e, t) {
13816
13790
  return e.map((n, r) => e[(t + r) % e.length]);
13817
13791
  }
13818
- function mS(e, t, n) {
13792
+ function pS(e, t, n) {
13819
13793
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
13820
- let i = pS(e, Math.max(s, 0));
13794
+ let i = hS(e, Math.max(s, 0));
13821
13795
  o.length === 1 && (i = i.filter((u) => u !== n));
13822
13796
  const l = i.find(
13823
13797
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
13824
13798
  );
13825
13799
  return l !== n ? l : void 0;
13826
13800
  }
13827
- function gS(e, t) {
13801
+ function mS(e, t) {
13828
13802
  const { x: n, y: r } = e;
13829
13803
  let o = !1;
13830
13804
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -13833,18 +13807,18 @@ function gS(e, t) {
13833
13807
  }
13834
13808
  return o;
13835
13809
  }
13836
- function xS(e, t) {
13810
+ function gS(e, t) {
13837
13811
  if (!t) return !1;
13838
13812
  const n = { x: e.clientX, y: e.clientY };
13839
- return gS(n, t);
13813
+ return mS(n, t);
13840
13814
  }
13841
13815
  function Xr(e) {
13842
13816
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
13843
13817
  }
13844
- var vS = Ef, wS = La, bS = Nf, yS = Af, SS = Ba, CS = jf, TS = js, RS = Pf, kS = Mf, ES = Lf, IS = Ff, NS = zf, AS = Bf, jS = Uf, _S = Vf, _s = "DropdownMenu", [PS, GT] = fn(
13818
+ var xS = Ef, vS = La, wS = Nf, bS = Af, yS = Ba, SS = jf, CS = js, TS = Pf, RS = Mf, kS = Lf, ES = Ff, IS = zf, NS = Bf, AS = Uf, jS = Vf, _s = "DropdownMenu", [_S, qT] = fn(
13845
13819
  _s,
13846
13820
  [Rf]
13847
- ), Tt = Rf(), [OS, qf] = PS(_s), Gf = (e) => {
13821
+ ), Tt = Rf(), [PS, qf] = _S(_s), Gf = (e) => {
13848
13822
  const {
13849
13823
  __scopeDropdownMenu: t,
13850
13824
  children: n,
@@ -13860,7 +13834,7 @@ var vS = Ef, wS = La, bS = Nf, yS = Af, SS = Ba, CS = jf, TS = js, RS = Pf, kS =
13860
13834
  caller: _s
13861
13835
  });
13862
13836
  return /* @__PURE__ */ c.jsx(
13863
- OS,
13837
+ PS,
13864
13838
  {
13865
13839
  scope: t,
13866
13840
  triggerId: ln(),
@@ -13870,7 +13844,7 @@ var vS = Ef, wS = La, bS = Nf, yS = Af, SS = Ba, CS = jf, TS = js, RS = Pf, kS =
13870
13844
  onOpenChange: f,
13871
13845
  onOpenToggle: m.useCallback(() => f((h) => !h), [f]),
13872
13846
  modal: a,
13873
- children: /* @__PURE__ */ c.jsx(vS, { ...l, open: d, onOpenChange: f, dir: r, modal: a, children: n })
13847
+ children: /* @__PURE__ */ c.jsx(xS, { ...l, open: d, onOpenChange: f, dir: r, modal: a, children: n })
13874
13848
  }
13875
13849
  );
13876
13850
  };
@@ -13878,7 +13852,7 @@ Gf.displayName = _s;
13878
13852
  var Yf = "DropdownMenuTrigger", Xf = m.forwardRef(
13879
13853
  (e, t) => {
13880
13854
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = qf(Yf, n), i = Tt(n);
13881
- return /* @__PURE__ */ c.jsx(wS, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
13855
+ return /* @__PURE__ */ c.jsx(vS, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
13882
13856
  Ee.button,
13883
13857
  {
13884
13858
  type: "button",
@@ -13902,16 +13876,16 @@ var Yf = "DropdownMenuTrigger", Xf = m.forwardRef(
13902
13876
  }
13903
13877
  );
13904
13878
  Xf.displayName = Yf;
13905
- var MS = "DropdownMenuPortal", Jf = (e) => {
13879
+ var OS = "DropdownMenuPortal", Jf = (e) => {
13906
13880
  const { __scopeDropdownMenu: t, ...n } = e, r = Tt(t);
13907
- return /* @__PURE__ */ c.jsx(bS, { ...r, ...n });
13881
+ return /* @__PURE__ */ c.jsx(wS, { ...r, ...n });
13908
13882
  };
13909
- Jf.displayName = MS;
13883
+ Jf.displayName = OS;
13910
13884
  var Zf = "DropdownMenuContent", Qf = m.forwardRef(
13911
13885
  (e, t) => {
13912
13886
  const { __scopeDropdownMenu: n, ...r } = e, o = qf(Zf, n), s = Tt(n), i = m.useRef(!1);
13913
13887
  return /* @__PURE__ */ c.jsx(
13914
- yS,
13888
+ bS,
13915
13889
  {
13916
13890
  id: o.contentId,
13917
13891
  "aria-labelledby": o.triggerId,
@@ -13939,68 +13913,68 @@ var Zf = "DropdownMenuContent", Qf = m.forwardRef(
13939
13913
  }
13940
13914
  );
13941
13915
  Qf.displayName = Zf;
13942
- var DS = "DropdownMenuGroup", LS = m.forwardRef(
13916
+ var MS = "DropdownMenuGroup", DS = m.forwardRef(
13943
13917
  (e, t) => {
13944
13918
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13945
- return /* @__PURE__ */ c.jsx(SS, { ...o, ...r, ref: t });
13919
+ return /* @__PURE__ */ c.jsx(yS, { ...o, ...r, ref: t });
13946
13920
  }
13947
13921
  );
13948
- LS.displayName = DS;
13949
- var $S = "DropdownMenuLabel", eh = m.forwardRef(
13922
+ DS.displayName = MS;
13923
+ var LS = "DropdownMenuLabel", eh = m.forwardRef(
13950
13924
  (e, t) => {
13951
13925
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13952
- return /* @__PURE__ */ c.jsx(CS, { ...o, ...r, ref: t });
13926
+ return /* @__PURE__ */ c.jsx(SS, { ...o, ...r, ref: t });
13953
13927
  }
13954
13928
  );
13955
- eh.displayName = $S;
13956
- var FS = "DropdownMenuItem", th = m.forwardRef(
13929
+ eh.displayName = LS;
13930
+ var $S = "DropdownMenuItem", th = m.forwardRef(
13957
13931
  (e, t) => {
13958
13932
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13959
- return /* @__PURE__ */ c.jsx(TS, { ...o, ...r, ref: t });
13933
+ return /* @__PURE__ */ c.jsx(CS, { ...o, ...r, ref: t });
13960
13934
  }
13961
13935
  );
13962
- th.displayName = FS;
13963
- var zS = "DropdownMenuCheckboxItem", nh = m.forwardRef((e, t) => {
13936
+ th.displayName = $S;
13937
+ var FS = "DropdownMenuCheckboxItem", nh = m.forwardRef((e, t) => {
13938
+ const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13939
+ return /* @__PURE__ */ c.jsx(TS, { ...o, ...r, ref: t });
13940
+ });
13941
+ nh.displayName = FS;
13942
+ var zS = "DropdownMenuRadioGroup", BS = m.forwardRef((e, t) => {
13964
13943
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13965
13944
  return /* @__PURE__ */ c.jsx(RS, { ...o, ...r, ref: t });
13966
13945
  });
13967
- nh.displayName = zS;
13968
- var BS = "DropdownMenuRadioGroup", HS = m.forwardRef((e, t) => {
13946
+ BS.displayName = zS;
13947
+ var HS = "DropdownMenuRadioItem", rh = m.forwardRef((e, t) => {
13969
13948
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13970
13949
  return /* @__PURE__ */ c.jsx(kS, { ...o, ...r, ref: t });
13971
13950
  });
13972
- HS.displayName = BS;
13973
- var US = "DropdownMenuRadioItem", rh = m.forwardRef((e, t) => {
13951
+ rh.displayName = HS;
13952
+ var US = "DropdownMenuItemIndicator", oh = m.forwardRef((e, t) => {
13974
13953
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13975
13954
  return /* @__PURE__ */ c.jsx(ES, { ...o, ...r, ref: t });
13976
13955
  });
13977
- rh.displayName = US;
13978
- var WS = "DropdownMenuItemIndicator", oh = m.forwardRef((e, t) => {
13956
+ oh.displayName = US;
13957
+ var WS = "DropdownMenuSeparator", sh = m.forwardRef((e, t) => {
13979
13958
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13980
13959
  return /* @__PURE__ */ c.jsx(IS, { ...o, ...r, ref: t });
13981
13960
  });
13982
- oh.displayName = WS;
13983
- var VS = "DropdownMenuSeparator", sh = m.forwardRef((e, t) => {
13984
- const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13985
- return /* @__PURE__ */ c.jsx(NS, { ...o, ...r, ref: t });
13986
- });
13987
- sh.displayName = VS;
13988
- var KS = "DropdownMenuArrow", qS = m.forwardRef(
13961
+ sh.displayName = WS;
13962
+ var VS = "DropdownMenuArrow", KS = m.forwardRef(
13989
13963
  (e, t) => {
13990
13964
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13991
- return /* @__PURE__ */ c.jsx(AS, { ...o, ...r, ref: t });
13965
+ return /* @__PURE__ */ c.jsx(NS, { ...o, ...r, ref: t });
13992
13966
  }
13993
13967
  );
13994
- qS.displayName = KS;
13995
- var GS = "DropdownMenuSubTrigger", ih = m.forwardRef((e, t) => {
13968
+ KS.displayName = VS;
13969
+ var qS = "DropdownMenuSubTrigger", ih = m.forwardRef((e, t) => {
13996
13970
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
13997
- return /* @__PURE__ */ c.jsx(jS, { ...o, ...r, ref: t });
13971
+ return /* @__PURE__ */ c.jsx(AS, { ...o, ...r, ref: t });
13998
13972
  });
13999
- ih.displayName = GS;
14000
- var YS = "DropdownMenuSubContent", ah = m.forwardRef((e, t) => {
13973
+ ih.displayName = qS;
13974
+ var GS = "DropdownMenuSubContent", ah = m.forwardRef((e, t) => {
14001
13975
  const { __scopeDropdownMenu: n, ...r } = e, o = Tt(n);
14002
13976
  return /* @__PURE__ */ c.jsx(
14003
- _S,
13977
+ jS,
14004
13978
  {
14005
13979
  ...o,
14006
13980
  ...r,
@@ -14016,9 +13990,9 @@ var YS = "DropdownMenuSubContent", ah = m.forwardRef((e, t) => {
14016
13990
  }
14017
13991
  );
14018
13992
  });
14019
- ah.displayName = YS;
14020
- var XS = Gf, JS = Xf, ZS = Jf, lh = Qf, ch = eh, uh = th, dh = nh, fh = rh, hh = oh, ph = sh, mh = ih, gh = ah;
14021
- const QS = XS, eC = JS, tC = m.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
13993
+ ah.displayName = GS;
13994
+ var YS = Gf, XS = Xf, JS = Jf, lh = Qf, ch = eh, uh = th, dh = nh, fh = rh, hh = oh, ph = sh, mh = ih, gh = ah;
13995
+ const ZS = YS, QS = XS, eC = m.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14022
13996
  mh,
14023
13997
  {
14024
13998
  ref: o,
@@ -14034,8 +14008,8 @@ const QS = XS, eC = JS, tC = m.forwardRef(({ className: e, inset: t, children: n
14034
14008
  ]
14035
14009
  }
14036
14010
  ));
14037
- tC.displayName = mh.displayName;
14038
- const nC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14011
+ eC.displayName = mh.displayName;
14012
+ const tC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14039
14013
  gh,
14040
14014
  {
14041
14015
  ref: n,
@@ -14046,8 +14020,8 @@ const nC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14046
14020
  ...t
14047
14021
  }
14048
14022
  ));
14049
- nC.displayName = gh.displayName;
14050
- const xh = m.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(ZS, { children: /* @__PURE__ */ c.jsx(
14023
+ tC.displayName = gh.displayName;
14024
+ const xh = m.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(JS, { children: /* @__PURE__ */ c.jsx(
14051
14025
  lh,
14052
14026
  {
14053
14027
  ref: r,
@@ -14073,7 +14047,7 @@ const Ui = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14073
14047
  }
14074
14048
  ));
14075
14049
  Ui.displayName = uh.displayName;
14076
- const rC = m.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14050
+ const nC = m.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14077
14051
  dh,
14078
14052
  {
14079
14053
  ref: o,
@@ -14089,8 +14063,8 @@ const rC = m.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
14089
14063
  ]
14090
14064
  }
14091
14065
  ));
14092
- rC.displayName = dh.displayName;
14093
- const oC = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
14066
+ nC.displayName = dh.displayName;
14067
+ const rC = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
14094
14068
  fh,
14095
14069
  {
14096
14070
  ref: r,
@@ -14105,8 +14079,8 @@ const oC = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
14105
14079
  ]
14106
14080
  }
14107
14081
  ));
14108
- oC.displayName = fh.displayName;
14109
- const sC = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14082
+ rC.displayName = fh.displayName;
14083
+ const oC = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14110
14084
  ch,
14111
14085
  {
14112
14086
  ref: r,
@@ -14118,8 +14092,8 @@ const sC = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14118
14092
  ...n
14119
14093
  }
14120
14094
  ));
14121
- sC.displayName = ch.displayName;
14122
- const iC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14095
+ oC.displayName = ch.displayName;
14096
+ const sC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14123
14097
  ph,
14124
14098
  {
14125
14099
  ref: n,
@@ -14127,7 +14101,7 @@ const iC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14127
14101
  ...t
14128
14102
  }
14129
14103
  ));
14130
- iC.displayName = ph.displayName;
14104
+ sC.displayName = ph.displayName;
14131
14105
  function mi({
14132
14106
  className: e = "",
14133
14107
  placeholder: t = "Type your message...",
@@ -14163,7 +14137,7 @@ function mi({
14163
14137
  streamingAssistantId: L,
14164
14138
  lastCheckpointId: W,
14165
14139
  lastCheckpointNs: P
14166
- } = bx(), [Y, K] = xe(null), [J, z] = xe(""), [$, F] = xe(null), [B, pe] = xe([]), [ue, ee] = xe(0), [Ie, Ce] = xe(0), [G, O] = xe(!1), [Q, q] = xe(null), [ce, ie] = xe(null), [$e, Ke] = xe(!1), [We, Te] = xe(null), [Pe, et] = xe([]), [Fe, it] = xe(null), [ft, ne] = xe(null), [ae, de] = xe(!1), Ne = Ge(null), he = Ge(null), me = Ge(null), He = Me(() => {
14140
+ } = wx(), [Y, K] = xe(null), [J, z] = xe(""), [$, F] = xe(null), [B, pe] = xe([]), [ue, ee] = xe(0), [Ie, Ce] = xe(0), [G, O] = xe(!1), [Q, q] = xe(null), [ce, ie] = xe(null), [$e, Ke] = xe(!1), [We, Te] = xe(null), [Pe, et] = xe([]), [Fe, it] = xe(null), [ft, ne] = xe(null), [ae, de] = xe(!1), Ne = Ge(null), he = Ge(null), me = Ge(null), He = Me(() => {
14167
14141
  Ne.current && (Ne.current.value = ""), he.current && (he.current.value = ""), ee((re) => re + 1), Ce((re) => re + 1);
14168
14142
  }, []), Oe = Ge(!1);
14169
14143
  ct(() => {
@@ -14236,7 +14210,7 @@ function mi({
14236
14210
  if (re.length > Oo)
14237
14211
  return `Message too long (${re.length}/${Oo} characters)`;
14238
14212
  try {
14239
- return fy(re), null;
14213
+ return dy(re), null;
14240
14214
  } catch (ve) {
14241
14215
  return (ve == null ? void 0 : ve.message) || "Invalid message";
14242
14216
  }
@@ -14473,8 +14447,8 @@ function mi({
14473
14447
  ] }),
14474
14448
  $ && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: $ }),
14475
14449
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-end gap-2", children: [
14476
- (a || l) && /* @__PURE__ */ c.jsxs(QS, { children: [
14477
- /* @__PURE__ */ c.jsx(eC, { asChild: !0, children: /* @__PURE__ */ c.jsx(
14450
+ (a || l) && /* @__PURE__ */ c.jsxs(ZS, { children: [
14451
+ /* @__PURE__ */ c.jsx(QS, { asChild: !0, children: /* @__PURE__ */ c.jsx(
14478
14452
  Ue,
14479
14453
  {
14480
14454
  type: "button",
@@ -14511,7 +14485,7 @@ function mi({
14511
14485
  ] })
14512
14486
  ] }),
14513
14487
  /* @__PURE__ */ c.jsx("div", { className: "flex-1", children: /* @__PURE__ */ c.jsx(
14514
- Cx,
14488
+ Sx,
14515
14489
  {
14516
14490
  initialValue: J,
14517
14491
  editingMessageId: Y,
@@ -14548,10 +14522,10 @@ Jo.displayName = "Input";
14548
14522
  function Wi(e, [t, n]) {
14549
14523
  return Math.min(n, Math.max(t, e));
14550
14524
  }
14551
- function aC(e, t) {
14525
+ function iC(e, t) {
14552
14526
  return m.useReducer((n, r) => t[n][r] ?? n, e);
14553
14527
  }
14554
- var Wa = "ScrollArea", [vh, YT] = fn(Wa), [lC, Wt] = vh(Wa), wh = m.forwardRef(
14528
+ var Wa = "ScrollArea", [vh, GT] = fn(Wa), [aC, Wt] = vh(Wa), wh = m.forwardRef(
14555
14529
  (e, t) => {
14556
14530
  const {
14557
14531
  __scopeScrollArea: n,
@@ -14561,7 +14535,7 @@ var Wa = "ScrollArea", [vh, YT] = fn(Wa), [lC, Wt] = vh(Wa), wh = m.forwardRef(
14561
14535
  ...i
14562
14536
  } = e, [a, l] = m.useState(null), [u, d] = m.useState(null), [f, h] = m.useState(null), [p, w] = m.useState(null), [v, g] = m.useState(null), [x, y] = m.useState(0), [S, R] = m.useState(0), [C, T] = m.useState(!1), [k, I] = m.useState(!1), A = ze(t, (D) => l(D)), j = Ts(o);
14563
14537
  return /* @__PURE__ */ c.jsx(
14564
- lC,
14538
+ aC,
14565
14539
  {
14566
14540
  scope: n,
14567
14541
  type: r,
@@ -14649,11 +14623,11 @@ var pn = "ScrollAreaScrollbar", Va = m.forwardRef(
14649
14623
  const { forceMount: n, ...r } = e, o = Wt(pn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
14650
14624
  return m.useEffect(() => (a ? s(!0) : i(!0), () => {
14651
14625
  a ? s(!1) : i(!1);
14652
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(cC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(uC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(Sh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(Ka, { ...r, ref: t }) : null;
14626
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(lC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(cC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(Sh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(Ka, { ...r, ref: t }) : null;
14653
14627
  }
14654
14628
  );
14655
14629
  Va.displayName = pn;
14656
- var cC = m.forwardRef((e, t) => {
14630
+ var lC = m.forwardRef((e, t) => {
14657
14631
  const { forceMount: n, ...r } = e, o = Wt(pn, e.__scopeScrollArea), [s, i] = m.useState(!1);
14658
14632
  return m.useEffect(() => {
14659
14633
  const a = o.scrollArea;
@@ -14676,8 +14650,8 @@ var cC = m.forwardRef((e, t) => {
14676
14650
  ref: t
14677
14651
  }
14678
14652
  ) });
14679
- }), uC = m.forwardRef((e, t) => {
14680
- const { forceMount: n, ...r } = e, o = Wt(pn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Os(() => l("SCROLL_END"), 100), [a, l] = aC("hidden", {
14653
+ }), cC = m.forwardRef((e, t) => {
14654
+ const { forceMount: n, ...r } = e, o = Wt(pn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Os(() => l("SCROLL_END"), 100), [a, l] = iC("hidden", {
14681
14655
  hidden: {
14682
14656
  SCROLL: "scrolling"
14683
14657
  },
@@ -14750,10 +14724,10 @@ var cC = m.forwardRef((e, t) => {
14750
14724
  onThumbPointerDown: (h) => i.current = h
14751
14725
  };
14752
14726
  function f(h, p) {
14753
- return gC(h, i.current, a, p);
14727
+ return mC(h, i.current, a, p);
14754
14728
  }
14755
14729
  return n === "horizontal" ? /* @__PURE__ */ c.jsx(
14756
- dC,
14730
+ uC,
14757
14731
  {
14758
14732
  ...d,
14759
14733
  ref: t,
@@ -14771,7 +14745,7 @@ var cC = m.forwardRef((e, t) => {
14771
14745
  }
14772
14746
  }
14773
14747
  ) : n === "vertical" ? /* @__PURE__ */ c.jsx(
14774
- fC,
14748
+ dC,
14775
14749
  {
14776
14750
  ...d,
14777
14751
  ref: t,
@@ -14789,7 +14763,7 @@ var cC = m.forwardRef((e, t) => {
14789
14763
  }
14790
14764
  }
14791
14765
  ) : null;
14792
- }), dC = m.forwardRef((e, t) => {
14766
+ }), uC = m.forwardRef((e, t) => {
14793
14767
  const { sizes: n, onSizesChange: r, ...o } = e, s = Wt(pn, e.__scopeScrollArea), [i, a] = m.useState(), l = m.useRef(null), u = ze(t, l, s.onScrollbarXChange);
14794
14768
  return m.useEffect(() => {
14795
14769
  l.current && a(getComputedStyle(l.current));
@@ -14828,7 +14802,7 @@ var cC = m.forwardRef((e, t) => {
14828
14802
  }
14829
14803
  }
14830
14804
  );
14831
- }), fC = m.forwardRef((e, t) => {
14805
+ }), dC = m.forwardRef((e, t) => {
14832
14806
  const { sizes: n, onSizesChange: r, ...o } = e, s = Wt(pn, e.__scopeScrollArea), [i, a] = m.useState(), l = m.useRef(null), u = ze(t, l, s.onScrollbarYChange);
14833
14807
  return m.useEffect(() => {
14834
14808
  l.current && a(getComputedStyle(l.current));
@@ -14868,7 +14842,7 @@ var cC = m.forwardRef((e, t) => {
14868
14842
  }
14869
14843
  }
14870
14844
  );
14871
- }), [hC, Ch] = vh(pn), Th = m.forwardRef((e, t) => {
14845
+ }), [fC, Ch] = vh(pn), Th = m.forwardRef((e, t) => {
14872
14846
  const {
14873
14847
  __scopeScrollArea: n,
14874
14848
  sizes: r,
@@ -14895,7 +14869,7 @@ var cC = m.forwardRef((e, t) => {
14895
14869
  };
14896
14870
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
14897
14871
  }, [S, w, R, C]), m.useEffect(T, [r, T]), yr(w, k), yr(p.content, k), /* @__PURE__ */ c.jsx(
14898
- hC,
14872
+ fC,
14899
14873
  {
14900
14874
  scope: n,
14901
14875
  scrollbar: w,
@@ -14925,9 +14899,9 @@ var cC = m.forwardRef((e, t) => {
14925
14899
  }), Zo = "ScrollAreaThumb", Rh = m.forwardRef(
14926
14900
  (e, t) => {
14927
14901
  const { forceMount: n, ...r } = e, o = Ch(Zo, e.__scopeScrollArea);
14928
- return /* @__PURE__ */ c.jsx(Ot, { present: n || o.hasThumb, children: /* @__PURE__ */ c.jsx(pC, { ref: t, ...r }) });
14902
+ return /* @__PURE__ */ c.jsx(Ot, { present: n || o.hasThumb, children: /* @__PURE__ */ c.jsx(hC, { ref: t, ...r }) });
14929
14903
  }
14930
- ), pC = m.forwardRef(
14904
+ ), hC = m.forwardRef(
14931
14905
  (e, t) => {
14932
14906
  const { __scopeScrollArea: n, style: r, ...o } = e, s = Wt(Zo, n), i = Ch(Zo, n), { onThumbPositionChange: a } = i, l = ze(
14933
14907
  t,
@@ -14940,7 +14914,7 @@ var cC = m.forwardRef((e, t) => {
14940
14914
  if (f) {
14941
14915
  const h = () => {
14942
14916
  if (d(), !u.current) {
14943
- const p = xC(f, a);
14917
+ const p = gC(f, a);
14944
14918
  u.current = p, a();
14945
14919
  }
14946
14920
  };
@@ -14970,11 +14944,11 @@ Rh.displayName = Zo;
14970
14944
  var qa = "ScrollAreaCorner", kh = m.forwardRef(
14971
14945
  (e, t) => {
14972
14946
  const n = Wt(qa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
14973
- return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(mC, { ...e, ref: t }) : null;
14947
+ return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(pC, { ...e, ref: t }) : null;
14974
14948
  }
14975
14949
  );
14976
14950
  kh.displayName = qa;
14977
- var mC = m.forwardRef((e, t) => {
14951
+ var pC = m.forwardRef((e, t) => {
14978
14952
  const { __scopeScrollArea: n, ...r } = e, o = Wt(qa, n), [s, i] = m.useState(0), [a, l] = m.useState(0), u = !!(s && a);
14979
14953
  return yr(o.scrollbarX, () => {
14980
14954
  var f;
@@ -15012,7 +14986,7 @@ function Ps(e) {
15012
14986
  const t = Eh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
15013
14987
  return Math.max(r, 18);
15014
14988
  }
15015
- function gC(e, t, n, r = "ltr") {
14989
+ function mC(e, t, n, r = "ltr") {
15016
14990
  const o = Ps(n), s = o / 2, i = t || s, a = o - i, l = n.scrollbar.paddingStart + i, u = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
15017
14991
  return Ih([l, u], f)(e);
15018
14992
  }
@@ -15030,7 +15004,7 @@ function Ih(e, t) {
15030
15004
  function Nh(e, t) {
15031
15005
  return e > 0 && e < t;
15032
15006
  }
15033
- var xC = (e, t = () => {
15007
+ var gC = (e, t = () => {
15034
15008
  }) => {
15035
15009
  let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
15036
15010
  return function o() {
@@ -15058,7 +15032,7 @@ function yr(e, t) {
15058
15032
  }
15059
15033
  }, [e, n]);
15060
15034
  }
15061
- var Ah = wh, vC = yh, wC = kh;
15035
+ var Ah = wh, xC = yh, vC = kh;
15062
15036
  const jh = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15063
15037
  Ah,
15064
15038
  {
@@ -15066,9 +15040,9 @@ const jh = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15066
15040
  className: te("relative overflow-hidden", e),
15067
15041
  ...n,
15068
15042
  children: [
15069
- /* @__PURE__ */ c.jsx(vC, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
15043
+ /* @__PURE__ */ c.jsx(xC, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
15070
15044
  /* @__PURE__ */ c.jsx(_h, {}),
15071
- /* @__PURE__ */ c.jsx(wC, {})
15045
+ /* @__PURE__ */ c.jsx(vC, {})
15072
15046
  ]
15073
15047
  }
15074
15048
  ));
@@ -15234,7 +15208,7 @@ function xr(e) {
15234
15208
  if (!(typeof globalThis > "u"))
15235
15209
  return globalThis[e];
15236
15210
  }
15237
- function bC(e) {
15211
+ function wC(e) {
15238
15212
  if (typeof e != "string") return;
15239
15213
  const t = e.trim();
15240
15214
  if (t)
@@ -15247,7 +15221,7 @@ function Ph() {
15247
15221
  xr("__CHAT_API_URL__")
15248
15222
  ];
15249
15223
  for (const t of e) {
15250
- const n = bC(t);
15224
+ const n = wC(t);
15251
15225
  if (n) return n;
15252
15226
  }
15253
15227
  }
@@ -15267,12 +15241,12 @@ function Mh(...e) {
15267
15241
  return gn(t);
15268
15242
  return gn();
15269
15243
  }
15270
- function yC() {
15244
+ function bC() {
15271
15245
  const e = {}, t = Ph(), n = Oh();
15272
15246
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
15273
15247
  }
15274
- function SC() {
15275
- const e = yC(), t = Kn.getAuthToken(), n = Ph();
15248
+ function yC() {
15249
+ const e = bC(), t = Kn.getAuthToken(), n = Ph();
15276
15250
  return {
15277
15251
  apiBaseUrl: Mh(
15278
15252
  e.baseUrl,
@@ -15294,7 +15268,7 @@ function SC() {
15294
15268
  };
15295
15269
  }
15296
15270
  const Dh = "chat-settings";
15297
- function CC() {
15271
+ function SC() {
15298
15272
  try {
15299
15273
  const e = localStorage.getItem(Dh);
15300
15274
  return e ? JSON.parse(e) : {};
@@ -15302,7 +15276,7 @@ function CC() {
15302
15276
  return console.error("Failed to parse stored settings:", e), {};
15303
15277
  }
15304
15278
  }
15305
- function TC(e) {
15279
+ function CC(e) {
15306
15280
  try {
15307
15281
  const t = {
15308
15282
  ...e,
@@ -15313,8 +15287,8 @@ function TC(e) {
15313
15287
  console.error("Failed to save settings:", t);
15314
15288
  }
15315
15289
  }
15316
- function XT() {
15317
- const e = SC(), t = CC(), n = Kn.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
15290
+ function YT() {
15291
+ const e = yC(), t = SC(), n = Kn.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
15318
15292
  return {
15319
15293
  ...e,
15320
15294
  ...t,
@@ -15328,13 +15302,13 @@ function XT() {
15328
15302
  )
15329
15303
  };
15330
15304
  }
15331
- function JT(e) {
15305
+ function XT(e) {
15332
15306
  Kn.updateConfig({
15333
15307
  baseUrl: e.apiBaseUrl,
15334
15308
  authToken: e.apiKey ?? void 0
15335
- }), TC(e);
15309
+ }), CC(e);
15336
15310
  }
15337
- var RC = "Label", Lh = m.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
15311
+ var TC = "Label", Lh = m.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
15338
15312
  Ee.label,
15339
15313
  {
15340
15314
  ...e,
@@ -15345,15 +15319,15 @@ var RC = "Label", Lh = m.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
15345
15319
  }
15346
15320
  }
15347
15321
  ));
15348
- Lh.displayName = RC;
15322
+ Lh.displayName = TC;
15349
15323
  var $h = Lh;
15350
- const kC = ns(
15324
+ const RC = ns(
15351
15325
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
15352
15326
  ), $t = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15353
15327
  $h,
15354
15328
  {
15355
15329
  ref: n,
15356
- className: te(kC(), e),
15330
+ className: te(RC(), e),
15357
15331
  ...t
15358
15332
  }
15359
15333
  ));
@@ -15362,7 +15336,7 @@ function Fh(e) {
15362
15336
  const t = m.useRef({ value: e, previous: e });
15363
15337
  return m.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
15364
15338
  }
15365
- var Ms = "Switch", [EC, ZT] = fn(Ms), [IC, NC] = EC(Ms), zh = m.forwardRef(
15339
+ var Ms = "Switch", [kC, JT] = fn(Ms), [EC, IC] = kC(Ms), zh = m.forwardRef(
15366
15340
  (e, t) => {
15367
15341
  const {
15368
15342
  __scopeSwitch: n,
@@ -15381,7 +15355,7 @@ var Ms = "Switch", [EC, ZT] = fn(Ms), [IC, NC] = EC(Ms), zh = m.forwardRef(
15381
15355
  onChange: u,
15382
15356
  caller: Ms
15383
15357
  });
15384
- return /* @__PURE__ */ c.jsxs(IC, { scope: n, checked: x, disabled: a, children: [
15358
+ return /* @__PURE__ */ c.jsxs(EC, { scope: n, checked: x, disabled: a, children: [
15385
15359
  /* @__PURE__ */ c.jsx(
15386
15360
  Ee.button,
15387
15361
  {
@@ -15420,7 +15394,7 @@ var Ms = "Switch", [EC, ZT] = fn(Ms), [IC, NC] = EC(Ms), zh = m.forwardRef(
15420
15394
  zh.displayName = Ms;
15421
15395
  var Bh = "SwitchThumb", Hh = m.forwardRef(
15422
15396
  (e, t) => {
15423
- const { __scopeSwitch: n, ...r } = e, o = NC(Bh, n);
15397
+ const { __scopeSwitch: n, ...r } = e, o = IC(Bh, n);
15424
15398
  return /* @__PURE__ */ c.jsx(
15425
15399
  Ee.span,
15426
15400
  {
@@ -15433,7 +15407,7 @@ var Bh = "SwitchThumb", Hh = m.forwardRef(
15433
15407
  }
15434
15408
  );
15435
15409
  Hh.displayName = Bh;
15436
- var AC = "SwitchBubbleInput", Uh = m.forwardRef(
15410
+ var NC = "SwitchBubbleInput", Uh = m.forwardRef(
15437
15411
  ({
15438
15412
  __scopeSwitch: e,
15439
15413
  control: t,
@@ -15474,11 +15448,11 @@ var AC = "SwitchBubbleInput", Uh = m.forwardRef(
15474
15448
  );
15475
15449
  }
15476
15450
  );
15477
- Uh.displayName = AC;
15451
+ Uh.displayName = NC;
15478
15452
  function Wh(e) {
15479
15453
  return e ? "checked" : "unchecked";
15480
15454
  }
15481
- var Vh = zh, jC = Hh;
15455
+ var Vh = zh, AC = Hh;
15482
15456
  const Cn = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15483
15457
  Vh,
15484
15458
  {
@@ -15489,7 +15463,7 @@ const Cn = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15489
15463
  ...t,
15490
15464
  ref: n,
15491
15465
  children: /* @__PURE__ */ c.jsx(
15492
- jC,
15466
+ AC,
15493
15467
  {
15494
15468
  className: te(
15495
15469
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
@@ -15511,7 +15485,7 @@ var Kh = Object.freeze({
15511
15485
  clip: "rect(0, 0, 0, 0)",
15512
15486
  whiteSpace: "nowrap",
15513
15487
  wordWrap: "normal"
15514
- }), _C = "VisuallyHidden", PC = m.forwardRef(
15488
+ }), jC = "VisuallyHidden", _C = m.forwardRef(
15515
15489
  (e, t) => /* @__PURE__ */ c.jsx(
15516
15490
  Ee.span,
15517
15491
  {
@@ -15521,11 +15495,11 @@ var Kh = Object.freeze({
15521
15495
  }
15522
15496
  )
15523
15497
  );
15524
- PC.displayName = _C;
15525
- var OC = [" ", "Enter", "ArrowUp", "ArrowDown"], MC = [" ", "Enter"], Jn = "Select", [Ds, Ls, DC] = Ia(Jn), [Ir, QT] = fn(Jn, [
15526
- DC,
15498
+ _C.displayName = jC;
15499
+ var PC = [" ", "Enter", "ArrowUp", "ArrowDown"], OC = [" ", "Enter"], Jn = "Select", [Ds, Ls, MC] = Ia(Jn), [Ir, ZT] = fn(Jn, [
15500
+ MC,
15527
15501
  Ns
15528
- ]), $s = Ns(), [LC, _n] = Ir(Jn), [$C, FC] = Ir(Jn), qh = (e) => {
15502
+ ]), $s = Ns(), [DC, _n] = Ir(Jn), [LC, $C] = Ir(Jn), qh = (e) => {
15529
15503
  const {
15530
15504
  __scopeSelect: t,
15531
15505
  children: n,
@@ -15553,7 +15527,7 @@ var OC = [" ", "Enter", "ArrowUp", "ArrowDown"], MC = [" ", "Enter"], Jn = "Sele
15553
15527
  caller: Jn
15554
15528
  }), D = m.useRef(null), L = g ? w || !!g.closest("form") : !0, [W, P] = m.useState(/* @__PURE__ */ new Set()), Y = Array.from(W).map((K) => K.props.value).join(";");
15555
15529
  return /* @__PURE__ */ c.jsx(pf, { ...v, children: /* @__PURE__ */ c.jsxs(
15556
- LC,
15530
+ DC,
15557
15531
  {
15558
15532
  required: p,
15559
15533
  scope: t,
@@ -15573,7 +15547,7 @@ var OC = [" ", "Enter", "ArrowUp", "ArrowDown"], MC = [" ", "Enter"], Jn = "Sele
15573
15547
  disabled: h,
15574
15548
  children: [
15575
15549
  /* @__PURE__ */ c.jsx(Ds.Provider, { scope: t, children: /* @__PURE__ */ c.jsx(
15576
- $C,
15550
+ LC,
15577
15551
  {
15578
15552
  scope: e.__scopeSelect,
15579
15553
  onNativeOptionAdd: m.useCallback((K) => {
@@ -15649,7 +15623,7 @@ var Gh = "SelectTrigger", Yh = m.forwardRef(
15649
15623
  }),
15650
15624
  onKeyDown: le(o.onKeyDown, (v) => {
15651
15625
  const g = f.current !== "";
15652
- !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(g && v.key === " ") && OC.includes(v.key) && (w(), v.preventDefault());
15626
+ !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(g && v.key === " ") && PC.includes(v.key) && (w(), v.preventDefault());
15653
15627
  })
15654
15628
  }
15655
15629
  ) });
@@ -15673,15 +15647,15 @@ var Xh = "SelectValue", Jh = m.forwardRef(
15673
15647
  }
15674
15648
  );
15675
15649
  Jh.displayName = Xh;
15676
- var zC = "SelectIcon", Zh = m.forwardRef(
15650
+ var FC = "SelectIcon", Zh = m.forwardRef(
15677
15651
  (e, t) => {
15678
15652
  const { __scopeSelect: n, children: r, ...o } = e;
15679
15653
  return /* @__PURE__ */ c.jsx(Ee.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
15680
15654
  }
15681
15655
  );
15682
- Zh.displayName = zC;
15683
- var BC = "SelectPortal", Qh = (e) => /* @__PURE__ */ c.jsx(xs, { asChild: !0, ...e });
15684
- Qh.displayName = BC;
15656
+ Zh.displayName = FC;
15657
+ var zC = "SelectPortal", Qh = (e) => /* @__PURE__ */ c.jsx(xs, { asChild: !0, ...e });
15658
+ Qh.displayName = zC;
15685
15659
  var Zn = "SelectContent", ep = m.forwardRef(
15686
15660
  (e, t) => {
15687
15661
  const n = _n(Zn, e.__scopeSelect), [r, o] = m.useState();
@@ -15698,7 +15672,7 @@ var Zn = "SelectContent", ep = m.forwardRef(
15698
15672
  }
15699
15673
  );
15700
15674
  ep.displayName = Zn;
15701
- var Kt = 10, [tp, Pn] = Ir(Zn), HC = "SelectContentImpl", UC = vr("SelectContent.RemoveScroll"), np = m.forwardRef(
15675
+ var Kt = 10, [tp, Pn] = Ir(Zn), BC = "SelectContentImpl", HC = vr("SelectContent.RemoveScroll"), np = m.forwardRef(
15702
15676
  (e, t) => {
15703
15677
  const {
15704
15678
  __scopeSelect: n,
@@ -15806,7 +15780,7 @@ var Kt = 10, [tp, Pn] = Ir(Zn), HC = "SelectContentImpl", UC = vr("SelectContent
15806
15780
  position: r,
15807
15781
  isPositioned: W,
15808
15782
  searchRef: F,
15809
- children: /* @__PURE__ */ c.jsx(ws, { as: UC, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
15783
+ children: /* @__PURE__ */ c.jsx(ws, { as: HC, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
15810
15784
  gs,
15811
15785
  {
15812
15786
  asChild: !0,
@@ -15868,8 +15842,8 @@ var Kt = 10, [tp, Pn] = Ir(Zn), HC = "SelectContentImpl", UC = vr("SelectContent
15868
15842
  );
15869
15843
  }
15870
15844
  );
15871
- np.displayName = HC;
15872
- var WC = "SelectItemAlignedPosition", rp = m.forwardRef((e, t) => {
15845
+ np.displayName = BC;
15846
+ var UC = "SelectItemAlignedPosition", rp = m.forwardRef((e, t) => {
15873
15847
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = _n(Zn, n), i = Pn(Zn, n), [a, l] = m.useState(null), [u, d] = m.useState(null), f = ze(t, (k) => d(k)), h = Ls(n), p = m.useRef(!1), w = m.useRef(!0), { viewport: v, selectedItem: g, selectedItemText: x, focusSelectedItem: y } = i, S = m.useCallback(() => {
15874
15848
  if (s.trigger && s.valueNode && a && u && v && g && x) {
15875
15849
  const k = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), j = x.getBoundingClientRect();
@@ -15937,7 +15911,7 @@ var WC = "SelectItemAlignedPosition", rp = m.forwardRef((e, t) => {
15937
15911
  [S, y]
15938
15912
  );
15939
15913
  return /* @__PURE__ */ c.jsx(
15940
- KC,
15914
+ VC,
15941
15915
  {
15942
15916
  scope: n,
15943
15917
  contentWrapper: a,
@@ -15973,8 +15947,8 @@ var WC = "SelectItemAlignedPosition", rp = m.forwardRef((e, t) => {
15973
15947
  }
15974
15948
  );
15975
15949
  });
15976
- rp.displayName = WC;
15977
- var VC = "SelectPopperPosition", Vi = m.forwardRef((e, t) => {
15950
+ rp.displayName = UC;
15951
+ var WC = "SelectPopperPosition", Vi = m.forwardRef((e, t) => {
15978
15952
  const {
15979
15953
  __scopeSelect: n,
15980
15954
  align: r = "start",
@@ -16002,8 +15976,8 @@ var VC = "SelectPopperPosition", Vi = m.forwardRef((e, t) => {
16002
15976
  }
16003
15977
  );
16004
15978
  });
16005
- Vi.displayName = VC;
16006
- var [KC, Ga] = Ir(Zn, {}), Ki = "SelectViewport", op = m.forwardRef(
15979
+ Vi.displayName = WC;
15980
+ var [VC, Ga] = Ir(Zn, {}), Ki = "SelectViewport", op = m.forwardRef(
16007
15981
  (e, t) => {
16008
15982
  const { __scopeSelect: n, nonce: r, ...o } = e, s = Pn(Ki, n), i = Ga(Ki, n), a = ze(t, s.onViewportChange), l = m.useRef(0);
16009
15983
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
@@ -16056,21 +16030,21 @@ var [KC, Ga] = Ir(Zn, {}), Ki = "SelectViewport", op = m.forwardRef(
16056
16030
  }
16057
16031
  );
16058
16032
  op.displayName = Ki;
16059
- var sp = "SelectGroup", [qC, GC] = Ir(sp), YC = m.forwardRef(
16033
+ var sp = "SelectGroup", [KC, qC] = Ir(sp), GC = m.forwardRef(
16060
16034
  (e, t) => {
16061
16035
  const { __scopeSelect: n, ...r } = e, o = ln();
16062
- return /* @__PURE__ */ c.jsx(qC, { scope: n, id: o, children: /* @__PURE__ */ c.jsx(Ee.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16036
+ return /* @__PURE__ */ c.jsx(KC, { scope: n, id: o, children: /* @__PURE__ */ c.jsx(Ee.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16063
16037
  }
16064
16038
  );
16065
- YC.displayName = sp;
16039
+ GC.displayName = sp;
16066
16040
  var ip = "SelectLabel", ap = m.forwardRef(
16067
16041
  (e, t) => {
16068
- const { __scopeSelect: n, ...r } = e, o = GC(ip, n);
16042
+ const { __scopeSelect: n, ...r } = e, o = qC(ip, n);
16069
16043
  return /* @__PURE__ */ c.jsx(Ee.div, { id: o.id, ...r, ref: t });
16070
16044
  }
16071
16045
  );
16072
16046
  ap.displayName = ip;
16073
- var es = "SelectItem", [XC, lp] = Ir(es), cp = m.forwardRef(
16047
+ var es = "SelectItem", [YC, lp] = Ir(es), cp = m.forwardRef(
16074
16048
  (e, t) => {
16075
16049
  const {
16076
16050
  __scopeSelect: n,
@@ -16092,7 +16066,7 @@ var es = "SelectItem", [XC, lp] = Ir(es), cp = m.forwardRef(
16092
16066
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
16093
16067
  );
16094
16068
  return /* @__PURE__ */ c.jsx(
16095
- XC,
16069
+ YC,
16096
16070
  {
16097
16071
  scope: n,
16098
16072
  value: r,
@@ -16143,7 +16117,7 @@ var es = "SelectItem", [XC, lp] = Ir(es), cp = m.forwardRef(
16143
16117
  }),
16144
16118
  onKeyDown: le(i.onKeyDown, (y) => {
16145
16119
  var R;
16146
- ((R = l.searchRef) == null ? void 0 : R.current) !== "" && y.key === " " || (MC.includes(y.key) && x(), y.key === " " && y.preventDefault());
16120
+ ((R = l.searchRef) == null ? void 0 : R.current) !== "" && y.key === " " || (OC.includes(y.key) && x(), y.key === " " && y.preventDefault());
16147
16121
  })
16148
16122
  }
16149
16123
  )
@@ -16156,7 +16130,7 @@ var es = "SelectItem", [XC, lp] = Ir(es), cp = m.forwardRef(
16156
16130
  cp.displayName = es;
16157
16131
  var Or = "SelectItemText", up = m.forwardRef(
16158
16132
  (e, t) => {
16159
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = _n(Or, n), a = Pn(Or, n), l = lp(Or, n), u = FC(Or, n), [d, f] = m.useState(null), h = ze(
16133
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = _n(Or, n), a = Pn(Or, n), l = lp(Or, n), u = $C(Or, n), [d, f] = m.useState(null), h = ze(
16160
16134
  t,
16161
16135
  (x) => f(x),
16162
16136
  l.onItemTextChange,
@@ -16257,21 +16231,21 @@ var mp = m.forwardRef((e, t) => {
16257
16231
  })
16258
16232
  }
16259
16233
  );
16260
- }), JC = "SelectSeparator", gp = m.forwardRef(
16234
+ }), XC = "SelectSeparator", gp = m.forwardRef(
16261
16235
  (e, t) => {
16262
16236
  const { __scopeSelect: n, ...r } = e;
16263
16237
  return /* @__PURE__ */ c.jsx(Ee.div, { "aria-hidden": !0, ...r, ref: t });
16264
16238
  }
16265
16239
  );
16266
- gp.displayName = JC;
16267
- var Yi = "SelectArrow", ZC = m.forwardRef(
16240
+ gp.displayName = XC;
16241
+ var Yi = "SelectArrow", JC = m.forwardRef(
16268
16242
  (e, t) => {
16269
16243
  const { __scopeSelect: n, ...r } = e, o = $s(n), s = _n(Yi, n), i = Pn(Yi, n);
16270
16244
  return s.open && i.position === "popper" ? /* @__PURE__ */ c.jsx(xf, { ...o, ...r, ref: t }) : null;
16271
16245
  }
16272
16246
  );
16273
- ZC.displayName = Yi;
16274
- var QC = "SelectBubbleInput", xp = m.forwardRef(
16247
+ JC.displayName = Yi;
16248
+ var ZC = "SelectBubbleInput", xp = m.forwardRef(
16275
16249
  ({ __scopeSelect: e, value: t, ...n }, r) => {
16276
16250
  const o = m.useRef(null), s = ze(r, o), i = Fh(t);
16277
16251
  return m.useEffect(() => {
@@ -16296,7 +16270,7 @@ var QC = "SelectBubbleInput", xp = m.forwardRef(
16296
16270
  );
16297
16271
  }
16298
16272
  );
16299
- xp.displayName = QC;
16273
+ xp.displayName = ZC;
16300
16274
  function vp(e) {
16301
16275
  return e === "" || e === void 0;
16302
16276
  }
@@ -16316,18 +16290,18 @@ function wp(e) {
16316
16290
  }
16317
16291
  function bp(e, t, n) {
16318
16292
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
16319
- let i = eT(e, Math.max(s, 0));
16293
+ let i = QC(e, Math.max(s, 0));
16320
16294
  o.length === 1 && (i = i.filter((u) => u !== n));
16321
16295
  const l = i.find(
16322
16296
  (u) => u.textValue.toLowerCase().startsWith(o.toLowerCase())
16323
16297
  );
16324
16298
  return l !== n ? l : void 0;
16325
16299
  }
16326
- function eT(e, t) {
16300
+ function QC(e, t) {
16327
16301
  return e.map((n, r) => e[(t + r) % e.length]);
16328
16302
  }
16329
- var tT = qh, yp = Yh, nT = Jh, rT = Zh, oT = Qh, Sp = ep, sT = op, Cp = ap, Tp = cp, iT = up, aT = fp, Rp = hp, kp = pp, Ep = gp;
16330
- const jc = tT, _c = nT, Xi = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
16303
+ var eT = qh, yp = Yh, tT = Jh, nT = Zh, rT = Qh, Sp = ep, oT = op, Cp = ap, Tp = cp, sT = up, iT = fp, Rp = hp, kp = pp, Ep = gp;
16304
+ const jc = eT, _c = tT, Xi = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
16331
16305
  yp,
16332
16306
  {
16333
16307
  ref: r,
@@ -16338,7 +16312,7 @@ const jc = tT, _c = nT, Xi = m.forwardRef(({ className: e, children: t, ...n },
16338
16312
  ...n,
16339
16313
  children: [
16340
16314
  t,
16341
- /* @__PURE__ */ c.jsx(rT, { asChild: !0, children: /* @__PURE__ */ c.jsx(dr, { className: "h-4 w-4 opacity-50" }) })
16315
+ /* @__PURE__ */ c.jsx(nT, { asChild: !0, children: /* @__PURE__ */ c.jsx(dr, { className: "h-4 w-4 opacity-50" }) })
16342
16316
  ]
16343
16317
  }
16344
16318
  ));
@@ -16369,7 +16343,7 @@ const Np = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16369
16343
  }
16370
16344
  ));
16371
16345
  Np.displayName = kp.displayName;
16372
- const Ji = m.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(oT, { children: /* @__PURE__ */ c.jsxs(
16346
+ const Ji = m.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(rT, { children: /* @__PURE__ */ c.jsxs(
16373
16347
  Sp,
16374
16348
  {
16375
16349
  ref: o,
@@ -16383,7 +16357,7 @@ const Ji = m.forwardRef(({ className: e, children: t, position: n = "popper", ..
16383
16357
  children: [
16384
16358
  /* @__PURE__ */ c.jsx(Ip, {}),
16385
16359
  /* @__PURE__ */ c.jsx(
16386
- sT,
16360
+ oT,
16387
16361
  {
16388
16362
  className: te(
16389
16363
  "p-1",
@@ -16397,7 +16371,7 @@ const Ji = m.forwardRef(({ className: e, children: t, position: n = "popper", ..
16397
16371
  }
16398
16372
  ) }));
16399
16373
  Ji.displayName = Sp.displayName;
16400
- const lT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16374
+ const aT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16401
16375
  Cp,
16402
16376
  {
16403
16377
  ref: n,
@@ -16405,7 +16379,7 @@ const lT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16405
16379
  ...t
16406
16380
  }
16407
16381
  ));
16408
- lT.displayName = Cp.displayName;
16382
+ aT.displayName = Cp.displayName;
16409
16383
  const zn = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
16410
16384
  Tp,
16411
16385
  {
@@ -16416,13 +16390,13 @@ const zn = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
16416
16390
  ),
16417
16391
  ...n,
16418
16392
  children: [
16419
- /* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(aT, { children: /* @__PURE__ */ c.jsx(Zi, { className: "h-4 w-4" }) }) }),
16420
- /* @__PURE__ */ c.jsx(iT, { children: t })
16393
+ /* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(iT, { children: /* @__PURE__ */ c.jsx(Zi, { className: "h-4 w-4" }) }) }),
16394
+ /* @__PURE__ */ c.jsx(sT, { children: t })
16421
16395
  ]
16422
16396
  }
16423
16397
  ));
16424
16398
  zn.displayName = Tp.displayName;
16425
- const cT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16399
+ const lT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16426
16400
  Ep,
16427
16401
  {
16428
16402
  ref: n,
@@ -16430,9 +16404,9 @@ const cT = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16430
16404
  ...t
16431
16405
  }
16432
16406
  ));
16433
- cT.displayName = Ep.displayName;
16434
- var uT = "Separator", Pc = "horizontal", dT = ["horizontal", "vertical"], Ap = m.forwardRef((e, t) => {
16435
- const { decorative: n, orientation: r = Pc, ...o } = e, s = fT(r) ? r : Pc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
16407
+ lT.displayName = Ep.displayName;
16408
+ var cT = "Separator", Pc = "horizontal", uT = ["horizontal", "vertical"], Ap = m.forwardRef((e, t) => {
16409
+ const { decorative: n, orientation: r = Pc, ...o } = e, s = dT(r) ? r : Pc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
16436
16410
  return /* @__PURE__ */ c.jsx(
16437
16411
  Ee.div,
16438
16412
  {
@@ -16443,9 +16417,9 @@ var uT = "Separator", Pc = "horizontal", dT = ["horizontal", "vertical"], Ap = m
16443
16417
  }
16444
16418
  );
16445
16419
  });
16446
- Ap.displayName = uT;
16447
- function fT(e) {
16448
- return dT.includes(e);
16420
+ Ap.displayName = cT;
16421
+ function dT(e) {
16422
+ return uT.includes(e);
16449
16423
  }
16450
16424
  var jp = Ap;
16451
16425
  const _p = m.forwardRef(
@@ -16465,7 +16439,7 @@ const _p = m.forwardRef(
16465
16439
  )
16466
16440
  );
16467
16441
  _p.displayName = jp.displayName;
16468
- const hT = Md, pT = Kb, mT = Dd, Pp = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16442
+ const fT = Md, hT = Vb, pT = Dd, Pp = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16469
16443
  ys,
16470
16444
  {
16471
16445
  className: te(
@@ -16477,7 +16451,7 @@ const hT = Md, pT = Kb, mT = Dd, Pp = m.forwardRef(({ className: e, ...t }, n) =
16477
16451
  }
16478
16452
  ));
16479
16453
  Pp.displayName = ys.displayName;
16480
- const gT = ns(
16454
+ const mT = ns(
16481
16455
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
16482
16456
  {
16483
16457
  variants: {
@@ -16492,13 +16466,13 @@ const gT = ns(
16492
16466
  side: "right"
16493
16467
  }
16494
16468
  }
16495
- ), Op = m.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(mT, { children: [
16469
+ ), Op = m.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(pT, { children: [
16496
16470
  /* @__PURE__ */ c.jsx(Pp, {}),
16497
16471
  /* @__PURE__ */ c.jsxs(
16498
16472
  Ss,
16499
16473
  {
16500
16474
  ref: o,
16501
- className: te(gT({ side: e }), t),
16475
+ className: te(mT({ side: e }), t),
16502
16476
  ...r,
16503
16477
  children: [
16504
16478
  n,
@@ -16543,7 +16517,7 @@ const Lp = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16543
16517
  }
16544
16518
  ));
16545
16519
  Lp.displayName = Cs.displayName;
16546
- const xT = {
16520
+ const gT = {
16547
16521
  api: {
16548
16522
  baseUrl: "http://localhost:8000/api",
16549
16523
  authToken: "",
@@ -16562,7 +16536,7 @@ const xT = {
16562
16536
  showTypingIndicator: !0
16563
16537
  }
16564
16538
  };
16565
- function eR({ settings: e, onSettingsChange: t, className: n = "" }) {
16539
+ function QT({ settings: e, onSettingsChange: t, className: n = "" }) {
16566
16540
  const [r, o] = xe(!1), [s, i] = xe(!1), [a, l] = xe(e), [u, d] = xe(!1), { toast: f } = Sa();
16567
16541
  ct(() => {
16568
16542
  const g = JSON.stringify(a) !== JSON.stringify(e);
@@ -16576,7 +16550,7 @@ function eR({ settings: e, onSettingsChange: t, className: n = "" }) {
16576
16550
  description: "Your chat configuration has been updated successfully."
16577
16551
  });
16578
16552
  }, p = () => {
16579
- l(xT), d(!0), f({
16553
+ l(gT), d(!0), f({
16580
16554
  title: "Settings reset",
16581
16555
  description: "Configuration has been reset to defaults."
16582
16556
  });
@@ -16597,8 +16571,8 @@ function eR({ settings: e, onSettingsChange: t, className: n = "" }) {
16597
16571
  });
16598
16572
  }
16599
16573
  };
16600
- return /* @__PURE__ */ c.jsxs(hT, { open: r, onOpenChange: o, children: [
16601
- /* @__PURE__ */ c.jsx(pT, { asChild: !0, children: /* @__PURE__ */ c.jsxs(Ue, { variant: "outline", size: "sm", className: n, children: [
16574
+ return /* @__PURE__ */ c.jsxs(fT, { open: r, onOpenChange: o, children: [
16575
+ /* @__PURE__ */ c.jsx(hT, { asChild: !0, children: /* @__PURE__ */ c.jsxs(Ue, { variant: "outline", size: "sm", className: n, children: [
16602
16576
  /* @__PURE__ */ c.jsx(rm, { className: "h-4 w-4 mr-2" }),
16603
16577
  "Settings",
16604
16578
  u && /* @__PURE__ */ c.jsx(Oi, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
@@ -16847,7 +16821,7 @@ function eR({ settings: e, onSettingsChange: t, className: n = "" }) {
16847
16821
  ] })
16848
16822
  ] });
16849
16823
  }
16850
- function tR({
16824
+ function eR({
16851
16825
  layout: e = "sidebar",
16852
16826
  layoutSize: t = "desktop",
16853
16827
  showThreads: n = !0,
@@ -16925,28 +16899,28 @@ export {
16925
16899
  qg as ChatApi,
16926
16900
  mi as ChatInterface,
16927
16901
  Js as ChatProviders,
16928
- eR as ChatSettings,
16902
+ QT as ChatSettings,
16929
16903
  Ql as MarkdownContent,
16930
- oy as MessageComponent,
16904
+ ry as MessageComponent,
16931
16905
  Wd as MessageList,
16932
16906
  Ac as ThreadManager,
16933
- JT as applySettings,
16907
+ XT as applySettings,
16934
16908
  Kn as chatApiClient,
16935
- tR as default,
16909
+ eR as default,
16936
16910
  Kg as del,
16937
16911
  Ft as get,
16938
16912
  Ug as getChatToken,
16939
- XT as getCurrentSettings,
16940
- yC as getDefaultApiConfig,
16941
- SC as getDefaultChatSettings,
16913
+ YT as getCurrentSettings,
16914
+ bC as getDefaultApiConfig,
16915
+ yC as getDefaultChatSettings,
16942
16916
  Wg as onChatTokenChanged,
16943
16917
  yl as post,
16944
16918
  Vg as put,
16945
16919
  bl as setChatToken,
16946
16920
  lu as useApi,
16947
- lx as useChatStream,
16921
+ ax as useChatStream,
16948
16922
  hu as useMessages,
16949
16923
  tx as useMessagesReducer,
16950
- bx as useStream,
16924
+ wx as useStream,
16951
16925
  ra as useThreads
16952
16926
  };