@donkit-ai/design-system 1.4.70 → 1.4.72

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.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import H, { useState as I, useRef as R, useEffect as P, useLayoutEffect as rt, forwardRef as Ze, useCallback as le, useContext as de, createContext as Qe } from "react";
2
- import { Check as Re, X as Q, ChevronDown as je, Minus as at, Plus as ot, XCircle as Se, AlertTriangle as Ae, CheckCircle as Ie, Info as De, ChevronUp as it, ChevronsUpDown as lt, ChevronLeft as ct, ChevronRight as dt, Copy as ut, Brain as ft, Loader as mt, Paperclip as ze, Square as pt, ArrowUp as ht, Zap as xt, Cpu as Fe, FileText as vt, ThumbsUp as _t, ThumbsDown as bt } from "lucide-react";
1
+ import q, { useState as I, useRef as R, useEffect as P, useLayoutEffect as nt, forwardRef as Je, useCallback as le, useContext as de, createContext as Ze } from "react";
2
+ import { Check as Re, X as ee, ChevronDown as je, Minus as rt, Plus as at, XCircle as Se, AlertTriangle as Ae, CheckCircle as De, Info as Ie, ChevronUp as ot, ChevronsUpDown as it, ChevronLeft as lt, ChevronRight as ct, Copy as dt, Brain as ut, Loader as ft, Paperclip as ze, Square as mt, ArrowUp as pt, Zap as ht, Cpu as Fe, FileText as xt, ThumbsUp as vt, ThumbsDown as _t } from "lucide-react";
3
3
  import me from "react-dom";
