@agentatom/design-system 1.4.86 → 1.4.88

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