@donkit-ai/design-system 1.4.52 → 1.4.53

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,14 +1,14 @@
1
- import U, { useState as I, useRef as T, useEffect as L, useLayoutEffect as Ve } from "react";
2
- import { Check as we, X as te, ChevronDown as xe, Minus as Ye, Plus as qe, XCircle as ge, AlertTriangle as ye, CheckCircle as ke, Info as Ee, ChevronUp as He, ChevronsUpDown as Ke, ChevronLeft as Xe, ChevronRight as Ge, Copy as Je, Brain as Ze, Loader as Qe, Paperclip as Se, Square as es, ArrowUp as ss, Zap as ts, Cpu as De, FileText as ns, ThumbsUp as rs, ThumbsDown as as } from "lucide-react";
3
- import pe from "react-dom";
4
- const A = {
1
+ import F, { useState as A, useRef as R, useEffect as B, useLayoutEffect as qe, useContext as He, createContext as Ke } from "react";
2
+ import { Check as we, X as se, ChevronDown as xe, Minus as Xe, Plus as Ge, XCircle as ge, AlertTriangle as ye, CheckCircle as ke, Info as Ee, ChevronUp as Je, ChevronsUpDown as Ze, ChevronLeft as Qe, ChevronRight as es, Copy as ss, Brain as ts, Loader as ns, Paperclip as Se, Square as rs, ArrowUp as as, Zap as os, Cpu as Ie, FileText as is, ThumbsUp as ls, ThumbsDown as cs } from "lucide-react";
3
+ import he from "react-dom";
4
+ const D = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
8
8
  4: 28,
9
9
  5: 48
10
10
  };
11
- var je = { exports: {} }, fe = {};
11
+ var je = { exports: {} }, me = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
@@ -18,29 +18,29 @@ var je = { exports: {} }, fe = {};
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 Ie;
22
- function os() {
23
- if (Ie) return fe;
24
- Ie = 1;
21
+ var Ae;
22
+ function ds() {
23
+ if (Ae) return me;
24
+ Ae = 1;
25
25
  var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
26
- function n(o, a, r) {
26
+ function n(a, o, r) {
27
27
  var i = null;
28
- if (r !== void 0 && (i = "" + r), a.key !== void 0 && (i = "" + a.key), "key" in a) {
28
+ if (r !== void 0 && (i = "" + r), o.key !== void 0 && (i = "" + o.key), "key" in o) {
29
29
  r = {};
30
- for (var l in a)
31
- l !== "key" && (r[l] = a[l]);
32
- } else r = a;
33
- return a = r.ref, {
30
+ for (var l in o)
31
+ l !== "key" && (r[l] = o[l]);
32
+ } else r = o;
33
+ return o = r.ref, {
34
34
  $$typeof: s,
35
- type: o,
35
+ type: a,
36
36
  key: i,
37
- ref: a !== void 0 ? a : null,
37
+ ref: o !== void 0 ? o : null,
38
38
  props: r
39
39
  };
40
40
  }
41
- return fe.Fragment = t, fe.jsx = n, fe.jsxs = n, fe;
41
+ return me.Fragment = t, me.jsx = n, me.jsxs = n, me;
42
42
  }
43
- var me = {};
43
+ var pe = {};
44
44
  /**
45
45
  * @license React
46
46
  * react-jsx-runtime.development.js
@@ -50,153 +50,153 @@ var me = {};
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 Ae;
54
- function is() {
55
- return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
56
- function s(c) {
57
- if (c == null) return null;
58
- if (typeof c == "function")
59
- return c.$$typeof === C ? null : c.displayName || c.name || null;
60
- if (typeof c == "string") return c;
61
- switch (c) {
62
- case y:
53
+ var De;
54
+ function us() {
55
+ return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
56
+ function s(d) {
57
+ if (d == null) return null;
58
+ if (typeof d == "function")
59
+ return d.$$typeof === U ? null : d.displayName || d.name || null;
60
+ if (typeof d == "string") return d;
61
+ switch (d) {
62
+ case w:
63
63
  return "Fragment";
64
- case R:
64
+ case E:
65
65
  return "Profiler";
66
66
  case g:
67
67
  return "StrictMode";
68
- case B:
68
+ case L:
69
69
  return "Suspense";
70
70
  case q:
71
71
  return "SuspenseList";
72
- case v:
72
+ case N:
73
73
  return "Activity";
74
74
  }
75
- if (typeof c == "object")
76
- switch (typeof c.tag == "number" && console.error(
75
+ if (typeof d == "object")
76
+ switch (typeof d.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
- ), c.$$typeof) {
79
- case _:
78
+ ), d.$$typeof) {
79
+ case x:
80
80
  return "Portal";
81
- case $:
82
- return c.displayName || "Context";
83
- case N:
84
- return (c._context.displayName || "Context") + ".Consumer";
81
+ case T:
82
+ return d.displayName || "Context";
83
+ case v:
84
+ return (d._context.displayName || "Context") + ".Consumer";
85
85
  case P:
86
- var k = c.render;
87
- return c = c.displayName, c || (c = k.displayName || k.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
86
+ var k = d.render;
87
+ return d = d.displayName, d || (d = k.displayName || k.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
88
88
  case H:
89
- return k = c.displayName || null, k !== null ? k : s(c.type) || "Memo";
90
- case F:
91
- k = c._payload, c = c._init;
89
+ return k = d.displayName || null, k !== null ? k : s(d.type) || "Memo";
90
+ case C:
91
+ k = d._payload, d = d._init;
92
92
  try {
93
- return s(c(k));
93
+ return s(d(k));
94
94
  } catch {
95
95
  }
96
96
  }
97
97
  return null;
98
98
  }
99
- function t(c) {
100
- return "" + c;
99
+ function t(d) {
100
+ return "" + d;
101
101
  }
102
- function n(c) {
102
+ function n(d) {
103
103
  try {
104
- t(c);
104
+ t(d);
105
105
  var k = !1;
106
106
  } catch {
107
107
  k = !0;
108
108
  }
109
109
  if (k) {
110
110
  k = console;
111
- var z = k.error, O = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
111
+ var z = k.error, O = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
112
112
  return z.call(
113
113
  k,
114
114
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
115
115
  O
116
- ), t(c);
116
+ ), t(d);
117
117
  }
118
118
  }
119
- function o(c) {
120
- if (c === y) return "<>";
121
- if (typeof c == "object" && c !== null && c.$$typeof === F)
119
+ function a(d) {
120
+ if (d === w) return "<>";
121
+ if (typeof d == "object" && d !== null && d.$$typeof === C)
122
122
  return "<...>";
123
123
  try {
124
- var k = s(c);
124
+ var k = s(d);
125
125
  return k ? "<" + k + ">" : "<...>";
126
126
  } catch {
127
127
  return "<...>";
128
128
  }
129
129
  }
130
- function a() {
131
- var c = X.A;
132
- return c === null ? null : c.getOwner();
130
+ function o() {
131
+ var d = X.A;
132
+ return d === null ? null : d.getOwner();
133
133
  }
134
134
  function r() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
- function i(c) {
138
- if (V.call(c, "key")) {
139
- var k = Object.getOwnPropertyDescriptor(c, "key").get;
137
+ function i(d) {
138
+ if (V.call(d, "key")) {
139
+ var k = Object.getOwnPropertyDescriptor(d, "key").get;
140
140
  if (k && k.isReactWarning) return !1;
141
141
  }
142
- return c.key !== void 0;
142
+ return d.key !== void 0;
143
143
  }
144
- function l(c, k) {
144
+ function l(d, k) {
145
145
  function z() {
146
146
  S || (S = !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
  k
149
149
  ));
150
150
  }
151
- z.isReactWarning = !0, Object.defineProperty(c, "key", {
151
+ z.isReactWarning = !0, Object.defineProperty(d, "key", {
152
152
  get: z,
153
153
  configurable: !0
154
154
  });
155
155
  }
156
156
  function m() {
157
- var c = s(this.type);
158
- return M[c] || (M[c] = !0, console.error(
157
+ var d = s(this.type);
158
+ return M[d] || (M[d] = !0, console.error(
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
- )), c = this.props.ref, c !== void 0 ? c : null;
160
+ )), d = this.props.ref, d !== void 0 ? d : null;
161
161
  }
162
- function d(c, k, z, O, ne, ae) {
162
+ function u(d, k, z, O, ne, ae) {
163
163
  var W = z.ref;
164
- return c = {
164
+ return d = {
165
165
  $$typeof: b,
166
- type: c,
166
+ type: d,
167
167
  key: k,
168
168
  props: z,
169
169
  _owner: O
170
- }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(c, "ref", {
170
+ }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(d, "ref", {
171
171
  enumerable: !1,
172
172
  get: m
173
- }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
173
+ }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
174
174
  configurable: !1,
175
175
  enumerable: !1,
176
176
  writable: !0,
177
177
  value: 0
178
- }), Object.defineProperty(c, "_debugInfo", {
178
+ }), Object.defineProperty(d, "_debugInfo", {
179
179
  configurable: !1,
180
180
  enumerable: !1,
181
181
  writable: !0,
182
182
  value: null
183
- }), Object.defineProperty(c, "_debugStack", {
183
+ }), Object.defineProperty(d, "_debugStack", {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
187
  value: ne
188
- }), Object.defineProperty(c, "_debugTask", {
188
+ }), Object.defineProperty(d, "_debugTask", {
189
189
  configurable: !1,
190
190
  enumerable: !1,
191
191
  writable: !0,
192
192
  value: ae
193
- }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
193
+ }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
194
194
  }
195
- function f(c, k, z, O, ne, ae) {
195
+ function f(d, k, z, O, ne, ae) {
196
196
  var W = k.children;
197
197
  if (W !== void 0)
198
198
  if (O)
199
- if (x(W)) {
199
+ if (_(W)) {
200
200
  for (O = 0; O < W.length; O++)
201
201
  p(W[O]);
202
202
  Object.freeze && Object.freeze(W);
@@ -206,11 +206,11 @@ function is() {
206
206
  );
207
207
  else p(W);
208
208
  if (V.call(k, "key")) {
209
- W = s(c);
209
+ W = s(d);
210
210
  var Q = Object.keys(k).filter(function(be) {
211
211
  return be !== "key";
212
212
  });
213
- O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", E[W + O] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
213
+ O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", $[W + O] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
214
214
  `A props object containing a "key" prop is being spread into JSX:
215
215
  let props = %s;
216
216
  <%s {...props} />
@@ -221,7 +221,7 @@ React keys must be passed directly to JSX without using spread:
221
221
  W,
222
222
  Q,
223
223
  W
224
- ), E[W + O] = !0);
224
+ ), $[W + O] = !0);
225
225
  }
226
226
  if (W = null, z !== void 0 && (n(z), W = "" + z), i(k) && (n(k.key), W = "" + k.key), "key" in k) {
227
227
  z = {};
@@ -230,111 +230,111 @@ React keys must be passed directly to JSX without using spread:
230
230
  } else z = k;
231
231
  return W && l(
232
232
  z,
233
- typeof c == "function" ? c.displayName || c.name || "Unknown" : c
234
- ), d(
235
- c,
233
+ typeof d == "function" ? d.displayName || d.name || "Unknown" : d
234
+ ), u(
235
+ d,
236
236
  W,
237
237
  z,
238
- a(),
238
+ o(),
239
239
  ne,
240
240
  ae
241
241
  );
242
242
  }
243
- function p(c) {
244
- h(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === F && (c._payload.status === "fulfilled" ? h(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
243
+ function p(d) {
244
+ h(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === C && (d._payload.status === "fulfilled" ? h(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
245
245
  }
246
- function h(c) {
247
- return typeof c == "object" && c !== null && c.$$typeof === b;
246
+ function h(d) {
247
+ return typeof d == "object" && d !== null && d.$$typeof === b;
248
248
  }
249
- var u = U, b = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), X = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, x = Array.isArray, w = console.createTask ? console.createTask : function() {
249
+ var c = F, b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), T = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), X = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, _ = Array.isArray, y = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
- u = {
253
- react_stack_bottom_frame: function(c) {
254
- return c();
252
+ c = {
253
+ react_stack_bottom_frame: function(d) {
254
+ return d();
255
255
  }
256
256
  };
257
- var S, M = {}, K = u.react_stack_bottom_frame.bind(
258
- u,
257
+ var S, M = {}, K = c.react_stack_bottom_frame.bind(
258
+ c,
259
259
  r
260
- )(), G = w(o(r)), E = {};
261
- me.Fragment = y, me.jsx = function(c, k, z) {
260
+ )(), G = y(a(r)), $ = {};
261
+ pe.Fragment = w, pe.jsx = function(d, k, z) {
262
262
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
263
263
  return f(
264
- c,
264
+ d,
265
265
  k,
266
266
  z,
267
267
  !1,
268
268
  O ? Error("react-stack-top-frame") : K,
269
- O ? w(o(c)) : G
269
+ O ? y(a(d)) : G
270
270
  );
271
- }, me.jsxs = function(c, k, z) {
271
+ }, pe.jsxs = function(d, k, z) {
272
272
  var O = 1e4 > X.recentlyCreatedOwnerStacks++;
273
273
  return f(
274
- c,
274
+ d,
275
275
  k,
276
276
  z,
277
277
  !0,
278
278
  O ? Error("react-stack-top-frame") : K,
279
- O ? w(o(c)) : G
279
+ O ? y(a(d)) : G
280
280
  );
281
281
  };
282
- }()), me;
282
+ }()), pe;
283
283
  }
284
- process.env.NODE_ENV === "production" ? je.exports = os() : je.exports = is();
284
+ process.env.NODE_ENV === "production" ? je.exports = ds() : je.exports = us();
285
285
  var e = je.exports;
286
- function ls({ size: s = "m", color: t = "default", className: n = "", ...o }) {
286
+ function fs({ size: s = "m", color: t = "default", className: n = "", ...a }) {
287
287
  return /* @__PURE__ */ e.jsx(
288
288
  "span",
289
289
  {
290
290
  className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${t}`, n].filter(Boolean).join(" "),
291
291
  role: "status",
292
292
  "aria-label": "Loading",
293
- ...o
293
+ ...a
294
294
  }
295
295
  );
296
296
  }
297
- const cs = { xs: 12, s: 14, m: 16, l: 20 };
297
+ const ms = { xs: 12, s: 14, m: 16, l: 20 };
298
298
  function ce({
299
299
  children: s,
300
300
  variant: t = "primary",
301
301
  size: n = "m",
302
- fullWidth: o = !1,
303
- icon: a,
302
+ fullWidth: a = !1,
303
+ icon: o,
304
304
  disabled: r = !1,
305
305
  state: i = "idle",
306
306
  onClick: l,
307
307
  type: m = "button",
308
- href: d,
308
+ href: u,
309
309
  "aria-label": f,
310
310
  className: p = "",
311
311
  ...h
312
312
  }) {
313
- const u = a && !s, b = i === "loading", _ = i === "success", y = i === "error", g = b || _ || y, R = n === "xs" ? "s" : "m", N = t === "danger" ? "on-accent" : "default", $ = cs[n] ?? 16, P = b ? /* @__PURE__ */ e.jsx(ls, { size: R, color: N }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(we, { size: $, strokeWidth: 2.5 }) }) : y ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(te, { size: $, strokeWidth: 2.5 }) }) : null, B = [
313
+ const c = o && !s, b = i === "loading", x = i === "success", w = i === "error", g = b || x || w, E = n === "xs" ? "s" : "m", v = t === "danger" ? "on-accent" : "default", T = ms[n] ?? 16, P = b ? /* @__PURE__ */ e.jsx(fs, { size: E, color: v }) : x ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(we, { size: T, strokeWidth: 2.5 }) }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(se, { size: T, strokeWidth: 2.5 }) }) : null, L = [
314
314
  "ds-button",
315
315
  `ds-button--${t}`,
316
316
  `ds-button--${n}`,
317
- o && "ds-button--full",
318
- u && "ds-button--icon-only",
317
+ a && "ds-button--full",
318
+ c && "ds-button--icon-only",
319
319
  p
320
320
  ].filter(Boolean).join(" "), q = i !== "idle" ? i : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
321
- g ? P : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
321
+ g ? P : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
322
322
  s
323
323
  ] });
324
- if (d) {
325
- const F = (v) => {
324
+ if (u) {
325
+ const C = (N) => {
326
326
  if (r || b) {
327
- v.preventDefault();
327
+ N.preventDefault();
328
328
  return;
329
329
  }
330
- v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), l == null || l(v));
330
+ N.metaKey || N.ctrlKey || N.button === 1 || (N.preventDefault(), l == null || l(N));
331
331
  };
332
332
  return /* @__PURE__ */ e.jsx(
333
333
  "a",
334
334
  {
335
- className: B,
336
- href: r || b ? void 0 : d,
337
- onClick: F,
335
+ className: L,
336
+ href: r || b ? void 0 : u,
337
+ onClick: C,
338
338
  "aria-label": f,
339
339
  "aria-disabled": r || b ? "true" : void 0,
340
340
  "aria-busy": b ? "true" : void 0,
@@ -348,7 +348,7 @@ function ce({
348
348
  "button",
349
349
  {
350
350
  type: m,
351
- className: B,
351
+ className: L,
352
352
  disabled: r,
353
353
  onClick: b ? void 0 : l,
354
354
  "aria-label": f,
@@ -359,29 +359,29 @@ function ce({
359
359
  }
360
360
  );
361
361
  }
362
- function Vs({
362
+ function Gs({
363
363
  label: s,
364
364
  error: t,
365
365
  hint: n,
366
- fullWidth: o = !0,
367
- icon: a,
366
+ fullWidth: a = !0,
367
+ icon: o,
368
368
  iconRight: r,
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
371
  disabled: m,
372
- id: d,
372
+ id: u,
373
373
  ...f
374
374
  }) {
375
- const p = d || `input-${U.useId()}`, h = n ? `${p}-hint` : void 0, u = t ? `${p}-error` : void 0, b = u || h;
376
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
375
+ const p = u || `input-${F.useId()}`, h = n ? `${p}-hint` : void 0, c = t ? `${p}-error` : void 0, b = c || h;
376
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: s }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
379
- a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
379
+ o && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: o }),
380
380
  /* @__PURE__ */ e.jsx(
381
381
  "input",
382
382
  {
383
383
  id: p,
384
- className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
384
+ className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${t ? "ds-input--error" : ""}`,
385
385
  disabled: m,
386
386
  "aria-invalid": t ? "true" : "false",
387
387
  "aria-describedby": b,
@@ -401,175 +401,175 @@ function Vs({
401
401
  )
402
402
  ] }),
403
403
  n && !t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
404
- /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: u, className: "ds-input-error", role: "alert", children: t }) }) })
404
+ /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: c, className: "ds-input-error", role: "alert", children: t }) }) })
405
405
  ] });
406
406
  }
407
- function Ys({
407
+ function Js({
408
408
  label: s,
409
409
  error: t,
410
410
  hint: n,
411
- fullWidth: o = !0,
412
- size: a = "m",
411
+ fullWidth: a = !0,
412
+ size: o = "m",
413
413
  disabled: r,
414
414
  id: i,
415
415
  resize: l = !0,
416
416
  rows: m = 3,
417
- ...d
417
+ ...u
418
418
  }) {
419
- const f = i || `textarea-${U.useId()}`, p = n ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, u = h || p;
420
- return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
419
+ const f = i || `textarea-${F.useId()}`, p = n ? `${f}-hint` : void 0, h = t ? `${f}-error` : void 0, c = h || p;
420
+ return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
421
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: f, children: s }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
425
  id: f,
426
- className: `ds-textarea ds-textarea--${a} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
426
+ className: `ds-textarea ds-textarea--${o} ${t ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
427
  disabled: r,
428
428
  "aria-invalid": t ? "true" : "false",
429
- "aria-describedby": u,
429
+ "aria-describedby": c,
430
430
  rows: m,
431
- ...d
431
+ ...u
432
432
  }
433
433
  ),
434
434
  n && !t && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
435
435
  t && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: t })
436
436
  ] });
437
437
  }
