@donkit-ai/design-system 1.4.10 → 1.4.13

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,5 +1,5 @@
1
- import K, { useState as A, useRef as E, useEffect as M, useLayoutEffect as Ve } from "react";
2
- import { Check as Ne, X as ne, ChevronDown as he, Minus as Ye, Plus as He, XCircle as we, AlertTriangle as ge, CheckCircle as ye, Info as ke, ChevronUp as qe, ChevronsUpDown as Ke, ChevronLeft as Ge, ChevronRight as Xe, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Re, Square as es, ArrowUp as ss, Zap as ts, Cpu as Se, FileText as rs, ThumbsUp as ns, ThumbsDown as as } from "lucide-react";
1
+ import K, { useState as D, useRef as E, useEffect as M, useLayoutEffect as Ve } from "react";
2
+ import { Check as Ne, X as re, ChevronDown as he, Minus as Ye, Plus as He, XCircle as we, AlertTriangle as ge, CheckCircle as ye, Info as ke, ChevronUp as qe, ChevronsUpDown as Ke, ChevronLeft as Xe, ChevronRight as Ge, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Re, Square as es, ArrowUp as ss, Zap as ts, Cpu as Se, FileText as ns, ThumbsUp as rs, ThumbsDown as as } from "lucide-react";
3
3
  import pe from "react-dom";
4
4
  const I = {
5
5
  1: 16,
@@ -8,7 +8,7 @@ const I = {
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var _e = { exports: {} }, ue = {};
11
+ var je = { exports: {} }, ue = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -18,27 +18,27 @@ var _e = { exports: {} }, ue = {};
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 Ae;
21
+ var De;
22
22
  function is() {
23
- if (Ae) return ue;
24
- Ae = 1;
23
+ if (De) return ue;
24
+ De = 1;
25
25
  var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
26
- function r(i, a, n) {
26
+ function n(i, a, r) {
27
27
  var o = null;
28
- if (n !== void 0 && (o = "" + n), a.key !== void 0 && (o = "" + a.key), "key" in a) {
29
- n = {};
28
+ if (r !== void 0 && (o = "" + r), a.key !== void 0 && (o = "" + a.key), "key" in a) {
29
+ r = {};
30
30
  for (var l in a)
31
- l !== "key" && (n[l] = a[l]);
32
- } else n = a;
33
- return a = n.ref, {
31
+ l !== "key" && (r[l] = a[l]);
32
+ } else r = a;
33
+ return a = r.ref, {
34
34
  $$typeof: s,
35
35
  type: i,
36
36
  key: o,
37
37
  ref: a !== void 0 ? a : null,
38
- props: n
38
+ props: r
39
39
  };
40
40
  }
41
- return ue.Fragment = t, ue.jsx = r, ue.jsxs = r, ue;
41
+ return ue.Fragment = t, ue.jsx = n, ue.jsxs = n, ue;
42
42
  }
43
43
  var fe = {};
44
44
  /**
@@ -50,9 +50,9 @@ var fe = {};
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 De;
53
+ var Ae;
54
54
  function os() {
55
- return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
55
+ return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function s(c) {
57
57
  if (c == null) return null;
58
58
  if (typeof c == "function")
@@ -65,7 +65,7 @@ function os() {
65
65
  return "Profiler";
66
66
  case R:
67
67
  return "StrictMode";
68
- case D:
68
+ case A:
69
69
  return "Suspense";
70
70
  case Y:
71
71
  return "SuspenseList";
@@ -76,7 +76,7 @@ function os() {
76
76
  switch (typeof c.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
78
  ), c.$$typeof) {
79
- case j:
79
+ case b:
80
80
  return "Portal";
81
81
  case $:
82
82
  return c.displayName || "Context";
@@ -99,7 +99,7 @@ function os() {
99
99
  function t(c) {
100
100
  return "" + c;
101
101
  }
102
- function r(c) {
102
+ function n(c) {
103
103
  try {
104
104
  t(c);
105
105
  var w = !1;
@@ -128,10 +128,10 @@ function os() {
128
128
  }
129
129
  }
130
130
  function a() {
131
- var c = G.A;
131
+ var c = X.A;
132
132
  return c === null ? null : c.getOwner();
133
133
  }
134
- function n() {
134
+ function r() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function o(c) {
@@ -159,10 +159,10 @@ function os() {
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
  )), c = this.props.ref, c !== void 0 ? c : null;
161
161
  }
162
- function d(c, w, z, F, te, ie) {
162
+ function d(c, w, z, F, te, ae) {
163
163
  var W = z.ref;
164
164
  return c = {
165
- $$typeof: b,
165
+ $$typeof: _,
166
166
  type: c,
167
167
  key: w,
168
168
  props: z,
@@ -189,10 +189,10 @@ function os() {
189
189
  configurable: !1,
190
190
  enumerable: !1,
191
191
  writable: !0,
192
- value: ie
192
+ value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function f(c, w, z, F, te, ie) {
195
+ function f(c, w, z, F, te, ae) {
196
196
  var W = w.children;
197
197
  if (W !== void 0)
198
198
  if (F)
@@ -223,10 +223,10 @@ React keys must be passed directly to JSX without using spread:
223
223
  W
224
224
  ), g[W + F] = !0);
225
225
  }
226
- if (W = null, z !== void 0 && (r(z), W = "" + z), o(w) && (r(w.key), W = "" + w.key), "key" in w) {
226
+ if (W = null, z !== void 0 && (n(z), W = "" + z), o(w) && (n(w.key), W = "" + w.key), "key" in w) {
227
227
  z = {};
228
- for (var oe in w)
229
- oe !== "key" && (z[oe] = w[oe]);
228
+ for (var ie in w)
229
+ ie !== "key" && (z[ie] = w[ie]);
230
230
  } else z = w;
231
231
  return W && l(
232
232
  z,
@@ -237,16 +237,16 @@ React keys must be passed directly to JSX without using spread:
237
237
  z,
238
238
  a(),
239
239
  te,
240
- ie
240
+ ae
241
241
  );
242
242
  }
243
243
  function p(c) {
244
244
  h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === P && (c._payload.status === "fulfilled" ? h(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
245
245
  }
246
246
  function h(c) {
247
- return typeof c == "object" && c !== null && c.$$typeof === b;
247
+ return typeof c == "object" && c !== null && c.$$typeof === _;
248
248
  }
249
- var u = K, b = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), G = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, v = console.createTask ? console.createTask : function() {
249
+ var u = K, _ = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, x = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  u = {
@@ -256,38 +256,38 @@ React keys must be passed directly to JSX without using spread:
256
256
  };
257
257
  var k, L = {}, H = u.react_stack_bottom_frame.bind(
258
258
  u,
259
- n
260
- )(), X = v(i(n)), g = {};
259
+ r
260
+ )(), G = v(i(r)), g = {};
261
261
  fe.Fragment = S, fe.jsx = function(c, w, z) {
262
- var F = 1e4 > G.recentlyCreatedOwnerStacks++;
262
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
263
263
  return f(
264
264
  c,
265
265
  w,
266
266
  z,
267
267
  !1,
268
268
  F ? Error("react-stack-top-frame") : H,
269
- F ? v(i(c)) : X
269
+ F ? v(i(c)) : G
270
270
  );
271
271
  }, fe.jsxs = function(c, w, z) {
272
- var F = 1e4 > G.recentlyCreatedOwnerStacks++;
272
+ var F = 1e4 > X.recentlyCreatedOwnerStacks++;
273
273
  return f(
274
274
  c,
275
275
  w,
276
276
  z,
277
277
  !0,
278
278
  F ? Error("react-stack-top-frame") : H,
279
- F ? v(i(c)) : X
279
+ F ? v(i(c)) : G
280
280
  );
281
281
  };
282
282
  }()), fe;
283
283
  }
284
- process.env.NODE_ENV === "production" ? _e.exports = is() : _e.exports = os();
285
- var e = _e.exports;
286
- function ls({ size: s = "m", color: t = "default", className: r = "", ...i }) {
284
+ process.env.NODE_ENV === "production" ? je.exports = is() : je.exports = os();
285
+ var e = je.exports;
286
+ function ls({ size: s = "m", color: t = "default", className: n = "", ...i }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
290
- className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, r].filter(Boolean).join(" "),
290
+ className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, n].filter(Boolean).join(" "),
291
291
  role: "status",
292
292
  "aria-label": "Loading",
293
293
  ...i
@@ -298,10 +298,10 @@ const cs = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function me({
299
299
  children: s,
300
300
  variant: t = "primary",
301
- size: r = "m",
301
+ size: n = "m",
302
302
  fullWidth: i = !1,
303
303
  icon: a,
304
- disabled: n = !1,
304
+ disabled: r = !1,
305
305
  state: o = "idle",
306
306
  onClick: l,
307
307
  type: m = "button",
@@ -310,20 +310,20 @@ function me({
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const u = a && !s, b = o === "loading", j = o === "success", S = o === "error", R = b || j || S, B = r === "xs" ? "s" : "m", y = cs[r] ?? 16, $ = b ? /* @__PURE__ */ e.jsx(ls, { size: B }) : j ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: y, strokeWidth: 2.5 }) }) : S ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ne, { size: y, strokeWidth: 2.5 }) }) : null, O = [
313
+ const u = a && !s, _ = o === "loading", b = o === "success", S = o === "error", R = _ || b || S, B = n === "xs" ? "s" : "m", y = cs[n] ?? 16, $ = _ ? /* @__PURE__ */ e.jsx(ls, { size: B }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: y, strokeWidth: 2.5 }) }) : S ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: y, strokeWidth: 2.5 }) }) : null, O = [
314
314
  "ds-button",
315
315
  `ds-button--${t}`,
316
- `ds-button--${r}`,
316
+ `ds-button--${n}`,
317
317
  i && "ds-button--full",
318
318
  u && "ds-button--icon-only",
319
319
  p
320
- ].filter(Boolean).join(" "), D = o !== "idle" ? o : void 0, Y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
320
+ ].filter(Boolean).join(" "), A = o !== "idle" ? o : void 0, Y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
321
  R ? $ : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
322
322
  s
323
323
  ] });
324
324
  if (d) {
325
325
  const q = (P) => {
326
- if (n || b) {
326
+ if (r || _) {
327
327
  P.preventDefault();
328
328
  return;
329
329
  }
@@ -333,12 +333,12 @@ function me({
333
333
  "a",
334
334
  {
335
335
  className: O,
336
- href: n || b ? void 0 : d,
336
+ href: r || _ ? void 0 : d,
337
337
  onClick: q,
338
338
  "aria-label": f,
339
- "aria-disabled": n || b ? "true" : void 0,
340
- "aria-busy": b ? "true" : void 0,
341
- "data-state": D,
339
+ "aria-disabled": r || _ ? "true" : void 0,
340
+ "aria-busy": _ ? "true" : void 0,
341
+ "data-state": A,
342
342
  ...h,
343
343
  children: Y
344
344
  }
@@ -349,30 +349,30 @@ function me({
349
349
  {
350
350
  type: m,
351
351
  className: O,
352
- disabled: n,
353
- onClick: b ? void 0 : l,
352
+ disabled: r,
353
+ onClick: _ ? void 0 : l,
354
354
  "aria-label": f,
355
- "aria-busy": b ? "true" : void 0,
356
- "data-state": D,
355
+ "aria-busy": _ ? "true" : void 0,
356
+ "data-state": A,
357
357
  ...h,
358
358
  children: Y
359
359
  }
360
360
  );
361
361
  }
362
- function Vs({
362
+ function Us({
363
363
  label: s,
364
364
  error: t,
365
- hint: r,
365
+ hint: n,
366
366
  fullWidth: i = !0,
367
367
  icon: a,
368
- iconRight: n,
368
+ iconRight: r,
369
369
  onIconRightClick: o,
370
370
  size: l = "m",
371
371
  disabled: m,
372
372
  id: d,
373
373
  ...f
374
374
  }) {
375
- const p = d || `input-${K.useId()}`, h = r ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, b = u || h;
375
+ const p = d || `input-${K.useId()}`, h = n ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, _ = u || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${i ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: s }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -381,14 +381,14 @@ function Vs({
381
381
  "input",
382
382
  {
383
383
  id: p,
384
- className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
384
+ className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
385
385
  disabled: m,
386
386
  "aria-invalid": t ? "true" : "false",
387
- "aria-describedby": b,
387
+ "aria-describedby": _,
388
388
  ...f
389
389
  }
390
390
  ),
391
- n && /* @__PURE__ */ e.jsx(
391
+ r && /* @__PURE__ */ e.jsx(
392
392
  "button",
393
393
  {
394
394
  type: "button",
@@ -396,72 +396,72 @@ function Vs({
396
396
  onClick: o,
397
397
  tabIndex: -1,
398
398
  "aria-label": "Toggle visibility",
399
- children: n
399
+ children: r
400
400
  }
401
401
  )
402
402
  ] }),
403
- r && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: r }),
403
+ n && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: u, className: "ds-input-error", role: "alert", children: t }) }) })
405
405
  ] });
406
406
  }
407
- function Ys({
407
+ function Vs({
408
408
  label: s,
409
409
  error: t,
410
- hint: r,
410
+ hint: n,
411
411
  fullWidth: i = !0,
412
412
  size: a = "m",
413
- disabled: n,
413
+ disabled: r,
414
414
  id: o,
415
415
  resize: l = !0,
416
416
  rows: m = 3,
417
417
  ...d
418
418
  }) {
419
- const f = o || `textarea-${K.useId()}`, p = r ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
420
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${i ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
+ const f = o || `textarea-${K.useId()}`, p = n ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
420
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${i ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: f, children: s }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
425
  id: f,
426
426
  className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
- disabled: n,
427
+ disabled: r,
428
428
  "aria-invalid": t ? "true" : "false",
429
429
  "aria-describedby": u,
430
430
  rows: m,
431
431
  ...d
432
432
  }
433
433
  ),
434
- r && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: r }),
434
+ n && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
435
435
  t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
436
436
  ] });
437
437
  }
