@donkit-ai/design-system 1.4.97 → 1.4.98

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 X, { useMemo as bt, useContext as le, createContext as De, useState as D, useRef as R, useEffect as P, useLayoutEffect as ct, useId as _t, useCallback as ne, forwardRef as dt } from "react";
2
- import { Check as Pe, X as te, ChevronDown as ye, Minus as jt, Plus as Nt, XCircle as Me, AlertTriangle as ze, CheckCircle as Fe, Info as We, ChevronUp as wt, ChevronsUpDown as gt, ChevronLeft as yt, ChevronRight as kt, Copy as Et, Brain as Tt, Loader as $t, Paperclip as Ge, Square as Rt, ArrowUp as St, Zap as At, Cpu as Ke, FileText as Bt, ThumbsUp as It, ThumbsDown as Lt } from "lucide-react";
1
+ import X, { useMemo as _t, useContext as le, createContext as Le, useState as L, useRef as S, useEffect as P, useLayoutEffect as dt, useId as jt, useCallback as ne, forwardRef as ut } from "react";
2
+ import { Check as Pe, X as te, ChevronDown as ye, Minus as Nt, Plus as wt, XCircle as Me, AlertTriangle as Fe, CheckCircle as ze, Info as We, ChevronUp as gt, ChevronsUpDown as yt, ChevronLeft as kt, ChevronRight as Et, Copy as Tt, Brain as $t, Loader as Rt, Paperclip as Ge, Square as St, ArrowUp as At, Zap as Bt, Cpu as Ke, FileText as It, ThumbsUp as Dt, ThumbsDown as Lt } from "lucide-react";
3
3
  import re from "react-dom";
