@donkit-ai/design-system 1.4.18 → 1.4.20

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
@@ -59,11 +59,11 @@ function os() {
59
59
  return c.$$typeof === C ? null : c.displayName || c.name || null;
60
60
  if (typeof c == "string") return c;
61
61
  switch (c) {
62
- case S:
62
+ case $:
63
63
  return "Fragment";
64
64
  case B:
65
65
  return "Profiler";
66
- case R:
66
+ case S:
67
67
  return "StrictMode";
68
68
  case A:
69
69
  return "Suspense";
@@ -78,7 +78,7 @@ function os() {
78
78
  ), c.$$typeof) {
79
79
  case v:
80
80
  return "Portal";
81
- case $:
81
+ case T:
82
82
  return c.displayName || "Context";
83
83
  case y:
84
84
  return (c._context.displayName || "Context") + ".Consumer";
@@ -117,7 +117,7 @@ function os() {
117
117
  }
118
118
  }
119
119
  function i(c) {
120
- if (c === S) return "<>";
120
+ if (c === $) return "<>";
121
121
  if (typeof c == "object" && c !== null && c.$$typeof === F)
122
122
  return "<...>";
123
123
  try {
@@ -153,7 +153,7 @@ function os() {
153
153
  configurable: !0
154
154
  });
155
155
  }
156
- function m() {
156
+ function f() {
157
157
  var c = s(this.type);
158
158
  return P[c] || (P[c] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
@@ -162,14 +162,14 @@ function os() {
162
162
  function d(c, w, L, O, te, ae) {
163
163
  var W = L.ref;
164
164
  return c = {
165
- $$typeof: _,
165
+ $$typeof: x,
166
166
  type: c,
167
167
  key: w,
168
168
  props: L,
169
169
  _owner: O
170
170
  }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(c, "ref", {
171
171
  enumerable: !1,
172
- get: m
172
+ get: f
173
173
  }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
@@ -192,11 +192,11 @@ function os() {
192
192
  value: ae
193
193
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
194
194
  }
195
- function f(c, w, L, O, te, ae) {
195
+ function u(c, w, L, O, te, ae) {
196
196
  var W = w.children;
197
197
  if (W !== void 0)
198
198
  if (O)
199
- if (x(W)) {
199
+ if (_(W)) {
200
200
  for (O = 0; O < W.length; O++)
201
201
  p(W[O]);
202
202
  Object.freeze && Object.freeze(W);
@@ -244,23 +244,23 @@ React keys must be passed directly to JSX without using spread:
244
244
  h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === F && (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 === _;
247
+ return typeof c == "object" && c !== null && c.$$typeof === x;
248
248
  }
249
- var u = K, _ = Symbol.for("react.transitional.element"), v = 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"), z = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), b = 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, N = console.createTask ? console.createTask : function() {
249
+ var m = K, x = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), T = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), b = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, _ = Array.isArray, N = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
- u = {
252
+ m = {
253
253
  react_stack_bottom_frame: function(c) {
254
254
  return c();
255
255
  }
256
256
  };
257
- var k, P = {}, q = u.react_stack_bottom_frame.bind(
258
- u,
257
+ var k, P = {}, q = m.react_stack_bottom_frame.bind(
258
+ m,
259
259
  r
260
260
  )(), G = N(i(r)), g = {};
261
- fe.Fragment = S, fe.jsx = function(c, w, L) {
261
+ fe.Fragment = $, fe.jsx = function(c, w, L) {
262
262
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
263
- return f(
263
+ return u(
264
264
  c,
265
265
  w,
266
266
  L,
@@ -270,7 +270,7 @@ React keys must be passed directly to JSX without using spread:
270
270
  );
271
271
  }, fe.jsxs = function(c, w, L) {
272
272
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
273
- return f(
273
+ return u(
274
274
  c,
275
275
  w,
276
276
  L,
@@ -304,26 +304,26 @@ function me({
304
304
  disabled: r = !1,
305
305
  state: o = "idle",
306
306
  onClick: l,
307
- type: m = "button",
307
+ type: f = "button",
308
308
  href: d,
309
- "aria-label": f,
309
+ "aria-label": u,
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const u = a && !s, _ = o === "loading", v = o === "success", S = o === "error", R = _ || v || S, B = n === "xs" ? "s" : "m", y = t === "danger" ? "on-accent" : "default", $ = cs[n] ?? 16, z = _ ? /* @__PURE__ */ e.jsx(ls, { size: B, color: y }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: $, strokeWidth: 2.5 }) }) : S ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: $, strokeWidth: 2.5 }) }) : null, A = [
313
+ const m = a && !s, x = o === "loading", v = o === "success", $ = o === "error", S = x || v || $, B = n === "xs" ? "s" : "m", y = t === "danger" ? "on-accent" : "default", T = cs[n] ?? 16, z = x ? /* @__PURE__ */ e.jsx(ls, { size: B, color: y }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Ne, { size: T, strokeWidth: 2.5 }) }) : $ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: T, strokeWidth: 2.5 }) }) : null, A = [
314
314
  "ds-button",
315
315
  `ds-button--${t}`,
316
316
  `ds-button--${n}`,
317
317
  i && "ds-button--full",
318
- u && "ds-button--icon-only",
318
+ m && "ds-button--icon-only",
319
319
  p
320
320
  ].filter(Boolean).join(" "), Y = o !== "idle" ? o : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- R ? z : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
321
+ S ? z : 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 F = (b) => {
326
- if (r || _) {
326
+ if (r || x) {
327
327
  b.preventDefault();
328
328
  return;
329
329
  }
@@ -333,11 +333,11 @@ function me({
333
333
  "a",
334
334
  {
335
335
  className: A,
336
- href: r || _ ? void 0 : d,
336
+ href: r || x ? void 0 : d,
337
337
  onClick: F,
338
- "aria-label": f,
339
- "aria-disabled": r || _ ? "true" : void 0,
340
- "aria-busy": _ ? "true" : void 0,
338
+ "aria-label": u,
339
+ "aria-disabled": r || x ? "true" : void 0,
340
+ "aria-busy": x ? "true" : void 0,
341
341
  "data-state": Y,
342
342
  ...h,
343
343
  children: H
@@ -347,12 +347,12 @@ function me({
347
347
  return /* @__PURE__ */ e.jsx(
348
348
  "button",
349
349
  {
350
- type: m,
350
+ type: f,
351
351
  className: A,
352
352
  disabled: r,
353
- onClick: _ ? void 0 : l,
354
- "aria-label": f,
355
- "aria-busy": _ ? "true" : void 0,
353
+ onClick: x ? void 0 : l,
354
+ "aria-label": u,
355
+ "aria-busy": x ? "true" : void 0,
356
356
  "data-state": Y,
357
357
  ...h,
358
358
  children: H
@@ -368,12 +368,12 @@ function Us({
368
368
  iconRight: r,
369
369
  onIconRightClick: o,
370
370
  size: l = "m",
371
- disabled: m,
371
+ disabled: f,
372
372
  id: d,
373
- ...f
373
+ ...u
374
374
  }) {
375
- const p = d || `input-${K.useId()}`, h = n ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, _ = u || h;
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: [
375
+ const p = d || `input-${K.useId()}`, h = n ? `${p}-hint` : void 0, m = t ? `${p}-error` : void 0, x = m || h;
376
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${i ? "ds-input-wrapper--full" : ""} ${f ? "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: [
379
379
  a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
@@ -382,10 +382,10 @@ function Us({
382
382
  {
383
383
  id: p,
384
384
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
385
- disabled: m,
385
+ disabled: f,
386
386
  "aria-invalid": t ? "true" : "false",
387
- "aria-describedby": _,
388
- ...f
387
+ "aria-describedby": x,
388
+ ...u
389
389
  }
390
390
  ),
391
391
  r && /* @__PURE__ */ e.jsx(
@@ -401,7 +401,7 @@ function Us({
401
401
  )
402
402
  ] }),
403
403
  n && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
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 }) }) })
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: m, className: "ds-input-error", role: "alert", children: t }) }) })
405
405
  ] });
406
406
  }
407
407
  function Vs({
@@ -413,21 +413,21 @@ function Vs({
413
413
  disabled: r,
414
414
  id: o,
415
415
  resize: l = !0,
416
- rows: m = 3,
416
+ rows: f = 3,
417
417
  ...d
418
418
  }) {
419
- const f = o || `textarea-${K.useId()}`, p = n ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
419
+ const u = o || `textarea-${K.useId()}`, p = n ? `${u}-hint` : void 0, h = t ? `${u}-error` : void 0, m = h || p;
420
420
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${i ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
- s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: f, children: s }),
421
+ s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: u, children: s }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
- id: f,
425
+ id: u,
426
426
  className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
427
  disabled: r,
428
428
  "aria-invalid": t ? "true" : "false",
429
- "aria-describedby": u,
430
- rows: m,
429
+ "aria-describedby": m,
430
+ rows: f,
431
431
  ...d
432
432
  }
433
433
  ),
@@ -444,19 +444,19 @@ function Ys({
444
444
  error: r,
445
445
  fullWidth: o = !0,
446
446
  size: l = "m",
447
- disabled: m = !1,
447
+ disabled: f = !1,
448
448
  id: d,
449
- ...f
449
+ ...u
450
450
  }) {
451
- const [p, h] = D(!1), [u, _] = D(!1), [v, S] = D({}), [R, B] = D("down"), [y, $] = D(-1), z = E(null), A = E(null), Y = E(null), H = E(null), F = d || `select-${K.useId()}`, b = `${F}-label`, C = r ? `${F}-error` : void 0, X = 150, U = (g = !1) => {
452
- u || (_(!0), $(-1), H.current = setTimeout(() => {
451
+ const [p, h] = D(!1), [m, x] = D(!1), [v, $] = D({}), [S, B] = D("down"), [y, T] = D(-1), z = E(null), A = E(null), Y = E(null), H = E(null), F = d || `select-${K.useId()}`, b = `${F}-label`, C = r ? `${F}-error` : void 0, X = 150, U = (g = !1) => {
452
+ m || (x(!0), T(-1), H.current = setTimeout(() => {
453
453
  var c;
454
- h(!1), _(!1), g && ((c = Y.current) == null || c.focus());
454
+ h(!1), x(!1), g && ((c = Y.current) == null || c.focus());
455
455
  }, X));
456
- }, x = (g) => {
457
- clearTimeout(H.current), _(!1);
456
+ }, _ = (g) => {
457
+ clearTimeout(H.current), x(!1);
458
458
  const c = g !== void 0 ? g : Math.max(i.findIndex((w) => w.value === t), 0);
459
- $(c), h(!0);
459
+ T(c), h(!0);
460
460
  };
461
461
  M(() => () => clearTimeout(H.current), []);
462
462
  const N = () => {
@@ -464,7 +464,7 @@ function Ys({
464
464
  const g = (ae = z.current) == null ? void 0 : ae.getBoundingClientRect();
465
465
  if (!g) return;
466
466
  const c = window.innerHeight, w = c - g.bottom, L = g.top, te = w < 300 && L > w;
467
- B(te ? "up" : "down"), S(
467
+ B(te ? "up" : "down"), $(
468
468
  te ? { bottom: c - g.top + 4, left: g.left, width: g.width } : { top: g.bottom + 4, left: g.left, width: g.width }
469
469
  );
470
470
  };
@@ -478,7 +478,7 @@ function Ys({
478
478
  z.current && !z.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
- }, [u]), M(() => {
481
+ }, [m]), M(() => {
482
482
  var c;
483
483
  if (!p || y < 0 || !A.current) return;
484
484
  (c = A.current.querySelectorAll(".ds-select-option")[y]) == null || c.scrollIntoView({ block: "nearest" });
@@ -486,20 +486,20 @@ function Ys({
486
486
  const k = (g) => {
487
487
  switch (g.key) {
488
488
  case "ArrowDown":
489
- g.preventDefault(), p ? $((c) => Math.min(c + 1, i.length - 1)) : x();
489
+ g.preventDefault(), p ? T((c) => Math.min(c + 1, i.length - 1)) : _();
490
490
  break;
491
491
  case "ArrowUp":
492
- g.preventDefault(), p ? $((c) => Math.max(c - 1, 0)) : x(i.length - 1);
492
+ g.preventDefault(), p ? T((c) => Math.max(c - 1, 0)) : _(i.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && (g.preventDefault(), $(0));
495
+ p && (g.preventDefault(), T(0));
496
496
  break;
497
497
  case "End":
498
- p && (g.preventDefault(), $(i.length - 1));
498
+ p && (g.preventDefault(), T(i.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- g.preventDefault(), p ? y >= 0 && (n == null || n(i[y].value), U(!0)) : x();
502
+ g.preventDefault(), p ? y >= 0 && (n == null || n(i[y].value), U(!0)) : _();
503
503
  break;
504
504
  case "Escape":
505
505
  p && (g.preventDefault(), U(!0));
@@ -518,8 +518,8 @@ function Ys({
518
518
  className: [
519
519
  "ds-select-dropdown",
520
520
  `ds-select-dropdown--${l}`,
521
- `ds-select-dropdown--${R}`,
522
- u && "ds-select-dropdown--closing"
521
+ `ds-select-dropdown--${S}`,
522
+ m && "ds-select-dropdown--closing"
523
523
  ].filter(Boolean).join(" "),
524
524
  style: v,
525
525
  children: i.map((g, c) => /* @__PURE__ */ e.jsx(
@@ -545,7 +545,7 @@ function Ys({
545
545
  ))
546
546
  }
547
547
  );
548
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${o ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
548
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${o ? "ds-select-wrapper--full" : ""} ${f ? "ds-select-wrapper--disabled" : ""}`, children: [
549
549
  s && /* @__PURE__ */ e.jsx("label", { id: b, className: "ds-select-label", children: s }),
550
550
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: z, children: /* @__PURE__ */ e.jsxs(
551
551
  "button",
@@ -562,11 +562,11 @@ function Ys({
562
562
  "aria-describedby": C,
563
563
  className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
564
564
  onClick: () => {
565
- m || (p ? U() : x());
565
+ f || (p ? U() : _());
566
566
  },
567
567
  onKeyDown: k,
568
- disabled: m,
569
- ...f,
568
+ disabled: f,
569
+ ...u,
570
570
  children: [
571
571
  /* @__PURE__ */ e.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || a }),
572
572
  /* @__PURE__ */ e.jsx(
@@ -574,7 +574,7 @@ function Ys({
574
574
  {
575
575
  size: q,
576
576
  strokeWidth: 1.5,
577
- className: `ds-select-icon ${p && R === "down" ? "ds-select-icon--open" : ""} ${p && R === "up" ? "ds-select-icon--up" : ""}`,
577
+ className: `ds-select-icon ${p && S === "down" ? "ds-select-icon--open" : ""} ${p && S === "up" ? "ds-select-icon--up" : ""}`,
578
578
  "aria-hidden": "true"
579
579
  }
580
580
  )
@@ -594,31 +594,31 @@ function Hs({
594
594
  step: r = 1,
595
595
  size: o = "m",
596
596
  disabled: l = !1,
597
- hint: m,
597
+ hint: f,
598
598
  error: d,
599
- ...f
599
+ ...u
600
600
  }) {
601
601
  const p = () => {
602
602
  if (l) return;
603
- const R = Math.min(Number(t) + r, a);
604
- n == null || n(R);
603
+ const S = Math.min(Number(t) + r, a);
604
+ n == null || n(S);
605
605
  }, h = () => {
606
606
  if (l) return;
607
- const R = Math.max(Number(t) - r, i);
608
- n == null || n(R);
609
- }, u = (R) => {
607
+ const S = Math.max(Number(t) - r, i);
608
+ n == null || n(S);
609
+ }, m = (S) => {
610
610
  if (l) return;
611
- const B = R.target.value;
611
+ const B = S.target.value;
612
612
  if (B === "") {
613
613
  n == null || n(i);
614
614
  return;
615
615
  }
616
616
  const y = Number(B);
617
617
  if (!isNaN(y)) {
618
- const $ = Math.min(Math.max(y, i), a);
619
- n == null || n($);
618
+ const T = Math.min(Math.max(y, i), a);
619
+ n == null || n(T);
620
620
  }
621
- }, _ = [
621
+ }, x = [
622
622
  "ds-stepper-wrapper",
623
623
  l && "ds-stepper-wrapper--disabled",
624
624
  d && "ds-stepper-wrapper--error"
@@ -626,8 +626,8 @@ function Hs({
626
626
  "ds-stepper",
627
627
  `ds-stepper--${o}`,
628
628
  l && "ds-stepper--disabled"
629
- ].filter(Boolean).join(" "), S = o === "xs" ? I[1] : o === "small" ? I[2] : I[3];
630
- return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
629
+ ].filter(Boolean).join(" "), $ = o === "xs" ? I[1] : o === "small" ? I[2] : I[3];
630
+ return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
631
631
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
632
632
  /* @__PURE__ */ e.jsxs("div", { className: v, children: [
633
633
  /* @__PURE__ */ e.jsx(
@@ -638,7 +638,7 @@ function Hs({
638
638
  onClick: h,
639
639
  disabled: l || t <= i,
640
640
  "aria-label": "Decrease",
641
- children: /* @__PURE__ */ e.jsx(Ye, { size: S, strokeWidth: 1.5 })
641
+ children: /* @__PURE__ */ e.jsx(Ye, { size: $, strokeWidth: 1.5 })
642
642
  }
643
643
  ),
644
644
  /* @__PURE__ */ e.jsx(
@@ -647,12 +647,12 @@ function Hs({
647
647
  type: "number",
648
648
  className: "ds-stepper-input",
649
649
  value: t,
650
- onChange: u,
650
+ onChange: m,
651
651
  min: i,
652
652
  max: a,
653
653
  step: r,
654
654
  disabled: l,
655
- ...f
655
+ ...u
656
656
  }
657
657
  ),
658
658
  /* @__PURE__ */ e.jsx(
@@ -663,11 +663,11 @@ function Hs({
663
663
  onClick: p,
664
664
  disabled: l || t >= a,
665
665
  "aria-label": "Increase",
666
- children: /* @__PURE__ */ e.jsx(He, { size: S, strokeWidth: 1.5 })
666
+ children: /* @__PURE__ */ e.jsx(He, { size: $, strokeWidth: 1.5 })
667
667
  }
668
668
  )
669
669
  ] }),
670
- m && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: m }),
670
+ f && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: f }),
671
671
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
672
672
  ] });
673
673
  }
@@ -682,25 +682,25 @@ function qs({
682
682
  disabled: o = !1,
683
683
  ...l
684
684
  }) {
685
- const d = (i ? "interactive" : n) === "interactive" || a || r, f = [
685
+ const d = (i ? "interactive" : n) === "interactive" || a || r, u = [
686
686
  "ds-card",
687
687
  `ds-card--${t}`,
688
688
  d && "ds-card--interactive"
689
689
  ].filter(Boolean).join(" ");
690
690
  if (r) {
691
- const u = (_) => {
691
+ const m = (x) => {
692
692
  if (o) {
693
- _.preventDefault();
693
+ x.preventDefault();
694
694
  return;
695
695
  }
696
- _.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), a == null || a(_));
696
+ x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), a == null || a(x));
697
697
  };
698
698
  return /* @__PURE__ */ e.jsx(
699
699
  "a",
700
700
  {
701
- className: f,
701
+ className: u,
702
702
  href: o ? void 0 : r,
703
- onClick: u,
703
+ onClick: m,
704
704
  "aria-disabled": o ? "true" : void 0,
705
705
  ...l,
706
706
  children: s
@@ -715,7 +715,7 @@ function qs({
715
715
  return /* @__PURE__ */ e.jsx(
716
716
  p,
717
717
  {
718
- className: f,
718
+ className: u,
719
719
  role: d && !a ? "article" : void 0,
720
720
  ...h,
721
721
  ...l,
@@ -797,54 +797,55 @@ function et({
797
797
  title: t,
798
798
  onClose: n,
799
799
  size: i = "m",
800
- ...a
800
+ scrollable: a = !1,
801
+ ...r
801
802
  }) {
802
- const r = E(null), o = K.useId(), [l, m] = D(!1), d = () => {
803
- !n || l || (m(!0), setTimeout(() => {
804
- m(!1), n();
803
+ const o = E(null), l = K.useId(), [f, d] = D(!1), u = () => {
804
+ !n || f || (d(!0), setTimeout(() => {
805
+ d(!1), n();
805
806
  }, fs));
806
807
  };
807
808
  M(() => {
808
- const u = (v) => {
809
- v.key === "Escape" && d();
810
- }, _ = (v) => {
811
- r.current && !r.current.contains(v.target) && d();
809
+ const x = ($) => {
810
+ $.key === "Escape" && u();
811
+ }, v = ($) => {
812
+ o.current && !o.current.contains($.target) && u();
812
813
  };
813
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
814
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
814
+ return document.addEventListener("keydown", x), document.addEventListener("mousedown", v), () => {
815
+ document.removeEventListener("keydown", x), document.removeEventListener("mousedown", v);
815
816
  };
816
- }, [n, l]);
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
- return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", l && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...a, children: /* @__PURE__ */ e.jsxs(
817
+ }, [n, f]);
818
+ const p = K.Children.toArray(s), h = p.find((x) => (x == null ? void 0 : x.type) === Ie), m = p.filter((x) => (x == null ? void 0 : x.type) !== Ie);
819
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", f && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...r, children: /* @__PURE__ */ e.jsxs(
819
820
  "div",
820
821
  {
821
- className: `ds-modal ds-modal--${i}`,
822
- ref: r,
822
+ className: [`ds-modal ds-modal--${i}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
823
+ ref: o,
823
824
  role: "dialog",
824
825
  "aria-modal": "true",
825
- "aria-labelledby": t ? o : void 0,
826
+ "aria-labelledby": t ? l : void 0,
826
827
  children: [
827
828
  (t || n) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
828
- t && /* @__PURE__ */ e.jsx("h3", { id: o, className: "ds-modal__title", children: t }),
829
+ t && /* @__PURE__ */ e.jsx("h3", { id: l, className: "ds-modal__title", children: t }),
829
830
  n && /* @__PURE__ */ e.jsx(
830
831
  me,
831
832
  {
832
833
  variant: "ghost",
833
834
  size: "small",
834
835
  icon: /* @__PURE__ */ e.jsx(re, { size: I[2], strokeWidth: 1.5 }),
835
- onClick: d,
836
+ onClick: u,
836
837
  "aria-label": "Close modal"
837
838
  }
838
839
  )
839
840
  ] }),
840
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: h }),
841
- p
841
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: m }),
842
+ h
842
843
  ]
843
844
  }
844
845
  ) });
845
846
  }
846
847
  function Ie({ children: s }) {
847
- return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
848
+ return !s || K.Children.count(s) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
848
849
  }
849
850
  function ms({
850
851
  children: s,
@@ -856,15 +857,15 @@ function ms({
856
857
  className: o = "",
857
858
  ...l
858
859
  }) {
859
- const [m, d] = D(n), f = i !== void 0, p = f ? i : m, h = () => {
860
- f ? a == null || a(!i) : d((_) => !_);
861
- }, u = [
860
+ const [f, d] = D(n), u = i !== void 0, p = u ? i : f, h = () => {
861
+ u ? a == null || a(!i) : d((x) => !x);
862
+ }, m = [
862
863
  "ds-code-accordion",
863
864
  `ds-code-accordion--${r}`,
864
865
  p && "ds-code-accordion--expanded",
865
866
  o
866
867
  ].filter(Boolean).join(" ");
867
- return /* @__PURE__ */ e.jsxs("div", { className: u, ...l, children: [
868
+ return /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
868
869
  /* @__PURE__ */ e.jsxs(
869
870
  "button",
870
871
  {
@@ -909,8 +910,8 @@ function tt({ href: s, children: t, onClick: n, target: i, rel: a, ...r }) {
909
910
  function nt({ children: s, size: t = "m", variant: n = "ghost", ...i }) {
910
911
  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
912
  }
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
- const d = o && !s, f = [
913
+ function rt({ children: s, selected: t = !1, onClick: n, size: i = "m", variant: a = "ghost", disabled: r = !1, icon: o, href: l, ...f }) {
914
+ const d = o && !s, u = [
914
915
  "ds-tab",
915
916
  `ds-tab--${i}`,
916
917
  `ds-tab--${a}`,
@@ -921,12 +922,12 @@ function rt({ children: s, selected: t = !1, onClick: n, size: i = "m", variant:
921
922
  s
922
923
  ] });
923
924
  if (l) {
924
- const h = (u) => {
925
+ const h = (m) => {
925
926
  if (r) {
926
- u.preventDefault();
927
+ m.preventDefault();
927
928
  return;
928
929
  }
929
- u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), n == null || n(u));
930
+ m.metaKey || m.ctrlKey || m.button === 1 || (m.preventDefault(), n == null || n(m));
930
931
  };
931
932
  return /* @__PURE__ */ e.jsx(
932
933
  "a",
@@ -934,10 +935,10 @@ function rt({ children: s, selected: t = !1, onClick: n, size: i = "m", variant:
934
935
  role: "tab",
935
936
  "aria-current": t ? "page" : void 0,
936
937
  "aria-disabled": r ? "true" : void 0,
937
- className: f,
938
+ className: u,
938
939
  href: r ? void 0 : l,
939
940
  onClick: h,
940
- ...m,
941
+ ...f,
941
942
  children: p
942
943
  }
943
944
  );
@@ -947,37 +948,37 @@ function rt({ children: s, selected: t = !1, onClick: n, size: i = "m", variant:
947
948
  {
948
949
  role: "tab",
949
950
  "aria-selected": t,
950
- className: f,
951
+ className: u,
951
952
  onClick: n,
952
953
  disabled: r,
953
- ...m,
954
+ ...f,
954
955
  children: p
955
956
  }
956
957
  );
957
958
  }
958
959
  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
+ const r = E(null), o = E(null), [l, f] = D(!1), d = E(!1), u = E(null), p = E(null), h = () => {
960
961
  if (!r.current) return;
961
- const u = r.current.querySelector(`[data-value="${t}"]`);
962
- if (!u) return;
963
- const _ = r.current.getBoundingClientRect(), v = u.getBoundingClientRect(), S = v.left - _.left, R = v.width;
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(() => {
962
+ const m = r.current.querySelector(`[data-value="${t}"]`);
963
+ if (!m) return;
964
+ const x = r.current.getBoundingClientRect(), v = m.getBoundingClientRect(), $ = v.left - x.left, S = v.width;
965
+ o.current ? (o.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", o.current.style.left = $ + "px", o.current.style.width = S + "px", d.current = !1) : (f(!0), requestAnimationFrame(() => {
965
966
  if (!o.current || !r.current) return;
966
967
  const B = r.current.querySelector(`[data-value="${t}"]`);
967
968
  if (!B) return;
968
- const y = r.current.getBoundingClientRect(), $ = B.getBoundingClientRect();
969
- o.current.style.transition = "none", o.current.style.left = $.left - y.left + "px", o.current.style.width = $.width + "px";
969
+ const y = r.current.getBoundingClientRect(), T = B.getBoundingClientRect();
970
+ o.current.style.transition = "none", o.current.style.left = T.left - y.left + "px", o.current.style.width = T.width + "px";
970
971
  }));
971
972
  };
972
973
  return p.current = h, Ve(() => {
973
- const u = f.current !== t;
974
- f.current = t, d.current = l && u, h();
974
+ const m = u.current !== t;
975
+ u.current = t, d.current = l && m, h();
975
976
  }), M(() => {
976
977
  if (!r.current) return;
977
- const u = new ResizeObserver(() => {
978
+ const m = new ResizeObserver(() => {
978
979
  d.current = !1, p.current();
979
980
  });
980
- return u.observe(r.current), () => u.disconnect();
981
+ return m.observe(r.current), () => m.disconnect();
981
982
  }, []), /* @__PURE__ */ e.jsxs(
982
983
  "div",
983
984
  {
@@ -997,21 +998,21 @@ function at({ options: s, value: t, onChange: n, size: i = "m", disabled: a = !1
997
998
  "aria-hidden": "true"
998
999
  }
999
1000
  ),
1000
- s.map((u) => /* @__PURE__ */ e.jsxs(
1001
+ s.map((m) => /* @__PURE__ */ e.jsxs(
1001
1002
  "button",
1002
1003
  {
1003
1004
  type: "button",
1004
- "data-value": u.value,
1005
- className: ["ds-seg__btn", t === u.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1006
- onClick: () => !a && n(u.value),
1007
- "aria-pressed": t === u.value,
1005
+ "data-value": m.value,
1006
+ className: ["ds-seg__btn", t === m.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1007
+ onClick: () => !a && n(m.value),
1008
+ "aria-pressed": t === m.value,
1008
1009
  disabled: a,
1009
1010
  children: [
1010
- u.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: u.icon }),
1011
- u.label
1011
+ m.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: m.icon }),
1012
+ m.label
1012
1013
  ]
1013
1014
  },
1014
- u.value
1015
+ m.value
1015
1016
  ))
1016
1017
  ]
1017
1018
  }
@@ -1026,12 +1027,12 @@ function Ee({
1026
1027
  padding: r = "m",
1027
1028
  ...o
1028
1029
  }) {
1029
- const [l, m] = D(n), d = i !== void 0, f = d ? i : l, p = () => {
1030
- d ? a == null || a(!i) : m((u) => !u);
1030
+ const [l, f] = D(n), d = i !== void 0, u = d ? i : l, p = () => {
1031
+ d ? a == null || a(!i) : f((m) => !m);
1031
1032
  }, h = [
1032
1033
  "ds-accordion",
1033
1034
  `ds-accordion--${r}`,
1034
- f && "ds-accordion--expanded"
1035
+ u && "ds-accordion--expanded"
1035
1036
  ].filter(Boolean).join(" ");
1036
1037
  return /* @__PURE__ */ e.jsxs("div", { className: h, ...o, children: [
1037
1038
  /* @__PURE__ */ e.jsxs(
@@ -1040,7 +1041,7 @@ function Ee({
1040
1041
  type: "button",
1041
1042
  className: "ds-accordion__header",
1042
1043
  onClick: p,
1043
- "aria-expanded": f,
1044
+ "aria-expanded": u,
1044
1045
  children: [
1045
1046
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: t }),
1046
1047
  /* @__PURE__ */ e.jsx(
@@ -1048,7 +1049,7 @@ function Ee({
1048
1049
  {
1049
1050
  size: I[2],
1050
1051
  strokeWidth: 1.5,
1051
- className: `ds-accordion__icon ${f ? "ds-accordion__icon--expanded" : ""}`
1052
+ className: `ds-accordion__icon ${u ? "ds-accordion__icon--expanded" : ""}`
1052
1053
  }
1053
1054
  )
1054
1055
  ]
@@ -1090,36 +1091,36 @@ function hs(s, t, n) {
1090
1091
  return r === s.top ? "top" : r === a - s.bottom ? "bottom" : r === i - s.right ? "right" : "left";
1091
1092
  }
1092
1093
  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
- if (!f.current || !p.current) return;
1095
- const v = f.current.getBoundingClientRect(), S = p.current.getBoundingClientRect(), R = n || hs(v, S.height, S.width), { top: B, left: y, arrowOffset: $ } = ps(R, v, S);
1096
- d(R), l({
1094
+ const [a, r] = D(!1), [o, l] = D({ visibility: "hidden" }), [f, d] = D(n || "top"), u = E(null), p = E(null), h = E(!1), m = () => {
1095
+ if (!u.current || !p.current) return;
1096
+ const v = u.current.getBoundingClientRect(), $ = p.current.getBoundingClientRect(), S = n || hs(v, $.height, $.width), { top: B, left: y, arrowOffset: T } = ps(S, v, $);
1097
+ d(S), l({
1097
1098
  position: "fixed",
1098
1099
  top: B,
1099
1100
  left: y,
1100
1101
  visibility: "visible",
1101
- "--arrow-offset": `${$}px`
1102
+ "--arrow-offset": `${T}px`
1102
1103
  });
1103
1104
  };
1104
1105
  if (M(() => {
1105
1106
  if (!a) return;
1106
1107
  l({ position: "fixed", visibility: "hidden" });
1107
- const v = requestAnimationFrame(u);
1108
- return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1109
- cancelAnimationFrame(v), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1108
+ const v = requestAnimationFrame(m);
1109
+ return window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
1110
+ cancelAnimationFrame(v), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
1110
1111
  };
1111
1112
  }, [a, n]), M(() => {
1112
1113
  if (!a) return;
1113
- const v = (S) => {
1114
- f.current && !f.current.contains(S.target) && r(!1);
1114
+ const v = ($) => {
1115
+ u.current && !u.current.contains($.target) && r(!1);
1115
1116
  };
1116
1117
  return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
1117
1118
  }, [a]), !t) return s;
1118
- const _ = a && /* @__PURE__ */ e.jsx(
1119
+ const x = a && /* @__PURE__ */ e.jsx(
1119
1120
  "div",
1120
1121
  {
1121
1122
  ref: p,
1122
- className: `ds-tooltip ds-tooltip--${m}`,
1123
+ className: `ds-tooltip ds-tooltip--${f}`,
1123
1124
  role: "tooltip",
1124
1125
  style: o,
1125
1126
  children: t
@@ -1128,7 +1129,7 @@ function it({ children: s, content: t, position: n, ...i }) {
1128
1129
  return /* @__PURE__ */ e.jsxs(
1129
1130
  "div",
1130
1131
  {
1131
- ref: f,
1132
+ ref: u,
1132
1133
  className: "ds-tooltip-wrapper",
1133
1134
  onMouseEnter: () => {
1134
1135
  h.current || r(!0);
@@ -1142,7 +1143,7 @@ function it({ children: s, content: t, position: n, ...i }) {
1142
1143
  ...i,
1143
1144
  children: [
1144
1145
  s,
1145
- typeof document < "u" && pe.createPortal(_, document.body)
1146
+ typeof document < "u" && pe.createPortal(x, document.body)
1146
1147
  ]
1147
1148
  }
1148
1149
  );
@@ -1156,12 +1157,12 @@ function ot({
1156
1157
  id: r,
1157
1158
  ...o
1158
1159
  }) {
1159
- const l = r || `toggle-${K.useId()}`, m = [
1160
+ const l = r || `toggle-${K.useId()}`, f = [
1160
1161
  "ds-toggle",
1161
1162
  `ds-toggle--${n}`,
1162
1163
  i && "ds-toggle--disabled"
1163
1164
  ].filter(Boolean).join(" ");
1164
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1165
+ return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: l, children: [
1165
1166
  /* @__PURE__ */ e.jsx(
1166
1167
  "input",
1167
1168
  {
@@ -1187,12 +1188,12 @@ function lt({
1187
1188
  id: r,
1188
1189
  ...o
1189
1190
  }) {
1190
- const l = r || `checkbox-${K.useId()}`, m = [
1191
+ const l = r || `checkbox-${K.useId()}`, f = [
1191
1192
  "ds-checkbox",
1192
1193
  `ds-checkbox--${n}`,
1193
1194
  i && "ds-checkbox--disabled"
1194
1195
  ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1195
- return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1196
+ return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: l, children: [
1196
1197
  /* @__PURE__ */ e.jsx(
1197
1198
  "input",
1198
1199
  {
@@ -1200,7 +1201,7 @@ function lt({
1200
1201
  id: l,
1201
1202
  className: "ds-checkbox__input",
1202
1203
  checked: s,
1203
- onChange: (f) => t == null ? void 0 : t(f.target.checked),
1204
+ onChange: (u) => t == null ? void 0 : t(u.target.checked),
1204
1205
  disabled: i,
1205
1206
  ...o
1206
1207
  }
@@ -1225,14 +1226,14 @@ function ct({
1225
1226
  name: r,
1226
1227
  value: o,
1227
1228
  id: l,
1228
- ...m
1229
+ ...f
1229
1230
  }) {
1230
- const d = l || `radio-${K.useId()}`, f = [
1231
+ const d = l || `radio-${K.useId()}`, u = [
1231
1232
  "ds-radio",
1232
1233
  `ds-radio--${n}`,
1233
1234
  i && "ds-radio--disabled"
1234
1235
  ].filter(Boolean).join(" ");
1235
- return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: d, children: [
1236
+ return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: d, children: [
1236
1237
  /* @__PURE__ */ e.jsx(
1237
1238
  "input",
1238
1239
  {
@@ -1244,7 +1245,7 @@ function ct({
1244
1245
  disabled: i,
1245
1246
  name: r,
1246
1247
  value: o,
1247
- ...m
1248
+ ...f
1248
1249
  }
1249
1250
  ),
1250
1251
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
@@ -1294,7 +1295,7 @@ function bs(s) {
1294
1295
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1295
1296
  }
1296
1297
  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
+ const l = js(s ?? ""), [f, d] = D(!1), u = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: bs(s) });
1298
1299
  return /* @__PURE__ */ e.jsx(
1299
1300
  "div",
1300
1301
  {
@@ -1302,7 +1303,7 @@ function dt({ seed: s, icon: t, src: n, size: i = 32, className: a = "", style:
1302
1303
  style: { width: i, height: i, "--ds-avatar-h": l, ...r },
1303
1304
  "aria-hidden": "true",
1304
1305
  ...o,
1305
- children: n && !m ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : f
1306
+ children: n && !f ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : u
1306
1307
  }
1307
1308
  );
1308
1309
  }
@@ -1342,7 +1343,7 @@ function ft({ children: s, ...t }) {
1342
1343
  function mt({ children: s, ...t }) {
1343
1344
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1344
1345
  }
1345
- function pt({ children: s, interactive: t, selected: n, subheader: i, exiting: a, updated: r, className: o = "", onClick: l, ...m }) {
1346
+ function pt({ children: s, interactive: t, selected: n, subheader: i, exiting: a, updated: r, className: o = "", onClick: l, ...f }) {
1346
1347
  return /* @__PURE__ */ e.jsx(
1347
1348
  "tr",
1348
1349
  {
@@ -1356,7 +1357,7 @@ function pt({ children: s, interactive: t, selected: n, subheader: i, exiting: a
1356
1357
  o
1357
1358
  ].filter(Boolean).join(" "),
1358
1359
  onClick: l,
1359
- ...m,
1360
+ ...f,
1360
1361
  children: s
1361
1362
  }
1362
1363
  );
@@ -1365,13 +1366,13 @@ function ht({ children: s, colSpan: t = 999, ...n }) {
1365
1366
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1366
1367
  }
1367
1368
  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
+ const f = !!i || n !== void 0, d = n === "asc" ? qe : n === "desc" ? he : Ke;
1369
1370
  return /* @__PURE__ */ e.jsx(
1370
1371
  "th",
1371
1372
  {
1372
1373
  className: [
1373
1374
  "ds-th",
1374
- m ? "ds-th--sortable" : "",
1375
+ f ? "ds-th--sortable" : "",
1375
1376
  n ? "ds-th--sorted" : "",
1376
1377
  t !== "left" ? `ds-table-cell--${t}` : "",
1377
1378
  r
@@ -1379,7 +1380,7 @@ function xt({ children: s, align: t = "left", sortDir: n, onSort: i, width: a, c
1379
1380
  onClick: i,
1380
1381
  style: { width: a, ...o },
1381
1382
  ...l,
1382
- children: m ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1383
+ children: f ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1383
1384
  s,
1384
1385
  /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
1385
1386
  ] }) : s
@@ -1436,10 +1437,10 @@ function bt({
1436
1437
  htmlFor: r,
1437
1438
  children: o,
1438
1439
  className: l = "",
1439
- style: m,
1440
+ style: f,
1440
1441
  ...d
1441
1442
  }) {
1442
- const f = K.useId(), p = r ?? f, h = `${p}-hint`, u = `${p}-error`;
1443
+ const u = K.useId(), p = r ?? u, h = `${p}-hint`, m = `${p}-error`;
1443
1444
  return /* @__PURE__ */ e.jsxs(
1444
1445
  "div",
1445
1446
  {
@@ -1447,19 +1448,19 @@ function bt({
1447
1448
  "data-state": n ? "error" : void 0,
1448
1449
  "data-required": i ? "" : void 0,
1449
1450
  "data-disabled": a ? "" : void 0,
1450
- style: m,
1451
+ style: f,
1451
1452
  ...d,
1452
1453
  children: [
1453
1454
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: s }),
1454
1455
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: o }),
1455
1456
  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
+ n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: m, role: "alert", children: n })
1457
1458
  ]
1458
1459
  }
1459
1460
  );
1460
1461
  }
1461
1462
  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
+ const f = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1463
1464
  return /* @__PURE__ */ e.jsxs(
1464
1465
  "div",
1465
1466
  {
@@ -1474,7 +1475,7 @@ function vt({ label: s, value: t, delta: n, size: i = "m", inline: a = !1, class
1474
1475
  children: [
1475
1476
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: s }),
1476
1477
  t != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: t }),
1477
- n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: n })
1478
+ n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${f}`, children: n })
1478
1479
  ]
1479
1480
  }
1480
1481
  );
@@ -1495,10 +1496,10 @@ function Nt({
1495
1496
  "aria-label": n,
1496
1497
  style: a,
1497
1498
  ...r,
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
+ children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: o.map((l, f) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1499
1500
  l,
1500
- m < o.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1501
- ] }, m)) })
1501
+ f < o.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: t })
1502
+ ] }, f)) })
1502
1503
  }
1503
1504
  );
1504
1505
  }
@@ -1512,7 +1513,7 @@ function wt({
1512
1513
  style: o,
1513
1514
  ...l
1514
1515
  }) {
1515
- const m = vs(s, t, i);
1516
+ const f = vs(s, t, i);
1516
1517
  return /* @__PURE__ */ e.jsxs(
1517
1518
  "nav",
1518
1519
  {
@@ -1531,8 +1532,8 @@ function wt({
1531
1532
  children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1532
1533
  }
1533
1534
  ),
1534
- m.map(
1535
- (d, f) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${f}`) : /* @__PURE__ */ e.jsx(
1535
+ f.map(
1536
+ (d, u) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1536
1537
  "button",
1537
1538
  {
1538
1539
  className: `ds-pagination-page${d === s ? " ds-pagination-page--current" : ""}`,
@@ -1573,22 +1574,22 @@ function gt({
1573
1574
  side: i = "right",
1574
1575
  ...a
1575
1576
  }) {
1576
- const r = E(null), o = K.useId(), [l, m] = D(!1), d = () => {
1577
- !n || l || (m(!0), setTimeout(() => {
1578
- m(!1), n();
1577
+ const r = E(null), o = K.useId(), [l, f] = D(!1), d = () => {
1578
+ !n || l || (f(!0), setTimeout(() => {
1579
+ f(!1), n();
1579
1580
  }, Ns));
1580
1581
  };
1581
1582
  M(() => {
1582
- const u = (v) => {
1583
+ const m = (v) => {
1583
1584
  v.key === "Escape" && d();
1584
- }, _ = (v) => {
1585
+ }, x = (v) => {
1585
1586
  r.current && !r.current.contains(v.target) && d();
1586
1587
  };
1587
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", _), () => {
1588
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", _);
1588
+ return document.addEventListener("keydown", m), document.addEventListener("mousedown", x), () => {
1589
+ document.removeEventListener("keydown", m), document.removeEventListener("mousedown", x);
1589
1590
  };
1590
1591
  }, [n, l]);
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
+ const u = K.Children.toArray(s), p = u.find((m) => (m == null ? void 0 : m.type) === Be), h = u.filter((m) => (m == null ? void 0 : m.type) !== Be);
1592
1593
  return /* @__PURE__ */ e.jsx(
1593
1594
  "div",
1594
1595
  {
@@ -1634,12 +1635,12 @@ function yt({
1634
1635
  role: r,
1635
1636
  ...o
1636
1637
  }) {
1637
- const l = ws[t], m = r || (t === "error" ? "alert" : "status");
1638
+ const l = ws[t], f = r || (t === "error" ? "alert" : "status");
1638
1639
  return /* @__PURE__ */ e.jsxs(
1639
1640
  "div",
1640
1641
  {
1641
1642
  className: `ds-banner ds-banner--${t}`,
1642
- role: m,
1643
+ role: f,
1643
1644
  ...o,
1644
1645
  children: [
1645
1646
  l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: I[2], strokeWidth: 1.5 }) }),
@@ -1677,28 +1678,28 @@ function kt({
1677
1678
  style: o,
1678
1679
  ...l
1679
1680
  }) {
1680
- const [m, d] = D(!1), [f, p] = D(!1), h = n !== void 0, u = h ? n : m, _ = E(null), v = E(null), S = E(null), R = E(null), [B, y] = D({}), $ = E(null), z = 150, A = () => {
1681
+ const [f, d] = D(!1), [u, p] = D(!1), h = n !== void 0, m = h ? n : f, x = E(null), v = E(null), $ = E(null), S = E(null), [B, y] = D({}), T = E(null), z = 150, A = () => {
1681
1682
  if (h)
1682
1683
  i == null || i(!1);
1683
1684
  else {
1684
- if (f) return;
1685
- p(!0), $.current = setTimeout(() => {
1685
+ if (u) return;
1686
+ p(!0), T.current = setTimeout(() => {
1686
1687
  d(!1), p(!1);
1687
1688
  }, z);
1688
1689
  }
1689
1690
  }, Y = () => {
1690
- const x = !u;
1691
- h ? i == null || i(x) : x ? (clearTimeout($.current), p(!1), d(!0)) : A();
1691
+ const _ = !m;
1692
+ h ? i == null || i(_) : _ ? (clearTimeout(T.current), p(!1), d(!0)) : A();
1692
1693
  }, H = () => {
1693
- u || (h ? i == null || i(!0) : (clearTimeout($.current), p(!1), d(!0)));
1694
+ m || (h ? i == null || i(!0) : (clearTimeout(T.current), p(!1), d(!0)));
1694
1695
  };
1695
- M(() => () => clearTimeout($.current), []), M(() => {
1696
- if (!u) return;
1697
- const x = 300, N = () => {
1696
+ M(() => () => clearTimeout(T.current), []), M(() => {
1697
+ if (!m) return;
1698
+ const _ = 300, N = () => {
1698
1699
  var G;
1699
- const k = (G = _.current) == null ? void 0 : G.getBoundingClientRect();
1700
+ const k = (G = x.current) == null ? void 0 : G.getBoundingClientRect();
1700
1701
  if (!k) return;
1701
- const P = window.innerHeight - k.bottom, q = P < x + 8 && k.top > P;
1702
+ const P = window.innerHeight - k.bottom, q = P < _ + 8 && k.top > P;
1702
1703
  y(
1703
1704
  a === "right" ? q ? { bottom: window.innerHeight - k.top + 4, top: "auto", right: window.innerWidth - k.right } : { top: k.bottom + 4, bottom: "auto", right: window.innerWidth - k.right } : q ? { bottom: window.innerHeight - k.top + 4, top: "auto", left: k.left } : { top: k.bottom + 4, bottom: "auto", left: k.left }
1704
1705
  );
@@ -1706,64 +1707,64 @@ function kt({
1706
1707
  return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
1707
1708
  window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
1708
1709
  };
1709
- }, [u, a]);
1710
+ }, [m, a]);
1710
1711
  const F = () => {
1711
1712
  var N;
1712
- const x = (N = S.current) == null ? void 0 : N.querySelector(
1713
+ const _ = (N = $.current) == null ? void 0 : N.querySelector(
1713
1714
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1714
1715
  );
1715
- x == null || x.focus();
1716
+ _ == null || _.focus();
1716
1717
  };
1717
1718
  M(() => {
1718
- if (!u) return;
1719
- const x = (k) => {
1719
+ if (!m) return;
1720
+ const _ = (k) => {
1720
1721
  var P, q;
1721
- !((P = _.current) != null && P.contains(k.target)) && !((q = v.current) != null && q.contains(k.target)) && A();
1722
+ !((P = x.current) != null && P.contains(k.target)) && !((q = v.current) != null && q.contains(k.target)) && A();
1722
1723
  }, N = (k) => {
1723
1724
  k.key === "Escape" && (A(), F());
1724
1725
  };
1725
- return document.addEventListener("mousedown", x), document.addEventListener("keydown", N), () => {
1726
- document.removeEventListener("mousedown", x), document.removeEventListener("keydown", N);
1726
+ return document.addEventListener("mousedown", _), document.addEventListener("keydown", N), () => {
1727
+ document.removeEventListener("mousedown", _), document.removeEventListener("keydown", N);
1727
1728
  };
1728
- }, [u]), M(() => {
1729
- if (!u || !R.current || !v.current) return;
1730
- const x = b(), N = R.current === "last" ? x[x.length - 1] : x[0];
1731
- N == null || N.focus(), R.current = null;
1732
- }, [u]);
1729
+ }, [m]), M(() => {
1730
+ if (!m || !S.current || !v.current) return;
1731
+ const _ = b(), N = S.current === "last" ? _[_.length - 1] : _[0];
1732
+ N == null || N.focus(), S.current = null;
1733
+ }, [m]);
1733
1734
  const b = () => v.current ? [...v.current.querySelectorAll(
1734
1735
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1735
- )] : [], C = (x) => {
1736
+ )] : [], C = (_) => {
1736
1737
  var N, k;
1737
- if (x.key === "ArrowDown")
1738
- x.preventDefault(), u ? (N = b()[0]) == null || N.focus() : (R.current = "first", H());
1739
- else if (x.key === "ArrowUp")
1740
- if (x.preventDefault(), !u)
1741
- R.current = "last", H();
1738
+ if (_.key === "ArrowDown")
1739
+ _.preventDefault(), m ? (N = b()[0]) == null || N.focus() : (S.current = "first", H());
1740
+ else if (_.key === "ArrowUp")
1741
+ if (_.preventDefault(), !m)
1742
+ S.current = "last", H();
1742
1743
  else {
1743
1744
  const P = b();
1744
1745
  (k = P[P.length - 1]) == null || k.focus();
1745
1746
  }
1746
- }, X = (x) => {
1747
+ }, X = (_) => {
1747
1748
  var P, q, G, g;
1748
1749
  const N = b(), k = N.findIndex((c) => c === document.activeElement);
1749
- switch (x.key) {
1750
+ switch (_.key) {
1750
1751
  case "ArrowDown":
1751
- x.preventDefault(), (P = N[Math.min(k + 1, N.length - 1)]) == null || P.focus();
1752
+ _.preventDefault(), (P = N[Math.min(k + 1, N.length - 1)]) == null || P.focus();
1752
1753
  break;
1753
1754
  case "ArrowUp":
1754
- x.preventDefault(), k <= 0 ? F() : (q = N[k - 1]) == null || q.focus();
1755
+ _.preventDefault(), k <= 0 ? F() : (q = N[k - 1]) == null || q.focus();
1755
1756
  break;
1756
1757
  case "Home":
1757
- x.preventDefault(), (G = N[0]) == null || G.focus();
1758
+ _.preventDefault(), (G = N[0]) == null || G.focus();
1758
1759
  break;
1759
1760
  case "End":
1760
- x.preventDefault(), (g = N[N.length - 1]) == null || g.focus();
1761
+ _.preventDefault(), (g = N[N.length - 1]) == null || g.focus();
1761
1762
  break;
1762
1763
  case "Tab":
1763
1764
  A();
1764
1765
  break;
1765
1766
  }
1766
- }, U = u && /* @__PURE__ */ e.jsx(
1767
+ }, U = m && /* @__PURE__ */ e.jsx(
1767
1768
  "div",
1768
1769
  {
1769
1770
  ref: v,
@@ -1771,36 +1772,36 @@ function kt({
1771
1772
  className: [
1772
1773
  "ds-dropdown__menu",
1773
1774
  `ds-dropdown__menu--${a}`,
1774
- f && "ds-dropdown__menu--closing"
1775
+ u && "ds-dropdown__menu--closing"
1775
1776
  ].filter(Boolean).join(" "),
1776
1777
  style: B,
1777
1778
  onKeyDown: X,
1778
- children: t.map((x, N) => {
1779
- if (x.separator)
1779
+ children: t.map((_, N) => {
1780
+ if (_.separator)
1780
1781
  return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, N);
1781
- if (x.type === "section")
1782
+ if (_.type === "section")
1782
1783
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
1783
- x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
1784
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
1784
+ _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
1785
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
1785
1786
  ] }, N);
1786
- const k = !!x.href, P = k ? "a" : "button", q = k ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1787
+ const k = !!_.href, P = k ? "a" : "button", q = k ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
1787
1788
  return /* @__PURE__ */ e.jsxs(
1788
1789
  P,
1789
1790
  {
1790
1791
  role: "menuitem",
1791
1792
  className: [
1792
1793
  "ds-dropdown__item",
1793
- x.danger && "ds-dropdown__item--danger"
1794
+ _.danger && "ds-dropdown__item--danger"
1794
1795
  ].filter(Boolean).join(" "),
1795
1796
  ...q,
1796
1797
  onClick: () => {
1797
1798
  var G;
1798
- (G = x.onClick) == null || G.call(x), A();
1799
+ (G = _.onClick) == null || G.call(_), A();
1799
1800
  },
1800
1801
  children: [
1801
- x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
1802
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
1803
- x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
1802
+ _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
1803
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
1804
+ _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
1804
1805
  ]
1805
1806
  },
1806
1807
  N
@@ -1811,7 +1812,7 @@ function kt({
1811
1812
  return /* @__PURE__ */ e.jsxs(
1812
1813
  "div",
1813
1814
  {
1814
- ref: _,
1815
+ ref: x,
1815
1816
  className: ["ds-dropdown", r].filter(Boolean).join(" "),
1816
1817
  style: o,
1817
1818
  ...l,
@@ -1819,7 +1820,7 @@ function kt({
1819
1820
  /* @__PURE__ */ e.jsx(
1820
1821
  "div",
1821
1822
  {
1822
- ref: S,
1823
+ ref: $,
1823
1824
  className: "ds-dropdown__trigger",
1824
1825
  onClick: Y,
1825
1826
  onKeyDown: C,
@@ -1839,7 +1840,7 @@ function Et({
1839
1840
  min: a = 2,
1840
1841
  animate: r = !0
1841
1842
  }) {
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
+ const o = Math.min(100, Math.max(0, s)), l = Math.max(a, o), f = n === "auto" ? o >= 70 ? "success" : o >= 50 ? "warning" : "danger" : n;
1843
1844
  return /* @__PURE__ */ e.jsxs(
1844
1845
  "div",
1845
1846
  {
@@ -1856,7 +1857,7 @@ function Et({
1856
1857
  /* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
1857
1858
  "div",
1858
1859
  {
1859
- className: `ds-progress__fill ds-progress__fill--${m}`,
1860
+ className: `ds-progress__fill ds-progress__fill--${f}`,
1860
1861
  style: { width: `${l}%` }
1861
1862
  }
1862
1863
  ) }),
@@ -1878,10 +1879,10 @@ function ks(s, { duration: t = 600 } = {}) {
1878
1879
  }
1879
1880
  const o = a.current, l = s - o;
1880
1881
  if (l === 0) return;
1881
- let m = null;
1882
- const d = (f) => {
1883
- m || (m = f);
1884
- const p = Math.min((f - m) / t, 1);
1882
+ let f = null;
1883
+ const d = (u) => {
1884
+ f || (f = u);
1885
+ const p = Math.min((u - f) / t, 1);
1885
1886
  i(o + l * gs(p)), p < 1 ? r.current = requestAnimationFrame(d) : a.current = s;
1886
1887
  };
1887
1888
  return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
@@ -1903,8 +1904,8 @@ function Es({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
1903
1904
  const o = i.current;
1904
1905
  if (!o) return;
1905
1906
  const l = new IntersectionObserver(
1906
- ([m]) => {
1907
- m.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
1907
+ ([f]) => {
1908
+ f.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
1908
1909
  },
1909
1910
  { threshold: s, rootMargin: t }
1910
1911
  );
@@ -1921,10 +1922,10 @@ function Tt({
1921
1922
  onLeave: o,
1922
1923
  ...l
1923
1924
  }) {
1924
- const { ref: m, inView: d } = Es({ threshold: i, rootMargin: a, once: n }), f = E(!1);
1925
+ const { ref: f, inView: d } = Es({ threshold: i, rootMargin: a, once: n }), u = E(!1);
1925
1926
  return M(() => {
1926
- d && !f.current && (r == null || r()), !d && f.current && (o == null || o()), f.current = d;
1927
- }, [d]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(d) : s });
1927
+ d && !u.current && (r == null || r()), !d && u.current && (o == null || o()), u.current = d;
1928
+ }, [d]), /* @__PURE__ */ e.jsx(t, { ref: f, ...l, children: typeof s == "function" ? s(d) : s });
1928
1929
  }
1929
1930
  const Me = {
1930
1931
  default: ke,
@@ -2009,10 +2010,10 @@ function Dt({
2009
2010
  expanded: r,
2010
2011
  onToggle: o,
2011
2012
  children: l,
2012
- className: m = "",
2013
+ className: f = "",
2013
2014
  ...d
2014
2015
  }) {
2015
- const f = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2016
+ const u = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2016
2017
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2017
2018
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2018
2019
  Ss[t],
@@ -2021,7 +2022,7 @@ function Dt({
2021
2022
  return l ? /* @__PURE__ */ e.jsx(
2022
2023
  "div",
2023
2024
  {
2024
- className: ["ds-tool-card", f && "ds-tool-card--running", m].filter(Boolean).join(" "),
2025
+ className: ["ds-tool-card", u && "ds-tool-card--running", f].filter(Boolean).join(" "),
2025
2026
  ...d,
2026
2027
  children: /* @__PURE__ */ e.jsx(
2027
2028
  Ee,
@@ -2029,8 +2030,8 @@ function Dt({
2029
2030
  title: p,
2030
2031
  padding: "s",
2031
2032
  defaultExpanded: a,
2032
- expanded: f ? !1 : r,
2033
- onToggle: f ? void 0 : o,
2033
+ expanded: u ? !1 : r,
2034
+ onToggle: u ? void 0 : o,
2034
2035
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2035
2036
  }
2036
2037
  )
@@ -2038,7 +2039,7 @@ function Dt({
2038
2039
  ) : /* @__PURE__ */ e.jsx(
2039
2040
  "div",
2040
2041
  {
2041
- className: ["ds-tool-card", "ds-tool-card--bubble", m].filter(Boolean).join(" "),
2042
+ className: ["ds-tool-card", "ds-tool-card--bubble", f].filter(Boolean).join(" "),
2042
2043
  ...d,
2043
2044
  children: p
2044
2045
  }
@@ -2051,8 +2052,8 @@ function Ds({
2051
2052
  "aria-label": i = "Copy to clipboard",
2052
2053
  ...a
2053
2054
  }) {
2054
- const [r, o] = D(!1), l = (m) => {
2055
- m.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2055
+ const [r, o] = D(!1), l = (f) => {
2056
+ f.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2056
2057
  o(!0), setTimeout(() => o(!1), n);
2057
2058
  });
2058
2059
  };
@@ -2102,19 +2103,19 @@ function It({
2102
2103
  ...l
2103
2104
  }) {
2104
2105
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
2105
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": o, children: Array.from({ length: s }, (m, d) => {
2106
- const f = d === t, p = n.includes(d) && !f, h = i && (d <= t || n.includes(d)), u = [
2106
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": o, children: Array.from({ length: s }, (f, d) => {
2107
+ const u = d === t, p = n.includes(d) && !u, h = i && (d <= t || n.includes(d)), m = [
2107
2108
  "ds-step-indicator__dot",
2108
- f && "ds-step-indicator__dot--active",
2109
+ u && "ds-step-indicator__dot--active",
2109
2110
  p && "ds-step-indicator__dot--done"
2110
2111
  ].filter(Boolean).join(" ");
2111
2112
  return /* @__PURE__ */ e.jsx(
2112
2113
  "button",
2113
2114
  {
2114
2115
  type: "button",
2115
- className: u,
2116
+ className: m,
2116
2117
  role: "tab",
2117
- "aria-selected": f,
2118
+ "aria-selected": u,
2118
2119
  "aria-label": `Step ${d + 1}`,
2119
2120
  disabled: !h || d === t,
2120
2121
  onClick: () => i == null ? void 0 : i(d),
@@ -2156,17 +2157,17 @@ function Mt({
2156
2157
  className: o = "",
2157
2158
  ...l
2158
2159
  }) {
2159
- const m = [
2160
+ const f = [
2160
2161
  "ds-chat-message",
2161
2162
  `ds-chat-message--${s}`,
2162
2163
  a && "ds-chat-message--streaming",
2163
2164
  o
2164
2165
  ].filter(Boolean).join(" ");
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: [
2166
+ return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: f, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: f, ...l, children: [
2166
2167
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2167
2168
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
2168
2169
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2169
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2170
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: f, ...l, children: [
2170
2171
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2171
2172
  i && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: i }),
2172
2173
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
@@ -2197,33 +2198,33 @@ function As({
2197
2198
  betweenTime: r = 380,
2198
2199
  manualPauseMs: o = 5e3
2199
2200
  }) {
2200
- const [l, m] = D(0), [d, f] = D(""), p = E("typing"), h = E(0), u = E(0), _ = E(null), v = E(0);
2201
+ const [l, f] = D(0), [d, u] = D(""), p = E("typing"), h = E(0), m = E(0), x = E(null), v = E(0);
2201
2202
  M(() => {
2202
- u.current = l;
2203
+ m.current = l;
2203
2204
  }, [l]), M(() => {
2204
- if (_.current && (clearTimeout(_.current), _.current = null), !t || s.length === 0) {
2205
- f(""), h.current = 0, p.current = "typing";
2205
+ if (x.current && (clearTimeout(x.current), x.current = null), !t || s.length === 0) {
2206
+ u(""), h.current = 0, p.current = "typing";
2206
2207
  return;
2207
2208
  }
2208
- const $ = () => {
2209
+ const T = () => {
2209
2210
  const z = Date.now();
2210
2211
  if (v.current > z) {
2211
- _.current = setTimeout($, v.current - z);
2212
+ x.current = setTimeout(T, v.current - z);
2212
2213
  return;
2213
2214
  }
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));
2215
+ const A = s[m.current % s.length] ?? "";
2216
+ p.current === "typing" ? (h.current += 1, u(A.slice(0, h.current)), h.current >= A.length ? (p.current = "holding", x.current = setTimeout(T, a)) : x.current = setTimeout(T, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(T, i)) : (h.current = Math.max(0, h.current - 1), u(A.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", m.current = (m.current + 1) % s.length, f(m.current), x.current = setTimeout(T, r)) : x.current = setTimeout(T, i));
2216
2217
  };
2217
- return _.current = setTimeout($, 260), () => {
2218
- _.current && clearTimeout(_.current);
2218
+ return x.current = setTimeout(T, 260), () => {
2219
+ x.current && clearTimeout(x.current);
2219
2220
  };
2220
2221
  }, [t, s, n, i, a, r]);
2221
- const S = ($) => {
2222
+ const $ = (T) => {
2222
2223
  if (s.length === 0) return;
2223
- const z = ($ % s.length + s.length) % s.length, A = s[z];
2224
- u.current = z, h.current = A.length, p.current = "holding", v.current = Date.now() + o, m(z), f(A);
2225
- }, R = () => S(u.current + 1), B = () => S(u.current - 1), y = s[l % s.length] ?? "";
2226
- return { displayed: d, currentPrompt: y, index: l, next: R, prev: B };
2224
+ const z = (T % s.length + s.length) % s.length, A = s[z];
2225
+ m.current = z, h.current = A.length, p.current = "holding", v.current = Date.now() + o, f(z), u(A);
2226
+ }, S = () => $(m.current + 1), B = () => $(m.current - 1), y = s[l % s.length] ?? "";
2227
+ return { displayed: d, currentPrompt: y, index: l, next: S, prev: B };
2227
2228
  }
2228
2229
  let Is = 0;
2229
2230
  function Lt({
@@ -2235,46 +2236,46 @@ function Lt({
2235
2236
  loading: r = !1,
2236
2237
  disabled: o = !1,
2237
2238
  placeholder: l = "Let's get things done...",
2238
- animatedPlaceholders: m,
2239
+ animatedPlaceholders: f,
2239
2240
  attachments: d,
2240
- images: f,
2241
+ images: u,
2241
2242
  onAttachFiles: p,
2242
2243
  onAttachImages: h,
2243
- onRemoveAttachment: u,
2244
- onRemoveImage: _,
2244
+ onRemoveAttachment: m,
2245
+ onRemoveImage: x,
2245
2246
  acceptImage: v,
2246
- acceptFile: S,
2247
- maxImages: R,
2247
+ acceptFile: $,
2248
+ maxImages: S,
2248
2249
  maxImageSize: B,
2249
2250
  leftSlot: y,
2250
- rightSlot: $,
2251
+ rightSlot: T,
2251
2252
  className: z = "",
2252
2253
  ...A
2253
2254
  }) {
2254
- const Y = E(null), H = E(null), F = E(0), [b, C] = D(!1), [X, U] = D([]), x = (j) => {
2255
- const T = ++Is;
2256
- U((V) => [...V, { id: T, msg: j }]), setTimeout(() => U((V) => V.filter((J) => J.id !== T)), 6e3);
2257
- }, N = (j) => U((T) => T.filter((V) => V.id !== j)), k = (j) => j.type.startsWith("image/"), P = () => !0, q = v ?? k, G = S ?? P, g = (j) => {
2258
- const T = [], V = [], J = [], Z = [];
2259
- let ee = 0, oe = R != null ? R - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2255
+ const Y = E(null), H = E(null), F = E(0), [b, C] = D(!1), [X, U] = D([]), _ = (j) => {
2256
+ const R = ++Is;
2257
+ U((V) => [...V, { id: R, msg: j }]), setTimeout(() => U((V) => V.filter((J) => J.id !== R)), 6e3);
2258
+ }, N = (j) => U((R) => R.filter((V) => V.id !== j)), k = (j) => j.type.startsWith("image/"), P = () => !0, q = v ?? k, G = $ ?? P, g = (j) => {
2259
+ const R = [], V = [], J = [], Z = [];
2260
+ let ee = 0, oe = S != null ? S - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2260
2261
  for (const se of j)
2261
- q(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);
2262
- return { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee };
2262
+ q(se) ? B && se.size > B ? J.push(se.name) : oe > 0 ? (R.push(se), oe--) : ee++ : G(se) ? V.push(se) : Z.push(se.name);
2263
+ return { imageFiles: R, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee };
2263
2264
  }, c = (j) => {
2264
- const { imageFiles: T, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(j);
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);
2266
- const oe = V.concat(h ? [] : T);
2265
+ const { imageFiles: R, docFiles: V, tooLarge: J, skipped: Z, limitExceeded: ee } = g(j);
2266
+ J.length && _(`File${J.length > 1 ? "s" : ""} too large${B ? ` (max ${B / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && _(`Max ${S} images per message`), h && R.length && h(R);
2267
+ const oe = V.concat(h ? [] : R);
2267
2268
  p && oe.length && p(oe);
2268
2269
  };
2269
2270
  M(() => {
2270
2271
  const j = H.current;
2271
2272
  j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2272
2273
  }, [s]), M(() => {
2273
- const j = (T) => {
2274
+ const j = (R) => {
2274
2275
  var J, Z, ee;
2275
2276
  if (r || o) return;
2276
- const V = (J = T.target) == null ? void 0 : J.tagName;
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 = H.current) == null || ee.focus();
2277
+ const V = (J = R.target) == null ? void 0 : J.tagName;
2278
+ V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || (Z = R.target) != null && Z.isContentEditable || R.ctrlKey || R.metaKey || R.altKey || R.key.length !== 1 && R.key !== "Backspace" && R.key !== "Delete" || (ee = H.current) == null || ee.focus();
2278
2279
  };
2279
2280
  return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2280
2281
  }, [r, o]);
@@ -2284,26 +2285,26 @@ function Lt({
2284
2285
  j.preventDefault(), F.current--, F.current === 0 && C(!1);
2285
2286
  }, O = (j) => j.preventDefault(), te = (j) => {
2286
2287
  j.preventDefault(), F.current = 0, C(!1);
2287
- const T = Array.from(j.dataTransfer.files);
2288
- T.length && c(T);
2288
+ const R = Array.from(j.dataTransfer.files);
2289
+ R.length && c(R);
2289
2290
  }, ae = (j) => {
2290
- const T = Array.from(j.target.files || []);
2291
- Y.current && (Y.current.value = ""), T.length && c(T);
2291
+ const R = Array.from(j.target.files || []);
2292
+ Y.current && (Y.current.value = ""), R.length && c(R);
2292
2293
  }, W = (j) => {
2293
2294
  var se;
2294
2295
  if (!h) return;
2295
- const T = (se = j.clipboardData) == null ? void 0 : se.items;
2296
- if (!T) return;
2296
+ const R = (se = j.clipboardData) == null ? void 0 : se.items;
2297
+ if (!R) return;
2297
2298
  const V = [];
2298
- for (const Ue of T) {
2299
+ for (const Ue of R) {
2299
2300
  const Te = Ue.getAsFile();
2300
2301
  Te && V.push(Te);
2301
2302
  }
2302
2303
  if (V.length === 0) return;
2303
2304
  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({
2306
- prompts: m ?? [],
2305
+ Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && _(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), oe && _(`Max ${S} images per message`), J.length && (j.preventDefault(), h(J));
2306
+ }, Q = !r && !o && !!(f != null && f.length) && s.length === 0, ie = As({
2307
+ prompts: f ?? [],
2307
2308
  enabled: Q
2308
2309
  }), xe = (j) => {
2309
2310
  if (Q) {
@@ -2321,7 +2322,7 @@ function Lt({
2321
2322
  }
2322
2323
  }
2323
2324
  a == null || a(j);
2324
- }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (d == null ? void 0 : d.length) > 0) && !o, $e = p || h;
2325
+ }, Ce = (s.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !o, $e = p || h;
2325
2326
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", z].filter(Boolean).join(" "), ...A, children: [
2326
2327
  $e && /* @__PURE__ */ e.jsx(
2327
2328
  "input",
@@ -2362,19 +2363,19 @@ function Lt({
2362
2363
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
2363
2364
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2364
2365
  ] }),
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
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((j, R) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2366
2367
  /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2367
2368
  /* @__PURE__ */ e.jsx(
2368
2369
  "button",
2369
2370
  {
2370
2371
  className: "ds-prompt-input__image-remove",
2371
- onClick: () => _ == null ? void 0 : _(T),
2372
+ onClick: () => x == null ? void 0 : x(R),
2372
2373
  "aria-label": "Remove image",
2373
2374
  type: "button",
2374
2375
  children: /* @__PURE__ */ e.jsx(re, { size: 12, strokeWidth: 2 })
2375
2376
  }
2376
2377
  )
2377
- ] }, T)) }),
2378
+ ] }, R)) }),
2378
2379
  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
2380
  /* @__PURE__ */ e.jsx("span", { children: j.msg }),
2380
2381
  /* @__PURE__ */ e.jsx(
@@ -2388,7 +2389,7 @@ function Lt({
2388
2389
  }
2389
2390
  )
2390
2391
  ] }, 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
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((j, R) => /* @__PURE__ */ e.jsx(ce, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2392
2393
  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
2394
  j.filename,
2394
2395
  j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
@@ -2396,11 +2397,11 @@ function Lt({
2396
2397
  {
2397
2398
  type: "button",
2398
2399
  className: "ds-prompt-input__remove-btn",
2399
- onClick: () => u == null ? void 0 : u(T),
2400
+ onClick: () => m == null ? void 0 : m(R),
2400
2401
  children: /* @__PURE__ */ e.jsx(re, { size: I[1], strokeWidth: 1.5 })
2401
2402
  }
2402
2403
  )
2403
- ] }) }, T)) }),
2404
+ ] }) }, R)) }),
2404
2405
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2405
2406
  $e && /* @__PURE__ */ e.jsx(
2406
2407
  me,
@@ -2416,7 +2417,7 @@ function Lt({
2416
2417
  }
2417
2418
  ),
2418
2419
  y,
2419
- $,
2420
+ T,
2420
2421
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2421
2422
  r ? /* @__PURE__ */ e.jsx(
2422
2423
  me,
@@ -2454,36 +2455,36 @@ function zt({
2454
2455
  showAutoOption: r = !1,
2455
2456
  groupByTier: o = !0,
2456
2457
  className: l = "",
2457
- ...m
2458
+ ...f
2458
2459
  }) {
2459
- const [d, f] = D(!1), p = E(null), h = E(null), u = E(null), [_, v] = D({}), S = s.filter((b) => !a || b.name === "auto" ? !0 : (Pe[b.tier] ?? 1) >= (Pe[a] ?? 1)), R = S.find((b) => b.name === "auto"), B = S.filter((b) => b.name !== "auto"), y = s.find((b) => b.name === t), z = new Set(B.map((b) => b.tier).filter(Boolean)).size > 1;
2460
+ const [d, u] = D(!1), p = E(null), h = E(null), m = E(null), [x, v] = D({}), $ = s.filter((b) => !a || b.name === "auto" ? !0 : (Pe[b.tier] ?? 1) >= (Pe[a] ?? 1)), S = $.find((b) => b.name === "auto"), B = $.filter((b) => b.name !== "auto"), y = s.find((b) => b.name === t), z = new Set(B.map((b) => b.tier).filter(Boolean)).size > 1;
2460
2461
  M(() => {
2461
2462
  if (!d) return;
2462
2463
  const b = 320, C = () => {
2463
2464
  var P;
2464
- const x = (P = h.current) == null ? void 0 : P.getBoundingClientRect();
2465
- if (!x) return;
2466
- const N = window.innerHeight - x.bottom, k = N < b + 8 && x.top > N;
2465
+ const _ = (P = h.current) == null ? void 0 : P.getBoundingClientRect();
2466
+ if (!_) return;
2467
+ const N = window.innerHeight - _.bottom, k = N < b + 8 && _.top > N;
2467
2468
  v({
2468
2469
  position: "fixed",
2469
2470
  zIndex: "var(--z-dropdown, 500)",
2470
- left: x.left,
2471
- ...k ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
2471
+ left: _.left,
2472
+ ...k ? { bottom: window.innerHeight - _.top + 4, top: "auto" } : { top: _.bottom + 4, bottom: "auto" }
2472
2473
  });
2473
2474
  };
2474
2475
  C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
2475
- const X = (x) => {
2476
+ const X = (_) => {
2476
2477
  var N, k;
2477
- !((N = p.current) != null && N.contains(x.target)) && !((k = u.current) != null && k.contains(x.target)) && f(!1);
2478
- }, U = (x) => {
2479
- x.key === "Escape" && f(!1);
2478
+ !((N = p.current) != null && N.contains(_.target)) && !((k = m.current) != null && k.contains(_.target)) && u(!1);
2479
+ }, U = (_) => {
2480
+ _.key === "Escape" && u(!1);
2480
2481
  };
2481
2482
  return document.addEventListener("mousedown", X), document.addEventListener("keydown", U), () => {
2482
2483
  window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", U);
2483
2484
  };
2484
2485
  }, [d]);
2485
2486
  const A = (b) => {
2486
- n == null || n(b), f(!1);
2487
+ n == null || n(b), u(!1);
2487
2488
  }, Y = (b) => /* @__PURE__ */ e.jsxs(
2488
2489
  "button",
2489
2490
  {
@@ -2506,8 +2507,8 @@ function zt({
2506
2507
  /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": b, children: b.charAt(0).toUpperCase() + b.slice(1) }, `lbl-${b}`),
2507
2508
  ...C.map(Y)
2508
2509
  ] : [];
2509
- }), F = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu", style: _, children: [
2510
- r && R && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2510
+ }), F = d && /* @__PURE__ */ e.jsxs("div", { ref: m, className: "ds-model-picker__menu", style: x, children: [
2511
+ r && S && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2511
2512
  /* @__PURE__ */ e.jsxs(
2512
2513
  "button",
2513
2514
  {
@@ -2533,7 +2534,7 @@ function zt({
2533
2534
  {
2534
2535
  ref: p,
2535
2536
  className: ["ds-model-picker", l].filter(Boolean).join(" "),
2536
- ...m,
2537
+ ...f,
2537
2538
  children: [
2538
2539
  /* @__PURE__ */ e.jsxs(
2539
2540
  "button",
@@ -2541,7 +2542,7 @@ function zt({
2541
2542
  ref: h,
2542
2543
  type: "button",
2543
2544
  className: "ds-model-picker__trigger",
2544
- onClick: () => f((b) => !b),
2545
+ onClick: () => u((b) => !b),
2545
2546
  "aria-haspopup": "listbox",
2546
2547
  "aria-expanded": d,
2547
2548
  children: [
@@ -2576,25 +2577,25 @@ function Ot({
2576
2577
  maxVisible: i = 5,
2577
2578
  onSourceClick: a
2578
2579
  }) {
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(" ");
2580
+ const [r, o] = D(!1), l = Ms(s), f = l.length > i, d = r ? l : l.slice(0, i), u = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2580
2581
  return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2581
2582
  d.map((h) => {
2582
- const u = h.items.map((v) => v.page).filter(Boolean), _ = !!a;
2583
+ const m = h.items.map((v) => v.page).filter(Boolean), x = !!a;
2583
2584
  return /* @__PURE__ */ e.jsxs(
2584
2585
  "div",
2585
2586
  {
2586
- className: `ds-sources-panel__compact-row${_ ? " ds-sources-panel__compact-row--clickable" : ""}`,
2587
- onClick: _ ? () => a(h.items[0]) : void 0,
2587
+ className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2588
+ onClick: x ? () => a(h.items[0]) : void 0,
2588
2589
  children: [
2589
2590
  /* @__PURE__ */ e.jsx(ns, { size: I[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2590
2591
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2591
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(u) })
2592
+ m.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(m) })
2592
2593
  ]
2593
2594
  },
2594
2595
  h.filename
2595
2596
  );
2596
2597
  }),
2597
- m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2598
+ f && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2598
2599
  "+",
2599
2600
  l.length - i,
2600
2601
  " more sources"
@@ -2602,37 +2603,37 @@ function Ot({
2602
2603
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2603
2604
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2604
2605
  d.map((h) => {
2605
- const u = h.items.map((v) => v.page).filter(Boolean), _ = !!a;
2606
- return f ? /* @__PURE__ */ e.jsx(
2606
+ const m = h.items.map((v) => v.page).filter(Boolean), x = !!a;
2607
+ return u ? /* @__PURE__ */ e.jsx(
2607
2608
  Ee,
2608
2609
  {
2609
- title: /* @__PURE__ */ e.jsx(Bs, { filename: h.filename, pages: u }),
2610
+ title: /* @__PURE__ */ e.jsx(Bs, { filename: h.filename, pages: m }),
2610
2611
  padding: "s",
2611
- children: h.items.map((v, S) => /* @__PURE__ */ e.jsx(
2612
+ children: h.items.map((v, $) => /* @__PURE__ */ e.jsx(
2612
2613
  "div",
2613
2614
  {
2614
- className: `ds-sources-panel__snippet${_ ? " ds-sources-panel__snippet--clickable" : ""}`,
2615
- onClick: _ ? () => a(v) : void 0,
2615
+ className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2616
+ onClick: x ? () => a(v) : void 0,
2616
2617
  children: v.snippet ?? `p. ${v.page}`
2617
2618
  },
2618
- S
2619
+ $
2619
2620
  ))
2620
2621
  },
2621
2622
  h.filename
2622
2623
  ) : /* @__PURE__ */ e.jsxs(
2623
2624
  "div",
2624
2625
  {
2625
- className: `ds-sources-panel__row${_ ? " ds-sources-panel__row--clickable" : ""}`,
2626
- onClick: _ ? () => a(h.items[0]) : void 0,
2626
+ className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
2627
+ onClick: x ? () => a(h.items[0]) : void 0,
2627
2628
  children: [
2628
2629
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2629
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(u) })
2630
+ m.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: ve(m) })
2630
2631
  ]
2631
2632
  },
2632
2633
  h.filename
2633
2634
  );
2634
2635
  }),
2635
- m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2636
+ f && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => o(!0), children: [
2636
2637
  "+",
2637
2638
  l.length - i,
2638
2639
  " more sources"
@@ -2651,7 +2652,7 @@ function Ft({
2651
2652
  warningThreshold: r = 0.8,
2652
2653
  errorThreshold: o = 1
2653
2654
  }) {
2654
- const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= o ? "error" : l >= r ? "warning" : "normal";
2655
+ const l = t > 0 ? s / t : 0, f = Math.min(l * 100, 100), d = l >= o ? "error" : l >= r ? "warning" : "normal";
2655
2656
  return /* @__PURE__ */ e.jsxs(
2656
2657
  "div",
2657
2658
  {
@@ -2664,7 +2665,7 @@ function Ft({
2664
2665
  "div",
2665
2666
  {
2666
2667
  className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
2667
- style: { width: `${m}%` }
2668
+ style: { width: `${f}%` }
2668
2669
  }
2669
2670
  ) }),
2670
2671
  (i || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
@@ -2700,12 +2701,12 @@ function Wt({
2700
2701
  `ds-confidence-bar--${o}`,
2701
2702
  i === "block" && "ds-confidence-bar--block"
2702
2703
  ].filter(Boolean).join(" "), children: [
2703
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Oe }, (l, m) => /* @__PURE__ */ e.jsx(
2704
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Oe }, (l, f) => /* @__PURE__ */ e.jsx(
2704
2705
  "div",
2705
2706
  {
2706
- className: `ds-confidence-bar__seg${m < r ? " ds-confidence-bar__seg--filled" : ""}`
2707
+ className: `ds-confidence-bar__seg${f < r ? " ds-confidence-bar__seg--filled" : ""}`
2707
2708
  },
2708
- m
2709
+ f
2709
2710
  )) }),
2710
2711
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: o })
2711
2712
  ] });
@@ -2732,18 +2733,18 @@ function Ct({
2732
2733
  n && "ds-diff-view--wrap"
2733
2734
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
2734
2735
  if (t === "split") {
2735
- const m = s.filter((f) => f.type === "remove" || f.type === "context"), d = s.filter((f) => f.type === "add" || f.type === "context");
2736
+ const f = s.filter((u) => u.type === "remove" || u.type === "context"), d = s.filter((u) => u.type === "add" || u.type === "context");
2736
2737
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2737
2738
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2738
2739
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body", style: l, children: [
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)) })
2740
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: f.map((u, p) => /* @__PURE__ */ e.jsx(_e, { line: u, lineNumbers: i }, p)) }),
2741
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col", children: d.map((u, p) => /* @__PURE__ */ e.jsx(_e, { line: u, lineNumbers: i }, p)) })
2741
2742
  ] })
2742
2743
  ] });
2743
2744
  }
2744
2745
  return /* @__PURE__ */ e.jsxs("div", { className: o, children: [
2745
2746
  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)) })
2747
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body", style: l, children: s.map((f, d) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: i }, d)) })
2747
2748
  ] });
2748
2749
  }
2749
2750
  function zs({
@@ -2829,17 +2830,17 @@ function Ut({
2829
2830
  className: o = "",
2830
2831
  ...l
2831
2832
  }) {
2832
- const m = s === "assistant" && (a || r), d = !!t, f = n ? Os(n) : null;
2833
- return !m && !d && !f ? null : /* @__PURE__ */ e.jsxs(
2833
+ const f = s === "assistant" && (a || r), d = !!t, u = n ? Os(n) : null;
2834
+ return !f && !d && !u ? null : /* @__PURE__ */ e.jsxs(
2834
2835
  "div",
2835
2836
  {
2836
2837
  className: ["ds-message-footer", `ds-message-footer--${s}`, o].filter(Boolean).join(" "),
2837
2838
  ...l,
2838
2839
  children: [
2839
- s === "user" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f }),
2840
- m && /* @__PURE__ */ e.jsx(zs, { className: "ds-message-action", value: i, onLike: a, onDislike: r }),
2840
+ s === "user" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u }),
2841
+ f && /* @__PURE__ */ e.jsx(zs, { className: "ds-message-action", value: i, onLike: a, onDislike: r }),
2841
2842
  d && /* @__PURE__ */ e.jsx(Ds, { className: "ds-message-action", text: t }),
2842
- s === "assistant" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f })
2843
+ s === "assistant" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u })
2843
2844
  ]
2844
2845
  }
2845
2846
  );