438
- function qs({
438
+ function Zs({
439
439
  label: s,
440
440
  value: t,
441
441
  onChange: n,
442
- options: o = [],
443
- placeholder: a = "Select option",
442
+ options: a = [],
443
+ placeholder: o = "Select option",
444
444
  error: r,
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
447
  disabled: m = !1,
448
- id: d,
448
+ id: u,
449
449
  ...f
450
450
  }) {
451
- const [p, h] = I(!1), [u, b] = I(!1), [_, y] = I({}), [g, R] = I("down"), [N, $] = I(-1), P = T(null), B = T(null), q = T(null), H = T(null), F = d || `select-${U.useId()}`, v = `${F}-label`, C = r ? `${F}-error` : void 0, X = 150, V = (E = !1) => {
452
- u || (b(!0), $(-1), H.current = setTimeout(() => {
453
- var c;
454
- h(!1), b(!1), E && ((c = q.current) == null || c.focus());
451
+ const [p, h] = A(!1), [c, b] = A(!1), [x, w] = A({}), [g, E] = A("down"), [v, T] = A(-1), P = R(null), L = R(null), q = R(null), H = R(null), C = u || `select-${F.useId()}`, N = `${C}-label`, U = r ? `${C}-error` : void 0, X = 150, V = ($ = !1) => {
452
+ c || (b(!0), T(-1), H.current = setTimeout(() => {
453
+ var d;
454
+ h(!1), b(!1), $ && ((d = q.current) == null || d.focus());
455
455
  }, X));
456
- }, x = (E) => {
456
+ }, _ = ($) => {
457
457
  clearTimeout(H.current), b(!1);
458
- const c = E !== void 0 ? E : Math.max(o.findIndex((k) => k.value === t), 0);
459
- $(c), h(!0);
458
+ const d = $ !== void 0 ? $ : Math.max(a.findIndex((k) => k.value === t), 0);
459
+ T(d), h(!0);
460
460
  };
461
- L(() => () => clearTimeout(H.current), []);
462
- const w = () => {
461
+ B(() => () => clearTimeout(H.current), []);
462
+ const y = () => {
463
463
  var ae;
464
- const E = (ae = P.current) == null ? void 0 : ae.getBoundingClientRect();
465
- if (!E) return;
466
- const c = window.innerHeight, k = c - E.bottom, z = E.top, ne = k < 300 && z > k;
467
- R(ne ? "up" : "down"), y(
468
- ne ? { bottom: c - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
464
+ const $ = (ae = P.current) == null ? void 0 : ae.getBoundingClientRect();
465
+ if (!$) return;
466
+ const d = window.innerHeight, k = d - $.bottom, z = $.top, ne = k < 300 && z > k;
467
+ E(ne ? "up" : "down"), w(
468
+ ne ? { bottom: d - $.top + 4, left: $.left, width: $.width } : { top: $.bottom + 4, left: $.left, width: $.width }
469
469
  );
470
470
  };
471
- L(() => {
471
+ B(() => {
472
472
  if (p)
473
- return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
474
- window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
473
+ return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
474
+ window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
475
475
  };
476
- }, [p]), L(() => {
477
- const E = (c) => {
478
- P.current && !P.current.contains(c.target) && B.current && !B.current.contains(c.target) && V();
476
+ }, [p]), B(() => {
477
+ const $ = (d) => {
478
+ P.current && !P.current.contains(d.target) && L.current && !L.current.contains(d.target) && V();
479
479
  };
480
- return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
481
- }, [u]), L(() => {
482
- var c;
483
- if (!p || N < 0 || !B.current) return;
484
- (c = B.current.querySelectorAll(".ds-select-option")[N]) == null || c.scrollIntoView({ block: "nearest" });
485
- }, [N, p]);
486
- const S = (E) => {
487
- switch (E.key) {
480
+ return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
481
+ }, [c]), B(() => {
482
+ var d;
483
+ if (!p || v < 0 || !L.current) return;
484
+ (d = L.current.querySelectorAll(".ds-select-option")[v]) == null || d.scrollIntoView({ block: "nearest" });
485
+ }, [v, p]);
486
+ const S = ($) => {
487
+ switch ($.key) {
488
488
  case "ArrowDown":
489
- E.preventDefault(), p ? $((c) => Math.min(c + 1, o.length - 1)) : x();
489
+ $.preventDefault(), p ? T((d) => Math.min(d + 1, a.length - 1)) : _();
490
490
  break;
491
491
  case "ArrowUp":
492
- E.preventDefault(), p ? $((c) => Math.max(c - 1, 0)) : x(o.length - 1);
492
+ $.preventDefault(), p ? T((d) => Math.max(d - 1, 0)) : _(a.length - 1);
493
493
  break;
494
494
  case "Home":
495
- p && (E.preventDefault(), $(0));
495
+ p && ($.preventDefault(), T(0));
496
496
  break;
497
497
  case "End":
498
- p && (E.preventDefault(), $(o.length - 1));
498
+ p && ($.preventDefault(), T(a.length - 1));
499
499
  break;
500
500
  case "Enter":
501
501
  case " ":
502
- E.preventDefault(), p ? N >= 0 && (n == null || n(o[N].value), V(!0)) : x();
502
+ $.preventDefault(), p ? v >= 0 && (n == null || n(a[v].value), V(!0)) : _();
503
503
  break;
504
504
  case "Escape":
505
- p && (E.preventDefault(), V(!0));
505
+ p && ($.preventDefault(), V(!0));
506
506
  break;
507
507
  case "Tab":
508
508
  p && V(!1);
509
509
  break;
510
510
  }
511
- }, M = o.find((E) => E.value === t), K = l === "xs" ? A[1] : l === "small" ? A[2] : A[3], G = p && /* @__PURE__ */ e.jsx(
511
+ }, M = a.find(($) => $.value === t), K = l === "xs" ? D[1] : l === "small" ? D[2] : D[3], G = p && /* @__PURE__ */ e.jsx(
512
512
  "div",
513
513
  {
514
- ref: B,
514
+ ref: L,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
- "aria-labelledby": s ? v : void 0,
517
+ "aria-labelledby": s ? N : void 0,
518
518
  tabIndex: -1,
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
521
521
  `ds-select-dropdown--${l}`,
522
522
  `ds-select-dropdown--${g}`,
523
- u && "ds-select-dropdown--closing"
523
+ c && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
- style: _,
526
- children: o.map((E, c) => /* @__PURE__ */ e.jsx(
525
+ style: x,
526
+ children: a.map(($, d) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
529
- id: `${F}-opt-${c}`,
529
+ id: `${C}-opt-${d}`,
530
530
  type: "button",
531
531
  role: "option",
532
532
  tabIndex: -1,
533
- "aria-selected": t === E.value,
533
+ "aria-selected": t === $.value,
534
534
  className: [
535
535
  "ds-select-option",
536
536
  `ds-select-option--${l}`,
537
- t === E.value && "ds-select-option--selected",
538
- c === N && "ds-select-option--active"
537
+ t === $.value && "ds-select-option--selected",
538
+ d === v && "ds-select-option--active"
539
539
  ].filter(Boolean).join(" "),
540
540
  onClick: () => {
541
- n == null || n(E.value), V(!0);
541
+ n == null || n($.value), V(!0);
542
542
  },
543
- children: E.label
543
+ children: $.label
544
544
  },
545
- E.value
545
+ $.value
546
546
  ))
547
547
  }
548
548
  );
549
549
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
550
- s && /* @__PURE__ */ e.jsx("label", { id: v, className: "ds-select-label", children: s }),
550
+ s && /* @__PURE__ */ e.jsx("label", { id: N, className: "ds-select-label", children: s }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: P, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
554
554
  ref: q,
555
555
  type: "button",
556
- id: F,
556
+ id: C,
557
557
  role: "combobox",
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": p,
560
- "aria-activedescendant": p && N >= 0 ? `${F}-opt-${N}` : void 0,
561
- "aria-labelledby": s ? v : void 0,
560
+ "aria-activedescendant": p && v >= 0 ? `${C}-opt-${v}` : void 0,
561
+ "aria-labelledby": s ? N : void 0,
562
562
  "aria-invalid": r ? "true" : "false",
563
- "aria-describedby": C,
563
+ "aria-describedby": U,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
565
565
  onClick: () => {
566
- m || (p ? V() : x());
566
+ m || (p ? V() : _());
567
567
  },
568
568
  onKeyDown: S,
569
569
  disabled: m,
570
570
  ...f,
571
571
  children: [
572
- /* @__PURE__ */ e.jsx("span", { className: M ? "" : "ds-select-placeholder", children: (M == null ? void 0 : M.label) || a }),
572
+ /* @__PURE__ */ e.jsx("span", { className: M ? "" : "ds-select-placeholder", children: (M == null ? void 0 : M.label) || o }),
573
573
  /* @__PURE__ */ e.jsx(
574
574
  xe,
575
575
  {
@@ -582,64 +582,64 @@ function qs({
582
582
  ]
583
583
  }
584
584
  ) }),
585
- r && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: r }),
586
- typeof document < "u" && pe.createPortal(G, document.body)
585
+ r && /* @__PURE__ */ e.jsx("span", { id: U, className: "ds-select-error", role: "alert", children: r }),
586
+ typeof document < "u" && he.createPortal(G, document.body)
587
587
  ] });
588
588
  }
589
- function Hs({
589
+ function Qs({
590
590
  label: s,
591
591
  value: t = 0,
592
592
  onChange: n,
593
- min: o = 0,
594
- max: a = 100,
593
+ min: a = 0,
594
+ max: o = 100,
595
595
  step: r = 1,
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
598
  hint: m,
599
- error: d,
599
+ error: u,
600
600
  ...f
601
601
  }) {
602
602
  const p = () => {
603
603
  if (l) return;
604
- const g = Math.min(Number(t) + r, a);
604
+ const g = Math.min(Number(t) + r, o);
605
605
  n == null || n(g);
606
606
  }, h = () => {
607
607
  if (l) return;
608
- const g = Math.max(Number(t) - r, o);
608
+ const g = Math.max(Number(t) - r, a);
609
609
  n == null || n(g);
610
- }, u = (g) => {
610
+ }, c = (g) => {
611
611
  if (l) return;
612
- const R = g.target.value;
613
- if (R === "") {
614
- n == null || n(o);
612
+ const E = g.target.value;
613
+ if (E === "") {
614
+ n == null || n(a);
615
615
  return;
616
616
  }
617
- const N = Number(R);
618
- if (!isNaN(N)) {
619
- const $ = Math.min(Math.max(N, o), a);
620
- n == null || n($);
617
+ const v = Number(E);
618
+ if (!isNaN(v)) {
619
+ const T = Math.min(Math.max(v, a), o);
620
+ n == null || n(T);
621
621
  }
622
622
  }, b = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
- d && "ds-stepper-wrapper--error"
626
- ].filter(Boolean).join(" "), _ = [
625
+ u && "ds-stepper-wrapper--error"
626
+ ].filter(Boolean).join(" "), x = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), y = i === "xs" ? A[1] : i === "small" ? A[2] : A[3];
630
+ ].filter(Boolean).join(" "), w = i === "xs" ? D[1] : i === "small" ? D[2] : D[3];
631
631
  return /* @__PURE__ */ e.jsxs("div", { className: b, children: [
632
632
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
633
- /* @__PURE__ */ e.jsxs("div", { className: _, children: [
633
+ /* @__PURE__ */ e.jsxs("div", { className: x, children: [
634
634
  /* @__PURE__ */ e.jsx(
635
635
  "button",
636
636
  {
637
637
  type: "button",
638
638
  className: "ds-stepper-button ds-stepper-button--minus",
639
639
  onClick: h,
640
- disabled: l || t <= o,
640
+ disabled: l || t <= a,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(Ye, { size: y, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(Xe, { size: w, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -648,9 +648,9 @@ function Hs({
648
648
  type: "number",
649
649
  className: "ds-stepper-input",
650
650
  value: t,
651
- onChange: u,
652
- min: o,
653
- max: a,
651
+ onChange: c,
652
+ min: a,
653
+ max: o,
654
654
  step: r,
655
655
  disabled: l,
656
656
  ...f
@@ -662,168 +662,168 @@ function Hs({
662
662
  type: "button",
663
663
  className: "ds-stepper-button ds-stepper-button--plus",
664
664
  onClick: p,
665
- disabled: l || t >= a,
665
+ disabled: l || t >= o,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(qe, { size: y, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(Ge, { size: w, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
671
- m && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: m }),
672
- d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
671
+ m && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: m }),
672
+ u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
673
673
  ] });
674
674
  }
675
- function Ks({
675
+ function et({
676
676
  children: s,
677
677
  padding: t = "m",
678
678
  variant: n = "info",
679
- hover: o = !1,
679
+ hover: a = !1,
680
680
  // deprecated, use variant="interactive"
681
- onClick: a,
681
+ onClick: o,
682
682
  href: r,
683
683
  disabled: i = !1,
684
684
  ...l
685
685
  }) {
686
- const d = (o ? "interactive" : n) === "interactive" || a || r, f = [
686
+ const u = (a ? "interactive" : n) === "interactive" || o || r, f = [
687
687
  "ds-card",
688
688
  `ds-card--${t}`,
689
- d && "ds-card--interactive"
689
+ u && "ds-card--interactive"
690
690
  ].filter(Boolean).join(" ");
691
691
  if (r) {
692
- const u = (b) => {
692
+ const c = (b) => {
693
693
  if (i) {
694
694
  b.preventDefault();
695
695
  return;
696
696
  }
697
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
697
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), o == null || o(b));
698
698
  };
699
699
  return /* @__PURE__ */ e.jsx(
700
700
  "a",
701
701
  {
702
702
  className: f,
703
703
  href: i ? void 0 : r,
704
- onClick: u,
704
+ onClick: c,
705
705
  "aria-disabled": i ? "true" : void 0,
706
706
  ...l,
707
707
  children: s
708
708
  }
709
709
  );
710
710
  }
711
- const p = d && a ? "button" : "div", h = d && a ? {
711
+ const p = u && o ? "button" : "div", h = u && o ? {
712
712
  type: "button",
713
- onClick: a,
713
+ onClick: o,
714
714
  disabled: i
715
715
  } : {};
716
716
  return /* @__PURE__ */ e.jsx(
717
717
  p,
718
718
  {
719
719
  className: f,
720
- role: d && !a ? "article" : void 0,
720
+ role: u && !o ? "article" : void 0,
721
721
  ...h,
722
722
  ...l,
723
723
  children: s
724
724
  }
725
725
  );
726
726
  }
727
- function Xs({ children: s, ...t }) {
727
+ function st({ children: s, ...t }) {
728
728
  return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
729
729
  }
730
- function Gs({ children: s, ...t }) {
730
+ function tt({ children: s, ...t }) {
731
731
  return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
732
732
  }
733
- function Js({ children: s, ...t }) {
733
+ function nt({ children: s, ...t }) {
734
734
  return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
735
735
  }
736
- function Zs({ children: s, ...t }) {
736
+ function rt({ children: s, ...t }) {
737
737
  return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
738
738
  }
739
- function Qs({ children: s, secondary: t = !1, ...n }) {
739
+ function at({ children: s, secondary: t = !1, ...n }) {
740
740
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...n, children: s });
741
741
  }
742
- function ds({ children: s, secondary: t = !1, ...n }) {
742
+ function ps({ children: s, secondary: t = !1, ...n }) {
743
743
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...n, children: s });
744
744
  }
745
- function Fe({ children: s, secondary: t = !1, ...n }) {
745
+ function Ce({ children: s, secondary: t = !1, ...n }) {
746
746
  return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...n, children: s });
747
747
  }
748
- function de({
748
+ function ie({
749
749
  children: s,
750
750
  variant: t = "default",
751
751
  size: n = "m",
752
- role: o,
753
- ...a
752
+ role: a,
753
+ ...o
754
754
  }) {
755
755
  const r = [
756
756
  "ds-badge",
757
757
  `ds-badge--${t}`,
758
758
  `ds-badge--${n}`
759
- ].filter(Boolean).join(" "), i = o || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
760
- return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...a, children: s });
759
+ ].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
760
+ return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...o, children: s });
761
761
  }
762
- const us = {
762
+ const hs = {
763
763
  info: Ee,
764
764
  success: ke,
765
765
  warning: ye,
766
766
  error: ge
767
767
  };
768
- function et({
768
+ function ot({
769
769
  children: s,
770
770
  variant: t = "info",
771
771
  title: n,
772
- onClose: o,
773
- role: a,
772
+ onClose: a,
773
+ role: o,
774
774
  ...r
775
775
  }) {
776
- const i = us[t], l = a || (t === "error" ? "alert" : "status");
776
+ const i = hs[t], l = o || (t === "error" ? "alert" : "status");
777
777
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
778
- i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
778
+ i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
779
779
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
780
780
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: n }),
781
781
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
782
782
  ] }),
783
- o && /* @__PURE__ */ e.jsx(
783
+ a && /* @__PURE__ */ e.jsx(
784
784
  "button",
785
785
  {
786
786
  type: "button",
787
787
  className: "ds-alert__close",
788
- onClick: o,
788
+ onClick: a,
789
789
  "aria-label": "Close alert",
790
- children: /* @__PURE__ */ e.jsx(te, { size: A[3], strokeWidth: 1.5 })
790
+ children: /* @__PURE__ */ e.jsx(se, { size: D[3], strokeWidth: 1.5 })
791
791
  }
792
792
  )
793
793
  ] });
794
794
  }
795
- const fs = 200;
796
- function st({
795
+ const xs = 200;
796
+ function it({
797
797
  children: s,
798
798
  title: t,
799
799
  onClose: n,
800
- size: o = "m",
801
- scrollable: a = !1,
800
+ size: a = "m",
801
+ scrollable: o = !1,
802
802
  subHeader: r,
803
803
  ...i
804
804
  }) {
805
- const l = T(null), m = U.useId(), [d, f] = I(!1), p = () => {
806
- !n || d || (f(!0), setTimeout(() => {
805
+ const l = R(null), m = F.useId(), [u, f] = A(!1), p = () => {
806
+ !n || u || (f(!0), setTimeout(() => {
807
807
  f(!1), n();
808
- }, fs));
808
+ }, xs));
809
809
  };
810
- L(() => {
811
- const _ = (g) => {
810
+ B(() => {
811
+ const x = (g) => {
812
812
  g.key === "Escape" && p();
813
- }, y = (g) => {
814
- var N, $, P;
815
- const R = (($ = (N = g.composedPath) == null ? void 0 : N.call(g)) == null ? void 0 : $[0]) ?? g.target;
816
- l.current && !l.current.contains(R) && !((P = R.closest) != null && P.call(R, "[data-ds-portal]")) && p();
813
+ }, w = (g) => {
814
+ var v, T, P;
815
+ const E = ((T = (v = g.composedPath) == null ? void 0 : v.call(g)) == null ? void 0 : T[0]) ?? g.target;
816
+ l.current && !l.current.contains(E) && !((P = E.closest) != null && P.call(E, "[data-ds-portal]")) && p();
817
817
  };
818
- return document.addEventListener("keydown", _), document.addEventListener("mousedown", y), () => {
819
- document.removeEventListener("keydown", _), document.removeEventListener("mousedown", y);
818
+ return document.addEventListener("keydown", x), document.addEventListener("mousedown", w), () => {
819
+ document.removeEventListener("keydown", x), document.removeEventListener("mousedown", w);
820
820
  };
821
- }, [n, d]);
822
- const h = U.Children.toArray(s), u = h.find((_) => (_ == null ? void 0 : _.type) === he), b = h.filter((_) => (_ == null ? void 0 : _.type) !== he);
823
- return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
821
+ }, [n, u]);
822
+ const h = F.Children.toArray(s), c = h.find((x) => (x == null ? void 0 : x.type) === ue), b = h.filter((x) => (x == null ? void 0 : x.type) !== ue);
823
+ return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", u && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
824
824
  "div",
825
825
  {
826
- className: [`ds-modal ds-modal--${o}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
826
+ className: [`ds-modal ds-modal--${a}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
827
827
  ref: l,
828
828
  role: "dialog",
829
829
  "aria-modal": "true",
@@ -835,7 +835,7 @@ function st({
835
835
  className: "ds-modal__close",
836
836
  variant: "ghost",
837
837
  size: "small",
838
- icon: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }),
838
+ icon: /* @__PURE__ */ e.jsx(se, { size: D[2], strokeWidth: 1.5 }),
839
839
  onClick: p,
840
840
  "aria-label": "Close modal"
841
841
  }
@@ -845,45 +845,45 @@ function st({
845
845
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
846
846
  ] }),
847
847
  /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: b }),
848
- u
848
+ c
849
849
  ]
850
850
  }
851
851
  ) });
852
852
  }
853
- function he({ children: s }) {
854
- return !s || U.Children.count(s) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
853
+ function ue({ children: s }) {
854
+ return !s || F.Children.count(s) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
855
855
  }
856
- const ms = 320;
857
- function tt({
856
+ const bs = 320;
857
+ function lt({
858
858
  children: s,
859
859
  title: t,
860
860
  onClose: n,
861
- subHeader: o,
862
- ...a
861
+ subHeader: a,
862
+ ...o
863
863
  }) {
864
- const r = T(null), i = U.useId(), [l, m] = I(!1), d = () => {
864
+ const r = R(null), i = F.useId(), [l, m] = A(!1), u = () => {
865
865
  !n || l || (m(!0), setTimeout(() => {
866
866
  m(!1), n();
867
- }, ms));
867
+ }, bs));
868
868
  };
869
- L(() => {
870
- const u = (_) => {
871
- _.key === "Escape" && d();
872
- }, b = (_) => {
873
- var g, R, N;
874
- const y = ((R = (g = _.composedPath) == null ? void 0 : g.call(_)) == null ? void 0 : R[0]) ?? _.target;
875
- r.current && !r.current.contains(y) && !((N = y.closest) != null && N.call(y, "[data-ds-portal]")) && d();
869
+ B(() => {
870
+ const c = (x) => {
871
+ x.key === "Escape" && u();
872
+ }, b = (x) => {
873
+ var g, E, v;
874
+ const w = ((E = (g = x.composedPath) == null ? void 0 : g.call(x)) == null ? void 0 : E[0]) ?? x.target;
875
+ r.current && !r.current.contains(w) && !((v = w.closest) != null && v.call(w, "[data-ds-portal]")) && u();
876
876
  };
877
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
878
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
877
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", b), () => {
878
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", b);
879
879
  };
880
880
  }, [n, l]);
881
- const f = U.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === he), h = f.filter((u) => (u == null ? void 0 : u.type) !== he);
881
+ const f = F.Children.toArray(s), p = f.find((c) => (c == null ? void 0 : c.type) === ue), h = f.filter((c) => (c == null ? void 0 : c.type) !== ue);
882
882
  return /* @__PURE__ */ e.jsx(
883
883
  "div",
884
884
  {
885
885
  className: ["ds-bottom-sheet-overlay", l && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
886
- ...a,
886
+ ...o,
887
887
  children: /* @__PURE__ */ e.jsxs(
888
888
  "div",
889
889
  {
@@ -900,14 +900,14 @@ function tt({
900
900
  className: "ds-bottom-sheet__close",
901
901
  variant: "ghost",
902
902
  size: "small",
903
- icon: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }),
904
- onClick: d,
903
+ icon: /* @__PURE__ */ e.jsx(se, { size: D[2], strokeWidth: 1.5 }),
904
+ onClick: u,
905
905
  "aria-label": "Close"
906
906
  }
907
907
  ),
908
- (t || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
908
+ (t || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
909
909
  t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: t }),
910
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: o })
910
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: a })
911
911
  ] }),
912
912
  /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: h }),
913
913
  p
@@ -917,25 +917,25 @@ function tt({
917
917
  }
918
918
  );
919
919
  }
920
- function ps({
920
+ function _s({
921
921
  children: s,
922
922
  title: t = "Code",
923
923
  defaultExpanded: n = !1,
924
- expanded: o,
925
- onToggle: a,
924
+ expanded: a,
925
+ onToggle: o,
926
926
  padding: r = "s",
927
927
  className: i = "",
928
928
  ...l
929
929
  }) {
930
- const [m, d] = I(n), f = o !== void 0, p = f ? o : m, h = () => {
931
- f ? a == null || a(!o) : d((b) => !b);
932
- }, u = [
930
+ const [m, u] = A(n), f = a !== void 0, p = f ? a : m, h = () => {
931
+ f ? o == null || o(!a) : u((b) => !b);
932
+ }, c = [
933
933
  "ds-code-accordion",
934
934
  `ds-code-accordion--${r}`,
935
935
  p && "ds-code-accordion--expanded",
936
936
  i
937
937
  ].filter(Boolean).join(" ");
938
- return /* @__PURE__ */ e.jsxs("div", { className: u, ...l, children: [
938
+ return /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
939
939
  /* @__PURE__ */ e.jsxs(
940
940
  "button",
941
941
  {
@@ -948,7 +948,7 @@ function ps({
948
948
  /* @__PURE__ */ e.jsx(
949
949
  xe,
950
950
  {
951
- size: A[2],
951
+ size: D[2],
952
952
  strokeWidth: 1.5,
953
953
  className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
954
954
  }
@@ -959,45 +959,45 @@ function ps({
959
959
  /* @__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: s }) }) }) })
960
960
  ] });
961
961
  }
962
- function nt({ children: s, block: t = !1, collapsible: n = !1, title: o = "Code", defaultExpanded: a = !1, ...r }) {
963
- return t ? n ? /* @__PURE__ */ e.jsx(ps, { title: o, defaultExpanded: a, ...r, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: s });
962
+ function ct({ children: s, block: t = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
963
+ return t ? n ? /* @__PURE__ */ e.jsx(_s, { title: a, defaultExpanded: o, ...r, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: s });
964
964
  }
965
- function rt({ href: s, children: t, onClick: n, target: o, rel: a, ...r }) {
966
- const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
965
+ function dt({ href: s, children: t, onClick: n, target: a, rel: o, ...r }) {
966
+ const l = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
967
967
  return /* @__PURE__ */ e.jsx(
968
968
  "a",
969
969
  {
970
970
  href: s,
971
971
  className: "ds-link",
972
972
  onClick: n,
973
- target: o,
973
+ target: a,
974
974
  rel: l,
975
975
  ...r,
976
976
  children: t
977
977
  }
978
978
  );
979
979
  }
980
- function at({ children: s, size: t = "m", variant: n = "ghost", ...o }) {
981
- return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: U.Children.map(s, (a) => U.isValidElement(a) ? U.cloneElement(a, { size: t, variant: n }) : a) });
980
+ function ut({ children: s, size: t = "m", variant: n = "ghost", ...a }) {
981
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: F.Children.map(s, (o) => F.isValidElement(o) ? F.cloneElement(o, { size: t, variant: n }) : o) });
982
982
  }
983
- function ot({ children: s, selected: t = !1, onClick: n, size: o = "m", variant: a = "ghost", disabled: r = !1, icon: i, href: l, ...m }) {
984
- const d = i && !s, f = [
983
+ function ft({ children: s, selected: t = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...m }) {
984
+ const u = i && !s, f = [
985
985
  "ds-tab",
986
- `ds-tab--${o}`,
987
986
  `ds-tab--${a}`,
987
+ `ds-tab--${o}`,
988
988
  t && "ds-tab--selected",
989
- d && "ds-tab--icon-only"
989
+ u && "ds-tab--icon-only"
990
990
  ].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
991
991
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
992
992
  s
993
993
  ] });
994
994
  if (l) {
995
- const h = (u) => {
995
+ const h = (c) => {
996
996
  if (r) {
997
- u.preventDefault();
997
+ c.preventDefault();
998
998
  return;
999
999
  }
1000
- u.metaKey || u.ctrlKey || u.button === 1 || (u.preventDefault(), n == null || n(u));
1000
+ c.metaKey || c.ctrlKey || c.button === 1 || (c.preventDefault(), n == null || n(c));
1001
1001
  };
1002
1002
  return /* @__PURE__ */ e.jsx(
1003
1003
  "a",
@@ -1026,36 +1026,36 @@ function ot({ children: s, selected: t = !1, onClick: n, size: o = "m", variant:
1026
1026
  }
1027
1027
  );
1028
1028
  }
1029
- function it({ options: s, value: t, onChange: n, size: o = "m", disabled: a = !1 }) {
1030
- const r = T(null), i = T(null), [l, m] = I(!1), d = T(!1), f = T(null), p = T(null), h = () => {
1029
+ function mt({ options: s, value: t, onChange: n, size: a = "m", disabled: o = !1 }) {
1030
+ const r = R(null), i = R(null), [l, m] = A(!1), u = R(!1), f = R(null), p = R(null), h = () => {
1031
1031
  if (!r.current) return;
1032
- const u = r.current.querySelector(`[data-value="${t}"]`);
1033
- if (!u) return;
1034
- const b = r.current.getBoundingClientRect(), _ = u.getBoundingClientRect(), y = _.left - b.left, g = _.width;
1035
- i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = y + "px", i.current.style.width = g + "px", d.current = !1) : (m(!0), requestAnimationFrame(() => {
1032
+ const c = r.current.querySelector(`[data-value="${t}"]`);
1033
+ if (!c) return;
1034
+ const b = r.current.getBoundingClientRect(), x = c.getBoundingClientRect(), w = x.left - b.left, g = x.width;
1035
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = w + "px", i.current.style.width = g + "px", u.current = !1) : (m(!0), requestAnimationFrame(() => {
1036
1036
  if (!i.current || !r.current) return;
1037
- const R = r.current.querySelector(`[data-value="${t}"]`);
1038
- if (!R) return;
1039
- const N = r.current.getBoundingClientRect(), $ = R.getBoundingClientRect();
1040
- i.current.style.transition = "none", i.current.style.left = $.left - N.left + "px", i.current.style.width = $.width + "px";
1037
+ const E = r.current.querySelector(`[data-value="${t}"]`);
1038
+ if (!E) return;
1039
+ const v = r.current.getBoundingClientRect(), T = E.getBoundingClientRect();
1040
+ i.current.style.transition = "none", i.current.style.left = T.left - v.left + "px", i.current.style.width = T.width + "px";
1041
1041
  }));
1042
1042
  };
1043
- return p.current = h, Ve(() => {
1044
- const u = f.current !== t;
1045
- f.current = t, d.current = l && u, h();
1046
- }), L(() => {
1043
+ return p.current = h, qe(() => {
1044
+ const c = f.current !== t;
1045
+ f.current = t, u.current = l && c, h();
1046
+ }), B(() => {
1047
1047
  if (!r.current) return;
1048
- const u = new ResizeObserver(() => {
1049
- d.current = !1, p.current();
1048
+ const c = new ResizeObserver(() => {
1049
+ u.current = !1, p.current();
1050
1050
  });
1051
- return u.observe(r.current), () => u.disconnect();
1051
+ return c.observe(r.current), () => c.disconnect();
1052
1052
  }, []), /* @__PURE__ */ e.jsxs(
1053
1053
  "div",
1054
1054
  {
1055
1055
  className: [
1056
1056
  "ds-seg",
1057
- `ds-seg--${o}`,
1058
- a && "ds-seg--disabled"
1057
+ `ds-seg--${a}`,
1058
+ o && "ds-seg--disabled"
1059
1059
  ].filter(Boolean).join(" "),
1060
1060
  ref: r,
1061
1061
  role: "group",
@@ -1068,21 +1068,21 @@ function it({ options: s, value: t, onChange: n, size: o = "m", disabled: a = !1
1068
1068
  "aria-hidden": "true"
1069
1069
  }
1070
1070
  ),
1071
- s.map((u) => /* @__PURE__ */ e.jsxs(
1071
+ s.map((c) => /* @__PURE__ */ e.jsxs(
1072
1072
  "button",
1073
1073
  {
1074
1074
  type: "button",
1075
- "data-value": u.value,
1076
- className: ["ds-seg__btn", t === u.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1077
- onClick: () => !a && n(u.value),
1078
- "aria-pressed": t === u.value,
1079
- disabled: a,
1075
+ "data-value": c.value,
1076
+ className: ["ds-seg__btn", t === c.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
1077
+ onClick: () => !o && n(c.value),
1078
+ "aria-pressed": t === c.value,
1079
+ disabled: o,
1080
1080
  children: [
1081
- u.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: u.icon }),
1082
- u.label
1081
+ c.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: c.icon }),
1082
+ c.label
1083
1083
  ]
1084
1084
  },
1085
- u.value
1085
+ c.value
1086
1086
  ))
1087
1087
  ]
1088
1088
  }
@@ -1092,13 +1092,13 @@ function $e({
1092
1092
  children: s,
1093
1093
  title: t,
1094
1094
  defaultExpanded: n = !1,
1095
- expanded: o,
1096
- onToggle: a,
1095
+ expanded: a,
1096
+ onToggle: o,
1097
1097
  padding: r = "m",
1098
1098
  ...i
1099
1099
  }) {
1100
- const [l, m] = I(n), d = o !== void 0, f = d ? o : l, p = () => {
1101
- d ? a == null || a(!o) : m((u) => !u);
1100
+ const [l, m] = A(n), u = a !== void 0, f = u ? a : l, p = () => {
1101
+ u ? o == null || o(!a) : m((c) => !c);
1102
1102
  }, h = [
1103
1103
  "ds-accordion",
1104
1104
  `ds-accordion--${r}`,
@@ -1117,7 +1117,7 @@ function $e({
1117
1117
  /* @__PURE__ */ e.jsx(
1118
1118
  xe,
1119
1119
  {
1120
- size: A[2],
1120
+ size: D[2],
1121
1121
  strokeWidth: 1.5,
1122
1122
  className: `ds-accordion__icon ${f ? "ds-accordion__icon--expanded" : ""}`
1123
1123
  }
@@ -1128,65 +1128,65 @@ function $e({
1128
1128
  /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: s }) }) })
1129
1129
  ] });
1130
1130
  }
1131
- const re = 8, le = 8;
1132
- function hs(s, t, n) {
1133
- const o = window.innerWidth;
1134
- let a, r;
1131
+ const re = 8, de = 8;
1132
+ function js(s, t, n) {
1133
+ const a = window.innerWidth;
1134
+ let o, r;
1135
1135
  switch (s) {
1136
1136
  case "top":
1137
- a = t.top - n.height - re, r = t.left + t.width / 2 - n.width / 2;
1137
+ o = t.top - n.height - re, r = t.left + t.width / 2 - n.width / 2;
1138
1138
  break;
1139
1139
  case "bottom":
1140
- a = t.bottom + re, r = t.left + t.width / 2 - n.width / 2;
1140
+ o = t.bottom + re, r = t.left + t.width / 2 - n.width / 2;
1141
1141
  break;
1142
1142
  case "left":
1143
- a = t.top + t.height / 2 - n.height / 2, r = t.left - n.width - re;
1143
+ o = t.top + t.height / 2 - n.height / 2, r = t.left - n.width - re;
1144
1144
  break;
1145
1145
  case "right":
1146
- a = t.top + t.height / 2 - n.height / 2, r = t.right + re;
1146
+ o = t.top + t.height / 2 - n.height / 2, r = t.right + re;
1147
1147
  break;
1148
1148
  default:
1149
- a = t.bottom + re, r = t.left;
1149
+ o = t.bottom + re, r = t.left;
1150
1150
  }
1151
- const i = Math.max(le, Math.min(o - n.width - le, r)), l = r - i;
1152
- return { top: a, left: i, arrowOffset: l };
1153
- }
1154
- function xs(s, t, n) {
1155
- const o = window.innerWidth, a = window.innerHeight;
1156
- if (s.top >= t + re + le) return "top";
1157
- if (a - s.bottom >= t + re + le) return "bottom";
1158
- if (o - s.right >= n + re + le) return "right";
1159
- if (s.left >= n + re + le) return "left";
1160
- const r = Math.max(s.top, a - s.bottom, s.left, o - s.right);
1161
- return r === s.top ? "top" : r === a - s.bottom ? "bottom" : r === o - s.right ? "right" : "left";
1162
- }
1163
- function lt({ children: s, content: t, position: n, ...o }) {
1164
- const [a, r] = I(!1), [i, l] = I({ visibility: "hidden" }), [m, d] = I(n || "top"), f = T(null), p = T(null), h = T(!1), u = () => {
1151
+ const i = Math.max(de, Math.min(a - n.width - de, r)), l = r - i;
1152
+ return { top: o, left: i, arrowOffset: l };
1153
+ }
1154
+ function vs(s, t, n) {
1155
+ const a = window.innerWidth, o = window.innerHeight;
1156
+ if (s.top >= t + re + de) return "top";
1157
+ if (o - s.bottom >= t + re + de) return "bottom";
1158
+ if (a - s.right >= n + re + de) return "right";
1159
+ if (s.left >= n + re + de) return "left";
1160
+ const r = Math.max(s.top, o - s.bottom, s.left, a - s.right);
1161
+ return r === s.top ? "top" : r === o - s.bottom ? "bottom" : r === a - s.right ? "right" : "left";
1162
+ }
1163
+ function Ns({ children: s, content: t, position: n, ...a }) {
1164
+ const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [m, u] = A(n || "top"), f = R(null), p = R(null), h = R(!1), c = () => {
1165
1165
  if (!f.current || !p.current) return;
1166
- const _ = f.current.getBoundingClientRect(), y = p.current.getBoundingClientRect(), g = n || xs(_, y.height, y.width), { top: R, left: N, arrowOffset: $ } = hs(g, _, y);
1167
- d(g), l({
1166
+ const x = f.current.getBoundingClientRect(), w = p.current.getBoundingClientRect(), g = n || vs(x, w.height, w.width), { top: E, left: v, arrowOffset: T } = js(g, x, w);
1167
+ u(g), l({
1168
1168
  position: "fixed",
1169
- top: R,
1170
- left: N,
1169
+ top: E,
1170
+ left: v,
1171
1171
  visibility: "visible",
1172
- "--arrow-offset": `${$}px`
1172
+ "--arrow-offset": `${T}px`
1173
1173
  });
1174
1174
  };
1175
- if (L(() => {
1176
- if (!a) return;
1175
+ if (B(() => {
1176
+ if (!o) return;
1177
1177
  l({ position: "fixed", visibility: "hidden" });
1178
- const _ = requestAnimationFrame(u);
1179
- return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1180
- cancelAnimationFrame(_), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1178
+ const x = requestAnimationFrame(c);
1179
+ return window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1180
+ cancelAnimationFrame(x), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1181
1181
  };
1182
- }, [a, n]), L(() => {
1183
- if (!a) return;
1184
- const _ = (y) => {
1185
- f.current && !f.current.contains(y.target) && r(!1);
1182
+ }, [o, n]), B(() => {
1183
+ if (!o) return;
1184
+ const x = (w) => {
1185
+ f.current && !f.current.contains(w.target) && r(!1);
1186
1186
  };
1187
- return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
1188
- }, [a]), !t) return s;
1189
- const b = a && /* @__PURE__ */ e.jsx(
1187
+ return document.addEventListener("touchstart", x), () => document.removeEventListener("touchstart", x);
1188
+ }, [o]), !t) return s;
1189
+ const b = o && /* @__PURE__ */ e.jsx(
1190
1190
  "div",
1191
1191
  {
1192
1192
  ref: p,
@@ -1209,29 +1209,29 @@ function lt({ children: s, content: t, position: n, ...o }) {
1209
1209
  h.current || r(!1);
1210
1210
  },
1211
1211
  onTouchStart: () => {
1212
- h.current = !0, r((_) => !_);
1212
+ h.current = !0, r((x) => !x);
1213
1213
  },
1214
- ...o,
1214
+ ...a,
1215
1215
  children: [
1216
1216
  s,
1217
- typeof document < "u" && pe.createPortal(b, document.body)
1217
+ typeof document < "u" && he.createPortal(b, document.body)
1218
1218
  ]
1219
1219
  }
1220
1220
  );
1221
1221
  }
1222
- function ct({
1222
+ function pt({
1223
1223
  checked: s = !1,
1224
1224
  onChange: t,
1225
1225
  size: n = "m",
1226
- disabled: o = !1,
1227
- label: a,
1226
+ disabled: a = !1,
1227
+ label: o,
1228
1228
  id: r,
1229
1229
  ...i
1230
1230
  }) {
1231
- const l = r || `toggle-${U.useId()}`, m = [
1231
+ const l = r || `toggle-${F.useId()}`, m = [
1232
1232
  "ds-toggle",
1233
1233
  `ds-toggle--${n}`,
1234
- o && "ds-toggle--disabled"
1234
+ a && "ds-toggle--disabled"
1235
1235
  ].filter(Boolean).join(" ");
1236
1236
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1237
1237
  /* @__PURE__ */ e.jsx(
@@ -1241,29 +1241,29 @@ function ct({
1241
1241
  id: l,
1242
1242
  className: "ds-toggle__input",
1243
1243
  checked: s,
1244
- onChange: (d) => t == null ? void 0 : t(d.target.checked),
1245
- disabled: o,
1244
+ onChange: (u) => t == null ? void 0 : t(u.target.checked),
1245
+ disabled: a,
1246
1246
  ...i
1247
1247
  }
1248
1248
  ),
1249
1249
  /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
1250
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
1250
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
1251
1251
  ] });
1252
1252
  }
1253
- function dt({
1253
+ function ht({
1254
1254
  checked: s = !1,
1255
1255
  onChange: t,
1256
1256
  size: n = "m",
1257
- disabled: o = !1,
1258
- label: a,
1257
+ disabled: a = !1,
1258
+ label: o,
1259
1259
  id: r,
1260
1260
  ...i
1261
1261
  }) {
1262
- const l = r || `checkbox-${U.useId()}`, m = [
1262
+ const l = r || `checkbox-${F.useId()}`, m = [
1263
1263
  "ds-checkbox",
1264
1264
  `ds-checkbox--${n}`,
1265
- o && "ds-checkbox--disabled"
1266
- ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
+ a && "ds-checkbox--disabled"
1266
+ ].filter(Boolean).join(" "), u = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1267
1267
  return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: l, children: [
1268
1268
  /* @__PURE__ */ e.jsx(
1269
1269
  "input",
@@ -1273,73 +1273,73 @@ function dt({
1273
1273
  className: "ds-checkbox__input",
1274
1274
  checked: s,
1275
1275
  onChange: (f) => t == null ? void 0 : t(f.target.checked),
1276
- disabled: o,
1276
+ disabled: a,
1277
1277
  ...i
1278
1278
  }
1279
1279
  ),
1280
1280
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ e.jsx(
1281
1281
  we,
1282
1282
  {
1283
- size: d,
1283
+ size: u,
1284
1284
  strokeWidth: 2.5,
1285
1285
  className: "ds-checkbox__icon"
1286
1286
  }
1287
1287
  ) }),
1288
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
1288
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
1289
1289
  ] });
1290
1290
  }
1291
- function ut({
1291
+ function xt({
1292
1292
  checked: s = !1,
1293
1293
  onChange: t,
1294
1294
  size: n = "m",
1295
- disabled: o = !1,
1296
- label: a,
1295
+ disabled: a = !1,
1296
+ label: o,
1297
1297
  name: r,
1298
1298
  value: i,
1299
1299
  id: l,
1300
1300
  ...m
1301
1301
  }) {
1302
- const d = l || `radio-${U.useId()}`, f = [
1302
+ const u = l || `radio-${F.useId()}`, f = [
1303
1303
  "ds-radio",
1304
1304
  `ds-radio--${n}`,
1305
- o && "ds-radio--disabled"
1305
+ a && "ds-radio--disabled"
1306
1306
  ].filter(Boolean).join(" ");
1307
- return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: d, children: [
1307
+ return /* @__PURE__ */ e.jsxs("label", { className: f, htmlFor: u, children: [
1308
1308
  /* @__PURE__ */ e.jsx(
1309
1309
  "input",
1310
1310
  {
1311
1311
  type: "radio",
1312
- id: d,
1312
+ id: u,
1313
1313
  className: "ds-radio__input",
1314
1314
  checked: s,
1315
1315
  onChange: (p) => t == null ? void 0 : t(p.target.checked),
1316
- disabled: o,
1316
+ disabled: a,
1317
1317
  name: r,
1318
1318
  value: i,
1319
1319
  ...m
1320
1320
  }
1321
1321
  ),
1322
1322
  /* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
1323
- a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
1323
+ o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
1324
1324
  ] });
1325
1325
  }
1326
- function bs({ width: s, height: t, shape: n = "rect", aspectRatio: o, className: a = "", style: r = {}, ...i }) {
1326
+ function ws({ width: s, height: t, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
1327
1327
  return /* @__PURE__ */ e.jsx(
1328
1328
  "span",
1329
1329
  {
1330
- className: ["ds-skeleton", `ds-skeleton--${n}`, a].filter(Boolean).join(" "),
1331
- style: { width: s, height: t, aspectRatio: o, ...r },
1330
+ className: ["ds-skeleton", `ds-skeleton--${n}`, o].filter(Boolean).join(" "),
1331
+ style: { width: s, height: t, aspectRatio: a, ...r },
1332
1332
  "aria-hidden": "true",
1333
1333
  ...i
1334
1334
  }
1335
1335
  );
1336
1336
  }
1337
- function _s({ lines: s = 1, lastLineWidth: t = "70%", gap: n, className: o = "", style: a = {}, ...r }) {
1337
+ function gs({ lines: s = 1, lastLineWidth: t = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
1338
1338
  return /* @__PURE__ */ e.jsx(
1339
1339
  "span",
1340
1340
  {
1341
- className: ["ds-skeleton-text", o].filter(Boolean).join(" "),
1342
- style: { gap: n, ...a },
1341
+ className: ["ds-skeleton-text", a].filter(Boolean).join(" "),
1342
+ style: { gap: n, ...o },
1343
1343
  "aria-hidden": "true",
1344
1344
  ...r,
1345
1345
  children: Array.from({ length: s }, (i, l) => /* @__PURE__ */ e.jsx(
@@ -1353,54 +1353,54 @@ function _s({ lines: s = 1, lastLineWidth: t = "70%", gap: n, className: o = "",
1353
1353
  }
1354
1354
  );
1355
1355
  }
1356
- bs.Text = _s;
1357
- function js(s) {
1356
+ ws.Text = gs;
1357
+ function ys(s) {
1358
1358
  let t = 2166136261;
1359
1359
  for (let n = 0; n < s.length; n++)
1360
1360
  t ^= s.charCodeAt(n), t = Math.imul(t, 16777619) >>> 0;
1361
1361
  return t % 360;
1362
1362
  }
1363
- function vs(s) {
1363
+ function ks(s) {
1364
1364
  if (!s) return "";
1365
1365
  const t = s.trim().split(/\s+/);
1366
1366
  return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
1367
1367
  }
1368
- function ft({ seed: s, icon: t, src: n, size: o = 32, className: a = "", style: r = {}, ...i }) {
1369
- const l = js(s ?? ""), [m, d] = I(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: vs(s) });
1368
+ function bt({ seed: s, icon: t, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
1369
+ const l = ys(s ?? ""), [m, u] = A(!1), f = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: ks(s) });
1370
1370
  return /* @__PURE__ */ e.jsx(
1371
1371
  "div",
1372
1372
  {
1373
- className: ["ds-avatar", a].filter(Boolean).join(" "),
1374
- style: { width: o, height: o, "--ds-avatar-h": l, ...r },
1373
+ className: ["ds-avatar", o].filter(Boolean).join(" "),
1374
+ style: { width: a, height: a, "--ds-avatar-h": l, ...r },
1375
1375
  "aria-hidden": "true",
1376
1376
  ...i,
1377
- children: n && !m ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : f
1377
+ children: n && !m ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => u(!0) }) : f
1378
1378
  }
1379
1379
  );
1380
1380
  }
1381
- function mt({
1381
+ function _t({
1382
1382
  children: s,
1383
1383
  size: t = "compact",
1384
1384
  stickyTop: n,
1385
- maxHeight: o,
1386
- className: a = "",
1385
+ maxHeight: a,
1386
+ className: o = "",
1387
1387
  style: r = {},
1388
1388
  ...i
1389
1389
  }) {
1390
1390
  const l = {
1391
- ...o ? { maxHeight: o } : {},
1391
+ ...a ? { maxHeight: a } : {},
1392
1392
  ...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
1393
1393
  ...r
1394
1394
  };
1395
1395
  return /* @__PURE__ */ e.jsx(
1396
1396
  "div",
1397
1397
  {
1398
- className: ["ds-table-wrap", "ds-scrollable", o ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1398
+ className: ["ds-table-wrap", "ds-scrollable", a ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1399
1399
  style: l,
1400
1400
  children: /* @__PURE__ */ e.jsx(
1401
1401
  "table",
1402
1402
  {
1403
- className: ["ds-table", `ds-table--${t}`, a].filter(Boolean).join(" "),
1403
+ className: ["ds-table", `ds-table--${t}`, o].filter(Boolean).join(" "),
1404
1404
  ...i,
1405
1405
  children: s
1406
1406
  }
@@ -1408,13 +1408,13 @@ function mt({
1408
1408
  }
1409
1409
  );
1410
1410
  }
1411
- function pt({ children: s, ...t }) {
1411
+ function jt({ children: s, ...t }) {
1412
1412
  return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
1413
1413
  }
1414
- function ht({ children: s, ...t }) {
1414
+ function vt({ children: s, ...t }) {
1415
1415
  return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
1416
1416
  }
1417
- function xt({ children: s, interactive: t, selected: n, subheader: o, exiting: a, updated: r, className: i = "", onClick: l, ...m }) {
1417
+ function Nt({ children: s, interactive: t, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...m }) {
1418
1418
  return /* @__PURE__ */ e.jsx(
1419
1419
  "tr",
1420
1420
  {
@@ -1422,8 +1422,8 @@ function xt({ children: s, interactive: t, selected: n, subheader: o, exiting: a
1422
1422
  "ds-table-row",
1423
1423
  t || l ? "ds-table-row--interactive" : "",
1424
1424
  n ? "ds-table-row--selected" : "",
1425
- o ? "ds-table-row--subheader" : "",
1426
- a ? "ds-table-row--exiting" : "",
1425
+ a ? "ds-table-row--subheader" : "",
1426
+ o ? "ds-table-row--exiting" : "",
1427
1427
  r ? "ds-table-row--updated" : "",
1428
1428
  i
1429
1429
  ].filter(Boolean).join(" "),
@@ -1433,11 +1433,11 @@ function xt({ children: s, interactive: t, selected: n, subheader: o, exiting: a
1433
1433
  }
1434
1434
  );
1435
1435
  }
1436
- function bt({ children: s, colSpan: t = 999, ...n }) {
1436
+ function wt({ children: s, colSpan: t = 999, ...n }) {
1437
1437
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
1438
1438
  }
1439
- function _t({ children: s, align: t = "left", sortDir: n, onSort: o, width: a, className: r = "", style: i = {}, ...l }) {
1440
- const m = !!o || n !== void 0, d = n === "asc" ? He : n === "desc" ? xe : Ke;
1439
+ function gt({ children: s, align: t = "left", sortDir: n, onSort: a, width: o, className: r = "", style: i = {}, ...l }) {
1440
+ const m = !!a || n !== void 0, u = n === "asc" ? Je : n === "desc" ? xe : Ze;
1441
1441
  return /* @__PURE__ */ e.jsx(
1442
1442
  "th",
1443
1443
  {
@@ -1448,17 +1448,17 @@ function _t({ children: s, align: t = "left", sortDir: n, onSort: o, width: a, c
1448
1448
  t !== "left" ? `ds-table-cell--${t}` : "",
1449
1449
  r
1450
1450
  ].filter(Boolean).join(" "),
1451
- onClick: o,
1452
- style: { width: a, ...i },
1451
+ onClick: a,
1452
+ style: { width: o, ...i },
1453
1453
  ...l,
1454
1454
  children: m ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1455
1455
  s,
1456
- /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
1456
+ /* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(u, { size: 11, strokeWidth: 2.5 }) })
1457
1457
  ] }) : s
1458
1458
  }
1459
1459
  );
1460
1460
  }
1461
- function jt({ children: s, align: t = "left", secondary: n, muted: o, truncate: a, nowrap: r, className: i = "", ...l }) {
1461
+ function yt({ children: s, align: t = "left", secondary: n, muted: a, truncate: o, nowrap: r, className: i = "", ...l }) {
1462
1462
  return /* @__PURE__ */ e.jsx(
1463
1463
  "td",
1464
1464
  {
@@ -1466,8 +1466,8 @@ function jt({ children: s, align: t = "left", secondary: n, muted: o, truncate:
1466
1466
  "ds-td",
1467
1467
  t !== "left" ? `ds-table-cell--${t}` : "",
1468
1468
  n ? "ds-table-cell--secondary" : "",
1469
- o ? "ds-table-cell--muted" : "",
1470
- a ? "ds-table-cell--truncate" : "",
1469
+ a ? "ds-table-cell--muted" : "",
1470
+ o ? "ds-table-cell--truncate" : "",
1471
1471
  r ? "ds-table-cell--nowrap" : "",
1472
1472
  i
1473
1473
  ].filter(Boolean).join(" "),
@@ -1476,69 +1476,69 @@ function jt({ children: s, align: t = "left", secondary: n, muted: o, truncate:
1476
1476
  }
1477
1477
  );
1478
1478
  }
1479
- function vt({
1479
+ function kt({
1480
1480
  icon: s,
1481
1481
  title: t,
1482
1482
  description: n,
1483
- action: o,
1484
- size: a = "m",
1483
+ action: a,
1484
+ size: o = "m",
1485
1485
  className: r = "",
1486
1486
  ...i
1487
1487
  }) {
1488
1488
  return /* @__PURE__ */ e.jsxs(
1489
1489
  "div",
1490
1490
  {
1491
- className: ["ds-empty-state", `ds-empty-state--${a}`, r].filter(Boolean).join(" "),
1491
+ className: ["ds-empty-state", `ds-empty-state--${o}`, r].filter(Boolean).join(" "),
1492
1492
  ...i,
1493
1493
  children: [
1494
1494
  s && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: s }),
1495
1495
  /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: t }),
1496
1496
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
1497
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: o })
1497
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: a })
1498
1498
  ]
1499
1499
  }
1500
1500
  );
1501
1501
  }
1502
- function Nt({
1502
+ function Et({
1503
1503
  label: s,
1504
1504
  hint: t,
1505
1505
  error: n,
1506
- required: o = !1,
1507
- disabled: a = !1,
1506
+ required: a = !1,
1507
+ disabled: o = !1,
1508
1508
  htmlFor: r,
1509
1509
  children: i,
1510
1510
  className: l = "",
1511
1511
  style: m,
1512
- ...d
1512
+ ...u
1513
1513
  }) {
1514
- const f = U.useId(), p = r ?? f, h = `${p}-hint`, u = `${p}-error`;
1514
+ const f = F.useId(), p = r ?? f, h = `${p}-hint`, c = `${p}-error`;
1515
1515
  return /* @__PURE__ */ e.jsxs(
1516
1516
  "div",
1517
1517
  {
1518
1518
  className: `ds-field${l ? ` ${l}` : ""}`,
1519
1519
  "data-state": n ? "error" : void 0,
1520
- "data-required": o ? "" : void 0,
1521
- "data-disabled": a ? "" : void 0,
1520
+ "data-required": a ? "" : void 0,
1521
+ "data-disabled": o ? "" : void 0,
1522
1522
  style: m,
1523
- ...d,
1523
+ ...u,
1524
1524
  children: [
1525
1525
  s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: s }),
1526
1526
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1527
1527
  t && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: t }),
1528
- n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: u, role: "alert", children: n })
1528
+ n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: c, role: "alert", children: n })
1529
1529
  ]
1530
1530
  }
1531
1531
  );
1532
1532
  }
1533
- function wt({ label: s, value: t, delta: n, size: o = "m", inline: a = !1, className: r = "", style: i, ...l }) {
1533
+ function $t({ label: s, value: t, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
1534
1534
  const m = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
1535
1535
  return /* @__PURE__ */ e.jsxs(
1536
1536
  "div",
1537
1537
  {
1538
1538
  className: [
1539
1539
  "ds-stat",
1540
- `ds-stat--${o}`,
1541
- a && "ds-stat--inline",
1540
+ `ds-stat--${a}`,
1541
+ o && "ds-stat--inline",
1542
1542
  r
1543
1543
  ].filter(Boolean).join(" "),
1544
1544
  style: i,
@@ -1551,21 +1551,21 @@ function wt({ label: s, value: t, delta: n, size: o = "m", inline: a = !1, class
1551
1551
  }
1552
1552
  );
1553
1553
  }
1554
- function gt({
1554
+ function Tt({
1555
1555
  children: s,
1556
1556
  separator: t = "/",
1557
1557
  "aria-label": n = "Breadcrumb",
1558
- className: o = "",
1559
- style: a,
1558
+ className: a = "",
1559
+ style: o,
1560
1560
  ...r
1561
1561
  }) {
1562
- const i = U.Children.toArray(s).filter(Boolean);
1562
+ const i = F.Children.toArray(s).filter(Boolean);
1563
1563
  return /* @__PURE__ */ e.jsx(
1564
1564
  "nav",
1565
1565
  {
1566
- className: `ds-breadcrumb${o ? ` ${o}` : ""}`,
1566
+ className: `ds-breadcrumb${a ? ` ${a}` : ""}`,
1567
1567
  "aria-label": n,
1568
- style: a,
1568
+ style: o,
1569
1569
  ...r,
1570
1570
  children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
1571
1571
  l,
@@ -1574,22 +1574,22 @@ function gt({
1574
1574
  }
1575
1575
  );
1576
1576
  }
1577
- function yt({
1577
+ function Rt({
1578
1578
  page: s,
1579
1579
  total: t,
1580
1580
  onChange: n,
1581
- siblings: o = 1,
1582
- "aria-label": a = "Pagination",
1581
+ siblings: a = 1,
1582
+ "aria-label": o = "Pagination",
1583
1583
  className: r = "",
1584
1584
  style: i,
1585
1585
  ...l
1586
1586
  }) {
1587
- const m = Ns(s, t, o);
1587
+ const m = Es(s, t, a);
1588
1588
  return /* @__PURE__ */ e.jsxs(
1589
1589
  "nav",
1590
1590
  {
1591
1591
  className: `ds-pagination${r ? ` ${r}` : ""}`,
1592
- "aria-label": a,
1592
+ "aria-label": o,
1593
1593
  style: i,
1594
1594
  ...l,
1595
1595
  children: [
@@ -1600,20 +1600,20 @@ function yt({
1600
1600
  onClick: () => n == null ? void 0 : n(s - 1),
1601
1601
  disabled: s <= 1,
1602
1602
  "aria-label": "Previous page",
1603
- children: /* @__PURE__ */ e.jsx(Xe, { size: 16 })
1603
+ children: /* @__PURE__ */ e.jsx(Qe, { size: 16 })
1604
1604
  }
1605
1605
  ),
1606
1606
  m.map(
1607
- (d, f) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${f}`) : /* @__PURE__ */ e.jsx(
1607
+ (u, f) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${f}`) : /* @__PURE__ */ e.jsx(
1608
1608
  "button",
1609
1609
  {
1610
- className: `ds-pagination-page${d === s ? " ds-pagination-page--current" : ""}`,
1611
- onClick: () => d !== s && (n == null ? void 0 : n(d)),
1612
- "aria-current": d === s ? "page" : void 0,
1613
- "aria-label": `Page ${d}`,
1614
- children: d
1610
+ className: `ds-pagination-page${u === s ? " ds-pagination-page--current" : ""}`,
1611
+ onClick: () => u !== s && (n == null ? void 0 : n(u)),
1612
+ "aria-current": u === s ? "page" : void 0,
1613
+ "aria-label": `Page ${u}`,
1614
+ children: u
1615
1615
  },
1616
- d
1616
+ u
1617
1617
  )
1618
1618
  ),
1619
1619
  /* @__PURE__ */ e.jsx(
@@ -1623,56 +1623,56 @@ function yt({
1623
1623
  onClick: () => n == null ? void 0 : n(s + 1),
1624
1624
  disabled: s >= t,
1625
1625
  "aria-label": "Next page",
1626
- children: /* @__PURE__ */ e.jsx(Ge, { size: 16 })
1626
+ children: /* @__PURE__ */ e.jsx(es, { size: 16 })
1627
1627
  }
1628
1628
  )
1629
1629
  ]
1630
1630
  }
1631
1631
  );
1632
1632
  }
1633
- function Ns(s, t, n) {
1633
+ function Es(s, t, n) {
1634
1634
  if (t <= 7) return Array.from({ length: t }, (i, l) => l + 1);
1635
- const o = Math.max(2, s - n), a = Math.min(t - 1, s + n), r = [1];
1636
- o > 2 && r.push("…");
1637
- for (let i = o; i <= a; i++) r.push(i);
1638
- return a < t - 1 && r.push("…"), r.push(t), r;
1635
+ const a = Math.max(2, s - n), o = Math.min(t - 1, s + n), r = [1];
1636
+ a > 2 && r.push("…");
1637
+ for (let i = a; i <= o; i++) r.push(i);
1638
+ return o < t - 1 && r.push("…"), r.push(t), r;
1639
1639
  }
1640
- const ws = 200;
1641
- function kt({
1640
+ const $s = 200;
1641
+ function St({
1642
1642
  children: s,
1643
1643
  title: t,
1644
1644
  onClose: n,
1645
- side: o = "right",
1646
- ...a
1645
+ side: a = "right",
1646
+ ...o
1647
1647
  }) {
1648
- const r = T(null), i = U.useId(), [l, m] = I(!1), d = () => {
1648
+ const r = R(null), i = F.useId(), [l, m] = A(!1), u = () => {
1649
1649
  !n || l || (m(!0), setTimeout(() => {
1650
1650
  m(!1), n();
1651
- }, ws));
1651
+ }, $s));
1652
1652
  };
1653
- L(() => {
1654
- const u = (_) => {
1655
- _.key === "Escape" && d();
1656
- }, b = (_) => {
1657
- var g, R, N;
1658
- const y = ((R = (g = _.composedPath) == null ? void 0 : g.call(_)) == null ? void 0 : R[0]) ?? _.target;
1659
- r.current && !r.current.contains(y) && !((N = y.closest) != null && N.call(y, "[data-ds-portal]")) && d();
1653
+ B(() => {
1654
+ const c = (x) => {
1655
+ x.key === "Escape" && u();
1656
+ }, b = (x) => {
1657
+ var g, E, v;
1658
+ const w = ((E = (g = x.composedPath) == null ? void 0 : g.call(x)) == null ? void 0 : E[0]) ?? x.target;
1659
+ r.current && !r.current.contains(w) && !((v = w.closest) != null && v.call(w, "[data-ds-portal]")) && u();
1660
1660
  };
1661
- return document.addEventListener("keydown", u), document.addEventListener("mousedown", b), () => {
1662
- document.removeEventListener("keydown", u), document.removeEventListener("mousedown", b);
1661
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", b), () => {
1662
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", b);
1663
1663
  };
1664
1664
  }, [n, l]);
1665
- const f = U.Children.toArray(s), p = f.find((u) => (u == null ? void 0 : u.type) === Be), h = f.filter((u) => (u == null ? void 0 : u.type) !== Be);
1665
+ const f = F.Children.toArray(s), p = f.find((c) => (c == null ? void 0 : c.type) === Be), h = f.filter((c) => (c == null ? void 0 : c.type) !== Be);
1666
1666
  return /* @__PURE__ */ e.jsx(
1667
1667
  "div",
1668
1668
  {
1669
1669
  className: ["ds-drawer-overlay", l && "ds-drawer-overlay--closing"].filter(Boolean).join(" "),
1670
- ...a,
1670
+ ...o,
1671
1671
  children: /* @__PURE__ */ e.jsxs(
1672
1672
  "aside",
1673
1673
  {
1674
1674
  className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
1675
- "data-side": o,
1675
+ "data-side": a,
1676
1676
  ref: r,
1677
1677
  role: "dialog",
1678
1678
  "aria-modal": "true",
@@ -1680,7 +1680,7 @@ function kt({
1680
1680
  children: [
1681
1681
  /* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
1682
1682
  t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: t }),
1683
- n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 }) })
1683
+ n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(se, { size: D[2], strokeWidth: 1.5 }) })
1684
1684
  ] }),
1685
1685
  /* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
1686
1686
  p
@@ -1693,22 +1693,145 @@ function kt({
1693
1693
  function Be({ children: s }) {
1694
1694
  return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: s });
1695
1695
  }
1696
- const gs = {
1696
+ const Ts = 320;
1697
+ function It({
1698
+ children: s,
1699
+ title: t,
1700
+ onClose: n,
1701
+ subHeader: a,
1702
+ ...o
1703
+ }) {
1704
+ const r = R(null), i = F.useId(), [l, m] = A(!1), u = () => {
1705
+ !n || l || (m(!0), setTimeout(() => {
1706
+ m(!1), n();
1707
+ }, Ts));
1708
+ };
1709
+ B(() => {
1710
+ const c = (x) => {
1711
+ x.key === "Escape" && u();
1712
+ }, b = (x) => {
1713
+ var g, E, v;
1714
+ const w = ((E = (g = x.composedPath) == null ? void 0 : g.call(x)) == null ? void 0 : E[0]) ?? x.target;
1715
+ r.current && !r.current.contains(w) && !((v = w.closest) != null && v.call(w, "[data-ds-portal]")) && u();
1716
+ };
1717
+ return document.addEventListener("keydown", c), document.addEventListener("mousedown", b), () => {
1718
+ document.removeEventListener("keydown", c), document.removeEventListener("mousedown", b);
1719
+ };
1720
+ }, [n, l]);
1721
+ const f = F.Children.toArray(s), p = f.find((c) => (c == null ? void 0 : c.type) === Le || (c == null ? void 0 : c.type) === ue), h = f.filter((c) => (c == null ? void 0 : c.type) !== Le && (c == null ? void 0 : c.type) !== ue);
1722
+ return /* @__PURE__ */ e.jsx(
1723
+ "div",
1724
+ {
1725
+ className: ["ds-side-page-overlay", l && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1726
+ ...o,
1727
+ children: /* @__PURE__ */ e.jsxs(
1728
+ "div",
1729
+ {
1730
+ ref: r,
1731
+ className: ["ds-side-page", l && "ds-side-page--closing"].filter(Boolean).join(" "),
1732
+ role: "dialog",
1733
+ "aria-modal": "true",
1734
+ "aria-labelledby": t ? i : void 0,
1735
+ children: [
1736
+ n && /* @__PURE__ */ e.jsx(
1737
+ ce,
1738
+ {
1739
+ className: "ds-side-page__close",
1740
+ variant: "ghost",
1741
+ size: "small",
1742
+ icon: /* @__PURE__ */ e.jsx(se, { size: D[2], strokeWidth: 1.5 }),
1743
+ onClick: u,
1744
+ "aria-label": "Close"
1745
+ }
1746
+ ),
1747
+ (t || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
1748
+ t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-side-page__title", children: t }),
1749
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: a })
1750
+ ] }),
1751
+ /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: h }),
1752
+ p
1753
+ ]
1754
+ }
1755
+ )
1756
+ }
1757
+ );
1758
+ }
1759
+ function Le({ children: s }) {
1760
+ return !s || F.Children.count(s) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: s });
1761
+ }
1762
+ const We = Ke({ collapsed: !1, side: "left" });
1763
+ function At({
1764
+ children: s,
1765
+ collapsed: t = !1,
1766
+ side: n = "left",
1767
+ className: a = "",
1768
+ ...o
1769
+ }) {
1770
+ const r = [
1771
+ "ds-nav-rail",
1772
+ t && "ds-nav-rail--collapsed",
1773
+ `ds-nav-rail--${n}`,
1774
+ a
1775
+ ].filter(Boolean).join(" ");
1776
+ return /* @__PURE__ */ e.jsx(We.Provider, { value: { collapsed: t, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: s }) });
1777
+ }
1778
+ function Dt({
1779
+ icon: s,
1780
+ label: t,
1781
+ selected: n = !1,
1782
+ disabled: a = !1,
1783
+ href: o,
1784
+ onClick: r,
1785
+ count: i,
1786
+ updated: l = !1,
1787
+ open: m = !1,
1788
+ onboarding: u = !1,
1789
+ className: f = "",
1790
+ ...p
1791
+ }) {
1792
+ const { collapsed: h, side: c } = He(We), w = {
1793
+ className: [
1794
+ "ds-nav-rail__item",
1795
+ f
1796
+ ].filter(Boolean).join(" "),
1797
+ onClick: a ? void 0 : r,
1798
+ "aria-current": n ? "page" : void 0,
1799
+ "aria-disabled": a ? "true" : void 0,
1800
+ "aria-label": h ? t : void 0,
1801
+ tabIndex: a ? -1 : void 0,
1802
+ ...{
1803
+ "data-selected": n || void 0,
1804
+ "data-disabled": a || void 0,
1805
+ "data-open": m || void 0,
1806
+ "data-onboarding": u || void 0
1807
+ },
1808
+ ...p
1809
+ }, g = i != null, E = c === "left" ? "right" : "left", v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1810
+ /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: s }),
1811
+ !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: t }),
1812
+ !h && l && /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
1813
+ !h && g && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
1814
+ h && l && !g && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" }),
1815
+ h && g && /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "default", className: "ds-nav-rail__badge-collapsed", children: i })
1816
+ ] }), T = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...w, children: v }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...w, children: v });
1817
+ return h ? /* @__PURE__ */ e.jsx(Ns, { content: t, position: E, children: T }) : T;
1818
+ }
1819
+ const Rs = {
1697
1820
  info: Ee,
1698
1821
  success: ke,
1699
1822
  warning: ye,
1700
1823
  error: ge
1701
1824
  };
1702
- function Et({
1825
+ function Bt({
1703
1826
  children: s,
1704
1827
  variant: t = "info",
1705
1828
  action: n,
1706
- onAction: o,
1707
- onDismiss: a,
1829
+ onAction: a,
1830
+ onDismiss: o,
1708
1831
  role: r,
1709
1832
  ...i
1710
1833
  }) {
1711
- const l = gs[t], m = r || (t === "error" ? "alert" : "status");
1834
+ const l = Rs[t], m = r || (t === "error" ? "alert" : "status");
1712
1835
  return /* @__PURE__ */ e.jsxs(
1713
1836
  "div",
1714
1837
  {
@@ -1716,169 +1839,169 @@ function Et({
1716
1839
  role: m,
1717
1840
  ...i,
1718
1841
  children: [
1719
- l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: A[2], strokeWidth: 1.5 }) }),
1842
+ l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: D[2], strokeWidth: 1.5 }) }),
1720
1843
  /* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
1721
1844
  n && /* @__PURE__ */ e.jsx(
1722
1845
  "button",
1723
1846
  {
1724
1847
  type: "button",
1725
1848
  className: "ds-banner-action",
1726
- onClick: o,
1849
+ onClick: a,
1727
1850
  children: n
1728
1851
  }
1729
1852
  ),
1730
- a && /* @__PURE__ */ e.jsx(
1853
+ o && /* @__PURE__ */ e.jsx(
1731
1854
  "button",
1732
1855
  {
1733
1856
  type: "button",
1734
1857
  className: "ds-banner-dismiss",
1735
- onClick: a,
1858
+ onClick: o,
1736
1859
  "aria-label": "Dismiss",
1737
- children: /* @__PURE__ */ e.jsx(te, { size: A[2], strokeWidth: 1.5 })
1860
+ children: /* @__PURE__ */ e.jsx(se, { size: D[2], strokeWidth: 1.5 })
1738
1861
  }
1739
1862
  )
1740
1863
  ]
1741
1864
  }
1742
1865
  );
1743
1866
  }
1744
- function $t({
1867
+ function Lt({
1745
1868
  trigger: s,
1746
1869
  items: t = [],
1747
1870
  open: n,
1748
- onOpenChange: o,
1749
- align: a = "left",
1871
+ onOpenChange: a,
1872
+ align: o = "left",
1750
1873
  className: r = "",
1751
1874
  style: i,
1752
1875
  ...l
1753
1876
  }) {
1754
- const [m, d] = I(!1), [f, p] = I(!1), h = n !== void 0, u = h ? n : m, b = T(null), _ = T(null), y = T(null), g = T(null), [R, N] = I({}), $ = T(null), P = 150, B = () => {
1877
+ const [m, u] = A(!1), [f, p] = A(!1), h = n !== void 0, c = h ? n : m, b = R(null), x = R(null), w = R(null), g = R(null), [E, v] = A({}), T = R(null), P = 150, L = () => {
1755
1878
  if (h)
1756
- o == null || o(!1);
1879
+ a == null || a(!1);
1757
1880
  else {
1758
1881
  if (f) return;
1759
- p(!0), $.current = setTimeout(() => {
1760
- d(!1), p(!1);
1882
+ p(!0), T.current = setTimeout(() => {
1883
+ u(!1), p(!1);
1761
1884
  }, P);
1762
1885
  }
1763
1886
  }, q = () => {
1764
- const x = !u;
1765
- h ? o == null || o(x) : x ? (clearTimeout($.current), p(!1), d(!0)) : B();
1887
+ const _ = !c;
1888
+ h ? a == null || a(_) : _ ? (clearTimeout(T.current), p(!1), u(!0)) : L();
1766
1889
  }, H = () => {
1767
- u || (h ? o == null || o(!0) : (clearTimeout($.current), p(!1), d(!0)));
1890
+ c || (h ? a == null || a(!0) : (clearTimeout(T.current), p(!1), u(!0)));
1768
1891
  };
1769
- L(() => () => clearTimeout($.current), []), L(() => {
1770
- if (!u) return;
1771
- const x = 300, w = () => {
1892
+ B(() => () => clearTimeout(T.current), []), B(() => {
1893
+ if (!c) return;
1894
+ const _ = 300, y = () => {
1772
1895
  var G;
1773
1896
  const S = (G = b.current) == null ? void 0 : G.getBoundingClientRect();
1774
1897
  if (!S) return;
1775
- const M = window.innerHeight - S.bottom, K = M < x + 8 && S.top > M;
1776
- N(
1777
- a === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
1898
+ const M = window.innerHeight - S.bottom, K = M < _ + 8 && S.top > M;
1899
+ v(
1900
+ o === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
1778
1901
  );
1779
1902
  };
1780
- return w(), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
1781
- window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
1903
+ return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1904
+ window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1782
1905
  };
1783
- }, [u, a]);
1784
- const F = () => {
1785
- var w;
1786
- const x = (w = y.current) == null ? void 0 : w.querySelector(
1906
+ }, [c, o]);
1907
+ const C = () => {
1908
+ var y;
1909
+ const _ = (y = w.current) == null ? void 0 : y.querySelector(
1787
1910
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
1788
1911
  );
1789
- x == null || x.focus();
1912
+ _ == null || _.focus();
1790
1913
  };
1791
- L(() => {
1792
- if (!u) return;
1793
- const x = (S) => {
1914
+ B(() => {
1915
+ if (!c) return;
1916
+ const _ = (S) => {
1794
1917
  var M, K;
1795
- !((M = b.current) != null && M.contains(S.target)) && !((K = _.current) != null && K.contains(S.target)) && B();
1796
- }, w = (S) => {
1797
- S.key === "Escape" && (B(), F());
1918
+ !((M = b.current) != null && M.contains(S.target)) && !((K = x.current) != null && K.contains(S.target)) && L();
1919
+ }, y = (S) => {
1920
+ S.key === "Escape" && (L(), C());
1798
1921
  };
1799
- return document.addEventListener("mousedown", x), document.addEventListener("keydown", w), () => {
1800
- document.removeEventListener("mousedown", x), document.removeEventListener("keydown", w);
1922
+ return document.addEventListener("mousedown", _), document.addEventListener("keydown", y), () => {
1923
+ document.removeEventListener("mousedown", _), document.removeEventListener("keydown", y);
1801
1924
  };
1802
- }, [u]), L(() => {
1803
- if (!u || !g.current || !_.current) return;
1804
- const x = v(), w = g.current === "last" ? x[x.length - 1] : x[0];
1805
- w == null || w.focus(), g.current = null;
1806
- }, [u]);
1807
- const v = () => _.current ? [..._.current.querySelectorAll(
1925
+ }, [c]), B(() => {
1926
+ if (!c || !g.current || !x.current) return;
1927
+ const _ = N(), y = g.current === "last" ? _[_.length - 1] : _[0];
1928
+ y == null || y.focus(), g.current = null;
1929
+ }, [c]);
1930
+ const N = () => x.current ? [...x.current.querySelectorAll(
1808
1931
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
1809
- )] : [], C = (x) => {
1810
- var w, S;
1811
- if (x.key === "ArrowDown")
1812
- x.preventDefault(), u ? (w = v()[0]) == null || w.focus() : (g.current = "first", H());
1813
- else if (x.key === "ArrowUp")
1814
- if (x.preventDefault(), !u)
1932
+ )] : [], U = (_) => {
1933
+ var y, S;
1934
+ if (_.key === "ArrowDown")
1935
+ _.preventDefault(), c ? (y = N()[0]) == null || y.focus() : (g.current = "first", H());
1936
+ else if (_.key === "ArrowUp")
1937
+ if (_.preventDefault(), !c)
1815
1938
  g.current = "last", H();
1816
1939
  else {
1817
- const M = v();
1940
+ const M = N();
1818
1941
  (S = M[M.length - 1]) == null || S.focus();
1819
1942
  }
1820
- }, X = (x) => {
1821
- var M, K, G, E;
1822
- const w = v(), S = w.findIndex((c) => c === document.activeElement);
1823
- switch (x.key) {
1943
+ }, X = (_) => {
1944
+ var M, K, G, $;
1945
+ const y = N(), S = y.findIndex((d) => d === document.activeElement);
1946
+ switch (_.key) {
1824
1947
  case "ArrowDown":
1825
- x.preventDefault(), (M = w[Math.min(S + 1, w.length - 1)]) == null || M.focus();
1948
+ _.preventDefault(), (M = y[Math.min(S + 1, y.length - 1)]) == null || M.focus();
1826
1949
  break;
1827
1950
  case "ArrowUp":
1828
- x.preventDefault(), S <= 0 ? F() : (K = w[S - 1]) == null || K.focus();
1951
+ _.preventDefault(), S <= 0 ? C() : (K = y[S - 1]) == null || K.focus();
1829
1952
  break;
1830
1953
  case "Home":
1831
- x.preventDefault(), (G = w[0]) == null || G.focus();
1954
+ _.preventDefault(), (G = y[0]) == null || G.focus();
1832
1955
  break;
1833
1956
  case "End":
1834
- x.preventDefault(), (E = w[w.length - 1]) == null || E.focus();
1957
+ _.preventDefault(), ($ = y[y.length - 1]) == null || $.focus();
1835
1958
  break;
1836
1959
  case "Tab":
1837
- B();
1960
+ L();
1838
1961
  break;
1839
1962
  }
1840
- }, V = u && /* @__PURE__ */ e.jsx(
1963
+ }, V = c && /* @__PURE__ */ e.jsx(
1841
1964
  "div",
1842
1965
  {
1843
- ref: _,
1966
+ ref: x,
1844
1967
  role: "menu",
1845
1968
  "data-ds-portal": "",
1846
1969
  className: [
1847
1970
  "ds-dropdown__menu",
1848
- `ds-dropdown__menu--${a}`,
1971
+ `ds-dropdown__menu--${o}`,
1849
1972
  f && "ds-dropdown__menu--closing"
1850
1973
  ].filter(Boolean).join(" "),
1851
- style: R,
1974
+ style: E,
1852
1975
  onKeyDown: X,
1853
- children: t.map((x, w) => {
1854
- if (x.separator)
1855
- return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, w);
1856
- if (x.type === "section")
1976
+ children: t.map((_, y) => {
1977
+ if (_.separator)
1978
+ return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
1979
+ if (_.type === "section")
1857
1980
  return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
1858
- x.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: x.label }),
1859
- /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: x.content })
1860
- ] }, w);
1861
- const S = !!x.href, M = S ? "a" : "button", K = S ? { href: x.disabled ? void 0 : x.href, "aria-disabled": x.disabled ? "true" : void 0 } : { type: "button", disabled: x.disabled };
1981
+ _.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
1982
+ /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
1983
+ ] }, y);
1984
+ const S = !!_.href, M = S ? "a" : "button", K = S ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
1862
1985
  return /* @__PURE__ */ e.jsxs(
1863
1986
  M,
1864
1987
  {
1865
1988
  role: "menuitem",
1866
1989
  className: [
1867
1990
  "ds-dropdown__item",
1868
- x.danger && "ds-dropdown__item--danger"
1991
+ _.danger && "ds-dropdown__item--danger"
1869
1992
  ].filter(Boolean).join(" "),
1870
1993
  ...K,
1871
1994
  onClick: () => {
1872
1995
  var G;
1873
- (G = x.onClick) == null || G.call(x), B();
1996
+ (G = _.onClick) == null || G.call(_), L();
1874
1997
  },
1875
1998
  children: [
1876
- x.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: x.icon }),
1877
- /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: x.label }),
1878
- x.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: x.shortcut })
1999
+ _.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
2000
+ /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
2001
+ _.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
1879
2002
  ]
1880
2003
  },
1881
- w
2004
+ y
1882
2005
  );
1883
2006
  })
1884
2007
  }
@@ -1894,27 +2017,27 @@ function $t({
1894
2017
  /* @__PURE__ */ e.jsx(
1895
2018
  "div",
1896
2019
  {
1897
- ref: y,
2020
+ ref: w,
1898
2021
  className: "ds-dropdown__trigger",
1899
2022
  onClick: q,
1900
- onKeyDown: C,
2023
+ onKeyDown: U,
1901
2024
  children: s
1902
2025
  }
1903
2026
  ),
1904
- typeof document < "u" && pe.createPortal(V, document.body)
2027
+ typeof document < "u" && he.createPortal(V, document.body)
1905
2028
  ]
1906
2029
  }
1907
2030
  );
1908
2031
  }
1909
- function Tt({
2032
+ function Pt({
1910
2033
  value: s = 0,
1911
2034
  size: t = "m",
1912
2035
  variant: n = "default",
1913
- showValue: o = !1,
1914
- min: a = 2,
2036
+ showValue: a = !1,
2037
+ min: o = 2,
1915
2038
  animate: r = !0
1916
2039
  }) {
1917
- const i = Math.min(100, Math.max(0, s)), l = Math.max(a, i), m = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
2040
+ const i = Math.min(100, Math.max(0, s)), l = Math.max(o, i), m = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
1918
2041
  return /* @__PURE__ */ e.jsxs(
1919
2042
  "div",
1920
2043
  {
@@ -1935,7 +2058,7 @@ function Tt({
1935
2058
  style: { width: `${l}%` }
1936
2059
  }
1937
2060
  ) }),
1938
- o && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
2061
+ a && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
1939
2062
  Math.round(i),
1940
2063
  "%"
1941
2064
  ] })
@@ -1943,39 +2066,39 @@ function Tt({
1943
2066
  }
1944
2067
  );
1945
2068
  }
1946
- const ys = (s) => 1 - Math.pow(1 - s, 3), ks = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1947
- function Es(s, { duration: t = 600 } = {}) {
1948
- const [n, o] = I(s), a = T(s), r = T(null);
1949
- return L(() => {
1950
- if (ks()) {
1951
- o(s), a.current = s;
2069
+ const Ss = (s) => 1 - Math.pow(1 - s, 3), Is = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2070
+ function As(s, { duration: t = 600 } = {}) {
2071
+ const [n, a] = A(s), o = R(s), r = R(null);
2072
+ return B(() => {
2073
+ if (Is()) {
2074
+ a(s), o.current = s;
1952
2075
  return;
1953
2076
  }
1954
- const i = a.current, l = s - i;
2077
+ const i = o.current, l = s - i;
1955
2078
  if (l === 0) return;
1956
2079
  let m = null;
1957
- const d = (f) => {
2080
+ const u = (f) => {
1958
2081
  m || (m = f);
1959
2082
  const p = Math.min((f - m) / t, 1);
1960
- o(i + l * ys(p)), p < 1 ? r.current = requestAnimationFrame(d) : a.current = s;
2083
+ a(i + l * Ss(p)), p < 1 ? r.current = requestAnimationFrame(u) : o.current = s;
1961
2084
  };
1962
- return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
2085
+ return r.current = requestAnimationFrame(u), () => cancelAnimationFrame(r.current);
1963
2086
  }, [s, t]), n;
1964
2087
  }
1965
- function Rt({
2088
+ function Mt({
1966
2089
  value: s,
1967
2090
  duration: t = 600,
1968
2091
  decimals: n = 0,
1969
- prefix: o = "",
1970
- suffix: a = ""
2092
+ prefix: a = "",
2093
+ suffix: o = ""
1971
2094
  }) {
1972
- const i = Es(s, { duration: t }).toFixed(n);
1973
- return `${o}${i}${a}`;
2095
+ const i = As(s, { duration: t }).toFixed(n);
2096
+ return `${a}${i}${o}`;
1974
2097
  }
1975
- function $s({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
1976
- const o = T(null), [a, r] = I(!1);
1977
- return L(() => {
1978
- const i = o.current;
2098
+ function Ds({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
2099
+ const a = R(null), [o, r] = A(!1);
2100
+ return B(() => {
2101
+ const i = a.current;
1979
2102
  if (!i) return;
1980
2103
  const l = new IntersectionObserver(
1981
2104
  ([m]) => {
@@ -1984,43 +2107,43 @@ function $s({ threshold: s = 0.1, rootMargin: t = "0px", once: n = !1 } = {}) {
1984
2107
  { threshold: s, rootMargin: t }
1985
2108
  );
1986
2109
  return l.observe(i), () => l.disconnect();
1987
- }, [s, t, n]), { ref: o, inView: a };
2110
+ }, [s, t, n]), { ref: a, inView: o };
1988
2111
  }
1989
- function St({
2112
+ function zt({
1990
2113
  children: s,
1991
2114
  as: t = "div",
1992
2115
  once: n = !1,
1993
- threshold: o = 0.1,
1994
- rootMargin: a = "0px",
2116
+ threshold: a = 0.1,
2117
+ rootMargin: o = "0px",
1995
2118
  onEnter: r,
1996
2119
  onLeave: i,
1997
2120
  ...l
1998
2121
  }) {
1999
- const { ref: m, inView: d } = $s({ threshold: o, rootMargin: a, once: n }), f = T(!1);
2000
- return L(() => {
2001
- d && !f.current && (r == null || r()), !d && f.current && (i == null || i()), f.current = d;
2002
- }, [d]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(d) : s });
2122
+ const { ref: m, inView: u } = Ds({ threshold: a, rootMargin: o, once: n }), f = R(!1);
2123
+ return B(() => {
2124
+ u && !f.current && (r == null || r()), !u && f.current && (i == null || i()), f.current = u;
2125
+ }, [u]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(u) : s });
2003
2126
  }
2004
- const Le = {
2127
+ const Pe = {
2005
2128
  default: Ee,
2006
2129
  success: ke,
2007
2130
  warning: ye,
2008
2131
  error: ge
2009
2132
  };
2010
- let ue = [];
2133
+ let fe = [];
2011
2134
  const ve = /* @__PURE__ */ new Set();
2012
- function We() {
2013
- ve.forEach((s) => s([...ue]));
2135
+ function Ue() {
2136
+ ve.forEach((s) => s([...fe]));
2014
2137
  }
2015
- function Ts(s) {
2016
- ue = [...ue, s], We();
2138
+ function Bs(s) {
2139
+ fe = [...fe, s], Ue();
2017
2140
  }
2018
- function Rs(s) {
2019
- ue = ue.filter((t) => t.id !== s), We();
2141
+ function Ls(s) {
2142
+ fe = fe.filter((t) => t.id !== s), Ue();
2020
2143
  }
2021
- function Dt() {
2144
+ function Ot() {
2022
2145
  const s = (t, n = {}) => {
2023
- Ts({
2146
+ Bs({
2024
2147
  id: `${Date.now()}-${Math.random()}`,
2025
2148
  message: t,
2026
2149
  type: "default",
@@ -2030,13 +2153,13 @@ function Dt() {
2030
2153
  };
2031
2154
  return s.success = (t, n) => s(t, { ...n, type: "success" }), s.error = (t, n) => s(t, { ...n, type: "error" }), s.warning = (t, n) => s(t, { ...n, type: "warning" }), { toast: s };
2032
2155
  }
2033
- function Ss({ data: s, onDismiss: t }) {
2034
- const [n, o] = I(!1), a = T(null);
2035
- L(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => r(), s.duration)), () => clearTimeout(a.current)), []);
2156
+ function Ps({ data: s, onDismiss: t }) {
2157
+ const [n, a] = A(!1), o = R(null);
2158
+ B(() => (requestAnimationFrame(() => a(!0)), s.duration > 0 && (o.current = setTimeout(() => r(), s.duration)), () => clearTimeout(o.current)), []);
2036
2159
  function r() {
2037
- o(!1), setTimeout(() => t(s.id), 250);
2160
+ a(!1), setTimeout(() => t(s.id), 250);
2038
2161
  }
2039
- const i = Le[s.type] ?? Le.default;
2162
+ const i = Pe[s.type] ?? Pe.default;
2040
2163
  return /* @__PURE__ */ e.jsxs(
2041
2164
  "div",
2042
2165
  {
@@ -2048,7 +2171,7 @@ function Ss({ data: s, onDismiss: t }) {
2048
2171
  role: s.type === "error" ? "alert" : "status",
2049
2172
  "aria-live": "polite",
2050
2173
  children: [
2051
- /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
2174
+ /* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: D[3], strokeWidth: 1.5 }) }),
2052
2175
  /* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: s.message }),
2053
2176
  /* @__PURE__ */ e.jsx(
2054
2177
  "button",
@@ -2056,54 +2179,54 @@ function Ss({ data: s, onDismiss: t }) {
2056
2179
  className: "ds-toast__close",
2057
2180
  onClick: r,
2058
2181
  "aria-label": "Закрыть",
2059
- children: /* @__PURE__ */ e.jsx(te, { size: A[3], strokeWidth: 1.5 })
2182
+ children: /* @__PURE__ */ e.jsx(se, { size: D[3], strokeWidth: 1.5 })
2060
2183
  }
2061
2184
  )
2062
2185
  ]
2063
2186
  }
2064
2187
  );
2065
2188
  }
2066
- function It({ position: s = "bottom-right" }) {
2067
- const [t, n] = I(() => [...ue]);
2068
- return L(() => (ve.add(n), () => ve.delete(n)), []), !t.length || typeof document > "u" ? null : pe.createPortal(
2069
- /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(Ss, { data: o, onDismiss: Rs }, o.id)) }),
2189
+ function Ft({ position: s = "bottom-right" }) {
2190
+ const [t, n] = A(() => [...fe]);
2191
+ return B(() => (ve.add(n), () => ve.delete(n)), []), !t.length || typeof document > "u" ? null : he.createPortal(
2192
+ /* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((a) => /* @__PURE__ */ e.jsx(Ps, { data: a, onDismiss: Ls }, a.id)) }),
2070
2193
  document.body
2071
2194
  );
2072
2195
  }
2073
- const Ds = {
2074
- running: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "info", children: "Running..." }),
2075
- success: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "success", children: "Done" }),
2076
- error: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "error", children: "Error" })
2196
+ const Ms = {
2197
+ running: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "info", children: "Running..." }),
2198
+ success: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "success", children: "Done" }),
2199
+ error: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "error", children: "Error" })
2077
2200
  };
2078
- function At({
2201
+ function Ct({
2079
2202
  label: s,
2080
2203
  status: t = "idle",
2081
2204
  icon: n,
2082
- badge: o,
2083
- defaultExpanded: a = !1,
2205
+ badge: a,
2206
+ defaultExpanded: o = !1,
2084
2207
  expanded: r,
2085
2208
  onToggle: i,
2086
2209
  children: l,
2087
2210
  className: m = "",
2088
- ...d
2211
+ ...u
2089
2212
  }) {
2090
2213
  const f = t === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2091
2214
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2092
2215
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
2093
- Ds[t],
2094
- o
2216
+ Ms[t],
2217
+ a
2095
2218
  ] });
2096
2219
  return l ? /* @__PURE__ */ e.jsx(
2097
2220
  "div",
2098
2221
  {
2099
2222
  className: ["ds-tool-card", f && "ds-tool-card--running", m].filter(Boolean).join(" "),
2100
- ...d,
2223
+ ...u,
2101
2224
  children: /* @__PURE__ */ e.jsx(
2102
2225
  $e,
2103
2226
  {
2104
2227
  title: p,
2105
2228
  padding: "s",
2106
- defaultExpanded: a,
2229
+ defaultExpanded: o,
2107
2230
  expanded: f ? !1 : r,
2108
2231
  onToggle: f ? void 0 : i,
2109
2232
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
@@ -2114,19 +2237,19 @@ function At({
2114
2237
  "div",
2115
2238
  {
2116
2239
  className: ["ds-tool-card", "ds-tool-card--bubble", m].filter(Boolean).join(" "),
2117
- ...d,
2240
+ ...u,
2118
2241
  children: p
2119
2242
  }
2120
2243
  );
2121
2244
  }
2122
- function Is({
2245
+ function zs({
2123
2246
  text: s,
2124
2247
  size: t = "xs",
2125
2248
  timeout: n = 800,
2126
- "aria-label": o = "Copy to clipboard",
2127
- ...a
2249
+ "aria-label": a = "Copy to clipboard",
2250
+ ...o
2128
2251
  }) {
2129
- const [r, i] = I(!1), l = (m) => {
2252
+ const [r, i] = A(!1), l = (m) => {
2130
2253
  m.currentTarget.blur(), navigator.clipboard.writeText(s).then(() => {
2131
2254
  i(!0), setTimeout(() => i(!1), n);
2132
2255
  });
@@ -2137,48 +2260,48 @@ function Is({
2137
2260
  variant: "ghost",
2138
2261
  size: t,
2139
2262
  state: r ? "success" : "idle",
2140
- icon: /* @__PURE__ */ e.jsx(Je, { size: A[1], strokeWidth: 1.5 }),
2141
- "aria-label": o,
2263
+ icon: /* @__PURE__ */ e.jsx(ss, { size: D[1], strokeWidth: 1.5 }),
2264
+ "aria-label": a,
2142
2265
  onClick: l,
2143
- ...a
2266
+ ...o
2144
2267
  }
2145
2268
  );
2146
2269
  }
2147
- function Bt({ content: s, streaming: t = !1, ...n }) {
2148
- const [o, a] = I(t);
2149
- return L(() => {
2150
- a(!!t);
2270
+ function Wt({ content: s, streaming: t = !1, ...n }) {
2271
+ const [a, o] = A(t);
2272
+ return B(() => {
2273
+ o(!!t);
2151
2274
  }, [t]), /* @__PURE__ */ e.jsx(
2152
2275
  $e,
2153
2276
  {
2154
- expanded: o,
2155
- onToggle: a,
2277
+ expanded: a,
2278
+ onToggle: o,
2156
2279
  padding: "s",
2157
2280
  title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
2158
- /* @__PURE__ */ e.jsx(Ze, { size: A[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2159
- /* @__PURE__ */ e.jsx(ds, { secondary: !0, children: "Thinking" })
2281
+ /* @__PURE__ */ e.jsx(ts, { size: D[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
2282
+ /* @__PURE__ */ e.jsx(ps, { secondary: !0, children: "Thinking" })
2160
2283
  ] }),
2161
2284
  ...n,
2162
- children: /* @__PURE__ */ e.jsxs(Fe, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2285
+ children: /* @__PURE__ */ e.jsxs(Ce, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
2163
2286
  s,
2164
2287
  t && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
2165
2288
  ] })
2166
2289
  }
2167
2290
  );
2168
2291
  }
2169
- function Lt({
2292
+ function Ut({
2170
2293
  count: s,
2171
2294
  current: t = 0,
2172
2295
  done: n = [],
2173
- onChange: o,
2174
- showCounter: a = !0,
2296
+ onChange: a,
2297
+ showCounter: o = !0,
2175
2298
  className: r = "",
2176
2299
  "aria-label": i = "Steps",
2177
2300
  ...l
2178
2301
  }) {
2179
2302
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
2180
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (m, d) => {
2181
- const f = d === t, p = n.includes(d) && !f, h = o && (d <= t || n.includes(d)), u = [
2303
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (m, u) => {
2304
+ const f = u === t, p = n.includes(u) && !f, h = a && (u <= t || n.includes(u)), c = [
2182
2305
  "ds-step-indicator__dot",
2183
2306
  f && "ds-step-indicator__dot--active",
2184
2307
  p && "ds-step-indicator__dot--done"
@@ -2187,46 +2310,46 @@ function Lt({
2187
2310
  "button",
2188
2311
  {
2189
2312
  type: "button",
2190
- className: u,
2313
+ className: c,
2191
2314
  role: "tab",
2192
2315
  "aria-selected": f,
2193
- "aria-label": `Step ${d + 1}`,
2194
- disabled: !h || d === t,
2195
- onClick: () => o == null ? void 0 : o(d),
2316
+ "aria-label": `Step ${u + 1}`,
2317
+ disabled: !h || u === t,
2318
+ onClick: () => a == null ? void 0 : a(u),
2196
2319
  children: p ? /* @__PURE__ */ e.jsx(we, { size: 8, strokeWidth: 3 }) : null
2197
2320
  },
2198
- d
2321
+ u
2199
2322
  );
2200
2323
  }) }),
2201
- a && /* @__PURE__ */ e.jsxs(Fe, { secondary: !0, className: "ds-step-indicator__counter", children: [
2324
+ o && /* @__PURE__ */ e.jsxs(Ce, { secondary: !0, className: "ds-step-indicator__counter", children: [
2202
2325
  t + 1,
2203
2326
  " / ",
2204
2327
  s
2205
2328
  ] })
2206
2329
  ] });
2207
2330
  }
2208
- function Pt({
2331
+ function Vt({
2209
2332
  content: s,
2210
2333
  isStreaming: t = !1,
2211
2334
  cursor: n = "line",
2212
- onChunk: o,
2213
- className: a = "",
2335
+ onChunk: a,
2336
+ className: o = "",
2214
2337
  ...r
2215
2338
  }) {
2216
- const i = T(s);
2217
- return L(() => {
2218
- s !== i.current && (o == null || o(s), i.current = s);
2219
- }, [s, o]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...r, children: [
2339
+ const i = R(s);
2340
+ return B(() => {
2341
+ s !== i.current && (a == null || a(s), i.current = s);
2342
+ }, [s, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...r, children: [
2220
2343
  s,
2221
2344
  t && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
2222
2345
  ] });
2223
2346
  }
2224
- function Mt({
2347
+ function Yt({
2225
2348
  role: s = "assistant",
2226
2349
  header: t,
2227
2350
  footer: n,
2228
- attachments: o,
2229
- isStreaming: a = !1,
2351
+ attachments: a,
2352
+ isStreaming: o = !1,
2230
2353
  children: r,
2231
2354
  className: i = "",
2232
2355
  ...l
@@ -2234,150 +2357,150 @@ function Mt({
2234
2357
  const m = [
2235
2358
  "ds-chat-message",
2236
2359
  `ds-chat-message--${s}`,
2237
- a && "ds-chat-message--streaming",
2360
+ o && "ds-chat-message--streaming",
2238
2361
  i
2239
2362
  ].filter(Boolean).join(" ");
2240
2363
  return s === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : s === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2241
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2364
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2242
2365
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
2243
2366
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2244
2367
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...l, children: [
2245
2368
  t && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: t }),
2246
- o && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: o }),
2369
+ a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
2247
2370
  /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
2248
2371
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
2249
2372
  ] });
2250
2373
  }
2251
- function zt(s, { containerRef: t, smartPause: n = !0 } = {}) {
2252
- const o = T(!1), a = T(0);
2253
- L(() => {
2374
+ function qt(s, { containerRef: t, smartPause: n = !0 } = {}) {
2375
+ const a = R(!1), o = R(0);
2376
+ B(() => {
2254
2377
  const r = t == null ? void 0 : t.current;
2255
2378
  if (!r) return;
2256
2379
  const i = () => {
2257
2380
  const l = r.scrollHeight - r.scrollTop - r.clientHeight < 64;
2258
- !l && r.scrollTop < a.current && (o.current = !0), l && (o.current = !1), a.current = r.scrollTop;
2381
+ !l && r.scrollTop < o.current && (a.current = !0), l && (a.current = !1), o.current = r.scrollTop;
2259
2382
  };
2260
2383
  return r.addEventListener("scroll", i, { passive: !0 }), () => r.removeEventListener("scroll", i);
2261
- }, [t]), L(() => {
2384
+ }, [t]), B(() => {
2262
2385
  const r = t == null ? void 0 : t.current;
2263
- r && (n && o.current || (r.scrollTop = r.scrollHeight));
2386
+ r && (n && a.current || (r.scrollTop = r.scrollHeight));
2264
2387
  }, s);
2265
2388
  }
2266
- function As({
2389
+ function Os({
2267
2390
  prompts: s,
2268
2391
  enabled: t,
2269
2392
  typingSpeed: n = 38,
2270
- erasingSpeed: o = 18,
2271
- holdTime: a = 2200,
2393
+ erasingSpeed: a = 18,
2394
+ holdTime: o = 2200,
2272
2395
  betweenTime: r = 380,
2273
2396
  manualPauseMs: i = 5e3
2274
2397
  }) {
2275
- const [l, m] = I(0), [d, f] = I(""), p = T("typing"), h = T(0), u = T(0), b = T(null), _ = T(0);
2276
- L(() => {
2277
- u.current = l;
2278
- }, [l]), L(() => {
2398
+ const [l, m] = A(0), [u, f] = A(""), p = R("typing"), h = R(0), c = R(0), b = R(null), x = R(0);
2399
+ B(() => {
2400
+ c.current = l;
2401
+ }, [l]), B(() => {
2279
2402
  if (b.current && (clearTimeout(b.current), b.current = null), !t || s.length === 0) {
2280
2403
  f(""), h.current = 0, p.current = "typing";
2281
2404
  return;
2282
2405
  }
2283
- const $ = () => {
2406
+ const T = () => {
2284
2407
  const P = Date.now();
2285
- if (_.current > P) {
2286
- b.current = setTimeout($, _.current - P);
2408
+ if (x.current > P) {
2409
+ b.current = setTimeout(T, x.current - P);
2287
2410
  return;
2288
2411
  }
2289
- const B = s[u.current % s.length] ?? "";
2290
- p.current === "typing" ? (h.current += 1, f(B.slice(0, h.current)), h.current >= B.length ? (p.current = "holding", b.current = setTimeout($, a)) : b.current = setTimeout($, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout($, o)) : (h.current = Math.max(0, h.current - 1), f(B.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", u.current = (u.current + 1) % s.length, m(u.current), b.current = setTimeout($, r)) : b.current = setTimeout($, o));
2412
+ const L = s[c.current % s.length] ?? "";
2413
+ p.current === "typing" ? (h.current += 1, f(L.slice(0, h.current)), h.current >= L.length ? (p.current = "holding", b.current = setTimeout(T, o)) : b.current = setTimeout(T, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", b.current = setTimeout(T, a)) : (h.current = Math.max(0, h.current - 1), f(L.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % s.length, m(c.current), b.current = setTimeout(T, r)) : b.current = setTimeout(T, a));
2291
2414
  };
2292
- return b.current = setTimeout($, 260), () => {
2415
+ return b.current = setTimeout(T, 260), () => {
2293
2416
  b.current && clearTimeout(b.current);
2294
2417
  };
2295
- }, [t, s, n, o, a, r]);
2296
- const y = ($) => {
2418
+ }, [t, s, n, a, o, r]);
2419
+ const w = (T) => {
2297
2420
  if (s.length === 0) return;
2298
- const P = ($ % s.length + s.length) % s.length, B = s[P];
2299
- u.current = P, h.current = B.length, p.current = "holding", _.current = Date.now() + i, m(P), f(B);
2300
- }, g = () => y(u.current + 1), R = () => y(u.current - 1), N = s[l % s.length] ?? "";
2301
- return { displayed: d, currentPrompt: N, index: l, next: g, prev: R };
2421
+ const P = (T % s.length + s.length) % s.length, L = s[P];
2422
+ c.current = P, h.current = L.length, p.current = "holding", x.current = Date.now() + i, m(P), f(L);
2423
+ }, g = () => w(c.current + 1), E = () => w(c.current - 1), v = s[l % s.length] ?? "";
2424
+ return { displayed: u, currentPrompt: v, index: l, next: g, prev: E };
2302
2425
  }
2303
- let Bs = 0;
2304
- function Ot({
2426
+ let Fs = 0;
2427
+ function Ht({
2305
2428
  value: s = "",
2306
2429
  onChange: t,
2307
2430
  onSubmit: n,
2308
- onStop: o,
2309
- onKeyDown: a,
2431
+ onStop: a,
2432
+ onKeyDown: o,
2310
2433
  loading: r = !1,
2311
2434
  disabled: i = !1,
2312
2435
  placeholder: l = "Let's get things done...",
2313
2436
  animatedPlaceholders: m,
2314
- attachments: d,
2437
+ attachments: u,
2315
2438
  images: f,
2316
2439
  onAttachFiles: p,
2317
2440
  onAttachImages: h,
2318
- onRemoveAttachment: u,
2441
+ onRemoveAttachment: c,
2319
2442
  onRemoveImage: b,
2320
- acceptImage: _,
2321
- acceptFile: y,
2443
+ acceptImage: x,
2444
+ acceptFile: w,
2322
2445
  maxImages: g,
2323
- maxImageSize: R,
2324
- leftSlot: N,
2325
- rightSlot: $,
2446
+ maxImageSize: E,
2447
+ leftSlot: v,
2448
+ rightSlot: T,
2326
2449
  className: P = "",
2327
- ...B
2450
+ ...L
2328
2451
  }) {
2329
- const q = T(null), H = T(null), F = T(0), [v, C] = I(!1), [X, V] = I([]), x = (j) => {
2330
- const D = ++Bs;
2331
- V((Y) => [...Y, { id: D, msg: j }]), setTimeout(() => V((Y) => Y.filter((J) => J.id !== D)), 6e3);
2332
- }, w = (j) => V((D) => D.filter((Y) => Y.id !== j)), S = (j) => j.type.startsWith("image/"), M = () => !0, K = _ ?? S, G = y ?? M, E = (j) => {
2333
- const D = [], Y = [], J = [], Z = [];
2334
- let ee = 0, ie = g != null ? g - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2335
- for (const se of j)
2336
- K(se) ? R && se.size > R ? J.push(se.name) : ie > 0 ? (D.push(se), ie--) : ee++ : G(se) ? Y.push(se) : Z.push(se.name);
2337
- return { imageFiles: D, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee };
2338
- }, c = (j) => {
2339
- const { imageFiles: D, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee } = E(j);
2340
- J.length && x(`File${J.length > 1 ? "s" : ""} too large${R ? ` (max ${R / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && x(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && x(`Max ${g} images per message`), h && D.length && h(D);
2341
- const ie = Y.concat(h ? [] : D);
2342
- p && ie.length && p(ie);
2452
+ const q = R(null), H = R(null), C = R(0), [N, U] = A(!1), [X, V] = A([]), _ = (j) => {
2453
+ const I = ++Fs;
2454
+ V((Y) => [...Y, { id: I, msg: j }]), setTimeout(() => V((Y) => Y.filter((J) => J.id !== I)), 6e3);
2455
+ }, y = (j) => V((I) => I.filter((Y) => Y.id !== j)), S = (j) => j.type.startsWith("image/"), M = () => !0, K = x ?? S, G = w ?? M, $ = (j) => {
2456
+ const I = [], Y = [], J = [], Z = [];
2457
+ let ee = 0, le = g != null ? g - ((f == null ? void 0 : f.length) ?? 0) : 1 / 0;
2458
+ for (const te of j)
2459
+ K(te) ? E && te.size > E ? J.push(te.name) : le > 0 ? (I.push(te), le--) : ee++ : G(te) ? Y.push(te) : Z.push(te.name);
2460
+ return { imageFiles: I, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee };
2461
+ }, d = (j) => {
2462
+ const { imageFiles: I, docFiles: Y, tooLarge: J, skipped: Z, limitExceeded: ee } = $(j);
2463
+ J.length && _(`File${J.length > 1 ? "s" : ""} too large${E ? ` (max ${E / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), ee && _(`Max ${g} images per message`), h && I.length && h(I);
2464
+ const le = Y.concat(h ? [] : I);
2465
+ p && le.length && p(le);
2343
2466
  };
2344
- L(() => {
2467
+ B(() => {
2345
2468
  const j = H.current;
2346
2469
  j && (j.style.height = "auto", j.style.height = `${Math.min(j.scrollHeight, 200)}px`);
2347
- }, [s]), L(() => {
2348
- const j = (D) => {
2470
+ }, [s]), B(() => {
2471
+ const j = (I) => {
2349
2472
  var J, Z, ee;
2350
2473
  if (r || i) return;
2351
- const Y = (J = D.target) == null ? void 0 : J.tagName;
2352
- Y === "INPUT" || Y === "TEXTAREA" || Y === "SELECT" || (Z = D.target) != null && Z.isContentEditable || D.ctrlKey || D.metaKey || D.altKey || D.key.length !== 1 && D.key !== "Backspace" && D.key !== "Delete" || (ee = H.current) == null || ee.focus();
2474
+ const Y = (J = I.target) == null ? void 0 : J.tagName;
2475
+ Y === "INPUT" || Y === "TEXTAREA" || Y === "SELECT" || (Z = I.target) != null && Z.isContentEditable || I.ctrlKey || I.metaKey || I.altKey || I.key.length !== 1 && I.key !== "Backspace" && I.key !== "Delete" || (ee = H.current) == null || ee.focus();
2353
2476
  };
2354
2477
  return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
2355
2478
  }, [r, i]);
2356
2479
  const k = (j) => {
2357
- j.preventDefault(), F.current++, j.dataTransfer.types.includes("Files") && C(!0);
2480
+ j.preventDefault(), C.current++, j.dataTransfer.types.includes("Files") && U(!0);
2358
2481
  }, z = (j) => {
2359
- j.preventDefault(), F.current--, F.current === 0 && C(!1);
2482
+ j.preventDefault(), C.current--, C.current === 0 && U(!1);
2360
2483
  }, O = (j) => j.preventDefault(), ne = (j) => {
2361
- j.preventDefault(), F.current = 0, C(!1);
2362
- const D = Array.from(j.dataTransfer.files);
2363
- D.length && c(D);
2484
+ j.preventDefault(), C.current = 0, U(!1);
2485
+ const I = Array.from(j.dataTransfer.files);
2486
+ I.length && d(I);
2364
2487
  }, ae = (j) => {
2365
- const D = Array.from(j.target.files || []);
2366
- q.current && (q.current.value = ""), D.length && c(D);
2488
+ const I = Array.from(j.target.files || []);
2489
+ q.current && (q.current.value = ""), I.length && d(I);
2367
2490
  }, W = (j) => {
2368
- var se;
2491
+ var te;
2369
2492
  if (!h) return;
2370
- const D = (se = j.clipboardData) == null ? void 0 : se.items;
2371
- if (!D) return;
2493
+ const I = (te = j.clipboardData) == null ? void 0 : te.items;
2494
+ if (!I) return;
2372
2495
  const Y = [];
2373
- for (const Ue of D) {
2374
- const Re = Ue.getAsFile();
2496
+ for (const Ye of I) {
2497
+ const Re = Ye.getAsFile();
2375
2498
  Re && Y.push(Re);
2376
2499
  }
2377
2500
  if (Y.length === 0) return;
2378
- const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: ie } = E(Y);
2379
- Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && x(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), ie && x(`Max ${g} images per message`), J.length && (j.preventDefault(), h(J));
2380
- }, Q = !r && !i && !!(m != null && m.length) && s.length === 0, oe = As({
2501
+ const { imageFiles: J, tooLarge: Z, skipped: ee, limitExceeded: le } = $(Y);
2502
+ Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), ee.length && _(`Skipped unsupported file${ee.length > 1 ? "s" : ""}: ${ee.join(", ")}`), le && _(`Max ${g} images per message`), J.length && (j.preventDefault(), h(J));
2503
+ }, Q = !r && !i && !!(m != null && m.length) && s.length === 0, oe = Os({
2381
2504
  prompts: m ?? [],
2382
2505
  enabled: Q
2383
2506
  }), be = (j) => {
@@ -2395,9 +2518,9 @@ function Ot({
2395
2518
  return;
2396
2519
  }
2397
2520
  }
2398
- a == null || a(j);
2399
- }, Ce = (s.trim() || (f == null ? void 0 : f.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Te = p || h;
2400
- return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", P].filter(Boolean).join(" "), ...B, children: [
2521
+ o == null || o(j);
2522
+ }, Ve = (s.trim() || (f == null ? void 0 : f.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Te = p || h;
2523
+ return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", P].filter(Boolean).join(" "), ...L, children: [
2401
2524
  Te && /* @__PURE__ */ e.jsx(
2402
2525
  "input",
2403
2526
  {
@@ -2412,13 +2535,13 @@ function Ot({
2412
2535
  /* @__PURE__ */ e.jsxs(
2413
2536
  "div",
2414
2537
  {
2415
- className: ["ds-prompt-input__box", v && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2538
+ className: ["ds-prompt-input__box", N && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2416
2539
  onDragEnter: k,
2417
2540
  onDragLeave: z,
2418
2541
  onDragOver: O,
2419
2542
  onDrop: ne,
2420
2543
  children: [
2421
- v && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2544
+ N && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2422
2545
  /* @__PURE__ */ e.jsx(
2423
2546
  "textarea",
2424
2547
  {
@@ -2437,19 +2560,19 @@ function Ot({
2437
2560
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: oe.displayed }),
2438
2561
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2439
2562
  ] }),
2440
- f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((j, D) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2563
+ f && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: f.map((j, I) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2441
2564
  /* @__PURE__ */ e.jsx("img", { src: j.preview, alt: "" }),
2442
2565
  /* @__PURE__ */ e.jsx(
2443
2566
  "button",
2444
2567
  {
2445
2568
  className: "ds-prompt-input__image-remove",
2446
- onClick: () => b == null ? void 0 : b(D),
2569
+ onClick: () => b == null ? void 0 : b(I),
2447
2570
  "aria-label": "Remove image",
2448
2571
  type: "button",
2449
- children: /* @__PURE__ */ e.jsx(te, { size: 12, strokeWidth: 2 })
2572
+ children: /* @__PURE__ */ e.jsx(se, { size: 12, strokeWidth: 2 })
2450
2573
  }
2451
2574
  )
2452
- ] }, D)) }),
2575
+ ] }, I)) }),
2453
2576
  X.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: X.map((j) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
2454
2577
  /* @__PURE__ */ e.jsx("span", { children: j.msg }),
2455
2578
  /* @__PURE__ */ e.jsx(
@@ -2457,32 +2580,32 @@ function Ot({
2457
2580
  {
2458
2581
  type: "button",
2459
2582
  className: "ds-prompt-input__warning-close",
2460
- onClick: () => w(j.id),
2583
+ onClick: () => y(j.id),
2461
2584
  "aria-label": "Dismiss",
2462
- children: /* @__PURE__ */ e.jsx(te, { size: A[1], strokeWidth: 1.5 })
2585
+ children: /* @__PURE__ */ e.jsx(se, { size: D[1], strokeWidth: 1.5 })
2463
2586
  }
2464
2587
  )
2465
2588
  ] }, j.id)) }),
2466
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((j, D) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2467
- j.uploading ? /* @__PURE__ */ e.jsx(Qe, { size: A[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Se, { size: A[1], strokeWidth: 1.5 }),
2589
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((j, I) => /* @__PURE__ */ e.jsx(ie, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2590
+ j.uploading ? /* @__PURE__ */ e.jsx(ns, { size: D[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Se, { size: D[1], strokeWidth: 1.5 }),
2468
2591
  j.filename,
2469
2592
  j.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
2470
2593
  "button",
2471
2594
  {
2472
2595
  type: "button",
2473
2596
  className: "ds-prompt-input__remove-btn",
2474
- onClick: () => u == null ? void 0 : u(D),
2475
- children: /* @__PURE__ */ e.jsx(te, { size: A[1], strokeWidth: 1.5 })
2597
+ onClick: () => c == null ? void 0 : c(I),
2598
+ children: /* @__PURE__ */ e.jsx(se, { size: D[1], strokeWidth: 1.5 })
2476
2599
  }
2477
2600
  )
2478
- ] }) }, D)) }),
2601
+ ] }) }, I)) }),
2479
2602
  /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
2480
2603
  Te && /* @__PURE__ */ e.jsx(
2481
2604
  ce,
2482
2605
  {
2483
2606
  variant: "ghost",
2484
2607
  size: "xs",
2485
- icon: /* @__PURE__ */ e.jsx(Se, { size: A[2], strokeWidth: 1.5 }),
2608
+ icon: /* @__PURE__ */ e.jsx(Se, { size: D[2], strokeWidth: 1.5 }),
2486
2609
  "aria-label": "Attach files",
2487
2610
  onClick: () => {
2488
2611
  var j;
@@ -2490,16 +2613,16 @@ function Ot({
2490
2613
  }
2491
2614
  }
2492
2615
  ),
2493
- N,
2494
- $,
2616
+ v,
2617
+ T,
2495
2618
  /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
2496
2619
  r ? /* @__PURE__ */ e.jsx(
2497
2620
  ce,
2498
2621
  {
2499
2622
  variant: "primary",
2500
2623
  size: "xs",
2501
- icon: /* @__PURE__ */ e.jsx(es, { size: A[2], strokeWidth: 1.5 }),
2502
- onClick: o,
2624
+ icon: /* @__PURE__ */ e.jsx(rs, { size: D[2], strokeWidth: 1.5 }),
2625
+ onClick: a,
2503
2626
  "aria-label": "Stop"
2504
2627
  }
2505
2628
  ) : /* @__PURE__ */ e.jsx(
@@ -2507,9 +2630,9 @@ function Ot({
2507
2630
  {
2508
2631
  variant: "primary",
2509
2632
  size: "xs",
2510
- icon: /* @__PURE__ */ e.jsx(ss, { size: A[2], strokeWidth: 1.5 }),
2633
+ icon: /* @__PURE__ */ e.jsx(as, { size: D[2], strokeWidth: 1.5 }),
2511
2634
  onClick: n,
2512
- disabled: !Ce,
2635
+ disabled: !Ve,
2513
2636
  "aria-label": "Send"
2514
2637
  }
2515
2638
  )
@@ -2519,69 +2642,69 @@ function Ot({
2519
2642
  )
2520
2643
  ] });
2521
2644
  }
2522
- const Pe = { fast: 0, standard: 1, premium: 2 }, Me = { fast: "data-5", standard: "data-3", premium: "data-6" };
2523
- function Ft({
2645
+ const Me = { fast: 0, standard: 1, premium: 2 }, ze = { fast: "data-5", standard: "data-3", premium: "data-6" };
2646
+ function Kt({
2524
2647
  models: s = [],
2525
2648
  value: t,
2526
2649
  onChange: n,
2527
- size: o = "xs",
2528
- minTier: a,
2650
+ size: a = "xs",
2651
+ minTier: o,
2529
2652
  showAutoOption: r = !1,
2530
2653
  groupByTier: i = !0,
2531
2654
  className: l = "",
2532
2655
  ...m
2533
2656
  }) {
2534
- const [d, f] = I(!1), p = T(null), h = T(null), u = T(null), [b, _] = I({}), y = s.filter((v) => !a || v.name === "auto" ? !0 : (Pe[v.tier] ?? 1) >= (Pe[a] ?? 1)), g = y.find((v) => v.name === "auto"), R = y.filter((v) => v.name !== "auto"), N = s.find((v) => v.name === t), P = new Set(R.map((v) => v.tier).filter(Boolean)).size > 1;
2535
- L(() => {
2536
- if (!d) return;
2537
- const v = 320, C = () => {
2657
+ const [u, f] = A(!1), p = R(null), h = R(null), c = R(null), [b, x] = A({}), w = s.filter((N) => !o || N.name === "auto" ? !0 : (Me[N.tier] ?? 1) >= (Me[o] ?? 1)), g = w.find((N) => N.name === "auto"), E = w.filter((N) => N.name !== "auto"), v = s.find((N) => N.name === t), P = new Set(E.map((N) => N.tier).filter(Boolean)).size > 1;
2658
+ B(() => {
2659
+ if (!u) return;
2660
+ const N = 320, U = () => {
2538
2661
  var M;
2539
- const x = (M = h.current) == null ? void 0 : M.getBoundingClientRect();
2540
- if (!x) return;
2541
- const w = window.innerHeight - x.bottom, S = w < v + 8 && x.top > w;
2542
- _({
2662
+ const _ = (M = h.current) == null ? void 0 : M.getBoundingClientRect();
2663
+ if (!_) return;
2664
+ const y = window.innerHeight - _.bottom, S = y < N + 8 && _.top > y;
2665
+ x({
2543
2666
  position: "fixed",
2544
2667
  zIndex: "var(--z-dropdown, 500)",
2545
- left: x.left,
2546
- ...S ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
2668
+ left: _.left,
2669
+ ...S ? { bottom: window.innerHeight - _.top + 4, top: "auto" } : { top: _.bottom + 4, bottom: "auto" }
2547
2670
  });
2548
2671
  };
2549
- C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
2550
- const X = (x) => {
2551
- var w, S;
2552
- !((w = p.current) != null && w.contains(x.target)) && !((S = u.current) != null && S.contains(x.target)) && f(!1);
2553
- }, V = (x) => {
2554
- x.key === "Escape" && f(!1);
2672
+ U(), window.addEventListener("scroll", U, !0), window.addEventListener("resize", U);
2673
+ const X = (_) => {
2674
+ var y, S;
2675
+ !((y = p.current) != null && y.contains(_.target)) && !((S = c.current) != null && S.contains(_.target)) && f(!1);
2676
+ }, V = (_) => {
2677
+ _.key === "Escape" && f(!1);
2555
2678
  };
2556
2679
  return document.addEventListener("mousedown", X), document.addEventListener("keydown", V), () => {
2557
- window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", V);
2680
+ window.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U), document.removeEventListener("mousedown", X), document.removeEventListener("keydown", V);
2558
2681
  };
2559
- }, [d]);
2560
- const B = (v) => {
2561
- n == null || n(v), f(!1);
2562
- }, q = (v) => /* @__PURE__ */ e.jsxs(
2682
+ }, [u]);
2683
+ const L = (N) => {
2684
+ n == null || n(N), f(!1);
2685
+ }, q = (N) => /* @__PURE__ */ e.jsxs(
2563
2686
  "button",
2564
2687
  {
2565
2688
  type: "button",
2566
2689
  className: [
2567
2690
  "ds-model-picker__item",
2568
- v.name === t && "ds-model-picker__item--active"
2691
+ N.name === t && "ds-model-picker__item--active"
2569
2692
  ].filter(Boolean).join(" "),
2570
- onClick: () => B(v.name),
2693
+ onClick: () => L(N.name),
2571
2694
  children: [
2572
- v.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: v.icon }) : /* @__PURE__ */ e.jsx(De, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2573
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: v.displayName || v.name }),
2574
- P && v.tier && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Me[v.tier] || "default", children: v.tier })
2695
+ N.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: N.icon }) : /* @__PURE__ */ e.jsx(Ie, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2696
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: N.displayName || N.name }),
2697
+ P && N.tier && /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: ze[N.tier] || "default", children: N.tier })
2575
2698
  ]
2576
2699
  },
2577
- v.name
2578
- ), H = () => !i || !P ? R.map(q) : ["fast", "standard", "premium"].flatMap((v) => {
2579
- const C = R.filter((X) => X.tier === v);
2580
- return C.length ? [
2581
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": v, children: v.charAt(0).toUpperCase() + v.slice(1) }, `lbl-${v}`),
2582
- ...C.map(q)
2700
+ N.name
2701
+ ), H = () => !i || !P ? E.map(q) : ["fast", "standard", "premium"].flatMap((N) => {
2702
+ const U = E.filter((X) => X.tier === N);
2703
+ return U.length ? [
2704
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": N, children: N.charAt(0).toUpperCase() + N.slice(1) }, `lbl-${N}`),
2705
+ ...U.map(q)
2583
2706
  ] : [];
2584
- }), F = d && /* @__PURE__ */ e.jsxs("div", { ref: u, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: b, children: [
2707
+ }), C = u && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: b, children: [
2585
2708
  r && g && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2586
2709
  /* @__PURE__ */ e.jsxs(
2587
2710
  "button",
@@ -2592,14 +2715,14 @@ function Ft({
2592
2715
  "ds-model-picker__item--auto",
2593
2716
  t === "auto" && "ds-model-picker__item--active"
2594
2717
  ].filter(Boolean).join(" "),
2595
- onClick: () => B("auto"),
2718
+ onClick: () => L("auto"),
2596
2719
  children: [
2597
- /* @__PURE__ */ e.jsx(ts, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2720
+ /* @__PURE__ */ e.jsx(os, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2598
2721
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
2599
2722
  ]
2600
2723
  }
2601
2724
  ),
2602
- R.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2725
+ E.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2603
2726
  ] }),
2604
2727
  H()
2605
2728
  ] });
@@ -2616,54 +2739,54 @@ function Ft({
2616
2739
  ref: h,
2617
2740
  type: "button",
2618
2741
  className: "ds-model-picker__trigger",
2619
- onClick: () => f((v) => !v),
2742
+ onClick: () => f((N) => !N),
2620
2743
  "aria-haspopup": "listbox",
2621
- "aria-expanded": d,
2744
+ "aria-expanded": u,
2622
2745
  children: [
2623
- N != null && N.icon ? /* @__PURE__ */ e.jsx("span", { children: N.icon }) : /* @__PURE__ */ e.jsx(De, { size: 12, strokeWidth: 1.5 }),
2624
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (N == null ? void 0 : N.displayName) || (N == null ? void 0 : N.name) || t }),
2625
- P && (N == null ? void 0 : N.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Me[N.tier] || "default", children: N.tier })
2746
+ v != null && v.icon ? /* @__PURE__ */ e.jsx("span", { children: v.icon }) : /* @__PURE__ */ e.jsx(Ie, { size: 12, strokeWidth: 1.5 }),
2747
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (v == null ? void 0 : v.displayName) || (v == null ? void 0 : v.name) || t }),
2748
+ P && (v == null ? void 0 : v.tier) && /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: ze[v.tier] || "default", children: v.tier })
2626
2749
  ]
2627
2750
  }
2628
2751
  ),
2629
- typeof document < "u" && pe.createPortal(F, document.body)
2752
+ typeof document < "u" && he.createPortal(C, document.body)
2630
2753
  ]
2631
2754
  }
2632
2755
  );
2633
2756
  }
2634
- const Ls = ({ filename: s, pages: t }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2757
+ const Cs = ({ filename: s, pages: t }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
2635
2758
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: s }),
2636
2759
  t.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(t) })
2637
2760
  ] });
2638
2761
  function Ne(s) {
2639
2762
  return s != null && s.length ? "p. " + s.join(", ") : null;
2640
2763
  }
2641
- function Ps(s) {
2764
+ function Ws(s) {
2642
2765
  const t = /* @__PURE__ */ new Map();
2643
2766
  for (const n of s)
2644
2767
  t.has(n.filename) || t.set(n.filename, { filename: n.filename, url: n.url, items: [] }), t.get(n.filename).items.push(n);
2645
2768
  return [...t.values()];
2646
2769
  }
2647
- function Wt({
2770
+ function Xt({
2648
2771
  sources: s = [],
2649
2772
  layout: t = "list",
2650
2773
  title: n = "Sources",
2651
- maxVisible: o = 5,
2652
- onSourceClick: a
2774
+ maxVisible: a = 5,
2775
+ onSourceClick: o
2653
2776
  }) {
2654
- const [r, i] = I(!1), l = Ps(s), m = l.length > o, d = r ? l : l.slice(0, o), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2777
+ const [r, i] = A(!1), l = Ws(s), m = l.length > a, u = r ? l : l.slice(0, a), f = s.some((h) => h.snippet), p = ["ds-sources-panel", t === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2655
2778
  return t === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2656
- d.map((h) => {
2657
- const u = h.items.map((_) => _.page).filter(Boolean), b = !!a;
2779
+ u.map((h) => {
2780
+ const c = h.items.map((x) => x.page).filter(Boolean), b = !!o;
2658
2781
  return /* @__PURE__ */ e.jsxs(
2659
2782
  "div",
2660
2783
  {
2661
2784
  className: `ds-sources-panel__compact-row${b ? " ds-sources-panel__compact-row--clickable" : ""}`,
2662
- onClick: b ? () => a(h.items[0]) : void 0,
2785
+ onClick: b ? () => o(h.items[0]) : void 0,
2663
2786
  children: [
2664
- /* @__PURE__ */ e.jsx(ns, { size: A[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2787
+ /* @__PURE__ */ e.jsx(is, { size: D[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2665
2788
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2666
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(u) })
2789
+ c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(c) })
2667
2790
  ]
2668
2791
  },
2669
2792
  h.filename
@@ -2671,26 +2794,26 @@ function Wt({
2671
2794
  }),
2672
2795
  m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2673
2796
  "+",
2674
- l.length - o,
2797
+ l.length - a,
2675
2798
  " more sources"
2676
2799
  ] })
2677
2800
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
2678
2801
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2679
- d.map((h) => {
2680
- const u = h.items.map((_) => _.page).filter(Boolean), b = !!a;
2802
+ u.map((h) => {
2803
+ const c = h.items.map((x) => x.page).filter(Boolean), b = !!o;
2681
2804
  return f ? /* @__PURE__ */ e.jsx(
2682
2805
  $e,
2683
2806
  {
2684
- title: /* @__PURE__ */ e.jsx(Ls, { filename: h.filename, pages: u }),
2807
+ title: /* @__PURE__ */ e.jsx(Cs, { filename: h.filename, pages: c }),
2685
2808
  padding: "s",
2686
- children: h.items.map((_, y) => /* @__PURE__ */ e.jsx(
2809
+ children: h.items.map((x, w) => /* @__PURE__ */ e.jsx(
2687
2810
  "div",
2688
2811
  {
2689
2812
  className: `ds-sources-panel__snippet${b ? " ds-sources-panel__snippet--clickable" : ""}`,
2690
- onClick: b ? () => a(_) : void 0,
2691
- children: _.snippet ?? `p. ${_.page}`
2813
+ onClick: b ? () => o(x) : void 0,
2814
+ children: x.snippet ?? `p. ${x.page}`
2692
2815
  },
2693
- y
2816
+ w
2694
2817
  ))
2695
2818
  },
2696
2819
  h.filename
@@ -2698,10 +2821,10 @@ function Wt({
2698
2821
  "div",
2699
2822
  {
2700
2823
  className: `ds-sources-panel__row${b ? " ds-sources-panel__row--clickable" : ""}`,
2701
- onClick: b ? () => a(h.items[0]) : void 0,
2824
+ onClick: b ? () => o(h.items[0]) : void 0,
2702
2825
  children: [
2703
2826
  /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2704
- u.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(u) })
2827
+ c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ne(c) })
2705
2828
  ]
2706
2829
  },
2707
2830
  h.filename
@@ -2709,24 +2832,24 @@ function Wt({
2709
2832
  }),
2710
2833
  m && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
2711
2834
  "+",
2712
- l.length - o,
2835
+ l.length - a,
2713
2836
  " more sources"
2714
2837
  ] })
2715
2838
  ] });
2716
2839
  }
2717
- function ze(s) {
2840
+ function Oe(s) {
2718
2841
  return s >= 1e6 ? (s / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : s >= 1e3 ? (s / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(s);
2719
2842
  }
2720
- function Ct({
2843
+ function Gt({
2721
2844
  used: s,
2722
2845
  limit: t,
2723
2846
  size: n = "s",
2724
- showCount: o = !0,
2725
- showPercent: a = !1,
2847
+ showCount: a = !0,
2848
+ showPercent: o = !1,
2726
2849
  warningThreshold: r = 0.8,
2727
2850
  errorThreshold: i = 1
2728
2851
  }) {
2729
- const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), d = l >= i ? "error" : l >= r ? "warning" : "normal";
2852
+ const l = t > 0 ? s / t : 0, m = Math.min(l * 100, 100), u = l >= i ? "error" : l >= r ? "warning" : "normal";
2730
2853
  return /* @__PURE__ */ e.jsxs(
2731
2854
  "div",
2732
2855
  {
@@ -2738,18 +2861,18 @@ function Ct({
2738
2861
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
2739
2862
  "div",
2740
2863
  {
2741
- className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
2864
+ className: `ds-token-counter__fill ds-token-counter__fill--${u}`,
2742
2865
  style: { width: `${m}%` }
2743
2866
  }
2744
2867
  ) }),
2745
- (o || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
2746
- o && /* @__PURE__ */ e.jsxs("span", { children: [
2747
- ze(s),
2868
+ (a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
2869
+ a && /* @__PURE__ */ e.jsxs("span", { children: [
2870
+ Oe(s),
2748
2871
  " / ",
2749
- ze(t),
2872
+ Oe(t),
2750
2873
  " tokens"
2751
2874
  ] }),
2752
- a && /* @__PURE__ */ e.jsxs("span", { children: [
2875
+ o && /* @__PURE__ */ e.jsxs("span", { children: [
2753
2876
  Math.round(l * 100),
2754
2877
  "%"
2755
2878
  ] })
@@ -2758,24 +2881,24 @@ function Ct({
2758
2881
  }
2759
2882
  );
2760
2883
  }
2761
- const Oe = 5;
2762
- function Ms(s) {
2884
+ const Fe = 5;
2885
+ function Us(s) {
2763
2886
  return s < 0.34 ? "low" : s < 0.67 ? "medium" : "high";
2764
2887
  }
2765
- function Ut({
2888
+ function Jt({
2766
2889
  value: s = 0,
2767
2890
  size: t = "xs",
2768
2891
  showLabel: n = "none",
2769
- layout: o = "inline"
2892
+ layout: a = "inline"
2770
2893
  }) {
2771
- const a = Math.max(0, Math.min(1, s)), r = Math.round(a * Oe), i = Ms(a);
2894
+ const o = Math.max(0, Math.min(1, s)), r = Math.round(o * Fe), i = Us(o);
2772
2895
  return /* @__PURE__ */ e.jsxs("div", { className: [
2773
2896
  "ds-confidence-bar",
2774
2897
  `ds-confidence-bar--${t}`,
2775
2898
  `ds-confidence-bar--${i}`,
2776
- o === "block" && "ds-confidence-bar--block"
2899
+ a === "block" && "ds-confidence-bar--block"
2777
2900
  ].filter(Boolean).join(" "), children: [
2778
- /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Oe }, (l, m) => /* @__PURE__ */ e.jsx(
2901
+ /* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: Fe }, (l, m) => /* @__PURE__ */ e.jsx(
2779
2902
  "div",
2780
2903
  {
2781
2904
  className: `ds-confidence-bar__seg${m < r ? " ds-confidence-bar__seg--filled" : ""}`
@@ -2785,48 +2908,48 @@ function Ut({
2785
2908
  n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
2786
2909
  ] });
2787
2910
  }
2788
- const zs = { add: "+", remove: "-", context: " " };
2911
+ const Vs = { add: "+", remove: "-", context: " " };
2789
2912
  function _e({ line: s, lineNumbers: t }) {
2790
2913
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${s.type}`, children: [
2791
2914
  t && s.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: s.lineNo }),
2792
- /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: zs[s.type] }),
2915
+ /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Vs[s.type] }),
2793
2916
  /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: s.text })
2794
2917
  ] });
2795
2918
  }
2796
- function Vt({
2919
+ function Zt({
2797
2920
  lines: s = [],
2798
2921
  layout: t = "inline",
2799
2922
  wordWrap: n = !1,
2800
- lineNumbers: o = !0,
2801
- maxHeight: a,
2923
+ lineNumbers: a = !0,
2924
+ maxHeight: o,
2802
2925
  title: r
2803
2926
  }) {
2804
2927
  const i = [
2805
2928
  "ds-diff-view",
2806
2929
  `ds-diff-view--${t}`,
2807
2930
  n && "ds-diff-view--wrap"
2808
- ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
2931
+ ].filter(Boolean).join(" "), l = o ? { maxHeight: o, overflowY: "auto" } : void 0;
2809
2932
  if (t === "split") {
2810
- const m = s.filter((f) => f.type === "remove" || f.type === "context"), d = s.filter((f) => f.type === "add" || f.type === "context");
2933
+ const m = s.filter((f) => f.type === "remove" || f.type === "context"), u = s.filter((f) => f.type === "add" || f.type === "context");
2811
2934
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2812
2935
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2813
2936
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
2814
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: m.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: o }, p)) }),
2815
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: o }, p)) })
2937
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: m.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: a }, p)) }),
2938
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((f, p) => /* @__PURE__ */ e.jsx(_e, { line: f, lineNumbers: a }, p)) })
2816
2939
  ] })
2817
2940
  ] });
2818
2941
  }
2819
2942
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
2820
2943
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
2821
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: s.map((m, d) => /* @__PURE__ */ e.jsx(_e, { line: m, lineNumbers: o }, d)) })
2944
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: s.map((m, u) => /* @__PURE__ */ e.jsx(_e, { line: m, lineNumbers: a }, u)) })
2822
2945
  ] });
2823
2946
  }
2824
- function Os({
2947
+ function Ys({
2825
2948
  value: s = "idle",
2826
2949
  onLike: t,
2827
2950
  onDislike: n,
2828
- className: o = "",
2829
- ...a
2951
+ className: a = "",
2952
+ ...o
2830
2953
  }) {
2831
2954
  const r = s !== "idle";
2832
2955
  return /* @__PURE__ */ e.jsxs(
@@ -2835,9 +2958,9 @@ function Os({
2835
2958
  className: [
2836
2959
  "ds-message-feedback",
2837
2960
  r && "ds-message-feedback--voted",
2838
- o
2961
+ a
2839
2962
  ].filter(Boolean).join(" "),
2840
- ...a,
2963
+ ...o,
2841
2964
  children: [
2842
2965
  (!r || s === "liked") && /* @__PURE__ */ e.jsx(
2843
2966
  "button",
@@ -2851,9 +2974,9 @@ function Os({
2851
2974
  "aria-label": "Like",
2852
2975
  "aria-pressed": s === "liked",
2853
2976
  children: /* @__PURE__ */ e.jsx(
2854
- rs,
2977
+ ls,
2855
2978
  {
2856
- size: A[1],
2979
+ size: D[1],
2857
2980
  strokeWidth: 1.5,
2858
2981
  fill: s === "liked" ? "currentColor" : "none"
2859
2982
  }
@@ -2872,9 +2995,9 @@ function Os({
2872
2995
  "aria-label": "Dislike",
2873
2996
  "aria-pressed": s === "disliked",
2874
2997
  children: /* @__PURE__ */ e.jsx(
2875
- as,
2998
+ cs,
2876
2999
  {
2877
- size: A[1],
3000
+ size: D[1],
2878
3001
  strokeWidth: 1.5,
2879
3002
  fill: s === "disliked" ? "currentColor" : "none"
2880
3003
  }
@@ -2885,47 +3008,47 @@ function Os({
2885
3008
  }
2886
3009
  );
2887
3010
  }
2888
- function Fs(s) {
3011
+ function qs(s) {
2889
3012
  const t = s instanceof Date ? s : new Date(s);
2890
3013
  if (isNaN(t)) return null;
2891
- const n = /* @__PURE__ */ new Date(), o = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(a - 864e5);
2892
- if (t >= a) return o;
2893
- if (t >= r) return `Yesterday ${o}`;
3014
+ const n = /* @__PURE__ */ new Date(), a = t.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(o - 864e5);
3015
+ if (t >= o) return a;
3016
+ if (t >= r) return `Yesterday ${a}`;
2894
3017
  const i = t.getDate(), l = t.toLocaleString([], { month: "short" });
2895
- return `${i} ${l} ${o}`;
3018
+ return `${i} ${l} ${a}`;
2896
3019
  }
2897
- function Yt({
3020
+ function Qt({
2898
3021
  role: s = "assistant",
2899
3022
  text: t,
2900
3023
  timestamp: n,
2901
- feedbackValue: o = "idle",
2902
- onLike: a,
3024
+ feedbackValue: a = "idle",
3025
+ onLike: o,
2903
3026
  onDislike: r,
2904
3027
  className: i = "",
2905
3028
  ...l
2906
3029
  }) {
2907
- const m = s === "assistant" && (a || r), d = !!t, f = n ? Fs(n) : null;
2908
- return !m && !d && !f ? null : /* @__PURE__ */ e.jsxs(
3030
+ const m = s === "assistant" && (o || r), u = !!t, f = n ? qs(n) : null;
3031
+ return !m && !u && !f ? null : /* @__PURE__ */ e.jsxs(
2909
3032
  "div",
2910
3033
  {
2911
3034
  className: ["ds-message-footer", `ds-message-footer--${s}`, i].filter(Boolean).join(" "),
2912
3035
  ...l,
2913
3036
  children: [
2914
3037
  s === "user" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f }),
2915
- m && /* @__PURE__ */ e.jsx(Os, { className: "ds-message-action", value: o, onLike: a, onDislike: r }),
2916
- d && /* @__PURE__ */ e.jsx(Is, { className: "ds-message-action", text: t }),
3038
+ m && /* @__PURE__ */ e.jsx(Ys, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
3039
+ u && /* @__PURE__ */ e.jsx(zs, { className: "ds-message-action", text: t }),
2917
3040
  s === "assistant" && f && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: f })
2918
3041
  ]
2919
3042
  }
2920
3043
  );
2921
3044
  }
2922
- function qt({ label: s, className: t = "", ...n }) {
3045
+ function en({ label: s, className: t = "", ...n }) {
2923
3046
  return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", t].filter(Boolean).join(" "), ...n, children: [
2924
3047
  /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
2925
3048
  s && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: s })
2926
3049
  ] });
2927
3050
  }
2928
- function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
3051
+ function sn({ variant: s = "light", glow: t, mask: n = !0, style: a, ...o }) {
2929
3052
  const r = s === "dark", i = t ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", m = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
2930
3053
  return /* @__PURE__ */ e.jsx(
2931
3054
  "div",
@@ -2939,9 +3062,9 @@ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
2939
3062
  ...i && {
2940
3063
  background: "radial-gradient(ellipse 1000px 500px at 50% 30%, rgba(234,100,100,0.18), transparent 70%)"
2941
3064
  },
2942
- ...o
3065
+ ...a
2943
3066
  },
2944
- ...a,
3067
+ ...o,
2945
3068
  children: /* @__PURE__ */ e.jsx(
2946
3069
  "div",
2947
3070
  {
@@ -2966,93 +3089,97 @@ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
2966
3089
  }
2967
3090
  );
2968
3091
  }
2969
- function Kt({ children: s, axis: t = "y", style: n, className: o = "", ...a }) {
3092
+ function tn({ children: s, axis: t = "y", style: n, className: a = "", ...o }) {
2970
3093
  const r = t === "x" ? { overflowX: "auto", overflowY: "hidden" } : t === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
2971
3094
  return /* @__PURE__ */ e.jsx(
2972
3095
  "div",
2973
3096
  {
2974
- className: `ds-scrollable ${o}`,
3097
+ className: `ds-scrollable ${a}`,
2975
3098
  style: { ...r, ...n },
2976
- ...a,
3099
+ ...o,
2977
3100
  children: s
2978
3101
  }
2979
3102
  );
2980
3103
  }
2981
3104
  export {
2982
3105
  $e as Accordion,
2983
- et as Alert,
2984
- Rt as AnimatedNumber,
2985
- ft as Avatar,
2986
- de as Badge,
2987
- Et as Banner,
2988
- tt as BottomSheet,
2989
- gt as Breadcrumb,
3106
+ ot as Alert,
3107
+ Mt as AnimatedNumber,
3108
+ bt as Avatar,
3109
+ ie as Badge,
3110
+ Bt as Banner,
3111
+ lt as BottomSheet,
3112
+ Tt as Breadcrumb,
2990
3113
  ce as Button,
2991
- Ks as Card,
2992
- Mt as ChatMessage,
2993
- dt as Checkbox,
2994
- nt as Code,
2995
- ps as CodeAccordion,
2996
- Ut as ConfidenceBar,
2997
- Is as CopyButton,
2998
- Vt as DiffView,
2999
- kt as Drawer,
3114
+ et as Card,
3115
+ Yt as ChatMessage,
3116
+ ht as Checkbox,
3117
+ ct as Code,
3118
+ _s as CodeAccordion,
3119
+ Jt as ConfidenceBar,
3120
+ zs as CopyButton,
3121
+ Zt as DiffView,
3122
+ St as Drawer,
3000
3123
  Be as DrawerFooter,
3001
- $t as Dropdown,
3002
- vt as EmptyState,
3003
- Ht as EngineerGrid,
3004
- Nt as FormField,
3005
- Xs as H1,
3006
- Gs as H2,
3007
- Js as H3,
3008
- Zs as H4,
3009
- St as InView,
3010
- Vs as Input,
3011
- rt as Link,
3012
- Os as MessageFeedback,
3013
- Yt as MessageFooter,
3014
- st as Modal,
3015
- he as ModalFooter,
3016
- Ft as ModelPicker,
3017
- Qs as P1,
3018
- ds as P2,
3019
- Fe as P3,
3020
- yt as Pagination,
3021
- Tt as ProgressBar,
3022
- Ot as PromptInput,
3023
- ut as Radio,
3024
- Bt as ReasoningBlock,
3025
- Kt as Scrollable,
3026
- it as SegmentedControl,
3027
- qs as Select,
3028
- bs as Skeleton,
3029
- Wt as SourcesPanel,
3030
- ls as Spinner,
3031
- wt as Stat,
3032
- Lt as StepIndicator,
3033
- Hs as Stepper,
3034
- Pt as StreamingText,
3035
- ot as Tab,
3036
- mt as Table,
3037
- ht as TableBody,
3038
- pt as TableHead,
3039
- xt as TableRow,
3040
- bt as TableSubheaderRow,
3041
- at as Tabs,
3042
- jt as Td,
3043
- Ys as Textarea,
3044
- _t as Th,
3045
- qt as ThinkingDot,
3046
- It as ToastContainer,
3047
- ct as Toggle,
3048
- Ct as TokenCounter,
3049
- At as ToolCallBubble,
3050
- At as ToolCallCard,
3051
- lt as Tooltip,
3052
- A as iconSizes,
3053
- Es as useAnimatedNumber,
3054
- As as useAnimatedPlaceholder,
3055
- $s as useInView,
3056
- zt as useStreamScroll,
3057
- Dt as useToast
3124
+ Lt as Dropdown,
3125
+ kt as EmptyState,
3126
+ sn as EngineerGrid,
3127
+ Et as FormField,
3128
+ st as H1,
3129
+ tt as H2,
3130
+ nt as H3,
3131
+ rt as H4,
3132
+ zt as InView,
3133
+ Gs as Input,
3134
+ dt as Link,
3135
+ Ys as MessageFeedback,
3136
+ Qt as MessageFooter,
3137
+ it as Modal,
3138
+ ue as ModalFooter,
3139
+ Kt as ModelPicker,
3140
+ At as NavRail,
3141
+ Dt as NavRailItem,
3142
+ at as P1,
3143
+ ps as P2,
3144
+ Ce as P3,
3145
+ Rt as Pagination,
3146
+ Pt as ProgressBar,
3147
+ Ht as PromptInput,
3148
+ xt as Radio,
3149
+ Wt as ReasoningBlock,
3150
+ tn as Scrollable,
3151
+ mt as SegmentedControl,
3152
+ Zs as Select,
3153
+ It as SidePage,
3154
+ Le as SidePageFooter,
3155
+ ws as Skeleton,
3156
+ Xt as SourcesPanel,
3157
+ fs as Spinner,
3158
+ $t as Stat,
3159
+ Ut as StepIndicator,
3160
+ Qs as Stepper,
3161
+ Vt as StreamingText,
3162
+ ft as Tab,
3163
+ _t as Table,
3164
+ vt as TableBody,
3165
+ jt as TableHead,
3166
+ Nt as TableRow,
3167
+ wt as TableSubheaderRow,
3168
+ ut as Tabs,
3169
+ yt as Td,
3170
+ Js as Textarea,
3171
+ gt as Th,
3172
+ en as ThinkingDot,
3173
+ Ft as ToastContainer,
3174
+ pt as Toggle,
3175
+ Gt as TokenCounter,
3176
+ Ct as ToolCallBubble,
3177
+ Ct as ToolCallCard,
3178
+ Ns as Tooltip,
3179
+ D as iconSizes,
3180
+ As as useAnimatedNumber,
3181
+ Os as useAnimatedPlaceholder,
3182
+ Ds as useInView,
3183
+ qt as useStreamScroll,
3184
+ Ot as useToast
3058
3185
  };