4
- const F = {
4
+ const C = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
@@ -18,10 +18,10 @@ var Ee = { exports: {} }, _e = {};
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
- var Ce;
22
- function jt() {
23
- if (Ce) return _e;
24
- Ce = 1;
21
+ var We;
22
+ function bt() {
23
+ if (We) return _e;
24
+ We = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
26
  function n(r, a, o) {
27
27
  var i = null;
@@ -50,26 +50,26 @@ var be = {};
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
52
  */
53
- var We;
54
- function Nt() {
55
- return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
53
+ var Ce;
54
+ function jt() {
55
+ return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function t(f) {
57
57
  if (f == null) return null;
58
58
  if (typeof f == "function")
59
- return f.$$typeof === z ? null : f.displayName || f.name || null;
59
+ return f.$$typeof === F ? null : f.displayName || f.name || null;
60
60
  if (typeof f == "string") return f;
61
61
  switch (f) {
62
- case v:
62
+ case g:
63
63
  return "Fragment";
64
- case j:
64
+ case _:
65
65
  return "Profiler";
66
- case y:
66
+ case $:
67
67
  return "StrictMode";
68
68
  case B:
69
69
  return "Suspense";
70
- case L:
70
+ case M:
71
71
  return "SuspenseList";
72
- case w:
72
+ case j:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof f == "object")
@@ -78,16 +78,16 @@ function Nt() {
78
78
  ), f.$$typeof) {
79
79
  case b:
80
80
  return "Portal";
81
- case k:
81
+ case y:
82
82
  return f.displayName || "Context";
83
83
  case N:
84
84
  return (f._context.displayName || "Context") + ".Consumer";
85
85
  case S:
86
86
  var T = f.render;
87
87
  return f = f.displayName, f || (f = T.displayName || T.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
88
- case O:
88
+ case W:
89
89
  return T = f.displayName || null, T !== null ? T : t(f.type) || "Memo";
90
- case C:
90
+ case z:
91
91
  T = f._payload, f = f._init;
92
92
  try {
93
93
  return t(f(T));
@@ -108,8 +108,8 @@ function Nt() {
108
108
  }
109
109
  if (T) {
110
110
  T = console;
111
- var W = T.error, Y = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
- return W.call(
111
+ var O = T.error, Y = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
112
+ return O.call(
113
113
  T,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  Y
@@ -117,8 +117,8 @@ function Nt() {
117
117
  }
118
118
  }
119
119
  function r(f) {
120
- if (f === v) return "<>";
121
- if (typeof f == "object" && f !== null && f.$$typeof === C)
120
+ if (f === g) return "<>";
121
+ if (typeof f == "object" && f !== null && f.$$typeof === z)
122
122
  return "<...>";
123
123
  try {
124
124
  var T = t(f);
@@ -142,34 +142,34 @@ function Nt() {
142
142
  return f.key !== void 0;
143
143
  }
144
144
  function l(f, T) {
145
- function W() {
146
- E || (E = !0, console.error(
145
+ function O() {
146
+ k || (k = !0, console.error(
147
147
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
148
148
  T
149
149
  ));
150
150
  }
151
- W.isReactWarning = !0, Object.defineProperty(f, "key", {
152
- get: W,
151
+ O.isReactWarning = !0, Object.defineProperty(f, "key", {
152
+ get: O,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function d() {
156
+ function c() {
157
157
  var f = t(this.type);
158
158
  return A[f] || (A[f] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), f = this.props.ref, f !== void 0 ? f : null;
161
161
  }
162
- function c(f, T, W, Y, ne, oe) {
163
- var q = W.ref;
162
+ function d(f, T, O, Y, ne, oe) {
163
+ var H = O.ref;
164
164
  return f = {
165
165
  $$typeof: x,
166
166
  type: f,
167
167
  key: T,
168
- props: W,
168
+ props: O,
169
169
  _owner: Y
170
- }, (q !== void 0 ? q : null) !== null ? Object.defineProperty(f, "ref", {
170
+ }, (H !== void 0 ? H : null) !== null ? Object.defineProperty(f, "ref", {
171
171
  enumerable: !1,
172
- get: d
172
+ get: c
173
173
  }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -192,25 +192,25 @@ function Nt() {
192
192
  value: oe
193
193
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
194
194
  }
195
- function u(f, T, W, Y, ne, oe) {
196
- var q = T.children;
197
- if (q !== void 0)
195
+ function u(f, T, O, Y, ne, oe) {
196
+ var H = T.children;
197
+ if (H !== void 0)
198
198
  if (Y)
199
- if (D(q)) {
200
- for (Y = 0; Y < q.length; Y++)
201
- p(q[Y]);
202
- Object.freeze && Object.freeze(q);
199
+ if (D(H)) {
200
+ for (Y = 0; Y < H.length; Y++)
201
+ p(H[Y]);
202
+ Object.freeze && Object.freeze(H);
203
203
  } else
204
204
  console.error(
205
205
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
206
206
  );
207
- else p(q);
207
+ else p(H);
208
208
  if (V.call(T, "key")) {
209
- q = t(f);
210
- var ee = Object.keys(T).filter(function(ge) {
209
+ H = t(f);
210
+ var Q = Object.keys(T).filter(function(ge) {
211
211
  return ge !== "key";
212
212
  });
213
- Y = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", $[q + Y] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ Y = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", E[H + Y] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
@@ -218,35 +218,35 @@ React keys must be passed directly to JSX without using spread:
218
218
  let props = %s;
219
219
  <%s key={someKey} {...props} />`,
220
220
  Y,
221
- q,
222
- ee,
223
- q
224
- ), $[q + Y] = !0);
221
+ H,
222
+ Q,
223
+ H
224
+ ), E[H + Y] = !0);
225
225
  }
226
- if (q = null, W !== void 0 && (n(W), q = "" + W), i(T) && (n(T.key), q = "" + T.key), "key" in T) {
227
- W = {};
226
+ if (H = null, O !== void 0 && (n(O), H = "" + O), i(T) && (n(T.key), H = "" + T.key), "key" in T) {
227
+ O = {};
228
228
  for (var ie in T)
229
- ie !== "key" && (W[ie] = T[ie]);
230
- } else W = T;
231
- return q && l(
232
- W,
229
+ ie !== "key" && (O[ie] = T[ie]);
230
+ } else O = T;
231
+ return H && l(
232
+ O,
233
233
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
234
- ), c(
234
+ ), d(
235
235
  f,
236
- q,
237
- W,
236
+ H,
237
+ O,
238
238
  a(),
239
239
  ne,
240
240
  oe
241
241
  );
242
242
  }
243
243
  function p(f) {
244
- h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === C && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
244
+ h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
245
245
  }
246
246
  function h(f) {
247
247
  return typeof f == "object" && f !== null && f.$$typeof === x;
248
248
  }
249
- var m = H, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), k = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, D = Array.isArray, _ = console.createTask ? console.createTask : function() {
249
+ var m = q, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, D = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  m = {
@@ -254,36 +254,36 @@ React keys must be passed directly to JSX without using spread:
254
254
  return f();
255
255
  }
256
256
  };
257
- var E, A = {}, U = m.react_stack_bottom_frame.bind(
257
+ var k, A = {}, U = m.react_stack_bottom_frame.bind(
258
258
  m,
259
259
  o
260
- )(), G = _(r(o)), $ = {};
261
- be.Fragment = v, be.jsx = function(f, T, W) {
260
+ )(), G = v(r(o)), E = {};
261
+ be.Fragment = g, be.jsx = function(f, T, O) {
262
262
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
263
263
  return u(
264
264
  f,
265
265
  T,
266
- W,
266
+ O,
267
267
  !1,
268
268
  Y ? Error("react-stack-top-frame") : U,
269
- Y ? _(r(f)) : G
269
+ Y ? v(r(f)) : G
270
270
  );
271
- }, be.jsxs = function(f, T, W) {
271
+ }, be.jsxs = function(f, T, O) {
272
272
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
273
273
  return u(
274
274
  f,
275
275
  T,
276
- W,
276
+ O,
277
277
  !0,
278
278
  Y ? Error("react-stack-top-frame") : U,
279
- Y ? _(r(f)) : G
279
+ Y ? v(r(f)) : G
280
280
  );
281
281
  };
282
282
  }()), be;
283
283
  }
284
- process.env.NODE_ENV === "production" ? Ee.exports = jt() : Ee.exports = Nt();
284
+ process.env.NODE_ENV === "production" ? Ee.exports = bt() : Ee.exports = jt();
285
285
  var e = Ee.exports;
286
- function wt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
286
+ function Nt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
@@ -294,7 +294,7 @@ function wt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
294
294
  }
295
295
  );
296
296
  }
297
- const gt = { xs: 12, s: 14, m: 16, l: 20 };
297
+ const wt = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function ae({
299
299
  children: t,
300
300
  variant: s = "primary",
@@ -304,62 +304,62 @@ function ae({
304
304
  disabled: o = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
- type: d = "button",
308
- href: c,
307
+ type: c = "button",
308
+ href: d,
309
309
  "aria-label": u,
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const m = a && !t, x = i === "loading", b = i === "success", v = i === "error", y = x || b || v, j = n === "xs" ? "s" : "m", N = s === "danger" ? "on-accent" : "default", k = gt[n] ?? 16, S = x ? /* @__PURE__ */ e.jsx(wt, { size: j, color: N }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: k, strokeWidth: 2.5 }) }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Q, { size: k, strokeWidth: 2.5 }) }) : null, B = [
313
+ const m = a && !t, x = i === "loading", b = i === "success", g = i === "error", $ = x || b || g, _ = n === "xs" ? "s" : "m", N = s === "danger" ? "on-accent" : "default", y = wt[n] ?? 16, S = x ? /* @__PURE__ */ e.jsx(Nt, { size: _, color: N }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: y, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: y, strokeWidth: 2.5 }) }) : null, B = [
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
317
317
  r && "ds-button--full",
318
318
  m && "ds-button--icon-only",
319
319
  p
320
- ].filter(Boolean).join(" "), L = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- y ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
320
+ ].filter(Boolean).join(" "), M = i !== "idle" ? i : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
+ $ ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
322
322
  t
323
323
  ] });
324
- if (c) {
325
- const C = (w) => {
324
+ if (d) {
325
+ const z = (j) => {
326
326
  if (o || x) {
327
- w.preventDefault();
327
+ j.preventDefault();
328
328
  return;
329
329
  }
330
- w.metaKey || w.ctrlKey || w.button === 1 || (w.preventDefault(), l == null || l(w));
330
+ j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), l == null || l(j));
331
331
  };
332
332
  return /* @__PURE__ */ e.jsx(
333
333
  "a",
334
334
  {
335
335
  className: B,
336
- href: o || x ? void 0 : c,
337
- onClick: C,
336
+ href: o || x ? void 0 : d,
337
+ onClick: z,
338
338
  "aria-label": u,
339
339
  "aria-disabled": o || x ? "true" : void 0,
340
340
  "aria-busy": x ? "true" : void 0,
341
- "data-state": L,
341
+ "data-state": M,
342
342
  ...h,
343
- children: O
343
+ children: W
344
344
  }
345
345
  );
346
346
  }
347
347
  return /* @__PURE__ */ e.jsx(
348
348
  "button",
349
349
  {
350
- type: d,
350
+ type: c,
351
351
  className: B,
352
352
  disabled: o,
353
353
  onClick: x ? void 0 : l,
354
354
  "aria-label": u,
355
355
  "aria-busy": x ? "true" : void 0,
356
- "data-state": L,
356
+ "data-state": M,
357
357
  ...h,
358
- children: O
358
+ children: W
359
359
  }
360
360
  );
361
361
  }
362
- function us({
362
+ function cs({
363
363
  label: t,
364
364
  error: s,
365
365
  hint: n,
@@ -368,12 +368,12 @@ function us({
368
368
  iconRight: o,
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
- disabled: d,
372
- id: c,
371
+ disabled: c,
372
+ id: d,
373
373
  ...u
374
374
  }) {
375
- const p = c || `input-${H.useId()}`, h = n ? `${p}-hint` : void 0, m = s ? `${p}-error` : void 0, x = m || h;
376
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${d ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
375
+ const p = d || `input-${q.useId()}`, h = n ? `${p}-hint` : void 0, m = s ? `${p}-error` : void 0, x = m || h;
376
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
379
379
  a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
@@ -382,7 +382,7 @@ function us({
382
382
  {
383
383
  id: p,
384
384
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
- disabled: d,
385
+ disabled: c,
386
386
  "aria-invalid": s ? "true" : "false",
387
387
  "aria-describedby": x,
388
388
  ...u
@@ -404,7 +404,7 @@ function us({
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: m, className: "ds-input-error", role: "alert", children: s }) }) })
405
405
  ] });
406
406
  }
407
- function fs({
407
+ function ds({
408
408
  label: t,
409
409
  error: s,
410
410
  hint: n,
@@ -413,10 +413,10 @@ function fs({
413
413
  disabled: o,
414
414
  id: i,
415
415
  resize: l = !0,
416
- rows: d = 3,
417
- ...c
416
+ rows: c = 3,
417
+ ...d
418
418
  }) {
419
- const u = i || `textarea-${H.useId()}`, p = n ? `${u}-hint` : void 0, h = s ? `${u}-error` : void 0, m = h || p;
419
+ const u = i || `textarea-${q.useId()}`, p = n ? `${u}-hint` : void 0, h = s ? `${u}-error` : void 0, m = h || p;
420
420
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: u, children: t }),
422
422
  /* @__PURE__ */ e.jsx(
@@ -427,15 +427,15 @@ function fs({
427
427
  disabled: o,
428
428
  "aria-invalid": s ? "true" : "false",
429
429
  "aria-describedby": m,
430
- rows: d,
431
- ...c
430
+ rows: c,
431
+ ...d
432
432
  }
433
433
  ),
434
434
  n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
435
435
  s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
436
436
  ] });
437
437
  }
438
- function ms({
438
+ function us({
439
439
  label: t,
440
440
  value: s,
441
441
  onChange: n,
@@ -444,129 +444,129 @@ function ms({
444
444
  error: o,
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
- disabled: d = !1,
448
- id: c,
447
+ disabled: c = !1,
448
+ id: d,
449
449
  ...u
450
450
  }) {
451
- const [p, h] = I(!1), [m, x] = I(!1), [b, v] = I({}), [y, j] = I("down"), [N, k] = I(-1), S = R(null), B = R(null), L = R(null), O = R(null), C = c || `select-${H.useId()}`, w = `${C}-label`, z = o ? `${C}-error` : void 0, K = 150, V = ($ = !1) => {
452
- m || (x(!0), k(-1), O.current = setTimeout(() => {
451
+ const [p, h] = I(!1), [m, x] = I(!1), [b, g] = I({}), [$, _] = I("down"), [N, y] = I(-1), S = R(null), B = R(null), M = R(null), W = R(null), z = d || `select-${q.useId()}`, j = `${z}-label`, F = o ? `${z}-error` : void 0, K = 150, V = (E = !1) => {
452
+ m || (x(!0), y(-1), W.current = setTimeout(() => {
453
453
  var f;
454
- h(!1), x(!1), $ && ((f = L.current) == null || f.focus());
454
+ h(!1), x(!1), E && ((f = M.current) == null || f.focus());
455
455
  }, K));
456
- }, D = ($) => {
457
- clearTimeout(O.current), x(!1);
458
- const f = $ !== void 0 ? $ : Math.max(r.findIndex((T) => T.value === s), 0);
459
- k(f), h(!0);
456
+ }, D = (E) => {
457
+ clearTimeout(W.current), x(!1);
458
+ const f = E !== void 0 ? E : Math.max(r.findIndex((T) => T.value === s), 0);
459
+ y(f), h(!0);
460
460
  };
461
- P(() => () => clearTimeout(O.current), []);
462
- const _ = () => {
461
+ P(() => () => clearTimeout(W.current), []);
462
+ const v = () => {
463
463
  var oe;
464
- const $ = (oe = S.current) == null ? void 0 : oe.getBoundingClientRect();
465
- if (!$) return;
466
- const f = window.innerHeight, T = f - $.bottom, W = $.top, ne = T < 300 && W > T;
467
- j(ne ? "up" : "down"), v(
468
- ne ? { bottom: f - $.top + 4, left: $.left, width: $.width } : { top: $.bottom + 4, left: $.left, width: $.width }
464
+ const E = (oe = S.current) == null ? void 0 : oe.getBoundingClientRect();
465
+ if (!E) return;
466
+ const f = window.innerHeight, T = f - E.bottom, O = E.top, ne = T < 300 && O > T;
467
+ _(ne ? "up" : "down"), g(
468
+ ne ? { bottom: f - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
469
469
  );
470
470
  };
471
471
  P(() => {
472
472
  if (p)
473
- return _(), window.addEventListener("scroll", _, !0), window.addEventListener("resize", _), () => {
474
- window.removeEventListener("scroll", _, !0), window.removeEventListener("resize", _);
473
+ return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
474
+ window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
475
475
  };
476
476
  }, [p]), P(() => {
477
- const $ = (f) => {
477
+ const E = (f) => {
478
478
  S.current && !S.current.contains(f.target) && B.current && !B.current.contains(f.target) && V();
479
479
  };
480
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
480
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
481
481
  }, [m]), P(() => {
482
482
  var f;
483
483
  if (!p || N < 0 || !B.current) return;
484
484
  (f = B.current.querySelectorAll(".ds-select-option")[N]) == null || f.scrollIntoView({ block: "nearest" });
485
485
  }, [N, p]);
486
- const E = ($) => {
487
- switch ($.key) {
486
+ const k = (E) => {
487
+ switch (E.key) {
488
488
  case "ArrowDown":
489
- $.preventDefault(), p ? k((f) => Math.min(f + 1, r.length - 1)) : D();
489
+ E.preventDefault(), p ? y((f) => Math.min(f + 1, r.length - 1)) : D();
490
490
  break;
491
491
  case "ArrowUp":
492
- $.preventDefault(), p ? k((f) => Math.max(f - 1, 0)) : D(r.length - 1);
492
+ E.preventDefault(), p ? y((f) => Math.max(f - 1, 0)) : D(r.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && ($.preventDefault(), k(0));
495
+ p && (E.preventDefault(), y(0));
496
496
  break;
497
497
  case "End":
498
- p && ($.preventDefault(), k(r.length - 1));
498
+ p && (E.preventDefault(), y(r.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- $.preventDefault(), p ? N >= 0 && (n == null || n(r[N].value), V(!0)) : D();
502
+ E.preventDefault(), p ? N >= 0 && (n == null || n(r[N].value), V(!0)) : D();
503
503
  break;
504
504
  case "Escape":
505
- p && ($.preventDefault(), V(!0));
505
+ p && (E.preventDefault(), V(!0));
506
506
  break;
507
507
  case "Tab":
508
508
  p && V(!1);
509
509
  break;
510
510
  }
511
- }, A = r.find(($) => $.value === s), U = l === "xs" ? F[1] : l === "small" ? F[2] : F[3], G = p && /* @__PURE__ */ e.jsx(
511
+ }, A = r.find((E) => E.value === s), U = l === "xs" ? C[1] : l === "small" ? C[2] : C[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
514
  ref: B,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
- "aria-labelledby": t ? w : void 0,
517
+ "aria-labelledby": t ? j : void 0,
518
518
  tabIndex: -1,
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
- `ds-select-dropdown--${y}`,
522
+ `ds-select-dropdown--${$}`,
523
523
  m && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
525
  style: b,
526
- children: r.map(($, f) => /* @__PURE__ */ e.jsx(
526
+ children: r.map((E, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
- id: `${C}-opt-${f}`,
529
+ id: `${z}-opt-${f}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": s === $.value,
533
+ "aria-selected": s === E.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- s === $.value && "ds-select-option--selected",
537
+ s === E.value && "ds-select-option--selected",
538
538
  f === N && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- n == null || n($.value), V(!0);
541
+ n == null || n(E.value), V(!0);
542
542
  },
543
- children: $.label
543
+ children: E.label
544
544
  },
545
- $.value
545
+ E.value
546
546
  ))
547
547
  }
548
548
  );
549
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${d ? "ds-select-wrapper--disabled" : ""}`, children: [
550
- t && /* @__PURE__ */ e.jsx("label", { id: w, className: "ds-select-label", children: t }),
549
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
550
+ t && /* @__PURE__ */ e.jsx("label", { id: j, className: "ds-select-label", children: t }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: S, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
- ref: L,
554
+ ref: M,
555
555
  type: "button",
556
- id: C,
556
+ id: z,
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && N >= 0 ? `${C}-opt-${N}` : void 0,
561
- "aria-labelledby": t ? w : void 0,
560
+ "aria-activedescendant": p && N >= 0 ? `${z}-opt-${N}` : void 0,
561
+ "aria-labelledby": t ? j : void 0,
562
562
  "aria-invalid": o ? "true" : "false",
563
- "aria-describedby": z,
563
+ "aria-describedby": F,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- d || (p ? V() : D());
566
+ c || (p ? V() : D());
567
567
  },
568
- onKeyDown: E,
569
- disabled: d,
568
+ onKeyDown: k,
569
+ disabled: c,
570
570
  ...u,
571
571
  children: [
572
572
  /* @__PURE__ */ e.jsx("span", { className: A ? "" : "ds-select-placeholder", children: (A == null ? void 0 : A.label) || a }),
@@ -575,18 +575,18 @@ function ms({
575
575
  {
576
576
  size: U,
577
577
  strokeWidth: 1.5,
578
- className: `ds-select-icon ${p && y === "down" ? "ds-select-icon--open" : ""} ${p && y === "up" ? "ds-select-icon--up" : ""}`,
578
+ className: `ds-select-icon ${p && $ === "down" ? "ds-select-icon--open" : ""} ${p && $ === "up" ? "ds-select-icon--up" : ""}`,
579
579
  "aria-hidden": "true"
580
580
  }
581
581
  )
582
582
  ]
583
583
  }
584
584
  ) }),
585
- o && /* @__PURE__ */ e.jsx("span", { id: z, className: "ds-select-error", role: "alert", children: o }),
585
+ o && /* @__PURE__ */ e.jsx("span", { id: F, className: "ds-select-error", role: "alert", children: o }),
586
586
  typeof document < "u" && me.createPortal(G, document.body)
587
587
  ] });
588
588
  }
589
- function ps({
589
+ function fs({
590
590
  label: t,
591
591
  value: s = 0,
592
592
  onChange: n,
@@ -595,39 +595,39 @@ function ps({
595
595
  step: o = 1,
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
- hint: d,
599
- error: c,
598
+ hint: c,
599
+ error: d,
600
600
  ...u
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const y = Math.min(Number(s) + o, a);
605
- n == null || n(y);
604
+ const $ = Math.min(Number(s) + o, a);
605
+ n == null || n($);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const y = Math.max(Number(s) - o, r);
609
- n == null || n(y);
610
- }, m = (y) => {
608
+ const $ = Math.max(Number(s) - o, r);
609
+ n == null || n($);
610
+ }, m = ($) => {
611
611
  if (l) return;
612
- const j = y.target.value;
613
- if (j === "") {
612
+ const _ = $.target.value;
613
+ if (_ === "") {
614
614
  n == null || n(r);
615
615
  return;
616
616
  }
617
- const N = Number(j);
617
+ const N = Number(_);
618
618
  if (!isNaN(N)) {
619
- const k = Math.min(Math.max(N, r), a);
620
- n == null || n(k);
619
+ const y = Math.min(Math.max(N, r), a);
620
+ n == null || n(y);
621
621
  }
622
622
  }, x = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
- c && "ds-stepper-wrapper--error"
625
+ d && "ds-stepper-wrapper--error"
626
626
  ].filter(Boolean).join(" "), b = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), v = i === "xs" ? F[1] : i === "small" ? F[2] : F[3];
630
+ ].filter(Boolean).join(" "), g = i === "xs" ? C[1] : i === "small" ? C[2] : C[3];
631
631
  return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
632
632
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
633
633
  /* @__PURE__ */ e.jsxs("div", { className: b, children: [
@@ -639,7 +639,7 @@ function ps({
639
639
  onClick: h,
640
640
  disabled: l || s <= r,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(at, { size: v, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(rt, { size: g, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -664,15 +664,15 @@ function ps({
664
664
  onClick: p,
665
665
  disabled: l || s >= a,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(ot, { size: v, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(at, { size: g, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
671
- d && !c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: d }),
672
- c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: c })
671
+ c && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
672
+ d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
673
673
  ] });
674
674
  }
675
- function hs({
675
+ function ms({
676
676
  children: t,
677
677
  padding: s = "m",
678
678
  variant: n = "info",
@@ -683,10 +683,10 @@ function hs({
683
683
  disabled: i = !1,
684
684
  ...l
685
685
  }) {
686
- const c = (r ? "interactive" : n) === "interactive" || a || o, u = [
686
+ const d = (r ? "interactive" : n) === "interactive" || a || o, u = [
687
687
  "ds-card",
688
688
  `ds-card--${s}`,
689
- c && "ds-card--interactive"
689
+ d && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
691
  if (o) {
692
692
  const m = (x) => {
@@ -708,7 +708,7 @@ function hs({
708
708
  }
709
709
  );
710
710
  }
711
- const p = c && a ? "button" : "div", h = c && a ? {
711
+ const p = d && a ? "button" : "div", h = d && a ? {
712
712
  type: "button",
713
713
  onClick: a,
714
714
  disabled: i
@@ -717,32 +717,32 @@ function hs({
717
717
  p,
718
718
  {
719
719
  className: u,
720
- role: c && !a ? "article" : void 0,
720
+ role: d && !a ? "article" : void 0,
721
721
  ...h,
722
722
  ...l,
723
723
  children: t
724
724
  }
725
725
  );
726
726
  }
727
- function xs({ children: t, ...s }) {
727
+ function ps({ children: t, ...s }) {
728
728
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
729
729
  }
730
- function vs({ children: t, ...s }) {
730
+ function hs({ children: t, ...s }) {
731
731
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
732
732
  }
733
- function _s({ children: t, ...s }) {
733
+ function xs({ children: t, ...s }) {
734
734
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
735
735
  }
736
- function bs({ children: t, ...s }) {
736
+ function vs({ children: t, ...s }) {
737
737
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
738
738
  }
739
- function js({ children: t, secondary: s = !1, ...n }) {
739
+ function _s({ children: t, secondary: s = !1, ...n }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
741
741
  }
742
- function yt({ children: t, secondary: s = !1, ...n }) {
742
+ function gt({ children: t, secondary: s = !1, ...n }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
744
744
  }
745
- function et({ children: t, secondary: s = !1, ...n }) {
745
+ function Qe({ children: t, secondary: s = !1, ...n }) {
746
746
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
747
747
  }
748
748
  function fe({
@@ -759,12 +759,12 @@ function fe({
759
759
  ].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
760
760
  return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...a, children: t });
761
761
  }
762
- const kt = {
763
- info: De,
764
- success: Ie,
762
+ const yt = {
763
+ info: Ie,
764
+ success: De,
765
765
  warning: Ae,
766
766
  error: Se
767
- }, Ns = H.forwardRef(function({
767
+ }, bs = q.forwardRef(function({
768
768
  children: s,
769
769
  variant: n = "info",
770
770
  title: r,
@@ -772,9 +772,9 @@ const kt = {
772
772
  role: o,
773
773
  ...i
774
774
  }, l) {
775
- const d = kt[n], c = o || (n === "error" ? "alert" : "status");
776
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: c, ...i, children: [
777
- d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: F[3], strokeWidth: 1.5 }) }),
775
+ const c = yt[n], d = o || (n === "error" ? "alert" : "status");
776
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: d, ...i, children: [
777
+ c && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(c, { size: C[3], strokeWidth: 1.5 }) }),
778
778
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
779
779
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
780
780
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
@@ -786,12 +786,12 @@ const kt = {
786
786
  className: "ds-alert__close",
787
787
  onClick: a,
788
788
  "aria-label": "Close alert",
789
- children: /* @__PURE__ */ e.jsx(Q, { size: F[3], strokeWidth: 1.5 })
789
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[3], strokeWidth: 1.5 })
790
790
  }
791
791
  )
792
792
  ] });
793
- }), Et = 200;
794
- function ws({
793
+ }), kt = 200;
794
+ function js({
795
795
  children: t,
796
796
  title: s,
797
797
  onClose: n,
@@ -800,32 +800,32 @@ function ws({
800
800
  subHeader: o,
801
801
  ...i
802
802
  }) {
803
- const l = R(null), d = H.useId(), [c, u] = I(!1), p = () => {
804
- !n || c || (u(!0), setTimeout(() => {
803
+ const l = R(null), c = q.useId(), [d, u] = I(!1), p = () => {
804
+ !n || d || (u(!0), setTimeout(() => {
805
805
  u(!1), n();
806
- }, Et));
806
+ }, kt));
807
807
  };
808
808
  P(() => {
809
- const b = (y) => {
810
- y.key === "Escape" && p();
811
- }, v = (y) => {
812
- var N, k, S;
813
- const j = ((k = (N = y.composedPath) == null ? void 0 : N.call(y)) == null ? void 0 : k[0]) ?? y.target;
814
- l.current && !l.current.contains(j) && !((S = j.closest) != null && S.call(j, "[data-ds-portal]")) && p();
809
+ const b = ($) => {
810
+ $.key === "Escape" && p();
811
+ }, g = ($) => {
812
+ var N, y, S;
813
+ const _ = ((y = (N = $.composedPath) == null ? void 0 : N.call($)) == null ? void 0 : y[0]) ?? $.target;
814
+ l.current && !l.current.contains(_) && !((S = _.closest) != null && S.call(_, "[data-ds-portal]")) && p();
815
815
  };
816
- return document.addEventListener("keydown", b), document.addEventListener("mousedown", v), () => {
817
- document.removeEventListener("keydown", b), document.removeEventListener("mousedown", v);
816
+ return document.addEventListener("keydown", b), document.addEventListener("mousedown", g), () => {
817
+ document.removeEventListener("keydown", b), document.removeEventListener("mousedown", g);
818
818
  };
819
- }, [n, c]);
820
- const h = H.Children.toArray(t), m = h.find((b) => (b == null ? void 0 : b.type) === he), x = h.filter((b) => (b == null ? void 0 : b.type) !== he);
821
- return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", c && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
819
+ }, [n, d]);
820
+ const h = q.Children.toArray(t), m = h.find((b) => (b == null ? void 0 : b.type) === he), x = h.filter((b) => (b == null ? void 0 : b.type) !== he);
821
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
822
822
  "div",
823
823
  {
824
824
  className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
825
825
  ref: l,
826
826
  role: "dialog",
827
827
  "aria-modal": "true",
828
- "aria-labelledby": s ? d : void 0,
828
+ "aria-labelledby": s ? c : void 0,
829
829
  children: [
830
830
  n && /* @__PURE__ */ e.jsx(
831
831
  ae,
@@ -833,13 +833,13 @@ function ws({
833
833
  className: "ds-modal__close",
834
834
  variant: "ghost",
835
835
  size: "small",
836
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
836
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
837
837
  onClick: p,
838
838
  "aria-label": "Close modal"
839
839
  }
840
840
  ),
841
841
  (s || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
842
- s && /* @__PURE__ */ e.jsx("h3", { id: d, className: "ds-modal__title", children: s }),
842
+ s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-modal__title", children: s }),
843
843
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
844
844
  ] }),
845
845
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
@@ -849,34 +849,34 @@ function ws({
849
849
  ) });
850
850
  }
851
851
  function he({ children: t }) {
852
- return !t || H.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
852
+ return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
853
853
  }
854
- const $t = 320;
855
- function gs({
854
+ const Et = 320;
855
+ function Ns({
856
856
  children: t,
857
857
  title: s,
858
858
  onClose: n,
859
859
  subHeader: r,
860
860
  ...a
861
861
  }) {
862
- const o = R(null), i = H.useId(), [l, d] = I(!1), c = () => {
863
- !n || l || (d(!0), setTimeout(() => {
864
- d(!1), n();
865
- }, $t));
862
+ const o = R(null), i = q.useId(), [l, c] = I(!1), d = () => {
863
+ !n || l || (c(!0), setTimeout(() => {
864
+ c(!1), n();
865
+ }, Et));
866
866
  };
867
867
  P(() => {
868
868
  const m = (b) => {
869
- b.key === "Escape" && c();
869
+ b.key === "Escape" && d();
870
870
  }, x = (b) => {
871
- var y, j, N;
872
- const v = ((j = (y = b.composedPath) == null ? void 0 : y.call(b)) == null ? void 0 : j[0]) ?? b.target;
873
- o.current && !o.current.contains(v) && !((N = v.closest) != null && N.call(v, "[data-ds-portal]")) && c();
871
+ var $, _, N;
872
+ const g = ((_ = ($ = b.composedPath) == null ? void 0 : $.call(b)) == null ? void 0 : _[0]) ?? b.target;
873
+ o.current && !o.current.contains(g) && !((N = g.closest) != null && N.call(g, "[data-ds-portal]")) && d();
874
874
  };
875
875
  return document.addEventListener("keydown", m), document.addEventListener("mousedown", x), () => {
876
876
  document.removeEventListener("keydown", m), document.removeEventListener("mousedown", x);
877
877
  };
878
878
  }, [n, l]);
879
- const u = H.Children.toArray(t), p = u.find((m) => (m == null ? void 0 : m.type) === he), h = u.filter((m) => (m == null ? void 0 : m.type) !== he);
879
+ const u = q.Children.toArray(t), p = u.find((m) => (m == null ? void 0 : m.type) === he), h = u.filter((m) => (m == null ? void 0 : m.type) !== he);
880
880
  return /* @__PURE__ */ e.jsx(
881
881
  "div",
882
882
  {
@@ -898,8 +898,8 @@ function gs({
898
898
  className: "ds-bottom-sheet__close",
899
899
  variant: "ghost",
900
900
  size: "small",
901
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
902
- onClick: c,
901
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
902
+ onClick: d,
903
903
  "aria-label": "Close"
904
904
  }
905
905
  ),
@@ -915,7 +915,7 @@ function gs({
915
915
  }
916
916
  );
917
917
  }
918
- function Tt({
918
+ function $t({
919
919
  children: t,
920
920
  title: s = "Code",
921
921
  defaultExpanded: n = !1,
@@ -925,8 +925,8 @@ function Tt({
925
925
  className: i = "",
926
926
  ...l
927
927
  }) {
928
- const [d, c] = I(n), u = r !== void 0, p = u ? r : d, h = () => {
929
- u ? a == null || a(!r) : c((x) => !x);
928
+ const [c, d] = I(n), u = r !== void 0, p = u ? r : c, h = () => {
929
+ u ? a == null || a(!r) : d((x) => !x);
930
930
  }, m = [
931
931
  "ds-code-accordion",
932
932
  `ds-code-accordion--${o}`,
@@ -946,7 +946,7 @@ function Tt({
946
946
  /* @__PURE__ */ e.jsx(
947
947
  je,
948
948
  {
949
- size: F[2],
949
+ size: C[2],
950
950
  strokeWidth: 1.5,
951
951
  className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
952
952
  }
@@ -957,10 +957,10 @@ function Tt({
957
957
  /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
958
958
  ] });
959
959
  }
960
- function ys({ children: t, block: s = !1, collapsible: n = !1, title: r = "Code", defaultExpanded: a = !1, ...o }) {
961
- return s ? n ? /* @__PURE__ */ e.jsx(Tt, { title: r, defaultExpanded: a, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
960
+ function ws({ children: t, block: s = !1, collapsible: n = !1, title: r = "Code", defaultExpanded: a = !1, ...o }) {
961
+ return s ? n ? /* @__PURE__ */ e.jsx($t, { title: r, defaultExpanded: a, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
962
962
  }
963
- function ks({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
963
+ function gs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
964
964
  const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
965
965
  return /* @__PURE__ */ e.jsx(
966
966
  "a",
@@ -975,16 +975,16 @@ function ks({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
975
975
  }
976
976
  );
977
977
  }
978
- function Es({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: H.Children.map(t, (a) => H.isValidElement(a) ? H.cloneElement(a, { size: s, variant: n }) : a) });
978
+ function ys({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: q.Children.map(t, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: s, variant: n }) : a) });
980
980
  }
981
- function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...d }) {
982
- const c = i && !t, u = [
981
+ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
982
+ const d = i && !t, u = [
983
983
  "ds-tab",
984
984
  `ds-tab--${r}`,
985
985
  `ds-tab--${a}`,
986
986
  s && "ds-tab--selected",
987
- c && "ds-tab--icon-only"
987
+ d && "ds-tab--icon-only"
988
988
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
989
989
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
990
990
  t
@@ -1006,7 +1006,7 @@ function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1006
1006
  className: u,
1007
1007
  href: o ? void 0 : l,
1008
1008
  onClick: h,
1009
- ...d,
1009
+ ...c,
1010
1010
  children: p
1011
1011
  }
1012
1012
  );
@@ -1019,32 +1019,32 @@ function $s({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1019
1019
  className: u,
1020
1020
  onClick: n,
1021
1021
  disabled: o,
1022
- ...d,
1022
+ ...c,
1023
1023
  children: p
1024
1024
  }
1025
1025
  );
1026
1026
  }
1027
- function Ts({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1028
- const o = R(null), i = R(null), [l, d] = I(!1), c = R(!1), u = R(null), p = R(null), h = () => {
1027
+ function Es({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1028
+ const o = R(null), i = R(null), [l, c] = I(!1), d = R(!1), u = R(null), p = R(null), h = () => {
1029
1029
  if (!o.current) return;
1030
1030
  const m = o.current.querySelector(`[data-value="${s}"]`);
1031
1031
  if (!m) return;
1032
- const x = o.current.getBoundingClientRect(), b = m.getBoundingClientRect(), v = b.left - x.left, y = b.width;
1033
- i.current ? (i.current.style.transition = c.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = v + "px", i.current.style.width = y + "px", c.current = !1) : (d(!0), requestAnimationFrame(() => {
1032
+ const x = o.current.getBoundingClientRect(), b = m.getBoundingClientRect(), g = b.left - x.left, $ = b.width;
1033
+ i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = $ + "px", d.current = !1) : (c(!0), requestAnimationFrame(() => {
1034
1034
  if (!i.current || !o.current) return;
1035
- const j = o.current.querySelector(`[data-value="${s}"]`);
1036
- if (!j) return;
1037
- const N = o.current.getBoundingClientRect(), k = j.getBoundingClientRect();
1038
- i.current.style.transition = "none", i.current.style.left = k.left - N.left + "px", i.current.style.width = k.width + "px";
1035
+ const _ = o.current.querySelector(`[data-value="${s}"]`);
1036
+ if (!_) return;
1037
+ const N = o.current.getBoundingClientRect(), y = _.getBoundingClientRect();
1038
+ i.current.style.transition = "none", i.current.style.left = y.left - N.left + "px", i.current.style.width = y.width + "px";
1039
1039
  }));
1040
1040
  };
1041
- return p.current = h, rt(() => {
1041
+ return p.current = h, nt(() => {
1042
1042
  const m = u.current !== s;
1043
- u.current = s, c.current = l && m, h();
1043
+ u.current = s, d.current = l && m, h();
1044
1044
  }), P(() => {
1045
1045
  if (!o.current) return;
1046
1046
  const m = new ResizeObserver(() => {
1047
- c.current = !1, p.current();
1047
+ d.current = !1, p.current();
1048
1048
  });
1049
1049
  return m.observe(o.current), () => m.disconnect();
1050
1050
  }, []), /* @__PURE__ */ e.jsxs(
@@ -1095,8 +1095,8 @@ function Be({
1095
1095
  padding: o = "m",
1096
1096
  ...i
1097
1097
  }) {
1098
- const [l, d] = I(n), c = r !== void 0, u = c ? r : l, p = () => {
1099
- c ? a == null || a(!r) : d((m) => !m);
1098
+ const [l, c] = I(n), d = r !== void 0, u = d ? r : l, p = () => {
1099
+ d ? a == null || a(!r) : c((m) => !m);
1100
1100
  }, h = [
1101
1101
  "ds-accordion",
1102
1102
  `ds-accordion--${o}`,
@@ -1115,7 +1115,7 @@ function Be({
1115
1115
  /* @__PURE__ */ e.jsx(
1116
1116
  je,
1117
1117
  {
1118
- size: F[2],
1118
+ size: C[2],
1119
1119
  strokeWidth: 1.5,
1120
1120
  className: `ds-accordion__icon ${u ? "ds-accordion__icon--expanded" : ""}`
1121
1121
  }
@@ -1127,7 +1127,7 @@ function Be({
1127
1127
  ] });
1128
1128
  }
1129
1129
  const re = 8, pe = 8;
1130
- function Rt(t, s, n) {
1130
+ function Tt(t, s, n) {
1131
1131
  const r = window.innerWidth;
1132
1132
  let a, o;
1133
1133
  switch (t) {
@@ -1149,7 +1149,7 @@ function Rt(t, s, n) {
1149
1149
  const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
1150
1150
  return { top: a, left: i, arrowOffset: l };
1151
1151
  }
1152
- function St(t, s, n) {
1152
+ function Rt(t, s, n) {
1153
1153
  const r = window.innerWidth, a = window.innerHeight;
1154
1154
  if (t.top >= s + re + pe) return "top";
1155
1155
  if (a - t.bottom >= s + re + pe) return "bottom";
@@ -1159,15 +1159,15 @@ function St(t, s, n) {
1159
1159
  return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1160
1160
  }
1161
1161
  function Le({ children: t, content: s, position: n, ...r }) {
1162
- const [a, o] = I(!1), [i, l] = I({ visibility: "hidden" }), [d, c] = I(n || "top"), u = R(null), p = R(null), h = R(!1), m = () => {
1162
+ const [a, o] = I(!1), [i, l] = I({ visibility: "hidden" }), [c, d] = I(n || "top"), u = R(null), p = R(null), h = R(!1), m = () => {
1163
1163
  if (!u.current || !p.current) return;
1164
- const b = u.current.getBoundingClientRect(), v = p.current.getBoundingClientRect(), y = n || St(b, v.height, v.width), { top: j, left: N, arrowOffset: k } = Rt(y, b, v);
1165
- c(y), l({
1164
+ const b = u.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), $ = n || Rt(b, g.height, g.width), { top: _, left: N, arrowOffset: y } = Tt($, b, g);
1165
+ d($), l({
1166
1166
  position: "fixed",
1167
- top: j,
1167
+ top: _,
1168
1168
  left: N,
1169
1169
  visibility: "visible",
1170
- "--arrow-offset": `${k}px`
1170
+ "--arrow-offset": `${y}px`
1171
1171
  });
1172
1172
  };
1173
1173
  if (P(() => {
@@ -1179,8 +1179,8 @@ function Le({ children: t, content: s, position: n, ...r }) {
1179
1179
  };
1180
1180
  }, [a, n]), P(() => {
1181
1181
  if (!a) return;
1182
- const b = (v) => {
1183
- u.current && !u.current.contains(v.target) && o(!1);
1182
+ const b = (g) => {
1183
+ u.current && !u.current.contains(g.target) && o(!1);
1184
1184
  };
1185
1185
  return document.addEventListener("touchstart", b), () => document.removeEventListener("touchstart", b);
1186
1186
  }, [a]), !s) return t;
@@ -1189,7 +1189,7 @@ function Le({ children: t, content: s, position: n, ...r }) {
1189
1189
  {
1190
1190
  ref: p,
1191
1191
  "data-ds-portal": "",
1192
- className: `ds-tooltip ds-tooltip--${d}`,
1192
+ className: `ds-tooltip ds-tooltip--${c}`,
1193
1193
  role: "tooltip",
1194
1194
  style: i,
1195
1195
  children: s
@@ -1217,7 +1217,7 @@ function Le({ children: t, content: s, position: n, ...r }) {
1217
1217
  }
1218
1218
  );
1219
1219
  }
1220
- function Rs({
1220
+ function $s({
1221
1221
  checked: t = !1,
1222
1222
  onChange: s,
1223
1223
  size: n = "m",
@@ -1226,12 +1226,12 @@ function Rs({
1226
1226
  id: o,
1227
1227
  ...i
1228
1228
  }) {
1229
- const l = o || `toggle-${H.useId()}`, d = [
1229
+ const l = o || `toggle-${q.useId()}`, c = [
1230
1230
  "ds-toggle",
1231
1231
  `ds-toggle--${n}`,
1232
1232
  r && "ds-toggle--disabled"
1233
1233
  ].filter(Boolean).join(" ");
1234
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1234
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1235
1235
  /* @__PURE__ */ e.jsx(
1236
1236
  "input",
1237
1237
  {
@@ -1239,7 +1239,7 @@ function Rs({
1239
1239
  id: l,
1240
1240
  className: "ds-toggle__input",
1241
1241
  checked: t,
1242
- onChange: (c) => s == null ? void 0 : s(c.target.checked),
1242
+ onChange: (d) => s == null ? void 0 : s(d.target.checked),
1243
1243
  disabled: r,
1244
1244
  ...i
1245
1245
  }
@@ -1248,7 +1248,7 @@ function Rs({
1248
1248
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1249
1249
  ] });
1250
1250
  }
1251
- function Ss({
1251
+ function Ts({
1252
1252
  checked: t = !1,
1253
1253
  onChange: s,
1254
1254
  size: n = "m",
@@ -1257,12 +1257,12 @@ function Ss({
1257
1257
  id: o,
1258
1258
  ...i
1259
1259
  }) {
1260
- const l = o || `checkbox-${H.useId()}`, d = [
1260
+ const l = o || `checkbox-${q.useId()}`, c = [
1261
1261
  "ds-checkbox",
1262
1262
  `ds-checkbox--${n}`,
1263
1263
  r && "ds-checkbox--disabled"
1264
- ].filter(Boolean).join(" "), c = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
- return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: l, children: [
1264
+ ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
+ return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1266
1266
  /* @__PURE__ */ e.jsx(
1267
1267
  "input",
1268
1268
  {
@@ -1278,7 +1278,7 @@ function Ss({
1278
1278
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1279
1279
  Re,
1280
1280
  {
1281
- size: c,
1281
+ size: d,
1282
1282
  strokeWidth: 2.5,
1283
1283
  className: "ds-checkbox__icon"
1284
1284
  }
@@ -1286,7 +1286,7 @@ function Ss({
1286
1286
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1287
1287
  ] });
1288
1288
  }
1289
- function As({
1289
+ function Rs({
1290
1290
  checked: t = !1,
1291
1291
  onChange: s,
1292
1292
  size: n = "m",
@@ -1295,33 +1295,33 @@ function As({
1295
1295
  name: o,
1296
1296
  value: i,
1297
1297
  id: l,
1298
- ...d
1298
+ ...c
1299
1299
  }) {
1300
- const c = l || `radio-${H.useId()}`, u = [
1300
+ const d = l || `radio-${q.useId()}`, u = [
1301
1301
  "ds-radio",
1302
1302
  `ds-radio--${n}`,
1303
1303
  r && "ds-radio--disabled"
1304
1304
  ].filter(Boolean).join(" ");
1305
- return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: c, children: [
1305
+ return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: d, children: [
1306
1306
  /* @__PURE__ */ e.jsx(
1307
1307
  "input",
1308
1308
  {
1309
1309
  type: "radio",
1310
- id: c,
1310
+ id: d,
1311
1311
  className: "ds-radio__input",
1312
1312
  checked: t,
1313
1313
  onChange: (p) => s == null ? void 0 : s(p.target.checked),
1314
1314
  disabled: r,
1315
1315
  name: o,
1316
1316
  value: i,
1317
- ...d
1317
+ ...c
1318
1318
  }
1319
1319
  ),
1320
1320
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1321
1321
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1322
1322
  ] });
1323
1323
  }
1324
- function At({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1324
+ function St({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1325
1325
  return /* @__PURE__ */ e.jsx(
1326
1326
  "span",
1327
1327
  {
@@ -1332,7 +1332,7 @@ function At({ width: t, height: s, shape: n = "rect", aspectRatio: r, className:
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- function It({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1335
+ function At({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1336
1336
  return /* @__PURE__ */ e.jsx(
1337
1337
  "span",
1338
1338
  {
@@ -1351,20 +1351,20 @@ function It({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "",
1351
1351
  }
1352
1352
  );
1353
1353
  }
1354
- At.Text = It;
1354
+ St.Text = At;
1355
1355
  function Dt(t) {
1356
1356
  let s = 2166136261;
1357
1357
  for (let n = 0; n < t.length; n++)
1358
1358
  s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
1359
1359
  return s % 360;
1360
1360
  }
1361
- function Bt(t) {
1361
+ function It(t) {
1362
1362
  if (!t) return "";
1363
1363
  const s = t.trim().split(/\s+/);
1364
1364
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1365
1365
  }
1366
- function Is({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1367
- const l = Dt(t ?? ""), [d, c] = I(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Bt(t) });
1366
+ function Ss({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1367
+ const l = Dt(t ?? ""), [c, d] = I(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: It(t) });
1368
1368
  return /* @__PURE__ */ e.jsx(
1369
1369
  "div",
1370
1370
  {
@@ -1372,11 +1372,11 @@ function Is({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style:
1372
1372
  style: { width: r, height: r, "--ds-avatar-h": l, ...o },
1373
1373
  "aria-hidden": "true",
1374
1374
  ...i,
1375
- children: n && !d ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => c(!0) }) : u
1375
+ children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : u
1376
1376
  }
1377
1377
  );
1378
1378
  }
1379
- function Ds({
1379
+ function As({
1380
1380
  children: t,
1381
1381
  size: s = "compact",
1382
1382
  stickyTop: n,
@@ -1406,13 +1406,13 @@ function Ds({
1406
1406
  }
1407
1407
  );
1408
1408
  }
1409
- function Bs({ children: t, ...s }) {
1409
+ function Ds({ children: t, ...s }) {
1410
1410
  return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
1411
1411
  }
1412
- function Ls({ children: t, ...s }) {
1412
+ function Is({ children: t, ...s }) {
1413
1413
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1414
1414
  }
1415
- function Ps({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...d }) {
1415
+ function Bs({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
1416
1416
  return /* @__PURE__ */ e.jsx(
1417
1417
  "tr",
1418
1418
  {
@@ -1426,22 +1426,22 @@ function Ps({ children: t, interactive: s, selected: n, subheader: r, exiting: a
1426
1426
  i
1427
1427
  ].filter(Boolean).join(" "),
1428
1428
  onClick: l,
1429
- ...d,
1429
+ ...c,
1430
1430
  children: t
1431
1431
  }
1432
1432
  );
1433
1433
  }
1434
- function Ms({ children: t, colSpan: s = 999, ...n }) {
1434
+ function Ls({ children: t, colSpan: s = 999, ...n }) {
1435
1435
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1436
1436
  }
1437
- function zs({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1438
- const d = !!r || n !== void 0, c = n === "asc" ? it : n === "desc" ? je : lt;
1437
+ function Ps({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1438
+ const c = !!r || n !== void 0, d = n === "asc" ? ot : n === "desc" ? je : it;
1439
1439
  return /* @__PURE__ */ e.jsx(
1440
1440
  "th",
1441
1441
  {
1442
1442
  className: [
1443
1443
  "ds-th",
1444
- d ? "ds-th--sortable" : "",
1444
+ c ? "ds-th--sortable" : "",
1445
1445
  n ? "ds-th--sorted" : "",
1446
1446
  s !== "left" ? `ds-table-cell--${s}` : "",
1447
1447
  o
@@ -1449,14 +1449,14 @@ function zs({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
1449
1449
  onClick: r,
1450
1450
  style: { width: a, ...i },
1451
1451
  ...l,
1452
- children: d ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1452
+ children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1453
1453
  t,
1454
- /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(c, { size: 11, strokeWidth: 2.5 }) })
1454
+ /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
1455
1455
  ] }) : t
1456
1456
  }
1457
1457
  );
1458
1458
  }
1459
- function Fs({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1459
+ function Ms({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1460
1460
  return /* @__PURE__ */ e.jsx(
1461
1461
  "td",
1462
1462
  {
@@ -1474,7 +1474,7 @@ function Fs({ children: t, align: s = "left", secondary: n, muted: r, truncate:
1474
1474
  }
1475
1475
  );
1476
1476
  }
1477
- function Cs({
1477
+ function zs({
1478
1478
  icon: t,
1479
1479
  title: s,
1480
1480
  description: n,
@@ -1497,7 +1497,7 @@ function Cs({
1497
1497
  }
1498
1498
  );
1499
1499
  }
1500
- function Ws({
1500
+ function Fs({
1501
1501
  label: t,
1502
1502
  hint: s,
1503
1503
  error: n,
@@ -1506,10 +1506,10 @@ function Ws({
1506
1506
  htmlFor: o,
1507
1507
  children: i,
1508
1508
  className: l = "",
1509
- style: d,
1510
- ...c
1509
+ style: c,
1510
+ ...d
1511
1511
  }) {
1512
- const u = H.useId(), p = o ?? u, h = `${p}-hint`, m = `${p}-error`;
1512
+ const u = q.useId(), p = o ?? u, h = `${p}-hint`, m = `${p}-error`;
1513
1513
  return /* @__PURE__ */ e.jsxs(
1514
1514
  "div",
1515
1515
  {
@@ -1517,8 +1517,8 @@ function Ws({
1517
1517
  "data-state": n ? "error" : void 0,
1518
1518
  "data-required": r ? "" : void 0,
1519
1519
  "data-disabled": a ? "" : void 0,
1520
- style: d,
1521
- ...c,
1520
+ style: c,
1521
+ ...d,
1522
1522
  children: [
1523
1523
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
1524
1524
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
@@ -1528,8 +1528,8 @@ function Ws({
1528
1528
  }
1529
1529
  );
1530
1530
  }
1531
- function Os({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1532
- const d = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1531
+ function Ws({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1532
+ const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1533
1533
  return /* @__PURE__ */ e.jsxs(
1534
1534
  "div",
1535
1535
  {
@@ -1544,12 +1544,12 @@ function Os({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
1544
1544
  children: [
1545
1545
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: t }),
1546
1546
  s != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: s }),
1547
- n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${d}`, children: n })
1547
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${c}`, children: n })
1548
1548
  ]
1549
1549
  }
1550
1550
  );
1551
1551
  }
1552
- function Us({
1552
+ function Cs({
1553
1553
  children: t,
1554
1554
  separator: s = "/",
1555
1555
  "aria-label": n = "Breadcrumb",
@@ -1557,7 +1557,7 @@ function Us({
1557
1557
  style: a,
1558
1558
  ...o
1559
1559
  }) {
1560
- const i = H.Children.toArray(t).filter(Boolean);
1560
+ const i = q.Children.toArray(t).filter(Boolean);
1561
1561
  return /* @__PURE__ */ e.jsx(
1562
1562
  "nav",
1563
1563
  {
@@ -1565,14 +1565,14 @@ function Us({
1565
1565
  "aria-label": n,
1566
1566
  style: a,
1567
1567
  ...o,
1568
- children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, d) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1568
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, c) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1569
1569
  l,
1570
- d < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
- ] }, d)) })
1570
+ c < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
1571
+ ] }, c)) })
1572
1572
  }
1573
1573
  );
1574
1574
  }
1575
- function Vs({
1575
+ function Os({
1576
1576
  page: t,
1577
1577
  total: s,
1578
1578
  onChange: n,
@@ -1582,7 +1582,7 @@ function Vs({
1582
1582
  style: i,
1583
1583
  ...l
1584
1584
  }) {
1585
- const d = Lt(t, s, r);
1585
+ const c = Bt(t, s, r);
1586
1586
  return /* @__PURE__ */ e.jsxs(
1587
1587
  "nav",
1588
1588
  {
@@ -1598,20 +1598,20 @@ function Vs({
1598
1598
  onClick: () => n == null ? void 0 : n(t - 1),
1599
1599
  disabled: t <= 1,
1600
1600
  "aria-label": "Previous page",
1601
- children: /* @__PURE__ */ e.jsx(ct, { size: 16 })
1601
+ children: /* @__PURE__ */ e.jsx(lt, { size: 16 })
1602
1602
  }
1603
1603
  ),
1604
- d.map(
1605
- (c, u) => c === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1604
+ c.map(
1605
+ (d, u) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1606
1606
  "button",
1607
1607
  {
1608
- className: `ds-pagination-page${c === t ? " ds-pagination-page--current" : ""}`,
1609
- onClick: () => c !== t && (n == null ? void 0 : n(c)),
1610
- "aria-current": c === t ? "page" : void 0,
1611
- "aria-label": `Page ${c}`,
1612
- children: c
1608
+ className: `ds-pagination-page${d === t ? " ds-pagination-page--current" : ""}`,
1609
+ onClick: () => d !== t && (n == null ? void 0 : n(d)),
1610
+ "aria-current": d === t ? "page" : void 0,
1611
+ "aria-label": `Page ${d}`,
1612
+ children: d
1613
1613
  },
1614
- c
1614
+ d
1615
1615
  )
1616
1616
  ),
1617
1617
  /* @__PURE__ */ e.jsx(
@@ -1621,123 +1621,68 @@ function Vs({
1621
1621
  onClick: () => n == null ? void 0 : n(t + 1),
1622
1622
  disabled: t >= s,
1623
1623
  "aria-label": "Next page",
1624
- children: /* @__PURE__ */ e.jsx(dt, { size: 16 })
1624
+ children: /* @__PURE__ */ e.jsx(ct, { size: 16 })
1625
1625
  }
1626
1626
  )
1627
1627
  ]
1628
1628
  }
1629
1629
  );
1630
1630
  }
1631
- function Lt(t, s, n) {
1631
+ function Bt(t, s, n) {
1632
1632
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1633
1633
  const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
1634
1634
  r > 2 && o.push("…");
1635
1635
  for (let i = r; i <= a; i++) o.push(i);
1636
1636
  return a < s - 1 && o.push("…"), o.push(s), o;
1637
1637
  }
1638
- const Pt = 200;
1639
- function Ys({
1640
- children: t,
1641
- title: s,
1642
- onClose: n,
1643
- side: r = "right",
1644
- offsetLeft: a = 0,
1645
- offsetRight: o = 0,
1646
- keepOpenRef: i,
1647
- ...l
1648
- }) {
1649
- const d = R(null), c = H.useId(), [u, p] = I(!1), h = () => {
1650
- !n || u || (p(!0), setTimeout(() => {
1651
- p(!1), n();
1652
- }, Pt));
1653
- };
1654
- P(() => {
1655
- const v = (j) => {
1656
- j.key === "Escape" && h();
1657
- }, y = (j) => {
1658
- var k, S, B, L;
1659
- const N = ((S = (k = j.composedPath) == null ? void 0 : k.call(j)) == null ? void 0 : S[0]) ?? j.target;
1660
- (B = i == null ? void 0 : i.current) != null && B.contains(N) || d.current && !d.current.contains(N) && !((L = N.closest) != null && L.call(N, "[data-ds-portal]")) && h();
1661
- };
1662
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", y), () => {
1663
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", y);
1664
- };
1665
- }, [n, u, i]);
1666
- const m = H.Children.toArray(t), x = m.find((v) => (v == null ? void 0 : v.type) === Oe), b = m.filter((v) => (v == null ? void 0 : v.type) !== Oe);
1667
- return /* @__PURE__ */ e.jsx(
1668
- "div",
1669
- {
1670
- className: ["ds-drawer-overlay", u && "ds-drawer-overlay--closing"].filter(Boolean).join(" "),
1671
- style: { "--ds-drawer-offset-left": `${a}px`, "--ds-drawer-offset-right": `${o}px` },
1672
- ...l,
1673
- children: /* @__PURE__ */ e.jsxs(
1674
- "aside",
1675
- {
1676
- className: ["ds-drawer", u && "ds-drawer--closing"].filter(Boolean).join(" "),
1677
- "data-side": r,
1678
- ref: d,
1679
- role: "dialog",
1680
- "aria-modal": "true",
1681
- "aria-labelledby": s ? c : void 0,
1682
- children: [
1683
- /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1684
- s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-drawer-title", children: s }),
1685
- n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: h, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }) })
1686
- ] }),
1687
- /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: b }),
1688
- x
1689
- ]
1690
- }
1691
- )
1692
- }
1693
- );
1694
- }
1695
- function Oe({ children: t }) {
1696
- return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
1697
- }
1698
- const Mt = 320;
1699
- function Hs({
1638
+ const Lt = 300;
1639
+ function Us({
1700
1640
  children: t,
1701
1641
  title: s,
1702
1642
  onClose: n,
1703
1643
  subHeader: r,
1704
- offsetLeft: a = 0,
1705
- offsetRight: o = 0,
1706
- keepOpenRef: i,
1707
- ...l
1644
+ side: a = "right",
1645
+ size: o = "wide",
1646
+ offsetLeft: i = 0,
1647
+ offsetRight: l = 0,
1648
+ keepOpenRef: c,
1649
+ ...d
1708
1650
  }) {
1709
- const d = R(null), c = H.useId(), [u, p] = I(!1), h = () => {
1710
- !n || u || (p(!0), setTimeout(() => {
1711
- p(!1), n();
1712
- }, Mt));
1651
+ const u = R(null), p = q.useId(), [h, m] = I(!1), x = () => {
1652
+ !n || h || (m(!0), setTimeout(() => {
1653
+ m(!1), n();
1654
+ }, Lt));
1713
1655
  };
1714
1656
  P(() => {
1715
- const v = (j) => {
1716
- j.key === "Escape" && h();
1717
- }, y = (j) => {
1718
- var k, S, B, L;
1719
- const N = ((S = (k = j.composedPath) == null ? void 0 : k.call(j)) == null ? void 0 : S[0]) ?? j.target;
1720
- (B = i == null ? void 0 : i.current) != null && B.contains(N) || d.current && !d.current.contains(N) && !((L = N.closest) != null && L.call(N, "[data-ds-portal]")) && h();
1657
+ const _ = (y) => {
1658
+ y.key === "Escape" && x();
1659
+ }, N = (y) => {
1660
+ var B, M, W, z;
1661
+ const S = ((M = (B = y.composedPath) == null ? void 0 : B.call(y)) == null ? void 0 : M[0]) ?? y.target;
1662
+ (W = c == null ? void 0 : c.current) != null && W.contains(S) || u.current && !u.current.contains(S) && !((z = S.closest) != null && z.call(S, "[data-ds-portal]")) && x();
1721
1663
  };
1722
- return document.addEventListener("keydown", v), document.addEventListener("mousedown", y), () => {
1723
- document.removeEventListener("keydown", v), document.removeEventListener("mousedown", y);
1664
+ return document.addEventListener("keydown", _), document.addEventListener("mousedown", N), () => {
1665
+ document.removeEventListener("keydown", _), document.removeEventListener("mousedown", N);
1724
1666
  };
1725
- }, [n, u, i]);
1726
- const m = H.Children.toArray(t), x = m.find((v) => (v == null ? void 0 : v.type) === Ue || (v == null ? void 0 : v.type) === he), b = m.filter((v) => (v == null ? void 0 : v.type) !== Ue && (v == null ? void 0 : v.type) !== he);
1667
+ }, [n, h, c]);
1668
+ const b = q.Children.toArray(t), g = b.find((_) => (_ == null ? void 0 : _.type) === Oe || (_ == null ? void 0 : _.type) === he), $ = b.filter((_) => (_ == null ? void 0 : _.type) !== Oe && (_ == null ? void 0 : _.type) !== he);
1727
1669
  return /* @__PURE__ */ e.jsx(
1728
1670
  "div",
1729
1671
  {
1730
- className: ["ds-side-page-overlay", u && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1731
- style: { "--ds-side-page-offset-left": `${a}px`, "--ds-side-page-offset-right": `${o}px` },
1732
- ...l,
1672
+ className: ["ds-side-page-overlay", h && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1673
+ "data-side": a,
1674
+ style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1675
+ ...d,
1733
1676
  children: /* @__PURE__ */ e.jsxs(
1734
1677
  "div",
1735
1678
  {
1736
- ref: d,
1737
- className: ["ds-side-page", u && "ds-side-page--closing"].filter(Boolean).join(" "),
1679
+ ref: u,
1680
+ className: ["ds-side-page", h && "ds-side-page--closing"].filter(Boolean).join(" "),
1681
+ "data-side": a,
1682
+ "data-size": o,
1738
1683
  role: "dialog",
1739
1684
  "aria-modal": "true",
1740
- "aria-labelledby": s ? c : void 0,
1685
+ "aria-labelledby": s ? p : void 0,
1741
1686
  children: [
1742
1687
  n && /* @__PURE__ */ e.jsx(
1743
1688
  ae,
@@ -1745,55 +1690,63 @@ function Hs({
1745
1690
  className: "ds-side-page__close",
1746
1691
  variant: "ghost",
1747
1692
  size: "small",
1748
- icon: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 }),
1749
- onClick: h,
1693
+ icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
1694
+ onClick: x,
1750
1695
  "aria-label": "Close"
1751
1696
  }
1752
1697
  ),
1753
1698
  (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1754
- s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-side-page__title", children: s }),
1699
+ s && /* @__PURE__ */ e.jsx("h3", { id: p, className: "ds-side-page__title", children: s }),
1755
1700
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
1756
1701
  ] }),
1757
- /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: b }),
1758
- x
1702
+ /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: $ }),
1703
+ g
1759
1704
  ]
1760
1705
  }
1761
1706
  )
1762
1707
  }
1763
1708
  );
1764
1709
  }
1765
- function Ue({ children: t }) {
1766
- return !t || H.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1710
+ function Oe({ children: t }) {
1711
+ return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
1767
1712
  }
1768
- const ve = Qe({ collapsed: !1, side: "left" }), we = Qe(!1), qs = Ze(function({
1713
+ const ve = Ze({ collapsed: !1, side: "left" }), we = Ze(!1), Vs = Je(function({
1769
1714
  children: s,
1770
1715
  collapsed: n = !1,
1771
1716
  side: r = "left",
1772
1717
  onExpand: a,
1773
- className: o = "",
1774
- ...i
1775
- }, l) {
1718
+ onCollapse: o,
1719
+ className: i = "",
1720
+ ...l
1721
+ }, c) {
1776
1722
  const d = [
1777
1723
  "ds-nav-rail",
1778
1724
  n && "ds-nav-rail--collapsed",
1779
1725
  `ds-nav-rail--${r}`,
1780
- o
1781
- ].filter(Boolean).join(" "), c = le((u) => {
1782
- !n || !a || u.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]') || a();
1783
- }, [n, a]);
1726
+ i
1727
+ ].filter(Boolean).join(" "), u = le((p) => {
1728
+ if (!p.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]')) {
1729
+ if (n && a) {
1730
+ a();
1731
+ return;
1732
+ }
1733
+ !n && o && o();
1734
+ }
1735
+ }, [n, a, o]);
1784
1736
  return /* @__PURE__ */ e.jsx(ve.Provider, { value: { collapsed: n, side: r }, children: /* @__PURE__ */ e.jsx(
1785
1737
  "nav",
1786
1738
  {
1787
- ref: l,
1739
+ ref: c,
1788
1740
  className: d,
1789
- onClick: c,
1741
+ onClick: u,
1790
1742
  "data-expandable": n && a ? "" : void 0,
1791
- ...i,
1743
+ "data-collapsible": !n && o ? "" : void 0,
1744
+ ...l,
1792
1745
  children: s
1793
1746
  }
1794
1747
  ) });
1795
1748
  });
1796
- function Gs({
1749
+ function Ys({
1797
1750
  icon: t,
1798
1751
  label: s,
1799
1752
  selected: n = !1,
@@ -1802,12 +1755,12 @@ function Gs({
1802
1755
  onClick: o,
1803
1756
  count: i,
1804
1757
  updated: l = !1,
1805
- open: d = !1,
1806
- onboarding: c = !1,
1758
+ open: c = !1,
1759
+ onboarding: d = !1,
1807
1760
  className: u = "",
1808
1761
  ...p
1809
1762
  }) {
1810
- const { collapsed: h, side: m } = de(ve), x = de(we), y = {
1763
+ const { collapsed: h, side: m } = de(ve), x = de(we), $ = {
1811
1764
  className: [
1812
1765
  "ds-nav-rail__item",
1813
1766
  u
@@ -1820,32 +1773,32 @@ function Gs({
1820
1773
  ...{
1821
1774
  "data-selected": n || void 0,
1822
1775
  "data-disabled": r || void 0,
1823
- "data-open": d || void 0,
1824
- "data-onboarding": c || void 0
1776
+ "data-open": c || void 0,
1777
+ "data-onboarding": d || void 0
1825
1778
  },
1826
1779
  ...p
1827
- }, j = i != null, N = m === "left" ? "right" : "left", k = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1780
+ }, _ = i != null, N = m === "left" ? "right" : "left", y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1828
1781
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1829
1782
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1830
1783
  !h && l && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1831
- !h && j && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1784
+ !h && _ && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1832
1785
  h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1833
- ] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...y, children: k }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...y, children: k });
1786
+ ] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...$, children: y }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...$, children: y });
1834
1787
  return h && !x ? /* @__PURE__ */ e.jsx(Le, { content: s, position: N, children: S }) : S;
1835
1788
  }
1836
- function Ks({ children: t, className: s = "", ...n }) {
1789
+ function Hs({ children: t, className: s = "", ...n }) {
1837
1790
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
1838
1791
  }
1839
- function Xs({ children: t, className: s = "", ...n }) {
1792
+ function qs({ children: t, className: s = "", ...n }) {
1840
1793
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
1841
1794
  }
1842
- function Js({ children: t, className: s = "", ...n }) {
1795
+ function Gs({ children: t, className: s = "", ...n }) {
1843
1796
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
1844
1797
  }
1845
- function Zs({ className: t = "", ...s }) {
1798
+ function Ks({ className: t = "", ...s }) {
1846
1799
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
1847
1800
  }
1848
- function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...a }) {
1801
+ function Xs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...a }) {
1849
1802
  const { collapsed: o } = de(ve), [i, l] = I(n);
1850
1803
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
1851
1804
  !o && /* @__PURE__ */ e.jsxs(
@@ -1853,7 +1806,7 @@ function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1853
1806
  {
1854
1807
  type: "button",
1855
1808
  className: ["ds-nav-rail__recents-toggle", !i && "ds-nav-rail__recents-toggle--closed"].filter(Boolean).join(" "),
1856
- onClick: () => l((d) => !d),
1809
+ onClick: () => l((c) => !c),
1857
1810
  "aria-expanded": i,
1858
1811
  children: [
1859
1812
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: s }),
@@ -1864,14 +1817,14 @@ function Qs({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
1864
1817
  (i || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
1865
1818
  ] });
1866
1819
  }
1867
- const en = Ze(function({
1820
+ const Js = Je(function({
1868
1821
  as: s = "button",
1869
1822
  avatar: n,
1870
1823
  label: r,
1871
1824
  className: a = "",
1872
1825
  ...o
1873
1826
  }, i) {
1874
- const { collapsed: l, side: d } = de(ve), c = de(we), u = d === "left" ? "right" : "left", p = [
1827
+ const { collapsed: l, side: c } = de(ve), d = de(we), u = c === "left" ? "right" : "left", p = [
1875
1828
  "ds-nav-rail__item",
1876
1829
  "ds-nav-rail__agent",
1877
1830
  a
@@ -1889,10 +1842,10 @@ const en = Ze(function({
1889
1842
  children: h
1890
1843
  }
1891
1844
  );
1892
- return l && !c ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: m }) : m;
1845
+ return l && !d ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: m }) : m;
1893
1846
  });
1894
- function tn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
1895
- const { collapsed: d, side: c } = de(ve), u = de(we), m = {
1847
+ function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
1848
+ const { collapsed: c, side: d } = de(ve), u = de(we), m = {
1896
1849
  className: [
1897
1850
  "ds-nav-rail__item",
1898
1851
  "ds-nav-rail__agent",
@@ -1909,12 +1862,12 @@ function tn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
1909
1862
  ...l
1910
1863
  }, x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1911
1864
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1912
- !d && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1913
- ] }), b = c === "left" ? "right" : "left", v = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...m, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...m, children: x });
1914
- return d && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: b, children: v }) : v;
1865
+ !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1866
+ ] }), b = d === "left" ? "right" : "left", g = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...m, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...m, children: x });
1867
+ return c && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: b, children: g }) : g;
1915
1868
  }
1916
- const Ve = 240, Ye = 6, He = 8;
1917
- function sn({
1869
+ const Ue = 240, Ve = 6, Ye = 8;
1870
+ function Qs({
1918
1871
  trigger: t,
1919
1872
  title: s,
1920
1873
  children: n,
@@ -1922,25 +1875,25 @@ function sn({
1922
1875
  onOpenChange: a,
1923
1876
  defaultOpen: o = !1
1924
1877
  }) {
1925
- const { side: i } = de(ve), [l, d] = I(o), c = r !== void 0, u = c ? r : l, [p, h] = I(!1), m = R(null), x = R(null), [b, v] = I({}), y = le(() => {
1926
- c ? a == null || a(!0) : d(!0);
1927
- }, [c, a]), j = le(() => {
1928
- c ? a == null || a(!1) : d(!1);
1929
- }, [c, a]), N = le(() => u ? j() : y(), [u, y, j]), k = le(() => {
1930
- var z;
1878
+ const { side: i } = de(ve), [l, c] = I(o), d = r !== void 0, u = d ? r : l, [p, h] = I(!1), m = R(null), x = R(null), [b, g] = I({}), $ = le(() => {
1879
+ d ? a == null || a(!0) : c(!0);
1880
+ }, [d, a]), _ = le(() => {
1881
+ d ? a == null || a(!1) : c(!1);
1882
+ }, [d, a]), N = le(() => u ? _() : $(), [u, $, _]), y = le(() => {
1883
+ var F;
1931
1884
  const B = m.current;
1932
1885
  if (!B) return;
1933
- const L = B.getBoundingClientRect(), O = window.innerHeight, C = ((z = x.current) == null ? void 0 : z.offsetHeight) ?? 300, w = Math.max(He, Math.min(O - C - He, L.top));
1934
- v(i === "right" ? {
1886
+ const M = B.getBoundingClientRect(), W = window.innerHeight, z = ((F = x.current) == null ? void 0 : F.offsetHeight) ?? 300, j = Math.max(Ye, Math.min(W - z - Ye, M.top));
1887
+ g(i === "right" ? {
1935
1888
  position: "fixed",
1936
- top: w,
1937
- right: window.innerWidth - L.left + Ye,
1938
- width: Ve
1889
+ top: j,
1890
+ right: window.innerWidth - M.left + Ve,
1891
+ width: Ue
1939
1892
  } : {
1940
1893
  position: "fixed",
1941
- top: w,
1942
- left: L.right + Ye,
1943
- width: Ve
1894
+ top: j,
1895
+ left: M.right + Ve,
1896
+ width: Ue
1944
1897
  });
1945
1898
  }, [i]);
1946
1899
  P(() => {
@@ -1948,21 +1901,21 @@ function sn({
1948
1901
  h(!1);
1949
1902
  return;
1950
1903
  }
1951
- return k(), requestAnimationFrame(() => h(!0)), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
1952
- window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
1904
+ return y(), requestAnimationFrame(() => h(!0)), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1905
+ window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1953
1906
  };
1954
- }, [u, k]), P(() => {
1907
+ }, [u, y]), P(() => {
1955
1908
  if (!u) return;
1956
- const B = (O) => {
1957
- var C, w;
1958
- !((C = x.current) != null && C.contains(O.target)) && !((w = m.current) != null && w.contains(O.target)) && j();
1959
- }, L = (O) => {
1960
- O.key === "Escape" && j();
1909
+ const B = (W) => {
1910
+ var z, j;
1911
+ !((z = x.current) != null && z.contains(W.target)) && !((j = m.current) != null && j.contains(W.target)) && _();
1912
+ }, M = (W) => {
1913
+ W.key === "Escape" && _();
1961
1914
  };
1962
- return document.addEventListener("mousedown", B), document.addEventListener("keydown", L), () => {
1963
- document.removeEventListener("mousedown", B), document.removeEventListener("keydown", L);
1915
+ return document.addEventListener("mousedown", B), document.addEventListener("keydown", M), () => {
1916
+ document.removeEventListener("mousedown", B), document.removeEventListener("keydown", M);
1964
1917
  };
1965
- }, [u, j]);
1918
+ }, [u, _]);
1966
1919
  const S = u && /* @__PURE__ */ e.jsxs(
1967
1920
  "div",
1968
1921
  {
@@ -1984,9 +1937,9 @@ function sn({
1984
1937
  {
1985
1938
  type: "button",
1986
1939
  className: "ds-nav-rail-flyout__close",
1987
- onClick: j,
1940
+ onClick: _,
1988
1941
  "aria-label": "Close",
1989
- children: /* @__PURE__ */ e.jsx(Q, { size: 16, strokeWidth: 2 })
1942
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
1990
1943
  }
1991
1944
  )
1992
1945
  ] }),
@@ -1999,13 +1952,13 @@ function sn({
1999
1952
  typeof document < "u" && me.createPortal(S, document.body)
2000
1953
  ] });
2001
1954
  }
2002
- const zt = {
2003
- info: De,
2004
- success: Ie,
1955
+ const Pt = {
1956
+ info: Ie,
1957
+ success: De,
2005
1958
  warning: Ae,
2006
1959
  error: Se
2007
1960
  };
2008
- function nn({
1961
+ function en({
2009
1962
  children: t,
2010
1963
  variant: s = "info",
2011
1964
  action: n,
@@ -2014,15 +1967,15 @@ function nn({
2014
1967
  role: o,
2015
1968
  ...i
2016
1969
  }) {
2017
- const l = zt[s], d = o || (s === "error" ? "alert" : "status");
1970
+ const l = Pt[s], c = o || (s === "error" ? "alert" : "status");
2018
1971
  return /* @__PURE__ */ e.jsxs(
2019
1972
  "div",
2020
1973
  {
2021
1974
  className: `ds-banner ds-banner--${s}`,
2022
- role: d,
1975
+ role: c,
2023
1976
  ...i,
2024
1977
  children: [
2025
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: F[2], strokeWidth: 1.5 }) }),
1978
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: C[2], strokeWidth: 1.5 }) }),
2026
1979
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
2027
1980
  n && /* @__PURE__ */ e.jsx(
2028
1981
  "button",
@@ -2040,14 +1993,14 @@ function nn({
2040
1993
  className: "ds-banner-dismiss",
2041
1994
  onClick: a,
2042
1995
  "aria-label": "Dismiss",
2043
- children: /* @__PURE__ */ e.jsx(Q, { size: F[2], strokeWidth: 1.5 })
1996
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 })
2044
1997
  }
2045
1998
  )
2046
1999
  ]
2047
2000
  }
2048
2001
  );
2049
2002
  }
2050
- function rn({
2003
+ function tn({
2051
2004
  trigger: t,
2052
2005
  items: s = [],
2053
2006
  open: n,
@@ -2056,9 +2009,9 @@ function rn({
2056
2009
  fullWidth: o = !1,
2057
2010
  className: i = "",
2058
2011
  style: l,
2059
- ...d
2012
+ ...c
2060
2013
  }) {
2061
- const [c, u] = I(!1), [p, h] = I(!1), m = n !== void 0, x = m ? n : c, b = R(null), v = R(null), y = R(null), j = R(null), [N, k] = I({}), S = R(null), B = 150, L = () => {
2014
+ const [d, u] = I(!1), [p, h] = I(!1), m = n !== void 0, x = m ? n : d, b = R(null), g = R(null), $ = R(null), _ = R(null), [N, y] = I({}), S = R(null), B = 150, M = () => {
2062
2015
  if (m)
2063
2016
  r == null || r(!1);
2064
2017
  else {
@@ -2067,87 +2020,87 @@ function rn({
2067
2020
  u(!1), h(!1);
2068
2021
  }, B);
2069
2022
  }
2070
- }, O = () => {
2071
- const _ = !x;
2072
- m ? r == null || r(_) : _ ? (clearTimeout(S.current), h(!1), u(!0)) : L();
2073
- }, C = () => {
2023
+ }, W = () => {
2024
+ const v = !x;
2025
+ m ? r == null || r(v) : v ? (clearTimeout(S.current), h(!1), u(!0)) : M();
2026
+ }, z = () => {
2074
2027
  x || (m ? r == null || r(!0) : (clearTimeout(S.current), h(!1), u(!0)));
2075
2028
  };
2076
2029
  P(() => () => clearTimeout(S.current), []), P(() => {
2077
2030
  if (!x) return;
2078
- const _ = 300, E = () => {
2079
- var $;
2080
- const A = ($ = b.current) == null ? void 0 : $.getBoundingClientRect();
2031
+ const v = 300, k = () => {
2032
+ var E;
2033
+ const A = (E = b.current) == null ? void 0 : E.getBoundingClientRect();
2081
2034
  if (!A) return;
2082
- const U = window.innerHeight - A.bottom, G = U < _ + 8 && A.top > U;
2083
- k(
2035
+ const U = window.innerHeight - A.bottom, G = U < v + 8 && A.top > U;
2036
+ y(
2084
2037
  a === "right" ? G ? { bottom: window.innerHeight - A.top + 4, top: "auto", right: window.innerWidth - A.right } : { top: A.bottom + 4, bottom: "auto", right: window.innerWidth - A.right } : G ? { bottom: window.innerHeight - A.top + 4, top: "auto", left: A.left } : { top: A.bottom + 4, bottom: "auto", left: A.left }
2085
2038
  );
2086
2039
  };
2087
- return E(), window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
2088
- window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
2040
+ return k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
2041
+ window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
2089
2042
  };
2090
2043
  }, [x, a]);
2091
- const w = () => {
2092
- var E;
2093
- const _ = (E = y.current) == null ? void 0 : E.querySelector(
2044
+ const j = () => {
2045
+ var k;
2046
+ const v = (k = $.current) == null ? void 0 : k.querySelector(
2094
2047
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
2095
2048
  );
2096
- _ == null || _.focus();
2049
+ v == null || v.focus();
2097
2050
  };
2098
2051
  P(() => {
2099
2052
  if (!x) return;
2100
- const _ = (A) => {
2053
+ const v = (A) => {
2101
2054
  var U, G;
2102
- !((U = b.current) != null && U.contains(A.target)) && !((G = v.current) != null && G.contains(A.target)) && L();
2103
- }, E = (A) => {
2104
- A.key === "Escape" && (L(), w());
2055
+ !((U = b.current) != null && U.contains(A.target)) && !((G = g.current) != null && G.contains(A.target)) && M();
2056
+ }, k = (A) => {
2057
+ A.key === "Escape" && (M(), j());
2105
2058
  };
2106
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", E), () => {
2107
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", E);
2059
+ return document.addEventListener("mousedown", v), document.addEventListener("keydown", k), () => {
2060
+ document.removeEventListener("mousedown", v), document.removeEventListener("keydown", k);
2108
2061
  };
2109
2062
  }, [x]), P(() => {
2110
- if (!x || !j.current || !v.current) return;
2111
- const _ = z(), E = j.current === "last" ? _[_.length - 1] : _[0];
2112
- E == null || E.focus(), j.current = null;
2063
+ if (!x || !_.current || !g.current) return;
2064
+ const v = F(), k = _.current === "last" ? v[v.length - 1] : v[0];
2065
+ k == null || k.focus(), _.current = null;
2113
2066
  }, [x]);
2114
- const z = () => v.current ? [...v.current.querySelectorAll(
2067
+ const F = () => g.current ? [...g.current.querySelectorAll(
2115
2068
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2116
- )] : [], K = (_) => {
2117
- var E, A;
2118
- if (_.key === "ArrowDown")
2119
- _.preventDefault(), x ? (E = z()[0]) == null || E.focus() : (j.current = "first", C());
2120
- else if (_.key === "ArrowUp")
2121
- if (_.preventDefault(), !x)
2122
- j.current = "last", C();
2069
+ )] : [], K = (v) => {
2070
+ var k, A;
2071
+ if (v.key === "ArrowDown")
2072
+ v.preventDefault(), x ? (k = F()[0]) == null || k.focus() : (_.current = "first", z());
2073
+ else if (v.key === "ArrowUp")
2074
+ if (v.preventDefault(), !x)
2075
+ _.current = "last", z();
2123
2076
  else {
2124
- const U = z();
2077
+ const U = F();
2125
2078
  (A = U[U.length - 1]) == null || A.focus();
2126
2079
  }
2127
- }, V = (_) => {
2128
- var U, G, $, f;
2129
- const E = z(), A = E.findIndex((T) => T === document.activeElement);
2130
- switch (_.key) {
2080
+ }, V = (v) => {
2081
+ var U, G, E, f;
2082
+ const k = F(), A = k.findIndex((T) => T === document.activeElement);
2083
+ switch (v.key) {
2131
2084
  case "ArrowDown":
2132
- _.preventDefault(), (U = E[Math.min(A + 1, E.length - 1)]) == null || U.focus();
2085
+ v.preventDefault(), (U = k[Math.min(A + 1, k.length - 1)]) == null || U.focus();
2133
2086
  break;
2134
2087
  case "ArrowUp":
2135
- _.preventDefault(), A <= 0 ? w() : (G = E[A - 1]) == null || G.focus();
2088
+ v.preventDefault(), A <= 0 ? j() : (G = k[A - 1]) == null || G.focus();
2136
2089
  break;
2137
2090
  case "Home":
2138
- _.preventDefault(), ($ = E[0]) == null || $.focus();
2091
+ v.preventDefault(), (E = k[0]) == null || E.focus();
2139
2092
  break;
2140
2093
  case "End":
2141
- _.preventDefault(), (f = E[E.length - 1]) == null || f.focus();
2094
+ v.preventDefault(), (f = k[k.length - 1]) == null || f.focus();
2142
2095
  break;
2143
2096
  case "Tab":
2144
- L();
2097
+ M();
2145
2098
  break;
2146
2099
  }
2147
2100
  }, D = x && /* @__PURE__ */ e.jsx(
2148
2101
  "div",
2149
2102
  {
2150
- ref: v,
2103
+ ref: g,
2151
2104
  role: "menu",
2152
2105
  "data-ds-portal": "",
2153
2106
  className: [
@@ -2157,35 +2110,35 @@ function rn({
2157
2110
  ].filter(Boolean).join(" "),
2158
2111
  style: N,
2159
2112
  onKeyDown: V,
2160
- children: s.map((_, E) => {
2161
- if (_.separator)
2162
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, E);
2163
- if (_.type === "section")
2113
+ children: s.map((v, k) => {
2114
+ if (v.separator)
2115
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, k);
2116
+ if (v.type === "section")
2164
2117
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2165
- _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
2166
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
2167
- ] }, E);
2168
- const A = !!_.href, U = A ? "a" : "button", G = A ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
2118
+ v.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: v.label }),
2119
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: v.content })
2120
+ ] }, k);
2121
+ const A = !!v.href, U = A ? "a" : "button", G = A ? { href: v.disabled ? void 0 : v.href, "aria-disabled": v.disabled ? "true" : void 0 } : { type: "button", disabled: v.disabled };
2169
2122
  return /* @__PURE__ */ e.jsxs(
2170
2123
  U,
2171
2124
  {
2172
2125
  role: "menuitem",
2173
2126
  className: [
2174
2127
  "ds-dropdown__item",
2175
- _.danger && "ds-dropdown__item--danger"
2128
+ v.danger && "ds-dropdown__item--danger"
2176
2129
  ].filter(Boolean).join(" "),
2177
2130
  ...G,
2178
2131
  onClick: () => {
2179
- var $;
2180
- ($ = _.onClick) == null || $.call(_), L();
2132
+ var E;
2133
+ (E = v.onClick) == null || E.call(v), M();
2181
2134
  },
2182
2135
  children: [
2183
- _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
2184
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
2185
- _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
2136
+ v.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: v.icon }),
2137
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: v.label }),
2138
+ v.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: v.shortcut })
2186
2139
  ]
2187
2140
  },
2188
- E
2141
+ k
2189
2142
  );
2190
2143
  })
2191
2144
  }
@@ -2196,14 +2149,14 @@ function rn({
2196
2149
  ref: b,
2197
2150
  className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2198
2151
  style: l,
2199
- ...d,
2152
+ ...c,
2200
2153
  children: [
2201
2154
  /* @__PURE__ */ e.jsx(
2202
2155
  "div",
2203
2156
  {
2204
- ref: y,
2157
+ ref: $,
2205
2158
  className: "ds-dropdown__trigger",
2206
- onClick: O,
2159
+ onClick: W,
2207
2160
  onKeyDown: K,
2208
2161
  children: t
2209
2162
  }
@@ -2213,7 +2166,7 @@ function rn({
2213
2166
  }
2214
2167
  );
2215
2168
  }
2216
- function an({
2169
+ function sn({
2217
2170
  value: t = 0,
2218
2171
  size: s = "m",
2219
2172
  variant: n = "default",
@@ -2221,7 +2174,7 @@ function an({
2221
2174
  min: a = 2,
2222
2175
  animate: o = !0
2223
2176
  }) {
2224
- const i = Math.min(100, Math.max(0, t)), l = Math.max(a, i), d = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2177
+ const i = Math.min(100, Math.max(0, t)), l = Math.max(a, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2225
2178
  return /* @__PURE__ */ e.jsxs(
2226
2179
  "div",
2227
2180
  {
@@ -2238,7 +2191,7 @@ function an({
2238
2191
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
2239
2192
  "div",
2240
2193
  {
2241
- className: `ds-progress__fill ds-progress__fill--${d}`,
2194
+ className: `ds-progress__fill ds-progress__fill--${c}`,
2242
2195
  style: { width: `${l}%` }
2243
2196
  }
2244
2197
  ) }),
@@ -2250,50 +2203,50 @@ function an({
2250
2203
  }
2251
2204
  );
2252
2205
  }
2253
- const Ft = (t) => 1 - Math.pow(1 - t, 3), Ct = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2254
- function Wt(t, { duration: s = 600 } = {}) {
2206
+ const Mt = (t) => 1 - Math.pow(1 - t, 3), zt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2207
+ function Ft(t, { duration: s = 600 } = {}) {
2255
2208
  const [n, r] = I(t), a = R(t), o = R(null);
2256
2209
  return P(() => {
2257
- if (Ct()) {
2210
+ if (zt()) {
2258
2211
  r(t), a.current = t;
2259
2212
  return;
2260
2213
  }
2261
2214
  const i = a.current, l = t - i;
2262
2215
  if (l === 0) return;
2263
- let d = null;
2264
- const c = (u) => {
2265
- d || (d = u);
2266
- const p = Math.min((u - d) / s, 1);
2267
- r(i + l * Ft(p)), p < 1 ? o.current = requestAnimationFrame(c) : a.current = t;
2216
+ let c = null;
2217
+ const d = (u) => {
2218
+ c || (c = u);
2219
+ const p = Math.min((u - c) / s, 1);
2220
+ r(i + l * Mt(p)), p < 1 ? o.current = requestAnimationFrame(d) : a.current = t;
2268
2221
  };
2269
- return o.current = requestAnimationFrame(c), () => cancelAnimationFrame(o.current);
2222
+ return o.current = requestAnimationFrame(d), () => cancelAnimationFrame(o.current);
2270
2223
  }, [t, s]), n;
2271
2224
  }
2272
- function on({
2225
+ function nn({
2273
2226
  value: t,
2274
2227
  duration: s = 600,
2275
2228
  decimals: n = 0,
2276
2229
  prefix: r = "",
2277
2230
  suffix: a = ""
2278
2231
  }) {
2279
- const i = Wt(t, { duration: s }).toFixed(n);
2232
+ const i = Ft(t, { duration: s }).toFixed(n);
2280
2233
  return `${r}${i}${a}`;
2281
2234
  }
2282
- function Ot({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2235
+ function Wt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2283
2236
  const r = R(null), [a, o] = I(!1);
2284
2237
  return P(() => {
2285
2238
  const i = r.current;
2286
2239
  if (!i) return;
2287
2240
  const l = new IntersectionObserver(
2288
- ([d]) => {
2289
- d.isIntersecting ? (o(!0), n && l.disconnect()) : n || o(!1);
2241
+ ([c]) => {
2242
+ c.isIntersecting ? (o(!0), n && l.disconnect()) : n || o(!1);
2290
2243
  },
2291
2244
  { threshold: t, rootMargin: s }
2292
2245
  );
2293
2246
  return l.observe(i), () => l.disconnect();
2294
2247
  }, [t, s, n]), { ref: r, inView: a };
2295
2248
  }
2296
- function ln({
2249
+ function rn({
2297
2250
  children: t,
2298
2251
  as: s = "div",
2299
2252
  once: n = !1,
@@ -2303,31 +2256,31 @@ function ln({
2303
2256
  onLeave: i,
2304
2257
  ...l
2305
2258
  }) {
2306
- const { ref: d, inView: c } = Ot({ threshold: r, rootMargin: a, once: n }), u = R(!1);
2259
+ const { ref: c, inView: d } = Wt({ threshold: r, rootMargin: a, once: n }), u = R(!1);
2307
2260
  return P(() => {
2308
- c && !u.current && (o == null || o()), !c && u.current && (i == null || i()), u.current = c;
2309
- }, [c]), /* @__PURE__ */ e.jsx(s, { ref: d, ...l, children: typeof t == "function" ? t(c) : t });
2261
+ d && !u.current && (o == null || o()), !d && u.current && (i == null || i()), u.current = d;
2262
+ }, [d]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(d) : t });
2310
2263
  }
2311
- const qe = {
2312
- default: De,
2313
- success: Ie,
2264
+ const He = {
2265
+ default: Ie,
2266
+ success: De,
2314
2267
  warning: Ae,
2315
2268
  error: Se
2316
2269
  };
2317
2270
  let xe = [];
2318
2271
  const $e = /* @__PURE__ */ new Set();
2319
- function tt() {
2272
+ function et() {
2320
2273
  $e.forEach((t) => t([...xe]));
2321
2274
  }
2322
- function Ut(t) {
2323
- xe = [...xe, t], tt();
2275
+ function Ct(t) {
2276
+ xe = [...xe, t], et();
2324
2277
  }
2325
- function Vt(t) {
2326
- xe = xe.filter((s) => s.id !== t), tt();
2278
+ function Ot(t) {
2279
+ xe = xe.filter((s) => s.id !== t), et();
2327
2280
  }
2328
- function cn() {
2281
+ function an() {
2329
2282
  const t = (s, n = {}) => {
2330
- Ut({
2283
+ Ct({
2331
2284
  id: `${Date.now()}-${Math.random()}`,
2332
2285
  message: s,
2333
2286
  type: "default",
@@ -2337,13 +2290,13 @@ function cn() {
2337
2290
  };
2338
2291
  return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
2339
2292
  }
2340
- function Yt({ data: t, onDismiss: s }) {
2293
+ function Ut({ data: t, onDismiss: s }) {
2341
2294
  const [n, r] = I(!1), a = R(null);
2342
2295
  P(() => (requestAnimationFrame(() => r(!0)), t.duration > 0 && (a.current = setTimeout(() => o(), t.duration)), () => clearTimeout(a.current)), []);
2343
2296
  function o() {
2344
2297
  r(!1), setTimeout(() => s(t.id), 250);
2345
2298
  }
2346
- const i = qe[t.type] ?? qe.default;
2299
+ const i = He[t.type] ?? He.default;
2347
2300
  return /* @__PURE__ */ e.jsxs(
2348
2301
  "div",
2349
2302
  {
@@ -2355,7 +2308,7 @@ function Yt({ data: t, onDismiss: s }) {
2355
2308
  role: t.type === "error" ? "alert" : "status",
2356
2309
  "aria-live": "polite",
2357
2310
  children: [
2358
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: F[3], strokeWidth: 1.5 }) }),
2311
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: C[3], strokeWidth: 1.5 }) }),
2359
2312
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: t.message }),
2360
2313
  /* @__PURE__ */ e.jsx(
2361
2314
  "button",
@@ -2363,26 +2316,26 @@ function Yt({ data: t, onDismiss: s }) {
2363
2316
  className: "ds-toast__close",
2364
2317
  onClick: o,
2365
2318
  "aria-label": "Закрыть",
2366
- children: /* @__PURE__ */ e.jsx(Q, { size: F[3], strokeWidth: 1.5 })
2319
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[3], strokeWidth: 1.5 })
2367
2320
  }
2368
2321
  )
2369
2322
  ]
2370
2323
  }
2371
2324
  );
2372
2325
  }
2373
- function dn({ position: t = "bottom-right" }) {
2326
+ function on({ position: t = "bottom-right" }) {
2374
2327
  const [s, n] = I(() => [...xe]);
2375
2328
  return P(() => ($e.add(n), () => $e.delete(n)), []), !s.length || typeof document > "u" ? null : me.createPortal(
2376
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Yt, { data: r, onDismiss: Vt }, r.id)) }),
2329
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Ut, { data: r, onDismiss: Ot }, r.id)) }),
2377
2330
  document.body
2378
2331
  );
2379
2332
  }
2380
- const Ht = {
2333
+ const Vt = {
2381
2334
  running: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "info", children: "Running..." }),
2382
2335
  success: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "success", children: "Done" }),
2383
2336
  error: /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: "error", children: "Error" })
2384
2337
  };
2385
- function un({
2338
+ function ln({
2386
2339
  label: t,
2387
2340
  status: s = "idle",
2388
2341
  icon: n,
@@ -2391,20 +2344,20 @@ function un({
2391
2344
  expanded: o,
2392
2345
  onToggle: i,
2393
2346
  children: l,
2394
- className: d = "",
2395
- ...c
2347
+ className: c = "",
2348
+ ...d
2396
2349
  }) {
2397
2350
  const u = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2398
2351
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2399
2352
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2400
- Ht[s],
2353
+ Vt[s],
2401
2354
  r
2402
2355
  ] });
2403
2356
  return l ? /* @__PURE__ */ e.jsx(
2404
2357
  "div",
2405
2358
  {
2406
- className: ["ds-tool-card", u && "ds-tool-card--running", d].filter(Boolean).join(" "),
2407
- ...c,
2359
+ className: ["ds-tool-card", u && "ds-tool-card--running", c].filter(Boolean).join(" "),
2360
+ ...d,
2408
2361
  children: /* @__PURE__ */ e.jsx(
2409
2362
  Be,
2410
2363
  {
@@ -2420,21 +2373,21 @@ function un({
2420
2373
  ) : /* @__PURE__ */ e.jsx(
2421
2374
  "div",
2422
2375
  {
2423
- className: ["ds-tool-card", "ds-tool-card--bubble", d].filter(Boolean).join(" "),
2424
- ...c,
2376
+ className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
2377
+ ...d,
2425
2378
  children: p
2426
2379
  }
2427
2380
  );
2428
2381
  }
2429
- function qt({
2382
+ function Yt({
2430
2383
  text: t,
2431
2384
  size: s = "xs",
2432
2385
  timeout: n = 800,
2433
2386
  "aria-label": r = "Copy to clipboard",
2434
2387
  ...a
2435
2388
  }) {
2436
- const [o, i] = I(!1), l = (d) => {
2437
- d.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2389
+ const [o, i] = I(!1), l = (c) => {
2390
+ c.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2438
2391
  i(!0), setTimeout(() => i(!1), n);
2439
2392
  });
2440
2393
  };
@@ -2444,14 +2397,14 @@ function qt({
2444
2397
  variant: "ghost",
2445
2398
  size: s,
2446
2399
  state: o ? "success" : "idle",
2447
- icon: /* @__PURE__ */ e.jsx(ut, { size: F[1], strokeWidth: 1.5 }),
2400
+ icon: /* @__PURE__ */ e.jsx(dt, { size: C[1], strokeWidth: 1.5 }),
2448
2401
  "aria-label": r,
2449
2402
  onClick: l,
2450
2403
  ...a
2451
2404
  }
2452
2405
  );
2453
2406
  }
2454
- function fn({ content: t, streaming: s = !1, ...n }) {
2407
+ function cn({ content: t, streaming: s = !1, ...n }) {
2455
2408
  const [r, a] = I(s);
2456
2409
  return P(() => {
2457
2410
  a(!!s);
@@ -2462,18 +2415,18 @@ function fn({ content: t, streaming: s = !1, ...n }) {
2462
2415
  onToggle: a,
2463
2416
  padding: "s",
2464
2417
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2465
- /* @__PURE__ */ e.jsx(ft, { size: F[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2466
- /* @__PURE__ */ e.jsx(yt, { secondary: !0, children: "Thinking" })
2418
+ /* @__PURE__ */ e.jsx(ut, { size: C[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2419
+ /* @__PURE__ */ e.jsx(gt, { secondary: !0, children: "Thinking" })
2467
2420
  ] }),
2468
2421
  ...n,
2469
- children: /* @__PURE__ */ e.jsxs(et, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2422
+ children: /* @__PURE__ */ e.jsxs(Qe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2470
2423
  t,
2471
2424
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2472
2425
  ] })
2473
2426
  }
2474
2427
  );
2475
2428
  }
2476
- function mn({
2429
+ function dn({
2477
2430
  count: t,
2478
2431
  current: s = 0,
2479
2432
  done: n = [],
@@ -2484,8 +2437,8 @@ function mn({
2484
2437
  ...l
2485
2438
  }) {
2486
2439
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2487
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (d, c) => {
2488
- const u = c === s, p = n.includes(c) && !u, h = r && (c <= s || n.includes(c)), m = [
2440
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, d) => {
2441
+ const u = d === s, p = n.includes(d) && !u, h = r && (d <= s || n.includes(d)), m = [
2489
2442
  "ds-step-indicator__dot",
2490
2443
  u && "ds-step-indicator__dot--active",
2491
2444
  p && "ds-step-indicator__dot--done"
@@ -2497,22 +2450,22 @@ function mn({
2497
2450
  className: m,
2498
2451
  role: "tab",
2499
2452
  "aria-selected": u,
2500
- "aria-label": `Step ${c + 1}`,
2501
- disabled: !h || c === s,
2502
- onClick: () => r == null ? void 0 : r(c),
2453
+ "aria-label": `Step ${d + 1}`,
2454
+ disabled: !h || d === s,
2455
+ onClick: () => r == null ? void 0 : r(d),
2503
2456
  children: p ? /* @__PURE__ */ e.jsx(Re, { size: 8, strokeWidth: 3 }) : null
2504
2457
  },
2505
- c
2458
+ d
2506
2459
  );
2507
2460
  }) }),
2508
- a && /* @__PURE__ */ e.jsxs(et, { secondary: !0, className: "ds-step-indicator__counter", children: [
2461
+ a && /* @__PURE__ */ e.jsxs(Qe, { secondary: !0, className: "ds-step-indicator__counter", children: [
2509
2462
  s + 1,
2510
2463
  " / ",
2511
2464
  t
2512
2465
  ] })
2513
2466
  ] });
2514
2467
  }
2515
- function pn({
2468
+ function un({
2516
2469
  content: t,
2517
2470
  isStreaming: s = !1,
2518
2471
  cursor: n = "line",
@@ -2528,7 +2481,7 @@ function pn({
2528
2481
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2529
2482
  ] });
2530
2483
  }
2531
- function hn({
2484
+ function fn({
2532
2485
  role: t = "assistant",
2533
2486
  header: s,
2534
2487
  footer: n,
@@ -2538,24 +2491,24 @@ function hn({
2538
2491
  className: i = "",
2539
2492
  ...l
2540
2493
  }) {
2541
- const d = [
2494
+ const c = [
2542
2495
  "ds-chat-message",
2543
2496
  `ds-chat-message--${t}`,
2544
2497
  a && "ds-chat-message--streaming",
2545
2498
  i
2546
2499
  ].filter(Boolean).join(" ");
2547
- return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: d, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: o }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2500
+ return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: c, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: o }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2548
2501
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2549
2502
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: o }),
2550
2503
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2551
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
2504
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2552
2505
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
2553
2506
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2554
2507
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: o }),
2555
2508
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2556
2509
  ] });
2557
2510
  }
2558
- function xn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2511
+ function mn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2559
2512
  const r = R(!1), a = R(0);
2560
2513
  P(() => {
2561
2514
  const o = s == null ? void 0 : s.current;
@@ -2570,7 +2523,7 @@ function xn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2570
2523
  o && (n && r.current || (o.scrollTop = o.scrollHeight));
2571
2524
  }, t);
2572
2525
  }
2573
- function Gt({
2526
+ function Ht({
2574
2527
  prompts: t,
2575
2528
  enabled: s,
2576
2529
  typingSpeed: n = 38,
@@ -2579,7 +2532,7 @@ function Gt({
2579
2532
  betweenTime: o = 380,
2580
2533
  manualPauseMs: i = 5e3
2581
2534
  }) {
2582
- const [l, d] = I(0), [c, u] = I(""), p = R("typing"), h = R(0), m = R(0), x = R(null), b = R(0);
2535
+ const [l, c] = I(0), [d, u] = I(""), p = R("typing"), h = R(0), m = R(0), x = R(null), b = R(0);
2583
2536
  P(() => {
2584
2537
  m.current = l;
2585
2538
  }, [l]), P(() => {
@@ -2587,28 +2540,28 @@ function Gt({
2587
2540
  u(""), h.current = 0, p.current = "typing";
2588
2541
  return;
2589
2542
  }
2590
- const k = () => {
2543
+ const y = () => {
2591
2544
  const S = Date.now();
2592
2545
  if (b.current > S) {
2593
- x.current = setTimeout(k, b.current - S);
2546
+ x.current = setTimeout(y, b.current - S);
2594
2547
  return;
2595
2548
  }
2596
2549
  const B = t[m.current % t.length] ?? "";
2597
- p.current === "typing" ? (h.current += 1, u(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", x.current = setTimeout(k, a)) : x.current = setTimeout(k, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(k, r)) : (h.current = Math.max(0, h.current - 1), u(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", m.current = (m.current + 1) % t.length, d(m.current), x.current = setTimeout(k, o)) : x.current = setTimeout(k, r));
2550
+ p.current === "typing" ? (h.current += 1, u(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", x.current = setTimeout(y, a)) : x.current = setTimeout(y, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(y, r)) : (h.current = Math.max(0, h.current - 1), u(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", m.current = (m.current + 1) % t.length, c(m.current), x.current = setTimeout(y, o)) : x.current = setTimeout(y, r));
2598
2551
  };
2599
- return x.current = setTimeout(k, 260), () => {
2552
+ return x.current = setTimeout(y, 260), () => {
2600
2553
  x.current && clearTimeout(x.current);
2601
2554
  };
2602
2555
  }, [s, t, n, r, a, o]);
2603
- const v = (k) => {
2556
+ const g = (y) => {
2604
2557
  if (t.length === 0) return;
2605
- const S = (k % t.length + t.length) % t.length, B = t[S];
2606
- m.current = S, h.current = B.length, p.current = "holding", b.current = Date.now() + i, d(S), u(B);
2607
- }, y = () => v(m.current + 1), j = () => v(m.current - 1), N = t[l % t.length] ?? "";
2608
- return { displayed: c, currentPrompt: N, index: l, next: y, prev: j };
2558
+ const S = (y % t.length + t.length) % t.length, B = t[S];
2559
+ m.current = S, h.current = B.length, p.current = "holding", b.current = Date.now() + i, c(S), u(B);
2560
+ }, $ = () => g(m.current + 1), _ = () => g(m.current - 1), N = t[l % t.length] ?? "";
2561
+ return { displayed: d, currentPrompt: N, index: l, next: $, prev: _ };
2609
2562
  }
2610
- let Kt = 0;
2611
- function vn({
2563
+ let qt = 0;
2564
+ function pn({
2612
2565
  value: t = "",
2613
2566
  onChange: s,
2614
2567
  onSubmit: n,
@@ -2617,98 +2570,98 @@ function vn({
2617
2570
  loading: o = !1,
2618
2571
  disabled: i = !1,
2619
2572
  placeholder: l = "Let's get things done...",
2620
- animatedPlaceholders: d,
2621
- attachments: c,
2573
+ animatedPlaceholders: c,
2574
+ attachments: d,
2622
2575
  images: u,
2623
2576
  onAttachFiles: p,
2624
2577
  onAttachImages: h,
2625
2578
  onRemoveAttachment: m,
2626
2579
  onRemoveImage: x,
2627
2580
  acceptImage: b,
2628
- acceptFile: v,
2629
- maxImages: y,
2630
- maxImageSize: j,
2581
+ acceptFile: g,
2582
+ maxImages: $,
2583
+ maxImageSize: _,
2631
2584
  leftSlot: N,
2632
- rightSlot: k,
2585
+ rightSlot: y,
2633
2586
  className: S = "",
2634
2587
  ...B
2635
2588
  }) {
2636
- const L = R(null), O = R(null), C = R(0), [w, z] = I(!1), [K, V] = I([]), D = (g) => {
2637
- const M = ++Kt;
2638
- V((X) => [...X, { id: M, msg: g }]), setTimeout(() => V((X) => X.filter((J) => J.id !== M)), 6e3);
2639
- }, _ = (g) => V((M) => M.filter((X) => X.id !== g)), E = (g) => g.type.startsWith("image/"), A = () => !0, U = b ?? E, G = v ?? A, $ = (g) => {
2640
- const M = [], X = [], J = [], Z = [];
2641
- let te = 0, ue = y != null ? y - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2642
- for (const se of g)
2643
- U(se) ? j && se.size > j ? J.push(se.name) : ue > 0 ? (M.push(se), ue--) : te++ : G(se) ? X.push(se) : Z.push(se.name);
2644
- return { imageFiles: M, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te };
2645
- }, f = (g) => {
2646
- const { imageFiles: M, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te } = $(g);
2647
- J.length && D(`File${J.length > 1 ? "s" : ""} too large${j ? ` (max ${j / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && D(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && D(`Max ${y} images per message`), h && M.length && h(M);
2648
- const ue = X.concat(h ? [] : M);
2589
+ const M = R(null), W = R(null), z = R(0), [j, F] = I(!1), [K, V] = I([]), D = (w) => {
2590
+ const L = ++qt;
2591
+ V((X) => [...X, { id: L, msg: w }]), setTimeout(() => V((X) => X.filter((J) => J.id !== L)), 6e3);
2592
+ }, v = (w) => V((L) => L.filter((X) => X.id !== w)), k = (w) => w.type.startsWith("image/"), A = () => !0, U = b ?? k, G = g ?? A, E = (w) => {
2593
+ const L = [], X = [], J = [], Z = [];
2594
+ let te = 0, ue = $ != null ? $ - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2595
+ for (const se of w)
2596
+ U(se) ? _ && se.size > _ ? J.push(se.name) : ue > 0 ? (L.push(se), ue--) : te++ : G(se) ? X.push(se) : Z.push(se.name);
2597
+ return { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te };
2598
+ }, f = (w) => {
2599
+ const { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: te } = E(w);
2600
+ J.length && D(`File${J.length > 1 ? "s" : ""} too large${_ ? ` (max ${_ / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && D(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && D(`Max ${$} images per message`), h && L.length && h(L);
2601
+ const ue = X.concat(h ? [] : L);
2649
2602
  p && ue.length && p(ue);
2650
2603
  };
2651
2604
  P(() => {
2652
- const g = O.current;
2653
- g && (g.style.height = "auto", g.style.height = `${Math.min(g.scrollHeight, 200)}px`);
2605
+ const w = W.current;
2606
+ w && (w.style.height = "auto", w.style.height = `${Math.min(w.scrollHeight, 200)}px`);
2654
2607
  }, [t]), P(() => {
2655
- const g = (M) => {
2608
+ const w = (L) => {
2656
2609
  var J, Z, te;
2657
2610
  if (o || i) return;
2658
- const X = (J = M.target) == null ? void 0 : J.tagName;
2659
- X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = M.target) != null && Z.isContentEditable || M.ctrlKey || M.metaKey || M.altKey || M.key.length !== 1 && M.key !== "Backspace" && M.key !== "Delete" || (te = O.current) == null || te.focus();
2611
+ const X = (J = L.target) == null ? void 0 : J.tagName;
2612
+ X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = L.target) != null && Z.isContentEditable || L.ctrlKey || L.metaKey || L.altKey || L.key.length !== 1 && L.key !== "Backspace" && L.key !== "Delete" || (te = W.current) == null || te.focus();
2660
2613
  };
2661
- return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
2614
+ return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2662
2615
  }, [o, i]);
2663
- const T = (g) => {
2664
- g.preventDefault(), C.current++, g.dataTransfer.types.includes("Files") && z(!0);
2665
- }, W = (g) => {
2666
- g.preventDefault(), C.current--, C.current === 0 && z(!1);
2667
- }, Y = (g) => g.preventDefault(), ne = (g) => {
2668
- g.preventDefault(), C.current = 0, z(!1);
2669
- const M = Array.from(g.dataTransfer.files);
2670
- M.length && f(M);
2671
- }, oe = (g) => {
2672
- const M = Array.from(g.target.files || []);
2673
- L.current && (L.current.value = ""), M.length && f(M);
2674
- }, q = (g) => {
2616
+ const T = (w) => {
2617
+ w.preventDefault(), z.current++, w.dataTransfer.types.includes("Files") && F(!0);
2618
+ }, O = (w) => {
2619
+ w.preventDefault(), z.current--, z.current === 0 && F(!1);
2620
+ }, Y = (w) => w.preventDefault(), ne = (w) => {
2621
+ w.preventDefault(), z.current = 0, F(!1);
2622
+ const L = Array.from(w.dataTransfer.files);
2623
+ L.length && f(L);
2624
+ }, oe = (w) => {
2625
+ const L = Array.from(w.target.files || []);
2626
+ M.current && (M.current.value = ""), L.length && f(L);
2627
+ }, H = (w) => {
2675
2628
  var se;
2676
2629
  if (!h) return;
2677
- const M = (se = g.clipboardData) == null ? void 0 : se.items;
2678
- if (!M) return;
2630
+ const L = (se = w.clipboardData) == null ? void 0 : se.items;
2631
+ if (!L) return;
2679
2632
  const X = [];
2680
- for (const nt of M) {
2681
- const Me = nt.getAsFile();
2633
+ for (const st of L) {
2634
+ const Me = st.getAsFile();
2682
2635
  Me && X.push(Me);
2683
2636
  }
2684
2637
  if (X.length === 0) return;
2685
- const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ue } = $(X);
2686
- Z.length && D(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && D(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ue && D(`Max ${y} images per message`), J.length && (g.preventDefault(), h(J));
2687
- }, ee = !o && !i && !!(d != null && d.length) && t.length === 0, ie = Gt({
2688
- prompts: d ?? [],
2689
- enabled: ee
2690
- }), ge = (g) => {
2691
- if (ee) {
2692
- if (g.key === "ArrowDown" || g.key === "ArrowRight") {
2693
- g.preventDefault(), ie.next();
2638
+ const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ue } = E(X);
2639
+ Z.length && D(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && D(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ue && D(`Max ${$} images per message`), J.length && (w.preventDefault(), h(J));
2640
+ }, Q = !o && !i && !!(c != null && c.length) && t.length === 0, ie = Ht({
2641
+ prompts: c ?? [],
2642
+ enabled: Q
2643
+ }), ge = (w) => {
2644
+ if (Q) {
2645
+ if (w.key === "ArrowDown" || w.key === "ArrowRight") {
2646
+ w.preventDefault(), ie.next();
2694
2647
  return;
2695
2648
  }
2696
- if (g.key === "ArrowUp" || g.key === "ArrowLeft") {
2697
- g.preventDefault(), ie.prev();
2649
+ if (w.key === "ArrowUp" || w.key === "ArrowLeft") {
2650
+ w.preventDefault(), ie.prev();
2698
2651
  return;
2699
2652
  }
2700
- if (g.key === "Tab" && !g.shiftKey) {
2701
- g.preventDefault(), s == null || s(ie.currentPrompt);
2653
+ if (w.key === "Tab" && !w.shiftKey) {
2654
+ w.preventDefault(), s == null || s(ie.currentPrompt);
2702
2655
  return;
2703
2656
  }
2704
2657
  }
2705
- a == null || a(g);
2706
- }, st = (t.trim() || (u == null ? void 0 : u.length) > 0 || (c == null ? void 0 : c.length) > 0) && !i, Pe = p || h;
2658
+ a == null || a(w);
2659
+ }, tt = (t.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Pe = p || h;
2707
2660
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", S].filter(Boolean).join(" "), ...B, children: [
2708
2661
  Pe && /* @__PURE__ */ e.jsx(
2709
2662
  "input",
2710
2663
  {
2711
- ref: L,
2664
+ ref: M,
2712
2665
  type: "file",
2713
2666
  multiple: !0,
2714
2667
  accept: "*/*",
@@ -2719,93 +2672,93 @@ function vn({
2719
2672
  /* @__PURE__ */ e.jsxs(
2720
2673
  "div",
2721
2674
  {
2722
- className: ["ds-prompt-input__box", w && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2675
+ className: ["ds-prompt-input__box", j && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2723
2676
  onDragEnter: T,
2724
- onDragLeave: W,
2677
+ onDragLeave: O,
2725
2678
  onDragOver: Y,
2726
2679
  onDrop: ne,
2727
2680
  children: [
2728
- w && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2681
+ j && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2729
2682
  /* @__PURE__ */ e.jsx(
2730
2683
  "textarea",
2731
2684
  {
2732
- ref: O,
2685
+ ref: W,
2733
2686
  value: t,
2734
- onChange: (g) => s == null ? void 0 : s(g.target.value),
2687
+ onChange: (w) => s == null ? void 0 : s(w.target.value),
2735
2688
  onKeyDown: ge,
2736
- onPaste: q,
2737
- placeholder: ee ? "" : l,
2689
+ onPaste: H,
2690
+ placeholder: Q ? "" : l,
2738
2691
  disabled: o || i,
2739
2692
  rows: 1,
2740
- className: ["ds-prompt-input__textarea", ee && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2693
+ className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2741
2694
  }
2742
2695
  ),
2743
- ee && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2696
+ Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2744
2697
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2745
2698
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2746
2699
  ] }),
2747
- u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((g, M) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2748
- /* @__PURE__ */ e.jsx("img", { src: g.preview, alt: "" }),
2700
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((w, L) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2701
+ /* @__PURE__ */ e.jsx("img", { src: w.preview, alt: "" }),
2749
2702
  /* @__PURE__ */ e.jsx(
2750
2703
  "button",
2751
2704
  {
2752
2705
  className: "ds-prompt-input__image-remove",
2753
- onClick: () => x == null ? void 0 : x(M),
2706
+ onClick: () => x == null ? void 0 : x(L),
2754
2707
  "aria-label": "Remove image",
2755
2708
  type: "button",
2756
- children: /* @__PURE__ */ e.jsx(Q, { size: 12, strokeWidth: 2 })
2709
+ children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
2757
2710
  }
2758
2711
  )
2759
- ] }, M)) }),
2760
- K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((g) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2761
- /* @__PURE__ */ e.jsx("span", { children: g.msg }),
2712
+ ] }, L)) }),
2713
+ K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((w) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2714
+ /* @__PURE__ */ e.jsx("span", { children: w.msg }),
2762
2715
  /* @__PURE__ */ e.jsx(
2763
2716
  "button",
2764
2717
  {
2765
2718
  type: "button",
2766
2719
  className: "ds-prompt-input__warning-close",
2767
- onClick: () => _(g.id),
2720
+ onClick: () => v(w.id),
2768
2721
  "aria-label": "Dismiss",
2769
- children: /* @__PURE__ */ e.jsx(Q, { size: F[1], strokeWidth: 1.5 })
2722
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
2770
2723
  }
2771
2724
  )
2772
- ] }, g.id)) }),
2773
- c && c.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: c.map((g, M) => /* @__PURE__ */ e.jsx(fe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2774
- g.uploading ? /* @__PURE__ */ e.jsx(mt, { size: F[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: F[1], strokeWidth: 1.5 }),
2775
- g.filename,
2776
- g.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2725
+ ] }, w.id)) }),
2726
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((w, L) => /* @__PURE__ */ e.jsx(fe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2727
+ w.uploading ? /* @__PURE__ */ e.jsx(ft, { size: C[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: C[1], strokeWidth: 1.5 }),
2728
+ w.filename,
2729
+ w.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2777
2730
  "button",
2778
2731
  {
2779
2732
  type: "button",
2780
2733
  className: "ds-prompt-input__remove-btn",
2781
- onClick: () => m == null ? void 0 : m(M),
2782
- children: /* @__PURE__ */ e.jsx(Q, { size: F[1], strokeWidth: 1.5 })
2734
+ onClick: () => m == null ? void 0 : m(L),
2735
+ children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
2783
2736
  }
2784
2737
  )
2785
- ] }) }, M)) }),
2738
+ ] }) }, L)) }),
2786
2739
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2787
2740
  Pe && /* @__PURE__ */ e.jsx(
2788
2741
  ae,
2789
2742
  {
2790
2743
  variant: "ghost",
2791
2744
  size: "xs",
2792
- icon: /* @__PURE__ */ e.jsx(ze, { size: F[2], strokeWidth: 1.5 }),
2745
+ icon: /* @__PURE__ */ e.jsx(ze, { size: C[2], strokeWidth: 1.5 }),
2793
2746
  "aria-label": "Attach files",
2794
2747
  onClick: () => {
2795
- var g;
2796
- return (g = L.current) == null ? void 0 : g.click();
2748
+ var w;
2749
+ return (w = M.current) == null ? void 0 : w.click();
2797
2750
  }
2798
2751
  }
2799
2752
  ),
2800
2753
  N,
2801
- k,
2754
+ y,
2802
2755
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2803
2756
  o ? /* @__PURE__ */ e.jsx(
2804
2757
  ae,
2805
2758
  {
2806
2759
  variant: "primary",
2807
2760
  size: "xs",
2808
- icon: /* @__PURE__ */ e.jsx(pt, { size: F[2], strokeWidth: 1.5 }),
2761
+ icon: /* @__PURE__ */ e.jsx(mt, { size: C[2], strokeWidth: 1.5 }),
2809
2762
  onClick: r,
2810
2763
  "aria-label": "Stop"
2811
2764
  }
@@ -2814,9 +2767,9 @@ function vn({
2814
2767
  {
2815
2768
  variant: "primary",
2816
2769
  size: "xs",
2817
- icon: /* @__PURE__ */ e.jsx(ht, { size: F[2], strokeWidth: 1.5 }),
2770
+ icon: /* @__PURE__ */ e.jsx(pt, { size: C[2], strokeWidth: 1.5 }),
2818
2771
  onClick: n,
2819
- disabled: !st,
2772
+ disabled: !tt,
2820
2773
  "aria-label": "Send"
2821
2774
  }
2822
2775
  )
@@ -2826,8 +2779,8 @@ function vn({
2826
2779
  )
2827
2780
  ] });
2828
2781
  }
2829
- const Ge = { fast: 0, standard: 1, premium: 2 }, Ke = { fast: "data-5", standard: "data-3", premium: "data-6" };
2830
- function _n({
2782
+ const qe = { fast: 0, standard: 1, premium: 2 }, Ge = { fast: "data-5", standard: "data-3", premium: "data-6" };
2783
+ function hn({
2831
2784
  models: t = [],
2832
2785
  value: s,
2833
2786
  onChange: n,
@@ -2836,60 +2789,60 @@ function _n({
2836
2789
  showAutoOption: o = !1,
2837
2790
  groupByTier: i = !0,
2838
2791
  className: l = "",
2839
- ...d
2792
+ ...c
2840
2793
  }) {
2841
- const [c, u] = I(!1), p = R(null), h = R(null), m = R(null), [x, b] = I({}), v = t.filter((w) => !a || w.name === "auto" ? !0 : (Ge[w.tier] ?? 1) >= (Ge[a] ?? 1)), y = v.find((w) => w.name === "auto"), j = v.filter((w) => w.name !== "auto"), N = t.find((w) => w.name === s), S = new Set(j.map((w) => w.tier).filter(Boolean)).size > 1;
2794
+ const [d, u] = I(!1), p = R(null), h = R(null), m = R(null), [x, b] = I({}), g = t.filter((j) => !a || j.name === "auto" ? !0 : (qe[j.tier] ?? 1) >= (qe[a] ?? 1)), $ = g.find((j) => j.name === "auto"), _ = g.filter((j) => j.name !== "auto"), N = t.find((j) => j.name === s), S = new Set(_.map((j) => j.tier).filter(Boolean)).size > 1;
2842
2795
  P(() => {
2843
- if (!c) return;
2844
- const w = 320, z = () => {
2796
+ if (!d) return;
2797
+ const j = 320, F = () => {
2845
2798
  var A;
2846
2799
  const D = (A = h.current) == null ? void 0 : A.getBoundingClientRect();
2847
2800
  if (!D) return;
2848
- const _ = window.innerHeight - D.bottom, E = _ < w + 8 && D.top > _;
2801
+ const v = window.innerHeight - D.bottom, k = v < j + 8 && D.top > v;
2849
2802
  b({
2850
2803
  position: "fixed",
2851
2804
  zIndex: "var(--z-dropdown, 500)",
2852
2805
  left: D.left,
2853
- ...E ? { bottom: window.innerHeight - D.top + 4, top: "auto" } : { top: D.bottom + 4, bottom: "auto" }
2806
+ ...k ? { bottom: window.innerHeight - D.top + 4, top: "auto" } : { top: D.bottom + 4, bottom: "auto" }
2854
2807
  });
2855
2808
  };
2856
- z(), window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
2809
+ F(), window.addEventListener("scroll", F, !0), window.addEventListener("resize", F);
2857
2810
  const K = (D) => {
2858
- var _, E;
2859
- !((_ = p.current) != null && _.contains(D.target)) && !((E = m.current) != null && E.contains(D.target)) && u(!1);
2811
+ var v, k;
2812
+ !((v = p.current) != null && v.contains(D.target)) && !((k = m.current) != null && k.contains(D.target)) && u(!1);
2860
2813
  }, V = (D) => {
2861
2814
  D.key === "Escape" && u(!1);
2862
2815
  };
2863
2816
  return document.addEventListener("mousedown", K), document.addEventListener("keydown", V), () => {
2864
- window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
2817
+ window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
2865
2818
  };
2866
- }, [c]);
2867
- const B = (w) => {
2868
- n == null || n(w), u(!1);
2869
- }, L = (w) => /* @__PURE__ */ e.jsxs(
2819
+ }, [d]);
2820
+ const B = (j) => {
2821
+ n == null || n(j), u(!1);
2822
+ }, M = (j) => /* @__PURE__ */ e.jsxs(
2870
2823
  "button",
2871
2824
  {
2872
2825
  type: "button",
2873
2826
  className: [
2874
2827
  "ds-model-picker__item",
2875
- w.name === s && "ds-model-picker__item--active"
2828
+ j.name === s && "ds-model-picker__item--active"
2876
2829
  ].filter(Boolean).join(" "),
2877
- onClick: () => B(w.name),
2830
+ onClick: () => B(j.name),
2878
2831
  children: [
2879
- w.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: w.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2880
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: w.displayName || w.name }),
2881
- S && w.tier && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ke[w.tier] || "default", children: w.tier })
2832
+ j.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: j.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2833
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: j.displayName || j.name }),
2834
+ S && j.tier && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ge[j.tier] || "default", children: j.tier })
2882
2835
  ]
2883
2836
  },
2884
- w.name
2885
- ), O = () => !i || !S ? j.map(L) : ["fast", "standard", "premium"].flatMap((w) => {
2886
- const z = j.filter((K) => K.tier === w);
2887
- return z.length ? [
2888
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": w, children: w.charAt(0).toUpperCase() + w.slice(1) }, `lbl-${w}`),
2889
- ...z.map(L)
2837
+ j.name
2838
+ ), W = () => !i || !S ? _.map(M) : ["fast", "standard", "premium"].flatMap((j) => {
2839
+ const F = _.filter((K) => K.tier === j);
2840
+ return F.length ? [
2841
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": j, children: j.charAt(0).toUpperCase() + j.slice(1) }, `lbl-${j}`),
2842
+ ...F.map(M)
2890
2843
  ] : [];
2891
- }), C = c && /* @__PURE__ */ e.jsxs("div", { ref: m, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2892
- o && y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2844
+ }), z = d && /* @__PURE__ */ e.jsxs("div", { ref: m, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2845
+ o && $ && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2893
2846
  /* @__PURE__ */ e.jsxs(
2894
2847
  "button",
2895
2848
  {
@@ -2901,21 +2854,21 @@ function _n({
2901
2854
  ].filter(Boolean).join(" "),
2902
2855
  onClick: () => B("auto"),
2903
2856
  children: [
2904
- /* @__PURE__ */ e.jsx(xt, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2857
+ /* @__PURE__ */ e.jsx(ht, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2905
2858
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2906
2859
  ]
2907
2860
  }
2908
2861
  ),
2909
- j.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2862
+ _.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2910
2863
  ] }),
2911
- O()
2864
+ W()
2912
2865
  ] });
2913
2866
  return /* @__PURE__ */ e.jsxs(
2914
2867
  "div",
2915
2868
  {
2916
2869
  ref: p,
2917
2870
  className: ["ds-model-picker", l].filter(Boolean).join(" "),
2918
- ...d,
2871
+ ...c,
2919
2872
  children: [
2920
2873
  /* @__PURE__ */ e.jsxs(
2921
2874
  "button",
@@ -2923,44 +2876,44 @@ function _n({
2923
2876
  ref: h,
2924
2877
  type: "button",
2925
2878
  className: "ds-model-picker__trigger",
2926
- onClick: () => u((w) => !w),
2879
+ onClick: () => u((j) => !j),
2927
2880
  "aria-haspopup": "listbox",
2928
- "aria-expanded": c,
2881
+ "aria-expanded": d,
2929
2882
  children: [
2930
2883
  N != null && N.icon ? /* @__PURE__ */ e.jsx("span", { children: N.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5 }),
2931
2884
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (N == null ? void 0 : N.displayName) || (N == null ? void 0 : N.name) || s }),
2932
- S && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ke[N.tier] || "default", children: N.tier })
2885
+ S && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(fe, { size: "xs", variant: Ge[N.tier] || "default", children: N.tier })
2933
2886
  ]
2934
2887
  }
2935
2888
  ),
2936
- typeof document < "u" && me.createPortal(C, document.body)
2889
+ typeof document < "u" && me.createPortal(z, document.body)
2937
2890
  ]
2938
2891
  }
2939
2892
  );
2940
2893
  }
2941
- const Xt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2894
+ const Gt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2942
2895
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
2943
2896
  s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(s) })
2944
2897
  ] });
2945
2898
  function Te(t) {
2946
2899
  return t != null && t.length ? "p. " + t.join(", ") : null;
2947
2900
  }
2948
- function Jt(t) {
2901
+ function Kt(t) {
2949
2902
  const s = /* @__PURE__ */ new Map();
2950
2903
  for (const n of t)
2951
2904
  s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
2952
2905
  return [...s.values()];
2953
2906
  }
2954
- function bn({
2907
+ function xn({
2955
2908
  sources: t = [],
2956
2909
  layout: s = "list",
2957
2910
  title: n = "Sources",
2958
2911
  maxVisible: r = 5,
2959
2912
  onSourceClick: a
2960
2913
  }) {
2961
- const [o, i] = I(!1), l = Jt(t), d = l.length > r, c = o ? l : l.slice(0, r), u = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2914
+ const [o, i] = I(!1), l = Kt(t), c = l.length > r, d = o ? l : l.slice(0, r), u = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2962
2915
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2963
- c.map((h) => {
2916
+ d.map((h) => {
2964
2917
  const m = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2965
2918
  return /* @__PURE__ */ e.jsxs(
2966
2919
  "div",
@@ -2968,7 +2921,7 @@ function bn({
2968
2921
  className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2969
2922
  onClick: x ? () => a(h.items[0]) : void 0,
2970
2923
  children: [
2971
- /* @__PURE__ */ e.jsx(vt, { size: F[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2924
+ /* @__PURE__ */ e.jsx(xt, { size: C[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2972
2925
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2973
2926
  m.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(m) })
2974
2927
  ]
@@ -2976,28 +2929,28 @@ function bn({
2976
2929
  h.filename
2977
2930
  );
2978
2931
  }),
2979
- d && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2932
+ c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2980
2933
  "+",
2981
2934
  l.length - r,
2982
2935
  " more sources"
2983
2936
  ] })
2984
2937
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2985
2938
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2986
- c.map((h) => {
2939
+ d.map((h) => {
2987
2940
  const m = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2988
2941
  return u ? /* @__PURE__ */ e.jsx(
2989
2942
  Be,
2990
2943
  {
2991
- title: /* @__PURE__ */ e.jsx(Xt, { filename: h.filename, pages: m }),
2944
+ title: /* @__PURE__ */ e.jsx(Gt, { filename: h.filename, pages: m }),
2992
2945
  padding: "s",
2993
- children: h.items.map((b, v) => /* @__PURE__ */ e.jsx(
2946
+ children: h.items.map((b, g) => /* @__PURE__ */ e.jsx(
2994
2947
  "div",
2995
2948
  {
2996
2949
  className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2997
2950
  onClick: x ? () => a(b) : void 0,
2998
2951
  children: b.snippet ?? `p. ${b.page}`
2999
2952
  },
3000
- v
2953
+ g
3001
2954
  ))
3002
2955
  },
3003
2956
  h.filename
@@ -3014,17 +2967,17 @@ function bn({
3014
2967
  h.filename
3015
2968
  );
3016
2969
  }),
3017
- d && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2970
+ c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
3018
2971
  "+",
3019
2972
  l.length - r,
3020
2973
  " more sources"
3021
2974
  ] })
3022
2975
  ] });
3023
2976
  }
3024
- function Xe(t) {
2977
+ function Ke(t) {
3025
2978
  return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
3026
2979
  }
3027
- function jn({
2980
+ function vn({
3028
2981
  used: t,
3029
2982
  limit: s,
3030
2983
  size: n = "s",
@@ -3033,7 +2986,7 @@ function jn({
3033
2986
  warningThreshold: o = 0.8,
3034
2987
  errorThreshold: i = 1
3035
2988
  }) {
3036
- const l = s > 0 ? t / s : 0, d = Math.min(l * 100, 100), c = l >= i ? "error" : l >= o ? "warning" : "normal";
2989
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), d = l >= i ? "error" : l >= o ? "warning" : "normal";
3037
2990
  return /* @__PURE__ */ e.jsxs(
3038
2991
  "div",
3039
2992
  {
@@ -3045,15 +2998,15 @@ function jn({
3045
2998
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
3046
2999
  "div",
3047
3000
  {
3048
- className: `ds-token-counter__fill ds-token-counter__fill--${c}`,
3049
- style: { width: `${d}%` }
3001
+ className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
3002
+ style: { width: `${c}%` }
3050
3003
  }
3051
3004
  ) }),
3052
- (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${c}`, children: [
3005
+ (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
3053
3006
  r && /* @__PURE__ */ e.jsxs("span", { children: [
3054
- Xe(t),
3007
+ Ke(t),
3055
3008
  " / ",
3056
- Xe(s)
3009
+ Ke(s)
3057
3010
  ] }),
3058
3011
  a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3059
3012
  Math.round(l * 100),
@@ -3064,42 +3017,42 @@ function jn({
3064
3017
  }
3065
3018
  );
3066
3019
  }
3067
- const Je = 5;
3068
- function Zt(t) {
3020
+ const Xe = 5;
3021
+ function Xt(t) {
3069
3022
  return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
3070
3023
  }
3071
- function Nn({
3024
+ function _n({
3072
3025
  value: t = 0,
3073
3026
  size: s = "xs",
3074
3027
  showLabel: n = "none",
3075
3028
  layout: r = "inline"
3076
3029
  }) {
3077
- const a = Math.max(0, Math.min(1, t)), o = Math.round(a * Je), i = Zt(a);
3030
+ const a = Math.max(0, Math.min(1, t)), o = Math.round(a * Xe), i = Xt(a);
3078
3031
  return /* @__PURE__ */ e.jsxs("div", { className: [
3079
3032
  "ds-confidence-bar",
3080
3033
  `ds-confidence-bar--${s}`,
3081
3034
  `ds-confidence-bar--${i}`,
3082
3035
  r === "block" && "ds-confidence-bar--block"
3083
3036
  ].filter(Boolean).join(" "), children: [
3084
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Je }, (l, d) => /* @__PURE__ */ e.jsx(
3037
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Xe }, (l, c) => /* @__PURE__ */ e.jsx(
3085
3038
  "div",
3086
3039
  {
3087
- className: `ds-confidence-bar__seg${d < o ? " ds-confidence-bar__seg--filled" : ""}`
3040
+ className: `ds-confidence-bar__seg${c < o ? " ds-confidence-bar__seg--filled" : ""}`
3088
3041
  },
3089
- d
3042
+ c
3090
3043
  )) }),
3091
3044
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
3092
3045
  ] });
3093
3046
  }
3094
- const Qt = { add: "+", remove: "-", context: " " };
3047
+ const Jt = { add: "+", remove: "-", context: " " };
3095
3048
  function ye({ line: t, lineNumbers: s }) {
3096
3049
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
3097
3050
  s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
3098
- /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Qt[t.type] }),
3051
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Jt[t.type] }),
3099
3052
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
3100
3053
  ] });
3101
3054
  }
3102
- function wn({
3055
+ function bn({
3103
3056
  lines: t = [],
3104
3057
  layout: s = "inline",
3105
3058
  wordWrap: n = !1,
@@ -3113,21 +3066,21 @@ function wn({
3113
3066
  n && "ds-diff-view--wrap"
3114
3067
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
3115
3068
  if (s === "split") {
3116
- const d = t.filter((u) => u.type === "remove" || u.type === "context"), c = t.filter((u) => u.type === "add" || u.type === "context");
3069
+ const c = t.filter((u) => u.type === "remove" || u.type === "context"), d = t.filter((u) => u.type === "add" || u.type === "context");
3117
3070
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3118
3071
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3119
3072
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3120
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) }),
3121
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) })
3073
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) }),
3074
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, p) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, p)) })
3122
3075
  ] })
3123
3076
  ] });
3124
3077
  }
3125
3078
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3126
3079
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3127
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((d, c) => /* @__PURE__ */ e.jsx(ye, { line: d, lineNumbers: r }, c)) })
3080
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, d) => /* @__PURE__ */ e.jsx(ye, { line: c, lineNumbers: r }, d)) })
3128
3081
  ] });