438
- function Hs({
438
+ function Ys({
439
439
  label: s,
440
440
  value: t,
441
- onChange: r,
441
+ onChange: n,
442
442
  options: i = [],
443
443
  placeholder: a = "Select option",
444
- error: n,
444
+ error: r,
445
445
  fullWidth: o = !0,
446
446
  size: l = "m",
447
447
  disabled: m = !1,
448
448
  id: d,
449
449
  ...f
450
450
  }) {
451
- const [p, h] = A(!1), [u, b] = A(!1), [j, S] = A({}), [R, B] = A("down"), [y, $] = A(-1), O = E(null), D = E(null), Y = E(null), q = E(null), P = d || `select-${K.useId()}`, N = `${P}-label`, C = n ? `${P}-error` : void 0, G = 150, U = (g = !1) => {
452
- u || (b(!0), $(-1), q.current = setTimeout(() => {
451
+ const [p, h] = D(!1), [u, _] = D(!1), [b, S] = D({}), [R, B] = D("down"), [y, $] = D(-1), O = E(null), A = E(null), Y = E(null), q = E(null), P = d || `select-${K.useId()}`, N = `${P}-label`, C = r ? `${P}-error` : void 0, X = 150, U = (g = !1) => {
452
+ u || (_(!0), $(-1), q.current = setTimeout(() => {
453
453
  var c;
454
- h(!1), b(!1), g && ((c = Y.current) == null || c.focus());
455
- }, G));
454
+ h(!1), _(!1), g && ((c = Y.current) == null || c.focus());
455
+ }, X));
456
456
  }, x = (g) => {
457
- clearTimeout(q.current), b(!1);
457
+ clearTimeout(q.current), _(!1);
458
458
  const c = g !== void 0 ? g : Math.max(i.findIndex((w) => w.value === t), 0);
459
459
  $(c), h(!0);
460
460
  };
461
461
  M(() => () => clearTimeout(q.current), []);
462
462
  const v = () => {
463
- var ie;
464
- const g = (ie = O.current) == null ? void 0 : ie.getBoundingClientRect();
463
+ var ae;
464
+ const g = (ae = O.current) == null ? void 0 : ae.getBoundingClientRect();
465
465
  if (!g) return;
466
466
  const c = window.innerHeight, w = c - g.bottom, z = g.top, te = w < 300 && z > w;
467
467
  B(te ? "up" : "down"), S(
@@ -475,13 +475,13 @@ function Hs({
475
475
  };
476
476
  }, [p]), M(() => {
477
477
  const g = (c) => {
478
- O.current && !O.current.contains(c.target) && D.current && !D.current.contains(c.target) && U();
478
+ O.current && !O.current.contains(c.target) && A.current && !A.current.contains(c.target) && U();
479
479
  };
480
480
  return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
481
481
  }, [u]), M(() => {
482
482
  var c;
483
- if (!p || y < 0 || !D.current) return;
484
- (c = D.current.querySelectorAll(".ds-select-option")[y]) == null || c.scrollIntoView({ block: "nearest" });
483
+ if (!p || y < 0 || !A.current) return;
484
+ (c = A.current.querySelectorAll(".ds-select-option")[y]) == null || c.scrollIntoView({ block: "nearest" });
485
485
  }, [y, p]);
486
486
  const k = (g) => {
487
487
  switch (g.key) {
@@ -499,7 +499,7 @@ function Hs({
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- g.preventDefault(), p ? y >= 0 && (r == null || r(i[y].value), U(!0)) : x();
502
+ g.preventDefault(), p ? y >= 0 && (n == null || n(i[y].value), U(!0)) : x();
503
503
  break;
504
504
  case "Escape":
505
505
  p && (g.preventDefault(), U(!0));
@@ -508,10 +508,10 @@ function Hs({
508
508
  p && U(!1);
509
509
  break;
510
510
  }
511
- }, L = i.find((g) => g.value === t), H = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], X = p && /* @__PURE__ */ e.jsx(
511
+ }, L = i.find((g) => g.value === t), H = l === "xs" ? I[1] : l === "small" ? I[2] : I[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
- ref: D,
514
+ ref: A,
515
515
  role: "listbox",
516
516
  "aria-labelledby": s ? N : void 0,
517
517
  tabIndex: -1,
@@ -521,7 +521,7 @@ function Hs({
521
521
  `ds-select-dropdown--${R}`,
522
522
  u && "ds-select-dropdown--closing"
523
523
  ].filter(Boolean).join(" "),
524
- style: j,
524
+ style: b,
525
525
  children: i.map((g, c) => /* @__PURE__ */ e.jsx(
526
526
  "button",
527
527
  {
@@ -537,7 +537,7 @@ function Hs({
537
537
  c === y && "ds-select-option--active"
538
538
  ].filter(Boolean).join(" "),
539
539
  onClick: () => {
540
- r == null || r(g.value), U(!0);
540
+ n == null || n(g.value), U(!0);
541
541
  },
542
542
  children: g.label
543
543
  },
@@ -558,9 +558,9 @@ function Hs({
558
558
  "aria-expanded": p,
559
559
  "aria-activedescendant": p && y >= 0 ? `${P}-opt-${y}` : void 0,
560
560
  "aria-labelledby": s ? N : void 0,
561
- "aria-invalid": n ? "true" : "false",
561
+ "aria-invalid": r ? "true" : "false",
562
562
  "aria-describedby": C,
563
- className: `ds-select-trigger ds-select-trigger--${l} ${n ? "ds-select-trigger--error" : ""}`,
563
+ className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
564
564
  onClick: () => {
565
565
  m || (p ? U() : x());
566
566
  },
@@ -581,17 +581,17 @@ function Hs({
581
581
  ]
582
582
  }
583
583
  ) }),
584
- n && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: n }),
585
- typeof document < "u" && pe.createPortal(X, document.body)
584
+ r && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: r }),
585
+ typeof document < "u" && pe.createPortal(G, document.body)
586
586
  ] });
587
587
  }
588
- function qs({
588
+ function Hs({
589
589
  label: s,
590
590
  value: t = 0,
591
- onChange: r,
591
+ onChange: n,
592
592
  min: i = 0,
593
593
  max: a = 100,
594
- step: n = 1,
594
+ step: r = 1,
595
595
  size: o = "m",
596
596
  disabled: l = !1,
597
597
  hint: m,
@@ -600,36 +600,36 @@ function qs({
600
600
  }) {
601
601
  const p = () => {
602
602
  if (l) return;
603
- const R = Math.min(Number(t) + n, a);
604
- r == null || r(R);
603
+ const R = Math.min(Number(t) + r, a);
604
+ n == null || n(R);
605
605
  }, h = () => {
606
606
  if (l) return;
607
- const R = Math.max(Number(t) - n, i);
608
- r == null || r(R);
607
+ const R = Math.max(Number(t) - r, i);
608
+ n == null || n(R);
609
609
  }, u = (R) => {
610
610
  if (l) return;
611
611
  const B = R.target.value;
612
612
  if (B === "") {
613
- r == null || r(i);
613
+ n == null || n(i);
614
614
  return;
615
615
  }
616
616
  const y = Number(B);
617
617
  if (!isNaN(y)) {
618
618
  const $ = Math.min(Math.max(y, i), a);
619
- r == null || r($);
619
+ n == null || n($);
620
620
  }
621
- }, b = [
621
+ }, _ = [
622
622
  "ds-stepper-wrapper",
623
623
  l && "ds-stepper-wrapper--disabled",
624
624
  d && "ds-stepper-wrapper--error"
625
- ].filter(Boolean).join(" "), j = [
625
+ ].filter(Boolean).join(" "), b = [
626
626
  "ds-stepper",
627
627
  `ds-stepper--${o}`,
628
628
  l && "ds-stepper--disabled"
629
629
  ].filter(Boolean).join(" "), S = o === "xs" ? I[1] : o === "small" ? I[2] : I[3];
630
- return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
630
+ return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
631
631
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
632
- /* @__PURE__ */ e.jsxs("div", { className: j, children: [
632
+ /* @__PURE__ */ e.jsxs("div", { className: b, children: [
633
633
  /* @__PURE__ */ e.jsx(
634
634
  "button",
635
635
  {
@@ -650,7 +650,7 @@ function qs({
650
650
  onChange: u,
651
651
  min: i,
652
652
  max: a,
653
- step: n,
653
+ step: r,
654
654
  disabled: l,
655
655
  ...f
656
656
  }
@@ -671,35 +671,35 @@ function qs({
671
671
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
672
672
  ] });
673
673
  }
674
- function Ks({
674
+ function qs({
675
675
  children: s,
676
676
  padding: t = "m",
677
- variant: r = "info",
677
+ variant: n = "info",
678
678
  hover: i = !1,
679
679
  // deprecated, use variant="interactive"
680
680
  onClick: a,
681
- href: n,
681
+ href: r,
682
682
  disabled: o = !1,
683
683
  ...l
684
684
  }) {
685
- const d = (i ? "interactive" : r) === "interactive" || a || n, f = [
685
+ const d = (i ? "interactive" : n) === "interactive" || a || r, f = [
686
686
  "ds-card",
687
687
  `ds-card--${t}`,
688
688
  d && "ds-card--interactive"
689
689
  ].filter(Boolean).join(" ");
690
- if (n) {
691
- const u = (b) => {
690
+ if (r) {
691
+ const u = (_) => {
692
692
  if (o) {
693
- b.preventDefault();
693
+ _.preventDefault();
694
694
  return;
695
695
  }
696
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
696
+ _.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), a == null || a(_));
697
697
  };
698
698
  return /* @__PURE__ */ e.jsx(
699
699
  "a",
700
700
  {
701
701
  className: f,
702
- href: o ? void 0 : n,
702
+ href: o ? void 0 : r,
703
703
  onClick: u,
704
704
  "aria-disabled": o ? "true" : void 0,
705
705
  ...l,
@@ -723,40 +723,40 @@ function Ks({
723
723
  }
724
724
  );
725
725
  }
726
- function Gs({ children: s, ...t }) {
726
+ function Ks({ children: s, ...t }) {
727
727
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
728
728
  }
729
729
  function Xs({ children: s, ...t }) {
730
730
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
731
731
  }
732
- function Js({ children: s, ...t }) {
732
+ function Gs({ children: s, ...t }) {
733
733
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
734
734
  }
735
- function Zs({ children: s, ...t }) {
735
+ function Js({ children: s, ...t }) {
736
736
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
737
737
  }
738
- function Qs({ children: s, secondary: t = !1, ...r }) {
739
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
738
+ function Zs({ children: s, secondary: t = !1, ...n }) {
739
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...n, children: s });
740
740
  }
741
- function ds({ children: s, secondary: t = !1, ...r }) {
742
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...r, children: s });
741
+ function ds({ children: s, secondary: t = !1, ...n }) {
742
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...n, children: s });
743
743
  }
744
- function Fe({ children: s, secondary: t = !1, ...r }) {
745
- return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
744
+ function Fe({ children: s, secondary: t = !1, ...n }) {
745
+ return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...n, children: s });
746
746
  }
747
- function ae({
747
+ function ce({
748
748
  children: s,
749
749
  variant: t = "default",
750
- size: r = "m",
750
+ size: n = "m",
751
751
  role: i,
752
752
  ...a
753
753
  }) {
754
- const n = [
754
+ const r = [
755
755
  "ds-badge",
756
756
  `ds-badge--${t}`,
757
- `ds-badge--${r}`
757
+ `ds-badge--${n}`
758
758
  ].filter(Boolean).join(" "), o = i || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
759
- return /* @__PURE__ */ e.jsx("span", { className: n, role: o, ...a, children: s });
759
+ return /* @__PURE__ */ e.jsx("span", { className: r, role: o, ...a, children: s });
760
760
  }
761
761
  const us = {
762
762
  info: ke,
@@ -764,19 +764,19 @@ const us = {
764
764
  warning: ge,
765
765
  error: we
766
766
  };
767
- function et({
767
+ function Qs({
768
768
  children: s,
769
769
  variant: t = "info",
770
- title: r,
770
+ title: n,
771
771
  onClose: i,
772
772
  role: a,
773
- ...n
773
+ ...r
774
774
  }) {
775
775
  const o = us[t], l = a || (t === "error" ? "alert" : "status");
776
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${r ? "" : "ds-alert--no-title"}`, role: l, ...n, children: [
776
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
777
777
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(o, { size: I[3], strokeWidth: 1.5 }) }),
778
778
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
779
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
779
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: n }),
780
780
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
781
781
  ] }),
782
782
  i && /* @__PURE__ */ e.jsx(
@@ -786,52 +786,52 @@ function et({
786
786
  className: "ds-alert__close",
787
787
  onClick: i,
788
788
  "aria-label": "Close alert",
789
- children: /* @__PURE__ */ e.jsx(ne, { size: I[3], strokeWidth: 1.5 })
789
+ children: /* @__PURE__ */ e.jsx(re, { size: I[3], strokeWidth: 1.5 })
790
790
  }
791
791
  )
792
792
  ] });
793
793
  }
794
794
  const fs = 200;
795
- function st({
795
+ function et({
796
796
  children: s,
797
797
  title: t,
798
- onClose: r,
798
+ onClose: n,
799
799
  size: i = "m",
800
800
  ...a
801
801
  }) {
802
- const n = E(null), o = K.useId(), [l, m] = A(!1), d = () => {
803
- !r || l || (m(!0), setTimeout(() => {
804
- m(!1), r();
802
+ const r = E(null), o = K.useId(), [l, m] = D(!1), d = () => {
803
+ !n || l || (m(!0), setTimeout(() => {
804
+ m(!1), n();
805
805
  }, fs));
806
806
  };
807
807
  M(() => {
808
- const u = (j) => {
809
- j.key === "Escape" && d();
810
- }, b = (j) => {
811
- n.current && !n.current.contains(j.target) && d();
808
+ const u = (b) => {
809
+ b.key === "Escape" && d();
810
+ }, _ = (b) => {
811
+ r.current && !r.current.contains(b.target) && d();
812
812
  };
813
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
814
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
813
+ return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
814
+ document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
815
815
  };
816
- }, [r, l]);
816
+ }, [n, l]);
817
817
  const f = K.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === Ie), h = f.filter((u) => (u == null ? void 0 : u.type) !== Ie);
818
818
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", l && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...a, children: /* @__PURE__ */ e.jsxs(
819
819
  "div",
820
820
  {
821
821
  className: `ds-modal ds-modal--${i}`,
822
- ref: n,
822
+ ref: r,
823
823
  role: "dialog",
824
824
  "aria-modal": "true",
825
825
  "aria-labelledby": t ? o : void 0,
826
826
  children: [
827
- (t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
827
+ (t || n) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
828
828
  t && /* @__PURE__ */ e.jsx("h3", { id: o, className: "ds-modal__title", children: t }),
829
- r && /* @__PURE__ */ e.jsx(
829
+ n && /* @__PURE__ */ e.jsx(
830
830
  me,
831
831
  {
832
832
  variant: "ghost",
833
833
  size: "small",
834
- icon: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 }),
834
+ icon: /* @__PURE__ */ e.jsx(re, { size: I[2], strokeWidth: 1.5 }),
835
835
  onClick: d,
836
836
  "aria-label": "Close modal"
837
837
  }
@@ -849,18 +849,18 @@ function Ie({ children: s }) {
849
849
  function ms({
850
850
  children: s,
851
851
  title: t = "Code",
852
- defaultExpanded: r = !1,
852
+ defaultExpanded: n = !1,
853
853
  expanded: i,
854
854
  onToggle: a,
855
- padding: n = "s",
855
+ padding: r = "s",
856
856
  className: o = "",
857
857
  ...l
858
858
  }) {
859
- const [m, d] = A(r), f = i !== void 0, p = f ? i : m, h = () => {
860
- f ? a == null || a(!i) : d((b) => !b);
859
+ const [m, d] = D(n), f = i !== void 0, p = f ? i : m, h = () => {
860
+ f ? a == null || a(!i) : d((_) => !_);
861
861
  }, u = [
862
862
  "ds-code-accordion",
863
- `ds-code-accordion--${n}`,
863
+ `ds-code-accordion--${r}`,
864
864
  p && "ds-code-accordion--expanded",
865
865
  o
866
866
  ].filter(Boolean).join(" ");
@@ -888,28 +888,28 @@ function ms({
888
888
  /* @__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", children: /* @__PURE__ */ e.jsx("code", { children: s }) }) }) })
889
889
  ] });
890
890
  }
891
- function tt({ children: s, block: t = !1, collapsible: r = !1, title: i = "Code", defaultExpanded: a = !1, ...n }) {
892
- return t ? r ? /* @__PURE__ */ e.jsx(ms, { title: i, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
891
+ function st({ children: s, block: t = !1, collapsible: n = !1, title: i = "Code", defaultExpanded: a = !1, ...r }) {
892
+ return t ? n ? /* @__PURE__ */ e.jsx(ms, { title: i, defaultExpanded: a, ...r, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...r, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: s });
893
893
  }
894
- function rt({ href: s, children: t, onClick: r, target: i, rel: a, ...n }) {
894
+ function tt({ href: s, children: t, onClick: n, target: i, rel: a, ...r }) {
895
895
  const l = i === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
896
896
  return /* @__PURE__ */ e.jsx(
897
897
  "a",
898
898
  {
899
899
  href: s,
900
900
  className: "ds-link",
901
- onClick: r,
901
+ onClick: n,
902
902
  target: i,
903
903
  rel: l,
904
- ...n,
904
+ ...r,
905
905
  children: t
906
906
  }
907
907
  );
908
908
  }
909
- function nt({ children: s, size: t = "m", variant: r = "ghost", ...i }) {
910
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...i, children: K.Children.map(s, (a) => K.isValidElement(a) ? K.cloneElement(a, { size: t, variant: r }) : a) });
909
+ function nt({ children: s, size: t = "m", variant: n = "ghost", ...i }) {
910
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...i, children: K.Children.map(s, (a) => K.isValidElement(a) ? K.cloneElement(a, { size: t, variant: n }) : a) });
911
911
  }
912
- function at({ children: s, selected: t = !1, onClick: r, size: i = "m", variant: a = "ghost", disabled: n = !1, icon: o, href: l, ...m }) {
912
+ function rt({ children: s, selected: t = !1, onClick: n, size: i = "m", variant: a = "ghost", disabled: r = !1, icon: o, href: l, ...m }) {
913
913
  const d = o && !s, f = [
914
914
  "ds-tab",
915
915
  `ds-tab--${i}`,
@@ -922,20 +922,20 @@ function at({ children: s, selected: t = !1, onClick: r, size: i = "m", variant:
922
922
  ] });
923
923
  if (l) {
924
924
  const h = (u) => {
925
- if (n) {
925
+ if (r) {
926
926
  u.preventDefault();
927
927
  return;
928
928
  }
929
- u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), r == null || r(u));
929
+ u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), n == null || n(u));
930
930
  };
931
931
  return /* @__PURE__ */ e.jsx(
932
932
  "a",
933
933
  {
934
934
  role: "tab",
935
935
  "aria-current": t ? "page" : void 0,
936
- "aria-disabled": n ? "true" : void 0,
936
+ "aria-disabled": r ? "true" : void 0,
937
937
  className: f,
938
- href: n ? void 0 : l,
938
+ href: r ? void 0 : l,
939
939
  onClick: h,
940
940
  ...m,
941
941
  children: p
@@ -948,24 +948,24 @@ function at({ children: s, selected: t = !1, onClick: r, size: i = "m", variant:
948
948
  role: "tab",
949
949
  "aria-selected": t,
950
950
  className: f,
951
- onClick: r,
952
- disabled: n,
951
+ onClick: n,
952
+ disabled: r,
953
953
  ...m,
954
954
  children: p
955
955
  }
956
956
  );
957
957
  }
958
- function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1 }) {
959
- const n = E(null), o = E(null), [l, m] = A(!1), d = E(!1), f = E(null), p = E(null), h = () => {
960
- if (!n.current) return;
961
- const u = n.current.querySelector(`[data-value="${t}"]`);
958
+ function at({ options: s, value: t, onChange: n, size: i = "m", disabled: a = !1 }) {
959
+ const r = E(null), o = E(null), [l, m] = D(!1), d = E(!1), f = E(null), p = E(null), h = () => {
960
+ if (!r.current) return;
961
+ const u = r.current.querySelector(`[data-value="${t}"]`);
962
962
  if (!u) return;
963
- const b = n.current.getBoundingClientRect(), j = u.getBoundingClientRect(), S = j.left - b.left, R = j.width;
963
+ const _ = r.current.getBoundingClientRect(), b = u.getBoundingClientRect(), S = b.left - _.left, R = b.width;
964
964
  o.current ? (o.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", o.current.style.left = S + "px", o.current.style.width = R + "px", d.current = !1) : (m(!0), requestAnimationFrame(() => {
965
- if (!o.current || !n.current) return;
966
- const B = n.current.querySelector(`[data-value="${t}"]`);
965
+ if (!o.current || !r.current) return;
966
+ const B = r.current.querySelector(`[data-value="${t}"]`);
967
967
  if (!B) return;
968
- const y = n.current.getBoundingClientRect(), $ = B.getBoundingClientRect();
968
+ const y = r.current.getBoundingClientRect(), $ = B.getBoundingClientRect();
969
969
  o.current.style.transition = "none", o.current.style.left = $.left - y.left + "px", o.current.style.width = $.width + "px";
970
970
  }));
971
971
  };
@@ -973,11 +973,11 @@ function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1
973
973
  const u = f.current !== t;
974
974
  f.current = t, d.current = l && u, h();
975
975
  }), M(() => {
976
- if (!n.current) return;
976
+ if (!r.current) return;
977
977
  const u = new ResizeObserver(() => {
978
978
  d.current = !1, p.current();
979
979
  });
980
- return u.observe(n.current), () => u.disconnect();
980
+ return u.observe(r.current), () => u.disconnect();
981
981
  }, []), /* @__PURE__ */ e.jsxs(
982
982
  "div",
983
983
  {
@@ -986,7 +986,7 @@ function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1
986
986
  `ds-seg--${i}`,
987
987
  a && "ds-seg--disabled"
988
988
  ].filter(Boolean).join(" "),
989
- ref: n,
989
+ ref: r,
990
990
  role: "group",
991
991
  children: [
992
992
  l && /* @__PURE__ */ e.jsx(
@@ -1003,7 +1003,7 @@ function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1
1003
1003
  type: "button",
1004
1004
  "data-value": u.value,
1005
1005
  className: ["ds-seg__btn", t === u.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1006
- onClick: () => !a && r(u.value),
1006
+ onClick: () => !a && n(u.value),
1007
1007
  "aria-pressed": t === u.value,
1008
1008
  disabled: a,
1009
1009
  children: [
@@ -1020,17 +1020,17 @@ function it({ options: s, value: t, onChange: r, size: i = "m", disabled: a = !1
1020
1020
  function Ee({
1021
1021
  children: s,
1022
1022
  title: t,
1023
- defaultExpanded: r = !1,
1023
+ defaultExpanded: n = !1,
1024
1024
  expanded: i,
1025
1025
  onToggle: a,
1026
- padding: n = "m",
1026
+ padding: r = "m",
1027
1027
  ...o
1028
1028
  }) {
1029
- const [l, m] = A(r), d = i !== void 0, f = d ? i : l, p = () => {
1029
+ const [l, m] = D(n), d = i !== void 0, f = d ? i : l, p = () => {
1030
1030
  d ? a == null || a(!i) : m((u) => !u);
1031
1031
  }, h = [
1032
1032
  "ds-accordion",
1033
- `ds-accordion--${n}`,
1033
+ `ds-accordion--${r}`,
1034
1034
  f && "ds-accordion--expanded"
1035
1035
  ].filter(Boolean).join(" ");
1036
1036
  return /* @__PURE__ */ e.jsxs("div", { className: h, ...o, children: [
@@ -1057,42 +1057,42 @@ function Ee({
1057
1057
  /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: s }) }) })
1058
1058
  ] });
1059
1059
  }
1060
- const re = 8, ce = 8;
1061
- function ps(s, t, r) {
1060
+ const ne = 8, le = 8;
1061
+ function ps(s, t, n) {
1062
1062
  const i = window.innerWidth;
1063
- let a, n;
1063
+ let a, r;
1064
1064
  switch (s) {
1065
1065
  case "top":
1066
- a = t.top - r.height - re, n = t.left + t.width / 2 - r.width / 2;
1066
+ a = t.top - n.height - ne, r = t.left + t.width / 2 - n.width / 2;
1067
1067
  break;
1068
1068
  case "bottom":
1069
- a = t.bottom + re, n = t.left + t.width / 2 - r.width / 2;
1069
+ a = t.bottom + ne, r = t.left + t.width / 2 - n.width / 2;
1070
1070
  break;
1071
1071
  case "left":
1072
- a = t.top + t.height / 2 - r.height / 2, n = t.left - r.width - re;
1072
+ a = t.top + t.height / 2 - n.height / 2, r = t.left - n.width - ne;
1073
1073
  break;
1074
1074
  case "right":
1075
- a = t.top + t.height / 2 - r.height / 2, n = t.right + re;
1075
+ a = t.top + t.height / 2 - n.height / 2, r = t.right + ne;
1076
1076
  break;
1077
1077
  default:
1078
- a = t.bottom + re, n = t.left;
1078
+ a = t.bottom + ne, r = t.left;
1079
1079
  }
1080
- const o = Math.max(ce, Math.min(i - r.width - ce, n)), l = n - o;
1080
+ const o = Math.max(le, Math.min(i - n.width - le, r)), l = r - o;
1081
1081
  return { top: a, left: o, arrowOffset: l };
1082
1082
  }
1083
- function hs(s, t, r) {
1083
+ function hs(s, t, n) {
1084
1084
  const i = window.innerWidth, a = window.innerHeight;
1085
- if (s.top >= t + re + ce) return "top";
1086
- if (a - s.bottom >= t + re + ce) return "bottom";
1087
- if (i - s.right >= r + re + ce) return "right";
1088
- if (s.left >= r + re + ce) return "left";
1089
- const n = Math.max(s.top, a - s.bottom, s.left, i - s.right);
1090
- return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === i - s.right ? "right" : "left";
1091
- }
1092
- function ot({ children: s, content: t, position: r, ...i }) {
1093
- const [a, n] = A(!1), [o, l] = A({ visibility: "hidden" }), [m, d] = A(r || "top"), f = E(null), p = E(null), h = E(!1), u = () => {
1085
+ if (s.top >= t + ne + le) return "top";
1086
+ if (a - s.bottom >= t + ne + le) return "bottom";
1087
+ if (i - s.right >= n + ne + le) return "right";
1088
+ if (s.left >= n + ne + le) return "left";
1089
+ const r = Math.max(s.top, a - s.bottom, s.left, i - s.right);
1090
+ return r === s.top ? "top" : r === a - s.bottom ? "bottom" : r === i - s.right ? "right" : "left";
1091
+ }
1092
+ function it({ children: s, content: t, position: n, ...i }) {
1093
+ const [a, r] = D(!1), [o, l] = D({ visibility: "hidden" }), [m, d] = D(n || "top"), f = E(null), p = E(null), h = E(!1), u = () => {
1094
1094
  if (!f.current || !p.current) return;
1095
- const j = f.current.getBoundingClientRect(), S = p.current.getBoundingClientRect(), R = r || hs(j, S.height, S.width), { top: B, left: y, arrowOffset: $ } = ps(R, j, S);
1095
+ const b = f.current.getBoundingClientRect(), S = p.current.getBoundingClientRect(), R = n || hs(b, S.height, S.width), { top: B, left: y, arrowOffset: $ } = ps(R, b, S);
1096
1096
  d(R), l({
1097
1097
  position: "fixed",
1098
1098
  top: B,
@@ -1104,18 +1104,18 @@ function ot({ children: s, content: t, position: r, ...i }) {
1104
1104
  if (M(() => {
1105
1105
  if (!a) return;
1106
1106
  l({ position: "fixed", visibility: "hidden" });
1107
- const j = requestAnimationFrame(u);
1107
+ const b = requestAnimationFrame(u);
1108
1108
  return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1109
- cancelAnimationFrame(j), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1109
+ cancelAnimationFrame(b), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1110
1110
  };
1111
- }, [a, r]), M(() => {
1111
+ }, [a, n]), M(() => {
1112
1112
  if (!a) return;
1113
- const j = (S) => {
1114
- f.current && !f.current.contains(S.target) && n(!1);
1113
+ const b = (S) => {
1114
+ f.current && !f.current.contains(S.target) && r(!1);
1115
1115
  };
1116
- return document.addEventListener("touchstart", j), () => document.removeEventListener("touchstart", j);
1116
+ return document.addEventListener("touchstart", b), () => document.removeEventListener("touchstart", b);
1117
1117
  }, [a]), !t) return s;
1118
- const b = a && /* @__PURE__ */ e.jsx(
1118
+ const _ = a && /* @__PURE__ */ e.jsx(
1119
1119
  "div",
1120
1120
  {
1121
1121
  ref: p,
@@ -1131,34 +1131,34 @@ function ot({ children: s, content: t, position: r, ...i }) {
1131
1131
  ref: f,
1132
1132
  className: "ds-tooltip-wrapper",
1133
1133
  onMouseEnter: () => {
1134
- h.current || n(!0);
1134
+ h.current || r(!0);
1135
1135
  },
1136
1136
  onMouseLeave: () => {
1137
- h.current || n(!1);
1137
+ h.current || r(!1);
1138
1138
  },
1139
1139
  onTouchStart: () => {
1140
- h.current = !0, n((j) => !j);
1140
+ h.current = !0, r((b) => !b);
1141
1141
  },
1142
1142
  ...i,
1143
1143
  children: [
1144
1144
  s,
1145
- typeof document < "u" && pe.createPortal(b, document.body)
1145
+ typeof document < "u" && pe.createPortal(_, document.body)
1146
1146
  ]
1147
1147
  }
1148
1148
  );
1149
1149
  }
1150
- function lt({
1150
+ function ot({
1151
1151
  checked: s = !1,
1152
1152
  onChange: t,
1153
- size: r = "m",
1153
+ size: n = "m",
1154
1154
  disabled: i = !1,
1155
1155
  label: a,
1156
- id: n,
1156
+ id: r,
1157
1157
  ...o
1158
1158
  }) {
1159
- const l = n || `toggle-${K.useId()}`, m = [
1159
+ const l = r || `toggle-${K.useId()}`, m = [
1160
1160
  "ds-toggle",
1161
- `ds-toggle--${r}`,
1161
+ `ds-toggle--${n}`,
1162
1162
  i && "ds-toggle--disabled"
1163
1163
  ].filter(Boolean).join(" ");
1164
1164
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
@@ -1178,20 +1178,20 @@ function lt({
1178
1178
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1179
1179
  ] });
1180
1180
  }
1181
- function ct({
1181
+ function lt({
1182
1182
  checked: s = !1,
1183
1183
  onChange: t,
1184
- size: r = "m",
1184
+ size: n = "m",
1185
1185
  disabled: i = !1,
1186
1186
  label: a,
1187
- id: n,
1187
+ id: r,
1188
1188
  ...o
1189
1189
  }) {
1190
- const l = n || `checkbox-${K.useId()}`, m = [
1190
+ const l = r || `checkbox-${K.useId()}`, m = [
1191
1191
  "ds-checkbox",
1192
- `ds-checkbox--${r}`,
1192
+ `ds-checkbox--${n}`,
1193
1193
  i && "ds-checkbox--disabled"
1194
- ].filter(Boolean).join(" "), d = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
1194
+ ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1195
1195
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1196
1196
  /* @__PURE__ */ e.jsx(
1197
1197
  "input",
@@ -1216,20 +1216,20 @@ function ct({
1216
1216
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1217
1217
  ] });
1218
1218
  }
1219
- function dt({
1219
+ function ct({
1220
1220
  checked: s = !1,
1221
1221
  onChange: t,
1222
- size: r = "m",
1222
+ size: n = "m",
1223
1223
  disabled: i = !1,
1224
1224
  label: a,
1225
- name: n,
1225
+ name: r,
1226
1226
  value: o,
1227
1227
  id: l,
1228
1228
  ...m
1229
1229
  }) {
1230
1230
  const d = l || `radio-${K.useId()}`, f = [
1231
1231
  "ds-radio",
1232
- `ds-radio--${r}`,
1232
+ `ds-radio--${n}`,
1233
1233
  i && "ds-radio--disabled"
1234
1234
  ].filter(Boolean).join(" ");
1235
1235
  return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: d, children: [
@@ -1242,7 +1242,7 @@ function dt({
1242
1242
  checked: s,
1243
1243
  onChange: (p) => t == null ? void 0 : t(p.target.checked),
1244
1244
  disabled: i,
1245
- name: n,
1245
+ name: r,
1246
1246
  value: o,
1247
1247
  ...m
1248
1248
  }
@@ -1251,25 +1251,25 @@ function dt({
1251
1251
  a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1252
1252
  ] });
1253
1253
  }
1254
- function xs({ width: s, height: t, shape: r = "rect", aspectRatio: i, className: a = "", style: n = {}, ...o }) {
1254
+ function xs({ width: s, height: t, shape: n = "rect", aspectRatio: i, className: a = "", style: r = {}, ...o }) {
1255
1255
  return /* @__PURE__ */ e.jsx(
1256
1256
  "span",
1257
1257
  {
1258
- className: ["ds-skeleton", `ds-skeleton--${r}`, a].filter(Boolean).join(" "),
1259
- style: { width: s, height: t, aspectRatio: i, ...n },
1258
+ className: ["ds-skeleton", `ds-skeleton--${n}`, a].filter(Boolean).join(" "),
1259
+ style: { width: s, height: t, aspectRatio: i, ...r },
1260
1260
  "aria-hidden": "true",
1261
1261
  ...o
1262
1262
  }
1263
1263
  );
1264
1264
  }
1265
- function bs({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "", style: a = {}, ...n }) {
1265
+ function _s({ lines: s = 1, lastLineWidth: t = "70%", gap: n, className: i = "", style: a = {}, ...r }) {
1266
1266
  return /* @__PURE__ */ e.jsx(
1267
1267
  "span",
1268
1268
  {
1269
1269
  className: ["ds-skeleton-text", i].filter(Boolean).join(" "),
1270
- style: { gap: r, ...a },
1270
+ style: { gap: n, ...a },
1271
1271
  "aria-hidden": "true",
1272
- ...n,
1272
+ ...r,
1273
1273
  children: Array.from({ length: s }, (o, l) => /* @__PURE__ */ e.jsx(
1274
1274
  "span",
1275
1275
  {
@@ -1281,44 +1281,44 @@ function bs({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: i = "",
1281
1281
  }
1282
1282
  );
1283
1283
  }
1284
- xs.Text = bs;
1285
- function _s(s) {
1284
+ xs.Text = _s;
1285
+ function js(s) {
1286
1286
  let t = 2166136261;
1287
- for (let r = 0; r < s.length; r++)
1288
- t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
1287
+ for (let n = 0; n < s.length; n++)
1288
+ t ^= s.charCodeAt(n), t = Math.imul(t, 16777619) >>> 0;
1289
1289
  return t % 360;
1290
1290
  }
1291
- function js(s) {
1291
+ function bs(s) {
1292
1292
  if (!s) return "";
1293
1293
  const t = s.trim().split(/\s+/);
1294
1294
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1295
1295
  }
1296
- function ut({ seed: s, icon: t, src: r, size: i = 32, className: a = "", style: n = {}, ...o }) {
1297
- const l = _s(s ?? ""), [m, d] = A(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: js(s) });
1296
+ function dt({ seed: s, icon: t, src: n, size: i = 32, className: a = "", style: r = {}, ...o }) {
1297
+ const l = js(s ?? ""), [m, d] = D(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: bs(s) });
1298
1298
  return /* @__PURE__ */ e.jsx(
1299
1299
  "div",
1300
1300
  {
1301
1301
  className: ["ds-avatar", a].filter(Boolean).join(" "),
1302
- style: { width: i, height: i, "--ds-avatar-h": l, ...n },
1302
+ style: { width: i, height: i, "--ds-avatar-h": l, ...r },
1303
1303
  "aria-hidden": "true",
1304
1304
  ...o,
1305
- children: r && !m ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => d(!0) }) : f
1305
+ children: n && !m ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : f
1306
1306
  }
1307
1307
  );
1308
1308
  }
1309
- function ft({
1309
+ function ut({
1310
1310
  children: s,
1311
1311
  size: t = "compact",
1312
- stickyTop: r,
1312
+ stickyTop: n,
1313
1313
  maxHeight: i,
1314
1314
  className: a = "",
1315
- style: n = {},
1315
+ style: r = {},
1316
1316
  ...o
1317
1317
  }) {
1318
1318
  const l = {
1319
1319
  ...i ? { maxHeight: i } : {},
1320
- ...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
1321
- ...n
1320
+ ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1321
+ ...r
1322
1322
  };
1323
1323
  return /* @__PURE__ */ e.jsx(
1324
1324
  "div",
@@ -1336,23 +1336,23 @@ function ft({
1336
1336
  }
1337
1337
  );
1338
1338
  }
1339
- function mt({ children: s, ...t }) {
1339
+ function ft({ children: s, ...t }) {
1340
1340
  return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
1341
1341
  }
1342
- function pt({ children: s, ...t }) {
1342
+ function mt({ children: s, ...t }) {
1343
1343
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1344
1344
  }
1345
- function ht({ children: s, interactive: t, selected: r, subheader: i, exiting: a, updated: n, className: o = "", onClick: l, ...m }) {
1345
+ function pt({ children: s, interactive: t, selected: n, subheader: i, exiting: a, updated: r, className: o = "", onClick: l, ...m }) {
1346
1346
  return /* @__PURE__ */ e.jsx(
1347
1347
  "tr",
1348
1348
  {
1349
1349
  className: [
1350
1350
  "ds-table-row",
1351
1351
  t || l ? "ds-table-row--interactive" : "",
1352
- r ? "ds-table-row--selected" : "",
1352
+ n ? "ds-table-row--selected" : "",
1353
1353
  i ? "ds-table-row--subheader" : "",
1354
1354
  a ? "ds-table-row--exiting" : "",
1355
- n ? "ds-table-row--updated" : "",
1355
+ r ? "ds-table-row--updated" : "",
1356
1356
  o
1357
1357
  ].filter(Boolean).join(" "),
1358
1358
  onClick: l,
@@ -1361,20 +1361,20 @@ function ht({ children: s, interactive: t, selected: r, subheader: i, exiting: a
1361
1361
  }
1362
1362
  );
1363
1363
  }
1364
- function xt({ children: s, colSpan: t = 999, ...r }) {
1365
- return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1364
+ function ht({ children: s, colSpan: t = 999, ...n }) {
1365
+ return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1366
1366
  }
1367
- function bt({ children: s, align: t = "left", sortDir: r, onSort: i, width: a, className: n = "", style: o = {}, ...l }) {
1368
- const m = !!i || r !== void 0, d = r === "asc" ? qe : r === "desc" ? he : Ke;
1367
+ function xt({ children: s, align: t = "left", sortDir: n, onSort: i, width: a, className: r = "", style: o = {}, ...l }) {
1368
+ const m = !!i || n !== void 0, d = n === "asc" ? qe : n === "desc" ? he : Ke;
1369
1369
  return /* @__PURE__ */ e.jsx(
1370
1370
  "th",
1371
1371
  {
1372
1372
  className: [
1373
1373
  "ds-th",
1374
1374
  m ? "ds-th--sortable" : "",
1375
- r ? "ds-th--sorted" : "",
1375
+ n ? "ds-th--sorted" : "",
1376
1376
  t !== "left" ? `ds-table-cell--${t}` : "",
1377
- n
1377
+ r
1378
1378
  ].filter(Boolean).join(" "),
1379
1379
  onClick: i,
1380
1380
  style: { width: a, ...o },
@@ -1386,17 +1386,17 @@ function bt({ children: s, align: t = "left", sortDir: r, onSort: i, width: a, c
1386
1386
  }
1387
1387
  );
1388
1388
  }
1389
- function _t({ children: s, align: t = "left", secondary: r, muted: i, truncate: a, nowrap: n, className: o = "", ...l }) {
1389
+ function _t({ children: s, align: t = "left", secondary: n, muted: i, truncate: a, nowrap: r, className: o = "", ...l }) {
1390
1390
  return /* @__PURE__ */ e.jsx(
1391
1391
  "td",
1392
1392
  {
1393
1393
  className: [
1394
1394
  "ds-td",
1395
1395
  t !== "left" ? `ds-table-cell--${t}` : "",
1396
- r ? "ds-table-cell--secondary" : "",
1396
+ n ? "ds-table-cell--secondary" : "",
1397
1397
  i ? "ds-table-cell--muted" : "",
1398
1398
  a ? "ds-table-cell--truncate" : "",
1399
- n ? "ds-table-cell--nowrap" : "",
1399
+ r ? "ds-table-cell--nowrap" : "",
1400
1400
  o
1401
1401
  ].filter(Boolean).join(" "),
1402
1402
  ...l,
@@ -1407,44 +1407,44 @@ function _t({ children: s, align: t = "left", secondary: r, muted: i, truncate:
1407
1407
  function jt({
1408
1408
  icon: s,
1409
1409
  title: t,
1410
- description: r,
1410
+ description: n,
1411
1411
  action: i,
1412
1412
  size: a = "m",
1413
- className: n = "",
1413
+ className: r = "",
1414
1414
  ...o
1415
1415
  }) {
1416
1416
  return /* @__PURE__ */ e.jsxs(
1417
1417
  "div",
1418
1418
  {
1419
- className: ["ds-empty-state", `ds-empty-state--${a}`, n].filter(Boolean).join(" "),
1419
+ className: ["ds-empty-state", `ds-empty-state--${a}`, r].filter(Boolean).join(" "),
1420
1420
  ...o,
1421
1421
  children: [
1422
1422
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: s }),
1423
1423
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: t }),
1424
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: r }),
1424
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
1425
1425
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: i })
1426
1426
  ]
1427
1427
  }
1428
1428
  );
1429
1429
  }
1430
- function vt({
1430
+ function bt({
1431
1431
  label: s,
1432
1432
  hint: t,
1433
- error: r,
1433
+ error: n,
1434
1434
  required: i = !1,
1435
1435
  disabled: a = !1,
1436
- htmlFor: n,
1436
+ htmlFor: r,
1437
1437
  children: o,
1438
1438
  className: l = "",
1439
1439
  style: m,
1440
1440
  ...d
1441
1441
  }) {
1442
- const f = K.useId(), p = n ?? f, h = `${p}-hint`, u = `${p}-error`;
1442
+ const f = K.useId(), p = r ?? f, h = `${p}-hint`, u = `${p}-error`;
1443
1443
  return /* @__PURE__ */ e.jsxs(
1444
1444
  "div",
1445
1445
  {
1446
1446
  className: `ds-field${l ? ` ${l}` : ""}`,
1447
- "data-state": r ? "error" : void 0,
1447
+ "data-state": n ? "error" : void 0,
1448
1448
  "data-required": i ? "" : void 0,
1449
1449
  "data-disabled": a ? "" : void 0,
1450
1450
  style: m,
@@ -1452,14 +1452,14 @@ function vt({
1452
1452
  children: [
1453
1453
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: s }),
1454
1454
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: o }),
1455
- t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1456
- r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: r })
1455
+ t && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1456
+ n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: n })
1457
1457
  ]
1458
1458
  }
1459
1459
  );
1460
1460
  }
1461
- function Nt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, className: n = "", style: o, ...l }) {
1462
- const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
1461
+ function vt({ label: s, value: t, delta: n, size: i = "m", inline: a = !1, className: r = "", style: o, ...l }) {
1462
+ const m = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1463
1463
  return /* @__PURE__ */ e.jsxs(
1464
1464
  "div",
1465
1465
  {
@@ -1467,34 +1467,34 @@ function Nt({ label: s, value: t, delta: r, size: i = "m", inline: a = !1, class
1467
1467
  "ds-stat",
1468
1468
  `ds-stat--${i}`,
1469
1469
  a && "ds-stat--inline",
1470
- n
1470
+ r
1471
1471
  ].filter(Boolean).join(" "),
1472
1472
  style: o,
1473
1473
  ...l,
1474
1474
  children: [
1475
1475
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: s }),
1476
1476
  t != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: t }),
1477
- r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: r })
1477
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: n })
1478
1478
  ]
1479
1479
  }
1480
1480
  );
1481
1481
  }
1482
- function wt({
1482
+ function Nt({
1483
1483
  children: s,
1484
1484
  separator: t = "/",
1485
- "aria-label": r = "Breadcrumb",
1485
+ "aria-label": n = "Breadcrumb",
1486
1486
  className: i = "",
1487
1487
  style: a,
1488
- ...n
1488
+ ...r
1489
1489
  }) {
1490
1490
  const o = K.Children.toArray(s).filter(Boolean);
1491
1491
  return /* @__PURE__ */ e.jsx(
1492
1492
  "nav",
1493
1493
  {
1494
1494
  className: `ds-breadcrumb${i ? ` ${i}` : ""}`,
1495
- "aria-label": r,
1495
+ "aria-label": n,
1496
1496
  style: a,
1497
- ...n,
1497
+ ...r,
1498
1498
  children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: o.map((l, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1499
1499
  l,
1500
1500
  m < o.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
@@ -1502,13 +1502,13 @@ function wt({
1502
1502
  }
1503
1503
  );
1504
1504
  }
1505
- function gt({
1505
+ function wt({
1506
1506
  page: s,
1507
1507
  total: t,
1508
- onChange: r,
1508
+ onChange: n,
1509
1509
  siblings: i = 1,
1510
1510
  "aria-label": a = "Pagination",
1511
- className: n = "",
1511
+ className: r = "",
1512
1512
  style: o,
1513
1513
  ...l
1514
1514
  }) {
@@ -1516,7 +1516,7 @@ function gt({
1516
1516
  return /* @__PURE__ */ e.jsxs(
1517
1517
  "nav",
1518
1518
  {
1519
- className: `ds-pagination${n ? ` ${n}` : ""}`,
1519
+ className: `ds-pagination${r ? ` ${r}` : ""}`,
1520
1520
  "aria-label": a,
1521
1521
  style: o,
1522
1522
  ...l,
@@ -1525,10 +1525,10 @@ function gt({
1525
1525
  "button",
1526
1526
  {
1527
1527
  className: "ds-pagination-arrow",
1528
- onClick: () => r == null ? void 0 : r(s - 1),
1528
+ onClick: () => n == null ? void 0 : n(s - 1),
1529
1529
  disabled: s <= 1,
1530
1530
  "aria-label": "Previous page",
1531
- children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
1531
+ children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1532
1532
  }
1533
1533
  ),
1534
1534
  m.map(
@@ -1536,7 +1536,7 @@ function gt({
1536
1536
  "button",
1537
1537
  {
1538
1538
  className: `ds-pagination-page${d === s ? " ds-pagination-page--current" : ""}`,
1539
- onClick: () => d !== s && (r == null ? void 0 : r(d)),
1539
+ onClick: () => d !== s && (n == null ? void 0 : n(d)),
1540
1540
  "aria-current": d === s ? "page" : void 0,
1541
1541
  "aria-label": `Page ${d}`,
1542
1542
  children: d
@@ -1548,46 +1548,46 @@ function gt({
1548
1548
  "button",
1549
1549
  {
1550
1550
  className: "ds-pagination-arrow",
1551
- onClick: () => r == null ? void 0 : r(s + 1),
1551
+ onClick: () => n == null ? void 0 : n(s + 1),
1552
1552
  disabled: s >= t,
1553
1553
  "aria-label": "Next page",
1554
- children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1554
+ children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
1555
1555
  }
1556
1556
  )
1557
1557
  ]
1558
1558
  }
1559
1559
  );
1560
1560
  }
1561
- function vs(s, t, r) {
1561
+ function vs(s, t, n) {
1562
1562
  if (t <= 7) return Array.from({ length: t }, (o, l) => l + 1);
1563
- const i = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
1564
- i > 2 && n.push("…");
1565
- for (let o = i; o <= a; o++) n.push(o);
1566
- return a < t - 1 && n.push("…"), n.push(t), n;
1563
+ const i = Math.max(2, s - n), a = Math.min(t - 1, s + n), r = [1];
1564
+ i > 2 && r.push("…");
1565
+ for (let o = i; o <= a; o++) r.push(o);
1566
+ return a < t - 1 && r.push("…"), r.push(t), r;
1567
1567
  }
1568
1568
  const Ns = 200;
1569
- function yt({
1569
+ function gt({
1570
1570
  children: s,
1571
1571
  title: t,
1572
- onClose: r,
1572
+ onClose: n,
1573
1573
  side: i = "right",
1574
1574
  ...a
1575
1575
  }) {
1576
- const n = E(null), o = K.useId(), [l, m] = A(!1), d = () => {
1577
- !r || l || (m(!0), setTimeout(() => {
1578
- m(!1), r();
1576
+ const r = E(null), o = K.useId(), [l, m] = D(!1), d = () => {
1577
+ !n || l || (m(!0), setTimeout(() => {
1578
+ m(!1), n();
1579
1579
  }, Ns));
1580
1580
  };
1581
1581
  M(() => {
1582
- const u = (j) => {
1583
- j.key === "Escape" && d();
1584
- }, b = (j) => {
1585
- n.current && !n.current.contains(j.target) && d();
1582
+ const u = (b) => {
1583
+ b.key === "Escape" && d();
1584
+ }, _ = (b) => {
1585
+ r.current && !r.current.contains(b.target) && d();
1586
1586
  };
1587
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
1588
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
1587
+ return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
1588
+ document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
1589
1589
  };
1590
- }, [r, l]);
1590
+ }, [n, l]);
1591
1591
  const f = K.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === Be), h = f.filter((u) => (u == null ? void 0 : u.type) !== Be);
1592
1592
  return /* @__PURE__ */ e.jsx(
1593
1593
  "div",
@@ -1599,14 +1599,14 @@ function yt({
1599
1599
  {
1600
1600
  className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
1601
1601
  "data-side": i,
1602
- ref: n,
1602
+ ref: r,
1603
1603
  role: "dialog",
1604
1604
  "aria-modal": "true",
1605
1605
  "aria-labelledby": t ? o : void 0,
1606
1606
  children: [
1607
1607
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1608
1608
  t && /* @__PURE__ */ e.jsx("h3", { id: o, className: "ds-drawer-title", children: t }),
1609
- r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 }) })
1609
+ n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(re, { size: I[2], strokeWidth: 1.5 }) })
1610
1610
  ] }),
1611
1611
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: h }),
1612
1612
  p
@@ -1625,16 +1625,16 @@ const ws = {
1625
1625
  warning: ge,
1626
1626
  error: we
1627
1627
  };
1628
- function kt({
1628
+ function yt({
1629
1629
  children: s,
1630
1630
  variant: t = "info",
1631
- action: r,
1631
+ action: n,
1632
1632
  onAction: i,
1633
1633
  onDismiss: a,
1634
- role: n,
1634
+ role: r,
1635
1635
  ...o
1636
1636
  }) {
1637
- const l = ws[t], m = n || (t === "error" ? "alert" : "status");
1637
+ const l = ws[t], m = r || (t === "error" ? "alert" : "status");
1638
1638
  return /* @__PURE__ */ e.jsxs(
1639
1639
  "div",
1640
1640
  {
@@ -1644,13 +1644,13 @@ function kt({
1644
1644
  children: [
1645
1645
  l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: I[2], strokeWidth: 1.5 }) }),
1646
1646
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
1647
- r && /* @__PURE__ */ e.jsx(
1647
+ n && /* @__PURE__ */ e.jsx(
1648
1648
  "button",
1649
1649
  {
1650
1650
  type: "button",
1651
1651
  className: "ds-banner-action",
1652
1652
  onClick: i,
1653
- children: r
1653
+ children: n
1654
1654
  }
1655
1655
  ),
1656
1656
  a && /* @__PURE__ */ e.jsx(
@@ -1660,24 +1660,24 @@ function kt({
1660
1660
  className: "ds-banner-dismiss",
1661
1661
  onClick: a,
1662
1662
  "aria-label": "Dismiss",
1663
- children: /* @__PURE__ */ e.jsx(ne, { size: I[2], strokeWidth: 1.5 })
1663
+ children: /* @__PURE__ */ e.jsx(re, { size: I[2], strokeWidth: 1.5 })
1664
1664
  }
1665
1665
  )
1666
1666
  ]
1667
1667
  }
1668
1668
  );
1669
1669
  }
1670
- function Et({
1670
+ function kt({
1671
1671
  trigger: s,
1672
1672
  items: t = [],
1673
- open: r,
1673
+ open: n,
1674
1674
  onOpenChange: i,
1675
1675
  align: a = "left",
1676
- className: n = "",
1676
+ className: r = "",
1677
1677
  style: o,
1678
1678
  ...l
1679
1679
  }) {
1680
- const [m, d] = A(!1), [f, p] = A(!1), h = r !== void 0, u = h ? r : m, b = E(null), j = E(null), S = E(null), R = E(null), [B, y] = A({}), $ = E(null), O = 150, D = () => {
1680
+ const [m, d] = D(!1), [f, p] = D(!1), h = n !== void 0, u = h ? n : m, _ = E(null), b = E(null), S = E(null), R = E(null), [B, y] = D({}), $ = E(null), O = 150, A = () => {
1681
1681
  if (h)
1682
1682
  i == null || i(!1);
1683
1683
  else {
@@ -1688,15 +1688,15 @@ function Et({
1688
1688
  }
1689
1689
  }, Y = () => {
1690
1690
  const x = !u;
1691
- h ? i == null || i(x) : x ? (clearTimeout($.current), p(!1), d(!0)) : D();
1691
+ h ? i == null || i(x) : x ? (clearTimeout($.current), p(!1), d(!0)) : A();
1692
1692
  }, q = () => {
1693
1693
  u || (h ? i == null || i(!0) : (clearTimeout($.current), p(!1), d(!0)));
1694
1694
  };
1695
1695
  M(() => () => clearTimeout($.current), []), M(() => {
1696
1696
  if (!u) return;
1697
1697
  const x = 300, v = () => {
1698
- var X;
1699
- const k = (X = b.current) == null ? void 0 : X.getBoundingClientRect();
1698
+ var G;
1699
+ const k = (G = _.current) == null ? void 0 : G.getBoundingClientRect();
1700
1700
  if (!k) return;
1701
1701
  const L = window.innerHeight - k.bottom, H = L < x + 8 && k.top > L;
1702
1702
  y(
@@ -1718,19 +1718,19 @@ function Et({
1718
1718
  if (!u) return;
1719
1719
  const x = (k) => {
1720
1720
  var L, H;
1721
- !((L = b.current) != null && L.contains(k.target)) && !((H = j.current) != null && H.contains(k.target)) && D();
1721
+ !((L = _.current) != null && L.contains(k.target)) && !((H = b.current) != null && H.contains(k.target)) && A();
1722
1722
  }, v = (k) => {
1723
- k.key === "Escape" && (D(), P());
1723
+ k.key === "Escape" && (A(), P());
1724
1724
  };
1725
1725
  return document.addEventListener("mousedown", x), document.addEventListener("keydown", v), () => {
1726
1726
  document.removeEventListener("mousedown", x), document.removeEventListener("keydown", v);
1727
1727
  };
1728
1728
  }, [u]), M(() => {
1729
- if (!u || !R.current || !j.current) return;
1729
+ if (!u || !R.current || !b.current) return;
1730
1730
  const x = N(), v = R.current === "last" ? x[x.length - 1] : x[0];
1731
1731
  v == null || v.focus(), R.current = null;
1732
1732
  }, [u]);
1733
- const N = () => j.current ? [...j.current.querySelectorAll(
1733
+ const N = () => b.current ? [...b.current.querySelectorAll(
1734
1734
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1735
1735
  )] : [], C = (x) => {
1736
1736
  var v, k;
@@ -1743,8 +1743,8 @@ function Et({
1743
1743
  const L = N();
1744
1744
  (k = L[L.length - 1]) == null || k.focus();
1745
1745
  }
1746
- }, G = (x) => {
1747
- var L, H, X, g;
1746
+ }, X = (x) => {
1747
+ var L, H, G, g;
1748
1748
  const v = N(), k = v.findIndex((c) => c === document.activeElement);
1749
1749
  switch (x.key) {
1750
1750
  case "ArrowDown":
@@ -1754,19 +1754,19 @@ function Et({
1754
1754
  x.preventDefault(), k <= 0 ? P() : (H = v[k - 1]) == null || H.focus();
1755
1755
  break;
1756
1756
  case "Home":
1757
- x.preventDefault(), (X = v[0]) == null || X.focus();
1757
+ x.preventDefault(), (G = v[0]) == null || G.focus();
1758
1758
  break;
1759
1759
  case "End":
1760
1760
  x.preventDefault(), (g = v[v.length - 1]) == null || g.focus();
1761
1761
  break;
1762
1762
  case "Tab":
1763
- D();
1763
+ A();
1764
1764
  break;
1765
1765
  }
1766
1766
  }, U = u && /* @__PURE__ */ e.jsx(
1767
1767
  "div",
1768
1768
  {
1769
- ref: j,
1769
+ ref: b,
1770
1770
  role: "menu",
1771
1771
  className: [
1772
1772
  "ds-dropdown__menu",
@@ -1774,7 +1774,7 @@ function Et({
1774
1774
  f && "ds-dropdown__menu--closing"
1775
1775
  ].filter(Boolean).join(" "),
1776
1776
  style: B,
1777
- onKeyDown: G,
1777
+ onKeyDown: X,
1778
1778
  children: t.map((x, v) => {
1779
1779
  if (x.separator)
1780
1780
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, v);
@@ -1794,8 +1794,8 @@ function Et({
1794
1794
  ].filter(Boolean).join(" "),
1795
1795
  ...H,
1796
1796
  onClick: () => {
1797
- var X;
1798
- (X = x.onClick) == null || X.call(x), D();
1797
+ var G;
1798
+ (G = x.onClick) == null || G.call(x), A();
1799
1799
  },
1800
1800
  children: [
1801
1801
  x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
@@ -1811,8 +1811,8 @@ function Et({
1811
1811
  return /* @__PURE__ */ e.jsxs(
1812
1812
  "div",
1813
1813
  {
1814
- ref: b,
1815
- className: ["ds-dropdown", n].filter(Boolean).join(" "),
1814
+ ref: _,
1815
+ className: ["ds-dropdown", r].filter(Boolean).join(" "),
1816
1816
  style: o,
1817
1817
  ...l,
1818
1818
  children: [
@@ -1831,22 +1831,22 @@ function Et({
1831
1831
  }
1832
1832
  );
1833
1833
  }
1834
- function $t({
1834
+ function Et({
1835
1835
  value: s = 0,
1836
1836
  size: t = "m",
1837
- variant: r = "default",
1837
+ variant: n = "default",
1838
1838
  showValue: i = !1,
1839
1839
  min: a = 2,
1840
- animate: n = !0
1840
+ animate: r = !0
1841
1841
  }) {
1842
- const o = Math.min(100, Math.max(0, s)), l = Math.max(a, o), m = r === "auto" ? o >= 70 ? "success" : o >= 50 ? "warning" : "danger" : r;
1842
+ const o = Math.min(100, Math.max(0, s)), l = Math.max(a, o), m = n === "auto" ? o >= 70 ? "success" : o >= 50 ? "warning" : "danger" : n;
1843
1843
  return /* @__PURE__ */ e.jsxs(
1844
1844
  "div",
1845
1845
  {
1846
1846
  className: [
1847
1847
  "ds-progress",
1848
1848
  `ds-progress--${t}`,
1849
- !n && "ds-progress--instant"
1849
+ !r && "ds-progress--instant"
1850
1850
  ].filter(Boolean).join(" "),
1851
1851
  role: "progressbar",
1852
1852
  "aria-valuenow": o,
@@ -1870,7 +1870,7 @@ function $t({
1870
1870
  }
1871
1871
  const gs = (s) => 1 - Math.pow(1 - s, 3), ys = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1872
1872
  function ks(s, { duration: t = 600 } = {}) {
1873
- const [r, i] = A(s), a = E(s), n = E(null);
1873
+ const [n, i] = D(s), a = E(s), r = E(null);
1874
1874
  return M(() => {
1875
1875
  if (ys()) {
1876
1876
  i(s), a.current = s;
@@ -1882,48 +1882,48 @@ function ks(s, { duration: t = 600 } = {}) {
1882
1882
  const d = (f) => {
1883
1883
  m || (m = f);
1884
1884
  const p = Math.min((f - m) / t, 1);
1885
- i(o + l * gs(p)), p < 1 ? n.current = requestAnimationFrame(d) : a.current = s;
1885
+ i(o + l * gs(p)), p < 1 ? r.current = requestAnimationFrame(d) : a.current = s;
1886
1886
  };
1887
- return n.current = requestAnimationFrame(d), () => cancelAnimationFrame(n.current);
1888
- }, [s, t]), r;
1887
+ return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
1888
+ }, [s, t]), n;
1889
1889
  }
1890
- function Tt({
1890
+ function $t({
1891
1891
  value: s,
1892
1892
  duration: t = 600,
1893
- decimals: r = 0,
1893
+ decimals: n = 0,
1894
1894
  prefix: i = "",
1895
1895
  suffix: a = ""
1896
1896
  }) {
1897
- const o = ks(s, { duration: t }).toFixed(r);
1897
+ const o = ks(s, { duration: t }).toFixed(n);
1898
1898
  return `${i}${o}${a}`;
1899
1899
  }
1900
- function Es({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
1901
- const i = E(null), [a, n] = A(!1);
1900
+ function Es({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
1901
+ const i = E(null), [a, r] = D(!1);
1902
1902
  return M(() => {
1903
1903
  const o = i.current;
1904
1904
  if (!o) return;
1905
1905
  const l = new IntersectionObserver(
1906
1906
  ([m]) => {
1907
- m.isIntersecting ? (n(!0), r && l.disconnect()) : r || n(!1);
1907
+ m.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
1908
1908
  },
1909
1909
  { threshold: s, rootMargin: t }
1910
1910
  );
1911
1911
  return l.observe(o), () => l.disconnect();
1912
- }, [s, t, r]), { ref: i, inView: a };
1912
+ }, [s, t, n]), { ref: i, inView: a };
1913
1913
  }
1914
- function Rt({
1914
+ function Tt({
1915
1915
  children: s,
1916
1916
  as: t = "div",
1917
- once: r = !1,
1917
+ once: n = !1,
1918
1918
  threshold: i = 0.1,
1919
1919
  rootMargin: a = "0px",
1920
- onEnter: n,
1920
+ onEnter: r,
1921
1921
  onLeave: o,
1922
1922
  ...l
1923
1923
  }) {
1924
- const { ref: m, inView: d } = Es({ threshold: i, rootMargin: a, once: r }), f = E(!1);
1924
+ const { ref: m, inView: d } = Es({ threshold: i, rootMargin: a, once: n }), f = E(!1);
1925
1925
  return M(() => {
1926
- d && !f.current && (n == null || n()), !d && f.current && (o == null || o()), f.current = d;
1926
+ d && !f.current && (r == null || r()), !d && f.current && (o == null || o()), f.current = d;
1927
1927
  }, [d]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(d) : s });
1928
1928
  }
1929
1929
  const Me = {
@@ -1933,9 +1933,9 @@ const Me = {
1933
1933
  error: we
1934
1934
  };
1935
1935
  let de = [];
1936
- const je = /* @__PURE__ */ new Set();
1936
+ const be = /* @__PURE__ */ new Set();
1937
1937
  function We() {
1938
- je.forEach((s) => s([...de]));
1938
+ be.forEach((s) => s([...de]));
1939
1939
  }
1940
1940
  function $s(s) {
1941
1941
  de = [...de, s], We();
@@ -1943,22 +1943,22 @@ function $s(s) {
1943
1943
  function Ts(s) {
1944
1944
  de = de.filter((t) => t.id !== s), We();
1945
1945
  }
1946
- function St() {
1947
- const s = (t, r = {}) => {
1946
+ function Rt() {
1947
+ const s = (t, n = {}) => {
1948
1948
  $s({
1949
1949
  id: `${Date.now()}-${Math.random()}`,
1950
1950
  message: t,
1951
1951
  type: "default",
1952
1952
  duration: 4e3,
1953
- ...r
1953
+ ...n
1954
1954
  });
1955
1955
  };
1956
- return s.success = (t, r) => s(t, { ...r, type: "success" }), s.error = (t, r) => s(t, { ...r, type: "error" }), s.warning = (t, r) => s(t, { ...r, type: "warning" }), { toast: s };
1956
+ return s.success = (t, n) => s(t, { ...n, type: "success" }), s.error = (t, n) => s(t, { ...n, type: "error" }), s.warning = (t, n) => s(t, { ...n, type: "warning" }), { toast: s };
1957
1957
  }
1958
1958
  function Rs({ data: s, onDismiss: t }) {
1959
- const [r, i] = A(!1), a = E(null);
1960
- M(() => (requestAnimationFrame(() => i(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
1961
- function n() {
1959
+ const [n, i] = D(!1), a = E(null);
1960
+ M(() => (requestAnimationFrame(() => i(!0)), s.duration > 0 && (a.current = setTimeout(() => r(), s.duration)), () => clearTimeout(a.current)), []);
1961
+ function r() {
1962
1962
  i(!1), setTimeout(() => t(s.id), 250);
1963
1963
  }
1964
1964
  const o = Me[s.type] ?? Me.default;
@@ -1968,7 +1968,7 @@ function Rs({ data: s, onDismiss: t }) {
1968
1968
  className: [
1969
1969
  "ds-toast",
1970
1970
  `ds-toast--${s.type}`,
1971
- r && "ds-toast--visible"
1971
+ n && "ds-toast--visible"
1972
1972
  ].filter(Boolean).join(" "),
1973
1973
  role: s.type === "error" ? "alert" : "status",
1974
1974
  "aria-live": "polite",
@@ -1979,74 +1979,81 @@ function Rs({ data: s, onDismiss: t }) {
1979
1979
  "button",
1980
1980
  {
1981
1981
  className: "ds-toast__close",
1982
- onClick: n,
1982
+ onClick: r,
1983
1983
  "aria-label": "Закрыть",
1984
- children: /* @__PURE__ */ e.jsx(ne, { size: I[3], strokeWidth: 1.5 })
1984
+ children: /* @__PURE__ */ e.jsx(re, { size: I[3], strokeWidth: 1.5 })
1985
1985
  }
1986
1986
  )
1987
1987
  ]
1988
1988
  }
1989
1989
  );
1990
1990
  }
1991
- function At({ position: s = "bottom-right" }) {
1992
- const [t, r] = A(() => [...de]);
1993
- return M(() => (je.add(r), () => je.delete(r)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
1991
+ function St({ position: s = "bottom-right" }) {
1992
+ const [t, n] = D(() => [...de]);
1993
+ return M(() => (be.add(n), () => be.delete(n)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
1994
1994
  /* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((i) => /* @__PURE__ */ e.jsx(Rs, { data: i, onDismiss: Ts }, i.id)) }),
1995
1995
  document.body
1996
1996
  );
1997
1997
  }
1998
1998
  const Ss = {
1999
- running: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "info", children: "Running..." }),
2000
- success: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "success", children: "Done" }),
2001
- error: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "error", children: "Error" })
1999
+ running: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "info", children: "Running..." }),
2000
+ success: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "success", children: "Done" }),
2001
+ error: /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: "error", children: "Error" })
2002
2002
  };
2003
2003
  function Dt({
2004
2004
  label: s,
2005
2005
  status: t = "idle",
2006
- icon: r,
2006
+ icon: n,
2007
2007
  badge: i,
2008
2008
  defaultExpanded: a = !1,
2009
- expanded: n,
2009
+ expanded: r,
2010
2010
  onToggle: o,
2011
2011
  children: l,
2012
2012
  className: m = "",
2013
2013
  ...d
2014
2014
  }) {
2015
- const f = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2016
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
2015
+ const f = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2016
+ n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2017
2017
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2018
2018
  Ss[t],
2019
2019
  i
2020
2020
  ] });
2021
- return /* @__PURE__ */ e.jsx(
2021
+ return l ? /* @__PURE__ */ e.jsx(
2022
2022
  "div",
2023
2023
  {
2024
- className: ["ds-tool-card", m].filter(Boolean).join(" "),
2024
+ className: ["ds-tool-card", f && "ds-tool-card--running", m].filter(Boolean).join(" "),
2025
2025
  ...d,
2026
2026
  children: /* @__PURE__ */ e.jsx(
2027
2027
  Ee,
2028
2028
  {
2029
- title: f,
2029
+ title: p,
2030
2030
  padding: "s",
2031
2031
  defaultExpanded: a,
2032
- expanded: n,
2033
- onToggle: o,
2032
+ expanded: f ? !1 : r,
2033
+ onToggle: f ? void 0 : o,
2034
2034
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2035
2035
  }
2036
2036
  )
2037
2037
  }
2038
+ ) : /* @__PURE__ */ e.jsx(
2039
+ "div",
2040
+ {
2041
+ className: ["ds-tool-card", "ds-tool-card--bubble", m].filter(Boolean).join(" "),
2042
+ ...d,
2043
+ children: p
2044
+ }
2038
2045
  );
2039
2046
  }
2040
- function As({
2047
+ function Ds({
2041
2048
  text: s,
2042
2049
  size: t = "xs",
2043
- timeout: r = 800,
2050
+ timeout: n = 800,
2044
2051
  "aria-label": i = "Copy to clipboard",
2045
2052
  ...a
2046
2053
  }) {
2047
- const [n, o] = A(!1), l = (m) => {
2054
+ const [r, o] = D(!1), l = (m) => {
2048
2055
  m.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2049
- o(!0), setTimeout(() => o(!1), r);
2056
+ o(!0), setTimeout(() => o(!1), n);
2050
2057
  });
2051
2058
  };
2052
2059
  return /* @__PURE__ */ e.jsx(
@@ -2054,7 +2061,7 @@ function As({
2054
2061
  {
2055
2062
  variant: "ghost",
2056
2063
  size: t,
2057
- state: n ? "success" : "idle",
2064
+ state: r ? "success" : "idle",
2058
2065
  icon: /* @__PURE__ */ e.jsx(Je, { size: I[1], strokeWidth: 1.5 }),
2059
2066
  "aria-label": i,
2060
2067
  onClick: l,
@@ -2062,8 +2069,8 @@ function As({
2062
2069
  }
2063
2070
  );
2064
2071
  }
2065
- function It({ content: s, streaming: t = !1, ...r }) {
2066
- const [i, a] = A(t);
2072
+ function At({ content: s, streaming: t = !1, ...n }) {
2073
+ const [i, a] = D(t);
2067
2074
  return M(() => {
2068
2075
  a(!!t);
2069
2076
  }, [t]), /* @__PURE__ */ e.jsx(
@@ -2076,7 +2083,7 @@ function It({ content: s, streaming: t = !1, ...r }) {
2076
2083
  /* @__PURE__ */ e.jsx(Ze, { size: I[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2077
2084
  /* @__PURE__ */ e.jsx(ds, { secondary: !0, children: "Thinking" })
2078
2085
  ] }),
2079
- ...r,
2086
+ ...n,
2080
2087
  children: /* @__PURE__ */ e.jsxs(Fe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2081
2088
  s,
2082
2089
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
@@ -2084,19 +2091,19 @@ function It({ content: s, streaming: t = !1, ...r }) {
2084
2091
  }
2085
2092
  );
2086
2093
  }
2087
- function Bt({
2094
+ function It({
2088
2095
  count: s,
2089
2096
  current: t = 0,
2090
- done: r = [],
2097
+ done: n = [],
2091
2098
  onChange: i,
2092
2099
  showCounter: a = !0,
2093
- className: n = "",
2100
+ className: r = "",
2094
2101
  "aria-label": o = "Steps",
2095
2102
  ...l
2096
2103
  }) {
2097
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...l, children: [
2104
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
2098
2105
  /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": o, children: Array.from({ length: s }, (m, d) => {
2099
- const f = d === t, p = r.includes(d) && !f, h = i && (d <= t || r.includes(d)), u = [
2106
+ const f = d === t, p = n.includes(d) && !f, h = i && (d <= t || n.includes(d)), u = [
2100
2107
  "ds-step-indicator__dot",
2101
2108
  f && "ds-step-indicator__dot--active",
2102
2109
  p && "ds-step-indicator__dot--done"
@@ -2123,29 +2130,29 @@ function Bt({
2123
2130
  ] })
2124
2131
  ] });
2125
2132
  }
2126
- function Mt({
2133
+ function Bt({
2127
2134
  content: s,
2128
2135
  isStreaming: t = !1,
2129
- cursor: r = "line",
2136
+ cursor: n = "line",
2130
2137
  onChunk: i,
2131
2138
  className: a = "",
2132
- ...n
2139
+ ...r
2133
2140
  }) {
2134
2141
  const o = E(s);
2135
2142
  return M(() => {
2136
2143
  s !== o.current && (i == null || i(s), o.current = s);
2137
- }, [s, i]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...n, children: [
2144
+ }, [s, i]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...r, children: [
2138
2145
  s,
2139
- t && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
2146
+ t && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2140
2147
  ] });
2141
2148
  }
2142
- function Pt({
2149
+ function Mt({
2143
2150
  role: s = "assistant",
2144
2151
  header: t,
2145
- footer: r,
2152
+ footer: n,
2146
2153
  attachments: i,
2147
2154
  isStreaming: a = !1,
2148
- children: n,
2155
+ children: r,
2149
2156
  className: o = "",
2150
2157
  ...l
2151
2158
  }) {
@@ -2155,77 +2162,77 @@ function Pt({
2155
2162
  a && "ds-chat-message--streaming",
2156
2163
  o
2157
2164
  ].filter(Boolean).join(" ");
2158
- return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: n }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2165
+ return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2159
2166
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2160
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: n }),
2161
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2167
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
2168
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2162
2169
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2163
2170
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2164
2171
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2165
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: n }),
2166
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
2172
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
2173
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2167
2174
  ] });
2168
2175
  }
2169
- function Lt(s, { containerRef: t, smartPause: r = !0 } = {}) {
2176
+ function Pt(s, { containerRef: t, smartPause: n = !0 } = {}) {
2170
2177
  const i = E(!1), a = E(0);
2171
2178
  M(() => {
2172
- const n = t == null ? void 0 : t.current;
2173
- if (!n) return;
2179
+ const r = t == null ? void 0 : t.current;
2180
+ if (!r) return;
2174
2181
  const o = () => {
2175
- const l = n.scrollHeight - n.scrollTop - n.clientHeight < 64;
2176
- !l && n.scrollTop < a.current && (i.current = !0), l && (i.current = !1), a.current = n.scrollTop;
2182
+ const l = r.scrollHeight - r.scrollTop - r.clientHeight < 64;
2183
+ !l && r.scrollTop < a.current && (i.current = !0), l && (i.current = !1), a.current = r.scrollTop;
2177
2184
  };
2178
- return n.addEventListener("scroll", o, { passive: !0 }), () => n.removeEventListener("scroll", o);
2185
+ return r.addEventListener("scroll", o, { passive: !0 }), () => r.removeEventListener("scroll", o);
2179
2186
  }, [t]), M(() => {
2180
- const n = t == null ? void 0 : t.current;
2181
- n && (r && i.current || (n.scrollTop = n.scrollHeight));
2187
+ const r = t == null ? void 0 : t.current;
2188
+ r && (n && i.current || (r.scrollTop = r.scrollHeight));
2182
2189
  }, s);
2183
2190
  }
2184
- function Ds({
2191
+ function As({
2185
2192
  prompts: s,
2186
2193
  enabled: t,
2187
- typingSpeed: r = 38,
2194
+ typingSpeed: n = 38,
2188
2195
  erasingSpeed: i = 18,
2189
2196
  holdTime: a = 2200,
2190
- betweenTime: n = 380,
2197
+ betweenTime: r = 380,
2191
2198
  manualPauseMs: o = 5e3
2192
2199
  }) {
2193
- const [l, m] = A(0), [d, f] = A(""), p = E("typing"), h = E(0), u = E(0), b = E(null), j = E(0);
2200
+ const [l, m] = D(0), [d, f] = D(""), p = E("typing"), h = E(0), u = E(0), _ = E(null), b = E(0);
2194
2201
  M(() => {
2195
2202
  u.current = l;
2196
2203
  }, [l]), M(() => {
2197
- if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2204
+ if (_.current && (clearTimeout(_.current), _.current = null), !t || s.length === 0) {
2198
2205
  f(""), h.current = 0, p.current = "typing";
2199
2206
  return;
2200
2207
  }
2201
2208
  const $ = () => {
2202
2209
  const O = Date.now();
2203
- if (j.current > O) {
2204
- b.current = setTimeout($, j.current - O);
2210
+ if (b.current > O) {
2211
+ _.current = setTimeout($, b.current - O);
2205
2212
  return;
2206
2213
  }
2207
- const D = s[u.current % s.length] ?? "";
2208
- p.current === "typing" ? (h.current += 1, f(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", b.current = setTimeout($, a)) : b.current = setTimeout($, r + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout($, i)) : (h.current = Math.max(0, h.current - 1), f(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), b.current = setTimeout($, n)) : b.current = setTimeout($, i));
2214
+ const A = s[u.current % s.length] ?? "";
2215
+ p.current === "typing" ? (h.current += 1, f(A.slice(0, h.current)), h.current >= A.length ? (p.current = "holding", _.current = setTimeout($, a)) : _.current = setTimeout($, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", _.current = setTimeout($, i)) : (h.current = Math.max(0, h.current - 1), f(A.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), _.current = setTimeout($, r)) : _.current = setTimeout($, i));
2209
2216
  };
2210
- return b.current = setTimeout($, 260), () => {
2211
- b.current && clearTimeout(b.current);
2217
+ return _.current = setTimeout($, 260), () => {
2218
+ _.current && clearTimeout(_.current);
2212
2219
  };
2213
- }, [t, s, r, i, a, n]);
2220
+ }, [t, s, n, i, a, r]);
2214
2221
  const S = ($) => {
2215
2222
  if (s.length === 0) return;
2216
- const O = ($ % s.length + s.length) % s.length, D = s[O];
2217
- u.current = O, h.current = D.length, p.current = "holding", j.current = Date.now() + o, m(O), f(D);
2223
+ const O = ($ % s.length + s.length) % s.length, A = s[O];
2224
+ u.current = O, h.current = A.length, p.current = "holding", b.current = Date.now() + o, m(O), f(A);
2218
2225
  }, R = () => S(u.current + 1), B = () => S(u.current - 1), y = s[l % s.length] ?? "";
2219
2226
  return { displayed: d, currentPrompt: y, index: l, next: R, prev: B };
2220
2227
  }
2221
2228
  let Is = 0;
2222
- function zt({
2229
+ function Lt({
2223
2230
  value: s = "",
2224
2231
  onChange: t,
2225
- onSubmit: r,
2232
+ onSubmit: n,
2226
2233
  onStop: i,
2227
2234
  onKeyDown: a,
2228
- loading: n = !1,
2235
+ loading: r = !1,
2229
2236
  disabled: o = !1,
2230
2237
  placeholder: l = "Let's get things done...",
2231
2238
  animatedPlaceholders: m,
@@ -2234,58 +2241,58 @@ function zt({
2234
2241
  onAttachFiles: p,
2235
2242
  onAttachImages: h,
2236
2243
  onRemoveAttachment: u,
2237
- onRemoveImage: b,
2238
- acceptImage: j,
2244
+ onRemoveImage: _,
2245
+ acceptImage: b,
2239
2246
  acceptFile: S,
2240
2247
  maxImages: R,
2241
2248
  maxImageSize: B,
2242
2249
  leftSlot: y,
2243
2250
  rightSlot: $,
2244
2251
  className: O = "",
2245
- ...D
2252
+ ...A
2246
2253
  }) {
2247
- const Y = E(null), q = E(null), P = E(0), [N, C] = A(!1), [G, U] = A([]), x = (_) => {
2254
+ const Y = E(null), q = E(null), P = E(0), [N, C] = D(!1), [X, U] = D([]), x = (j) => {
2248
2255
  const T = ++Is;
2249
- U((V) => [...V, { id: T, msg: _ }]), setTimeout(() => U((V) => V.filter((J) => J.id !== T)), 6e3);
2250
- }, v = (_) => U((T) => T.filter((V) => V.id !== _)), k = (_) => _.type.startsWith("image/"), L = () => !0, H = j ?? k, X = S ?? L, g = (_) => {
2256
+ U((V) => [...V, { id: T, msg: j }]), setTimeout(() => U((V) => V.filter((J) => J.id !== T)), 6e3);
2257
+ }, v = (j) => U((T) => T.filter((V) => V.id !== j)), k = (j) => j.type.startsWith("image/"), L = () => !0, H = b ?? k, G = S ?? L, g = (j) => {
2251
2258
  const T = [], V = [], J = [], Z = [];
2252
- let ee = 0, le = R != null ? R - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2253
- for (const se of _)
2254
- H(se) ? B && se.size > B ? J.push(se.name) : le > 0 ? (T.push(se), le--) : ee++ : X(se) ? V.push(se) : Z.push(se.name);
2259
+ let ee = 0, oe = R != null ? R - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2260
+ for (const se of j)
2261
+ H(se) ? B && se.size > B ? J.push(se.name) : oe > 0 ? (T.push(se), oe--) : ee++ : G(se) ? V.push(se) : Z.push(se.name);
2255
2262
  return { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee };
2256
- }, c = (_) => {
2257
- const { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(_);
2263
+ }, c = (j) => {
2264
+ const { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(j);
2258
2265
  J.length && x(`File${J.length > 1 ? "s" : ""} too large${B ? ` (max ${B / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && x(`Max ${R} images per message`), h && T.length && h(T);
2259
- const le = V.concat(h ? [] : T);
2260
- p && le.length && p(le);
2266
+ const oe = V.concat(h ? [] : T);
2267
+ p && oe.length && p(oe);
2261
2268
  };
2262
2269
  M(() => {
2263
- const _ = q.current;
2264
- _ && (_.style.height = "auto", _.style.height = `${Math.min(_.scrollHeight, 200)}px`);
2270
+ const j = q.current;
2271
+ j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2265
2272
  }, [s]), M(() => {
2266
- const _ = (T) => {
2273
+ const j = (T) => {
2267
2274
  var J, Z, ee;
2268
- if (n || o) return;
2275
+ if (r || o) return;
2269
2276
  const V = (J = T.target) == null ? void 0 : J.tagName;
2270
2277
  V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (Z = T.target) != null && Z.isContentEditable || T.ctrlKey || T.metaKey || T.altKey || T.key.length !== 1 && T.key !== "Backspace" && T.key !== "Delete" || (ee = q.current) == null || ee.focus();
2271
2278
  };
2272
- return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
2273
- }, [n, o]);
2274
- const w = (_) => {
2275
- _.preventDefault(), P.current++, _.dataTransfer.types.includes("Files") && C(!0);
2276
- }, z = (_) => {
2277
- _.preventDefault(), P.current--, P.current === 0 && C(!1);
2278
- }, F = (_) => _.preventDefault(), te = (_) => {
2279
- _.preventDefault(), P.current = 0, C(!1);
2280
- const T = Array.from(_.dataTransfer.files);
2279
+ return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2280
+ }, [r, o]);
2281
+ const w = (j) => {
2282
+ j.preventDefault(), P.current++, j.dataTransfer.types.includes("Files") && C(!0);
2283
+ }, z = (j) => {
2284
+ j.preventDefault(), P.current--, P.current === 0 && C(!1);
2285
+ }, F = (j) => j.preventDefault(), te = (j) => {
2286
+ j.preventDefault(), P.current = 0, C(!1);
2287
+ const T = Array.from(j.dataTransfer.files);
2281
2288
  T.length && c(T);
2282
- }, ie = (_) => {
2283
- const T = Array.from(_.target.files || []);
2289
+ }, ae = (j) => {
2290
+ const T = Array.from(j.target.files || []);
2284
2291
  Y.current && (Y.current.value = ""), T.length && c(T);
2285
- }, W = (_) => {
2292
+ }, W = (j) => {
2286
2293
  var se;
2287
2294
  if (!h) return;
2288
- const T = (se = _.clipboardData) == null ? void 0 : se.items;
2295
+ const T = (se = j.clipboardData) == null ? void 0 : se.items;
2289
2296
  if (!T) return;
2290
2297
  const V = [];
2291
2298
  for (const Ue of T) {
@@ -2293,29 +2300,29 @@ function zt({
2293
2300
  Te && V.push(Te);
2294
2301
  }
2295
2302
  if (V.length === 0) return;
2296
- const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: le } = g(V);
2297
- Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), le && x(`Max ${R} images per message`), J.length && (_.preventDefault(), h(J));
2298
- }, Q = !n && !o && !!(m != null && m.length) && s.length === 0, oe = Ds({
2303
+ const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: oe } = g(V);
2304
+ Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), oe && x(`Max ${R} images per message`), J.length && (j.preventDefault(), h(J));
2305
+ }, Q = !r && !o && !!(m != null && m.length) && s.length === 0, ie = As({
2299
2306
  prompts: m ?? [],
2300
2307
  enabled: Q
2301
- }), xe = (_) => {
2308
+ }), xe = (j) => {
2302
2309
  if (Q) {
2303
- if (_.key === "ArrowDown" || _.key === "ArrowRight") {
2304
- _.preventDefault(), oe.next();
2310
+ if (j.key === "ArrowDown" || j.key === "ArrowRight") {
2311
+ j.preventDefault(), ie.next();
2305
2312
  return;
2306
2313
  }
2307
- if (_.key === "ArrowUp" || _.key === "ArrowLeft") {
2308
- _.preventDefault(), oe.prev();
2314
+ if (j.key === "ArrowUp" || j.key === "ArrowLeft") {
2315
+ j.preventDefault(), ie.prev();
2309
2316
  return;
2310
2317
  }
2311
- if (_.key === "Tab" && !_.shiftKey) {
2312
- _.preventDefault(), t == null || t(oe.currentPrompt);
2318
+ if (j.key === "Tab" && !j.shiftKey) {
2319
+ j.preventDefault(), t == null || t(ie.currentPrompt);
2313
2320
  return;
2314
2321
  }
2315
2322
  }
2316
- a == null || a(_);
2323
+ a == null || a(j);
2317
2324
  }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (d == null ? void 0 : d.length) > 0) && !o, $e = p || h;
2318
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", O].filter(Boolean).join(" "), ...D, children: [
2325
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", O].filter(Boolean).join(" "), ...A, children: [
2319
2326
  $e && /* @__PURE__ */ e.jsx(
2320
2327
  "input",
2321
2328
  {
@@ -2324,7 +2331,7 @@ function zt({
2324
2331
  multiple: !0,
2325
2332
  accept: "*/*",
2326
2333
  className: "ds-prompt-input__file-input",
2327
- onChange: ie
2334
+ onChange: ae
2328
2335
  }
2329
2336
  ),
2330
2337
  /* @__PURE__ */ e.jsxs(
@@ -2342,55 +2349,55 @@ function zt({
2342
2349
  {
2343
2350
  ref: q,
2344
2351
  value: s,
2345
- onChange: (_) => t == null ? void 0 : t(_.target.value),
2352
+ onChange: (j) => t == null ? void 0 : t(j.target.value),
2346
2353
  onKeyDown: xe,
2347
2354
  onPaste: W,
2348
2355
  placeholder: Q ? "" : l,
2349
- disabled: n || o,
2356
+ disabled: r || o,
2350
2357
  rows: 1,
2351
2358
  className: ["ds-prompt-input__textarea", Q && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
2352
2359
  }
2353
2360
  ),
2354
2361
  Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
2355
- /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2362
+ /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2356
2363
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2357
2364
  ] }),
2358
- f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((_, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2359
- /* @__PURE__ */ e.jsx("img", { src: _.preview, alt: "" }),
2365
+ f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((j, T) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2366
+ /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2360
2367
  /* @__PURE__ */ e.jsx(
2361
2368
  "button",
2362
2369
  {
2363
2370
  className: "ds-prompt-input__image-remove",
2364
- onClick: () => b == null ? void 0 : b(T),
2371
+ onClick: () => _ == null ? void 0 : _(T),
2365
2372
  "aria-label": "Remove image",
2366
2373
  type: "button",
2367
- children: /* @__PURE__ */ e.jsx(ne, { size: 12, strokeWidth: 2 })
2374
+ children: /* @__PURE__ */ e.jsx(re, { size: 12, strokeWidth: 2 })
2368
2375
  }
2369
2376
  )
2370
2377
  ] }, T)) }),
2371
- G.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: G.map((_) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2372
- /* @__PURE__ */ e.jsx("span", { children: _.msg }),
2378
+ X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((j) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2379
+ /* @__PURE__ */ e.jsx("span", { children: j.msg }),
2373
2380
  /* @__PURE__ */ e.jsx(
2374
2381
  "button",
2375
2382
  {
2376
2383
  type: "button",
2377
2384
  className: "ds-prompt-input__warning-close",
2378
- onClick: () => v(_.id),
2385
+ onClick: () => v(j.id),
2379
2386
  "aria-label": "Dismiss",
2380
- children: /* @__PURE__ */ e.jsx(ne, { size: I[1], strokeWidth: 1.5 })
2387
+ children: /* @__PURE__ */ e.jsx(re, { size: I[1], strokeWidth: 1.5 })
2381
2388
  }
2382
2389
  )
2383
- ] }, _.id)) }),
2384
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((_, T) => /* @__PURE__ */ e.jsx(ae, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2385
- _.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Re, { size: I[1], strokeWidth: 1.5 }),
2386
- _.filename,
2387
- _.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2390
+ ] }, j.id)) }),
2391
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((j, T) => /* @__PURE__ */ e.jsx(ce, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2392
+ j.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: I[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Re, { size: I[1], strokeWidth: 1.5 }),
2393
+ j.filename,
2394
+ j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2388
2395
  "button",
2389
2396
  {
2390
2397
  type: "button",
2391
2398
  className: "ds-prompt-input__remove-btn",
2392
2399
  onClick: () => u == null ? void 0 : u(T),
2393
- children: /* @__PURE__ */ e.jsx(ne, { size: I[1], strokeWidth: 1.5 })
2400
+ children: /* @__PURE__ */ e.jsx(re, { size: I[1], strokeWidth: 1.5 })
2394
2401
  }
2395
2402
  )
2396
2403
  ] }) }, T)) }),
@@ -2403,15 +2410,15 @@ function zt({
2403
2410
  icon: /* @__PURE__ */ e.jsx(Re, { size: I[2], strokeWidth: 1.5 }),
2404
2411
  "aria-label": "Attach files",
2405
2412
  onClick: () => {
2406
- var _;
2407
- return (_ = Y.current) == null ? void 0 : _.click();
2413
+ var j;
2414
+ return (j = Y.current) == null ? void 0 : j.click();
2408
2415
  }
2409
2416
  }
2410
2417
  ),
2411
2418
  y,
2412
2419
  $,
2413
2420
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2414
- n ? /* @__PURE__ */ e.jsx(
2421
+ r ? /* @__PURE__ */ e.jsx(
2415
2422
  me,
2416
2423
  {
2417
2424
  variant: "primary",
@@ -2426,7 +2433,7 @@ function zt({
2426
2433
  variant: "primary",
2427
2434
  size: "xs",
2428
2435
  icon: /* @__PURE__ */ e.jsx(ss, { size: I[2], strokeWidth: 1.5 }),
2429
- onClick: r,
2436
+ onClick: n,
2430
2437
  disabled: !Ce,
2431
2438
  "aria-label": "Send"
2432
2439
  }
@@ -2438,18 +2445,18 @@ function zt({
2438
2445
  ] });
2439
2446
  }
2440
2447
  const Pe = { fast: 0, standard: 1, premium: 2 }, Le = { fast: "data-5", standard: "data-3", premium: "data-6" };
2441
- function Ot({
2448
+ function zt({
2442
2449
  models: s = [],
2443
2450
  value: t,
2444
- onChange: r,
2451
+ onChange: n,
2445
2452
  size: i = "xs",
2446
2453
  minTier: a,
2447
- showAutoOption: n = !1,
2454
+ showAutoOption: r = !1,
2448
2455
  groupByTier: o = !0,
2449
2456
  className: l = "",
2450
2457
  ...m
2451
2458
  }) {
2452
- const [d, f] = A(!1), p = E(null), h = E(null), u = E(null), [b, j] = A({}), S = s.filter((N) => !a || N.name === "auto" ? !0 : (Pe[N.tier] ?? 1) >= (Pe[a] ?? 1)), R = S.find((N) => N.name === "auto"), B = S.filter((N) => N.name !== "auto"), y = s.find((N) => N.name === t), O = new Set(B.map((N) => N.tier).filter(Boolean)).size > 1;
2459
+ const [d, f] = D(!1), p = E(null), h = E(null), u = E(null), [_, b] = D({}), S = s.filter((N) => !a || N.name === "auto" ? !0 : (Pe[N.tier] ?? 1) >= (Pe[a] ?? 1)), R = S.find((N) => N.name === "auto"), B = S.filter((N) => N.name !== "auto"), y = s.find((N) => N.name === t), O = new Set(B.map((N) => N.tier).filter(Boolean)).size > 1;
2453
2460
  M(() => {
2454
2461
  if (!d) return;
2455
2462
  const N = 320, C = () => {
@@ -2457,7 +2464,7 @@ function Ot({
2457
2464
  const x = (L = h.current) == null ? void 0 : L.getBoundingClientRect();
2458
2465
  if (!x) return;
2459
2466
  const v = window.innerHeight - x.bottom, k = v < N + 8 && x.top > v;
2460
- j({
2467
+ b({
2461
2468
  position: "fixed",
2462
2469
  zIndex: "var(--z-dropdown, 500)",
2463
2470
  left: x.left,
@@ -2465,18 +2472,18 @@ function Ot({
2465
2472
  });
2466
2473
  };
2467
2474
  C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
2468
- const G = (x) => {
2475
+ const X = (x) => {
2469
2476
  var v, k;
2470
2477
  !((v = p.current) != null && v.contains(x.target)) && !((k = u.current) != null && k.contains(x.target)) && f(!1);
2471
2478
  }, U = (x) => {
2472
2479
  x.key === "Escape" && f(!1);
2473
2480
  };
2474
- return document.addEventListener("mousedown", G), document.addEventListener("keydown", U), () => {
2475
- window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", G), document.removeEventListener("keydown", U);
2481
+ return document.addEventListener("mousedown", X), document.addEventListener("keydown", U), () => {
2482
+ window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", U);
2476
2483
  };
2477
2484
  }, [d]);
2478
- const D = (N) => {
2479
- r == null || r(N), f(!1);
2485
+ const A = (N) => {
2486
+ n == null || n(N), f(!1);
2480
2487
  }, Y = (N) => /* @__PURE__ */ e.jsxs(
2481
2488
  "button",
2482
2489
  {
@@ -2485,22 +2492,22 @@ function Ot({
2485
2492
  "ds-model-picker__item",
2486
2493
  N.name === t && "ds-model-picker__item--active"
2487
2494
  ].filter(Boolean).join(" "),
2488
- onClick: () => D(N.name),
2495
+ onClick: () => A(N.name),
2489
2496
  children: [
2490
2497
  N.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: N.icon }) : /* @__PURE__ */ e.jsx(Se, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2491
2498
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: N.displayName || N.name }),
2492
- O && N.tier && /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: Le[N.tier] || "default", children: N.tier })
2499
+ O && N.tier && /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: Le[N.tier] || "default", children: N.tier })
2493
2500
  ]
2494
2501
  },
2495
2502
  N.name
2496
2503
  ), q = () => !o || !O ? B.map(Y) : ["fast", "standard", "premium"].flatMap((N) => {
2497
- const C = B.filter((G) => G.tier === N);
2504
+ const C = B.filter((X) => X.tier === N);
2498
2505
  return C.length ? [
2499
2506
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": N, children: N.charAt(0).toUpperCase() + N.slice(1) }, `lbl-${N}`),
2500
2507
  ...C.map(Y)
2501
2508
  ] : [];
2502
- }), P = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu", style: b, children: [
2503
- n && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2509
+ }), P = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu", style: _, children: [
2510
+ r && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2504
2511
  /* @__PURE__ */ e.jsxs(
2505
2512
  "button",
2506
2513
  {
@@ -2510,7 +2517,7 @@ function Ot({
2510
2517
  "ds-model-picker__item--auto",
2511
2518
  t === "auto" && "ds-model-picker__item--active"
2512
2519
  ].filter(Boolean).join(" "),
2513
- onClick: () => D("auto"),
2520
+ onClick: () => A("auto"),
2514
2521
  children: [
2515
2522
  /* @__PURE__ */ e.jsx(ts, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2516
2523
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
@@ -2540,7 +2547,7 @@ function Ot({
2540
2547
  children: [
2541
2548
  y != null && y.icon ? /* @__PURE__ */ e.jsx("span", { children: y.icon }) : /* @__PURE__ */ e.jsx(Se, { size: 12, strokeWidth: 1.5 }),
2542
2549
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (y == null ? void 0 : y.displayName) || (y == null ? void 0 : y.name) || t }),
2543
- O && (y == null ? void 0 : y.tier) && /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: Le[y.tier] || "default", children: y.tier })
2550
+ O && (y == null ? void 0 : y.tier) && /* @__PURE__ */ e.jsx(ce, { size: "xs", variant: Le[y.tier] || "default", children: y.tier })
2544
2551
  ]
2545
2552
  }
2546
2553
  ),
@@ -2558,28 +2565,28 @@ function ve(s) {
2558
2565
  }
2559
2566
  function Ms(s) {
2560
2567
  const t = /* @__PURE__ */ new Map();
2561
- for (const r of s)
2562
- t.has(r.filename) || t.set(r.filename, { filename: r.filename, url: r.url, items: [] }), t.get(r.filename).items.push(r);
2568
+ for (const n of s)
2569
+ t.has(n.filename) || t.set(n.filename, { filename: n.filename, url: n.url, items: [] }), t.get(n.filename).items.push(n);
2563
2570
  return [...t.values()];
2564
2571
  }
2565
- function Ft({
2572
+ function Ot({
2566
2573
  sources: s = [],
2567
2574
  layout: t = "list",
2568
- title: r = "Sources",
2575
+ title: n = "Sources",
2569
2576
  maxVisible: i = 5,
2570
2577
  onSourceClick: a
2571
2578
  }) {
2572
- const [n, o] = A(!1), l = Ms(s), m = l.length > i, d = n ? l : l.slice(0, i), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2579
+ const [r, o] = D(!1), l = Ms(s), m = l.length > i, d = r ? l : l.slice(0, i), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2573
2580
  return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2574
2581
  d.map((h) => {
2575
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2582
+ const u = h.items.map((b) => b.page).filter(Boolean), _ = !!a;
2576
2583
  return /* @__PURE__ */ e.jsxs(
2577
2584
  "div",
2578
2585
  {
2579
- className: `ds-sources-panel__compact-row${b ? " ds-sources-panel__compact-row--clickable" : ""}`,
2580
- onClick: b ? () => a(h.items[0]) : void 0,
2586
+ className: `ds-sources-panel__compact-row${_ ? " ds-sources-panel__compact-row--clickable" : ""}`,
2587
+ onClick: _ ? () => a(h.items[0]) : void 0,
2581
2588
  children: [
2582
- /* @__PURE__ */ e.jsx(rs, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2589
+ /* @__PURE__ */ e.jsx(ns, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2583
2590
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2584
2591
  u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(u) })
2585
2592
  ]
@@ -2587,26 +2594,26 @@ function Ft({
2587
2594
  h.filename
2588
2595
  );
2589
2596
  }),
2590
- m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2597
+ m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2591
2598
  "+",
2592
2599
  l.length - i,
2593
2600
  " more sources"
2594
2601
  ] })
2595
2602
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2596
- r && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: r }),
2603
+ n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2597
2604
  d.map((h) => {
2598
- const u = h.items.map((j) => j.page).filter(Boolean), b = !!a;
2605
+ const u = h.items.map((b) => b.page).filter(Boolean), _ = !!a;
2599
2606
  return f ? /* @__PURE__ */ e.jsx(
2600
2607
  Ee,
2601
2608
  {
2602
2609
  title: /* @__PURE__ */ e.jsx(Bs, { filename: h.filename, pages: u }),
2603
2610
  padding: "s",
2604
- children: h.items.map((j, S) => /* @__PURE__ */ e.jsx(
2611
+ children: h.items.map((b, S) => /* @__PURE__ */ e.jsx(
2605
2612
  "div",
2606
2613
  {
2607
- className: `ds-sources-panel__snippet${b ? " ds-sources-panel__snippet--clickable" : ""}`,
2608
- onClick: b ? () => a(j) : void 0,
2609
- children: j.snippet ?? `p. ${j.page}`
2614
+ className: `ds-sources-panel__snippet${_ ? " ds-sources-panel__snippet--clickable" : ""}`,
2615
+ onClick: _ ? () => a(b) : void 0,
2616
+ children: b.snippet ?? `p. ${b.page}`
2610
2617
  },
2611
2618
  S
2612
2619
  ))
@@ -2615,8 +2622,8 @@ function Ft({
2615
2622
  ) : /* @__PURE__ */ e.jsxs(
2616
2623
  "div",
2617
2624
  {
2618
- className: `ds-sources-panel__row${b ? " ds-sources-panel__row--clickable" : ""}`,
2619
- onClick: b ? () => a(h.items[0]) : void 0,
2625
+ className: `ds-sources-panel__row${_ ? " ds-sources-panel__row--clickable" : ""}`,
2626
+ onClick: _ ? () => a(h.items[0]) : void 0,
2620
2627
  children: [
2621
2628
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2622
2629
  u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(u) })
@@ -2625,7 +2632,7 @@ function Ft({
2625
2632
  h.filename
2626
2633
  );
2627
2634
  }),
2628
- m && !n && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2635
+ m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2629
2636
  "+",
2630
2637
  l.length - i,
2631
2638
  " more sources"
@@ -2635,20 +2642,20 @@ function Ft({
2635
2642
  function ze(s) {
2636
2643
  return s >= 1e6 ? (s / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : s >= 1e3 ? (s / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(s);
2637
2644
  }
2638
- function Wt({
2645
+ function Ft({
2639
2646
  used: s,
2640
2647
  limit: t,
2641
- size: r = "s",
2648
+ size: n = "s",
2642
2649
  showCount: i = !0,
2643
2650
  showPercent: a = !1,
2644
- warningThreshold: n = 0.8,
2651
+ warningThreshold: r = 0.8,
2645
2652
  errorThreshold: o = 1
2646
2653
  }) {
2647
- const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= o ? "error" : l >= n ? "warning" : "normal";
2654
+ const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= o ? "error" : l >= r ? "warning" : "normal";
2648
2655
  return /* @__PURE__ */ e.jsxs(
2649
2656
  "div",
2650
2657
  {
2651
- className: `ds-token-counter ds-token-counter--${r}`,
2658
+ className: `ds-token-counter ds-token-counter--${n}`,
2652
2659
  role: "meter",
2653
2660
  "aria-valuenow": s,
2654
2661
  "aria-valuemax": t,
@@ -2680,13 +2687,13 @@ const Oe = 5;
2680
2687
  function Ps(s) {
2681
2688
  return s < 0.34 ? "low" : s < 0.67 ? "medium" : "high";
2682
2689
  }
2683
- function Ct({
2690
+ function Wt({
2684
2691
  value: s = 0,
2685
2692
  size: t = "xs",
2686
- showLabel: r = "none",
2693
+ showLabel: n = "none",
2687
2694
  layout: i = "inline"
2688
2695
  }) {
2689
- const a = Math.max(0, Math.min(1, s)), n = Math.round(a * Oe), o = Ps(a);
2696
+ const a = Math.max(0, Math.min(1, s)), r = Math.round(a * Oe), o = Ps(a);
2690
2697
  return /* @__PURE__ */ e.jsxs("div", { className: [
2691
2698
  "ds-confidence-bar",
2692
2699
  `ds-confidence-bar--${t}`,
@@ -2696,95 +2703,68 @@ function Ct({
2696
2703
  /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Oe }, (l, m) => /* @__PURE__ */ e.jsx(
2697
2704
  "div",
2698
2705
  {
2699
- className: `ds-confidence-bar__seg${m < n ? " ds-confidence-bar__seg--filled" : ""}`
2706
+ className: `ds-confidence-bar__seg${m < r ? " ds-confidence-bar__seg--filled" : ""}`
2700
2707
  },
2701
2708
  m
2702
2709
  )) }),
2703
- r === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: o })
2710
+ n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: o })
2704
2711
  ] });
2705
2712
  }
2706
2713
  const Ls = { add: "+", remove: "-", context: " " };
2707
- function be({ line: s, lineNumbers: t }) {
2714
+ function _e({ line: s, lineNumbers: t }) {
2708
2715
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${s.type}`, children: [
2709
2716
  t && s.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: s.lineNo }),
2710
2717
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Ls[s.type] }),
2711
2718
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: s.text })
2712
2719
  ] });
2713
2720
  }
2714
- function Ut({
2721
+ function Ct({
2715
2722
  lines: s = [],
2716
2723
  layout: t = "inline",
2717
- wordWrap: r = !1,
2724
+ wordWrap: n = !1,
2718
2725
  lineNumbers: i = !0,
2719
2726
  maxHeight: a,
2720
- title: n
2727
+ title: r
2721
2728
  }) {
2722
2729
  const o = [
2723
2730
  "ds-diff-view",
2724
2731
  `ds-diff-view--${t}`,
2725
- r && "ds-diff-view--wrap"
2732
+ n && "ds-diff-view--wrap"
2726
2733
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
2727
2734
  if (t === "split") {
2728
2735
  const m = s.filter((f) => f.type === "remove" || f.type === "context"), d = s.filter((f) => f.type === "add" || f.type === "context");
2729
2736
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2730
- n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2737
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2731
2738
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body", style: l, children: [
2732
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: m.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) }),
2733
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: d.map((f, p) => /* @__PURE__ */ e.jsx(be, { line: f, lineNumbers: i }, p)) })
2739
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: m.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: i }, p)) }),
2740
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: d.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: i }, p)) })
2734
2741
  ] })
2735
2742
  ] });
2736
2743
  }
2737
2744
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2738
- n && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: n }),
2739
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(be, { line: m, lineNumbers: i }, d)) })
2745
+ r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2746
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(_e, { line: m, lineNumbers: i }, d)) })
2740
2747
  ] });