4
4
  const q = {
5
5
  1: 16,
@@ -19,23 +19,23 @@ var Ie = { exports: {} }, we = {};
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
  var Xe;
22
- function Dt() {
22
+ function Pt() {
23
23
  if (Xe) return we;
24
24
  Xe = 1;
25
25
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
26
- function n(r, a, o) {
26
+ function n(r, o, a) {
27
27
  var i = null;
28
- if (o !== void 0 && (i = "" + o), a.key !== void 0 && (i = "" + a.key), "key" in a) {
29
- o = {};
30
- for (var l in a)
31
- l !== "key" && (o[l] = a[l]);
32
- } else o = a;
33
- return a = o.ref, {
28
+ if (a !== void 0 && (i = "" + a), o.key !== void 0 && (i = "" + o.key), "key" in o) {
29
+ a = {};
30
+ for (var l in o)
31
+ l !== "key" && (a[l] = o[l]);
32
+ } else a = o;
33
+ return o = a.ref, {
34
34
  $$typeof: t,
35
35
  type: r,
36
36
  key: i,
37
- ref: a !== void 0 ? a : null,
38
- props: o
37
+ ref: o !== void 0 ? o : null,
38
+ props: a
39
39
  };
40
40
  }
41
41
  return we.Fragment = s, we.jsx = n, we.jsxs = n, we;
@@ -51,23 +51,23 @@ var ge = {};
51
51
  * LICENSE file in the root directory of this source tree.
52
52
  */
53
53
  var Je;
54
- function Pt() {
54
+ function Mt() {
55
55
  return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
56
56
  function t(m) {
57
57
  if (m == null) return null;
58
58
  if (typeof m == "function")
59
- return m.$$typeof === g ? null : m.displayName || m.name || null;
59
+ return m.$$typeof === k ? null : m.displayName || m.name || null;
60
60
  if (typeof m == "string") return m;
61
61
  switch (m) {
62
- case y:
63
- return "Fragment";
64
62
  case T:
63
+ return "Fragment";
64
+ case g:
65
65
  return "Profiler";
66
- case N:
66
+ case j:
67
67
  return "StrictMode";
68
- case w:
68
+ case N:
69
69
  return "Suspense";
70
- case I:
70
+ case B:
71
71
  return "SuspenseList";
72
72
  case O:
73
73
  return "Activity";
@@ -76,16 +76,16 @@ function Pt() {
76
76
  switch (typeof m.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
  ), m.$$typeof) {
79
- case j:
79
+ case w:
80
80
  return "Portal";
81
81
  case x:
82
82
  return m.displayName || "Context";
83
- case A:
83
+ case $:
84
84
  return (m._context.displayName || "Context") + ".Consumer";
85
- case k:
85
+ case y:
86
86
  var b = m.render;
87
87
  return m = m.displayName, m || (m = b.displayName || b.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
88
- case L:
88
+ case D:
89
89
  return b = m.displayName || null, b !== null ? b : t(m.type) || "Memo";
90
90
  case W:
91
91
  b = m._payload, m = m._init;
@@ -108,8 +108,8 @@ function Pt() {
108
108
  }
109
109
  if (b) {
110
110
  b = console;
111
- var B = b.error, U = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
112
- return B.call(
111
+ var I = b.error, U = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
112
+ return I.call(
113
113
  b,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  U
@@ -117,7 +117,7 @@ function Pt() {
117
117
  }
118
118
  }
119
119
  function r(m) {
120
- if (m === y) return "<>";
120
+ if (m === T) return "<>";
121
121
  if (typeof m == "object" && m !== null && m.$$typeof === W)
122
122
  return "<...>";
123
123
  try {
@@ -127,11 +127,11 @@ function Pt() {
127
127
  return "<...>";
128
128
  }
129
129
  }
130
- function a() {
130
+ function o() {
131
131
  var m = C.A;
132
132
  return m === null ? null : m.getOwner();
133
133
  }
134
- function o() {
134
+ function a() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
137
  function i(m) {
@@ -142,30 +142,30 @@ function Pt() {
142
142
  return m.key !== void 0;
143
143
  }
144
144
  function l(m, b) {
145
- function B() {
146
- $ || ($ = !0, console.error(
145
+ function I() {
146
+ R || (R = !0, console.error(
147
147
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
148
148
  b
149
149
  ));
150
150
  }
151
- B.isReactWarning = !0, Object.defineProperty(m, "key", {
152
- get: B,
151
+ I.isReactWarning = !0, Object.defineProperty(m, "key", {
152
+ get: I,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
156
  function c() {
157
157
  var m = t(this.type);
158
- return S[m] || (S[m] = !0, console.error(
158
+ return A[m] || (A[m] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), m = this.props.ref, m !== void 0 ? m : null;
161
161
  }
162
- function u(m, b, B, U, se, ae) {
163
- var G = B.ref;
162
+ function u(m, b, I, U, se, oe) {
163
+ var G = I.ref;
164
164
  return m = {
165
165
  $$typeof: _,
166
166
  type: m,
167
167
  key: b,
168
- props: B,
168
+ props: I,
169
169
  _owner: U
170
170
  }, (G !== void 0 ? G : null) !== null ? Object.defineProperty(m, "ref", {
171
171
  enumerable: !1,
@@ -189,10 +189,10 @@ function Pt() {
189
189
  configurable: !1,
190
190
  enumerable: !1,
191
191
  writable: !0,
192
- value: ae
192
+ value: oe
193
193
  }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
194
194
  }
195
- function d(m, b, B, U, se, ae) {
195
+ function d(m, b, I, U, se, oe) {
196
196
  var G = b.children;
197
197
  if (G !== void 0)
198
198
  if (U)
@@ -223,21 +223,21 @@ React keys must be passed directly to JSX without using spread:
223
223
  G
224
224
  ), Y[G + U] = !0);
225
225
  }
226
- if (G = null, B !== void 0 && (n(B), G = "" + B), i(b) && (n(b.key), G = "" + b.key), "key" in b) {
227
- B = {};
226
+ if (G = null, I !== void 0 && (n(I), G = "" + I), i(b) && (n(b.key), G = "" + b.key), "key" in b) {
227
+ I = {};
228
228
  for (var fe in b)
229
- fe !== "key" && (B[fe] = b[fe]);
230
- } else B = b;
229
+ fe !== "key" && (I[fe] = b[fe]);
230
+ } else I = b;
231
231
  return G && l(
232
- B,
232
+ I,
233
233
  typeof m == "function" ? m.displayName || m.name || "Unknown" : m
234
234
  ), u(
235
235
  m,
236
236
  G,
237
- B,
238
- a(),
237
+ I,
238
+ o(),
239
239
  se,
240
- ae
240
+ oe
241
241
  );
242
242
  }
243
243
  function p(m) {
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
246
246
  function h(m) {
247
247
  return typeof m == "object" && m !== null && m.$$typeof === _;
248
248
  }
249
- var f = X, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), x = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), g = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, V = Array.isArray, v = console.createTask ? console.createTask : function() {
249
+ var f = X, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), x = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, V = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  f = {
@@ -254,34 +254,34 @@ React keys must be passed directly to JSX without using spread:
254
254
  return m();
255
255
  }
256
256
  };
257
- var $, S = {}, z = f.react_stack_bottom_frame.bind(
257
+ var R, A = {}, F = f.react_stack_bottom_frame.bind(
258
258
  f,
259
- o
260
- )(), H = v(r(o)), Y = {};
261
- ge.Fragment = y, ge.jsx = function(m, b, B) {
259
+ a
260
+ )(), H = v(r(a)), Y = {};
261
+ ge.Fragment = T, ge.jsx = function(m, b, I) {
262
262
  var U = 1e4 > C.recentlyCreatedOwnerStacks++;
263
263
  return d(
264
264
  m,
265
265
  b,
266
- B,
266
+ I,
267
267
  !1,
268
- U ? Error("react-stack-top-frame") : z,
268
+ U ? Error("react-stack-top-frame") : F,
269
269
  U ? v(r(m)) : H
270
270
  );
271
- }, ge.jsxs = function(m, b, B) {
271
+ }, ge.jsxs = function(m, b, I) {
272
272
  var U = 1e4 > C.recentlyCreatedOwnerStacks++;
273
273
  return d(
274
274
  m,
275
275
  b,
276
- B,
276
+ I,
277
277
  !0,
278
- U ? Error("react-stack-top-frame") : z,
278
+ U ? Error("react-stack-top-frame") : F,
279
279
  U ? v(r(m)) : H
280
280
  );
281
281
  };
282
282
  }()), ge;
283
283
  }
284
- process.env.NODE_ENV === "production" ? Ie.exports = Dt() : Ie.exports = Pt();
284
+ process.env.NODE_ENV === "production" ? Ie.exports = Pt() : Ie.exports = Mt();
285
285
  var e = Ie.exports;
286
286
  const $e = {
287
287
  // Close / dismiss
@@ -334,22 +334,22 @@ const $e = {
334
334
  // Browser tabs
335
335
  closeTab: "Close {label}"
336
336
  };
337
- function ut(t, s = {}) {
337
+ function ft(t, s = {}) {
338
338
  return typeof t == "function" ? t(s) : typeof t != "string" ? "" : t.replace(
339
339
  /\{(\w+)\}/g,
340
340
  (n, r) => s[r] !== void 0 && s[r] !== null ? String(s[r]) : ""
341
341
  );
342
342
  }
343
- const Oe = De({
343
+ const Oe = Le({
344
344
  strings: $e,
345
- t: (t, s) => ut($e[t] ?? t, s)
345
+ t: (t, s) => ft($e[t] ?? t, s)
346
346
  });
347
- function Ts({ strings: t, children: s }) {
348
- const n = bt(() => {
347
+ function Rs({ strings: t, children: s }) {
348
+ const n = _t(() => {
349
349
  const r = { ...$e, ...t };
350
350
  return {
351
351
  strings: r,
352
- t: (a, o) => ut(r[a] ?? $e[a] ?? a, o)
352
+ t: (o, a) => ft(r[o] ?? $e[o] ?? o, a)
353
353
  };
354
354
  }, [t]);
355
355
  return /* @__PURE__ */ e.jsx(Oe.Provider, { value: n, children: s });
@@ -360,15 +360,15 @@ function be() {
360
360
  function K() {
361
361
  return le(Oe).strings;
362
362
  }
363
- function Mt({ size: t = "m", color: s = "default", className: n = "", "aria-label": r, ...a }) {
364
- const o = K();
363
+ function Ft({ size: t = "m", color: s = "default", className: n = "", "aria-label": r, ...o }) {
364
+ const a = K();
365
365
  return /* @__PURE__ */ e.jsx(
366
366
  "span",
367
367
  {
368
368
  className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${s}`, n].filter(Boolean).join(" "),
369
369
  role: "status",
370
- "aria-label": r ?? o.loading,
371
- ...a
370
+ "aria-label": r ?? a.loading,
371
+ ...o
372
372
  }
373
373
  );
374
374
  }
@@ -378,8 +378,8 @@ function de({
378
378
  variant: s = "primary",
379
379
  size: n = "m",
380
380
  fullWidth: r = !1,
381
- icon: a,
382
- disabled: o = !1,
381
+ icon: o,
382
+ disabled: a = !1,
383
383
  state: i = "idle",
384
384
  /**
385
385
  * Toggle-on / latched look (filters, view switch, toolbar).
@@ -395,22 +395,22 @@ function de({
395
395
  "aria-label": h,
396
396
  "aria-pressed": f,
397
397
  className: _ = "",
398
- ...j
398
+ ...w
399
399
  }) {
400
- const y = a && !t, N = i === "loading", T = i === "success", A = i === "error", x = N || T || A, k = !!(l || c), w = n === "xs" ? "s" : "m", I = s === "danger" ? "on-accent" : "default", L = zt[n] ?? 16, W = N ? /* @__PURE__ */ e.jsx(Mt, { size: w, color: I }) : T ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: L, strokeWidth: 2.5 }) }) : A ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(te, { size: L, strokeWidth: 2.5 }) }) : null, O = [
400
+ const T = o && !t, j = i === "loading", g = i === "success", $ = i === "error", x = j || g || $, y = !!(l || c), N = n === "xs" ? "s" : "m", B = s === "danger" ? "on-accent" : "default", D = zt[n] ?? 16, W = j ? /* @__PURE__ */ e.jsx(Ft, { size: N, color: B }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: D, strokeWidth: 2.5 }) }) : $ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(te, { size: D, strokeWidth: 2.5 }) }) : null, O = [
401
401
  "ds-button",
402
402
  `ds-button--${s}`,
403
403
  `ds-button--${n}`,
404
404
  r && "ds-button--full",
405
- y && "ds-button--icon-only",
405
+ T && "ds-button--icon-only",
406
406
  _
407
- ].filter(Boolean).join(" "), g = i !== "idle" ? i : void 0, C = f !== void 0 ? f : k ? !0 : void 0, M = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
408
- x ? W : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
407
+ ].filter(Boolean).join(" "), k = i !== "idle" ? i : void 0, C = f !== void 0 ? f : y ? !0 : void 0, M = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
408
+ x ? W : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
409
409
  t
410
410
  ] });
411
411
  if (p) {
412
412
  const V = (v) => {
413
- if (o || N) {
413
+ if (a || j) {
414
414
  v.preventDefault();
415
415
  return;
416
416
  }
@@ -420,15 +420,15 @@ function de({
420
420
  "a",
421
421
  {
422
422
  className: O,
423
- href: o || N ? void 0 : p,
423
+ href: a || j ? void 0 : p,
424
424
  onClick: V,
425
425
  "aria-label": h,
426
- "aria-disabled": o || N ? "true" : void 0,
427
- "aria-busy": N ? "true" : void 0,
426
+ "aria-disabled": a || j ? "true" : void 0,
427
+ "aria-busy": j ? "true" : void 0,
428
428
  "aria-pressed": C,
429
- "data-state": g,
430
- "data-active": k ? "true" : void 0,
431
- ...j,
429
+ "data-state": k,
430
+ "data-active": y ? "true" : void 0,
431
+ ...w,
432
432
  children: M
433
433
  }
434
434
  );
@@ -438,25 +438,25 @@ function de({
438
438
  {
439
439
  type: d,
440
440
  className: O,
441
- disabled: o,
442
- onClick: N ? void 0 : u,
441
+ disabled: a,
442
+ onClick: j ? void 0 : u,
443
443
  "aria-label": h,
444
- "aria-busy": N ? "true" : void 0,
444
+ "aria-busy": j ? "true" : void 0,
445
445
  "aria-pressed": C,
446
- "data-state": g,
447
- "data-active": k ? "true" : void 0,
448
- ...j,
446
+ "data-state": k,
447
+ "data-active": y ? "true" : void 0,
448
+ ...w,
449
449
  children: M
450
450
  }
451
451
  );
452
452
  }
453
- function $s({
453
+ function Ss({
454
454
  label: t,
455
455
  error: s,
456
456
  hint: n,
457
457
  fullWidth: r = !0,
458
- icon: a,
459
- iconRight: o,
458
+ icon: o,
459
+ iconRight: a,
460
460
  onIconRightClick: i,
461
461
  size: l = "m",
462
462
  disabled: c,
@@ -464,23 +464,23 @@ function $s({
464
464
  iconRightLabel: d,
465
465
  ...p
466
466
  }) {
467
- const h = K(), f = u || `input-${X.useId()}`, _ = n ? `${f}-hint` : void 0, j = s ? `${f}-error` : void 0, y = j || _;
467
+ const h = K(), f = u || `input-${X.useId()}`, _ = n ? `${f}-hint` : void 0, w = s ? `${f}-error` : void 0, T = w || _;
468
468
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
469
469
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: t }),
470
470
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
471
- a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
471
+ o && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: o }),
472
472
  /* @__PURE__ */ e.jsx(
473
473
  "input",
474
474
  {
475
475
  id: f,
476
- className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
476
+ className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
477
477
  disabled: c,
478
478
  "aria-invalid": s ? "true" : "false",
479
- "aria-describedby": y,
479
+ "aria-describedby": T,
480
480
  ...p
481
481
  }
482
482
  ),
483
- o && /* @__PURE__ */ e.jsx(
483
+ a && /* @__PURE__ */ e.jsx(
484
484
  "button",
485
485
  {
486
486
  type: "button",
@@ -488,35 +488,35 @@ function $s({
488
488
  onClick: i,
489
489
  tabIndex: -1,
490
490
  "aria-label": d ?? h.toggleVisibility,
491
- children: o
491
+ children: a
492
492
  }
493
493
  )
494
494
  ] }),
495
495
  n && !s && /* @__PURE__ */ e.jsx("span", { id: _, className: "ds-input-hint", children: n }),
496
- /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: j, className: "ds-input-error", role: "alert", children: s }) }) })
496
+ /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: w, className: "ds-input-error", role: "alert", children: s }) }) })
497
497
  ] });
498
498
  }
499
- function Rs({
499
+ function As({
500
500
  label: t,
501
501
  error: s,
502
502
  hint: n,
503
503
  fullWidth: r = !0,
504
- size: a = "m",
505
- disabled: o,
504
+ size: o = "m",
505
+ disabled: a,
506
506
  id: i,
507
507
  resize: l = !0,
508
508
  rows: c = 3,
509
509
  ...u
510
510
  }) {
511
511
  const d = i || `textarea-${X.useId()}`, p = n ? `${d}-hint` : void 0, h = s ? `${d}-error` : void 0, f = h || p;
512
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
512
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
513
513
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
514
514
  /* @__PURE__ */ e.jsx(
515
515
  "textarea",
516
516
  {
517
517
  id: d,
518
- className: `ds-textarea ds-textarea--${a} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
519
- disabled: o,
518
+ className: `ds-textarea ds-textarea--${o} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
519
+ disabled: a,
520
520
  "aria-invalid": s ? "true" : "false",
521
521
  "aria-describedby": f,
522
522
  rows: c,
@@ -527,71 +527,71 @@ function Rs({
527
527
  s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
528
528
  ] });
529
529
  }
530
- function Ss({
530
+ function Bs({
531
531
  label: t,
532
532
  value: s,
533
533
  onChange: n,
534
534
  options: r = [],
535
- placeholder: a,
536
- error: o,
535
+ placeholder: o,
536
+ error: a,
537
537
  fullWidth: i = !0,
538
538
  size: l = "m",
539
539
  disabled: c = !1,
540
540
  id: u,
541
541
  ...d
542
542
  }) {
543
- const p = K(), h = a ?? p.selectOption, [f, _] = D(!1), [j, y] = D(!1), [N, T] = D({}), [A, x] = D("down"), [k, w] = D(-1), I = R(null), L = R(null), W = R(null), O = R(null), g = u || `select-${X.useId()}`, C = `${g}-label`, M = o ? `${g}-error` : void 0, V = 150, v = (b = !1) => {
544
- j || (y(!0), w(-1), O.current = setTimeout(() => {
545
- var B;
546
- _(!1), y(!1), b && ((B = W.current) == null || B.focus());
543
+ const p = K(), h = o ?? p.selectOption, [f, _] = L(!1), [w, T] = L(!1), [j, g] = L({}), [$, x] = L("down"), [y, N] = L(-1), B = S(null), D = S(null), W = S(null), O = S(null), k = u || `select-${X.useId()}`, C = `${k}-label`, M = a ? `${k}-error` : void 0, V = 150, v = (b = !1) => {
544
+ w || (T(!0), N(-1), O.current = setTimeout(() => {
545
+ var I;
546
+ _(!1), T(!1), b && ((I = W.current) == null || I.focus());
547
547
  }, V));
548
- }, $ = (b) => {
549
- clearTimeout(O.current), y(!1);
550
- const B = b !== void 0 ? b : Math.max(r.findIndex((U) => U.value === s), 0);
551
- w(B), _(!0);
548
+ }, R = (b) => {
549
+ clearTimeout(O.current), T(!1);
550
+ const I = b !== void 0 ? b : Math.max(r.findIndex((U) => U.value === s), 0);
551
+ N(I), _(!0);
552
552
  };
553
553
  P(() => () => clearTimeout(O.current), []);
554
- const S = () => {
554
+ const A = () => {
555
555
  var Q;
556
- const b = (Q = I.current) == null ? void 0 : Q.getBoundingClientRect();
556
+ const b = (Q = B.current) == null ? void 0 : Q.getBoundingClientRect();
557
557
  if (!b) return;
558
- const B = window.innerHeight, U = B - b.bottom, se = b.top, G = U < 300 && se > U;
559
- x(G ? "up" : "down"), T(
560
- G ? { bottom: B - b.top + 4, left: b.left, width: b.width } : { top: b.bottom + 4, left: b.left, width: b.width }
558
+ const I = window.innerHeight, U = I - b.bottom, se = b.top, G = U < 300 && se > U;
559
+ x(G ? "up" : "down"), g(
560
+ G ? { bottom: I - b.top + 4, left: b.left, width: b.width } : { top: b.bottom + 4, left: b.left, width: b.width }
561
561
  );
562
562
  };
563
563
  P(() => {
564
564
  if (f)
565
- return S(), window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
566
- window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
565
+ return A(), window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
566
+ window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
567
567
  };
568
568
  }, [f]), P(() => {
569
- const b = (B) => {
570
- I.current && !I.current.contains(B.target) && L.current && !L.current.contains(B.target) && v();
569
+ const b = (I) => {
570
+ B.current && !B.current.contains(I.target) && D.current && !D.current.contains(I.target) && v();
571
571
  };
572
572
  return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
573
- }, [j]), P(() => {
574
- var B;
575
- if (!f || k < 0 || !L.current) return;
576
- (B = L.current.querySelectorAll(".ds-select-option")[k]) == null || B.scrollIntoView({ block: "nearest" });
577
- }, [k, f]);
578
- const z = (b) => {
573
+ }, [w]), P(() => {
574
+ var I;
575
+ if (!f || y < 0 || !D.current) return;
576
+ (I = D.current.querySelectorAll(".ds-select-option")[y]) == null || I.scrollIntoView({ block: "nearest" });
577
+ }, [y, f]);
578
+ const F = (b) => {
579
579
  switch (b.key) {
580
580
  case "ArrowDown":
581
- b.preventDefault(), f ? w((B) => Math.min(B + 1, r.length - 1)) : $();
581
+ b.preventDefault(), f ? N((I) => Math.min(I + 1, r.length - 1)) : R();
582
582
  break;
583
583
  case "ArrowUp":
584
- b.preventDefault(), f ? w((B) => Math.max(B - 1, 0)) : $(r.length - 1);
584
+ b.preventDefault(), f ? N((I) => Math.max(I - 1, 0)) : R(r.length - 1);
585
585
  break;
586
586
  case "Home":
587
- f && (b.preventDefault(), w(0));
587
+ f && (b.preventDefault(), N(0));
588
588
  break;
589
589
  case "End":
590
- f && (b.preventDefault(), w(r.length - 1));
590
+ f && (b.preventDefault(), N(r.length - 1));
591
591
  break;
592
592
  case "Enter":
593
593
  case " ":
594
- b.preventDefault(), f ? k >= 0 && (n == null || n(r[k].value), v(!0)) : $();
594
+ b.preventDefault(), f ? y >= 0 && (n == null || n(r[y].value), v(!0)) : R();
595
595
  break;
596
596
  case "Escape":
597
597
  f && (b.preventDefault(), v(!0));
@@ -603,7 +603,7 @@ function Ss({
603
603
  }, H = r.find((b) => b.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = f && /* @__PURE__ */ e.jsx(
604
604
  "div",
605
605
  {
606
- ref: L,
606
+ ref: D,
607
607
  "data-ds-portal": "",
608
608
  role: "listbox",
609
609
  "aria-labelledby": t ? C : void 0,
@@ -611,14 +611,14 @@ function Ss({
611
611
  className: [
612
612
  "ds-select-dropdown ds-scrollable",
613
613
  `ds-select-dropdown--${l}`,
614
- `ds-select-dropdown--${A}`,
615
- j && "ds-select-dropdown--closing"
614
+ `ds-select-dropdown--${$}`,
615
+ w && "ds-select-dropdown--closing"
616
616
  ].filter(Boolean).join(" "),
617
- style: N,
618
- children: r.map((b, B) => /* @__PURE__ */ e.jsx(
617
+ style: j,
618
+ children: r.map((b, I) => /* @__PURE__ */ e.jsx(
619
619
  "button",
620
620
  {
621
- id: `${g}-opt-${B}`,
621
+ id: `${k}-opt-${I}`,
622
622
  type: "button",
623
623
  role: "option",
624
624
  tabIndex: -1,
@@ -627,7 +627,7 @@ function Ss({
627
627
  "ds-select-option",
628
628
  `ds-select-option--${l}`,
629
629
  s === b.value && "ds-select-option--selected",
630
- B === k && "ds-select-option--active"
630
+ I === y && "ds-select-option--active"
631
631
  ].filter(Boolean).join(" "),
632
632
  onClick: () => {
633
633
  n == null || n(b.value), v(!0);
@@ -640,24 +640,24 @@ function Ss({
640
640
  );
641
641
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
642
642
  t && /* @__PURE__ */ e.jsx("label", { id: C, className: "ds-select-label", children: t }),
643
- /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: I, children: /* @__PURE__ */ e.jsxs(
643
+ /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: B, children: /* @__PURE__ */ e.jsxs(
644
644
  "button",
645
645
  {
646
646
  ref: W,
647
647
  type: "button",
648
- id: g,
648
+ id: k,
649
649
  role: "combobox",
650
650
  "aria-haspopup": "listbox",
651
651
  "aria-expanded": f,
652
- "aria-activedescendant": f && k >= 0 ? `${g}-opt-${k}` : void 0,
652
+ "aria-activedescendant": f && y >= 0 ? `${k}-opt-${y}` : void 0,
653
653
  "aria-labelledby": t ? C : void 0,
654
- "aria-invalid": o ? "true" : "false",
654
+ "aria-invalid": a ? "true" : "false",
655
655
  "aria-describedby": M,
656
- className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
656
+ className: `ds-select-trigger ds-select-trigger--${l} ${a ? "ds-select-trigger--error" : ""}`,
657
657
  onClick: () => {
658
- c || (f ? v() : $());
658
+ c || (f ? v() : R());
659
659
  },
660
- onKeyDown: z,
660
+ onKeyDown: F,
661
661
  disabled: c,
662
662
  ...d,
663
663
  children: [
@@ -667,24 +667,24 @@ function Ss({
667
667
  {
668
668
  size: Y,
669
669
  strokeWidth: 1.5,
670
- className: `ds-select-icon ${f && A === "down" ? "ds-select-icon--open" : ""} ${f && A === "up" ? "ds-select-icon--up" : ""}`,
670
+ className: `ds-select-icon ${f && $ === "down" ? "ds-select-icon--open" : ""} ${f && $ === "up" ? "ds-select-icon--up" : ""}`,
671
671
  "aria-hidden": "true"
672
672
  }
673
673
  )
674
674
  ]
675
675
  }
676
676
  ) }),
677
- o && /* @__PURE__ */ e.jsx("span", { id: M, className: "ds-select-error", role: "alert", children: o }),
677
+ a && /* @__PURE__ */ e.jsx("span", { id: M, className: "ds-select-error", role: "alert", children: a }),
678
678
  typeof document < "u" && re.createPortal(m, document.body)
679
679
  ] });
680
680
  }
681
- function As({
681
+ function Is({
682
682
  label: t,
683
683
  value: s = 0,
684
684
  onChange: n,
685
685
  min: r = 0,
686
- max: a = 100,
687
- step: o = 1,
686
+ max: o = 100,
687
+ step: a = 1,
688
688
  size: i = "m",
689
689
  disabled: l = !1,
690
690
  hint: c,
@@ -695,45 +695,45 @@ function As({
695
695
  }) {
696
696
  const f = K(), _ = () => {
697
697
  if (l) return;
698
- const x = Math.min(Number(s) + o, a);
698
+ const x = Math.min(Number(s) + a, o);
699
699
  n == null || n(x);
700
- }, j = () => {
700
+ }, w = () => {
701
701
  if (l) return;
702
- const x = Math.max(Number(s) - o, r);
702
+ const x = Math.max(Number(s) - a, r);
703
703
  n == null || n(x);
704
- }, y = (x) => {
704
+ }, T = (x) => {
705
705
  if (l) return;
706
- const k = x.target.value;
707
- if (k === "") {
706
+ const y = x.target.value;
707
+ if (y === "") {
708
708
  n == null || n(r);
709
709
  return;
710
710
  }
711
- const w = Number(k);
712
- if (!isNaN(w)) {
713
- const I = Math.min(Math.max(w, r), a);
714
- n == null || n(I);
711
+ const N = Number(y);
712
+ if (!isNaN(N)) {
713
+ const B = Math.min(Math.max(N, r), o);
714
+ n == null || n(B);
715
715
  }
716
- }, N = [
716
+ }, j = [
717
717
  "ds-stepper-wrapper",
718
718
  l && "ds-stepper-wrapper--disabled",
719
719
  u && "ds-stepper-wrapper--error"
720
- ].filter(Boolean).join(" "), T = [
720
+ ].filter(Boolean).join(" "), g = [
721
721
  "ds-stepper",
722
722
  `ds-stepper--${i}`,
723
723
  l && "ds-stepper--disabled"
724
- ].filter(Boolean).join(" "), A = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
725
- return /* @__PURE__ */ e.jsxs("div", { className: N, children: [
724
+ ].filter(Boolean).join(" "), $ = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
725
+ return /* @__PURE__ */ e.jsxs("div", { className: j, children: [
726
726
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
727
- /* @__PURE__ */ e.jsxs("div", { className: T, children: [
727
+ /* @__PURE__ */ e.jsxs("div", { className: g, children: [
728
728
  /* @__PURE__ */ e.jsx(
729
729
  "button",
730
730
  {
731
731
  type: "button",
732
732
  className: "ds-stepper-button ds-stepper-button--minus",
733
- onClick: j,
733
+ onClick: w,
734
734
  disabled: l || s <= r,
735
735
  "aria-label": d ?? f.decrease,
736
- children: /* @__PURE__ */ e.jsx(jt, { size: A, strokeWidth: 1.5 })
736
+ children: /* @__PURE__ */ e.jsx(Nt, { size: $, strokeWidth: 1.5 })
737
737
  }
738
738
  ),
739
739
  /* @__PURE__ */ e.jsx(
@@ -742,10 +742,10 @@ function As({
742
742
  type: "number",
743
743
  className: "ds-stepper-input",
744
744
  value: s,
745
- onChange: y,
745
+ onChange: T,
746
746
  min: r,
747
- max: a,
748
- step: o,
747
+ max: o,
748
+ step: a,
749
749
  disabled: l,
750
750
  ...h
751
751
  }
@@ -756,9 +756,9 @@ function As({
756
756
  type: "button",
757
757
  className: "ds-stepper-button ds-stepper-button--plus",
758
758
  onClick: _,
759
- disabled: l || s >= a,
759
+ disabled: l || s >= o,
760
760
  "aria-label": p ?? f.increase,
761
- children: /* @__PURE__ */ e.jsx(Nt, { size: A, strokeWidth: 1.5 })
761
+ children: /* @__PURE__ */ e.jsx(wt, { size: $, strokeWidth: 1.5 })
762
762
  }
763
763
  )
764
764
  ] }),
@@ -766,37 +766,37 @@ function As({
766
766
  u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
767
767
  ] });
768
768
  }
769
- function Bs({
769
+ function Ds({
770
770
  children: t,
771
771
  padding: s = "m",
772
772
  variant: n = "default",
773
773
  hover: r = !1,
774
774
  // deprecated, use variant="interactive"
775
- onClick: a,
776
- href: o,
775
+ onClick: o,
776
+ href: a,
777
777
  disabled: i = !1,
778
778
  className: l = "",
779
779
  ...c
780
780
  }) {
781
- const d = (r ? "interactive" : n) === "interactive" || a || o, p = [
781
+ const d = (r ? "interactive" : n) === "interactive" || o || a, p = [
782
782
  "ds-card",
783
783
  `ds-card--${s}`,
784
784
  d && "ds-card--interactive",
785
785
  l
786
786
  ].filter(Boolean).join(" ");
787
- if (o) {
788
- const _ = (j) => {
787
+ if (a) {
788
+ const _ = (w) => {
789
789
  if (i) {
790
- j.preventDefault();
790
+ w.preventDefault();
791
791
  return;
792
792
  }
793
- j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), a == null || a(j));
793
+ w.metaKey || w.ctrlKey || w.button === 1 || (w.preventDefault(), o == null || o(w));
794
794
  };
795
795
  return /* @__PURE__ */ e.jsx(
796
796
  "a",
797
797
  {
798
798
  className: p,
799
- href: i ? void 0 : o,
799
+ href: i ? void 0 : a,
800
800
  onClick: _,
801
801
  "aria-disabled": i ? "true" : void 0,
802
802
  ...c,
@@ -804,41 +804,41 @@ function Bs({
804
804
  }
805
805
  );
806
806
  }
807
- const h = d && a ? "button" : "div", f = d && a ? {
807
+ const h = d && o ? "button" : "div", f = d && o ? {
808
808
  type: "button",
809
- onClick: a,
809
+ onClick: o,
810
810
  disabled: i
811
811
  } : {};
812
812
  return /* @__PURE__ */ e.jsx(
813
813
  h,
814
814
  {
815
815
  className: p,
816
- role: d && !a ? "article" : void 0,
816
+ role: d && !o ? "article" : void 0,
817
817
  ...f,
818
818
  ...c,
819
819
  children: t
820
820
  }
821
821
  );
822
822
  }
823
- function Is({ children: t, ...s }) {
823
+ function Ls({ children: t, ...s }) {
824
824
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
825
825
  }
826
- function Ls({ children: t, ...s }) {
826
+ function Ps({ children: t, ...s }) {
827
827
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
828
828
  }
829
- function Ds({ children: t, ...s }) {
829
+ function Ms({ children: t, ...s }) {
830
830
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
831
831
  }
832
- function Ps({ children: t, ...s }) {
832
+ function Fs({ children: t, ...s }) {
833
833
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
834
834
  }
835
- function Ms({ children: t, secondary: s = !1, ...n }) {
835
+ function zs({ children: t, secondary: s = !1, ...n }) {
836
836
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
837
837
  }
838
- function Ft({ children: t, secondary: s = !1, ...n }) {
838
+ function Wt({ children: t, secondary: s = !1, ...n }) {
839
839
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
840
840
  }
841
- function ft({ children: t, secondary: s = !1, ...n }) {
841
+ function mt({ children: t, secondary: s = !1, ...n }) {
842
842
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
843
843
  }
844
844
  function he({
@@ -846,48 +846,48 @@ function he({
846
846
  variant: s = "default",
847
847
  size: n = "m",
848
848
  role: r,
849
- ...a
849
+ ...o
850
850
  }) {
851
- const o = [
851
+ const a = [
852
852
  "ds-badge",
853
853
  `ds-badge--${s}`,
854
854
  `ds-badge--${n}`
855
855
  ].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
856
- return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...a, children: t });
856
+ return /* @__PURE__ */ e.jsx("span", { className: a, role: i, ...o, children: t });
857
857
  }
858
- const Wt = {
858
+ const Ot = {
859
859
  info: We,
860
- success: Fe,
861
- warning: ze,
860
+ success: ze,
861
+ warning: Fe,
862
862
  error: Me
863
- }, zs = X.forwardRef(function({
863
+ }, Ws = X.forwardRef(function({
864
864
  children: s,
865
865
  variant: n = "info",
866
866
  title: r,
867
- onClose: a,
868
- role: o,
867
+ onClose: o,
868
+ role: a,
869
869
  closeLabel: i,
870
870
  ...l
871
871
  }, c) {
872
- const u = K(), d = Wt[n], p = o || (n === "error" ? "alert" : "status");
872
+ const u = K(), d = Ot[n], p = a || (n === "error" ? "alert" : "status");
873
873
  return /* @__PURE__ */ e.jsxs("div", { ref: c, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: p, ...l, children: [
874
874
  d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: q[3], strokeWidth: 1.5 }) }),
875
875
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
876
876
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
877
877
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
878
878
  ] }),
879
- a && /* @__PURE__ */ e.jsx(
879
+ o && /* @__PURE__ */ e.jsx(
880
880
  "button",
881
881
  {
882
882
  type: "button",
883
883
  className: "ds-alert__close",
884
- onClick: a,
884
+ onClick: o,
885
885
  "aria-label": i ?? u.closeAlert,
886
886
  children: /* @__PURE__ */ e.jsx(te, { size: q[3], strokeWidth: 1.5 })
887
887
  }
888
888
  )
889
889
  ] });
890
- }), Ot = "data-ds-portal";
890
+ }), Ct = "data-ds-portal";
891
891
  function Ce(t) {
892
892
  var n;
893
893
  const s = ((n = t.composedPath) == null ? void 0 : n.call(t)[0]) ?? t.target;
@@ -895,38 +895,38 @@ function Ce(t) {
895
895
  }
896
896
  function Ue(t, s) {
897
897
  var r;
898
- const n = (r = t == null ? void 0 : t.closest) == null ? void 0 : r.call(t, `[${Ot}]`);
898
+ const n = (r = t == null ? void 0 : t.closest) == null ? void 0 : r.call(t, `[${Ct}]`);
899
899
  return !!(n && n !== s);
900
900
  }
901
- const Ct = 200;
902
- function Fs({
901
+ const Ut = 200;
902
+ function Os({
903
903
  children: t,
904
904
  title: s,
905
905
  onClose: n,
906
906
  size: r = "m",
907
- scrollable: a = !1,
908
- subHeader: o,
907
+ scrollable: o = !1,
908
+ subHeader: a,
909
909
  closeLabel: i,
910
910
  ...l
911
911
  }) {
912
- const c = K(), u = R(null), d = R(null), p = X.useId(), [h, f] = D(!1), _ = R(null), j = () => {
912
+ const c = K(), u = S(null), d = S(null), p = X.useId(), [h, f] = L(!1), _ = S(null), w = () => {
913
913
  !n || h || (f(!0), _.current = setTimeout(() => {
914
914
  f(!1), n();
915
- }, Ct));
915
+ }, Ut));
916
916
  };
917
917
  P(() => () => clearTimeout(_.current), []), P(() => {
918
- const x = (w) => {
919
- w.key === "Escape" && j();
920
- }, k = (w) => {
921
- var L;
922
- const I = Ce(w);
923
- I && ((L = d.current) != null && L.contains(I) || Ue(I, u.current) || j());
918
+ const x = (N) => {
919
+ N.key === "Escape" && w();
920
+ }, y = (N) => {
921
+ var D;
922
+ const B = Ce(N);
923
+ B && ((D = d.current) != null && D.contains(B) || Ue(B, u.current) || w());
924
924
  };
925
- return document.addEventListener("keydown", x), document.addEventListener("mousedown", k), () => {
926
- document.removeEventListener("keydown", x), document.removeEventListener("mousedown", k);
925
+ return document.addEventListener("keydown", x), document.addEventListener("mousedown", y), () => {
926
+ document.removeEventListener("keydown", x), document.removeEventListener("mousedown", y);
927
927
  };
928
928
  }, [n, h]);
929
- const y = X.Children.toArray(t), N = y.find((x) => (x == null ? void 0 : x.type) === xe), T = y.filter((x) => (x == null ? void 0 : x.type) !== xe), A = /* @__PURE__ */ e.jsx(
929
+ const T = X.Children.toArray(t), j = T.find((x) => (x == null ? void 0 : x.type) === xe), g = T.filter((x) => (x == null ? void 0 : x.type) !== xe), $ = /* @__PURE__ */ e.jsx(
930
930
  "div",
931
931
  {
932
932
  className: ["ds-modal-overlay", h && "ds-modal-overlay--closing"].filter(Boolean).join(" "),
@@ -936,7 +936,7 @@ function Fs({
936
936
  children: /* @__PURE__ */ e.jsxs(
937
937
  "div",
938
938
  {
939
- className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
939
+ className: [`ds-modal ds-modal--${r}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
940
940
  "data-surface": "2",
941
941
  ref: d,
942
942
  role: "dialog",
@@ -950,57 +950,57 @@ function Fs({
950
950
  variant: "ghost",
951
951
  size: "small",
952
952
  icon: /* @__PURE__ */ e.jsx(te, { size: q[2], strokeWidth: 1.5 }),
953
- onClick: j,
953
+ onClick: w,
954
954
  "aria-label": i ?? c.closeModal
955
955
  }
956
956
  ),
957
- (s || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
957
+ (s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
958
958
  s && /* @__PURE__ */ e.jsx("h3", { id: p, className: "ds-modal__title", children: s }),
959
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
959
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: a })
960
960
  ] }),
961
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: T }),
962
- N
961
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: g }),
962
+ j
963
963
  ]
964
964
  }
965
965
  )
966
966
  }
967
967
  );
968
- return typeof document > "u" ? A : re.createPortal(A, document.body);
968
+ return typeof document > "u" ? $ : re.createPortal($, document.body);
969
969
  }
970
970
  function xe({ children: t }) {
971
971
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
972
972
  }
973
- const Ut = 320;
974
- function Ws({
973
+ const Ht = 320;
974
+ function Cs({
975
975
  children: t,
976
976
  title: s,
977
977
  onClose: n,
978
978
  subHeader: r,
979
- closeLabel: a,
980
- ...o
979
+ closeLabel: o,
980
+ ...a
981
981
  }) {
982
- const i = K(), l = R(null), c = R(null), u = X.useId(), [d, p] = D(!1), h = R(null), f = () => {
982
+ const i = K(), l = S(null), c = S(null), u = X.useId(), [d, p] = L(!1), h = S(null), f = () => {
983
983
  !n || d || (p(!0), h.current = setTimeout(() => {
984
984
  p(!1), n();
985
- }, Ut));
985
+ }, Ht));
986
986
  };
987
987
  P(() => () => clearTimeout(h.current), []), P(() => {
988
- const T = (x) => {
988
+ const g = (x) => {
989
989
  x.key === "Escape" && f();
990
- }, A = (x) => {
991
- var w;
992
- const k = Ce(x);
993
- k && ((w = c.current) != null && w.contains(k) || Ue(k, l.current) || f());
990
+ }, $ = (x) => {
991
+ var N;
992
+ const y = Ce(x);
993
+ y && ((N = c.current) != null && N.contains(y) || Ue(y, l.current) || f());
994
994
  };
995
- return document.addEventListener("keydown", T), document.addEventListener("mousedown", A), () => {
996
- document.removeEventListener("keydown", T), document.removeEventListener("mousedown", A);
995
+ return document.addEventListener("keydown", g), document.addEventListener("mousedown", $), () => {
996
+ document.removeEventListener("keydown", g), document.removeEventListener("mousedown", $);
997
997
  };
998
998
  }, [n, d]);
999
- const _ = X.Children.toArray(t), j = _.find((T) => (T == null ? void 0 : T.type) === xe), y = _.filter((T) => (T == null ? void 0 : T.type) !== xe), N = /* @__PURE__ */ e.jsx(
999
+ const _ = X.Children.toArray(t), w = _.find((g) => (g == null ? void 0 : g.type) === xe), T = _.filter((g) => (g == null ? void 0 : g.type) !== xe), j = /* @__PURE__ */ e.jsx(
1000
1000
  "div",
1001
1001
  {
1002
1002
  className: ["ds-bottom-sheet-overlay", d && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
1003
- ...o,
1003
+ ...a,
1004
1004
  ref: l,
1005
1005
  "data-ds-portal": "",
1006
1006
  children: /* @__PURE__ */ e.jsxs(
@@ -1022,41 +1022,41 @@ function Ws({
1022
1022
  size: "small",
1023
1023
  icon: /* @__PURE__ */ e.jsx(te, { size: q[2], strokeWidth: 1.5 }),
1024
1024
  onClick: f,
1025
- "aria-label": a ?? i.close
1025
+ "aria-label": o ?? i.close
1026
1026
  }
1027
1027
  ),
1028
1028
  (s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
1029
1029
  s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-bottom-sheet__title", children: s }),
1030
1030
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
1031
1031
  ] }),
1032
- /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: y }),
1033
- j
1032
+ /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: T }),
1033
+ w
1034
1034
  ]
1035
1035
  }
1036
1036
  )
1037
1037
  }
1038
1038
  );
1039
- return typeof document > "u" ? N : re.createPortal(N, document.body);
1039
+ return typeof document > "u" ? j : re.createPortal(j, document.body);
1040
1040
  }
1041
- function Ht({
1041
+ function Vt({
1042
1042
  children: t,
1043
1043
  title: s,
1044
1044
  defaultExpanded: n = !1,
1045
1045
  expanded: r,
1046
- onToggle: a,
1047
- padding: o = "s",
1046
+ onToggle: o,
1047
+ padding: a = "s",
1048
1048
  className: i = "",
1049
1049
  ...l
1050
1050
  }) {
1051
- const c = K(), u = s ?? c.code, [d, p] = D(n), h = r !== void 0, f = h ? r : d, _ = () => {
1052
- h ? a == null || a(!r) : p((y) => !y);
1053
- }, j = [
1051
+ const c = K(), u = s ?? c.code, [d, p] = L(n), h = r !== void 0, f = h ? r : d, _ = () => {
1052
+ h ? o == null || o(!r) : p((T) => !T);
1053
+ }, w = [
1054
1054
  "ds-code-accordion",
1055
- `ds-code-accordion--${o}`,
1055
+ `ds-code-accordion--${a}`,
1056
1056
  f && "ds-code-accordion--expanded",
1057
1057
  i
1058
1058
  ].filter(Boolean).join(" ");
1059
- return /* @__PURE__ */ e.jsxs("div", { className: j, ...l, children: [
1059
+ return /* @__PURE__ */ e.jsxs("div", { className: w, ...l, children: [
1060
1060
  /* @__PURE__ */ e.jsxs(
1061
1061
  "button",
1062
1062
  {
@@ -1080,12 +1080,12 @@ function Ht({
1080
1080
  /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
1081
1081
  ] });
1082
1082
  }
1083
- function Os({ children: t, block: s = !1, collapsible: n = !1, title: r, defaultExpanded: a = !1, ...o }) {
1083
+ function Us({ children: t, block: s = !1, collapsible: n = !1, title: r, defaultExpanded: o = !1, ...a }) {
1084
1084
  const i = K(), l = r ?? i.code;
1085
- return s ? n ? /* @__PURE__ */ e.jsx(Ht, { title: l, defaultExpanded: a, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
1085
+ return s ? n ? /* @__PURE__ */ e.jsx(Vt, { title: l, defaultExpanded: o, ...a, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...a, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...a, children: t });
1086
1086
  }
1087
- function Cs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
1088
- const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
1087
+ function Hs({ href: t, children: s, onClick: n, target: r, rel: o, ...a }) {
1088
+ const l = r === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
1089
1089
  return /* @__PURE__ */ e.jsx(
1090
1090
  "a",
1091
1091
  {
@@ -1094,19 +1094,19 @@ function Cs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
1094
1094
  onClick: n,
1095
1095
  target: r,
1096
1096
  rel: l,
1097
- ...o,
1097
+ ...a,
1098
1098
  children: s
1099
1099
  }
1100
1100
  );
1101
1101
  }
1102
- function Us({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
1103
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: X.Children.map(t, (a) => X.isValidElement(a) ? X.cloneElement(a, { size: s, variant: n }) : a) });
1102
+ function Vs({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
1103
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: X.Children.map(t, (o) => X.isValidElement(o) ? X.cloneElement(o, { size: s, variant: n }) : o) });
1104
1104
  }
1105
- function Hs({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
1105
+ function Ys({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: o = "ghost", disabled: a = !1, icon: i, href: l, ...c }) {
1106
1106
  const u = i && !t, d = [
1107
1107
  "ds-tab",
1108
1108
  `ds-tab--${r}`,
1109
- `ds-tab--${a}`,
1109
+ `ds-tab--${o}`,
1110
1110
  s && "ds-tab--selected",
1111
1111
  u && "ds-tab--icon-only"
1112
1112
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -1115,7 +1115,7 @@ function Hs({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1115
1115
  ] });
1116
1116
  if (l) {
1117
1117
  const h = (f) => {
1118
- if (o) {
1118
+ if (a) {
1119
1119
  f.preventDefault();
1120
1120
  return;
1121
1121
  }
@@ -1126,9 +1126,9 @@ function Hs({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1126
1126
  {
1127
1127
  role: "tab",
1128
1128
  "aria-current": s ? "page" : void 0,
1129
- "aria-disabled": o ? "true" : void 0,
1129
+ "aria-disabled": a ? "true" : void 0,
1130
1130
  className: d,
1131
- href: o ? void 0 : l,
1131
+ href: a ? void 0 : l,
1132
1132
  onClick: h,
1133
1133
  ...c,
1134
1134
  children: p
@@ -1142,23 +1142,23 @@ function Hs({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1142
1142
  "aria-selected": s,
1143
1143
  className: d,
1144
1144
  onClick: n,
1145
- disabled: o,
1145
+ disabled: a,
1146
1146
  ...c,
1147
1147
  children: p
1148
1148
  }
1149
1149
  );
1150
1150
  }
1151
- function Vs({ children: t, className: s = "", ...n }) {
1151
+ function qs({ children: t, className: s = "", ...n }) {
1152
1152
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-browser-pane", s].filter(Boolean).join(" "), ...n, children: t });
1153
1153
  }
1154
- function Ys({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ...o }) {
1154
+ function Gs({ tabs: t, active: s, onChange: n, onClose: r, className: o = "", ...a }) {
1155
1155
  const { t: i } = be();
1156
1156
  return /* @__PURE__ */ e.jsx(
1157
1157
  "div",
1158
1158
  {
1159
- className: ["ds-browser-tabs", a].filter(Boolean).join(" "),
1159
+ className: ["ds-browser-tabs", o].filter(Boolean).join(" "),
1160
1160
  role: "tablist",
1161
- ...o,
1161
+ ...a,
1162
1162
  children: t.map((l) => {
1163
1163
  const c = l.id === s, u = !!l.closable;
1164
1164
  return /* @__PURE__ */ e.jsxs(
@@ -1205,23 +1205,23 @@ function Ys({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ..
1205
1205
  }
1206
1206
  );
1207
1207
  }
1208
- function qs({ children: t, className: s = "", ...n }) {
1208
+ function Ks({ children: t, className: s = "", ...n }) {
1209
1209
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-list", s].filter(Boolean).join(" "), role: "list", ...n, children: t });
1210
1210
  }
1211
- function Gs({
1211
+ function Xs({
1212
1212
  icon: t,
1213
1213
  title: s,
1214
1214
  subtitle: n,
1215
1215
  meta: r,
1216
- onClick: a,
1217
- className: o = "",
1216
+ onClick: o,
1217
+ className: a = "",
1218
1218
  ...i
1219
1219
  }) {
1220
1220
  const l = r == null ? [] : Array.isArray(r) ? r : [r], c = [
1221
1221
  "ds-list-row",
1222
1222
  !t && "ds-list-row--no-icon",
1223
- a && "ds-list-row--interactive",
1224
- o
1223
+ o && "ds-list-row--interactive",
1224
+ a
1225
1225
  ].filter(Boolean).join(" "), u = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1226
1226
  t ? /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__icon", "aria-hidden": !0, children: t }) : null,
1227
1227
  /* @__PURE__ */ e.jsxs("span", { className: "ds-list-row__name", children: [
@@ -1230,40 +1230,40 @@ function Gs({
1230
1230
  ] }),
1231
1231
  l.map((d, p) => /* @__PURE__ */ e.jsx("span", { className: "ds-list-row__meta", children: d }, p))
1232
1232
  ] });
1233
- return a ? /* @__PURE__ */ e.jsx("button", { type: "button", role: "listitem", className: c, onClick: a, ...i, children: u }) : /* @__PURE__ */ e.jsx("div", { role: "listitem", className: c, ...i, children: u });
1233
+ return o ? /* @__PURE__ */ e.jsx("button", { type: "button", role: "listitem", className: c, onClick: o, ...i, children: u }) : /* @__PURE__ */ e.jsx("div", { role: "listitem", className: c, ...i, children: u });
1234
1234
  }
1235
- function Ks({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1236
- const o = R(null), i = R(null), [l, c] = D(!1), u = R(!1), d = R(null), p = R(null), h = () => {
1237
- if (!o.current) return;
1238
- const f = o.current.querySelector(`[data-value="${s}"]`);
1235
+ function Js({ options: t, value: s, onChange: n, size: r = "m", disabled: o = !1 }) {
1236
+ const a = S(null), i = S(null), [l, c] = L(!1), u = S(!1), d = S(null), p = S(null), h = () => {
1237
+ if (!a.current) return;
1238
+ const f = a.current.querySelector(`[data-value="${s}"]`);
1239
1239
  if (!f) return;
1240
- const _ = o.current.getBoundingClientRect(), j = f.getBoundingClientRect(), y = j.left - _.left, N = j.width;
1241
- i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = y + "px", i.current.style.width = N + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1242
- if (!i.current || !o.current) return;
1243
- const T = o.current.querySelector(`[data-value="${s}"]`);
1244
- if (!T) return;
1245
- const A = o.current.getBoundingClientRect(), x = T.getBoundingClientRect();
1246
- i.current.style.transition = "none", i.current.style.left = x.left - A.left + "px", i.current.style.width = x.width + "px";
1240
+ const _ = a.current.getBoundingClientRect(), w = f.getBoundingClientRect(), T = w.left - _.left, j = w.width;
1241
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = T + "px", i.current.style.width = j + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1242
+ if (!i.current || !a.current) return;
1243
+ const g = a.current.querySelector(`[data-value="${s}"]`);
1244
+ if (!g) return;
1245
+ const $ = a.current.getBoundingClientRect(), x = g.getBoundingClientRect();
1246
+ i.current.style.transition = "none", i.current.style.left = x.left - $.left + "px", i.current.style.width = x.width + "px";
1247
1247
  }));
1248
1248
  };
1249
- return p.current = h, ct(() => {
1249
+ return p.current = h, dt(() => {
1250
1250
  const f = d.current !== s;
1251
1251
  d.current = s, u.current = l && f, h();
1252
1252
  }), P(() => {
1253
- if (!o.current) return;
1253
+ if (!a.current) return;
1254
1254
  const f = new ResizeObserver(() => {
1255
1255
  u.current = !1, p.current();
1256
1256
  });
1257
- return f.observe(o.current), () => f.disconnect();
1257
+ return f.observe(a.current), () => f.disconnect();
1258
1258
  }, []), /* @__PURE__ */ e.jsxs(
1259
1259
  "div",
1260
1260
  {
1261
1261
  className: [
1262
1262
  "ds-seg",
1263
1263
  `ds-seg--${r}`,
1264
- a && "ds-seg--disabled"
1264
+ o && "ds-seg--disabled"
1265
1265
  ].filter(Boolean).join(" "),
1266
- ref: o,
1266
+ ref: a,
1267
1267
  role: "group",
1268
1268
  children: [
1269
1269
  l && /* @__PURE__ */ e.jsx(
@@ -1280,9 +1280,9 @@ function Ks({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1
1280
1280
  type: "button",
1281
1281
  "data-value": f.value,
1282
1282
  className: ["ds-seg__btn", s === f.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1283
- onClick: () => !a && n(f.value),
1283
+ onClick: () => !o && n(f.value),
1284
1284
  "aria-pressed": s === f.value,
1285
- disabled: a,
1285
+ disabled: o,
1286
1286
  children: [
1287
1287
  f.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: f.icon }),
1288
1288
  f.label
@@ -1299,15 +1299,15 @@ function He({
1299
1299
  title: s,
1300
1300
  defaultExpanded: n = !1,
1301
1301
  expanded: r,
1302
- onToggle: a,
1303
- padding: o = "m",
1302
+ onToggle: o,
1303
+ padding: a = "m",
1304
1304
  ...i
1305
1305
  }) {
1306
- const [l, c] = D(n), u = r !== void 0, d = u ? r : l, p = () => {
1307
- u ? a == null || a(!r) : c((f) => !f);
1306
+ const [l, c] = L(n), u = r !== void 0, d = u ? r : l, p = () => {
1307
+ u ? o == null || o(!r) : c((f) => !f);
1308
1308
  }, h = [
1309
1309
  "ds-accordion",
1310
- `ds-accordion--${o}`,
1310
+ `ds-accordion--${a}`,
1311
1311
  d && "ds-accordion--expanded"
1312
1312
  ].filter(Boolean).join(" ");
1313
1313
  return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
@@ -1335,64 +1335,77 @@ function He({
1335
1335
  ] });
1336
1336
  }
1337
1337
  const ce = 8, pe = 8;
1338
- function Vt(t, s, n) {
1338
+ function Yt(t, s, n) {
1339
1339
  const r = window.innerWidth;
1340
- let a, o;
1340
+ let o, a;
1341
1341
  switch (t) {
1342
1342
  case "top":
1343
- a = s.top - n.height - ce, o = s.left + s.width / 2 - n.width / 2;
1343
+ o = s.top - n.height - ce, a = s.left + s.width / 2 - n.width / 2;
1344
1344
  break;
1345
1345
  case "bottom":
1346
- a = s.bottom + ce, o = s.left + s.width / 2 - n.width / 2;
1346
+ o = s.bottom + ce, a = s.left + s.width / 2 - n.width / 2;
1347
1347
  break;
1348
1348
  case "left":
1349
- a = s.top + s.height / 2 - n.height / 2, o = s.left - n.width - ce;
1349
+ o = s.top + s.height / 2 - n.height / 2, a = s.left - n.width - ce;
1350
1350
  break;
1351
1351
  case "right":
1352
- a = s.top + s.height / 2 - n.height / 2, o = s.right + ce;
1352
+ o = s.top + s.height / 2 - n.height / 2, a = s.right + ce;
1353
1353
  break;
1354
1354
  default:
1355
- a = s.bottom + ce, o = s.left;
1355
+ o = s.bottom + ce, a = s.left;
1356
1356
  }
1357
- const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
1358
- return { top: a, left: i, arrowOffset: l };
1357
+ const i = Math.max(pe, Math.min(r - n.width - pe, a)), l = a - i;
1358
+ return { top: o, left: i, arrowOffset: l };
1359
1359
  }
1360
- function Yt(t, s, n) {
1361
- const r = window.innerWidth, a = window.innerHeight;
1360
+ function qt(t, s, n) {
1361
+ const r = window.innerWidth, o = window.innerHeight;
1362
1362
  if (t.top >= s + ce + pe) return "top";
1363
- if (a - t.bottom >= s + ce + pe) return "bottom";
1363
+ if (o - t.bottom >= s + ce + pe) return "bottom";
1364
1364
  if (r - t.right >= n + ce + pe) return "right";
1365
1365
  if (t.left >= n + ce + pe) return "left";
1366
- const o = Math.max(t.top, a - t.bottom, t.left, r - t.right);
1367
- return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1366
+ const a = Math.max(t.top, o - t.bottom, t.left, r - t.right);
1367
+ return a === t.top ? "top" : a === o - t.bottom ? "bottom" : a === r - t.right ? "right" : "left";
1368
+ }
1369
+ function Ze() {
1370
+ return window.matchMedia("(hover: hover) and (pointer: fine)").matches;
1371
+ }
1372
+ function Gt(t) {
1373
+ return t ? t.matches(":focus-visible") || !!t.querySelector(":focus-visible") : !1;
1368
1374
  }
1369
1375
  function Ve({ children: t, content: s, position: n, ...r }) {
1370
- const [a, o] = D(!1), [i, l] = D({ visibility: "hidden" }), [c, u] = D(n || "top"), d = R(null), p = R(null), h = R(!1), f = () => {
1376
+ const [o, a] = L(!1), [i, l] = L({ visibility: "hidden" }), [c, u] = L(n || "top"), d = S(null), p = S(null), h = () => {
1371
1377
  if (!d.current || !p.current) return;
1372
- const j = d.current.getBoundingClientRect(), y = p.current.getBoundingClientRect(), N = n || Yt(j, y.height, y.width), { top: T, left: A, arrowOffset: x } = Vt(N, j, y);
1373
- u(N), l({
1378
+ const g = d.current.getBoundingClientRect(), $ = p.current.getBoundingClientRect(), x = n || qt(g, $.height, $.width), { top: y, left: N, arrowOffset: B } = Yt(x, g, $);
1379
+ u(x), l({
1374
1380
  position: "fixed",
1375
- top: T,
1376
- left: A,
1381
+ top: y,
1382
+ left: N,
1377
1383
  visibility: "visible",
1378
- "--arrow-offset": `${x}px`
1384
+ "--arrow-offset": `${B}px`
1379
1385
  });
1380
1386
  };
1381
- if (P(() => {
1382
- if (!a) return;
1387
+ P(() => {
1388
+ if (!o) return;
1383
1389
  l({ position: "fixed", visibility: "hidden" });
1384
- const j = requestAnimationFrame(f);
1385
- return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1386
- cancelAnimationFrame(j), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1390
+ const g = requestAnimationFrame(h);
1391
+ return window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
1392
+ cancelAnimationFrame(g), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
1387
1393
  };
1388
- }, [a, n]), P(() => {
1389
- if (!a) return;
1390
- const j = (y) => {
1391
- d.current && !d.current.contains(y.target) && o(!1);
1392
- };
1393
- return document.addEventListener("touchstart", j), () => document.removeEventListener("touchstart", j);
1394
- }, [a]), !s) return t;
1395
- const _ = a && /* @__PURE__ */ e.jsx(
1394
+ }, [o, n]);
1395
+ const f = () => {
1396
+ Ze() && a(!0);
1397
+ }, _ = () => {
1398
+ Gt(d.current) || a(!1);
1399
+ }, w = (g) => {
1400
+ const $ = g.target;
1401
+ $ instanceof Element && $.matches(":focus-visible") && a(!0);
1402
+ }, T = (g) => {
1403
+ var x, y;
1404
+ const $ = g.relatedTarget;
1405
+ $ instanceof Node && ((x = d.current) != null && x.contains($)) || Ze() && ((y = d.current) != null && y.matches(":hover")) || a(!1);
1406
+ };
1407
+ if (!s) return t;
1408
+ const j = o && /* @__PURE__ */ e.jsx(
1396
1409
  "div",
1397
1410
  {
1398
1411
  ref: p,
@@ -1408,94 +1421,89 @@ function Ve({ children: t, content: s, position: n, ...r }) {
1408
1421
  {
1409
1422
  ref: d,
1410
1423
  className: "ds-tooltip-wrapper",
1411
- onMouseEnter: () => {
1412
- h.current || o(!0);
1413
- },
1414
- onMouseLeave: () => {
1415
- h.current || o(!1);
1416
- },
1417
- onTouchStart: () => {
1418
- h.current = !0, o((j) => !j);
1419
- },
1424
+ onMouseEnter: f,
1425
+ onMouseLeave: _,
1426
+ onFocus: w,
1427
+ onBlur: T,
1420
1428
  ...r,
1421
1429
  children: [
1422
1430
  t,
1423
- typeof document < "u" && re.createPortal(_, document.body)
1431
+ typeof document < "u" && re.createPortal(j, document.body)
1424
1432
  ]
1425
1433
  }
1426
1434
  );
1427
1435
  }
1428
- const Ze = 8, Ee = 8, qt = 140;
1429
- function Qe(t) {
1436
+ const Qe = 8, Ee = 8, Kt = 140;
1437
+ function et(t) {
1430
1438
  const s = String(t ?? "").replace(/^@/, "").trim();
1431
1439
  return s ? `@${s}` : "";
1432
1440
  }
1433
- function Xs({
1441
+ function Zs({
1434
1442
  label: t,
1435
1443
  children: s,
1436
1444
  mode: n = "click",
1437
1445
  avatar: r,
1438
- name: a,
1439
- handle: o,
1446
+ name: o,
1447
+ handle: a,
1440
1448
  description: i,
1441
1449
  actions: l,
1442
1450
  className: c = "",
1443
1451
  popoverClassName: u = "",
1444
1452
  ...d
1445
1453
  }) {
1446
- const p = _t(), h = R(null), f = R(null), _ = R(null), [j, y] = D(!1), [N, T] = D(null), A = s != null, x = a || t || "", k = Qe(t || a), w = Qe(o), I = ne(() => {
1454
+ const p = jt(), h = S(null), f = S(null), _ = S(null), [w, T] = L(!1), [j, g] = L(null), $ = s != null, x = o || t || "", y = et(t || o), N = et(a), B = ne(() => {
1447
1455
  _.current != null && (window.clearTimeout(_.current), _.current = null);
1448
- }, []), L = ne(() => {
1449
- I(), y(!0);
1450
- }, [I]), W = ne(() => {
1451
- I(), _.current = window.setTimeout(() => y(!1), qt);
1452
- }, [I]), O = ne(() => {
1456
+ }, []), D = ne(() => {
1457
+ B(), T(!0);
1458
+ }, [B]), W = ne(() => {
1459
+ B(), _.current = window.setTimeout(() => T(!1), Kt);
1460
+ }, [B]), O = ne(() => {
1453
1461
  const M = h.current, V = f.current;
1454
1462
  if (!M) return;
1455
- const v = M.getBoundingClientRect(), $ = (V == null ? void 0 : V.offsetHeight) ?? 160, S = (V == null ? void 0 : V.offsetWidth) ?? 260;
1456
- let z = v.bottom + Ze;
1457
- z + $ > window.innerHeight - Ee && (z = Math.max(Ee, v.top - $ - Ze));
1458
- const H = Math.max(Ee, Math.min(v.left, window.innerWidth - S - Ee));
1459
- T({ top: z, left: H });
1463
+ const v = M.getBoundingClientRect(), R = (V == null ? void 0 : V.offsetHeight) ?? 160, A = (V == null ? void 0 : V.offsetWidth) ?? 260;
1464
+ let F = v.bottom + Qe;
1465
+ F + R > window.innerHeight - Ee && (F = Math.max(Ee, v.top - R - Qe));
1466
+ const H = Math.max(Ee, Math.min(v.left, window.innerWidth - A - Ee));
1467
+ g({ top: F, left: H });
1460
1468
  }, []);
1461
- ct(() => {
1462
- j && O();
1463
- }, [j, O]), P(() => {
1464
- if (!j) return;
1465
- const M = () => O(), V = ($) => {
1466
- $.key === "Escape" && y(!1);
1467
- }, v = ($) => {
1468
- var z, H;
1469
+ dt(() => {
1470
+ w && O();
1471
+ }, [w, O]), P(() => {
1472
+ if (!w) return;
1473
+ const M = () => O(), V = (R) => {
1474
+ R.key === "Escape" && T(!1);
1475
+ }, v = (R) => {
1476
+ var F, H;
1469
1477
  if (n === "hover") return;
1470
- const S = $.target;
1471
- (z = f.current) != null && z.contains(S) || (H = h.current) != null && H.contains(S) || y(!1);
1478
+ const A = R.target;
1479
+ (F = f.current) != null && F.contains(A) || (H = h.current) != null && H.contains(A) || T(!1);
1472
1480
  };
1473
1481
  return window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), document.addEventListener("keydown", V), document.addEventListener("mousedown", v), () => {
1474
1482
  window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("keydown", V), document.removeEventListener("mousedown", v);
1475
1483
  };
1476
- }, [j, O, n]), P(() => () => I(), [I]);
1477
- const g = n === "hover" ? { onMouseEnter: L, onMouseLeave: W } : {}, C = j ? re.createPortal(
1484
+ }, [w, O, n]), P(() => () => B(), [B]);
1485
+ const k = n === "hover" ? { onMouseEnter: D, onMouseLeave: W } : {}, C = w ? re.createPortal(
1478
1486
  /* @__PURE__ */ e.jsxs(
1479
1487
  "div",
1480
1488
  {
1481
1489
  ref: f,
1482
1490
  id: p,
1483
1491
  role: "dialog",
1484
- "aria-label": x || k || "Mention",
1492
+ "aria-label": x || y || "Mention",
1485
1493
  "data-ds-portal": "",
1486
1494
  className: ["ds-mention__popover", u].filter(Boolean).join(" "),
1487
- style: N ? { top: N.top, left: N.left } : { top: -9999, left: -9999, visibility: "hidden" },
1488
- ...g,
1495
+ style: j ? { top: j.top, left: j.left } : { top: -9999, left: -9999, visibility: "hidden" },
1496
+ ...k,
1489
1497
  children: [
1490
- (r || x || w) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1498
+ (r || x || N) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
1491
1499
  r,
1492
- (x || w) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1500
+ (x || N) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
1493
1501
  x ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: x }) : null,
1494
- w ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: w }) : null
1502
+ N ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: N }) : null
1495
1503
  ] })
1496
1504
  ] }),
1497
1505
  i ? /* @__PURE__ */ e.jsx("p", { className: "ds-mention__desc", children: i }) : null,
1498
- l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => y(!1), children: l }) : null
1506
+ l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => T(!1), children: l }) : null
1499
1507
  ]
1500
1508
  }
1501
1509
  ),
@@ -1510,40 +1518,40 @@ function Xs({
1510
1518
  type: "button",
1511
1519
  className: [
1512
1520
  "ds-mention",
1513
- A && "ds-mention--custom",
1521
+ $ && "ds-mention--custom",
1514
1522
  c
1515
1523
  ].filter(Boolean).join(" "),
1516
- "aria-expanded": j,
1524
+ "aria-expanded": w,
1517
1525
  "aria-haspopup": "dialog",
1518
- "aria-label": A && (k || x) || void 0,
1519
- "aria-controls": j ? p : void 0,
1526
+ "aria-label": $ && (y || x) || void 0,
1527
+ "aria-controls": w ? p : void 0,
1520
1528
  onClick: (M) => {
1521
1529
  var V;
1522
1530
  if ((V = d.onClick) == null || V.call(d, M), !M.defaultPrevented) {
1523
1531
  if (M.preventDefault(), M.stopPropagation(), n === "hover") {
1524
- L();
1532
+ D();
1525
1533
  return;
1526
1534
  }
1527
- y((v) => !v);
1535
+ T((v) => !v);
1528
1536
  }
1529
1537
  },
1530
- ...g,
1531
- children: A ? s : k
1538
+ ...k,
1539
+ children: $ ? s : y
1532
1540
  }
1533
1541
  ),
1534
1542
  typeof document < "u" ? C : null
1535
1543
  ] });
1536
1544
  }
1537
- function Js({
1545
+ function Qs({
1538
1546
  checked: t = !1,
1539
1547
  onChange: s,
1540
1548
  size: n = "m",
1541
1549
  disabled: r = !1,
1542
- label: a,
1543
- id: o,
1550
+ label: o,
1551
+ id: a,
1544
1552
  ...i
1545
1553
  }) {
1546
- const l = o || `toggle-${X.useId()}`, c = [
1554
+ const l = a || `toggle-${X.useId()}`, c = [
1547
1555
  "ds-toggle",
1548
1556
  `ds-toggle--${n}`,
1549
1557
  r && "ds-toggle--disabled"
@@ -1562,19 +1570,19 @@ function Js({
1562
1570
  }
1563
1571
  ),
1564
1572
  /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
1565
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1573
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
1566
1574
  ] });
1567
1575
  }
1568
- function Zs({
1576
+ function en({
1569
1577
  checked: t = !1,
1570
1578
  onChange: s,
1571
1579
  size: n = "m",
1572
1580
  disabled: r = !1,
1573
- label: a,
1574
- id: o,
1581
+ label: o,
1582
+ id: a,
1575
1583
  ...i
1576
1584
  }) {
1577
- const l = o || `checkbox-${X.useId()}`, c = [
1585
+ const l = a || `checkbox-${X.useId()}`, c = [
1578
1586
  "ds-checkbox",
1579
1587
  `ds-checkbox--${n}`,
1580
1588
  r && "ds-checkbox--disabled"
@@ -1600,16 +1608,16 @@ function Zs({
1600
1608
  className: "ds-checkbox__icon"
1601
1609
  }
1602
1610
  ) }),
1603
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1611
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
1604
1612
  ] });
1605
1613
  }
1606
- function Qs({
1614
+ function tn({
1607
1615
  checked: t = !1,
1608
1616
  onChange: s,
1609
1617
  size: n = "m",
1610
1618
  disabled: r = !1,
1611
- label: a,
1612
- name: o,
1619
+ label: o,
1620
+ name: a,
1613
1621
  value: i,
1614
1622
  id: l,
1615
1623
  ...c
@@ -1629,34 +1637,34 @@ function Qs({
1629
1637
  checked: t,
1630
1638
  onChange: (p) => s == null ? void 0 : s(p.target.checked),
1631
1639
  disabled: r,
1632
- name: o,
1640
+ name: a,
1633
1641
  value: i,
1634
1642
  ...c
1635
1643
  }
1636
1644
  ),
1637
1645
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1638
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1646
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
1639
1647
  ] });
1640
1648
  }
1641
- function Gt({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
1649
+ function Xt({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: o = "", style: a = {}, ...i }) {
1642
1650
  return /* @__PURE__ */ e.jsx(
1643
1651
  "span",
1644
1652
  {
1645
- className: ["ds-skeleton", `ds-skeleton--${n}`, a].filter(Boolean).join(" "),
1646
- style: { width: t, height: s, aspectRatio: r, ...o },
1653
+ className: ["ds-skeleton", `ds-skeleton--${n}`, o].filter(Boolean).join(" "),
1654
+ style: { width: t, height: s, aspectRatio: r, ...a },
1647
1655
  "aria-hidden": "true",
1648
1656
  ...i
1649
1657
  }
1650
1658
  );
1651
1659
  }
1652
- function Kt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
1660
+ function Jt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: o = {}, ...a }) {
1653
1661
  return /* @__PURE__ */ e.jsx(
1654
1662
  "span",
1655
1663
  {
1656
1664
  className: ["ds-skeleton-text", r].filter(Boolean).join(" "),
1657
- style: { gap: n, ...a },
1665
+ style: { gap: n, ...o },
1658
1666
  "aria-hidden": "true",
1659
- ...o,
1667
+ ...a,
1660
1668
  children: Array.from({ length: t }, (i, l) => /* @__PURE__ */ e.jsx(
1661
1669
  "span",
1662
1670
  {
@@ -1668,44 +1676,44 @@ function Kt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "",
1668
1676
  }
1669
1677
  );
1670
1678
  }
1671
- Gt.Text = Kt;
1672
- function Xt(t) {
1679
+ Xt.Text = Jt;
1680
+ function Zt(t) {
1673
1681
  let s = 2166136261;
1674
1682
  for (let n = 0; n < t.length; n++)
1675
1683
  s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
1676
1684
  return s % 360;
1677
1685
  }
1678
- function Jt(t) {
1686
+ function Qt(t) {
1679
1687
  if (!t) return "";
1680
1688
  const s = t.trim().split(/\s+/);
1681
1689
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1682
1690
  }
1683
- function en({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1684
- const l = Xt(t ?? ""), [c, u] = D(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Jt(t) });
1691
+ function sn({ seed: t, icon: s, src: n, size: r = 32, className: o = "", style: a = {}, ...i }) {
1692
+ const l = Zt(t ?? ""), [c, u] = L(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Qt(t) });
1685
1693
  return /* @__PURE__ */ e.jsx(
1686
1694
  "div",
1687
1695
  {
1688
- className: ["ds-avatar", a].filter(Boolean).join(" "),
1689
- style: { width: r, height: r, "--ds-avatar-h": l, ...o },
1696
+ className: ["ds-avatar", o].filter(Boolean).join(" "),
1697
+ style: { width: r, height: r, "--ds-avatar-h": l, ...a },
1690
1698
  "aria-hidden": "true",
1691
1699
  ...i,
1692
1700
  children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => u(!0) }) : d
1693
1701
  }
1694
1702
  );
1695
1703
  }
1696
- function tn({
1704
+ function nn({
1697
1705
  children: t,
1698
1706
  size: s = "compact",
1699
1707
  stickyTop: n,
1700
1708
  maxHeight: r,
1701
- className: a = "",
1702
- style: o = {},
1709
+ className: o = "",
1710
+ style: a = {},
1703
1711
  ...i
1704
1712
  }) {
1705
1713
  const l = {
1706
1714
  ...r ? { maxHeight: r } : {},
1707
1715
  ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1708
- ...o
1716
+ ...a
1709
1717
  };
1710
1718
  return /* @__PURE__ */ e.jsx(
1711
1719
  "div",
@@ -1715,7 +1723,7 @@ function tn({
1715
1723
  children: /* @__PURE__ */ e.jsx(
1716
1724
  "table",
1717
1725
  {
1718
- className: ["ds-table", `ds-table--${s}`, a].filter(Boolean).join(" "),
1726
+ className: ["ds-table", `ds-table--${s}`, o].filter(Boolean).join(" "),
1719
1727
  ...i,
1720
1728
  children: t
1721
1729
  }
@@ -1723,13 +1731,13 @@ function tn({
1723
1731
  }
1724
1732
  );
1725
1733
  }
1726
- function sn({ children: t, ...s }) {
1734
+ function rn({ children: t, ...s }) {
1727
1735
  return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
1728
1736
  }
1729
- function nn({ children: t, ...s }) {
1737
+ function on({ children: t, ...s }) {
1730
1738
  return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
1731
1739
  }
1732
- function rn({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
1740
+ function an({ children: t, interactive: s, selected: n, subheader: r, exiting: o, updated: a, className: i = "", onClick: l, ...c }) {
1733
1741
  return /* @__PURE__ */ e.jsx(
1734
1742
  "tr",
1735
1743
  {
@@ -1738,8 +1746,8 @@ function rn({ children: t, interactive: s, selected: n, subheader: r, exiting: a
1738
1746
  s || l ? "ds-table-row--interactive" : "",
1739
1747
  n ? "ds-table-row--selected" : "",
1740
1748
  r ? "ds-table-row--subheader" : "",
1741
- a ? "ds-table-row--exiting" : "",
1742
- o ? "ds-table-row--updated" : "",
1749
+ o ? "ds-table-row--exiting" : "",
1750
+ a ? "ds-table-row--updated" : "",
1743
1751
  i
1744
1752
  ].filter(Boolean).join(" "),
1745
1753
  onClick: l,
@@ -1748,11 +1756,11 @@ function rn({ children: t, interactive: s, selected: n, subheader: r, exiting: a
1748
1756
  }
1749
1757
  );
1750
1758
  }
1751
- function an({ children: t, colSpan: s = 999, ...n }) {
1759
+ function ln({ children: t, colSpan: s = 999, ...n }) {
1752
1760
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1753
1761
  }
1754
- function on({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1755
- const c = !!r || n !== void 0, u = n === "asc" ? wt : n === "desc" ? ye : gt;
1762
+ function cn({ children: t, align: s = "left", sortDir: n, onSort: r, width: o, className: a = "", style: i = {}, ...l }) {
1763
+ const c = !!r || n !== void 0, u = n === "asc" ? gt : n === "desc" ? ye : yt;
1756
1764
  return /* @__PURE__ */ e.jsx(
1757
1765
  "th",
1758
1766
  {
@@ -1761,10 +1769,10 @@ function on({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
1761
1769
  c ? "ds-th--sortable" : "",
1762
1770
  n ? "ds-th--sorted" : "",
1763
1771
  s !== "left" ? `ds-table-cell--${s}` : "",
1764
- o
1772
+ a
1765
1773
  ].filter(Boolean).join(" "),
1766
1774
  onClick: r,
1767
- style: { width: a, ...i },
1775
+ style: { width: o, ...i },
1768
1776
  ...l,
1769
1777
  children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1770
1778
  t,
@@ -1773,7 +1781,7 @@ function on({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
1773
1781
  }
1774
1782
  );
1775
1783
  }
1776
- function ln({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
1784
+ function dn({ children: t, align: s = "left", secondary: n, muted: r, truncate: o, nowrap: a, className: i = "", ...l }) {
1777
1785
  return /* @__PURE__ */ e.jsx(
1778
1786
  "td",
1779
1787
  {
@@ -1782,8 +1790,8 @@ function ln({ children: t, align: s = "left", secondary: n, muted: r, truncate:
1782
1790
  s !== "left" ? `ds-table-cell--${s}` : "",
1783
1791
  n ? "ds-table-cell--secondary" : "",
1784
1792
  r ? "ds-table-cell--muted" : "",
1785
- a ? "ds-table-cell--truncate" : "",
1786
- o ? "ds-table-cell--nowrap" : "",
1793
+ o ? "ds-table-cell--truncate" : "",
1794
+ a ? "ds-table-cell--nowrap" : "",
1787
1795
  i
1788
1796
  ].filter(Boolean).join(" "),
1789
1797
  ...l,
@@ -1791,19 +1799,19 @@ function ln({ children: t, align: s = "left", secondary: n, muted: r, truncate:
1791
1799
  }
1792
1800
  );
1793
1801
  }
1794
- function cn({
1802
+ function un({
1795
1803
  icon: t,
1796
1804
  title: s,
1797
1805
  description: n,
1798
1806
  action: r,
1799
- size: a = "m",
1800
- className: o = "",
1807
+ size: o = "m",
1808
+ className: a = "",
1801
1809
  ...i
1802
1810
  }) {
1803
1811
  return /* @__PURE__ */ e.jsxs(
1804
1812
  "div",
1805
1813
  {
1806
- className: ["ds-empty-state", `ds-empty-state--${a}`, o].filter(Boolean).join(" "),
1814
+ className: ["ds-empty-state", `ds-empty-state--${o}`, a].filter(Boolean).join(" "),
1807
1815
  ...i,
1808
1816
  children: [
1809
1817
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: t }),
@@ -1814,26 +1822,26 @@ function cn({
1814
1822
  }
1815
1823
  );
1816
1824
  }
1817
- function dn({
1825
+ function fn({
1818
1826
  label: t,
1819
1827
  hint: s,
1820
1828
  error: n,
1821
1829
  required: r = !1,
1822
- disabled: a = !1,
1823
- htmlFor: o,
1830
+ disabled: o = !1,
1831
+ htmlFor: a,
1824
1832
  children: i,
1825
1833
  className: l = "",
1826
1834
  style: c,
1827
1835
  ...u
1828
1836
  }) {
1829
- const d = X.useId(), p = o ?? d, h = `${p}-hint`, f = `${p}-error`;
1837
+ const d = X.useId(), p = a ?? d, h = `${p}-hint`, f = `${p}-error`;
1830
1838
  return /* @__PURE__ */ e.jsxs(
1831
1839
  "div",
1832
1840
  {
1833
1841
  className: `ds-field${l ? ` ${l}` : ""}`,
1834
1842
  "data-state": n ? "error" : void 0,
1835
1843
  "data-required": r ? "" : void 0,
1836
- "data-disabled": a ? "" : void 0,
1844
+ "data-disabled": o ? "" : void 0,
1837
1845
  style: c,
1838
1846
  ...u,
1839
1847
  children: [
@@ -1845,7 +1853,7 @@ function dn({
1845
1853
  }
1846
1854
  );
1847
1855
  }
1848
- function un({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
1856
+ function mn({ label: t, value: s, delta: n, size: r = "m", inline: o = !1, className: a = "", style: i, ...l }) {
1849
1857
  const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1850
1858
  return /* @__PURE__ */ e.jsxs(
1851
1859
  "div",
@@ -1853,8 +1861,8 @@ function un({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
1853
1861
  className: [
1854
1862
  "ds-stat",
1855
1863
  `ds-stat--${r}`,
1856
- a && "ds-stat--inline",
1857
- o
1864
+ o && "ds-stat--inline",
1865
+ a
1858
1866
  ].filter(Boolean).join(" "),
1859
1867
  style: i,
1860
1868
  ...l,
@@ -1866,13 +1874,13 @@ function un({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
1866
1874
  }
1867
1875
  );
1868
1876
  }
1869
- function fn({
1877
+ function pn({
1870
1878
  children: t,
1871
1879
  separator: s = "/",
1872
1880
  "aria-label": n,
1873
1881
  className: r = "",
1874
- style: a,
1875
- ...o
1882
+ style: o,
1883
+ ...a
1876
1884
  }) {
1877
1885
  const i = K(), l = X.Children.toArray(t).filter(Boolean);
1878
1886
  return /* @__PURE__ */ e.jsx(
@@ -1880,8 +1888,8 @@ function fn({
1880
1888
  {
1881
1889
  className: `ds-breadcrumb${r ? ` ${r}` : ""}`,
1882
1890
  "aria-label": n ?? i.breadcrumb,
1883
- style: a,
1884
- ...o,
1891
+ style: o,
1892
+ ...a,
1885
1893
  children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: l.map((c, u) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1886
1894
  c,
1887
1895
  u < l.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
@@ -1889,24 +1897,24 @@ function fn({
1889
1897
  }
1890
1898
  );
1891
1899
  }
1892
- function mn({
1900
+ function hn({
1893
1901
  page: t,
1894
1902
  total: s,
1895
1903
  onChange: n,
1896
1904
  siblings: r = 1,
1897
- "aria-label": a,
1898
- previousLabel: o,
1905
+ "aria-label": o,
1906
+ previousLabel: a,
1899
1907
  nextLabel: i,
1900
1908
  className: l = "",
1901
1909
  style: c,
1902
1910
  ...u
1903
1911
  }) {
1904
- const d = K(), { t: p } = be(), h = Zt(t, s, r);
1912
+ const d = K(), { t: p } = be(), h = es(t, s, r);
1905
1913
  return /* @__PURE__ */ e.jsxs(
1906
1914
  "nav",
1907
1915
  {
1908
1916
  className: `ds-pagination${l ? ` ${l}` : ""}`,
1909
- "aria-label": a ?? d.pagination,
1917
+ "aria-label": o ?? d.pagination,
1910
1918
  style: c,
1911
1919
  ...u,
1912
1920
  children: [
@@ -1916,8 +1924,8 @@ function mn({
1916
1924
  className: "ds-pagination-arrow",
1917
1925
  onClick: () => n == null ? void 0 : n(t - 1),
1918
1926
  disabled: t <= 1,
1919
- "aria-label": o ?? d.previousPage,
1920
- children: /* @__PURE__ */ e.jsx(yt, { size: 16 })
1927
+ "aria-label": a ?? d.previousPage,
1928
+ children: /* @__PURE__ */ e.jsx(kt, { size: 16 })
1921
1929
  }
1922
1930
  ),
1923
1931
  h.map(
@@ -1940,56 +1948,56 @@ function mn({
1940
1948
  onClick: () => n == null ? void 0 : n(t + 1),
1941
1949
  disabled: t >= s,
1942
1950
  "aria-label": i ?? d.nextPage,
1943
- children: /* @__PURE__ */ e.jsx(kt, { size: 16 })
1951
+ children: /* @__PURE__ */ e.jsx(Et, { size: 16 })
1944
1952
  }
1945
1953
  )
1946
1954
  ]
1947
1955
  }
1948
1956
  );
1949
1957
  }
1950
- function Zt(t, s, n) {
1958
+ function es(t, s, n) {
1951
1959
  if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
1952
- const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
1953
- r > 2 && o.push("…");
1954
- for (let i = r; i <= a; i++) o.push(i);
1955
- return a < s - 1 && o.push("…"), o.push(s), o;
1960
+ const r = Math.max(2, t - n), o = Math.min(s - 1, t + n), a = [1];
1961
+ r > 2 && a.push("…");
1962
+ for (let i = r; i <= o; i++) a.push(i);
1963
+ return o < s - 1 && a.push("…"), a.push(s), a;
1956
1964
  }
1957
- const Qt = 300;
1958
- function pn({
1965
+ const ts = 300;
1966
+ function xn({
1959
1967
  children: t,
1960
1968
  title: s,
1961
1969
  onClose: n,
1962
1970
  subHeader: r,
1963
- side: a = "right",
1964
- size: o = "wide",
1971
+ side: o = "right",
1972
+ size: a = "wide",
1965
1973
  offsetLeft: i = 0,
1966
1974
  offsetRight: l = 0,
1967
1975
  keepOpenRef: c,
1968
1976
  closeLabel: u,
1969
1977
  ...d
1970
1978
  }) {
1971
- const p = K(), h = R(null), f = X.useId(), [_, j] = D(!1), y = R(null), N = () => {
1972
- !n || _ || (j(!0), y.current = setTimeout(() => {
1973
- j(!1), n();
1974
- }, Qt));
1979
+ const p = K(), h = S(null), f = X.useId(), [_, w] = L(!1), T = S(null), j = () => {
1980
+ !n || _ || (w(!0), T.current = setTimeout(() => {
1981
+ w(!1), n();
1982
+ }, ts));
1975
1983
  };
1976
- P(() => () => clearTimeout(y.current), []), P(() => {
1977
- const w = (L) => {
1978
- L.key === "Escape" && N();
1979
- }, I = (L) => {
1980
- var O, g;
1981
- const W = Ce(L);
1982
- W && ((O = c == null ? void 0 : c.current) != null && O.contains(W) || (g = h.current) != null && g.contains(W) || Ue(W, null) || N());
1984
+ P(() => () => clearTimeout(T.current), []), P(() => {
1985
+ const N = (D) => {
1986
+ D.key === "Escape" && j();
1987
+ }, B = (D) => {
1988
+ var O, k;
1989
+ const W = Ce(D);
1990
+ W && ((O = c == null ? void 0 : c.current) != null && O.contains(W) || (k = h.current) != null && k.contains(W) || Ue(W, null) || j());
1983
1991
  };
1984
- return document.addEventListener("keydown", w), document.addEventListener("mousedown", I), () => {
1985
- document.removeEventListener("keydown", w), document.removeEventListener("mousedown", I);
1992
+ return document.addEventListener("keydown", N), document.addEventListener("mousedown", B), () => {
1993
+ document.removeEventListener("keydown", N), document.removeEventListener("mousedown", B);
1986
1994
  };
1987
1995
  }, [n, _, c]);
1988
- const T = X.Children.toArray(t), A = T.find((w) => (w == null ? void 0 : w.type) === et || (w == null ? void 0 : w.type) === xe), x = T.filter((w) => (w == null ? void 0 : w.type) !== et && (w == null ? void 0 : w.type) !== xe), k = /* @__PURE__ */ e.jsx(
1996
+ const g = X.Children.toArray(t), $ = g.find((N) => (N == null ? void 0 : N.type) === tt || (N == null ? void 0 : N.type) === xe), x = g.filter((N) => (N == null ? void 0 : N.type) !== tt && (N == null ? void 0 : N.type) !== xe), y = /* @__PURE__ */ e.jsx(
1989
1997
  "div",
1990
1998
  {
1991
1999
  className: ["ds-side-page-overlay", _ && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1992
- "data-side": a,
2000
+ "data-side": o,
1993
2001
  style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1994
2002
  ...d,
1995
2003
  children: /* @__PURE__ */ e.jsxs(
@@ -1998,8 +2006,8 @@ function pn({
1998
2006
  ref: h,
1999
2007
  className: ["ds-side-page", _ && "ds-side-page--closing"].filter(Boolean).join(" "),
2000
2008
  "data-surface": "2",
2001
- "data-side": a,
2002
- "data-size": o,
2009
+ "data-side": o,
2010
+ "data-size": a,
2003
2011
  role: "dialog",
2004
2012
  "aria-modal": "true",
2005
2013
  "aria-labelledby": s ? f : void 0,
@@ -2011,7 +2019,7 @@ function pn({
2011
2019
  variant: "ghost",
2012
2020
  size: "small",
2013
2021
  icon: /* @__PURE__ */ e.jsx(te, { size: q[2], strokeWidth: 1.5 }),
2014
- onClick: N,
2022
+ onClick: j,
2015
2023
  "aria-label": u ?? p.close
2016
2024
  }
2017
2025
  ),
@@ -2020,23 +2028,23 @@ function pn({
2020
2028
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
2021
2029
  ] }),
2022
2030
  /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: x }),
2023
- A
2031
+ $
2024
2032
  ]
2025
2033
  }
2026
2034
  )
2027
2035
  }
2028
2036
  );
2029
- return typeof document > "u" ? k : re.createPortal(k, document.body);
2037
+ return typeof document > "u" ? y : re.createPortal(y, document.body);
2030
2038
  }
2031
- function et({ children: t }) {
2039
+ function tt({ children: t }) {
2032
2040
  return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
2033
2041
  }
2034
- const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), hn = dt(function({
2042
+ const _e = Le({ collapsed: !1, side: "left" }), Re = Le(!1), vn = ut(function({
2035
2043
  children: s,
2036
2044
  collapsed: n = !1,
2037
2045
  side: r = "left",
2038
- onExpand: a,
2039
- onCollapse: o,
2046
+ onExpand: o,
2047
+ onCollapse: a,
2040
2048
  className: i = "",
2041
2049
  ...l
2042
2050
  }, c) {
@@ -2047,33 +2055,33 @@ const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), hn = dt(function({
2047
2055
  i
2048
2056
  ].filter(Boolean).join(" "), d = ne((p) => {
2049
2057
  if (!p.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]')) {
2050
- if (n && a) {
2051
- a();
2058
+ if (n && o) {
2059
+ o();
2052
2060
  return;
2053
2061
  }
2054
- !n && o && o();
2062
+ !n && a && a();
2055
2063
  }
2056
- }, [n, a, o]);
2064
+ }, [n, o, a]);
2057
2065
  return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: n, side: r }, children: /* @__PURE__ */ e.jsx(
2058
2066
  "nav",
2059
2067
  {
2060
2068
  ref: c,
2061
2069
  className: u,
2062
2070
  onClick: d,
2063
- "data-expandable": n && a ? "" : void 0,
2064
- "data-collapsible": !n && o ? "" : void 0,
2071
+ "data-expandable": n && o ? "" : void 0,
2072
+ "data-collapsible": !n && a ? "" : void 0,
2065
2073
  ...l,
2066
2074
  children: s
2067
2075
  }
2068
2076
  ) });
2069
2077
  });
2070
- function xn({
2078
+ function bn({
2071
2079
  icon: t,
2072
2080
  label: s,
2073
2081
  selected: n = !1,
2074
2082
  disabled: r = !1,
2075
- href: a,
2076
- onClick: o,
2083
+ href: o,
2084
+ onClick: a,
2077
2085
  count: i,
2078
2086
  updated: l = !1,
2079
2087
  open: c = !1,
@@ -2081,12 +2089,12 @@ function xn({
2081
2089
  className: d = "",
2082
2090
  ...p
2083
2091
  }) {
2084
- const { collapsed: h, side: f } = le(_e), _ = le(Re), N = {
2092
+ const { collapsed: h, side: f } = le(_e), _ = le(Re), j = {
2085
2093
  className: [
2086
2094
  "ds-nav-rail__item",
2087
2095
  d
2088
2096
  ].filter(Boolean).join(" "),
2089
- onClick: r ? void 0 : o,
2097
+ onClick: r ? void 0 : a,
2090
2098
  "aria-current": n ? "page" : void 0,
2091
2099
  "aria-disabled": r ? "true" : void 0,
2092
2100
  "aria-label": h ? s : void 0,
@@ -2098,10 +2106,10 @@ function xn({
2098
2106
  "data-onboarding": u || void 0
2099
2107
  },
2100
2108
  ...p
2101
- }, T = i != null, A = f === "left" ? "right" : "left", x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2109
+ }, g = i != null, $ = f === "left" ? "right" : "left", x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2102
2110
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
2103
2111
  !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
2104
- !h && T && /* @__PURE__ */ e.jsx(
2112
+ !h && g && /* @__PURE__ */ e.jsx(
2105
2113
  "span",
2106
2114
  {
2107
2115
  className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
@@ -2109,28 +2117,28 @@ function xn({
2109
2117
  children: i
2110
2118
  }
2111
2119
  ),
2112
- !h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
2113
- h && T && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
2114
- h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
2115
- ] }), k = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...N, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...N, children: x });
2116
- return h && !_ ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: A, children: k }) : k;
2120
+ !h && l && (!g || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
2121
+ h && g && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
2122
+ h && l && (!g || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
2123
+ ] }), y = o ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : o, ...j, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: x });
2124
+ return h && !_ ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: $, children: y }) : y;
2117
2125
  }
2118
- function vn({ children: t, className: s = "", ...n }) {
2126
+ function _n({ children: t, className: s = "", ...n }) {
2119
2127
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
2120
2128
  }
2121
- function bn({ children: t, className: s = "", ...n }) {
2129
+ function jn({ children: t, className: s = "", ...n }) {
2122
2130
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
2123
2131
  }
2124
- function _n({ children: t, className: s = "", ...n }) {
2132
+ function Nn({ children: t, className: s = "", ...n }) {
2125
2133
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
2126
2134
  }
2127
- function jn({ className: t = "", ...s }) {
2135
+ function wn({ className: t = "", ...s }) {
2128
2136
  return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
2129
2137
  }
2130
- function Nn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...a }) {
2131
- const { collapsed: o } = le(_e), i = K(), l = s ?? i.recents, [c, u] = D(n);
2132
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
2133
- !o && /* @__PURE__ */ e.jsxs(
2138
+ function gn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...o }) {
2139
+ const { collapsed: a } = le(_e), i = K(), l = s ?? i.recents, [c, u] = L(n);
2140
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...o, children: [
2141
+ !a && /* @__PURE__ */ e.jsxs(
2134
2142
  "button",
2135
2143
  {
2136
2144
  type: "button",
@@ -2143,20 +2151,20 @@ function Nn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...
2143
2151
  ]
2144
2152
  }
2145
2153
  ),
2146
- (c || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
2154
+ (c || a) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
2147
2155
  ] });
2148
2156
  }
2149
- const wn = dt(function({
2157
+ const yn = ut(function({
2150
2158
  as: s = "button",
2151
2159
  avatar: n,
2152
2160
  label: r,
2153
- className: a = "",
2154
- ...o
2161
+ className: o = "",
2162
+ ...a
2155
2163
  }, i) {
2156
2164
  const { collapsed: l, side: c } = le(_e), u = le(Re), d = c === "left" ? "right" : "left", p = [
2157
2165
  "ds-nav-rail__item",
2158
2166
  "ds-nav-rail__agent",
2159
- a
2167
+ o
2160
2168
  ].filter(Boolean).join(" "), h = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2161
2169
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
2162
2170
  !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: r })
@@ -2167,20 +2175,20 @@ const wn = dt(function({
2167
2175
  className: p,
2168
2176
  "aria-label": l ? r : void 0,
2169
2177
  ...s === "button" ? { type: "button" } : {},
2170
- ...o,
2178
+ ...a,
2171
2179
  children: h
2172
2180
  }
2173
2181
  );
2174
2182
  return l && !u ? /* @__PURE__ */ e.jsx(Ve, { content: r, position: d, children: f }) : f;
2175
2183
  });
2176
- function gn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
2184
+ function kn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: o, onClick: a, className: i = "", ...l }) {
2177
2185
  const { collapsed: c, side: u } = le(_e), d = le(Re), f = {
2178
2186
  className: [
2179
2187
  "ds-nav-rail__item",
2180
2188
  "ds-nav-rail__agent",
2181
2189
  i
2182
2190
  ].filter(Boolean).join(" "),
2183
- onClick: r ? void 0 : o,
2191
+ onClick: r ? void 0 : a,
2184
2192
  "aria-current": n ? "page" : void 0,
2185
2193
  "aria-disabled": r ? "true" : void 0,
2186
2194
  tabIndex: r ? -1 : void 0,
@@ -2192,38 +2200,38 @@ function gn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
2192
2200
  }, _ = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2193
2201
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
2194
2202
  !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
2195
- ] }), j = u === "left" ? "right" : "left", y = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...f, children: _ }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: _ });
2196
- return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: j, children: y }) : y;
2203
+ ] }), w = u === "left" ? "right" : "left", T = o ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : o, ...f, children: _ }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: _ });
2204
+ return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: w, children: T }) : T;
2197
2205
  }
2198
- const tt = 240, st = 6, nt = 8;
2199
- function yn({
2206
+ const st = 240, nt = 6, rt = 8;
2207
+ function En({
2200
2208
  trigger: t,
2201
2209
  title: s,
2202
2210
  children: n,
2203
2211
  open: r,
2204
- onOpenChange: a,
2205
- defaultOpen: o = !1,
2212
+ onOpenChange: o,
2213
+ defaultOpen: a = !1,
2206
2214
  closeLabel: i
2207
2215
  }) {
2208
- const l = K(), { side: c } = le(_e), [u, d] = D(o), p = r !== void 0, h = p ? r : u, [f, _] = D(!1), j = R(null), y = R(null), [N, T] = D({}), A = ne(() => {
2209
- p ? a == null || a(!0) : d(!0);
2210
- }, [p, a]), x = ne(() => {
2211
- p ? a == null || a(!1) : d(!1);
2212
- }, [p, a]), k = ne(() => h ? x() : A(), [h, A, x]), w = ne(() => {
2216
+ const l = K(), { side: c } = le(_e), [u, d] = L(a), p = r !== void 0, h = p ? r : u, [f, _] = L(!1), w = S(null), T = S(null), [j, g] = L({}), $ = ne(() => {
2217
+ p ? o == null || o(!0) : d(!0);
2218
+ }, [p, o]), x = ne(() => {
2219
+ p ? o == null || o(!1) : d(!1);
2220
+ }, [p, o]), y = ne(() => h ? x() : $(), [h, $, x]), N = ne(() => {
2213
2221
  var M;
2214
- const L = j.current;
2215
- if (!L) return;
2216
- const W = L.getBoundingClientRect(), O = window.innerHeight, g = ((M = y.current) == null ? void 0 : M.offsetHeight) ?? 300, C = Math.max(nt, Math.min(O - g - nt, W.top));
2217
- T(c === "right" ? {
2222
+ const D = w.current;
2223
+ if (!D) return;
2224
+ const W = D.getBoundingClientRect(), O = window.innerHeight, k = ((M = T.current) == null ? void 0 : M.offsetHeight) ?? 300, C = Math.max(rt, Math.min(O - k - rt, W.top));
2225
+ g(c === "right" ? {
2218
2226
  position: "fixed",
2219
2227
  top: C,
2220
- right: window.innerWidth - W.left + st,
2221
- width: tt
2228
+ right: window.innerWidth - W.left + nt,
2229
+ width: st
2222
2230
  } : {
2223
2231
  position: "fixed",
2224
2232
  top: C,
2225
- left: W.right + st,
2226
- width: tt
2233
+ left: W.right + nt,
2234
+ width: st
2227
2235
  });
2228
2236
  }, [c]);
2229
2237
  P(() => {
@@ -2231,31 +2239,31 @@ function yn({
2231
2239
  _(!1);
2232
2240
  return;
2233
2241
  }
2234
- return w(), requestAnimationFrame(() => _(!0)), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
2235
- window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
2242
+ return N(), requestAnimationFrame(() => _(!0)), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
2243
+ window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
2236
2244
  };
2237
- }, [h, w]), P(() => {
2245
+ }, [h, N]), P(() => {
2238
2246
  if (!h) return;
2239
- const L = (O) => {
2240
- var g, C;
2241
- !((g = y.current) != null && g.contains(O.target)) && !((C = j.current) != null && C.contains(O.target)) && x();
2247
+ const D = (O) => {
2248
+ var k, C;
2249
+ !((k = T.current) != null && k.contains(O.target)) && !((C = w.current) != null && C.contains(O.target)) && x();
2242
2250
  }, W = (O) => {
2243
2251
  O.key === "Escape" && x();
2244
2252
  };
2245
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", W), () => {
2246
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", W);
2253
+ return document.addEventListener("mousedown", D), document.addEventListener("keydown", W), () => {
2254
+ document.removeEventListener("mousedown", D), document.removeEventListener("keydown", W);
2247
2255
  };
2248
2256
  }, [h, x]);
2249
- const I = h && /* @__PURE__ */ e.jsxs(
2257
+ const B = h && /* @__PURE__ */ e.jsxs(
2250
2258
  "div",
2251
2259
  {
2252
- ref: y,
2260
+ ref: T,
2253
2261
  className: [
2254
2262
  "ds-nav-rail-flyout",
2255
2263
  `ds-nav-rail-flyout--${c}`,
2256
2264
  f && "ds-nav-rail-flyout--visible"
2257
2265
  ].filter(Boolean).join(" "),
2258
- style: N,
2266
+ style: j,
2259
2267
  "data-ds-portal": "",
2260
2268
  role: "dialog",
2261
2269
  "aria-modal": "false",
@@ -2278,27 +2286,27 @@ function yn({
2278
2286
  }
2279
2287
  );
2280
2288
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2281
- /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: j, onClick: k, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2282
- typeof document < "u" && re.createPortal(I, document.body)
2289
+ /* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: w, onClick: y, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
2290
+ typeof document < "u" && re.createPortal(B, document.body)
2283
2291
  ] });
2284
2292
  }
2285
- const es = {
2293
+ const ss = {
2286
2294
  info: We,
2287
- success: Fe,
2288
- warning: ze,
2295
+ success: ze,
2296
+ warning: Fe,
2289
2297
  error: Me
2290
2298
  };
2291
- function kn({
2299
+ function Tn({
2292
2300
  children: t,
2293
2301
  variant: s = "info",
2294
2302
  action: n,
2295
2303
  onAction: r,
2296
- onDismiss: a,
2297
- role: o,
2304
+ onDismiss: o,
2305
+ role: a,
2298
2306
  dismissLabel: i,
2299
2307
  ...l
2300
2308
  }) {
2301
- const c = K(), u = es[s], d = o || (s === "error" ? "alert" : "status");
2309
+ const c = K(), u = ss[s], d = a || (s === "error" ? "alert" : "status");
2302
2310
  return /* @__PURE__ */ e.jsxs(
2303
2311
  "div",
2304
2312
  {
@@ -2317,12 +2325,12 @@ function kn({
2317
2325
  children: n
2318
2326
  }
2319
2327
  ),
2320
- a && /* @__PURE__ */ e.jsx(
2328
+ o && /* @__PURE__ */ e.jsx(
2321
2329
  "button",
2322
2330
  {
2323
2331
  type: "button",
2324
2332
  className: "ds-banner-dismiss",
2325
- onClick: a,
2333
+ onClick: o,
2326
2334
  "aria-label": i ?? c.dismiss,
2327
2335
  children: /* @__PURE__ */ e.jsx(te, { size: q[2], strokeWidth: 1.5 })
2328
2336
  }
@@ -2331,127 +2339,127 @@ function kn({
2331
2339
  }
2332
2340
  );
2333
2341
  }
2334
- function En({
2342
+ function $n({
2335
2343
  trigger: t,
2336
2344
  items: s = [],
2337
2345
  open: n,
2338
2346
  onOpenChange: r,
2339
- align: a = "left",
2340
- fullWidth: o = !1,
2347
+ align: o = "left",
2348
+ fullWidth: a = !1,
2341
2349
  className: i = "",
2342
2350
  style: l,
2343
2351
  ...c
2344
2352
  }) {
2345
- const [u, d] = D(!1), [p, h] = D(!1), f = n !== void 0, _ = f ? n : u, j = R(null), y = R(null), N = R(null), T = R(null), [A, x] = D({}), k = R(null), w = 150, I = () => {
2353
+ const [u, d] = L(!1), [p, h] = L(!1), f = n !== void 0, _ = f ? n : u, w = S(null), T = S(null), j = S(null), g = S(null), [$, x] = L({}), y = S(null), N = 150, B = () => {
2346
2354
  if (f)
2347
2355
  r == null || r(!1);
2348
2356
  else {
2349
2357
  if (p) return;
2350
- h(!0), k.current = setTimeout(() => {
2358
+ h(!0), y.current = setTimeout(() => {
2351
2359
  d(!1), h(!1);
2352
- }, w);
2360
+ }, N);
2353
2361
  }
2354
- }, L = () => {
2362
+ }, D = () => {
2355
2363
  const v = !_;
2356
- f ? r == null || r(v) : v ? (clearTimeout(k.current), h(!1), d(!0)) : I();
2364
+ f ? r == null || r(v) : v ? (clearTimeout(y.current), h(!1), d(!0)) : B();
2357
2365
  }, W = () => {
2358
- _ || (f ? r == null || r(!0) : (clearTimeout(k.current), h(!1), d(!0)));
2366
+ _ || (f ? r == null || r(!0) : (clearTimeout(y.current), h(!1), d(!0)));
2359
2367
  };
2360
- P(() => () => clearTimeout(k.current), []), P(() => {
2368
+ P(() => () => clearTimeout(y.current), []), P(() => {
2361
2369
  if (!_) return;
2362
- const v = 300, $ = () => {
2370
+ const v = 300, R = () => {
2363
2371
  var Y;
2364
- const S = (Y = j.current) == null ? void 0 : Y.getBoundingClientRect();
2365
- if (!S) return;
2366
- const z = window.innerHeight - S.bottom, H = z < v + 8 && S.top > z;
2372
+ const A = (Y = w.current) == null ? void 0 : Y.getBoundingClientRect();
2373
+ if (!A) return;
2374
+ const F = window.innerHeight - A.bottom, H = F < v + 8 && A.top > F;
2367
2375
  x(
2368
- a === "right" ? H ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : H ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
2376
+ o === "right" ? H ? { bottom: window.innerHeight - A.top + 4, top: "auto", right: window.innerWidth - A.right } : { top: A.bottom + 4, bottom: "auto", right: window.innerWidth - A.right } : H ? { bottom: window.innerHeight - A.top + 4, top: "auto", left: A.left } : { top: A.bottom + 4, bottom: "auto", left: A.left }
2369
2377
  );
2370
2378
  };
2371
- return $(), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
2372
- window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
2379
+ return R(), window.addEventListener("scroll", R, !0), window.addEventListener("resize", R), () => {
2380
+ window.removeEventListener("scroll", R, !0), window.removeEventListener("resize", R);
2373
2381
  };
2374
- }, [_, a]);
2382
+ }, [_, o]);
2375
2383
  const O = () => {
2376
- var $;
2377
- const v = ($ = N.current) == null ? void 0 : $.querySelector(
2384
+ var R;
2385
+ const v = (R = j.current) == null ? void 0 : R.querySelector(
2378
2386
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
2379
2387
  );
2380
2388
  v == null || v.focus();
2381
2389
  };
2382
2390
  P(() => {
2383
2391
  if (!_) return;
2384
- const v = (S) => {
2385
- var z, H;
2386
- !((z = j.current) != null && z.contains(S.target)) && !((H = y.current) != null && H.contains(S.target)) && I();
2387
- }, $ = (S) => {
2388
- S.key === "Escape" && (I(), O());
2392
+ const v = (A) => {
2393
+ var F, H;
2394
+ !((F = w.current) != null && F.contains(A.target)) && !((H = T.current) != null && H.contains(A.target)) && B();
2395
+ }, R = (A) => {
2396
+ A.key === "Escape" && (B(), O());
2389
2397
  };
2390
- return document.addEventListener("mousedown", v), document.addEventListener("keydown", $), () => {
2391
- document.removeEventListener("mousedown", v), document.removeEventListener("keydown", $);
2398
+ return document.addEventListener("mousedown", v), document.addEventListener("keydown", R), () => {
2399
+ document.removeEventListener("mousedown", v), document.removeEventListener("keydown", R);
2392
2400
  };
2393
2401
  }, [_]), P(() => {
2394
- if (!_ || !T.current || !y.current) return;
2395
- const v = g(), $ = T.current === "last" ? v[v.length - 1] : v[0];
2396
- $ == null || $.focus(), T.current = null;
2402
+ if (!_ || !g.current || !T.current) return;
2403
+ const v = k(), R = g.current === "last" ? v[v.length - 1] : v[0];
2404
+ R == null || R.focus(), g.current = null;
2397
2405
  }, [_]);
2398
- const g = () => y.current ? [...y.current.querySelectorAll(
2406
+ const k = () => T.current ? [...T.current.querySelectorAll(
2399
2407
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2400
2408
  )] : [], C = (v) => {
2401
- var $, S;
2409
+ var R, A;
2402
2410
  if (v.key === "ArrowDown")
2403
- v.preventDefault(), _ ? ($ = g()[0]) == null || $.focus() : (T.current = "first", W());
2411
+ v.preventDefault(), _ ? (R = k()[0]) == null || R.focus() : (g.current = "first", W());
2404
2412
  else if (v.key === "ArrowUp")
2405
2413
  if (v.preventDefault(), !_)
2406
- T.current = "last", W();
2414
+ g.current = "last", W();
2407
2415
  else {
2408
- const z = g();
2409
- (S = z[z.length - 1]) == null || S.focus();
2416
+ const F = k();
2417
+ (A = F[F.length - 1]) == null || A.focus();
2410
2418
  }
2411
2419
  }, M = (v) => {
2412
- var z, H, Y, m;
2413
- const $ = g(), S = $.findIndex((b) => b === document.activeElement);
2420
+ var F, H, Y, m;
2421
+ const R = k(), A = R.findIndex((b) => b === document.activeElement);
2414
2422
  switch (v.key) {
2415
2423
  case "ArrowDown":
2416
- v.preventDefault(), (z = $[Math.min(S + 1, $.length - 1)]) == null || z.focus();
2424
+ v.preventDefault(), (F = R[Math.min(A + 1, R.length - 1)]) == null || F.focus();
2417
2425
  break;
2418
2426
  case "ArrowUp":
2419
- v.preventDefault(), S <= 0 ? O() : (H = $[S - 1]) == null || H.focus();
2427
+ v.preventDefault(), A <= 0 ? O() : (H = R[A - 1]) == null || H.focus();
2420
2428
  break;
2421
2429
  case "Home":
2422
- v.preventDefault(), (Y = $[0]) == null || Y.focus();
2430
+ v.preventDefault(), (Y = R[0]) == null || Y.focus();
2423
2431
  break;
2424
2432
  case "End":
2425
- v.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
2433
+ v.preventDefault(), (m = R[R.length - 1]) == null || m.focus();
2426
2434
  break;
2427
2435
  case "Tab":
2428
- I();
2436
+ B();
2429
2437
  break;
2430
2438
  }
2431
2439
  }, V = _ && /* @__PURE__ */ e.jsx(
2432
2440
  "div",
2433
2441
  {
2434
- ref: y,
2442
+ ref: T,
2435
2443
  role: "menu",
2436
2444
  "data-ds-portal": "",
2437
2445
  className: [
2438
2446
  "ds-dropdown__menu",
2439
- `ds-dropdown__menu--${a}`,
2447
+ `ds-dropdown__menu--${o}`,
2440
2448
  p && "ds-dropdown__menu--closing"
2441
2449
  ].filter(Boolean).join(" "),
2442
- style: A,
2450
+ style: $,
2443
2451
  onKeyDown: M,
2444
- children: s.map((v, $) => {
2452
+ children: s.map((v, R) => {
2445
2453
  if (v.separator)
2446
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, $);
2454
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, R);
2447
2455
  if (v.type === "section")
2448
2456
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
2449
2457
  v.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: v.label }),
2450
2458
  /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: v.content })
2451
- ] }, $);
2452
- const S = !!v.href, z = S ? "a" : "button", H = S ? { href: v.disabled ? void 0 : v.href, "aria-disabled": v.disabled ? "true" : void 0 } : { type: "button", disabled: v.disabled };
2459
+ ] }, R);
2460
+ const A = !!v.href, F = A ? "a" : "button", H = A ? { href: v.disabled ? void 0 : v.href, "aria-disabled": v.disabled ? "true" : void 0 } : { type: "button", disabled: v.disabled };
2453
2461
  return /* @__PURE__ */ e.jsxs(
2454
- z,
2462
+ F,
2455
2463
  {
2456
2464
  role: "menuitem",
2457
2465
  className: [
@@ -2461,7 +2469,7 @@ function En({
2461
2469
  ...H,
2462
2470
  onClick: () => {
2463
2471
  var Y;
2464
- (Y = v.onClick) == null || Y.call(v), I();
2472
+ (Y = v.onClick) == null || Y.call(v), B();
2465
2473
  },
2466
2474
  children: [
2467
2475
  v.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: v.icon }),
@@ -2469,7 +2477,7 @@ function En({
2469
2477
  v.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: v.shortcut })
2470
2478
  ]
2471
2479
  },
2472
- $
2480
+ R
2473
2481
  );
2474
2482
  })
2475
2483
  }
@@ -2477,17 +2485,17 @@ function En({
2477
2485
  return /* @__PURE__ */ e.jsxs(
2478
2486
  "div",
2479
2487
  {
2480
- ref: j,
2481
- className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2488
+ ref: w,
2489
+ className: ["ds-dropdown", a && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2482
2490
  style: l,
2483
2491
  ...c,
2484
2492
  children: [
2485
2493
  /* @__PURE__ */ e.jsx(
2486
2494
  "div",
2487
2495
  {
2488
- ref: N,
2496
+ ref: j,
2489
2497
  className: "ds-dropdown__trigger",
2490
- onClick: L,
2498
+ onClick: D,
2491
2499
  onKeyDown: C,
2492
2500
  children: t
2493
2501
  }
@@ -2497,22 +2505,22 @@ function En({
2497
2505
  }
2498
2506
  );
2499
2507
  }
2500
- function Tn({
2508
+ function Rn({
2501
2509
  value: t = 0,
2502
2510
  size: s = "m",
2503
2511
  variant: n = "default",
2504
2512
  showValue: r = !1,
2505
- min: a = 2,
2506
- animate: o = !0
2513
+ min: o = 2,
2514
+ animate: a = !0
2507
2515
  }) {
2508
- const i = Math.min(100, Math.max(0, t)), l = Math.max(a, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2516
+ const i = Math.min(100, Math.max(0, t)), l = Math.max(o, i), c = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2509
2517
  return /* @__PURE__ */ e.jsxs(
2510
2518
  "div",
2511
2519
  {
2512
2520
  className: [
2513
2521
  "ds-progress",
2514
2522
  `ds-progress--${s}`,
2515
- !o && "ds-progress--instant"
2523
+ !a && "ds-progress--instant"
2516
2524
  ].filter(Boolean).join(" "),
2517
2525
  role: "progressbar",
2518
2526
  "aria-valuenow": i,
@@ -2534,84 +2542,84 @@ function Tn({
2534
2542
  }
2535
2543
  );
2536
2544
  }
2537
- const ts = (t) => 1 - Math.pow(1 - t, 3), ss = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2538
- function ns(t, { duration: s = 600 } = {}) {
2539
- const [n, r] = D(t), a = R(t), o = R(null);
2545
+ const ns = (t) => 1 - Math.pow(1 - t, 3), rs = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2546
+ function os(t, { duration: s = 600 } = {}) {
2547
+ const [n, r] = L(t), o = S(t), a = S(null);
2540
2548
  return P(() => {
2541
- if (ss()) {
2542
- r(t), a.current = t;
2549
+ if (rs()) {
2550
+ r(t), o.current = t;
2543
2551
  return;
2544
2552
  }
2545
- const i = a.current, l = t - i;
2553
+ const i = o.current, l = t - i;
2546
2554
  if (l === 0) return;
2547
2555
  let c = null;
2548
2556
  const u = (d) => {
2549
2557
  c || (c = d);
2550
2558
  const p = Math.min((d - c) / s, 1);
2551
- r(i + l * ts(p)), p < 1 ? o.current = requestAnimationFrame(u) : a.current = t;
2559
+ r(i + l * ns(p)), p < 1 ? a.current = requestAnimationFrame(u) : o.current = t;
2552
2560
  };
2553
- return o.current = requestAnimationFrame(u), () => cancelAnimationFrame(o.current);
2561
+ return a.current = requestAnimationFrame(u), () => cancelAnimationFrame(a.current);
2554
2562
  }, [t, s]), n;
2555
2563
  }
2556
- function $n({
2564
+ function Sn({
2557
2565
  value: t,
2558
2566
  duration: s = 600,
2559
2567
  decimals: n = 0,
2560
2568
  prefix: r = "",
2561
- suffix: a = ""
2569
+ suffix: o = ""
2562
2570
  }) {
2563
- const i = ns(t, { duration: s }).toFixed(n);
2564
- return `${r}${i}${a}`;
2571
+ const i = os(t, { duration: s }).toFixed(n);
2572
+ return `${r}${i}${o}`;
2565
2573
  }
2566
- function rs({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2567
- const r = R(null), [a, o] = D(!1);
2574
+ function as({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
2575
+ const r = S(null), [o, a] = L(!1);
2568
2576
  return P(() => {
2569
2577
  const i = r.current;
2570
2578
  if (!i) return;
2571
2579
  const l = new IntersectionObserver(
2572
2580
  ([c]) => {
2573
- c.isIntersecting ? (o(!0), n && l.disconnect()) : n || o(!1);
2581
+ c.isIntersecting ? (a(!0), n && l.disconnect()) : n || a(!1);
2574
2582
  },
2575
2583
  { threshold: t, rootMargin: s }
2576
2584
  );
2577
2585
  return l.observe(i), () => l.disconnect();
2578
- }, [t, s, n]), { ref: r, inView: a };
2586
+ }, [t, s, n]), { ref: r, inView: o };
2579
2587
  }
2580
- function Rn({
2588
+ function An({
2581
2589
  children: t,
2582
2590
  as: s = "div",
2583
2591
  once: n = !1,
2584
2592
  threshold: r = 0.1,
2585
- rootMargin: a = "0px",
2586
- onEnter: o,
2593
+ rootMargin: o = "0px",
2594
+ onEnter: a,
2587
2595
  onLeave: i,
2588
2596
  ...l
2589
2597
  }) {
2590
- const { ref: c, inView: u } = rs({ threshold: r, rootMargin: a, once: n }), d = R(!1);
2598
+ const { ref: c, inView: u } = as({ threshold: r, rootMargin: o, once: n }), d = S(!1);
2591
2599
  return P(() => {
2592
- u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
2600
+ u && !d.current && (a == null || a()), !u && d.current && (i == null || i()), d.current = u;
2593
2601
  }, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
2594
2602
  }
2595
- const rt = {
2603
+ const ot = {
2596
2604
  default: We,
2597
- success: Fe,
2598
- warning: ze,
2605
+ success: ze,
2606
+ warning: Fe,
2599
2607
  error: Me
2600
2608
  };
2601
2609
  let ve = [];
2602
- const Le = /* @__PURE__ */ new Set();
2603
- function mt() {
2604
- Le.forEach((t) => t([...ve]));
2610
+ const De = /* @__PURE__ */ new Set();
2611
+ function pt() {
2612
+ De.forEach((t) => t([...ve]));
2605
2613
  }
2606
- function as(t) {
2607
- ve = [...ve, t], mt();
2614
+ function is(t) {
2615
+ ve = [...ve, t], pt();
2608
2616
  }
2609
- function os(t) {
2610
- ve = ve.filter((s) => s.id !== t), mt();
2617
+ function ls(t) {
2618
+ ve = ve.filter((s) => s.id !== t), pt();
2611
2619
  }
2612
- function Sn() {
2620
+ function Bn() {
2613
2621
  const t = (s, n = {}) => {
2614
- as({
2622
+ is({
2615
2623
  id: `${Date.now()}-${Math.random()}`,
2616
2624
  message: s,
2617
2625
  type: "default",
@@ -2621,15 +2629,15 @@ function Sn() {
2621
2629
  };
2622
2630
  return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
2623
2631
  }
2624
- function is({ data: t, onDismiss: s }) {
2625
- const n = K(), [r, a] = D(!1), o = R(null), i = R(null);
2626
- P(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => l(), t.duration)), () => {
2627
- clearTimeout(o.current), clearTimeout(i.current);
2632
+ function cs({ data: t, onDismiss: s }) {
2633
+ const n = K(), [r, o] = L(!1), a = S(null), i = S(null);
2634
+ P(() => (requestAnimationFrame(() => o(!0)), t.duration > 0 && (a.current = setTimeout(() => l(), t.duration)), () => {
2635
+ clearTimeout(a.current), clearTimeout(i.current);
2628
2636
  }), []);
2629
2637
  function l() {
2630
- a(!1), i.current = setTimeout(() => s(t.id), 250);
2638
+ o(!1), i.current = setTimeout(() => s(t.id), 250);
2631
2639
  }
2632
- const c = rt[t.type] ?? rt.default;
2640
+ const c = ot[t.type] ?? ot.default;
2633
2641
  return /* @__PURE__ */ e.jsxs(
2634
2642
  "div",
2635
2643
  {
@@ -2656,25 +2664,25 @@ function is({ data: t, onDismiss: s }) {
2656
2664
  }
2657
2665
  );
2658
2666
  }
2659
- function An({ position: t = "bottom-right" }) {
2660
- const [s, n] = D(() => [...ve]);
2661
- return P(() => (Le.add(n), () => Le.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2662
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(is, { data: r, onDismiss: os }, r.id)) }),
2667
+ function In({ position: t = "bottom-right" }) {
2668
+ const [s, n] = L(() => [...ve]);
2669
+ return P(() => (De.add(n), () => De.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
2670
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(cs, { data: r, onDismiss: ls }, r.id)) }),
2663
2671
  document.body
2664
2672
  );
2665
2673
  }
2666
- const ls = {
2674
+ const ds = {
2667
2675
  running: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "info", children: "Running..." }),
2668
2676
  success: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "success", children: "Done" }),
2669
2677
  error: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "error", children: "Error" })
2670
2678
  };
2671
- function Bn({
2679
+ function Dn({
2672
2680
  label: t,
2673
2681
  status: s = "idle",
2674
2682
  icon: n,
2675
2683
  badge: r,
2676
- defaultExpanded: a = !1,
2677
- expanded: o,
2684
+ defaultExpanded: o = !1,
2685
+ expanded: a,
2678
2686
  onToggle: i,
2679
2687
  children: l,
2680
2688
  className: c = "",
@@ -2683,7 +2691,7 @@ function Bn({
2683
2691
  const d = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2684
2692
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2685
2693
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2686
- ls[s],
2694
+ ds[s],
2687
2695
  r
2688
2696
  ] });
2689
2697
  return l ? /* @__PURE__ */ e.jsx(
@@ -2696,8 +2704,8 @@ function Bn({
2696
2704
  {
2697
2705
  title: p,
2698
2706
  padding: "s",
2699
- defaultExpanded: a,
2700
- expanded: d ? !1 : o,
2707
+ defaultExpanded: o,
2708
+ expanded: d ? !1 : a,
2701
2709
  onToggle: d ? void 0 : i,
2702
2710
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2703
2711
  }
@@ -2712,14 +2720,14 @@ function Bn({
2712
2720
  }
2713
2721
  );
2714
2722
  }
2715
- function cs({
2723
+ function us({
2716
2724
  text: t,
2717
2725
  size: s = "xs",
2718
2726
  timeout: n = 800,
2719
2727
  "aria-label": r,
2720
- ...a
2728
+ ...o
2721
2729
  }) {
2722
- const o = K(), [i, l] = D(!1), c = R(null), u = (d) => {
2730
+ const a = K(), [i, l] = L(!1), c = S(null), u = (d) => {
2723
2731
  d.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
2724
2732
  l(!0), clearTimeout(c.current), c.current = setTimeout(() => l(!1), n);
2725
2733
  });
@@ -2730,49 +2738,49 @@ function cs({
2730
2738
  variant: "ghost",
2731
2739
  size: s,
2732
2740
  state: i ? "success" : "idle",
2733
- icon: /* @__PURE__ */ e.jsx(Et, { size: q[1], strokeWidth: 1.5 }),
2734
- "aria-label": r ?? o.copyToClipboard,
2741
+ icon: /* @__PURE__ */ e.jsx(Tt, { size: q[1], strokeWidth: 1.5 }),
2742
+ "aria-label": r ?? a.copyToClipboard,
2735
2743
  onClick: u,
2736
- ...a
2744
+ ...o
2737
2745
  }
2738
2746
  );
2739
2747
  }
2740
- function In({ content: t, streaming: s = !1, ...n }) {
2741
- const [r, a] = D(s);
2748
+ function Ln({ content: t, streaming: s = !1, ...n }) {
2749
+ const [r, o] = L(s);
2742
2750
  return P(() => {
2743
- a(!!s);
2751
+ o(!!s);
2744
2752
  }, [s]), /* @__PURE__ */ e.jsx(
2745
2753
  He,
2746
2754
  {
2747
2755
  expanded: r,
2748
- onToggle: a,
2756
+ onToggle: o,
2749
2757
  padding: "s",
2750
2758
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2751
- /* @__PURE__ */ e.jsx(Tt, { size: q[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2752
- /* @__PURE__ */ e.jsx(Ft, { secondary: !0, children: "Thinking" })
2759
+ /* @__PURE__ */ e.jsx($t, { size: q[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2760
+ /* @__PURE__ */ e.jsx(Wt, { secondary: !0, children: "Thinking" })
2753
2761
  ] }),
2754
2762
  ...n,
2755
- children: /* @__PURE__ */ e.jsxs(ft, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2763
+ children: /* @__PURE__ */ e.jsxs(mt, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2756
2764
  t,
2757
2765
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2758
2766
  ] })
2759
2767
  }
2760
2768
  );
2761
2769
  }
2762
- function Ln({
2770
+ function Pn({
2763
2771
  count: t,
2764
2772
  current: s = 0,
2765
2773
  done: n = [],
2766
2774
  onChange: r,
2767
- showCounter: a = !0,
2768
- className: o = "",
2775
+ showCounter: o = !0,
2776
+ className: a = "",
2769
2777
  "aria-label": i,
2770
2778
  ...l
2771
2779
  }) {
2772
2780
  const c = K(), { t: u } = be();
2773
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2781
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", a].filter(Boolean).join(" "), ...l, children: [
2774
2782
  /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i ?? c.steps, children: Array.from({ length: t }, (d, p) => {
2775
- const h = p === s, f = n.includes(p) && !h, _ = r && (p <= s || n.includes(p)), j = [
2783
+ const h = p === s, f = n.includes(p) && !h, _ = r && (p <= s || n.includes(p)), w = [
2776
2784
  "ds-step-indicator__dot",
2777
2785
  h && "ds-step-indicator__dot--active",
2778
2786
  f && "ds-step-indicator__dot--done"
@@ -2781,7 +2789,7 @@ function Ln({
2781
2789
  "button",
2782
2790
  {
2783
2791
  type: "button",
2784
- className: j,
2792
+ className: w,
2785
2793
  role: "tab",
2786
2794
  "aria-selected": h,
2787
2795
  "aria-label": u("stepN", { n: p + 1 }),
@@ -2792,81 +2800,81 @@ function Ln({
2792
2800
  p
2793
2801
  );
2794
2802
  }) }),
2795
- a && /* @__PURE__ */ e.jsxs(ft, { secondary: !0, className: "ds-step-indicator__counter", children: [
2803
+ o && /* @__PURE__ */ e.jsxs(mt, { secondary: !0, className: "ds-step-indicator__counter", children: [
2796
2804
  s + 1,
2797
2805
  " / ",
2798
2806
  t
2799
2807
  ] })
2800
2808
  ] });
2801
2809
  }
2802
- function Dn({
2810
+ function Mn({
2803
2811
  content: t,
2804
2812
  isStreaming: s = !1,
2805
2813
  cursor: n = "line",
2806
2814
  onChunk: r,
2807
- className: a = "",
2808
- ...o
2815
+ className: o = "",
2816
+ ...a
2809
2817
  }) {
2810
- const i = R(t);
2818
+ const i = S(t);
2811
2819
  return P(() => {
2812
2820
  t !== i.current && (r == null || r(t), i.current = t);
2813
- }, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...o, children: [
2821
+ }, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...a, children: [
2814
2822
  t,
2815
2823
  s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2816
2824
  ] });
2817
2825
  }
2818
- function Pn({
2826
+ function Fn({
2819
2827
  role: t = "assistant",
2820
2828
  header: s,
2821
2829
  footer: n,
2822
2830
  attachments: r,
2823
- isStreaming: a = !1,
2824
- children: o,
2831
+ isStreaming: o = !1,
2832
+ children: a,
2825
2833
  className: i = "",
2826
2834
  ...l
2827
2835
  }) {
2828
2836
  const c = [
2829
2837
  "ds-chat-message",
2830
2838
  `ds-chat-message--${t}`,
2831
- a && "ds-chat-message--streaming",
2839
+ o && "ds-chat-message--streaming",
2832
2840
  i
2833
2841
  ].filter(Boolean).join(" ");
2834
- return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: c, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: o }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2842
+ return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: c, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: a }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2835
2843
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2836
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: o }),
2844
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: a }),
2837
2845
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2838
2846
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
2839
2847
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
2840
2848
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: r }),
2841
- /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: o }),
2849
+ /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: a }),
2842
2850
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2843
2851
  ] });
2844
2852
  }
2845
- function Mn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2846
- const r = R(!1), a = R(0);
2853
+ function zn(t, { containerRef: s, smartPause: n = !0 } = {}) {
2854
+ const r = S(!1), o = S(0);
2847
2855
  P(() => {
2848
- const o = s == null ? void 0 : s.current;
2849
- if (!o) return;
2856
+ const a = s == null ? void 0 : s.current;
2857
+ if (!a) return;
2850
2858
  const i = () => {
2851
- const l = o.scrollHeight - o.scrollTop - o.clientHeight < 64;
2852
- !l && o.scrollTop < a.current && (r.current = !0), l && (r.current = !1), a.current = o.scrollTop;
2859
+ const l = a.scrollHeight - a.scrollTop - a.clientHeight < 64;
2860
+ !l && a.scrollTop < o.current && (r.current = !0), l && (r.current = !1), o.current = a.scrollTop;
2853
2861
  };
2854
- return o.addEventListener("scroll", i, { passive: !0 }), () => o.removeEventListener("scroll", i);
2862
+ return a.addEventListener("scroll", i, { passive: !0 }), () => a.removeEventListener("scroll", i);
2855
2863
  }, [s]), P(() => {
2856
- const o = s == null ? void 0 : s.current;
2857
- o && (n && r.current || (o.scrollTop = o.scrollHeight));
2864
+ const a = s == null ? void 0 : s.current;
2865
+ a && (n && r.current || (a.scrollTop = a.scrollHeight));
2858
2866
  }, t);
2859
2867
  }
2860
- function ds({
2868
+ function fs({
2861
2869
  prompts: t,
2862
2870
  enabled: s,
2863
2871
  typingSpeed: n = 38,
2864
2872
  erasingSpeed: r = 18,
2865
- holdTime: a = 2200,
2866
- betweenTime: o = 380,
2873
+ holdTime: o = 2200,
2874
+ betweenTime: a = 380,
2867
2875
  manualPauseMs: i = 5e3
2868
2876
  }) {
2869
- const [l, c] = D(0), [u, d] = D(""), p = R("typing"), h = R(0), f = R(0), _ = R(null), j = R(0);
2877
+ const [l, c] = L(0), [u, d] = L(""), p = S("typing"), h = S(0), f = S(0), _ = S(null), w = S(0);
2870
2878
  P(() => {
2871
2879
  f.current = l;
2872
2880
  }, [l]), P(() => {
@@ -2875,33 +2883,33 @@ function ds({
2875
2883
  return;
2876
2884
  }
2877
2885
  const x = () => {
2878
- const k = Date.now();
2879
- if (j.current > k) {
2880
- _.current = setTimeout(x, j.current - k);
2886
+ const y = Date.now();
2887
+ if (w.current > y) {
2888
+ _.current = setTimeout(x, w.current - y);
2881
2889
  return;
2882
2890
  }
2883
- const w = t[f.current % t.length] ?? "";
2884
- p.current === "typing" ? (h.current += 1, d(w.slice(0, h.current)), h.current >= w.length ? (p.current = "holding", _.current = setTimeout(x, a)) : _.current = setTimeout(x, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", _.current = setTimeout(x, r)) : (h.current = Math.max(0, h.current - 1), d(w.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), _.current = setTimeout(x, o)) : _.current = setTimeout(x, r));
2891
+ const N = t[f.current % t.length] ?? "";
2892
+ p.current === "typing" ? (h.current += 1, d(N.slice(0, h.current)), h.current >= N.length ? (p.current = "holding", _.current = setTimeout(x, o)) : _.current = setTimeout(x, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", _.current = setTimeout(x, r)) : (h.current = Math.max(0, h.current - 1), d(N.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), _.current = setTimeout(x, a)) : _.current = setTimeout(x, r));
2885
2893
  };
2886
2894
  return _.current = setTimeout(x, 260), () => {
2887
2895
  _.current && clearTimeout(_.current);
2888
2896
  };
2889
- }, [s, t, n, r, a, o]);
2890
- const y = (x) => {
2897
+ }, [s, t, n, r, o, a]);
2898
+ const T = (x) => {
2891
2899
  if (t.length === 0) return;
2892
- const k = (x % t.length + t.length) % t.length, w = t[k];
2893
- f.current = k, h.current = w.length, p.current = "holding", j.current = Date.now() + i, c(k), d(w);
2894
- }, N = () => y(f.current + 1), T = () => y(f.current - 1), A = t[l % t.length] ?? "";
2895
- return { displayed: u, currentPrompt: A, index: l, next: N, prev: T };
2900
+ const y = (x % t.length + t.length) % t.length, N = t[y];
2901
+ f.current = y, h.current = N.length, p.current = "holding", w.current = Date.now() + i, c(y), d(N);
2902
+ }, j = () => T(f.current + 1), g = () => T(f.current - 1), $ = t[l % t.length] ?? "";
2903
+ return { displayed: u, currentPrompt: $, index: l, next: j, prev: g };
2896
2904
  }
2897
- let us = 0;
2898
- function zn({
2905
+ let ms = 0;
2906
+ function Wn({
2899
2907
  value: t = "",
2900
2908
  onChange: s,
2901
2909
  onSubmit: n,
2902
2910
  onStop: r,
2903
- onKeyDown: a,
2904
- loading: o = !1,
2911
+ onKeyDown: o,
2912
+ loading: a = !1,
2905
2913
  disabled: i = !1,
2906
2914
  placeholder: l,
2907
2915
  animatedPlaceholders: c,
@@ -2911,82 +2919,82 @@ function zn({
2911
2919
  onAttachImages: h,
2912
2920
  onRemoveAttachment: f,
2913
2921
  onRemoveImage: _,
2914
- acceptImage: j,
2915
- acceptFile: y,
2916
- maxImages: N,
2917
- maxImageSize: T,
2918
- leftSlot: A,
2922
+ acceptImage: w,
2923
+ acceptFile: T,
2924
+ maxImages: j,
2925
+ maxImageSize: g,
2926
+ leftSlot: $,
2919
2927
  rightSlot: x,
2920
- className: k = "",
2921
- ...w
2928
+ className: y = "",
2929
+ ...N
2922
2930
  }) {
2923
- const I = K(), { t: L } = be(), W = R(null), O = R(null), g = R(0), [C, M] = D(!1), [V, v] = D([]), $ = R(/* @__PURE__ */ new Set()), S = l ?? I.promptPlaceholder, z = (E) => {
2924
- const F = ++us;
2925
- v((Z) => [...Z, { id: F, msg: E }]);
2931
+ const B = K(), { t: D } = be(), W = S(null), O = S(null), k = S(0), [C, M] = L(!1), [V, v] = L([]), R = S(/* @__PURE__ */ new Set()), A = l ?? B.promptPlaceholder, F = (E) => {
2932
+ const z = ++ms;
2933
+ v((Z) => [...Z, { id: z, msg: E }]);
2926
2934
  const J = setTimeout(() => {
2927
- $.current.delete(J), v((Z) => Z.filter((ee) => ee.id !== F));
2935
+ R.current.delete(J), v((Z) => Z.filter((ee) => ee.id !== z));
2928
2936
  }, 6e3);
2929
- $.current.add(J);
2937
+ R.current.add(J);
2930
2938
  };
2931
2939
  P(() => {
2932
- const E = $.current;
2940
+ const E = R.current;
2933
2941
  return () => E.forEach(clearTimeout);
2934
2942
  }, []);
2935
- const H = (E) => v((F) => F.filter((J) => J.id !== E)), Y = (E) => E.type.startsWith("image/"), m = () => !0, b = j ?? Y, B = y ?? m, U = (E) => {
2936
- const F = [], J = [], Z = [], ee = [];
2937
- let oe = 0, me = N != null ? N - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2943
+ const H = (E) => v((z) => z.filter((J) => J.id !== E)), Y = (E) => E.type.startsWith("image/"), m = () => !0, b = w ?? Y, I = T ?? m, U = (E) => {
2944
+ const z = [], J = [], Z = [], ee = [];
2945
+ let ae = 0, me = j != null ? j - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2938
2946
  for (const ie of E)
2939
- b(ie) ? T && ie.size > T ? Z.push(ie.name) : me > 0 ? (F.push(ie), me--) : oe++ : B(ie) ? J.push(ie) : ee.push(ie.name);
2940
- return { imageFiles: F, docFiles: J, tooLarge: Z, skipped: ee, limitExceeded: oe };
2947
+ b(ie) ? g && ie.size > g ? Z.push(ie.name) : me > 0 ? (z.push(ie), me--) : ae++ : I(ie) ? J.push(ie) : ee.push(ie.name);
2948
+ return { imageFiles: z, docFiles: J, tooLarge: Z, skipped: ee, limitExceeded: ae };
2941
2949
  }, se = (E) => {
2942
- const F = T ? L("fileTooLargeMaxHint", { maxMb: T / 1024 / 1024 }) : "";
2943
- z(L("fileTooLarge", { maxHint: F, names: E.join(", ") }));
2944
- }, ae = (E) => {
2945
- const { imageFiles: F, docFiles: J, tooLarge: Z, skipped: ee, limitExceeded: oe } = U(E);
2946
- Z.length && se(Z), ee.length && z(L("filesSkipped", { names: ee.join(", ") })), oe && z(L("maxImages", { n: N })), h && F.length && h(F);
2947
- const me = J.concat(h ? [] : F);
2950
+ const z = g ? D("fileTooLargeMaxHint", { maxMb: g / 1024 / 1024 }) : "";
2951
+ F(D("fileTooLarge", { maxHint: z, names: E.join(", ") }));
2952
+ }, oe = (E) => {
2953
+ const { imageFiles: z, docFiles: J, tooLarge: Z, skipped: ee, limitExceeded: ae } = U(E);
2954
+ Z.length && se(Z), ee.length && F(D("filesSkipped", { names: ee.join(", ") })), ae && F(D("maxImages", { n: j })), h && z.length && h(z);
2955
+ const me = J.concat(h ? [] : z);
2948
2956
  p && me.length && p(me);
2949
2957
  };
2950
2958
  P(() => {
2951
2959
  const E = O.current;
2952
2960
  E && (E.style.height = "auto", E.style.height = `${Math.min(E.scrollHeight, 200)}px`);
2953
2961
  }, [t]), P(() => {
2954
- const E = (F) => {
2955
- var Z, ee, oe;
2956
- if (o || i) return;
2957
- const J = (Z = F.target) == null ? void 0 : Z.tagName;
2958
- J === "INPUT" || J === "TEXTAREA" || J === "SELECT" || (ee = F.target) != null && ee.isContentEditable || F.ctrlKey || F.metaKey || F.altKey || F.key.length !== 1 && F.key !== "Backspace" && F.key !== "Delete" || (oe = O.current) == null || oe.focus();
2962
+ const E = (z) => {
2963
+ var Z, ee, ae;
2964
+ if (a || i) return;
2965
+ const J = (Z = z.target) == null ? void 0 : Z.tagName;
2966
+ J === "INPUT" || J === "TEXTAREA" || J === "SELECT" || (ee = z.target) != null && ee.isContentEditable || z.ctrlKey || z.metaKey || z.altKey || z.key.length !== 1 && z.key !== "Backspace" && z.key !== "Delete" || (ae = O.current) == null || ae.focus();
2959
2967
  };
2960
2968
  return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
2961
- }, [o, i]);
2969
+ }, [a, i]);
2962
2970
  const G = (E) => {
2963
- E.preventDefault(), g.current++, E.dataTransfer.types.includes("Files") && M(!0);
2971
+ E.preventDefault(), k.current++, E.dataTransfer.types.includes("Files") && M(!0);
2964
2972
  }, Q = (E) => {
2965
- E.preventDefault(), g.current--, g.current === 0 && M(!1);
2973
+ E.preventDefault(), k.current--, k.current === 0 && M(!1);
2966
2974
  }, fe = (E) => E.preventDefault(), je = (E) => {
2967
- E.preventDefault(), g.current = 0, M(!1);
2968
- const F = Array.from(E.dataTransfer.files);
2969
- F.length && ae(F);
2975
+ E.preventDefault(), k.current = 0, M(!1);
2976
+ const z = Array.from(E.dataTransfer.files);
2977
+ z.length && oe(z);
2970
2978
  }, Se = (E) => {
2971
- const F = Array.from(E.target.files || []);
2972
- W.current && (W.current.value = ""), F.length && ae(F);
2973
- }, pt = (E) => {
2979
+ const z = Array.from(E.target.files || []);
2980
+ W.current && (W.current.value = ""), z.length && oe(z);
2981
+ }, ht = (E) => {
2974
2982
  var ie;
2975
2983
  if (!h) return;
2976
- const F = (ie = E.clipboardData) == null ? void 0 : ie.items;
2977
- if (!F) return;
2984
+ const z = (ie = E.clipboardData) == null ? void 0 : ie.items;
2985
+ if (!z) return;
2978
2986
  const J = [];
2979
- for (const vt of F) {
2980
- const qe = vt.getAsFile();
2987
+ for (const bt of z) {
2988
+ const qe = bt.getAsFile();
2981
2989
  qe && J.push(qe);
2982
2990
  }
2983
2991
  if (J.length === 0) return;
2984
- const { imageFiles: Z, tooLarge: ee, skipped: oe, limitExceeded: me } = U(J);
2985
- ee.length && se(ee), oe.length && z(L("filesSkipped", { names: oe.join(", ") })), me && z(L("maxImages", { n: N })), Z.length && (E.preventDefault(), h(Z));
2986
- }, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke = ds({
2992
+ const { imageFiles: Z, tooLarge: ee, skipped: ae, limitExceeded: me } = U(J);
2993
+ ee.length && se(ee), ae.length && F(D("filesSkipped", { names: ae.join(", ") })), me && F(D("maxImages", { n: j })), Z.length && (E.preventDefault(), h(Z));
2994
+ }, Ne = !a && !i && !!(c != null && c.length) && t.length === 0, ke = fs({
2987
2995
  prompts: c ?? [],
2988
2996
  enabled: Ne
2989
- }), ht = (E) => {
2997
+ }), xt = (E) => {
2990
2998
  if (Ne) {
2991
2999
  if (E.key === "ArrowDown" || E.key === "ArrowRight") {
2992
3000
  E.preventDefault(), ke.next();
@@ -3001,9 +3009,9 @@ function zn({
3001
3009
  return;
3002
3010
  }
3003
3011
  }
3004
- a == null || a(E);
3005
- }, xt = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Ye = p || h;
3006
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", k].filter(Boolean).join(" "), ...w, children: [
3012
+ o == null || o(E);
3013
+ }, vt = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Ye = p || h;
3014
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", y].filter(Boolean).join(" "), ...N, children: [
3007
3015
  Ye && /* @__PURE__ */ e.jsx(
3008
3016
  "input",
3009
3017
  {
@@ -3024,17 +3032,17 @@ function zn({
3024
3032
  onDragOver: fe,
3025
3033
  onDrop: je,
3026
3034
  children: [
3027
- C && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: I.dropFilesHere }),
3035
+ C && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: B.dropFilesHere }),
3028
3036
  /* @__PURE__ */ e.jsx(
3029
3037
  "textarea",
3030
3038
  {
3031
3039
  ref: O,
3032
3040
  value: t,
3033
3041
  onChange: (E) => s == null ? void 0 : s(E.target.value),
3034
- onKeyDown: ht,
3035
- onPaste: pt,
3036
- placeholder: Ne ? "" : S,
3037
- disabled: o || i,
3042
+ onKeyDown: xt,
3043
+ onPaste: ht,
3044
+ placeholder: Ne ? "" : A,
3045
+ disabled: a || i,
3038
3046
  rows: 1,
3039
3047
  className: ["ds-prompt-input__textarea", Ne && "ds-prompt-input__textarea--anim"].filter(Boolean).join(" ")
3040
3048
  }
@@ -3043,19 +3051,19 @@ function zn({
3043
3051
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ke.displayed }),
3044
3052
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
3045
3053
  ] }),
3046
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((E, F) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
3054
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((E, z) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
3047
3055
  /* @__PURE__ */ e.jsx("img", { src: E.preview, alt: "" }),
3048
3056
  /* @__PURE__ */ e.jsx(
3049
3057
  "button",
3050
3058
  {
3051
3059
  className: "ds-prompt-input__image-remove",
3052
- onClick: () => _ == null ? void 0 : _(F),
3053
- "aria-label": I.removeImage,
3060
+ onClick: () => _ == null ? void 0 : _(z),
3061
+ "aria-label": B.removeImage,
3054
3062
  type: "button",
3055
3063
  children: /* @__PURE__ */ e.jsx(te, { size: 12, strokeWidth: 2 })
3056
3064
  }
3057
3065
  )
3058
- ] }, F)) }),
3066
+ ] }, z)) }),
3059
3067
  V.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: V.map((E) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
3060
3068
  /* @__PURE__ */ e.jsx("span", { children: E.msg }),
3061
3069
  /* @__PURE__ */ e.jsx(
@@ -3064,25 +3072,25 @@ function zn({
3064
3072
  type: "button",
3065
3073
  className: "ds-prompt-input__warning-close",
3066
3074
  onClick: () => H(E.id),
3067
- "aria-label": I.dismiss,
3075
+ "aria-label": B.dismiss,
3068
3076
  children: /* @__PURE__ */ e.jsx(te, { size: q[1], strokeWidth: 1.5 })
3069
3077
  }
3070
3078
  )
3071
3079
  ] }, E.id)) }),
3072
- u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((E, F) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
3073
- E.uploading ? /* @__PURE__ */ e.jsx($t, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ge, { size: q[1], strokeWidth: 1.5 }),
3080
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((E, z) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
3081
+ E.uploading ? /* @__PURE__ */ e.jsx(Rt, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ge, { size: q[1], strokeWidth: 1.5 }),
3074
3082
  E.filename,
3075
- E.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: I.uploading }) : /* @__PURE__ */ e.jsx(
3083
+ E.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: B.uploading }) : /* @__PURE__ */ e.jsx(
3076
3084
  "button",
3077
3085
  {
3078
3086
  type: "button",
3079
3087
  className: "ds-prompt-input__remove-btn",
3080
- onClick: () => f == null ? void 0 : f(F),
3081
- "aria-label": I.removeAttachment,
3088
+ onClick: () => f == null ? void 0 : f(z),
3089
+ "aria-label": B.removeAttachment,
3082
3090
  children: /* @__PURE__ */ e.jsx(te, { size: q[1], strokeWidth: 1.5 })
3083
3091
  }
3084
3092
  )
3085
- ] }) }, F)) }),
3093
+ ] }) }, z)) }),
3086
3094
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
3087
3095
  Ye && /* @__PURE__ */ e.jsx(
3088
3096
  de,
@@ -3090,34 +3098,34 @@ function zn({
3090
3098
  variant: "ghost",
3091
3099
  size: "xs",
3092
3100
  icon: /* @__PURE__ */ e.jsx(Ge, { size: q[2], strokeWidth: 1.5 }),
3093
- "aria-label": I.attachFiles,
3101
+ "aria-label": B.attachFiles,
3094
3102
  onClick: () => {
3095
3103
  var E;
3096
3104
  return (E = W.current) == null ? void 0 : E.click();
3097
3105
  }
3098
3106
  }
3099
3107
  ),
3100
- A,
3108
+ $,
3101
3109
  x,
3102
3110
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
3103
- o ? /* @__PURE__ */ e.jsx(
3111
+ a ? /* @__PURE__ */ e.jsx(
3104
3112
  de,
3105
3113
  {
3106
3114
  variant: "primary",
3107
3115
  size: "xs",
3108
- icon: /* @__PURE__ */ e.jsx(Rt, { size: q[2], strokeWidth: 1.5 }),
3116
+ icon: /* @__PURE__ */ e.jsx(St, { size: q[2], strokeWidth: 1.5 }),
3109
3117
  onClick: r,
3110
- "aria-label": I.stop
3118
+ "aria-label": B.stop
3111
3119
  }
3112
3120
  ) : /* @__PURE__ */ e.jsx(
3113
3121
  de,
3114
3122
  {
3115
3123
  variant: "primary",
3116
3124
  size: "xs",
3117
- icon: /* @__PURE__ */ e.jsx(St, { size: q[2], strokeWidth: 1.5 }),
3125
+ icon: /* @__PURE__ */ e.jsx(At, { size: q[2], strokeWidth: 1.5 }),
3118
3126
  onClick: n,
3119
- disabled: !xt,
3120
- "aria-label": I.send
3127
+ disabled: !vt,
3128
+ "aria-label": B.send
3121
3129
  }
3122
3130
  )
3123
3131
  ] })
@@ -3126,37 +3134,37 @@ function zn({
3126
3134
  )
3127
3135
  ] });
3128
3136
  }
3129
- const at = { fast: 0, standard: 1, premium: 2 }, ot = { fast: "data-5", standard: "data-3", premium: "data-6" };
3130
- function Fn({
3137
+ const at = { fast: 0, standard: 1, premium: 2 }, it = { fast: "data-5", standard: "data-3", premium: "data-6" };
3138
+ function On({
3131
3139
  models: t = [],
3132
3140
  value: s,
3133
3141
  onChange: n,
3134
3142
  size: r = "xs",
3135
- minTier: a,
3136
- showAutoOption: o = !1,
3143
+ minTier: o,
3144
+ showAutoOption: a = !1,
3137
3145
  groupByTier: i = !0,
3138
3146
  className: l = "",
3139
3147
  ...c
3140
3148
  }) {
3141
- const [u, d] = D(!1), p = R(null), h = R(null), f = R(null), [_, j] = D({}), y = r === "s" ? "s" : "xs", N = t.filter((g) => !a || g.name === "auto" ? !0 : (at[g.tier] ?? 1) >= (at[a] ?? 1)), T = N.find((g) => g.name === "auto"), A = N.filter((g) => g.name !== "auto"), x = t.find((g) => g.name === s), w = new Set(A.map((g) => g.tier).filter(Boolean)).size > 1;
3149
+ const [u, d] = L(!1), p = S(null), h = S(null), f = S(null), [_, w] = L({}), T = r === "s" ? "s" : "xs", j = t.filter((k) => !o || k.name === "auto" ? !0 : (at[k.tier] ?? 1) >= (at[o] ?? 1)), g = j.find((k) => k.name === "auto"), $ = j.filter((k) => k.name !== "auto"), x = t.find((k) => k.name === s), N = new Set($.map((k) => k.tier).filter(Boolean)).size > 1;
3142
3150
  P(() => {
3143
3151
  if (!u) return;
3144
- const g = 320, C = () => {
3145
- var z;
3146
- const v = (z = h.current) == null ? void 0 : z.getBoundingClientRect();
3152
+ const k = 320, C = () => {
3153
+ var F;
3154
+ const v = (F = h.current) == null ? void 0 : F.getBoundingClientRect();
3147
3155
  if (!v) return;
3148
- const $ = window.innerHeight - v.bottom, S = $ < g + 8 && v.top > $;
3149
- j({
3156
+ const R = window.innerHeight - v.bottom, A = R < k + 8 && v.top > R;
3157
+ w({
3150
3158
  position: "fixed",
3151
3159
  zIndex: "var(--z-dropdown, 500)",
3152
3160
  left: v.left,
3153
- ...S ? { bottom: window.innerHeight - v.top + 4, top: "auto" } : { top: v.bottom + 4, bottom: "auto" }
3161
+ ...A ? { bottom: window.innerHeight - v.top + 4, top: "auto" } : { top: v.bottom + 4, bottom: "auto" }
3154
3162
  });
3155
3163
  };
3156
3164
  C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
3157
3165
  const M = (v) => {
3158
- var $, S;
3159
- !(($ = p.current) != null && $.contains(v.target)) && !((S = f.current) != null && S.contains(v.target)) && d(!1);
3166
+ var R, A;
3167
+ !((R = p.current) != null && R.contains(v.target)) && !((A = f.current) != null && A.contains(v.target)) && d(!1);
3160
3168
  }, V = (v) => {
3161
3169
  v.key === "Escape" && d(!1);
3162
3170
  };
@@ -3164,32 +3172,32 @@ function Fn({
3164
3172
  window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", M), document.removeEventListener("keydown", V);
3165
3173
  };
3166
3174
  }, [u]);
3167
- const I = (g) => {
3168
- n == null || n(g), d(!1);
3169
- }, L = (g) => /* @__PURE__ */ e.jsxs(
3175
+ const B = (k) => {
3176
+ n == null || n(k), d(!1);
3177
+ }, D = (k) => /* @__PURE__ */ e.jsxs(
3170
3178
  "button",
3171
3179
  {
3172
3180
  type: "button",
3173
3181
  className: [
3174
3182
  "ds-model-picker__item",
3175
- g.name === s && "ds-model-picker__item--active"
3183
+ k.name === s && "ds-model-picker__item--active"
3176
3184
  ].filter(Boolean).join(" "),
3177
- onClick: () => I(g.name),
3185
+ onClick: () => B(k.name),
3178
3186
  children: [
3179
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: g.icon || /* @__PURE__ */ e.jsx(Ke, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3180
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: g.displayName || g.name }),
3181
- w && g.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[g.tier] || "default", children: g.tier })
3187
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon || /* @__PURE__ */ e.jsx(Ke, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3188
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: k.displayName || k.name }),
3189
+ N && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: it[k.tier] || "default", children: k.tier })
3182
3190
  ]
3183
3191
  },
3184
- g.name
3185
- ), W = () => !i || !w ? A.map(L) : ["fast", "standard", "premium"].flatMap((g) => {
3186
- const C = A.filter((M) => M.tier === g);
3192
+ k.name
3193
+ ), W = () => !i || !N ? $.map(D) : ["fast", "standard", "premium"].flatMap((k) => {
3194
+ const C = $.filter((M) => M.tier === k);
3187
3195
  return C.length ? [
3188
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": g, children: g.charAt(0).toUpperCase() + g.slice(1) }, `lbl-${g}`),
3189
- ...C.map(L)
3196
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": k, children: k.charAt(0).toUpperCase() + k.slice(1) }, `lbl-${k}`),
3197
+ ...C.map(D)
3190
3198
  ] : [];
3191
- }), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: `ds-model-picker__menu ds-model-picker__menu--${y} ds-scrollable`, "data-ds-portal": "", style: _, children: [
3192
- o && T && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3199
+ }), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: `ds-model-picker__menu ds-model-picker__menu--${T} ds-scrollable`, "data-ds-portal": "", style: _, children: [
3200
+ a && g && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3193
3201
  /* @__PURE__ */ e.jsxs(
3194
3202
  "button",
3195
3203
  {
@@ -3199,14 +3207,14 @@ function Fn({
3199
3207
  "ds-model-picker__item--auto",
3200
3208
  s === "auto" && "ds-model-picker__item--active"
3201
3209
  ].filter(Boolean).join(" "),
3202
- onClick: () => I("auto"),
3210
+ onClick: () => B("auto"),
3203
3211
  children: [
3204
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: /* @__PURE__ */ e.jsx(At, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3212
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: /* @__PURE__ */ e.jsx(Bt, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3205
3213
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
3206
3214
  ]
3207
3215
  }
3208
3216
  ),
3209
- A.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
3217
+ $.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
3210
3218
  ] }),
3211
3219
  W()
3212
3220
  ] });
@@ -3222,14 +3230,14 @@ function Fn({
3222
3230
  {
3223
3231
  ref: h,
3224
3232
  type: "button",
3225
- className: `ds-model-picker__trigger ds-model-picker__trigger--${y}`,
3226
- onClick: () => d((g) => !g),
3233
+ className: `ds-model-picker__trigger ds-model-picker__trigger--${T}`,
3234
+ onClick: () => d((k) => !k),
3227
3235
  "aria-haspopup": "listbox",
3228
3236
  "aria-expanded": u,
3229
3237
  children: [
3230
3238
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__icon", children: (x == null ? void 0 : x.icon) || /* @__PURE__ */ e.jsx(Ke, { strokeWidth: 1.5, "aria-hidden": "true" }) }),
3231
3239
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (x == null ? void 0 : x.displayName) || (x == null ? void 0 : x.name) || s }),
3232
- w && (x == null ? void 0 : x.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[x.tier] || "default", children: x.tier })
3240
+ N && (x == null ? void 0 : x.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: it[x.tier] || "default", children: x.tier })
3233
3241
  ]
3234
3242
  }
3235
3243
  ),
@@ -3238,91 +3246,91 @@ function Fn({
3238
3246
  }
3239
3247
  );
3240
3248
  }
3241
- const fs = ({ filename: t, pagesLabel: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
3249
+ const ps = ({ filename: t, pagesLabel: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
3242
3250
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
3243
3251
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: s })
3244
3252
  ] });
3245
- function ms(t) {
3253
+ function hs(t) {
3246
3254
  const s = /* @__PURE__ */ new Map();
3247
3255
  for (const n of t)
3248
3256
  s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
3249
3257
  return [...s.values()];
3250
3258
  }
3251
- function Wn({
3259
+ function Cn({
3252
3260
  sources: t = [],
3253
3261
  layout: s = "list",
3254
3262
  title: n,
3255
3263
  maxVisible: r = 5,
3256
- onSourceClick: a
3264
+ onSourceClick: o
3257
3265
  }) {
3258
- const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] = D(!1), d = ms(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((N) => N.snippet), _ = (N) => N != null && N.length ? i("pageAbbrev", { pages: N.join(", ") }) : null, j = i("moreSources", { n: d.length - r }), y = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3259
- return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: y, children: [
3260
- h.map((N) => {
3261
- const T = N.items.map((k) => k.page).filter(Boolean), A = _(T), x = !!a;
3266
+ const a = K(), { t: i } = be(), l = n ?? a.sources, [c, u] = L(!1), d = hs(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((j) => j.snippet), _ = (j) => j != null && j.length ? i("pageAbbrev", { pages: j.join(", ") }) : null, w = i("moreSources", { n: d.length - r }), T = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
3267
+ return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: T, children: [
3268
+ h.map((j) => {
3269
+ const g = j.items.map((y) => y.page).filter(Boolean), $ = _(g), x = !!o;
3262
3270
  return /* @__PURE__ */ e.jsxs(
3263
3271
  "div",
3264
3272
  {
3265
3273
  className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
3266
- onClick: x ? () => a(N.items[0]) : void 0,
3274
+ onClick: x ? () => o(j.items[0]) : void 0,
3267
3275
  children: [
3268
- /* @__PURE__ */ e.jsx(Bt, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
3269
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: N.filename }),
3270
- A && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: A })
3276
+ /* @__PURE__ */ e.jsx(It, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
3277
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
3278
+ $ && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: $ })
3271
3279
  ]
3272
3280
  },
3273
- N.filename
3281
+ j.filename
3274
3282
  );
3275
3283
  }),
3276
- p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: j })
3277
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: y, children: [
3284
+ p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: w })
3285
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: T, children: [
3278
3286
  l && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: l }),
3279
- h.map((N) => {
3280
- const T = N.items.map((k) => k.page).filter(Boolean), A = _(T), x = !!a;
3287
+ h.map((j) => {
3288
+ const g = j.items.map((y) => y.page).filter(Boolean), $ = _(g), x = !!o;
3281
3289
  return f ? /* @__PURE__ */ e.jsx(
3282
3290
  He,
3283
3291
  {
3284
- title: /* @__PURE__ */ e.jsx(fs, { filename: N.filename, pagesLabel: A }),
3292
+ title: /* @__PURE__ */ e.jsx(ps, { filename: j.filename, pagesLabel: $ }),
3285
3293
  padding: "s",
3286
- children: N.items.map((k, w) => /* @__PURE__ */ e.jsx(
3294
+ children: j.items.map((y, N) => /* @__PURE__ */ e.jsx(
3287
3295
  "div",
3288
3296
  {
3289
3297
  className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
3290
- onClick: x ? () => a(k) : void 0,
3291
- children: k.snippet ?? i("pageAbbrev", { pages: k.page })
3298
+ onClick: x ? () => o(y) : void 0,
3299
+ children: y.snippet ?? i("pageAbbrev", { pages: y.page })
3292
3300
  },
3293
- w
3301
+ N
3294
3302
  ))
3295
3303
  },
3296
- N.filename
3304
+ j.filename
3297
3305
  ) : /* @__PURE__ */ e.jsxs(
3298
3306
  "div",
3299
3307
  {
3300
3308
  className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
3301
- onClick: x ? () => a(N.items[0]) : void 0,
3309
+ onClick: x ? () => o(j.items[0]) : void 0,
3302
3310
  children: [
3303
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: N.filename }),
3304
- A && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: A })
3311
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
3312
+ $ && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: $ })
3305
3313
  ]
3306
3314
  },
3307
- N.filename
3315
+ j.filename
3308
3316
  );
3309
3317
  }),
3310
- p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: j })
3318
+ p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: w })
3311
3319
  ] });
3312
3320
  }
3313
- function it(t) {
3321
+ function lt(t) {
3314
3322
  return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
3315
3323
  }
3316
- function On({
3324
+ function Un({
3317
3325
  used: t,
3318
3326
  limit: s,
3319
3327
  size: n = "s",
3320
3328
  showCount: r = !0,
3321
- showPercent: a = !1,
3322
- warningThreshold: o = 0.8,
3329
+ showPercent: o = !1,
3330
+ warningThreshold: a = 0.8,
3323
3331
  errorThreshold: i = 1
3324
3332
  }) {
3325
- const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), u = l >= i ? "error" : l >= o ? "warning" : "normal";
3333
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), u = l >= i ? "error" : l >= a ? "warning" : "normal";
3326
3334
  return /* @__PURE__ */ e.jsxs(
3327
3335
  "div",
3328
3336
  {
@@ -3338,13 +3346,13 @@ function On({
3338
3346
  style: { width: `${c}%` }
3339
3347
  }
3340
3348
  ) }),
3341
- (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
3349
+ (r || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
3342
3350
  r && /* @__PURE__ */ e.jsxs("span", { children: [
3343
- it(t),
3351
+ lt(t),
3344
3352
  " / ",
3345
- it(s)
3353
+ lt(s)
3346
3354
  ] }),
3347
- a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3355
+ o && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
3348
3356
  Math.round(l * 100),
3349
3357
  "%"
3350
3358
  ] })
@@ -3353,58 +3361,58 @@ function On({
3353
3361
  }
3354
3362
  );
3355
3363
  }
3356
- const lt = 5;
3357
- function ps(t) {
3364
+ const ct = 5;
3365
+ function xs(t) {
3358
3366
  return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
3359
3367
  }
3360
- function Cn({
3368
+ function Hn({
3361
3369
  value: t = 0,
3362
3370
  size: s = "xs",
3363
3371
  showLabel: n = "none",
3364
3372
  layout: r = "inline"
3365
3373
  }) {
3366
- const a = Math.max(0, Math.min(1, t)), o = Math.round(a * lt), i = ps(a);
3374
+ const o = Math.max(0, Math.min(1, t)), a = Math.round(o * ct), i = xs(o);
3367
3375
  return /* @__PURE__ */ e.jsxs("div", { className: [
3368
3376
  "ds-confidence-bar",
3369
3377
  `ds-confidence-bar--${s}`,
3370
3378
  `ds-confidence-bar--${i}`,
3371
3379
  r === "block" && "ds-confidence-bar--block"
3372
3380
  ].filter(Boolean).join(" "), children: [
3373
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: lt }, (l, c) => /* @__PURE__ */ e.jsx(
3381
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: ct }, (l, c) => /* @__PURE__ */ e.jsx(
3374
3382
  "div",
3375
3383
  {
3376
- className: `ds-confidence-bar__seg${c < o ? " ds-confidence-bar__seg--filled" : ""}`
3384
+ className: `ds-confidence-bar__seg${c < a ? " ds-confidence-bar__seg--filled" : ""}`
3377
3385
  },
3378
3386
  c
3379
3387
  )) }),
3380
3388
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
3381
3389
  ] });
3382
3390
  }
3383
- const hs = { add: "+", remove: "-", context: " " };
3391
+ const vs = { add: "+", remove: "-", context: " " };
3384
3392
  function Ae({ line: t, lineNumbers: s }) {
3385
3393
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
3386
3394
  s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
3387
- /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: hs[t.type] }),
3395
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: vs[t.type] }),
3388
3396
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
3389
3397
  ] });
3390
3398
  }
3391
- function Un({
3399
+ function Vn({
3392
3400
  lines: t = [],
3393
3401
  layout: s = "inline",
3394
3402
  wordWrap: n = !1,
3395
3403
  lineNumbers: r = !0,
3396
- maxHeight: a,
3397
- title: o
3404
+ maxHeight: o,
3405
+ title: a
3398
3406
  }) {
3399
3407
  const i = [
3400
3408
  "ds-diff-view",
3401
3409
  `ds-diff-view--${s}`,
3402
3410
  n && "ds-diff-view--wrap"
3403
- ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
3411
+ ].filter(Boolean).join(" "), l = o ? { maxHeight: o, overflowY: "auto" } : void 0;
3404
3412
  if (s === "split") {
3405
3413
  const c = t.filter((d) => d.type === "remove" || d.type === "context"), u = t.filter((d) => d.type === "add" || d.type === "context");
3406
3414
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3407
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3415
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: a }),
3408
3416
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3409
3417
  /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: r }, p)) }),
3410
3418
  /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((d, p) => /* @__PURE__ */ e.jsx(Ae, { line: d, lineNumbers: r }, p)) })
@@ -3412,17 +3420,17 @@ function Un({
3412
3420
  ] });
3413
3421
  }
3414
3422
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3415
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3423
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: a }),
3416
3424
  /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, u) => /* @__PURE__ */ e.jsx(Ae, { line: c, lineNumbers: r }, u)) })
3417
3425
  ] });
3418
3426
  }
3419
- function xs({
3427
+ function bs({
3420
3428
  value: t = "idle",
3421
3429
  onLike: s,
3422
3430
  onDislike: n,
3423
3431
  className: r = "",
3424
- likeLabel: a,
3425
- dislikeLabel: o,
3432
+ likeLabel: o,
3433
+ dislikeLabel: a,
3426
3434
  ...i
3427
3435
  }) {
3428
3436
  const l = K(), c = t !== "idle";
@@ -3445,10 +3453,10 @@ function xs({
3445
3453
  ].filter(Boolean).join(" "),
3446
3454
  onClick: s,
3447
3455
  disabled: c,
3448
- "aria-label": a ?? l.like,
3456
+ "aria-label": o ?? l.like,
3449
3457
  "aria-pressed": t === "liked",
3450
3458
  children: /* @__PURE__ */ e.jsx(
3451
- It,
3459
+ Dt,
3452
3460
  {
3453
3461
  size: q[1],
3454
3462
  strokeWidth: 1.5,
@@ -3466,7 +3474,7 @@ function xs({
3466
3474
  ].filter(Boolean).join(" "),
3467
3475
  onClick: n,
3468
3476
  disabled: c,
3469
- "aria-label": o ?? l.dislike,
3477
+ "aria-label": a ?? l.dislike,
3470
3478
  "aria-pressed": t === "disliked",
3471
3479
  children: /* @__PURE__ */ e.jsx(
3472
3480
  Lt,
@@ -3482,26 +3490,26 @@ function xs({
3482
3490
  }
3483
3491
  );
3484
3492
  }
3485
- function vs(t) {
3493
+ function _s(t) {
3486
3494
  const s = t instanceof Date ? t : new Date(t);
3487
3495
  if (isNaN(s)) return null;
3488
- const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = new Date(a - 864e5);
3489
- if (s >= a) return r;
3490
- if (s >= o) return `Yesterday ${r}`;
3496
+ const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), a = new Date(o - 864e5);
3497
+ if (s >= o) return r;
3498
+ if (s >= a) return `Yesterday ${r}`;
3491
3499
  const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
3492
3500
  return `${i} ${l} ${r}`;
3493
3501
  }
3494
- function Hn({
3502
+ function Yn({
3495
3503
  role: t = "assistant",
3496
3504
  text: s,
3497
3505
  timestamp: n,
3498
3506
  feedbackValue: r = "idle",
3499
- onLike: a,
3500
- onDislike: o,
3507
+ onLike: o,
3508
+ onDislike: a,
3501
3509
  className: i = "",
3502
3510
  ...l
3503
3511
  }) {
3504
- const c = t === "assistant" && (a || o), u = !!s, d = n ? vs(n) : null;
3512
+ const c = t === "assistant" && (o || a), u = !!s, d = n ? _s(n) : null;
3505
3513
  return !c && !u && !d ? null : /* @__PURE__ */ e.jsxs(
3506
3514
  "div",
3507
3515
  {
@@ -3509,21 +3517,21 @@ function Hn({
3509
3517
  ...l,
3510
3518
  children: [
3511
3519
  t === "user" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d }),
3512
- c && /* @__PURE__ */ e.jsx(xs, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3513
- u && /* @__PURE__ */ e.jsx(cs, { className: "ds-message-action", text: s }),
3520
+ c && /* @__PURE__ */ e.jsx(bs, { className: "ds-message-action", value: r, onLike: o, onDislike: a }),
3521
+ u && /* @__PURE__ */ e.jsx(us, { className: "ds-message-action", text: s }),
3514
3522
  t === "assistant" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d })
3515
3523
  ]
3516
3524
  }
3517
3525
  );
3518
3526
  }
3519
- function Vn({ label: t, className: s = "", ...n }) {
3527
+ function qn({ label: t, className: s = "", ...n }) {
3520
3528
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
3521
3529
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
3522
3530
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
3523
3531
  ] });
3524
3532
  }
3525
- function Yn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3526
- const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3533
+ function Gn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...o }) {
3534
+ const a = t === "dark", i = s ?? a, l = a ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = a ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
3527
3535
  return /* @__PURE__ */ e.jsx(
3528
3536
  "div",
3529
3537
  {
@@ -3538,7 +3546,7 @@ function Yn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3538
3546
  },
3539
3547
  ...r
3540
3548
  },
3541
- ...a,
3549
+ ...o,
3542
3550
  children: /* @__PURE__ */ e.jsx(
3543
3551
  "div",
3544
3552
  {
@@ -3563,57 +3571,57 @@ function Yn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
3563
3571
  }
3564
3572
  );
3565
3573
  }
3566
- function qn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
3567
- const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3574
+ function Kn({ children: t, axis: s = "y", style: n, className: r = "", ...o }) {
3575
+ const a = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
3568
3576
  return /* @__PURE__ */ e.jsx(
3569
3577
  "div",
3570
3578
  {
3571
3579
  className: `ds-scrollable ${r}`,
3572
- style: { ...o, ...n },
3573
- ...a,
3580
+ style: { ...a, ...n },
3581
+ ...o,
3574
3582
  children: t
3575
3583
  }
3576
3584
  );
3577
3585
  }
3578
- const Be = 280, bs = 22, _s = 14, ue = 8, Te = 6, js = 200;
3579
- function Ns(t) {
3586
+ const Be = 280, js = 22, Ns = 14, ue = 8, Te = 6, ws = 200;
3587
+ function gs(t) {
3580
3588
  return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
3581
3589
  }
3582
- function ws(t, s, n, r) {
3583
- const a = window.innerWidth, o = window.innerHeight;
3584
- if (o - t.bottom >= s + r + ue) return "bottom";
3590
+ function ys(t, s, n, r) {
3591
+ const o = window.innerWidth, a = window.innerHeight;
3592
+ if (a - t.bottom >= s + r + ue) return "bottom";
3585
3593
  if (t.top >= s + r + ue) return "top";
3586
- if (a - t.right >= n + r + ue) return "right";
3594
+ if (o - t.right >= n + r + ue) return "right";
3587
3595
  if (t.left >= n + r + ue) return "left";
3588
- const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
3589
- return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
3596
+ const i = Math.max(t.top, a - t.bottom, o - t.right, t.left);
3597
+ return i === a - t.bottom ? "bottom" : i === t.top ? "top" : i === o - t.right ? "right" : "left";
3590
3598
  }
3591
- function gs(t, s, n, r, a) {
3592
- const o = window.innerWidth, i = window.innerHeight;
3599
+ function ks(t, s, n, r, o) {
3600
+ const a = window.innerWidth, i = window.innerHeight;
3593
3601
  let l, c;
3594
3602
  switch (t) {
3595
3603
  case "top":
3596
- l = s.top - n - a, c = s.left + s.width / 2 - r / 2;
3604
+ l = s.top - n - o, c = s.left + s.width / 2 - r / 2;
3597
3605
  break;
3598
3606
  case "bottom":
3599
- l = s.bottom + a, c = s.left + s.width / 2 - r / 2;
3607
+ l = s.bottom + o, c = s.left + s.width / 2 - r / 2;
3600
3608
  break;
3601
3609
  case "left":
3602
- l = s.top + s.height / 2 - n / 2, c = s.left - r - a;
3610
+ l = s.top + s.height / 2 - n / 2, c = s.left - r - o;
3603
3611
  break;
3604
3612
  default:
3605
- l = s.top + s.height / 2 - n / 2, c = s.right + a;
3613
+ l = s.top + s.height / 2 - n / 2, c = s.right + o;
3606
3614
  }
3607
- const u = Math.max(ue, Math.min(o - r - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
3615
+ const u = Math.max(ue, Math.min(a - r - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
3608
3616
  return { top: d, left: u, arrowOffset: c - u, arrowOffsetY: l - d };
3609
3617
  }
3610
- function Gn({
3618
+ function Xn({
3611
3619
  steps: t,
3612
3620
  currentStep: s,
3613
3621
  onNext: n,
3614
3622
  onBack: r,
3615
- onSkip: a,
3616
- onFinish: o,
3623
+ onSkip: o,
3624
+ onFinish: a,
3617
3625
  overlay: i = !0,
3618
3626
  ring: l = !0,
3619
3627
  labelNext: c,
@@ -3623,15 +3631,15 @@ function Gn({
3623
3631
  statePrimary: h = "idle",
3624
3632
  stateBack: f = "idle"
3625
3633
  }) {
3626
- const _ = K(), { t: j } = be(), y = c ?? _.next, N = u ?? _.back, T = d ?? _.skipTour, A = p ?? _.done, x = R(null), k = R(t), w = R(s), I = R(l);
3627
- k.current = t, w.current = s, I.current = l;
3628
- const [L, W] = D(!1), [O, g] = D({ position: "fixed", visibility: "hidden", width: Be }), [C, M] = D("bottom"), [V, v] = D(null), $ = R(!1), S = t[s], z = s === t.length - 1, H = ne(() => {
3629
- const Y = k.current[w.current];
3634
+ const _ = K(), { t: w } = be(), T = c ?? _.next, j = u ?? _.back, g = d ?? _.skipTour, $ = p ?? _.done, x = S(null), y = S(t), N = S(s), B = S(l);
3635
+ y.current = t, N.current = s, B.current = l;
3636
+ const [D, W] = L(!1), [O, k] = L({ position: "fixed", visibility: "hidden", width: Be }), [C, M] = L("bottom"), [V, v] = L(null), R = S(!1), A = t[s], F = s === t.length - 1, H = ne(() => {
3637
+ const Y = y.current[N.current];
3630
3638
  if (!Y || !x.current) return;
3631
- const m = Ns(Y.target);
3639
+ const m = gs(Y.target);
3632
3640
  if (!m) return;
3633
- const b = m.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, se = Be, ae = I.current ? bs : _s, G = Y.position || ws(b, U, se, ae), { top: Q, left: fe, arrowOffset: je, arrowOffsetY: Se } = gs(G, b, U, se, ae);
3634
- M(G), g({
3641
+ const b = m.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, se = Be, oe = B.current ? js : Ns, G = Y.position || ys(b, U, se, oe), { top: Q, left: fe, arrowOffset: je, arrowOffsetY: Se } = ks(G, b, U, se, oe);
3642
+ M(G), k({
3635
3643
  position: "fixed",
3636
3644
  top: Q,
3637
3645
  left: fe,
@@ -3649,40 +3657,40 @@ function Gn({
3649
3657
  return P(() => {
3650
3658
  window.addEventListener("scroll", H, !0), window.addEventListener("resize", H);
3651
3659
  const Y = requestAnimationFrame(() => {
3652
- H(), W(!0), $.current = !0;
3660
+ H(), W(!0), R.current = !0;
3653
3661
  });
3654
3662
  return () => {
3655
3663
  cancelAnimationFrame(Y), window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
3656
3664
  };
3657
3665
  }, []), P(() => {
3658
- if (!$.current) return;
3666
+ if (!R.current) return;
3659
3667
  W(!1);
3660
3668
  const Y = setTimeout(() => {
3661
- g((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3669
+ k((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
3662
3670
  H(), W(!0);
3663
3671
  });
3664
- }, js + 20);
3672
+ }, ws + 20);
3665
3673
  return () => clearTimeout(Y);
3666
3674
  }, [s]), P(() => {
3667
- L && x.current && x.current.focus({ preventScroll: !0 });
3668
- }, [L]), P(() => {
3675
+ D && x.current && x.current.focus({ preventScroll: !0 });
3676
+ }, [D]), P(() => {
3669
3677
  const Y = (m) => {
3670
- m.key === "Escape" && a();
3678
+ m.key === "Escape" && o();
3671
3679
  };
3672
3680
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3673
- }, [a]), P(() => {
3674
- if (!L) return;
3681
+ }, [o]), P(() => {
3682
+ if (!D) return;
3675
3683
  const Y = (m) => {
3676
3684
  if (m.key !== "Tab" || !x.current) return;
3677
3685
  const b = Array.from(
3678
3686
  x.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3679
3687
  );
3680
3688
  if (!b.length) return;
3681
- const B = b[0], U = b[b.length - 1];
3682
- m.shiftKey && document.activeElement === B ? (m.preventDefault(), U.focus()) : !m.shiftKey && document.activeElement === U && (m.preventDefault(), B.focus());
3689
+ const I = b[0], U = b[b.length - 1];
3690
+ m.shiftKey && document.activeElement === I ? (m.preventDefault(), U.focus()) : !m.shiftKey && document.activeElement === U && (m.preventDefault(), I.focus());
3683
3691
  };
3684
3692
  return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
3685
- }, [L]), !S || typeof document > "u" ? null : re.createPortal(
3693
+ }, [D]), !A || typeof document > "u" ? null : re.createPortal(
3686
3694
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3687
3695
  V && /* @__PURE__ */ e.jsx(
3688
3696
  "div",
@@ -3691,7 +3699,7 @@ function Gn({
3691
3699
  "ds-coachmark__spotlight",
3692
3700
  i && "ds-coachmark__spotlight--overlay",
3693
3701
  !l && "ds-coachmark__spotlight--no-ring",
3694
- L && "ds-coachmark__spotlight--visible"
3702
+ D && "ds-coachmark__spotlight--visible"
3695
3703
  ].filter(Boolean).join(" "),
3696
3704
  style: V,
3697
3705
  "aria-hidden": "true"
@@ -3705,11 +3713,11 @@ function Gn({
3705
3713
  role: "dialog",
3706
3714
  "aria-modal": "false",
3707
3715
  "aria-live": "polite",
3708
- "aria-label": S.title ?? j("stepOf", { current: s + 1, total: t.length }),
3716
+ "aria-label": A.title ?? w("stepOf", { current: s + 1, total: t.length }),
3709
3717
  className: [
3710
3718
  "ds-coachmark__bubble",
3711
3719
  `ds-coachmark__bubble--${C}`,
3712
- L && "ds-coachmark__bubble--visible"
3720
+ D && "ds-coachmark__bubble--visible"
3713
3721
  ].filter(Boolean).join(" "),
3714
3722
  style: O,
3715
3723
  tabIndex: -1,
@@ -3719,13 +3727,13 @@ function Gn({
3719
3727
  {
3720
3728
  type: "button",
3721
3729
  className: "ds-coachmark__close",
3722
- onClick: a,
3723
- "aria-label": T,
3730
+ onClick: o,
3731
+ "aria-label": g,
3724
3732
  children: /* @__PURE__ */ e.jsx(te, { size: 16, strokeWidth: 2 })
3725
3733
  }
3726
3734
  ),
3727
- S.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: S.title }),
3728
- /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: S.content }),
3735
+ A.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: A.title }),
3736
+ /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: A.content }),
3729
3737
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
3730
3738
  t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
3731
3739
  s + 1,
@@ -3733,8 +3741,8 @@ function Gn({
3733
3741
  t.length
3734
3742
  ] }),
3735
3743
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3736
- s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: N }),
3737
- /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: z ? o : n, children: z ? A : y })
3744
+ s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: j }),
3745
+ /* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: F ? a : n, children: F ? $ : T })
3738
3746
  ] })
3739
3747
  ] })
3740
3748
  ]
@@ -3744,24 +3752,24 @@ function Gn({
3744
3752
  document.body
3745
3753
  );
3746
3754
  }
3747
- function Kn(t, s = {}) {
3748
- const { storageKey: n } = s, [r, a] = D(0), [o, i] = D(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = ne(() => {
3755
+ function Jn(t, s = {}) {
3756
+ const { storageKey: n } = s, [r, o] = L(0), [a, i] = L(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = ne(() => {
3749
3757
  i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
3750
3758
  }, [n]);
3751
3759
  return {
3752
3760
  currentStep: r,
3753
- isActive: o,
3761
+ isActive: a,
3754
3762
  start: () => {
3755
- l() || (a(0), i(!0));
3763
+ l() || (o(0), i(!0));
3756
3764
  },
3757
- next: () => a((u) => Math.min(u + 1, t.length - 1)),
3758
- back: () => a((u) => Math.max(u - 1, 0)),
3765
+ next: () => o((u) => Math.min(u + 1, t.length - 1)),
3766
+ back: () => o((u) => Math.max(u - 1, 0)),
3759
3767
  skip: c,
3760
3768
  finish: c
3761
3769
  };
3762
3770
  }
3763
- function Xn() {
3764
- const t = R(null), s = ne(() => {
3771
+ function Zn() {
3772
+ const t = S(null), s = ne(() => {
3765
3773
  const n = t.current;
3766
3774
  if (!n) return;
3767
3775
  n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
@@ -3774,102 +3782,102 @@ function Xn() {
3774
3782
  }
3775
3783
  export {
3776
3784
  He as Accordion,
3777
- zs as Alert,
3778
- $n as AnimatedNumber,
3779
- en as Avatar,
3785
+ Ws as Alert,
3786
+ Sn as AnimatedNumber,
3787
+ sn as Avatar,
3780
3788
  he as Badge,
3781
- kn as Banner,
3782
- Ws as BottomSheet,
3783
- fn as Breadcrumb,
3784
- Vs as BrowserPane,
3785
- Ys as BrowserTabs,
3789
+ Tn as Banner,
3790
+ Cs as BottomSheet,
3791
+ pn as Breadcrumb,
3792
+ qs as BrowserPane,
3793
+ Gs as BrowserTabs,
3786
3794
  de as Button,
3787
- Bs as Card,
3788
- Pn as ChatMessage,
3789
- Zs as Checkbox,
3790
- Gn as Coachmark,
3791
- Os as Code,
3792
- Ht as CodeAccordion,
3793
- Cn as ConfidenceBar,
3794
- cs as CopyButton,
3795
- Un as DiffView,
3796
- En as Dropdown,
3797
- cn as EmptyState,
3798
- Yn as EngineerGrid,
3799
- dn as FormField,
3800
- Is as H1,
3801
- Ls as H2,
3802
- Ds as H3,
3803
- Ps as H4,
3804
- Rn as InView,
3805
- $s as Input,
3806
- Cs as Link,
3807
- qs as List,
3808
- Gs as ListRow,
3809
- Ts as LocaleProvider,
3810
- Xs as Mention,
3811
- xs as MessageFeedback,
3812
- Hn as MessageFooter,
3813
- Fs as Modal,
3795
+ Ds as Card,
3796
+ Fn as ChatMessage,
3797
+ en as Checkbox,
3798
+ Xn as Coachmark,
3799
+ Us as Code,
3800
+ Vt as CodeAccordion,
3801
+ Hn as ConfidenceBar,
3802
+ us as CopyButton,
3803
+ Vn as DiffView,
3804
+ $n as Dropdown,
3805
+ un as EmptyState,
3806
+ Gn as EngineerGrid,
3807
+ fn as FormField,
3808
+ Ls as H1,
3809
+ Ps as H2,
3810
+ Ms as H3,
3811
+ Fs as H4,
3812
+ An as InView,
3813
+ Ss as Input,
3814
+ Hs as Link,
3815
+ Ks as List,
3816
+ Xs as ListRow,
3817
+ Rs as LocaleProvider,
3818
+ Zs as Mention,
3819
+ bs as MessageFeedback,
3820
+ Yn as MessageFooter,
3821
+ Os as Modal,
3814
3822
  xe as ModalFooter,
3815
- Fn as ModelPicker,
3816
- hn as NavRail,
3817
- gn as NavRailAgent,
3818
- vn as NavRailBody,
3819
- wn as NavRailCustomItem,
3820
- jn as NavRailDivider,
3821
- yn as NavRailFlyout,
3822
- _n as NavRailFooter,
3823
- bn as NavRailHeader,
3824
- xn as NavRailItem,
3825
- Nn as NavRailRecents,
3826
- Ms as P1,
3827
- Ft as P2,
3828
- ft as P3,
3829
- mn as Pagination,
3830
- Tn as ProgressBar,
3831
- zn as PromptInput,
3832
- Qs as Radio,
3833
- In as ReasoningBlock,
3834
- qn as Scrollable,
3835
- Ks as SegmentedControl,
3836
- Ss as Select,
3837
- pn as SidePage,
3838
- et as SidePageFooter,
3839
- Gt as Skeleton,
3840
- Wn as SourcesPanel,
3841
- Mt as Spinner,
3842
- un as Stat,
3843
- Ln as StepIndicator,
3844
- As as Stepper,
3845
- Dn as StreamingText,
3846
- Hs as Tab,
3847
- tn as Table,
3848
- nn as TableBody,
3849
- sn as TableHead,
3850
- rn as TableRow,
3851
- an as TableSubheaderRow,
3852
- Us as Tabs,
3853
- ln as Td,
3854
- Rs as Textarea,
3855
- on as Th,
3856
- Vn as ThinkingDot,
3857
- An as ToastContainer,
3858
- Js as Toggle,
3859
- On as TokenCounter,
3860
- Bn as ToolCallBubble,
3861
- Bn as ToolCallCard,
3823
+ On as ModelPicker,
3824
+ vn as NavRail,
3825
+ kn as NavRailAgent,
3826
+ _n as NavRailBody,
3827
+ yn as NavRailCustomItem,
3828
+ wn as NavRailDivider,
3829
+ En as NavRailFlyout,
3830
+ Nn as NavRailFooter,
3831
+ jn as NavRailHeader,
3832
+ bn as NavRailItem,
3833
+ gn as NavRailRecents,
3834
+ zs as P1,
3835
+ Wt as P2,
3836
+ mt as P3,
3837
+ hn as Pagination,
3838
+ Rn as ProgressBar,
3839
+ Wn as PromptInput,
3840
+ tn as Radio,
3841
+ Ln as ReasoningBlock,
3842
+ Kn as Scrollable,
3843
+ Js as SegmentedControl,
3844
+ Bs as Select,
3845
+ xn as SidePage,
3846
+ tt as SidePageFooter,
3847
+ Xt as Skeleton,
3848
+ Cn as SourcesPanel,
3849
+ Ft as Spinner,
3850
+ mn as Stat,
3851
+ Pn as StepIndicator,
3852
+ Is as Stepper,
3853
+ Mn as StreamingText,
3854
+ Ys as Tab,
3855
+ nn as Table,
3856
+ on as TableBody,
3857
+ rn as TableHead,
3858
+ an as TableRow,
3859
+ ln as TableSubheaderRow,
3860
+ Vs as Tabs,
3861
+ dn as Td,
3862
+ As as Textarea,
3863
+ cn as Th,
3864
+ qn as ThinkingDot,
3865
+ In as ToastContainer,
3866
+ Qs as Toggle,
3867
+ Un as TokenCounter,
3868
+ Dn as ToolCallBubble,
3869
+ Dn as ToolCallCard,
3862
3870
  Ve as Tooltip,
3863
3871
  $e as defaultStrings,
3864
- ut as formatString,
3872
+ ft as formatString,
3865
3873
  q as iconSizes,
3866
- ns as useAnimatedNumber,
3867
- ds as useAnimatedPlaceholder,
3868
- Kn as useCoachmark,
3869
- rs as useInView,
3874
+ os as useAnimatedNumber,
3875
+ fs as useAnimatedPlaceholder,
3876
+ Jn as useCoachmark,
3877
+ as as useInView,
3870
3878
  be as useLocale,
3871
- Xn as useShake,
3872
- Mn as useStreamScroll,
3879
+ Zn as useShake,
3880
+ zn as useStreamScroll,
3873
3881
  K as useStrings,
3874
- Sn as useToast
3882
+ Bn as useToast
3875
3883
  };