3129
3082
  }
3130
- function es({
3083
+ function Zt({
3131
3084
  value: t = "idle",
3132
3085
  onLike: s,
3133
3086
  onDislike: n,
@@ -3157,9 +3110,9 @@ function es({
3157
3110
  "aria-label": "Like",
3158
3111
  "aria-pressed": t === "liked",
3159
3112
  children: /* @__PURE__ */ e.jsx(
3160
- _t,
3113
+ vt,
3161
3114
  {
3162
- size: F[1],
3115
+ size: C[1],
3163
3116
  strokeWidth: 1.5,
3164
3117
  fill: t === "liked" ? "currentColor" : "none"
3165
3118
  }
@@ -3178,9 +3131,9 @@ function es({
3178
3131
  "aria-label": "Dislike",
3179
3132
  "aria-pressed": t === "disliked",
3180
3133
  children: /* @__PURE__ */ e.jsx(
3181
- bt,
3134
+ _t,
3182
3135
  {
3183
- size: F[1],
3136
+ size: C[1],
3184
3137
  strokeWidth: 1.5,
3185
3138
  fill: t === "disliked" ? "currentColor" : "none"
3186
3139
  }
@@ -3191,7 +3144,7 @@ function es({
3191
3144
  }
3192
3145
  );
3193
3146
  }
3194
- function ts(t) {
3147
+ function Qt(t) {
3195
3148
  const s = t instanceof Date ? t : new Date(t);
3196
3149
  if (isNaN(s)) return null;
3197
3150
  const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = new Date(a - 864e5);
@@ -3200,7 +3153,7 @@ function ts(t) {
3200
3153
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3201
3154
  return `${i} ${l} ${r}`;
3202
3155
  }
3203
- function gn({
3156
+ function jn({
3204
3157
  role: t = "assistant",
3205
3158
  text: s,
3206
3159
  timestamp: n,
@@ -3210,29 +3163,29 @@ function gn({
3210
3163
  className: i = "",
3211
3164
  ...l
3212
3165
  }) {
3213
- const d = t === "assistant" && (a || o), c = !!s, u = n ? ts(n) : null;
3214
- return !d && !c && !u ? null : /* @__PURE__ */ e.jsxs(
3166
+ const c = t === "assistant" && (a || o), d = !!s, u = n ? Qt(n) : null;
3167
+ return !c && !d && !u ? null : /* @__PURE__ */ e.jsxs(
3215
3168
  "div",
3216
3169
  {
3217
3170
  className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
3218
3171
  ...l,
3219
3172
  children: [
3220
3173
  t === "user" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u }),
3221
- d && /* @__PURE__ */ e.jsx(es, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3222
- c && /* @__PURE__ */ e.jsx(qt, { className: "ds-message-action", text: s }),
3174
+ c && /* @__PURE__ */ e.jsx(Zt, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3175
+ d && /* @__PURE__ */ e.jsx(Yt, { className: "ds-message-action", text: s }),
3223
3176
  t === "assistant" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u })
3224
3177
  ]
3225
3178
  }
3226
3179
  );
3227
3180
  }
3228
- function yn({ label: t, className: s = "", ...n }) {
3181
+ function Nn({ label: t, className: s = "", ...n }) {
3229
3182
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
3230
3183
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
3231
3184
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3232
3185
  ] });
3233
3186
  }
3234
- function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3235
- const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", d = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3187
+ function wn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3188
+ const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3236
3189
  return /* @__PURE__ */ e.jsx(
3237
3190
  "div",
3238
3191
  {
@@ -3257,8 +3210,8 @@ function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3257
3210
  backgroundImage: [
3258
3211
  `linear-gradient(${l} 1px, transparent 1px)`,
3259
3212
  `linear-gradient(90deg, ${l} 1px, transparent 1px)`,
3260
- `linear-gradient(${d} 1px, transparent 1px)`,
3261
- `linear-gradient(90deg, ${d} 1px, transparent 1px)`
3213
+ `linear-gradient(${c} 1px, transparent 1px)`,
3214
+ `linear-gradient(90deg, ${c} 1px, transparent 1px)`
3262
3215
  ].join(", "),
3263
3216
  backgroundSize: "80px 80px, 80px 80px, 16px 16px, 16px 16px",
3264
3217
  backgroundPosition: "-1px -1px, -1px -1px, -1px -1px, -1px -1px",
@@ -3272,7 +3225,7 @@ function kn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3272
3225
  }
3273
3226
  );
3274
3227
  }
3275
- function En({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3228
+ function gn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3276
3229
  const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3277
3230
  return /* @__PURE__ */ e.jsx(
3278
3231
  "div",
@@ -3284,11 +3237,11 @@ function En({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3284
3237
  }
3285
3238
  );
3286
3239
  }
3287
- const ke = 280, ss = 22, ns = 14, ce = 8, Ne = 6, rs = 200;
3288
- function as(t) {
3240
+ const ke = 280, es = 22, ts = 14, ce = 8, Ne = 6, ss = 200;
3241
+ function ns(t) {
3289
3242
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3290
3243
  }
3291
- function os(t, s, n, r) {
3244
+ function rs(t, s, n, r) {
3292
3245
  const a = window.innerWidth, o = window.innerHeight;
3293
3246
  if (o - t.bottom >= s + r + ce) return "bottom";
3294
3247
  if (t.top >= s + r + ce) return "top";
@@ -3297,26 +3250,26 @@ function os(t, s, n, r) {
3297
3250
  const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
3298
3251
  return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
3299
3252
  }
3300
- function is(t, s, n, r, a) {
3253
+ function as(t, s, n, r, a) {
3301
3254
  const o = window.innerWidth, i = window.innerHeight;
3302
- let l, d;
3255
+ let l, c;
3303
3256
  switch (t) {
3304
3257
  case "top":
3305
- l = s.top - n - a, d = s.left + s.width / 2 - r / 2;
3258
+ l = s.top - n - a, c = s.left + s.width / 2 - r / 2;
3306
3259
  break;
3307
3260
  case "bottom":
3308
- l = s.bottom + a, d = s.left + s.width / 2 - r / 2;
3261
+ l = s.bottom + a, c = s.left + s.width / 2 - r / 2;
3309
3262
  break;
3310
3263
  case "left":
3311
- l = s.top + s.height / 2 - n / 2, d = s.left - r - a;
3264
+ l = s.top + s.height / 2 - n / 2, c = s.left - r - a;
3312
3265
  break;
3313
3266
  default:
3314
- l = s.top + s.height / 2 - n / 2, d = s.right + a;
3267
+ l = s.top + s.height / 2 - n / 2, c = s.right + a;
3315
3268
  }
3316
- const c = Math.max(ce, Math.min(o - r - ce, d));
3317
- return { top: Math.max(ce, Math.min(i - n - ce, l)), left: c, arrowOffset: d - c };
3269
+ const d = Math.max(ce, Math.min(o - r - ce, c));
3270
+ return { top: Math.max(ce, Math.min(i - n - ce, l)), left: d, arrowOffset: c - d };
3318
3271
  }
3319
- function $n({
3272
+ function yn({
3320
3273
  steps: t,
3321
3274
  currentStep: s,
3322
3275
  onNext: n,
@@ -3325,83 +3278,83 @@ function $n({
3325
3278
  onFinish: o,
3326
3279
  overlay: i = !0,
3327
3280
  ring: l = !0,
3328
- labelNext: d = "Next",
3329
- labelBack: c = "Back",
3281
+ labelNext: c = "Next",
3282
+ labelBack: d = "Back",
3330
3283
  labelSkip: u = "Skip tour",
3331
3284
  labelFinish: p = "Done",
3332
3285
  statePrimary: h = "idle",
3333
3286
  stateBack: m = "idle"
3334
3287
  }) {
3335
- const x = R(null), b = R(t), v = R(s), y = R(l);
3336
- b.current = t, v.current = s, y.current = l;
3337
- const [j, N] = I(!1), [k, S] = I({ position: "fixed", visibility: "hidden", width: ke }), [B, L] = I("bottom"), [O, C] = I(null), w = R(!1), z = t[s], K = s === t.length - 1, V = le(() => {
3338
- const D = b.current[v.current];
3288
+ const x = R(null), b = R(t), g = R(s), $ = R(l);
3289
+ b.current = t, g.current = s, $.current = l;
3290
+ const [_, N] = I(!1), [y, S] = I({ position: "fixed", visibility: "hidden", width: ke }), [B, M] = I("bottom"), [W, z] = I(null), j = R(!1), F = t[s], K = s === t.length - 1, V = le(() => {
3291
+ const D = b.current[g.current];
3339
3292
  if (!D || !x.current) return;
3340
- const _ = as(D.target);
3341
- if (!_) return;
3342
- const E = _.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, G = ke, $ = y.current ? ss : ns, f = D.position || os(E, U, G, $), { top: T, left: W, arrowOffset: Y } = is(f, E, U, G, $);
3343
- L(f), S({
3293
+ const v = ns(D.target);
3294
+ if (!v) return;
3295
+ const k = v.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, G = ke, E = $.current ? es : ts, f = D.position || rs(k, U, G, E), { top: T, left: O, arrowOffset: Y } = as(f, k, U, G, E);
3296
+ M(f), S({
3344
3297
  position: "fixed",
3345
3298
  top: T,
3346
- left: W,
3299
+ left: O,
3347
3300
  width: ke,
3348
3301
  visibility: "visible",
3349
3302
  "--arrow-offset": `${Y}px`
3350
- }), C({
3351
- top: E.top - Ne,
3352
- left: E.left - Ne,
3353
- width: E.width + Ne * 2,
3354
- height: E.height + Ne * 2
3303
+ }), z({
3304
+ top: k.top - Ne,
3305
+ left: k.left - Ne,
3306
+ width: k.width + Ne * 2,
3307
+ height: k.height + Ne * 2
3355
3308
  });
3356
3309
  }, []);
3357
3310
  return P(() => {
3358
3311
  window.addEventListener("scroll", V, !0), window.addEventListener("resize", V);
3359
3312
  const D = requestAnimationFrame(() => {
3360
- V(), N(!0), w.current = !0;
3313
+ V(), N(!0), j.current = !0;
3361
3314
  });
3362
3315
  return () => {
3363
3316
  cancelAnimationFrame(D), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V);
3364
3317
  };
3365
3318
  }, []), P(() => {
3366
- if (!w.current) return;
3319
+ if (!j.current) return;
3367
3320
  N(!1);
3368
3321
  const D = setTimeout(() => {
3369
- S((_) => ({ ..._, visibility: "hidden" })), requestAnimationFrame(() => {
3322
+ S((v) => ({ ...v, visibility: "hidden" })), requestAnimationFrame(() => {
3370
3323
  V(), N(!0);
3371
3324
  });
3372
- }, rs + 20);
3325
+ }, ss + 20);
3373
3326
  return () => clearTimeout(D);
3374
3327
  }, [s]), P(() => {
3375
- j && x.current && x.current.focus({ preventScroll: !0 });
3376
- }, [j]), P(() => {
3377
- const D = (_) => {
3378
- _.key === "Escape" && a();
3328
+ _ && x.current && x.current.focus({ preventScroll: !0 });
3329
+ }, [_]), P(() => {
3330
+ const D = (v) => {
3331
+ v.key === "Escape" && a();
3379
3332
  };
3380
3333
  return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
3381
3334
  }, [a]), P(() => {
3382
- if (!j) return;
3383
- const D = (_) => {
3384
- if (_.key !== "Tab" || !x.current) return;
3385
- const E = Array.from(
3335
+ if (!_) return;
3336
+ const D = (v) => {
3337
+ if (v.key !== "Tab" || !x.current) return;
3338
+ const k = Array.from(
3386
3339
  x.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3387
3340
  );
3388
- if (!E.length) return;
3389
- const A = E[0], U = E[E.length - 1];
3390
- _.shiftKey && document.activeElement === A ? (_.preventDefault(), U.focus()) : !_.shiftKey && document.activeElement === U && (_.preventDefault(), A.focus());
3341
+ if (!k.length) return;
3342
+ const A = k[0], U = k[k.length - 1];
3343
+ v.shiftKey && document.activeElement === A ? (v.preventDefault(), U.focus()) : !v.shiftKey && document.activeElement === U && (v.preventDefault(), A.focus());
3391
3344
  };
3392
3345
  return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
3393
- }, [j]), !z || typeof document > "u" ? null : me.createPortal(
3346
+ }, [_]), !F || typeof document > "u" ? null : me.createPortal(
3394
3347
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3395
- O && /* @__PURE__ */ e.jsx(
3348
+ W && /* @__PURE__ */ e.jsx(
3396
3349
  "div",
3397
3350
  {
3398
3351
  className: [
3399
3352
  "ds-coachmark__spotlight",
3400
3353
  i && "ds-coachmark__spotlight--overlay",
3401
3354
  !l && "ds-coachmark__spotlight--no-ring",
3402
- j && "ds-coachmark__spotlight--visible"
3355
+ _ && "ds-coachmark__spotlight--visible"
3403
3356
  ].filter(Boolean).join(" "),
3404
- style: O,
3357
+ style: W,
3405
3358
  "aria-hidden": "true"
3406
3359
  }
3407
3360
  ),
@@ -3413,13 +3366,13 @@ function $n({
3413
3366
  role: "dialog",
3414
3367
  "aria-modal": "false",
3415
3368
  "aria-live": "polite",
3416
- "aria-label": z.title ?? `Step ${s + 1} of ${t.length}`,
3369
+ "aria-label": F.title ?? `Step ${s + 1} of ${t.length}`,
3417
3370
  className: [
3418
3371
  "ds-coachmark__bubble",
3419
3372
  `ds-coachmark__bubble--${B}`,
3420
- j && "ds-coachmark__bubble--visible"
3373
+ _ && "ds-coachmark__bubble--visible"
3421
3374
  ].filter(Boolean).join(" "),
3422
- style: k,
3375
+ style: y,
3423
3376
  tabIndex: -1,
3424
3377
  children: [
3425
3378
  /* @__PURE__ */ e.jsx(
@@ -3429,11 +3382,11 @@ function $n({
3429
3382
  className: "ds-coachmark__close",
3430
3383
  onClick: a,
3431
3384
  "aria-label": u,
3432
- children: /* @__PURE__ */ e.jsx(Q, { size: 16, strokeWidth: 2 })
3385
+ children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3433
3386
  }
3434
3387
  ),
3435
- z.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: z.title }),
3436
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: z.content }),
3388
+ F.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: F.title }),
3389
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: F.content }),
3437
3390
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3438
3391
  t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3439
3392
  s + 1,
@@ -3441,8 +3394,8 @@ function $n({
3441
3394
  t.length
3442
3395
  ] }),
3443
3396
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3444
- s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: m, onClick: r, children: c }),
3445
- /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? o : n, children: K ? p : d })
3397
+ s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: m, onClick: r, children: d }),
3398
+ /* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? o : n, children: K ? p : c })
3446
3399
  ] })
3447
3400
  ] })
3448
3401
  ]
@@ -3452,8 +3405,8 @@ function $n({
3452
3405
  document.body
3453
3406
  );
3454
3407
  }
3455
- function Tn(t, s = {}) {
3456
- const { storageKey: n } = s, [r, a] = I(0), [o, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", d = le(() => {
3408
+ function kn(t, s = {}) {
3409
+ const { storageKey: n } = s, [r, a] = I(0), [o, i] = I(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = le(() => {
3457
3410
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3458
3411
  }, [n]);
3459
3412
  return {
@@ -3462,13 +3415,13 @@ function Tn(t, s = {}) {
3462
3415
  start: () => {
3463
3416
  l() || (a(0), i(!0));
3464
3417
  },
3465
- next: () => a((c) => Math.min(c + 1, t.length - 1)),
3466
- back: () => a((c) => Math.max(c - 1, 0)),
3467
- skip: d,
3468
- finish: d
3418
+ next: () => a((d) => Math.min(d + 1, t.length - 1)),
3419
+ back: () => a((d) => Math.max(d - 1, 0)),
3420
+ skip: c,
3421
+ finish: c
3469
3422
  };
3470
3423
  }
3471
- function Rn() {
3424
+ function En() {
3472
3425
  const t = R(null), s = le(() => {
3473
3426
  const n = t.current;
3474
3427
  if (!n) return;
@@ -3482,94 +3435,92 @@ function Rn() {
3482
3435
  }
3483
3436
  export {
3484
3437
  Be as Accordion,
3485
- Ns as Alert,
3486
- on as AnimatedNumber,
3487
- Is as Avatar,
3438
+ bs as Alert,
3439
+ nn as AnimatedNumber,
3440
+ Ss as Avatar,
3488
3441
  fe as Badge,
3489
- nn as Banner,
3490
- gs as BottomSheet,
3491
- Us as Breadcrumb,
3442
+ en as Banner,
3443
+ Ns as BottomSheet,
3444
+ Cs as Breadcrumb,
3492
3445
  ae as Button,
3493
- hs as Card,
3494
- hn as ChatMessage,
3495
- Ss as Checkbox,
3496
- $n as Coachmark,
3497
- ys as Code,
3498
- Tt as CodeAccordion,
3499
- Nn as ConfidenceBar,
3500
- qt as CopyButton,
3501
- wn as DiffView,
3502
- Ys as Drawer,
3503
- Oe as DrawerFooter,
3504
- rn as Dropdown,
3505
- Cs as EmptyState,
3506
- kn as EngineerGrid,
3507
- Ws as FormField,
3508
- xs as H1,
3509
- vs as H2,
3510
- _s as H3,
3511
- bs as H4,
3512
- ln as InView,
3513
- us as Input,
3514
- ks as Link,
3515
- es as MessageFeedback,
3516
- gn as MessageFooter,
3517
- ws as Modal,
3446
+ ms as Card,
3447
+ fn as ChatMessage,
3448
+ Ts as Checkbox,
3449
+ yn as Coachmark,
3450
+ ws as Code,
3451
+ $t as CodeAccordion,
3452
+ _n as ConfidenceBar,
3453
+ Yt as CopyButton,
3454
+ bn as DiffView,
3455
+ tn as Dropdown,
3456
+ zs as EmptyState,
3457
+ wn as EngineerGrid,
3458
+ Fs as FormField,
3459
+ ps as H1,
3460
+ hs as H2,
3461
+ xs as H3,
3462
+ vs as H4,
3463
+ rn as InView,
3464
+ cs as Input,
3465
+ gs as Link,
3466
+ Zt as MessageFeedback,
3467
+ jn as MessageFooter,
3468
+ js as Modal,
3518
3469
  he as ModalFooter,
3519
- _n as ModelPicker,
3520
- qs as NavRail,
3521
- tn as NavRailAgent,
3522
- Ks as NavRailBody,
3523
- en as NavRailCustomItem,
3524
- Zs as NavRailDivider,
3525
- sn as NavRailFlyout,
3526
- Js as NavRailFooter,
3527
- Xs as NavRailHeader,
3528
- Gs as NavRailItem,
3529
- Qs as NavRailRecents,
3530
- js as P1,
3531
- yt as P2,
3532
- et as P3,
3533
- Vs as Pagination,
3534
- an as ProgressBar,
3535
- vn as PromptInput,
3536
- As as Radio,
3537
- fn as ReasoningBlock,
3538
- En as Scrollable,
3539
- Ts as SegmentedControl,
3540
- ms as Select,
3541
- Hs as SidePage,
3542
- Ue as SidePageFooter,
3543
- At as Skeleton,
3544
- bn as SourcesPanel,
3545
- wt as Spinner,
3546
- Os as Stat,
3547
- mn as StepIndicator,
3548
- ps as Stepper,
3549
- pn as StreamingText,
3550
- $s as Tab,
3551
- Ds as Table,
3552
- Ls as TableBody,
3553
- Bs as TableHead,
3554
- Ps as TableRow,
3555
- Ms as TableSubheaderRow,
3556
- Es as Tabs,
3557
- Fs as Td,
3558
- fs as Textarea,
3559
- zs as Th,
3560
- yn as ThinkingDot,
3561
- dn as ToastContainer,
3562
- Rs as Toggle,
3563
- jn as TokenCounter,
3564
- un as ToolCallBubble,
3565
- un as ToolCallCard,
3470
+ hn as ModelPicker,
3471
+ Vs as NavRail,
3472
+ Zs as NavRailAgent,
3473
+ Hs as NavRailBody,
3474
+ Js as NavRailCustomItem,
3475
+ Ks as NavRailDivider,
3476
+ Qs as NavRailFlyout,
3477
+ Gs as NavRailFooter,
3478
+ qs as NavRailHeader,
3479
+ Ys as NavRailItem,
3480
+ Xs as NavRailRecents,
3481
+ _s as P1,
3482
+ gt as P2,
3483
+ Qe as P3,
3484
+ Os as Pagination,
3485
+ sn as ProgressBar,
3486
+ pn as PromptInput,
3487
+ Rs as Radio,
3488
+ cn as ReasoningBlock,
3489
+ gn as Scrollable,
3490
+ Es as SegmentedControl,
3491
+ us as Select,
3492
+ Us as SidePage,
3493
+ Oe as SidePageFooter,
3494
+ St as Skeleton,
3495
+ xn as SourcesPanel,
3496
+ Nt as Spinner,
3497
+ Ws as Stat,
3498
+ dn as StepIndicator,
3499
+ fs as Stepper,
3500
+ un as StreamingText,
3501
+ ks as Tab,
3502
+ As as Table,
3503
+ Is as TableBody,
3504
+ Ds as TableHead,
3505
+ Bs as TableRow,
3506
+ Ls as TableSubheaderRow,
3507
+ ys as Tabs,
3508
+ Ms as Td,
3509
+ ds as Textarea,
3510
+ Ps as Th,
3511
+ Nn as ThinkingDot,
3512
+ on as ToastContainer,
3513
+ $s as Toggle,
3514
+ vn as TokenCounter,
3515
+ ln as ToolCallBubble,
3516
+ ln as ToolCallCard,
3566
3517
  Le as Tooltip,
3567
- F as iconSizes,
3568
- Wt as useAnimatedNumber,
3569
- Gt as useAnimatedPlaceholder,
3570
- Tn as useCoachmark,
3571
- Ot as useInView,
3572
- Rn as useShake,
3573
- xn as useStreamScroll,
3574
- cn as useToast
3518
+ C as iconSizes,
3519
+ Ft as useAnimatedNumber,
3520
+ Ht as useAnimatedPlaceholder,
3521
+ kn as useCoachmark,
3522
+ Wt as useInView,
3523
+ En as useShake,
3524
+ mn as useStreamScroll,
3525
+ an as useToast
3575
3526
  };