@donkit-ai/design-system 1.4.78 → 1.4.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -59,9 +59,9 @@ function jt() {
59
59
  return f.$$typeof === F ? null : f.displayName || f.name || null;
60
60
  if (typeof f == "string") return f;
61
61
  switch (f) {
62
- case b:
62
+ case j:
63
63
  return "Fragment";
64
- case N:
64
+ case w:
65
65
  return "Profiler";
66
66
  case $:
67
67
  return "StrictMode";
@@ -69,14 +69,14 @@ function jt() {
69
69
  return "Suspense";
70
70
  case M:
71
71
  return "SuspenseList";
72
- case j:
72
+ case N:
73
73
  return "Activity";
74
74
  }
75
75
  if (typeof f == "object")
76
76
  switch (typeof f.tag == "number" && console.error(
77
77
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
78
  ), f.$$typeof) {
79
- case w:
79
+ case b:
80
80
  return "Portal";
81
81
  case y:
82
82
  return f.displayName || "Context";
@@ -117,7 +117,7 @@ function jt() {
117
117
  }
118
118
  }
119
119
  function r(f) {
120
- if (f === b) return "<>";
120
+ if (f === j) return "<>";
121
121
  if (typeof f == "object" && f !== null && f.$$typeof === z)
122
122
  return "<...>";
123
123
  try {
@@ -159,10 +159,10 @@ function jt() {
159
159
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
160
160
  )), f = this.props.ref, f !== void 0 ? f : null;
161
161
  }
162
- function d(f, T, O, Y, te, ie) {
162
+ function u(f, T, O, Y, te, ie) {
163
163
  var H = O.ref;
164
164
  return f = {
165
- $$typeof: h,
165
+ $$typeof: x,
166
166
  type: f,
167
167
  key: T,
168
168
  props: O,
@@ -192,7 +192,7 @@ function jt() {
192
192
  value: ie
193
193
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
194
194
  }
195
- function u(f, T, O, Y, te, ie) {
195
+ function d(f, T, O, Y, te, ie) {
196
196
  var H = T.children;
197
197
  if (H !== void 0)
198
198
  if (Y)
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
231
231
  return H && l(
232
232
  O,
233
233
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
234
- ), d(
234
+ ), u(
235
235
  f,
236
236
  H,
237
237
  O,
@@ -241,12 +241,12 @@ React keys must be passed directly to JSX without using spread:
241
241
  );
242
242
  }
243
243
  function m(f) {
244
- x(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? x(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
244
+ h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
245
245
  }
246
- function x(f) {
247
- return typeof f == "object" && f !== null && f.$$typeof === h;
246
+ function h(f) {
247
+ return typeof f == "object" && f !== null && f.$$typeof === x;
248
248
  }
249
- var p = q, h = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), K = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, I = Array.isArray, v = console.createTask ? console.createTask : function() {
249
+ var p = q, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), K = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, I = Array.isArray, v = console.createTask ? console.createTask : function() {
250
250
  return null;
251
251
  };
252
252
  p = {
@@ -258,9 +258,9 @@ React keys must be passed directly to JSX without using spread:
258
258
  p,
259
259
  o
260
260
  )(), G = v(r(o)), E = {};
261
- be.Fragment = b, be.jsx = function(f, T, O) {
261
+ be.Fragment = j, be.jsx = function(f, T, O) {
262
262
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
263
- return u(
263
+ return d(
264
264
  f,
265
265
  T,
266
266
  O,
@@ -270,7 +270,7 @@ React keys must be passed directly to JSX without using spread:
270
270
  );
271
271
  }, be.jsxs = function(f, T, O) {
272
272
  var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
273
- return u(
273
+ return d(
274
274
  f,
275
275
  T,
276
276
  O,
@@ -305,12 +305,12 @@ function oe({
305
305
  state: i = "idle",
306
306
  onClick: l,
307
307
  type: c = "button",
308
- href: d,
309
- "aria-label": u,
308
+ href: u,
309
+ "aria-label": d,
310
310
  className: m = "",
311
- ...x
311
+ ...h
312
312
  }) {
313
- const p = a && !t, h = i === "loading", w = i === "success", b = i === "error", $ = h || w || b, N = n === "xs" ? "s" : "m", _ = s === "danger" ? "on-accent" : "default", y = wt[n] ?? 16, S = h ? /* @__PURE__ */ e.jsx(Nt, { size: N, color: _ }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: y, strokeWidth: 2.5 }) }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: y, strokeWidth: 2.5 }) }) : null, D = [
313
+ const p = a && !t, x = i === "loading", b = i === "success", j = i === "error", $ = x || b || j, w = n === "xs" ? "s" : "m", _ = s === "danger" ? "on-accent" : "default", y = wt[n] ?? 16, S = x ? /* @__PURE__ */ e.jsx(Nt, { size: w, color: _ }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: y, strokeWidth: 2.5 }) }) : j ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: y, strokeWidth: 2.5 }) }) : null, D = [
314
314
  "ds-button",
315
315
  `ds-button--${s}`,
316
316
  `ds-button--${n}`,
@@ -321,25 +321,25 @@ function oe({
321
321
  $ ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
322
322
  t
323
323
  ] });
324
- if (d) {
325
- const z = (j) => {
326
- if (o || h) {
327
- j.preventDefault();
324
+ if (u) {
325
+ const z = (N) => {
326
+ if (o || x) {
327
+ N.preventDefault();
328
328
  return;
329
329
  }
330
- j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), l == null || l(j));
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
335
  className: D,
336
- href: o || h ? void 0 : d,
336
+ href: o || x ? void 0 : u,
337
337
  onClick: z,
338
- "aria-label": u,
339
- "aria-disabled": o || h ? "true" : void 0,
340
- "aria-busy": h ? "true" : void 0,
338
+ "aria-label": d,
339
+ "aria-disabled": o || x ? "true" : void 0,
340
+ "aria-busy": x ? "true" : void 0,
341
341
  "data-state": M,
342
- ...x,
342
+ ...h,
343
343
  children: W
344
344
  }
345
345
  );
@@ -350,11 +350,11 @@ function oe({
350
350
  type: c,
351
351
  className: D,
352
352
  disabled: o,
353
- onClick: h ? void 0 : l,
354
- "aria-label": u,
355
- "aria-busy": h ? "true" : void 0,
353
+ onClick: x ? void 0 : l,
354
+ "aria-label": d,
355
+ "aria-busy": x ? "true" : void 0,
356
356
  "data-state": M,
357
- ...x,
357
+ ...h,
358
358
  children: W
359
359
  }
360
360
  );
@@ -369,10 +369,10 @@ function cs({
369
369
  onIconRightClick: i,
370
370
  size: l = "m",
371
371
  disabled: c,
372
- id: d,
373
- ...u
372
+ id: u,
373
+ ...d
374
374
  }) {
375
- const m = d || `input-${q.useId()}`, x = n ? `${m}-hint` : void 0, p = s ? `${m}-error` : void 0, h = p || x;
375
+ const m = u || `input-${q.useId()}`, h = n ? `${m}-hint` : void 0, p = s ? `${m}-error` : void 0, x = p || h;
376
376
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
377
377
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: m, children: t }),
378
378
  /* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
@@ -384,8 +384,8 @@ function cs({
384
384
  className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
385
385
  disabled: c,
386
386
  "aria-invalid": s ? "true" : "false",
387
- "aria-describedby": h,
388
- ...u
387
+ "aria-describedby": x,
388
+ ...d
389
389
  }
390
390
  ),
391
391
  o && /* @__PURE__ */ e.jsx(
@@ -400,7 +400,7 @@ function cs({
400
400
  }
401
401
  )
402
402
  ] }),
403
- n && !s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-input-hint", children: n }),
403
+ n && !s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
404
404
  /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-input-error", role: "alert", children: s }) }) })
405
405
  ] });
406
406
  }