2741
2748
  }
2742
- const zs = {
2743
- running: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "info", children: "Running…" }),
2744
- success: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "success", children: "Done" }),
2745
- error: /* @__PURE__ */ e.jsx(ae, { size: "xs", variant: "error", children: "Error" })
2746
- };
2747
- function Vt({
2748
- label: s,
2749
- status: t = "idle",
2750
- icon: r,
2751
- badge: i,
2752
- className: a = "",
2753
- ...n
2754
- }) {
2755
- return /* @__PURE__ */ e.jsxs(
2756
- "div",
2757
- {
2758
- className: ["ds-tool-bubble", a].filter(Boolean).join(" "),
2759
- ...n,
2760
- children: [
2761
- r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-bubble__icon", children: r }),
2762
- /* @__PURE__ */ e.jsx("span", { className: "ds-tool-bubble__label", children: s }),
2763
- zs[t],
2764
- i
2765
- ]
2766
- }
2767
- );
2768
- }
2769
- function Os({
2749
+ function zs({
2770
2750
  value: s = "idle",
2771
2751
  onLike: t,
2772
- onDislike: r,
2752
+ onDislike: n,
2773
2753
  className: i = "",
2774
2754
  ...a
2775
2755
  }) {
2776
- const n = s !== "idle";
2756
+ const r = s !== "idle";
2777
2757
  return /* @__PURE__ */ e.jsxs(
2778
2758
  "div",
2779
2759
  {
2780
2760
  className: [
2781
2761
  "ds-message-feedback",
2782
- n && "ds-message-feedback--voted",
2762
+ r && "ds-message-feedback--voted",
2783
2763
  i
2784
2764
  ].filter(Boolean).join(" "),
2785
2765
  ...a,
2786
2766
  children: [
2787
- (!n || s === "liked") && /* @__PURE__ */ e.jsx(
2767
+ (!r || s === "liked") && /* @__PURE__ */ e.jsx(
2788
2768
  "button",
2789
2769
  {
2790
2770
  className: [
@@ -2792,11 +2772,11 @@ function Os({
2792
2772
  s === "liked" && "ds-message-feedback__btn--liked"
2793
2773
  ].filter(Boolean).join(" "),
2794
2774
  onClick: t,
2795
- disabled: n,
2775
+ disabled: r,
2796
2776
  "aria-label": "Like",
2797
2777
  "aria-pressed": s === "liked",
2798
2778
  children: /* @__PURE__ */ e.jsx(
2799
- ns,
2779
+ rs,
2800
2780
  {
2801
2781
  size: I[1],
2802
2782
  strokeWidth: 1.5,
@@ -2805,15 +2785,15 @@ function Os({
2805
2785
  )
2806
2786
  }
2807
2787
  ),
2808
- (!n || s === "disliked") && /* @__PURE__ */ e.jsx(
2788
+ (!r || s === "disliked") && /* @__PURE__ */ e.jsx(
2809
2789
  "button",
2810
2790
  {
2811
2791
  className: [
2812
2792
  "ds-message-feedback__btn",
2813
2793
  s === "disliked" && "ds-message-feedback__btn--disliked"
2814
2794
  ].filter(Boolean).join(" "),
2815
- onClick: r,
2816
- disabled: n,
2795
+ onClick: n,
2796
+ disabled: r,
2817
2797
  "aria-label": "Dislike",
2818
2798
  "aria-pressed": s === "disliked",
2819
2799
  children: /* @__PURE__ */ e.jsx(
@@ -2830,26 +2810,26 @@ function Os({
2830
2810
  }
2831
2811
  );
2832
2812
  }
2833
- function Fs(s) {
2813
+ function Os(s) {
2834
2814
  const t = s instanceof Date ? s : new Date(s);
2835
2815
  if (isNaN(t)) return null;
2836
- const r = /* @__PURE__ */ new Date(), i = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(r.getFullYear(), r.getMonth(), r.getDate()), n = new Date(a - 864e5);
2816
+ const n = /* @__PURE__ */ new Date(), i = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(a - 864e5);
2837
2817
  if (t >= a) return i;
2838
- if (t >= n) return `Yesterday ${i}`;
2818
+ if (t >= r) return `Yesterday ${i}`;
2839
2819
  const o = t.getDate(), l = t.toLocaleString([], { month: "short" });
2840
2820
  return `${o} ${l} ${i}`;
2841
2821
  }
2842
- function Yt({
2822
+ function Ut({
2843
2823
  role: s = "assistant",
2844
2824
  text: t,
2845
- timestamp: r,
2825
+ timestamp: n,
2846
2826
  feedbackValue: i = "idle",
2847
2827
  onLike: a,
2848
- onDislike: n,
2828
+ onDislike: r,
2849
2829
  className: o = "",
2850
2830
  ...l
2851
2831
  }) {
2852
- const m = s === "assistant" && (a || n), d = !!t, f = r ? Fs(r) : null;
2832
+ const m = s === "assistant" && (a || r), d = !!t, f = n ? Os(n) : null;
2853
2833
  return !m && !d && !f ? null : /* @__PURE__ */ e.jsxs(
2854
2834
  "div",
2855
2835
  {
@@ -2857,84 +2837,91 @@ function Yt({
2857
2837
  ...l,
2858
2838
  children: [
2859
2839
  s === "user" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f }),
2860
- m && /* @__PURE__ */ e.jsx(Os, { className: "ds-message-action", value: i, onLike: a, onDislike: n }),
2861
- d && /* @__PURE__ */ e.jsx(As, { className: "ds-message-action", text: t }),
2840
+ m && /* @__PURE__ */ e.jsx(zs, { className: "ds-message-action", value: i, onLike: a, onDislike: r }),
2841
+ d && /* @__PURE__ */ e.jsx(Ds, { className: "ds-message-action", text: t }),
2862
2842
  s === "assistant" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f })
2863
2843
  ]
2864
2844
  }
2865
2845
  );
2866
2846
  }
2847
+ function Vt({ label: s, className: t = "", ...n }) {
2848
+ return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", t].filter(Boolean).join(" "), ...n, children: [
2849
+ /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
2850
+ s && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: s })
2851
+ ] });
2852
+ }
2867
2853
  export {
2868
2854
  Ee as Accordion,
2869
- et as Alert,
2870
- Tt as AnimatedNumber,
2871
- ut as Avatar,
2872
- ae as Badge,
2873
- kt as Banner,
2874
- wt as Breadcrumb,
2855
+ Qs as Alert,
2856
+ $t as AnimatedNumber,
2857
+ dt as Avatar,
2858
+ ce as Badge,
2859
+ yt as Banner,
2860
+ Nt as Breadcrumb,
2875
2861
  me as Button,
2876
- Ks as Card,
2877
- Pt as ChatMessage,
2878
- ct as Checkbox,
2879
- tt as Code,
2862
+ qs as Card,
2863
+ Mt as ChatMessage,
2864
+ lt as Checkbox,
2865
+ st as Code,
2880
2866
  ms as CodeAccordion,
2881
- Ct as ConfidenceBar,
2882
- As as CopyButton,
2883
- Ut as DiffView,
2884
- yt as Drawer,
2867
+ Wt as ConfidenceBar,
2868
+ Ds as CopyButton,
2869
+ Ct as DiffView,
2870
+ gt as Drawer,
2885
2871
  Be as DrawerFooter,
2886
- Et as Dropdown,
2872
+ kt as Dropdown,
2887
2873
  jt as EmptyState,
2888
- vt as FormField,
2889
- Gs as H1,
2874
+ bt as FormField,
2875
+ Ks as H1,
2890
2876
  Xs as H2,
2891
- Js as H3,
2892
- Zs as H4,
2893
- Rt as InView,
2894
- Vs as Input,
2895
- rt as Link,
2896
- Os as MessageFeedback,
2897
- Yt as MessageFooter,
2898
- st as Modal,
2877
+ Gs as H3,
2878
+ Js as H4,
2879
+ Tt as InView,
2880
+ Us as Input,
2881
+ tt as Link,
2882
+ zs as MessageFeedback,
2883
+ Ut as MessageFooter,
2884
+ et as Modal,
2899
2885
  Ie as ModalFooter,
2900
- Ot as ModelPicker,
2901
- Qs as P1,
2886
+ zt as ModelPicker,
2887
+ Zs as P1,
2902
2888
  ds as P2,
2903
2889
  Fe as P3,
2904
- gt as Pagination,
2905
- $t as ProgressBar,
2906
- zt as PromptInput,
2907
- dt as Radio,
2908
- It as ReasoningBlock,
2909
- it as SegmentedControl,
2910
- Hs as Select,
2890
+ wt as Pagination,
2891
+ Et as ProgressBar,
2892
+ Lt as PromptInput,
2893
+ ct as Radio,
2894
+ At as ReasoningBlock,
2895
+ at as SegmentedControl,
2896
+ Ys as Select,
2911
2897
  xs as Skeleton,
2912
- Ft as SourcesPanel,
2898
+ Ot as SourcesPanel,
2913
2899
  ls as Spinner,
2914
- Nt as Stat,
2915
- Bt as StepIndicator,
2916
- qs as Stepper,
2917
- Mt as StreamingText,
2918
- at as Tab,
2919
- ft as Table,
2920
- pt as TableBody,
2921
- mt as TableHead,
2922
- ht as TableRow,
2923
- xt as TableSubheaderRow,
2900
+ vt as Stat,
2901
+ It as StepIndicator,
2902
+ Hs as Stepper,
2903
+ Bt as StreamingText,
2904
+ rt as Tab,
2905
+ ut as Table,
2906
+ mt as TableBody,
2907
+ ft as TableHead,
2908
+ pt as TableRow,
2909
+ ht as TableSubheaderRow,
2924
2910
  nt as Tabs,
2925
2911
  _t as Td,
2926
- Ys as Textarea,
2927
- bt as Th,
2928
- At as ToastContainer,
2929
- lt as Toggle,
2930
- Wt as TokenCounter,
2931
- Vt as ToolCallBubble,
2912
+ Vs as Textarea,
2913
+ xt as Th,
2914
+ Vt as ThinkingDot,
2915
+ St as ToastContainer,
2916
+ ot as Toggle,
2917
+ Ft as TokenCounter,
2918
+ Dt as ToolCallBubble,
2932
2919
  Dt as ToolCallCard,
2933
- ot as Tooltip,
2920
+ it as Tooltip,
2934
2921
  I as iconSizes,
2935
2922
  ks as useAnimatedNumber,
2936
- Ds as useAnimatedPlaceholder,
2923
+ As as useAnimatedPlaceholder,
2937
2924
  Es as useInView,
2938
- Lt as useStreamScroll,
2939
- St as useToast
2925
+ Pt as useStreamScroll,
2926
+ Rt as useToast
2940
2927
  };