@@ -414,25 +414,25 @@ function ds({
414
414
  id: i,
415
415
  resize: l = !0,
416
416
  rows: c = 3,
417
- ...d
417
+ ...u
418
418
  }) {
419
- const u = i || `textarea-${q.useId()}`, m = n ? `${u}-hint` : void 0, x = s ? `${u}-error` : void 0, p = x || m;
419
+ const d = i || `textarea-${q.useId()}`, m = n ? `${d}-hint` : void 0, h = s ? `${d}-error` : void 0, p = h || m;
420
420
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
421
- t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: u, children: t }),
421
+ t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
422
422
  /* @__PURE__ */ e.jsx(
423
423
  "textarea",
424
424
  {
425
- id: u,
425
+ id: d,
426
426
  className: `ds-textarea ds-textarea--${a} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
427
427
  disabled: o,
428
428
  "aria-invalid": s ? "true" : "false",
429
429
  "aria-describedby": p,
430
430
  rows: c,
431
- ...d
431
+ ...u
432
432
  }
433
433
  ),
434
434
  n && !s && /* @__PURE__ */ e.jsx("span", { id: m, className: "ds-textarea-hint", children: n }),
435
- s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: s })
435
+ s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
436
436
  ] });
437
437
  }
438
438
  function us({
@@ -445,18 +445,18 @@ function us({
445
445
  fullWidth: i = !0,
446
446
  size: l = "m",
447
447
  disabled: c = !1,
448
- id: d,
449
- ...u
448
+ id: u,
449
+ ...d
450
450
  }) {
451
- const [m, x] = B(!1), [p, h] = B(!1), [w, b] = B({}), [$, N] = B("down"), [_, y] = B(-1), S = R(null), D = R(null), M = R(null), W = R(null), z = d || `select-${q.useId()}`, j = `${z}-label`, F = o ? `${z}-error` : void 0, K = 150, V = (E = !1) => {
452
- p || (h(!0), y(-1), W.current = setTimeout(() => {
451
+ const [m, h] = B(!1), [p, x] = B(!1), [b, j] = B({}), [$, w] = B("down"), [_, y] = B(-1), S = R(null), D = R(null), M = R(null), W = R(null), z = u || `select-${q.useId()}`, N = `${z}-label`, F = o ? `${z}-error` : void 0, K = 150, V = (E = !1) => {
452
+ p || (x(!0), y(-1), W.current = setTimeout(() => {
453
453
  var f;
454
- x(!1), h(!1), E && ((f = M.current) == null || f.focus());
454
+ h(!1), x(!1), E && ((f = M.current) == null || f.focus());
455
455
  }, K));
456
456
  }, I = (E) => {
457
- clearTimeout(W.current), h(!1);
457
+ clearTimeout(W.current), x(!1);
458
458
  const f = E !== void 0 ? E : Math.max(r.findIndex((T) => T.value === s), 0);
459
- y(f), x(!0);
459
+ y(f), h(!0);
460
460
  };
461
461
  P(() => () => clearTimeout(W.current), []);
462
462
  const v = () => {
@@ -464,7 +464,7 @@ function us({
464
464
  const E = (ie = S.current) == null ? void 0 : ie.getBoundingClientRect();
465
465
  if (!E) return;
466
466
  const f = window.innerHeight, T = f - E.bottom, O = E.top, te = T < 300 && O > T;
467
- N(te ? "up" : "down"), b(
467
+ w(te ? "up" : "down"), j(
468
468
  te ? { bottom: f - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
469
469
  );
470
470
  };
@@ -514,7 +514,7 @@ function us({
514
514
  ref: D,
515
515
  "data-ds-portal": "",
516
516
  role: "listbox",
517
- "aria-labelledby": t ? j : void 0,
517
+ "aria-labelledby": t ? N : void 0,
518
518
  tabIndex: -1,
519
519
  className: [
520
520
  "ds-select-dropdown ds-scrollable",
@@ -522,7 +522,7 @@ function us({
522
522
  `ds-select-dropdown--${$}`,
523
523
  p && "ds-select-dropdown--closing"
524
524
  ].filter(Boolean).join(" "),
525
- style: w,
525
+ style: b,
526
526
  children: r.map((E, f) => /* @__PURE__ */ e.jsx(
527
527
  "button",
528
528
  {
@@ -547,7 +547,7 @@ function us({
547
547
  }
548
548
  );
549
549
  return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
550
- t && /* @__PURE__ */ e.jsx("label", { id: j, className: "ds-select-label", children: t }),
550
+ t && /* @__PURE__ */ e.jsx("label", { id: N, className: "ds-select-label", children: t }),
551
551
  /* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: S, children: /* @__PURE__ */ e.jsxs(
552
552
  "button",
553
553
  {
@@ -558,7 +558,7 @@ function us({
558
558
  "aria-haspopup": "listbox",
559
559
  "aria-expanded": m,
560
560
  "aria-activedescendant": m && _ >= 0 ? `${z}-opt-${_}` : void 0,
561
- "aria-labelledby": t ? j : void 0,
561
+ "aria-labelledby": t ? N : void 0,
562
562
  "aria-invalid": o ? "true" : "false",
563
563
  "aria-describedby": F,
564
564
  className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
@@ -567,7 +567,7 @@ function us({
567
567
  },
568
568
  onKeyDown: k,
569
569
  disabled: c,
570
- ...u,
570
+ ...d,
571
571
  children: [
572
572
  /* @__PURE__ */ e.jsx("span", { className: A ? "" : "ds-select-placeholder", children: (A == null ? void 0 : A.label) || a }),
573
573
  /* @__PURE__ */ e.jsx(
@@ -596,50 +596,50 @@ function fs({
596
596
  size: i = "m",
597
597
  disabled: l = !1,
598
598
  hint: c,
599
- error: d,
600
- ...u
599
+ error: u,
600
+ ...d
601
601
  }) {
602
602
  const m = () => {
603
603
  if (l) return;
604
604
  const $ = Math.min(Number(s) + o, a);
605
605
  n == null || n($);
606
- }, x = () => {
606
+ }, h = () => {
607
607
  if (l) return;
608
608
  const $ = Math.max(Number(s) - o, r);
609
609
  n == null || n($);
610
610
  }, p = ($) => {
611
611
  if (l) return;
612
- const N = $.target.value;
613
- if (N === "") {
612
+ const w = $.target.value;
613
+ if (w === "") {
614
614
  n == null || n(r);
615
615
  return;
616
616
  }
617
- const _ = Number(N);
617
+ const _ = Number(w);
618
618
  if (!isNaN(_)) {
619
619
  const y = Math.min(Math.max(_, r), a);
620
620
  n == null || n(y);
621
621
  }
622
- }, h = [
622
+ }, x = [
623
623
  "ds-stepper-wrapper",
624
624
  l && "ds-stepper-wrapper--disabled",
625
- d && "ds-stepper-wrapper--error"
626
- ].filter(Boolean).join(" "), w = [
625
+ u && "ds-stepper-wrapper--error"
626
+ ].filter(Boolean).join(" "), b = [
627
627
  "ds-stepper",
628
628
  `ds-stepper--${i}`,
629
629
  l && "ds-stepper--disabled"
630
- ].filter(Boolean).join(" "), b = i === "xs" ? C[1] : i === "small" ? C[2] : C[3];
631
- return /* @__PURE__ */ e.jsxs("div", { className: h, children: [
630
+ ].filter(Boolean).join(" "), j = i === "xs" ? C[1] : i === "small" ? C[2] : C[3];
631
+ return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
632
632
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
633
- /* @__PURE__ */ e.jsxs("div", { className: w, children: [
633
+ /* @__PURE__ */ e.jsxs("div", { className: b, 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
- onClick: x,
639
+ onClick: h,
640
640
  disabled: l || s <= r,
641
641
  "aria-label": "Decrease",
642
- children: /* @__PURE__ */ e.jsx(rt, { size: b, strokeWidth: 1.5 })
642
+ children: /* @__PURE__ */ e.jsx(rt, { size: j, strokeWidth: 1.5 })
643
643
  }
644
644
  ),
645
645
  /* @__PURE__ */ e.jsx(
@@ -653,7 +653,7 @@ function fs({
653
653
  max: a,
654
654
  step: o,
655
655
  disabled: l,
656
- ...u
656
+ ...d
657
657
  }
658
658
  ),
659
659
  /* @__PURE__ */ e.jsx(
@@ -664,62 +664,64 @@ function fs({
664
664
  onClick: m,
665
665
  disabled: l || s >= a,
666
666
  "aria-label": "Increase",
667
- children: /* @__PURE__ */ e.jsx(at, { size: b, strokeWidth: 1.5 })
667
+ children: /* @__PURE__ */ e.jsx(at, { size: j, strokeWidth: 1.5 })
668
668
  }
669
669
  )
670
670
  ] }),
671
- c && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
672
- d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
671
+ c && !u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: c }),
672
+ u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
673
673
  ] });
674
674
  }
675
675
  function ms({
676
676
  children: t,
677
677
  padding: s = "m",
678
- variant: n = "info",
678
+ variant: n = "default",
679
679
  hover: r = !1,
680
680
  // deprecated, use variant="interactive"
681
681
  onClick: a,
682
682
  href: o,
683
683
  disabled: i = !1,
684
- ...l
684
+ className: l = "",
685
+ ...c
685
686
  }) {
686
- const d = (r ? "interactive" : n) === "interactive" || a || o, u = [
687
+ const d = (r ? "interactive" : n) === "interactive" || a || o, m = [
687
688
  "ds-card",
688
689
  `ds-card--${s}`,
689
- d && "ds-card--interactive"
690
+ d && "ds-card--interactive",
691
+ l
690
692
  ].filter(Boolean).join(" ");
691
693
  if (o) {
692
- const p = (h) => {
694
+ const x = (b) => {
693
695
  if (i) {
694
- h.preventDefault();
696
+ b.preventDefault();
695
697
  return;
696
698
  }
697
- h.metaKey || h.ctrlKey || h.button === 1 || (h.preventDefault(), a == null || a(h));
699
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), a == null || a(b));
698
700
  };
699
701
  return /* @__PURE__ */ e.jsx(
700
702
  "a",
701
703
  {
702
- className: u,
704
+ className: m,
703
705
  href: i ? void 0 : o,
704
- onClick: p,
706
+ onClick: x,
705
707
  "aria-disabled": i ? "true" : void 0,
706
- ...l,
708
+ ...c,
707
709
  children: t
708
710
  }
709
711
  );
710
712
  }
711
- const m = d && a ? "button" : "div", x = d && a ? {
713
+ const h = d && a ? "button" : "div", p = d && a ? {
712
714
  type: "button",
713
715
  onClick: a,
714
716
  disabled: i
715
717
  } : {};
716
718
  return /* @__PURE__ */ e.jsx(
717
- m,
719
+ h,
718
720
  {
719
- className: u,
721
+ className: m,
720
722
  role: d && !a ? "article" : void 0,
721
- ...x,
722
- ...l,
723
+ ...p,
724
+ ...c,
723
725
  children: t
724
726
  }
725
727
  );
@@ -772,8 +774,8 @@ const yt = {
772
774
  role: o,
773
775
  ...i
774
776
  }, l) {
775
- const c = yt[n], d = o || (n === "error" ? "alert" : "status");
776
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: d, ...i, children: [
777
+ const c = yt[n], u = o || (n === "error" ? "alert" : "status");
778
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: u, ...i, children: [
777
779
  c && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(c, { size: C[3], strokeWidth: 1.5 }) }),
778
780
  /* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
779
781
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
@@ -800,24 +802,24 @@ function js({
800
802
  subHeader: o,
801
803
  ...i
802
804
  }) {
803
- const l = R(null), c = q.useId(), [d, u] = B(!1), m = () => {
804
- !n || d || (u(!0), setTimeout(() => {
805
- u(!1), n();
805
+ const l = R(null), c = q.useId(), [u, d] = B(!1), m = () => {
806
+ !n || u || (d(!0), setTimeout(() => {
807
+ d(!1), n();
806
808
  }, kt));
807
809
  };
808
810
  P(() => {
809
- const b = (N) => {
810
- N.key === "Escape" && m();
811
- }, $ = (N) => {
811
+ const j = (w) => {
812
+ w.key === "Escape" && m();
813
+ }, $ = (w) => {
812
814
  var y, S, D;
813
- const _ = ((S = (y = N.composedPath) == null ? void 0 : y.call(N)) == null ? void 0 : S[0]) ?? N.target;
815
+ const _ = ((S = (y = w.composedPath) == null ? void 0 : y.call(w)) == null ? void 0 : S[0]) ?? w.target;
814
816
  l.current && !l.current.contains(_) && !((D = _.closest) != null && D.call(_, "[data-ds-portal]")) && m();
815
817
  };
816
- return document.addEventListener("keydown", b), document.addEventListener("mousedown", $), () => {
817
- document.removeEventListener("keydown", b), document.removeEventListener("mousedown", $);
818
+ return document.addEventListener("keydown", j), document.addEventListener("mousedown", $), () => {
819
+ document.removeEventListener("keydown", j), document.removeEventListener("mousedown", $);
818
820
  };
819
- }, [n, d]);
820
- const x = q.Children.toArray(t), p = x.find((b) => (b == null ? void 0 : b.type) === he), h = x.filter((b) => (b == null ? void 0 : b.type) !== he), w = /* @__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 = q.Children.toArray(t), p = h.find((j) => (j == null ? void 0 : j.type) === he), x = h.filter((j) => (j == null ? void 0 : j.type) !== he), b = /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", u && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
821
823
  "div",
822
824
  {
823
825
  className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
@@ -841,12 +843,12 @@ function js({
841
843
  s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-modal__title", children: s }),
842
844
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
843
845
  ] }),
844
- /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: h }),
846
+ /* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
845
847
  p
846
848
  ]
847
849
  }
848
850
  ) });
849
- return typeof document > "u" ? w : re.createPortal(w, document.body);
851
+ return typeof document > "u" ? b : re.createPortal(b, document.body);
850
852
  }
851
853
  function he({ children: t }) {
852
854
  return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
@@ -859,24 +861,24 @@ function Ns({
859
861
  subHeader: r,
860
862
  ...a
861
863
  }) {
862
- const o = R(null), i = q.useId(), [l, c] = B(!1), d = () => {
864
+ const o = R(null), i = q.useId(), [l, c] = B(!1), u = () => {
863
865
  !n || l || (c(!0), setTimeout(() => {
864
866
  c(!1), n();
865
867
  }, Et));
866
868
  };
867
869
  P(() => {
868
- const h = (b) => {
869
- b.key === "Escape" && d();
870
- }, w = (b) => {
871
- var N, _, y;
872
- const $ = ((_ = (N = b.composedPath) == null ? void 0 : N.call(b)) == null ? void 0 : _[0]) ?? b.target;
873
- o.current && !o.current.contains($) && !((y = $.closest) != null && y.call($, "[data-ds-portal]")) && d();
870
+ const x = (j) => {
871
+ j.key === "Escape" && u();
872
+ }, b = (j) => {
873
+ var w, _, y;
874
+ const $ = ((_ = (w = j.composedPath) == null ? void 0 : w.call(j)) == null ? void 0 : _[0]) ?? j.target;
875
+ o.current && !o.current.contains($) && !((y = $.closest) != null && y.call($, "[data-ds-portal]")) && u();
874
876
  };
875
- return document.addEventListener("keydown", h), document.addEventListener("mousedown", w), () => {
876
- document.removeEventListener("keydown", h), document.removeEventListener("mousedown", w);
877
+ return document.addEventListener("keydown", x), document.addEventListener("mousedown", b), () => {
878
+ document.removeEventListener("keydown", x), document.removeEventListener("mousedown", b);
877
879
  };
878
880
  }, [n, l]);
879
- const u = q.Children.toArray(t), m = u.find((h) => (h == null ? void 0 : h.type) === he), x = u.filter((h) => (h == null ? void 0 : h.type) !== he), p = /* @__PURE__ */ e.jsx(
881
+ const d = q.Children.toArray(t), m = d.find((x) => (x == null ? void 0 : x.type) === he), h = d.filter((x) => (x == null ? void 0 : x.type) !== he), p = /* @__PURE__ */ e.jsx(
880
882
  "div",
881
883
  {
882
884
  className: ["ds-bottom-sheet-overlay", l && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
@@ -898,7 +900,7 @@ function Ns({
898
900
  variant: "ghost",
899
901
  size: "small",
900
902
  icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
901
- onClick: d,
903
+ onClick: u,
902
904
  "aria-label": "Close"
903
905
  }
904
906
  ),
@@ -906,7 +908,7 @@ function Ns({
906
908
  s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: s }),
907
909
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
908
910
  ] }),
909
- /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: x }),
911
+ /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: h }),
910
912
  m
911
913
  ]
912
914
  }
@@ -925,8 +927,8 @@ function $t({
925
927
  className: i = "",
926
928
  ...l
927
929
  }) {
928
- const [c, d] = B(n), u = r !== void 0, m = u ? r : c, x = () => {
929
- u ? a == null || a(!r) : d((h) => !h);
930
+ const [c, u] = B(n), d = r !== void 0, m = d ? r : c, h = () => {
931
+ d ? a == null || a(!r) : u((x) => !x);
930
932
  }, p = [
931
933
  "ds-code-accordion",
932
934
  `ds-code-accordion--${o}`,
@@ -939,7 +941,7 @@ function $t({
939
941
  {
940
942
  type: "button",
941
943
  className: "ds-code-accordion__header",
942
- onClick: x,
944
+ onClick: h,
943
945
  "aria-expanded": m,
944
946
  children: [
945
947
  /* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: s }),
@@ -979,18 +981,18 @@ function ys({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
979
981
  return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: q.Children.map(t, (a) => q.isValidElement(a) ? q.cloneElement(a, { size: s, variant: n }) : a) });
980
982
  }
981
983
  function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
982
- const d = i && !t, u = [
984
+ const u = i && !t, d = [
983
985
  "ds-tab",
984
986
  `ds-tab--${r}`,
985
987
  `ds-tab--${a}`,
986
988
  s && "ds-tab--selected",
987
- d && "ds-tab--icon-only"
989
+ u && "ds-tab--icon-only"
988
990
  ].filter(Boolean).join(" "), m = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
989
991
  i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
990
992
  t
991
993
  ] });
992
994
  if (l) {
993
- const x = (p) => {
995
+ const h = (p) => {
994
996
  if (o) {
995
997
  p.preventDefault();
996
998
  return;
@@ -1003,9 +1005,9 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1003
1005
  role: "tab",
1004
1006
  "aria-current": s ? "page" : void 0,
1005
1007
  "aria-disabled": o ? "true" : void 0,
1006
- className: u,
1008
+ className: d,
1007
1009
  href: o ? void 0 : l,
1008
- onClick: x,
1010
+ onClick: h,
1009
1011
  ...c,
1010
1012
  children: m
1011
1013
  }
@@ -1016,7 +1018,7 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1016
1018
  {
1017
1019
  role: "tab",
1018
1020
  "aria-selected": s,
1019
- className: u,
1021
+ className: d,
1020
1022
  onClick: n,
1021
1023
  disabled: o,
1022
1024
  ...c,
@@ -1025,26 +1027,26 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
1025
1027
  );
1026
1028
  }
1027
1029
  function Es({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
1028
- const o = R(null), i = R(null), [l, c] = B(!1), d = R(!1), u = R(null), m = R(null), x = () => {
1030
+ const o = R(null), i = R(null), [l, c] = B(!1), u = R(!1), d = R(null), m = R(null), h = () => {
1029
1031
  if (!o.current) return;
1030
1032
  const p = o.current.querySelector(`[data-value="${s}"]`);
1031
1033
  if (!p) return;
1032
- const h = o.current.getBoundingClientRect(), w = p.getBoundingClientRect(), b = w.left - h.left, $ = w.width;
1033
- i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = b + "px", i.current.style.width = $ + "px", d.current = !1) : (c(!0), requestAnimationFrame(() => {
1034
+ const x = o.current.getBoundingClientRect(), b = p.getBoundingClientRect(), j = b.left - x.left, $ = b.width;
1035
+ i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = j + "px", i.current.style.width = $ + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
1034
1036
  if (!i.current || !o.current) return;
1035
- const N = o.current.querySelector(`[data-value="${s}"]`);
1036
- if (!N) return;
1037
- const _ = o.current.getBoundingClientRect(), y = N.getBoundingClientRect();
1037
+ const w = o.current.querySelector(`[data-value="${s}"]`);
1038
+ if (!w) return;
1039
+ const _ = o.current.getBoundingClientRect(), y = w.getBoundingClientRect();
1038
1040
  i.current.style.transition = "none", i.current.style.left = y.left - _.left + "px", i.current.style.width = y.width + "px";
1039
1041
  }));
1040
1042
  };
1041
- return m.current = x, nt(() => {
1042
- const p = u.current !== s;
1043
- u.current = s, d.current = l && p, x();
1043
+ return m.current = h, nt(() => {
1044
+ const p = d.current !== s;
1045
+ d.current = s, u.current = l && p, h();
1044
1046
  }), P(() => {
1045
1047
  if (!o.current) return;
1046
1048
  const p = new ResizeObserver(() => {
1047
- d.current = !1, m.current();
1049
+ u.current = !1, m.current();
1048
1050
  });
1049
1051
  return p.observe(o.current), () => p.disconnect();
1050
1052
  }, []), /* @__PURE__ */ e.jsxs(
@@ -1095,21 +1097,21 @@ function Be({
1095
1097
  padding: o = "m",
1096
1098
  ...i
1097
1099
  }) {
1098
- const [l, c] = B(n), d = r !== void 0, u = d ? r : l, m = () => {
1099
- d ? a == null || a(!r) : c((p) => !p);
1100
- }, x = [
1100
+ const [l, c] = B(n), u = r !== void 0, d = u ? r : l, m = () => {
1101
+ u ? a == null || a(!r) : c((p) => !p);
1102
+ }, h = [
1101
1103
  "ds-accordion",
1102
1104
  `ds-accordion--${o}`,
1103
- u && "ds-accordion--expanded"
1105
+ d && "ds-accordion--expanded"
1104
1106
  ].filter(Boolean).join(" ");
1105
- return /* @__PURE__ */ e.jsxs("div", { className: x, ...i, children: [
1107
+ return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
1106
1108
  /* @__PURE__ */ e.jsxs(
1107
1109
  "button",
1108
1110
  {
1109
1111
  type: "button",
1110
1112
  className: "ds-accordion__header",
1111
1113
  onClick: m,
1112
- "aria-expanded": u,
1114
+ "aria-expanded": d,
1113
1115
  children: [
1114
1116
  /* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
1115
1117
  /* @__PURE__ */ e.jsx(
@@ -1117,7 +1119,7 @@ function Be({
1117
1119
  {
1118
1120
  size: C[2],
1119
1121
  strokeWidth: 1.5,
1120
- className: `ds-accordion__icon ${u ? "ds-accordion__icon--expanded" : ""}`
1122
+ className: `ds-accordion__icon ${d ? "ds-accordion__icon--expanded" : ""}`
1121
1123
  }
1122
1124
  )
1123
1125
  ]
@@ -1159,12 +1161,12 @@ function Rt(t, s, n) {
1159
1161
  return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
1160
1162
  }
1161
1163
  function Le({ children: t, content: s, position: n, ...r }) {
1162
- const [a, o] = B(!1), [i, l] = B({ visibility: "hidden" }), [c, d] = B(n || "top"), u = R(null), m = R(null), x = R(!1), p = () => {
1163
- if (!u.current || !m.current) return;
1164
- const w = u.current.getBoundingClientRect(), b = m.current.getBoundingClientRect(), $ = n || Rt(w, b.height, b.width), { top: N, left: _, arrowOffset: y } = Tt($, w, b);
1165
- d($), l({
1164
+ const [a, o] = B(!1), [i, l] = B({ visibility: "hidden" }), [c, u] = B(n || "top"), d = R(null), m = R(null), h = R(!1), p = () => {
1165
+ if (!d.current || !m.current) return;
1166
+ const b = d.current.getBoundingClientRect(), j = m.current.getBoundingClientRect(), $ = n || Rt(b, j.height, j.width), { top: w, left: _, arrowOffset: y } = Tt($, b, j);
1167
+ u($), l({
1166
1168
  position: "fixed",
1167
- top: N,
1169
+ top: w,
1168
1170
  left: _,
1169
1171
  visibility: "visible",
1170
1172
  "--arrow-offset": `${y}px`
@@ -1173,18 +1175,18 @@ function Le({ children: t, content: s, position: n, ...r }) {
1173
1175
  if (P(() => {
1174
1176
  if (!a) return;
1175
1177
  l({ position: "fixed", visibility: "hidden" });
1176
- const w = requestAnimationFrame(p);
1178
+ const b = requestAnimationFrame(p);
1177
1179
  return window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
1178
- cancelAnimationFrame(w), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
1180
+ cancelAnimationFrame(b), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
1179
1181
  };
1180
1182
  }, [a, n]), P(() => {
1181
1183
  if (!a) return;
1182
- const w = (b) => {
1183
- u.current && !u.current.contains(b.target) && o(!1);
1184
+ const b = (j) => {
1185
+ d.current && !d.current.contains(j.target) && o(!1);
1184
1186
  };
1185
- return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
1187
+ return document.addEventListener("touchstart", b), () => document.removeEventListener("touchstart", b);
1186
1188
  }, [a]), !s) return t;
1187
- const h = a && /* @__PURE__ */ e.jsx(
1189
+ const x = a && /* @__PURE__ */ e.jsx(
1188
1190
  "div",
1189
1191
  {
1190
1192
  ref: m,
@@ -1198,21 +1200,21 @@ function Le({ children: t, content: s, position: n, ...r }) {
1198
1200
  return /* @__PURE__ */ e.jsxs(
1199
1201
  "div",
1200
1202
  {
1201
- ref: u,
1203
+ ref: d,
1202
1204
  className: "ds-tooltip-wrapper",
1203
1205
  onMouseEnter: () => {
1204
- x.current || o(!0);
1206
+ h.current || o(!0);
1205
1207
  },
1206
1208
  onMouseLeave: () => {
1207
- x.current || o(!1);
1209
+ h.current || o(!1);
1208
1210
  },
1209
1211
  onTouchStart: () => {
1210
- x.current = !0, o((w) => !w);
1212
+ h.current = !0, o((b) => !b);
1211
1213
  },
1212
1214
  ...r,
1213
1215
  children: [
1214
1216
  t,
1215
- typeof document < "u" && re.createPortal(h, document.body)
1217
+ typeof document < "u" && re.createPortal(x, document.body)
1216
1218
  ]
1217
1219
  }
1218
1220
  );
@@ -1239,7 +1241,7 @@ function $s({
1239
1241
  id: l,
1240
1242
  className: "ds-toggle__input",
1241
1243
  checked: t,
1242
- onChange: (d) => s == null ? void 0 : s(d.target.checked),
1244
+ onChange: (u) => s == null ? void 0 : s(u.target.checked),
1243
1245
  disabled: r,
1244
1246
  ...i
1245
1247
  }
@@ -1261,7 +1263,7 @@ function Ts({
1261
1263
  "ds-checkbox",
1262
1264
  `ds-checkbox--${n}`,
1263
1265
  r && "ds-checkbox--disabled"
1264
- ].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1266
+ ].filter(Boolean).join(" "), u = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
1265
1267
  return /* @__PURE__ */ e.jsxs("label", { className: c, htmlFor: l, children: [
1266
1268
  /* @__PURE__ */ e.jsx(
1267
1269
  "input",
@@ -1270,7 +1272,7 @@ function Ts({
1270
1272
  id: l,
1271
1273
  className: "ds-checkbox__input",
1272
1274
  checked: t,
1273
- onChange: (u) => s == null ? void 0 : s(u.target.checked),
1275
+ onChange: (d) => s == null ? void 0 : s(d.target.checked),
1274
1276
  disabled: r,
1275
1277
  ...i
1276
1278
  }
@@ -1278,7 +1280,7 @@ function Ts({
1278
1280
  /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
1279
1281
  Re,
1280
1282
  {
1281
- size: d,
1283
+ size: u,
1282
1284
  strokeWidth: 2.5,
1283
1285
  className: "ds-checkbox__icon"
1284
1286
  }
@@ -1297,17 +1299,17 @@ function Rs({
1297
1299
  id: l,
1298
1300
  ...c
1299
1301
  }) {
1300
- const d = l || `radio-${q.useId()}`, u = [
1302
+ const u = l || `radio-${q.useId()}`, d = [
1301
1303
  "ds-radio",
1302
1304
  `ds-radio--${n}`,
1303
1305
  r && "ds-radio--disabled"
1304
1306
  ].filter(Boolean).join(" ");
1305
- return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: d, children: [
1307
+ return /* @__PURE__ */ e.jsxs("label", { className: d, htmlFor: u, children: [
1306
1308
  /* @__PURE__ */ e.jsx(
1307
1309
  "input",
1308
1310
  {
1309
1311
  type: "radio",
1310
- id: d,
1312
+ id: u,
1311
1313
  className: "ds-radio__input",
1312
1314
  checked: t,
1313
1315
  onChange: (m) => s == null ? void 0 : s(m.target.checked),
@@ -1364,7 +1366,7 @@ function It(t) {
1364
1366
  return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
1365
1367
  }
1366
1368
  function Ss({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
1367
- const l = Dt(t ?? ""), [c, d] = B(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: It(t) });
1369
+ const l = Dt(t ?? ""), [c, u] = B(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: It(t) });
1368
1370
  return /* @__PURE__ */ e.jsx(
1369
1371
  "div",
1370
1372
  {
@@ -1372,7 +1374,7 @@ function Ss({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style:
1372
1374
  style: { width: r, height: r, "--ds-avatar-h": l, ...o },
1373
1375
  "aria-hidden": "true",
1374
1376
  ...i,
1375
- children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : u
1377
+ children: n && !c ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => u(!0) }) : d
1376
1378
  }
1377
1379
  );
1378
1380
  }
@@ -1435,7 +1437,7 @@ function Ls({ children: t, colSpan: s = 999, ...n }) {
1435
1437
  return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
1436
1438
  }
1437
1439
  function Ps({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
1438
- const c = !!r || n !== void 0, d = n === "asc" ? ot : n === "desc" ? je : it;
1440
+ const c = !!r || n !== void 0, u = n === "asc" ? ot : n === "desc" ? je : it;
1439
1441
  return /* @__PURE__ */ e.jsx(
1440
1442
  "th",
1441
1443
  {
@@ -1451,7 +1453,7 @@ function Ps({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
1451
1453
  ...l,
1452
1454
  children: c ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
1453
1455
  t,
1454
- /* @__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 }) })
1455
1457
  ] }) : t
1456
1458
  }
1457
1459
  );
@@ -1507,9 +1509,9 @@ function Fs({
1507
1509
  children: i,
1508
1510
  className: l = "",
1509
1511
  style: c,
1510
- ...d
1512
+ ...u
1511
1513
  }) {
1512
- const u = q.useId(), m = o ?? u, x = `${m}-hint`, p = `${m}-error`;
1514
+ const d = q.useId(), m = o ?? d, h = `${m}-hint`, p = `${m}-error`;
1513
1515
  return /* @__PURE__ */ e.jsxs(
1514
1516
  "div",
1515
1517
  {
@@ -1518,11 +1520,11 @@ function Fs({
1518
1520
  "data-required": r ? "" : void 0,
1519
1521
  "data-disabled": a ? "" : void 0,
1520
1522
  style: c,
1521
- ...d,
1523
+ ...u,
1522
1524
  children: [
1523
1525
  t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: m, children: t }),
1524
1526
  /* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
1525
- s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: x, children: s }),
1527
+ s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: s }),
1526
1528
  n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: p, role: "alert", children: n })
1527
1529
  ]
1528
1530
  }
@@ -1602,16 +1604,16 @@ function Os({
1602
1604
  }
1603
1605
  ),
1604
1606
  c.map(
1605
- (d, u) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${u}`) : /* @__PURE__ */ e.jsx(
1607
+ (u, d) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${d}`) : /* @__PURE__ */ e.jsx(
1606
1608
  "button",
1607
1609
  {
1608
- className: `ds-pagination-page${d === t ? " ds-pagination-page--current" : ""}`,
1609
- onClick: () => d !== t && (n == null ? void 0 : n(d)),
1610
- "aria-current": d === t ? "page" : void 0,
1611
- "aria-label": `Page ${d}`,
1612
- children: d
1610
+ className: `ds-pagination-page${u === t ? " ds-pagination-page--current" : ""}`,
1611
+ onClick: () => u !== t && (n == null ? void 0 : n(u)),
1612
+ "aria-current": u === t ? "page" : void 0,
1613
+ "aria-label": `Page ${u}`,
1614
+ children: u
1613
1615
  },
1614
- d
1616
+ u
1615
1617
  )
1616
1618
  ),
1617
1619
  /* @__PURE__ */ e.jsx(
@@ -1646,37 +1648,37 @@ function Us({
1646
1648
  offsetLeft: i = 0,
1647
1649
  offsetRight: l = 0,
1648
1650
  keepOpenRef: c,
1649
- ...d
1651
+ ...u
1650
1652
  }) {
1651
- const u = R(null), m = q.useId(), [x, p] = B(!1), h = () => {
1652
- !n || x || (p(!0), setTimeout(() => {
1653
+ const d = R(null), m = q.useId(), [h, p] = B(!1), x = () => {
1654
+ !n || h || (p(!0), setTimeout(() => {
1653
1655
  p(!1), n();
1654
1656
  }, Lt));
1655
1657
  };
1656
1658
  P(() => {
1657
1659
  const _ = (S) => {
1658
- S.key === "Escape" && h();
1660
+ S.key === "Escape" && x();
1659
1661
  }, y = (S) => {
1660
- var M, W, z, j;
1662
+ var M, W, z, N;
1661
1663
  const D = ((W = (M = S.composedPath) == null ? void 0 : M.call(S)) == null ? void 0 : W[0]) ?? S.target;
1662
- (z = c == null ? void 0 : c.current) != null && z.contains(D) || u.current && !u.current.contains(D) && !((j = D.closest) != null && j.call(D, "[data-ds-portal]")) && h();
1664
+ (z = c == null ? void 0 : c.current) != null && z.contains(D) || d.current && !d.current.contains(D) && !((N = D.closest) != null && N.call(D, "[data-ds-portal]")) && x();
1663
1665
  };
1664
1666
  return document.addEventListener("keydown", _), document.addEventListener("mousedown", y), () => {
1665
1667
  document.removeEventListener("keydown", _), document.removeEventListener("mousedown", y);
1666
1668
  };
1667
- }, [n, x, c]);
1668
- const w = q.Children.toArray(t), b = w.find((_) => (_ == null ? void 0 : _.type) === Oe || (_ == null ? void 0 : _.type) === he), $ = w.filter((_) => (_ == null ? void 0 : _.type) !== Oe && (_ == null ? void 0 : _.type) !== he), N = /* @__PURE__ */ e.jsx(
1669
+ }, [n, h, c]);
1670
+ const b = q.Children.toArray(t), j = b.find((_) => (_ == null ? void 0 : _.type) === Oe || (_ == null ? void 0 : _.type) === he), $ = b.filter((_) => (_ == null ? void 0 : _.type) !== Oe && (_ == null ? void 0 : _.type) !== he), w = /* @__PURE__ */ e.jsx(
1669
1671
  "div",
1670
1672
  {
1671
- className: ["ds-side-page-overlay", x && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1673
+ className: ["ds-side-page-overlay", h && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
1672
1674
  "data-side": a,
1673
1675
  style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
1674
- ...d,
1676
+ ...u,
1675
1677
  children: /* @__PURE__ */ e.jsxs(
1676
1678
  "div",
1677
1679
  {
1678
- ref: u,
1679
- className: ["ds-side-page", x && "ds-side-page--closing"].filter(Boolean).join(" "),
1680
+ ref: d,
1681
+ className: ["ds-side-page", h && "ds-side-page--closing"].filter(Boolean).join(" "),
1680
1682
  "data-side": a,
1681
1683
  "data-size": o,
1682
1684
  role: "dialog",
@@ -1690,7 +1692,7 @@ function Us({
1690
1692
  variant: "ghost",
1691
1693
  size: "small",
1692
1694
  icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
1693
- onClick: h,
1695
+ onClick: x,
1694
1696
  "aria-label": "Close"
1695
1697
  }
1696
1698
  ),
@@ -1699,13 +1701,13 @@ function Us({
1699
1701
  r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
1700
1702
  ] }),
1701
1703
  /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: $ }),
1702
- b
1704
+ j
1703
1705
  ]
1704
1706
  }
1705
1707
  )
1706
1708
  }
1707
1709
  );
1708
- return typeof document > "u" ? N : re.createPortal(N, document.body);
1710
+ return typeof document > "u" ? w : re.createPortal(w, document.body);
1709
1711
  }
1710
1712
  function Oe({ children: t }) {
1711
1713
  return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
@@ -1719,12 +1721,12 @@ const ve = Ze({ collapsed: !1, side: "left" }), we = Ze(!1), Vs = Je(function({
1719
1721
  className: i = "",
1720
1722
  ...l
1721
1723
  }, c) {
1722
- const d = [
1724
+ const u = [
1723
1725
  "ds-nav-rail",
1724
1726
  n && "ds-nav-rail--collapsed",
1725
1727
  `ds-nav-rail--${r}`,
1726
1728
  i
1727
- ].filter(Boolean).join(" "), u = ce((m) => {
1729
+ ].filter(Boolean).join(" "), d = ce((m) => {
1728
1730
  if (!m.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]')) {
1729
1731
  if (n && a) {
1730
1732
  a();
@@ -1737,8 +1739,8 @@ const ve = Ze({ collapsed: !1, side: "left" }), we = Ze(!1), Vs = Je(function({
1737
1739
  "nav",
1738
1740
  {
1739
1741
  ref: c,
1740
- className: d,
1741
- onClick: u,
1742
+ className: u,
1743
+ onClick: d,
1742
1744
  "data-expandable": n && a ? "" : void 0,
1743
1745
  "data-collapsible": !n && o ? "" : void 0,
1744
1746
  ...l,
@@ -1756,31 +1758,31 @@ function Ys({
1756
1758
  count: i,
1757
1759
  updated: l = !1,
1758
1760
  open: c = !1,
1759
- onboarding: d = !1,
1760
- className: u = "",
1761
+ onboarding: u = !1,
1762
+ className: d = "",
1761
1763
  ...m
1762
1764
  }) {
1763
- const { collapsed: x, side: p } = ue(ve), h = ue(we), $ = {
1765
+ const { collapsed: h, side: p } = ue(ve), x = ue(we), $ = {
1764
1766
  className: [
1765
1767
  "ds-nav-rail__item",
1766
- u
1768
+ d
1767
1769
  ].filter(Boolean).join(" "),
1768
1770
  onClick: r ? void 0 : o,
1769
1771
  "aria-current": n ? "page" : void 0,
1770
1772
  "aria-disabled": r ? "true" : void 0,
1771
- "aria-label": x ? s : void 0,
1773
+ "aria-label": h ? s : void 0,
1772
1774
  tabIndex: r ? -1 : void 0,
1773
1775
  ...{
1774
1776
  "data-selected": n || void 0,
1775
1777
  "data-disabled": r || void 0,
1776
1778
  "data-open": c || void 0,
1777
- "data-onboarding": d || void 0
1779
+ "data-onboarding": u || void 0
1778
1780
  },
1779
1781
  ...m
1780
- }, N = i != null, _ = p === "left" ? "right" : "left", y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1782
+ }, w = i != null, _ = p === "left" ? "right" : "left", y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1781
1783
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1782
- !x && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1783
- !x && N && /* @__PURE__ */ e.jsx(
1784
+ !h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
1785
+ !h && w && /* @__PURE__ */ e.jsx(
1784
1786
  "span",
1785
1787
  {
1786
1788
  className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
@@ -1788,11 +1790,11 @@ function Ys({
1788
1790
  children: i
1789
1791
  }
1790
1792
  ),
1791
- !x && l && (!N || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
1792
- x && N && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
1793
- x && l && (!N || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1793
+ !h && l && (!w || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
1794
+ h && w && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
1795
+ h && l && (!w || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
1794
1796
  ] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...$, children: y }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...$, children: y });
1795
- return x && !h ? /* @__PURE__ */ e.jsx(Le, { content: s, position: _, children: S }) : S;
1797
+ return h && !x ? /* @__PURE__ */ e.jsx(Le, { content: s, position: _, children: S }) : S;
1796
1798
  }
1797
1799
  function Hs({ children: t, className: s = "", ...n }) {
1798
1800
  return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
@@ -1832,11 +1834,11 @@ const Js = Je(function({
1832
1834
  className: a = "",
1833
1835
  ...o
1834
1836
  }, i) {
1835
- const { collapsed: l, side: c } = ue(ve), d = ue(we), u = c === "left" ? "right" : "left", m = [
1837
+ const { collapsed: l, side: c } = ue(ve), u = ue(we), d = c === "left" ? "right" : "left", m = [
1836
1838
  "ds-nav-rail__item",
1837
1839
  "ds-nav-rail__agent",
1838
1840
  a
1839
- ].filter(Boolean).join(" "), x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1841
+ ].filter(Boolean).join(" "), h = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1840
1842
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
1841
1843
  !l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: r })
1842
1844
  ] }), p = /* @__PURE__ */ e.jsx(
@@ -1847,13 +1849,13 @@ const Js = Je(function({
1847
1849
  "aria-label": l ? r : void 0,
1848
1850
  ...s === "button" ? { type: "button" } : {},
1849
1851
  ...o,
1850
- children: x
1852
+ children: h
1851
1853
  }
1852
1854
  );
1853
- return l && !d ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: p }) : p;
1855
+ return l && !u ? /* @__PURE__ */ e.jsx(Le, { content: r, position: d, children: p }) : p;
1854
1856
  });
1855
1857
  function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
1856
- const { collapsed: c, side: d } = ue(ve), u = ue(we), p = {
1858
+ const { collapsed: c, side: u } = ue(ve), d = ue(we), p = {
1857
1859
  className: [
1858
1860
  "ds-nav-rail__item",
1859
1861
  "ds-nav-rail__agent",
@@ -1868,11 +1870,11 @@ function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
1868
1870
  "data-disabled": r || void 0
1869
1871
  },
1870
1872
  ...l
1871
- }, h = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1873
+ }, x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1872
1874
  /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
1873
1875
  !c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
1874
- ] }), w = d === "left" ? "right" : "left", b = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...p, children: h }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...p, children: h });
1875
- return c && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: w, children: b }) : b;
1876
+ ] }), b = u === "left" ? "right" : "left", j = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...p, children: x }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...p, children: x });
1877
+ return c && !d ? /* @__PURE__ */ e.jsx(Le, { content: s, position: b, children: j }) : j;
1876
1878
  }
1877
1879
  const Ue = 240, Ve = 6, Ye = 8;
1878
1880
  function Qs({
@@ -1883,57 +1885,57 @@ function Qs({
1883
1885
  onOpenChange: a,
1884
1886
  defaultOpen: o = !1
1885
1887
  }) {
1886
- const { side: i } = ue(ve), [l, c] = B(o), d = r !== void 0, u = d ? r : l, [m, x] = B(!1), p = R(null), h = R(null), [w, b] = B({}), $ = ce(() => {
1887
- d ? a == null || a(!0) : c(!0);
1888
- }, [d, a]), N = ce(() => {
1889
- d ? a == null || a(!1) : c(!1);
1890
- }, [d, a]), _ = ce(() => u ? N() : $(), [u, $, N]), y = ce(() => {
1888
+ const { side: i } = ue(ve), [l, c] = B(o), u = r !== void 0, d = u ? r : l, [m, h] = B(!1), p = R(null), x = R(null), [b, j] = B({}), $ = ce(() => {
1889
+ u ? a == null || a(!0) : c(!0);
1890
+ }, [u, a]), w = ce(() => {
1891
+ u ? a == null || a(!1) : c(!1);
1892
+ }, [u, a]), _ = ce(() => d ? w() : $(), [d, $, w]), y = ce(() => {
1891
1893
  var F;
1892
1894
  const D = p.current;
1893
1895
  if (!D) return;
1894
- const M = D.getBoundingClientRect(), W = window.innerHeight, z = ((F = h.current) == null ? void 0 : F.offsetHeight) ?? 300, j = Math.max(Ye, Math.min(W - z - Ye, M.top));
1895
- b(i === "right" ? {
1896
+ const M = D.getBoundingClientRect(), W = window.innerHeight, z = ((F = x.current) == null ? void 0 : F.offsetHeight) ?? 300, N = Math.max(Ye, Math.min(W - z - Ye, M.top));
1897
+ j(i === "right" ? {
1896
1898
  position: "fixed",
1897
- top: j,
1899
+ top: N,
1898
1900
  right: window.innerWidth - M.left + Ve,
1899
1901
  width: Ue
1900
1902
  } : {
1901
1903
  position: "fixed",
1902
- top: j,
1904
+ top: N,
1903
1905
  left: M.right + Ve,
1904
1906
  width: Ue
1905
1907
  });
1906
1908
  }, [i]);
1907
1909
  P(() => {
1908
- if (!u) {
1909
- x(!1);
1910
+ if (!d) {
1911
+ h(!1);
1910
1912
  return;
1911
1913
  }
1912
- return y(), requestAnimationFrame(() => x(!0)), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1914
+ return y(), requestAnimationFrame(() => h(!0)), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
1913
1915
  window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
1914
1916
  };
1915
- }, [u, y]), P(() => {
1916
- if (!u) return;
1917
+ }, [d, y]), P(() => {
1918
+ if (!d) return;
1917
1919
  const D = (W) => {
1918
- var z, j;
1919
- !((z = h.current) != null && z.contains(W.target)) && !((j = p.current) != null && j.contains(W.target)) && N();
1920
+ var z, N;
1921
+ !((z = x.current) != null && z.contains(W.target)) && !((N = p.current) != null && N.contains(W.target)) && w();
1920
1922
  }, M = (W) => {
1921
- W.key === "Escape" && N();
1923
+ W.key === "Escape" && w();
1922
1924
  };
1923
1925
  return document.addEventListener("mousedown", D), document.addEventListener("keydown", M), () => {
1924
1926
  document.removeEventListener("mousedown", D), document.removeEventListener("keydown", M);
1925
1927
  };
1926
- }, [u, N]);
1927
- const S = u && /* @__PURE__ */ e.jsxs(
1928
+ }, [d, w]);
1929
+ const S = d && /* @__PURE__ */ e.jsxs(
1928
1930
  "div",
1929
1931
  {
1930
- ref: h,
1932
+ ref: x,
1931
1933
  className: [
1932
1934
  "ds-nav-rail-flyout",
1933
1935
  `ds-nav-rail-flyout--${i}`,
1934
1936
  m && "ds-nav-rail-flyout--visible"
1935
1937
  ].filter(Boolean).join(" "),
1936
- style: w,
1938
+ style: b,
1937
1939
  "data-ds-portal": "",
1938
1940
  role: "dialog",
1939
1941
  "aria-modal": "false",
@@ -1945,7 +1947,7 @@ function Qs({
1945
1947
  {
1946
1948
  type: "button",
1947
1949
  className: "ds-nav-rail-flyout__close",
1948
- onClick: N,
1950
+ onClick: w,
1949
1951
  "aria-label": "Close",
1950
1952
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
1951
1953
  }
@@ -1956,7 +1958,7 @@ function Qs({
1956
1958
  }
1957
1959
  );
1958
1960
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1959
- /* @__PURE__ */ e.jsx(we.Provider, { value: u, children: /* @__PURE__ */ e.jsx("div", { ref: p, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
1961
+ /* @__PURE__ */ e.jsx(we.Provider, { value: d, children: /* @__PURE__ */ e.jsx("div", { ref: p, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
1960
1962
  typeof document < "u" && re.createPortal(S, document.body)
1961
1963
  ] });
1962
1964
  }
@@ -2019,26 +2021,26 @@ function tn({
2019
2021
  style: l,
2020
2022
  ...c
2021
2023
  }) {
2022
- const [d, u] = B(!1), [m, x] = B(!1), p = n !== void 0, h = p ? n : d, w = R(null), b = R(null), $ = R(null), N = R(null), [_, y] = B({}), S = R(null), D = 150, M = () => {
2024
+ const [u, d] = B(!1), [m, h] = B(!1), p = n !== void 0, x = p ? n : u, b = R(null), j = R(null), $ = R(null), w = R(null), [_, y] = B({}), S = R(null), D = 150, M = () => {
2023
2025
  if (p)
2024
2026
  r == null || r(!1);
2025
2027
  else {
2026
2028
  if (m) return;
2027
- x(!0), S.current = setTimeout(() => {
2028
- u(!1), x(!1);
2029
+ h(!0), S.current = setTimeout(() => {
2030
+ d(!1), h(!1);
2029
2031
  }, D);
2030
2032
  }
2031
2033
  }, W = () => {
2032
- const v = !h;
2033
- p ? r == null || r(v) : v ? (clearTimeout(S.current), x(!1), u(!0)) : M();
2034
+ const v = !x;
2035
+ p ? r == null || r(v) : v ? (clearTimeout(S.current), h(!1), d(!0)) : M();
2034
2036
  }, z = () => {
2035
- h || (p ? r == null || r(!0) : (clearTimeout(S.current), x(!1), u(!0)));
2037
+ x || (p ? r == null || r(!0) : (clearTimeout(S.current), h(!1), d(!0)));
2036
2038
  };
2037
2039
  P(() => () => clearTimeout(S.current), []), P(() => {
2038
- if (!h) return;
2040
+ if (!x) return;
2039
2041
  const v = 300, k = () => {
2040
2042
  var E;
2041
- const A = (E = w.current) == null ? void 0 : E.getBoundingClientRect();
2043
+ const A = (E = b.current) == null ? void 0 : E.getBoundingClientRect();
2042
2044
  if (!A) return;
2043
2045
  const U = window.innerHeight - A.bottom, G = U < v + 8 && A.top > U;
2044
2046
  y(
@@ -2048,8 +2050,8 @@ function tn({
2048
2050
  return k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
2049
2051
  window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
2050
2052
  };
2051
- }, [h, a]);
2052
- const j = () => {
2053
+ }, [x, a]);
2054
+ const N = () => {
2053
2055
  var k;
2054
2056
  const v = (k = $.current) == null ? void 0 : k.querySelector(
2055
2057
  'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
@@ -2057,30 +2059,30 @@ function tn({
2057
2059
  v == null || v.focus();
2058
2060
  };
2059
2061
  P(() => {
2060
- if (!h) return;
2062
+ if (!x) return;
2061
2063
  const v = (A) => {
2062
2064
  var U, G;
2063
- !((U = w.current) != null && U.contains(A.target)) && !((G = b.current) != null && G.contains(A.target)) && M();
2065
+ !((U = b.current) != null && U.contains(A.target)) && !((G = j.current) != null && G.contains(A.target)) && M();
2064
2066
  }, k = (A) => {
2065
- A.key === "Escape" && (M(), j());
2067
+ A.key === "Escape" && (M(), N());
2066
2068
  };
2067
2069
  return document.addEventListener("mousedown", v), document.addEventListener("keydown", k), () => {
2068
2070
  document.removeEventListener("mousedown", v), document.removeEventListener("keydown", k);
2069
2071
  };
2070
- }, [h]), P(() => {
2071
- if (!h || !N.current || !b.current) return;
2072
- const v = F(), k = N.current === "last" ? v[v.length - 1] : v[0];
2073
- k == null || k.focus(), N.current = null;
2074
- }, [h]);
2075
- const F = () => b.current ? [...b.current.querySelectorAll(
2072
+ }, [x]), P(() => {
2073
+ if (!x || !w.current || !j.current) return;
2074
+ const v = F(), k = w.current === "last" ? v[v.length - 1] : v[0];
2075
+ k == null || k.focus(), w.current = null;
2076
+ }, [x]);
2077
+ const F = () => j.current ? [...j.current.querySelectorAll(
2076
2078
  'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
2077
2079
  )] : [], K = (v) => {
2078
2080
  var k, A;
2079
2081
  if (v.key === "ArrowDown")
2080
- v.preventDefault(), h ? (k = F()[0]) == null || k.focus() : (N.current = "first", z());
2082
+ v.preventDefault(), x ? (k = F()[0]) == null || k.focus() : (w.current = "first", z());
2081
2083
  else if (v.key === "ArrowUp")
2082
- if (v.preventDefault(), !h)
2083
- N.current = "last", z();
2084
+ if (v.preventDefault(), !x)
2085
+ w.current = "last", z();
2084
2086
  else {
2085
2087
  const U = F();
2086
2088
  (A = U[U.length - 1]) == null || A.focus();
@@ -2093,7 +2095,7 @@ function tn({
2093
2095
  v.preventDefault(), (U = k[Math.min(A + 1, k.length - 1)]) == null || U.focus();
2094
2096
  break;
2095
2097
  case "ArrowUp":
2096
- v.preventDefault(), A <= 0 ? j() : (G = k[A - 1]) == null || G.focus();
2098
+ v.preventDefault(), A <= 0 ? N() : (G = k[A - 1]) == null || G.focus();
2097
2099
  break;
2098
2100
  case "Home":
2099
2101
  v.preventDefault(), (E = k[0]) == null || E.focus();
@@ -2105,10 +2107,10 @@ function tn({
2105
2107
  M();
2106
2108
  break;
2107
2109
  }
2108
- }, I = h && /* @__PURE__ */ e.jsx(
2110
+ }, I = x && /* @__PURE__ */ e.jsx(
2109
2111
  "div",
2110
2112
  {
2111
- ref: b,
2113
+ ref: j,
2112
2114
  role: "menu",
2113
2115
  "data-ds-portal": "",
2114
2116
  className: [
@@ -2154,7 +2156,7 @@ function tn({
2154
2156
  return /* @__PURE__ */ e.jsxs(
2155
2157
  "div",
2156
2158
  {
2157
- ref: w,
2159
+ ref: b,
2158
2160
  className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
2159
2161
  style: l,
2160
2162
  ...c,
@@ -2222,12 +2224,12 @@ function Ft(t, { duration: s = 600 } = {}) {
2222
2224
  const i = a.current, l = t - i;
2223
2225
  if (l === 0) return;
2224
2226
  let c = null;
2225
- const d = (u) => {
2226
- c || (c = u);
2227
- const m = Math.min((u - c) / s, 1);
2228
- r(i + l * Mt(m)), m < 1 ? o.current = requestAnimationFrame(d) : a.current = t;
2227
+ const u = (d) => {
2228
+ c || (c = d);
2229
+ const m = Math.min((d - c) / s, 1);
2230
+ r(i + l * Mt(m)), m < 1 ? o.current = requestAnimationFrame(u) : a.current = t;
2229
2231
  };
2230
- return o.current = requestAnimationFrame(d), () => cancelAnimationFrame(o.current);
2232
+ return o.current = requestAnimationFrame(u), () => cancelAnimationFrame(o.current);
2231
2233
  }, [t, s]), n;
2232
2234
  }
2233
2235
  function nn({
@@ -2264,10 +2266,10 @@ function rn({
2264
2266
  onLeave: i,
2265
2267
  ...l
2266
2268
  }) {
2267
- const { ref: c, inView: d } = Wt({ threshold: r, rootMargin: a, once: n }), u = R(!1);
2269
+ const { ref: c, inView: u } = Wt({ threshold: r, rootMargin: a, once: n }), d = R(!1);
2268
2270
  return P(() => {
2269
- d && !u.current && (o == null || o()), !d && u.current && (i == null || i()), u.current = d;
2270
- }, [d]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(d) : t });
2271
+ u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
2272
+ }, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
2271
2273
  }
2272
2274
  const He = {
2273
2275
  default: Ie,
@@ -2353,9 +2355,9 @@ function ln({
2353
2355
  onToggle: i,
2354
2356
  children: l,
2355
2357
  className: c = "",
2356
- ...d
2358
+ ...u
2357
2359
  }) {
2358
- const u = s === "running", m = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2360
+ const d = s === "running", m = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
2359
2361
  n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
2360
2362
  /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
2361
2363
  Vt[s],
@@ -2364,16 +2366,16 @@ function ln({
2364
2366
  return l ? /* @__PURE__ */ e.jsx(
2365
2367
  "div",
2366
2368
  {
2367
- className: ["ds-tool-card", u && "ds-tool-card--running", c].filter(Boolean).join(" "),
2368
- ...d,
2369
+ className: ["ds-tool-card", d && "ds-tool-card--running", c].filter(Boolean).join(" "),
2370
+ ...u,
2369
2371
  children: /* @__PURE__ */ e.jsx(
2370
2372
  Be,
2371
2373
  {
2372
2374
  title: m,
2373
2375
  padding: "s",
2374
2376
  defaultExpanded: a,
2375
- expanded: u ? !1 : o,
2376
- onToggle: u ? void 0 : i,
2377
+ expanded: d ? !1 : o,
2378
+ onToggle: d ? void 0 : i,
2377
2379
  children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
2378
2380
  }
2379
2381
  )
@@ -2382,7 +2384,7 @@ function ln({
2382
2384
  "div",
2383
2385
  {
2384
2386
  className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
2385
- ...d,
2387
+ ...u,
2386
2388
  children: m
2387
2389
  }
2388
2390
  );
@@ -2445,10 +2447,10 @@ function dn({
2445
2447
  ...l
2446
2448
  }) {
2447
2449
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
2448
- /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, d) => {
2449
- const u = d === s, m = n.includes(d) && !u, x = r && (d <= s || n.includes(d)), p = [
2450
+ /* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, u) => {
2451
+ const d = u === s, m = n.includes(u) && !d, h = r && (u <= s || n.includes(u)), p = [
2450
2452
  "ds-step-indicator__dot",
2451
- u && "ds-step-indicator__dot--active",
2453
+ d && "ds-step-indicator__dot--active",
2452
2454
  m && "ds-step-indicator__dot--done"
2453
2455
  ].filter(Boolean).join(" ");
2454
2456
  return /* @__PURE__ */ e.jsx(
@@ -2457,13 +2459,13 @@ function dn({
2457
2459
  type: "button",
2458
2460
  className: p,
2459
2461
  role: "tab",
2460
- "aria-selected": u,
2461
- "aria-label": `Step ${d + 1}`,
2462
- disabled: !x || d === s,
2463
- onClick: () => r == null ? void 0 : r(d),
2462
+ "aria-selected": d,
2463
+ "aria-label": `Step ${u + 1}`,
2464
+ disabled: !h || u === s,
2465
+ onClick: () => r == null ? void 0 : r(u),
2464
2466
  children: m ? /* @__PURE__ */ e.jsx(Re, { size: 8, strokeWidth: 3 }) : null
2465
2467
  },
2466
- d
2468
+ u
2467
2469
  );
2468
2470
  }) }),
2469
2471
  a && /* @__PURE__ */ e.jsxs(Qe, { secondary: !0, className: "ds-step-indicator__counter", children: [
@@ -2540,33 +2542,33 @@ function Ht({
2540
2542
  betweenTime: o = 380,
2541
2543
  manualPauseMs: i = 5e3
2542
2544
  }) {
2543
- const [l, c] = B(0), [d, u] = B(""), m = R("typing"), x = R(0), p = R(0), h = R(null), w = R(0);
2545
+ const [l, c] = B(0), [u, d] = B(""), m = R("typing"), h = R(0), p = R(0), x = R(null), b = R(0);
2544
2546
  P(() => {
2545
2547
  p.current = l;
2546
2548
  }, [l]), P(() => {
2547
- if (h.current && (clearTimeout(h.current), h.current = null), !s || t.length === 0) {
2548
- u(""), x.current = 0, m.current = "typing";
2549
+ if (x.current && (clearTimeout(x.current), x.current = null), !s || t.length === 0) {
2550
+ d(""), h.current = 0, m.current = "typing";
2549
2551
  return;
2550
2552
  }
2551
2553
  const y = () => {
2552
2554
  const S = Date.now();
2553
- if (w.current > S) {
2554
- h.current = setTimeout(y, w.current - S);
2555
+ if (b.current > S) {
2556
+ x.current = setTimeout(y, b.current - S);
2555
2557
  return;
2556
2558
  }
2557
2559
  const D = t[p.current % t.length] ?? "";
2558
- m.current === "typing" ? (x.current += 1, u(D.slice(0, x.current)), x.current >= D.length ? (m.current = "holding", h.current = setTimeout(y, a)) : h.current = setTimeout(y, n + Math.random() * 28)) : m.current === "holding" ? (m.current = "erasing", h.current = setTimeout(y, r)) : (x.current = Math.max(0, x.current - 1), u(D.slice(0, x.current)), x.current <= 0 ? (m.current = "typing", p.current = (p.current + 1) % t.length, c(p.current), h.current = setTimeout(y, o)) : h.current = setTimeout(y, r));
2560
+ m.current === "typing" ? (h.current += 1, d(D.slice(0, h.current)), h.current >= D.length ? (m.current = "holding", x.current = setTimeout(y, a)) : x.current = setTimeout(y, n + Math.random() * 28)) : m.current === "holding" ? (m.current = "erasing", x.current = setTimeout(y, r)) : (h.current = Math.max(0, h.current - 1), d(D.slice(0, h.current)), h.current <= 0 ? (m.current = "typing", p.current = (p.current + 1) % t.length, c(p.current), x.current = setTimeout(y, o)) : x.current = setTimeout(y, r));
2559
2561
  };
2560
- return h.current = setTimeout(y, 260), () => {
2561
- h.current && clearTimeout(h.current);
2562
+ return x.current = setTimeout(y, 260), () => {
2563
+ x.current && clearTimeout(x.current);
2562
2564
  };
2563
2565
  }, [s, t, n, r, a, o]);
2564
- const b = (y) => {
2566
+ const j = (y) => {
2565
2567
  if (t.length === 0) return;
2566
2568
  const S = (y % t.length + t.length) % t.length, D = t[S];
2567
- p.current = S, x.current = D.length, m.current = "holding", w.current = Date.now() + i, c(S), u(D);
2568
- }, $ = () => b(p.current + 1), N = () => b(p.current - 1), _ = t[l % t.length] ?? "";
2569
- return { displayed: d, currentPrompt: _, index: l, next: $, prev: N };
2569
+ p.current = S, h.current = D.length, m.current = "holding", b.current = Date.now() + i, c(S), d(D);
2570
+ }, $ = () => j(p.current + 1), w = () => j(p.current - 1), _ = t[l % t.length] ?? "";
2571
+ return { displayed: u, currentPrompt: _, index: l, next: $, prev: w };
2570
2572
  }
2571
2573
  let qt = 0;
2572
2574
  function pn({
@@ -2579,34 +2581,34 @@ function pn({
2579
2581
  disabled: i = !1,
2580
2582
  placeholder: l = "Let's get things done...",
2581
2583
  animatedPlaceholders: c,
2582
- attachments: d,
2583
- images: u,
2584
+ attachments: u,
2585
+ images: d,
2584
2586
  onAttachFiles: m,
2585
- onAttachImages: x,
2587
+ onAttachImages: h,
2586
2588
  onRemoveAttachment: p,
2587
- onRemoveImage: h,
2588
- acceptImage: w,
2589
- acceptFile: b,
2589
+ onRemoveImage: x,
2590
+ acceptImage: b,
2591
+ acceptFile: j,
2590
2592
  maxImages: $,
2591
- maxImageSize: N,
2593
+ maxImageSize: w,
2592
2594
  leftSlot: _,
2593
2595
  rightSlot: y,
2594
2596
  className: S = "",
2595
2597
  ...D
2596
2598
  }) {
2597
- const M = R(null), W = R(null), z = R(0), [j, F] = B(!1), [K, V] = B([]), I = (g) => {
2599
+ const M = R(null), W = R(null), z = R(0), [N, F] = B(!1), [K, V] = B([]), I = (g) => {
2598
2600
  const L = ++qt;
2599
2601
  V((X) => [...X, { id: L, msg: g }]), setTimeout(() => V((X) => X.filter((J) => J.id !== L)), 6e3);
2600
- }, v = (g) => V((L) => L.filter((X) => X.id !== g)), k = (g) => g.type.startsWith("image/"), A = () => !0, U = w ?? k, G = b ?? A, E = (g) => {
2602
+ }, v = (g) => V((L) => L.filter((X) => X.id !== g)), k = (g) => g.type.startsWith("image/"), A = () => !0, U = b ?? k, G = j ?? A, E = (g) => {
2601
2603
  const L = [], X = [], J = [], Z = [];
2602
- let se = 0, fe = $ != null ? $ - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
2604
+ let se = 0, fe = $ != null ? $ - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
2603
2605
  for (const ne of g)
2604
- U(ne) ? N && ne.size > N ? J.push(ne.name) : fe > 0 ? (L.push(ne), fe--) : se++ : G(ne) ? X.push(ne) : Z.push(ne.name);
2606
+ U(ne) ? w && ne.size > w ? J.push(ne.name) : fe > 0 ? (L.push(ne), fe--) : se++ : G(ne) ? X.push(ne) : Z.push(ne.name);
2605
2607
  return { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: se };
2606
2608
  }, f = (g) => {
2607
2609
  const { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: se } = E(g);
2608
- J.length && I(`File${J.length > 1 ? "s" : ""} too large${N ? ` (max ${N / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && I(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), se && I(`Max ${$} images per message`), x && L.length && x(L);
2609
- const fe = X.concat(x ? [] : L);
2610
+ J.length && I(`File${J.length > 1 ? "s" : ""} too large${w ? ` (max ${w / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && I(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), se && I(`Max ${$} images per message`), h && L.length && h(L);
2611
+ const fe = X.concat(h ? [] : L);
2610
2612
  m && fe.length && m(fe);
2611
2613
  };
2612
2614
  P(() => {
@@ -2634,7 +2636,7 @@ function pn({
2634
2636
  M.current && (M.current.value = ""), L.length && f(L);
2635
2637
  }, H = (g) => {
2636
2638
  var ne;
2637
- if (!x) return;
2639
+ if (!h) return;
2638
2640
  const L = (ne = g.clipboardData) == null ? void 0 : ne.items;
2639
2641
  if (!L) return;
2640
2642
  const X = [];
@@ -2644,7 +2646,7 @@ function pn({
2644
2646
  }
2645
2647
  if (X.length === 0) return;
2646
2648
  const { imageFiles: J, tooLarge: Z, skipped: se, limitExceeded: fe } = E(X);
2647
- Z.length && I(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), se.length && I(`Skipped unsupported file${se.length > 1 ? "s" : ""}: ${se.join(", ")}`), fe && I(`Max ${$} images per message`), J.length && (g.preventDefault(), x(J));
2649
+ Z.length && I(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), se.length && I(`Skipped unsupported file${se.length > 1 ? "s" : ""}: ${se.join(", ")}`), fe && I(`Max ${$} images per message`), J.length && (g.preventDefault(), h(J));
2648
2650
  }, Q = !o && !i && !!(c != null && c.length) && t.length === 0, le = Ht({
2649
2651
  prompts: c ?? [],
2650
2652
  enabled: Q
@@ -2664,7 +2666,7 @@ function pn({
2664
2666
  }
2665
2667
  }
2666
2668
  a == null || a(g);
2667
- }, tt = (t.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Pe = m || x;
2669
+ }, tt = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Pe = m || h;
2668
2670
  return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", S].filter(Boolean).join(" "), ...D, children: [
2669
2671
  Pe && /* @__PURE__ */ e.jsx(
2670
2672
  "input",
@@ -2680,13 +2682,13 @@ function pn({
2680
2682
  /* @__PURE__ */ e.jsxs(
2681
2683
  "div",
2682
2684
  {
2683
- className: ["ds-prompt-input__box", j && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2685
+ className: ["ds-prompt-input__box", N && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
2684
2686
  onDragEnter: T,
2685
2687
  onDragLeave: O,
2686
2688
  onDragOver: Y,
2687
2689
  onDrop: te,
2688
2690
  children: [
2689
- j && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2691
+ N && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
2690
2692
  /* @__PURE__ */ e.jsx(
2691
2693
  "textarea",
2692
2694
  {
@@ -2705,13 +2707,13 @@ function pn({
2705
2707
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: le.displayed }),
2706
2708
  /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
2707
2709
  ] }),
2708
- u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((g, L) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2710
+ d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((g, L) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
2709
2711
  /* @__PURE__ */ e.jsx("img", { src: g.preview, alt: "" }),
2710
2712
  /* @__PURE__ */ e.jsx(
2711
2713
  "button",
2712
2714
  {
2713
2715
  className: "ds-prompt-input__image-remove",
2714
- onClick: () => h == null ? void 0 : h(L),
2716
+ onClick: () => x == null ? void 0 : x(L),
2715
2717
  "aria-label": "Remove image",
2716
2718
  type: "button",
2717
2719
  children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
@@ -2731,7 +2733,7 @@ function pn({
2731
2733
  }
2732
2734
  )
2733
2735
  ] }, g.id)) }),
2734
- d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((g, L) => /* @__PURE__ */ e.jsx(pe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2736
+ u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((g, L) => /* @__PURE__ */ e.jsx(pe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
2735
2737
  g.uploading ? /* @__PURE__ */ e.jsx(ft, { size: C[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: C[1], strokeWidth: 1.5 }),
2736
2738
  g.filename,
2737
2739
  g.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
@@ -2799,15 +2801,15 @@ function hn({
2799
2801
  className: l = "",
2800
2802
  ...c
2801
2803
  }) {
2802
- const [d, u] = B(!1), m = R(null), x = R(null), p = R(null), [h, w] = B({}), b = t.filter((j) => !a || j.name === "auto" ? !0 : (qe[j.tier] ?? 1) >= (qe[a] ?? 1)), $ = b.find((j) => j.name === "auto"), N = b.filter((j) => j.name !== "auto"), _ = t.find((j) => j.name === s), S = new Set(N.map((j) => j.tier).filter(Boolean)).size > 1;
2804
+ const [u, d] = B(!1), m = R(null), h = R(null), p = R(null), [x, b] = B({}), j = t.filter((N) => !a || N.name === "auto" ? !0 : (qe[N.tier] ?? 1) >= (qe[a] ?? 1)), $ = j.find((N) => N.name === "auto"), w = j.filter((N) => N.name !== "auto"), _ = t.find((N) => N.name === s), S = new Set(w.map((N) => N.tier).filter(Boolean)).size > 1;
2803
2805
  P(() => {
2804
- if (!d) return;
2805
- const j = 320, F = () => {
2806
+ if (!u) return;
2807
+ const N = 320, F = () => {
2806
2808
  var A;
2807
- const I = (A = x.current) == null ? void 0 : A.getBoundingClientRect();
2809
+ const I = (A = h.current) == null ? void 0 : A.getBoundingClientRect();
2808
2810
  if (!I) return;
2809
- const v = window.innerHeight - I.bottom, k = v < j + 8 && I.top > v;
2810
- w({
2811
+ const v = window.innerHeight - I.bottom, k = v < N + 8 && I.top > v;
2812
+ b({
2811
2813
  position: "fixed",
2812
2814
  zIndex: "var(--z-dropdown, 500)",
2813
2815
  left: I.left,
@@ -2817,39 +2819,39 @@ function hn({
2817
2819
  F(), window.addEventListener("scroll", F, !0), window.addEventListener("resize", F);
2818
2820
  const K = (I) => {
2819
2821
  var v, k;
2820
- !((v = m.current) != null && v.contains(I.target)) && !((k = p.current) != null && k.contains(I.target)) && u(!1);
2822
+ !((v = m.current) != null && v.contains(I.target)) && !((k = p.current) != null && k.contains(I.target)) && d(!1);
2821
2823
  }, V = (I) => {
2822
- I.key === "Escape" && u(!1);
2824
+ I.key === "Escape" && d(!1);
2823
2825
  };
2824
2826
  return document.addEventListener("mousedown", K), document.addEventListener("keydown", V), () => {
2825
2827
  window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
2826
2828
  };
2827
- }, [d]);
2828
- const D = (j) => {
2829
- n == null || n(j), u(!1);
2830
- }, M = (j) => /* @__PURE__ */ e.jsxs(
2829
+ }, [u]);
2830
+ const D = (N) => {
2831
+ n == null || n(N), d(!1);
2832
+ }, M = (N) => /* @__PURE__ */ e.jsxs(
2831
2833
  "button",
2832
2834
  {
2833
2835
  type: "button",
2834
2836
  className: [
2835
2837
  "ds-model-picker__item",
2836
- j.name === s && "ds-model-picker__item--active"
2838
+ N.name === s && "ds-model-picker__item--active"
2837
2839
  ].filter(Boolean).join(" "),
2838
- onClick: () => D(j.name),
2840
+ onClick: () => D(N.name),
2839
2841
  children: [
2840
- j.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: j.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2841
- /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: j.displayName || j.name }),
2842
- S && j.tier && /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: Ge[j.tier] || "default", children: j.tier })
2842
+ N.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: N.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
2843
+ /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: N.displayName || N.name }),
2844
+ S && N.tier && /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: Ge[N.tier] || "default", children: N.tier })
2843
2845
  ]
2844
2846
  },
2845
- j.name
2846
- ), W = () => !i || !S ? N.map(M) : ["fast", "standard", "premium"].flatMap((j) => {
2847
- const F = N.filter((K) => K.tier === j);
2847
+ N.name
2848
+ ), W = () => !i || !S ? w.map(M) : ["fast", "standard", "premium"].flatMap((N) => {
2849
+ const F = w.filter((K) => K.tier === N);
2848
2850
  return F.length ? [
2849
- /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": j, children: j.charAt(0).toUpperCase() + j.slice(1) }, `lbl-${j}`),
2851
+ /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": N, children: N.charAt(0).toUpperCase() + N.slice(1) }, `lbl-${N}`),
2850
2852
  ...F.map(M)
2851
2853
  ] : [];
2852
- }), z = d && /* @__PURE__ */ e.jsxs("div", { ref: p, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: h, children: [
2854
+ }), z = u && /* @__PURE__ */ e.jsxs("div", { ref: p, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
2853
2855
  o && $ && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2854
2856
  /* @__PURE__ */ e.jsxs(
2855
2857
  "button",
@@ -2867,7 +2869,7 @@ function hn({
2867
2869
  ]
2868
2870
  }
2869
2871
  ),
2870
- N.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2872
+ w.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
2871
2873
  ] }),
2872
2874
  W()
2873
2875
  ] });
@@ -2881,12 +2883,12 @@ function hn({
2881
2883
  /* @__PURE__ */ e.jsxs(
2882
2884
  "button",
2883
2885
  {
2884
- ref: x,
2886
+ ref: h,
2885
2887
  type: "button",
2886
2888
  className: "ds-model-picker__trigger",
2887
- onClick: () => u((j) => !j),
2889
+ onClick: () => d((N) => !N),
2888
2890
  "aria-haspopup": "listbox",
2889
- "aria-expanded": d,
2891
+ "aria-expanded": u,
2890
2892
  children: [
2891
2893
  _ != null && _.icon ? /* @__PURE__ */ e.jsx("span", { children: _.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5 }),
2892
2894
  /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (_ == null ? void 0 : _.displayName) || (_ == null ? void 0 : _.name) || s }),
@@ -2919,22 +2921,22 @@ function xn({
2919
2921
  maxVisible: r = 5,
2920
2922
  onSourceClick: a
2921
2923
  }) {
2922
- const [o, i] = B(!1), l = Kt(t), c = l.length > r, d = o ? l : l.slice(0, r), u = t.some((x) => x.snippet), m = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2924
+ const [o, i] = B(!1), l = Kt(t), c = l.length > r, u = o ? l : l.slice(0, r), d = t.some((h) => h.snippet), m = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
2923
2925
  return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: m, children: [
2924
- d.map((x) => {
2925
- const p = x.items.map((w) => w.page).filter(Boolean), h = !!a;
2926
+ u.map((h) => {
2927
+ const p = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2926
2928
  return /* @__PURE__ */ e.jsxs(
2927
2929
  "div",
2928
2930
  {
2929
- className: `ds-sources-panel__compact-row${h ? " ds-sources-panel__compact-row--clickable" : ""}`,
2930
- onClick: h ? () => a(x.items[0]) : void 0,
2931
+ className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
2932
+ onClick: x ? () => a(h.items[0]) : void 0,
2931
2933
  children: [
2932
2934
  /* @__PURE__ */ e.jsx(xt, { size: C[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
2933
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: x.filename }),
2935
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2934
2936
  p.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(p) })
2935
2937
  ]
2936
2938
  },
2937
- x.filename
2939
+ h.filename
2938
2940
  );
2939
2941
  }),
2940
2942
  c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
@@ -2944,35 +2946,35 @@ function xn({
2944
2946
  ] })
2945
2947
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: m, children: [
2946
2948
  n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
2947
- d.map((x) => {
2948
- const p = x.items.map((w) => w.page).filter(Boolean), h = !!a;
2949
- return u ? /* @__PURE__ */ e.jsx(
2949
+ u.map((h) => {
2950
+ const p = h.items.map((b) => b.page).filter(Boolean), x = !!a;
2951
+ return d ? /* @__PURE__ */ e.jsx(
2950
2952
  Be,
2951
2953
  {
2952
- title: /* @__PURE__ */ e.jsx(Gt, { filename: x.filename, pages: p }),
2954
+ title: /* @__PURE__ */ e.jsx(Gt, { filename: h.filename, pages: p }),
2953
2955
  padding: "s",
2954
- children: x.items.map((w, b) => /* @__PURE__ */ e.jsx(
2956
+ children: h.items.map((b, j) => /* @__PURE__ */ e.jsx(
2955
2957
  "div",
2956
2958
  {
2957
- className: `ds-sources-panel__snippet${h ? " ds-sources-panel__snippet--clickable" : ""}`,
2958
- onClick: h ? () => a(w) : void 0,
2959
- children: w.snippet ?? `p. ${w.page}`
2959
+ className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
2960
+ onClick: x ? () => a(b) : void 0,
2961
+ children: b.snippet ?? `p. ${b.page}`
2960
2962
  },
2961
- b
2963
+ j
2962
2964
  ))
2963
2965
  },
2964
- x.filename
2966
+ h.filename
2965
2967
  ) : /* @__PURE__ */ e.jsxs(
2966
2968
  "div",
2967
2969
  {
2968
- className: `ds-sources-panel__row${h ? " ds-sources-panel__row--clickable" : ""}`,
2969
- onClick: h ? () => a(x.items[0]) : void 0,
2970
+ className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
2971
+ onClick: x ? () => a(h.items[0]) : void 0,
2970
2972
  children: [
2971
- /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: x.filename }),
2973
+ /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
2972
2974
  p.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(p) })
2973
2975
  ]
2974
2976
  },
2975
- x.filename
2977
+ h.filename
2976
2978
  );
2977
2979
  }),
2978
2980
  c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
@@ -2994,7 +2996,7 @@ function vn({
2994
2996
  warningThreshold: o = 0.8,
2995
2997
  errorThreshold: i = 1
2996
2998
  }) {
2997
- const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), d = l >= i ? "error" : l >= o ? "warning" : "normal";
2999
+ const l = s > 0 ? t / s : 0, c = Math.min(l * 100, 100), u = l >= i ? "error" : l >= o ? "warning" : "normal";
2998
3000
  return /* @__PURE__ */ e.jsxs(
2999
3001
  "div",
3000
3002
  {
@@ -3006,11 +3008,11 @@ function vn({
3006
3008
  /* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
3007
3009
  "div",
3008
3010
  {
3009
- className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
3011
+ className: `ds-token-counter__fill ds-token-counter__fill--${u}`,
3010
3012
  style: { width: `${c}%` }
3011
3013
  }
3012
3014
  ) }),
3013
- (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
3015
+ (r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
3014
3016
  r && /* @__PURE__ */ e.jsxs("span", { children: [
3015
3017
  Ke(t),
3016
3018
  " / ",
@@ -3074,18 +3076,18 @@ function bn({
3074
3076
  n && "ds-diff-view--wrap"
3075
3077
  ].filter(Boolean).join(" "), l = a ? { maxHeight: a, overflowY: "auto" } : void 0;
3076
3078
  if (s === "split") {
3077
- const c = t.filter((u) => u.type === "remove" || u.type === "context"), d = t.filter((u) => u.type === "add" || u.type === "context");
3079
+ const c = t.filter((d) => d.type === "remove" || d.type === "context"), u = t.filter((d) => d.type === "add" || d.type === "context");
3078
3080
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3079
3081
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3080
3082
  /* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
3081
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, m) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, m)) }),
3082
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, m) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, m)) })
3083
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((d, m) => /* @__PURE__ */ e.jsx(ye, { line: d, lineNumbers: r }, m)) }),
3084
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((d, m) => /* @__PURE__ */ e.jsx(ye, { line: d, lineNumbers: r }, m)) })
3083
3085
  ] })
3084
3086
  ] });
3085
3087
  }
3086
3088
  return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
3087
3089
  o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
3088
- /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, d) => /* @__PURE__ */ e.jsx(ye, { line: c, lineNumbers: r }, d)) })
3090
+ /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, u) => /* @__PURE__ */ e.jsx(ye, { line: c, lineNumbers: r }, u)) })
3089
3091
  ] });
3090
3092
  }
3091
3093
  function Zt({
@@ -3171,17 +3173,17 @@ function jn({
3171
3173
  className: i = "",
3172
3174
  ...l
3173
3175
  }) {
3174
- const c = t === "assistant" && (a || o), d = !!s, u = n ? Qt(n) : null;
3175
- return !c && !d && !u ? null : /* @__PURE__ */ e.jsxs(
3176
+ const c = t === "assistant" && (a || o), u = !!s, d = n ? Qt(n) : null;
3177
+ return !c && !u && !d ? null : /* @__PURE__ */ e.jsxs(
3176
3178
  "div",
3177
3179
  {
3178
3180
  className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
3179
3181
  ...l,
3180
3182
  children: [
3181
- t === "user" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u }),
3183
+ t === "user" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d }),
3182
3184
  c && /* @__PURE__ */ e.jsx(Zt, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
3183
- d && /* @__PURE__ */ e.jsx(Yt, { className: "ds-message-action", text: s }),
3184
- t === "assistant" && u && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: u })
3185
+ u && /* @__PURE__ */ e.jsx(Yt, { className: "ds-message-action", text: s }),
3186
+ t === "assistant" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d })
3185
3187
  ]
3186
3188
  }
3187
3189
  );
@@ -3274,8 +3276,8 @@ function as(t, s, n, r, a) {
3274
3276
  default:
3275
3277
  l = s.top + s.height / 2 - n / 2, c = s.right + a;
3276
3278
  }
3277
- const d = Math.max(de, Math.min(o - r - de, c)), u = Math.max(de, Math.min(i - n - de, l));
3278
- return { top: u, left: d, arrowOffset: c - d, arrowOffsetY: l - u };
3279
+ const u = Math.max(de, Math.min(o - r - de, c)), d = Math.max(de, Math.min(i - n - de, l));
3280
+ return { top: d, left: u, arrowOffset: c - u, arrowOffsetY: l - d };
3279
3281
  }
3280
3282
  function yn({
3281
3283
  steps: t,
@@ -3287,20 +3289,20 @@ function yn({
3287
3289
  overlay: i = !0,
3288
3290
  ring: l = !0,
3289
3291
  labelNext: c = "Next",
3290
- labelBack: d = "Back",
3291
- labelSkip: u = "Skip tour",
3292
+ labelBack: u = "Back",
3293
+ labelSkip: d = "Skip tour",
3292
3294
  labelFinish: m = "Done",
3293
- statePrimary: x = "idle",
3295
+ statePrimary: h = "idle",
3294
3296
  stateBack: p = "idle"
3295
3297
  }) {
3296
- const h = R(null), w = R(t), b = R(s), $ = R(l);
3297
- w.current = t, b.current = s, $.current = l;
3298
- const [N, _] = B(!1), [y, S] = B({ position: "fixed", visibility: "hidden", width: ke }), [D, M] = B("bottom"), [W, z] = B(null), j = R(!1), F = t[s], K = s === t.length - 1, V = ce(() => {
3299
- const I = w.current[b.current];
3300
- if (!I || !h.current) return;
3298
+ const x = R(null), b = R(t), j = R(s), $ = R(l);
3299
+ b.current = t, j.current = s, $.current = l;
3300
+ const [w, _] = B(!1), [y, S] = B({ position: "fixed", visibility: "hidden", width: ke }), [D, M] = B("bottom"), [W, z] = B(null), N = R(!1), F = t[s], K = s === t.length - 1, V = ce(() => {
3301
+ const I = b.current[j.current];
3302
+ if (!I || !x.current) return;
3301
3303
  const v = ns(I.target);
3302
3304
  if (!v) return;
3303
- const k = v.getBoundingClientRect(), U = h.current.getBoundingClientRect().height || 160, G = ke, E = $.current ? es : ts, f = I.position || rs(k, U, G, E), { top: T, left: O, arrowOffset: Y, arrowOffsetY: te } = as(f, k, U, G, E);
3305
+ const k = v.getBoundingClientRect(), U = x.current.getBoundingClientRect().height || 160, G = ke, E = $.current ? es : ts, f = I.position || rs(k, U, G, E), { top: T, left: O, arrowOffset: Y, arrowOffsetY: te } = as(f, k, U, G, E);
3304
3306
  M(f), S({
3305
3307
  position: "fixed",
3306
3308
  top: T,
@@ -3319,13 +3321,13 @@ function yn({
3319
3321
  return P(() => {
3320
3322
  window.addEventListener("scroll", V, !0), window.addEventListener("resize", V);
3321
3323
  const I = requestAnimationFrame(() => {
3322
- V(), _(!0), j.current = !0;
3324
+ V(), _(!0), N.current = !0;
3323
3325
  });
3324
3326
  return () => {
3325
3327
  cancelAnimationFrame(I), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V);
3326
3328
  };
3327
3329
  }, []), P(() => {
3328
- if (!j.current) return;
3330
+ if (!N.current) return;
3329
3331
  _(!1);
3330
3332
  const I = setTimeout(() => {
3331
3333
  S((v) => ({ ...v, visibility: "hidden" })), requestAnimationFrame(() => {
@@ -3334,25 +3336,25 @@ function yn({
3334
3336
  }, ss + 20);
3335
3337
  return () => clearTimeout(I);
3336
3338
  }, [s]), P(() => {
3337
- N && h.current && h.current.focus({ preventScroll: !0 });
3338
- }, [N]), P(() => {
3339
+ w && x.current && x.current.focus({ preventScroll: !0 });
3340
+ }, [w]), P(() => {
3339
3341
  const I = (v) => {
3340
3342
  v.key === "Escape" && a();
3341
3343
  };
3342
3344
  return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
3343
3345
  }, [a]), P(() => {
3344
- if (!N) return;
3346
+ if (!w) return;
3345
3347
  const I = (v) => {
3346
- if (v.key !== "Tab" || !h.current) return;
3348
+ if (v.key !== "Tab" || !x.current) return;
3347
3349
  const k = Array.from(
3348
- h.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3350
+ x.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
3349
3351
  );
3350
3352
  if (!k.length) return;
3351
3353
  const A = k[0], U = k[k.length - 1];
3352
3354
  v.shiftKey && document.activeElement === A ? (v.preventDefault(), U.focus()) : !v.shiftKey && document.activeElement === U && (v.preventDefault(), A.focus());
3353
3355
  };
3354
3356
  return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
3355
- }, [N]), !F || typeof document > "u" ? null : re.createPortal(
3357
+ }, [w]), !F || typeof document > "u" ? null : re.createPortal(
3356
3358
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3357
3359
  W && /* @__PURE__ */ e.jsx(
3358
3360
  "div",
@@ -3361,7 +3363,7 @@ function yn({
3361
3363
  "ds-coachmark__spotlight",
3362
3364
  i && "ds-coachmark__spotlight--overlay",
3363
3365
  !l && "ds-coachmark__spotlight--no-ring",
3364
- N && "ds-coachmark__spotlight--visible"
3366
+ w && "ds-coachmark__spotlight--visible"
3365
3367
  ].filter(Boolean).join(" "),
3366
3368
  style: W,
3367
3369
  "aria-hidden": "true"
@@ -3370,7 +3372,7 @@ function yn({
3370
3372
  /* @__PURE__ */ e.jsxs(
3371
3373
  "div",
3372
3374
  {
3373
- ref: h,
3375
+ ref: x,
3374
3376
  "data-ds-portal": "",
3375
3377
  role: "dialog",
3376
3378
  "aria-modal": "false",
@@ -3379,7 +3381,7 @@ function yn({
3379
3381
  className: [
3380
3382
  "ds-coachmark__bubble",
3381
3383
  `ds-coachmark__bubble--${D}`,
3382
- N && "ds-coachmark__bubble--visible"
3384
+ w && "ds-coachmark__bubble--visible"
3383
3385
  ].filter(Boolean).join(" "),
3384
3386
  style: y,
3385
3387
  tabIndex: -1,
@@ -3390,7 +3392,7 @@ function yn({
3390
3392
  type: "button",
3391
3393
  className: "ds-coachmark__close",
3392
3394
  onClick: a,
3393
- "aria-label": u,
3395
+ "aria-label": d,
3394
3396
  children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
3395
3397
  }
3396
3398
  ),
@@ -3403,8 +3405,8 @@ function yn({
3403
3405
  t.length
3404
3406
  ] }),
3405
3407
  /* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
3406
- s > 0 && /* @__PURE__ */ e.jsx(oe, { variant: "secondary", size: "s", state: p, onClick: r, children: d }),
3407
- /* @__PURE__ */ e.jsx(oe, { variant: "primary", size: "s", state: x, onClick: K ? o : n, children: K ? m : c })
3408
+ s > 0 && /* @__PURE__ */ e.jsx(oe, { variant: "secondary", size: "s", state: p, onClick: r, children: u }),
3409
+ /* @__PURE__ */ e.jsx(oe, { variant: "primary", size: "s", state: h, onClick: K ? o : n, children: K ? m : c })
3408
3410
  ] })
3409
3411
  ] })
3410
3412
  ]
@@ -3424,8 +3426,8 @@ function kn(t, s = {}) {
3424
3426
  start: () => {
3425
3427
  l() || (a(0), i(!0));
3426
3428
  },
3427
- next: () => a((d) => Math.min(d + 1, t.length - 1)),
3428
- back: () => a((d) => Math.max(d - 1, 0)),
3429
+ next: () => a((u) => Math.min(u + 1, t.length - 1)),
3430
+ back: () => a((u) => Math.max(u - 1, 0)),
3429
3431
  skip: c,
3430
3432
  finish: c
3431
3433
  };