@marimo-team/islands 0.26.1-dev20 → 0.26.1-dev25

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.
Files changed (119) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CR9WyiEc.js → ConnectedDataExplorerComponent-jtTaDisw.js} +16 -16
  2. package/dist/{ErrorBoundary-Cx-CwafE.js → ErrorBoundary-Bs2ehxEI.js} +6 -6
  3. package/dist/{abnfDiagram-VCTEODGH-DGAbsdXT.js → abnfDiagram-VCTEODGH-cUj3Gnnh.js} +2 -2
  4. package/dist/{any-language-editor-DzGF1ll-.js → any-language-editor-BHgkY7jY.js} +2 -2
  5. package/dist/{architectureDiagram-5GKGNRK7-D4DnIo7R.js → architectureDiagram-5GKGNRK7-CIAZgn9d.js} +1 -1
  6. package/dist/{assertNever-CqwxSD_2.js → assertNever-BHnIohkX.js} +13 -13
  7. package/dist/{chat-ui-qZdDDrzU.js → chat-ui-DOvIzlMA.js} +46 -46
  8. package/dist/{check-D9vf6LYF.js → check-LtjuWmNn.js} +1 -1
  9. package/dist/{chunk-IMKFNOWR-Bc_i6jWx.js → chunk-IMKFNOWR-CB9N3qYR.js} +1 -1
  10. package/dist/{chunk-SHT3W25Y-CGML5pnF.js → chunk-SHT3W25Y-D9njV7TI.js} +1 -1
  11. package/dist/{chunk-SVP7TREG-ZpeFKfFT.js → chunk-SVP7TREG-CUCE0BFm.js} +1 -1
  12. package/dist/{chunk-TICWLB2K-C6cLmcg8.js → chunk-TICWLB2K-iQB6ttkI.js} +1 -1
  13. package/dist/{classDiagram-ZZMXUADV--q40NTXr.js → classDiagram-ZZMXUADV-BI1VBNIo.js} +2 -2
  14. package/dist/{classDiagram-v2-VYDZK3BY-Dt_Pp94L.js → classDiagram-v2-VYDZK3BY-BYL3asWh.js} +2 -2
  15. package/dist/{code-visibility-CVfXV6fG.js → code-visibility-BnMkbydx.js} +19 -19
  16. package/dist/{common-BXRJCkJO.js → common-CQur5dRA.js} +156 -156
  17. package/dist/{config-B8JCQMby.js → config-DL9e-OWE.js} +3 -3
  18. package/dist/{copy-icon-BLig0ZKb.js → copy-icon-rYV2znAe.js} +2 -2
  19. package/dist/{createReducer-BIUQ3TbG.js → createReducer-BdiSrxHu.js} +5 -5
  20. package/dist/{cynefinDiagram-5FMLGOSQ-2FtF_-cc.js → cynefinDiagram-5FMLGOSQ-DpGtYvnZ.js} +1 -1
  21. package/dist/{dagre-GXQ25YYZ-Cymu2SPS.js → dagre-GXQ25YYZ-B5GDC2kN.js} +1 -1
  22. package/dist/{data-grid-overlay-editor-Mbtx3F9C.js → data-grid-overlay-editor-BXEY35Xl.js} +1 -1
  23. package/dist/{diagram-S7CK7UJ4-OwDa8kAa.js → diagram-S7CK7UJ4-B2T25t1t.js} +1 -1
  24. package/dist/{diagram-UQ7AKVKN-CzRDwZwd.js → diagram-UQ7AKVKN-Dy3B5L_z.js} +1 -1
  25. package/dist/{diagram-VX7I27RA-XRIcgMDs.js → diagram-VX7I27RA-tOptWvNh.js} +1 -1
  26. package/dist/{diagram-Z3DM3KII-DdRDYAs6.js → diagram-Z3DM3KII-DsgZAokO.js} +1 -1
  27. package/dist/{dialog-DGh2HNAO.js → dialog-vs6x3On9.js} +19 -19
  28. package/dist/{dropdown-menu-ChH3oiqI.js → dropdown-menu-DYN2RV5d.js} +193 -193
  29. package/dist/{ebnfDiagram-PWID7BFC-CZMNMGNP.js → ebnfDiagram-PWID7BFC-CGWECzS1.js} +2 -2
  30. package/dist/{erDiagram-RLTQ6QDP-ByxHAN4b.js → erDiagram-RLTQ6QDP-CZLi87y3.js} +1 -1
  31. package/dist/{error-banner-BvRaQnGH.js → error-banner-D-AC7pQx.js} +70 -70
  32. package/dist/{error-entries-DhI0hGvj.js → error-entries-CncQR572.js} +443 -436
  33. package/dist/{feedback-button-zx4NcNDn.js → feedback-button-BAOp7zqu.js} +120 -120
  34. package/dist/{flowDiagram-HODETNUW-BQpzWx5O.js → flowDiagram-HODETNUW-CS86WYbX.js} +2 -2
  35. package/dist/{formats-BxP8k8Un.js → formats-BUFLQJXY.js} +1 -1
  36. package/dist/{glide-data-editor-CvezoJKg.js → glide-data-editor-Ce94qTW7.js} +11 -11
  37. package/dist/{glide-utils-bKdvDwwo.js → glide-utils-CZ-O-CB_.js} +2 -2
  38. package/dist/{globals-CQuPaxzy.js → globals-Uqg4j5z5.js} +3 -3
  39. package/dist/{html-to-image-B803aaWE.js → html-to-image-BU7H-AM1.js} +4323 -4318
  40. package/dist/{infoDiagram-27XIBGKW-C9EWHkak.js → infoDiagram-27XIBGKW-C9JBFfpC.js} +1 -1
  41. package/dist/{ishikawaDiagram-5VMMS53U-D67SGFvp.js → ishikawaDiagram-5VMMS53U-Eh3iuw2D.js} +1 -1
  42. package/dist/{kanban-definition-UXKFOSKX-CTMTiazR.js → kanban-definition-UXKFOSKX-DYtuVwYD.js} +1 -1
  43. package/dist/main.js +401 -400
  44. package/dist/{mermaid-DE_tvTGF.js → mermaid--k1o49nH.js} +34 -34
  45. package/dist/{mindmap-definition-YA3MSWOX-LzNgDy8O.js → mindmap-definition-YA3MSWOX-Dn1Cnqys.js} +1 -1
  46. package/dist/{number-overlay-editor-DxM7vsCk.js → number-overlay-editor-Br_Vp3Ws.js} +1 -1
  47. package/dist/{pegDiagram-XKGWAZYB-DFMS6feI.js → pegDiagram-XKGWAZYB-DiY7rITR.js} +2 -2
  48. package/dist/{pencil-CHkdsX07.js → pencil-AWgwbH4D.js} +1 -1
  49. package/dist/{pieDiagram-E7YTZNPT-C0MSBop-.js → pieDiagram-E7YTZNPT-BL6InbDs.js} +1 -1
  50. package/dist/{process-output-CnCLfvnL.js → process-output-xJm8T5-E.js} +4 -4
  51. package/dist/{railroadDiagram-O6MQD6OU-mbdav2pV.js → railroadDiagram-O6MQD6OU-DterenMu.js} +2 -2
  52. package/dist/{requirementDiagram-BXWQKSXE-C1HNBBO6.js → requirementDiagram-BXWQKSXE-Vb5_9LHC.js} +1 -1
  53. package/dist/{reveal-component-BefmhjJF.js → reveal-component-B7TgfbYJ.js} +1008 -1008
  54. package/dist/{select-CvorIE3l.js → select-CKLRKIzB.js} +298 -298
  55. package/dist/{sequenceDiagram-WJ2MYXX4-D6gBHifq.js → sequenceDiagram-WJ2MYXX4-BWsq8hMt.js} +1 -1
  56. package/dist/{spec-ayzaXGVq.js → spec-C4uOz0Em.js} +4 -4
  57. package/dist/{stateDiagram-D77RDMKH-Bx-fTtRZ.js → stateDiagram-D77RDMKH-nfKKy6aQ.js} +2 -2
  58. package/dist/{stateDiagram-v2-MP3YSRHH-Cec8T2yO.js → stateDiagram-v2-MP3YSRHH-DMUHA_9A.js} +2 -2
  59. package/dist/{static-state-CqwW3B_X.js → static-state-DZ1nSa6e.js} +9 -9
  60. package/dist/{swimlanes-42K2YHIH-C2bAgnov.js → swimlanes-42K2YHIH-N4qHIMoc.js} +1 -1
  61. package/dist/{swimlanesDiagram-VR7AAH4N-CzeG-Mnb.js → swimlanesDiagram-VR7AAH4N-DQpDDjQb.js} +2 -2
  62. package/dist/{timeline-definition-24CTP7MA-DTJ0Rx8X.js → timeline-definition-24CTP7MA-Od8dY9F5.js} +1 -1
  63. package/dist/{toast-6V8Og7d5.js → toast-bhZHUEal.js} +187 -187
  64. package/dist/{tooltip-D0h-ZJ6j.js → tooltip-DSWC_Td_.js} +40 -40
  65. package/dist/{use-restore-focus-BFvwj2Hj.js → use-restore-focus-ocw7t85i.js} +1371 -1373
  66. package/dist/{useDateFormatter-D6o9PsWt.js → useDateFormatter-BiDS8uXQ.js} +2 -2
  67. package/dist/{useDeepCompareMemoize-D-Pbv7dN.js → useDeepCompareMemoize-BsaXfZ8C.js} +1 -1
  68. package/dist/{useLifecycle-CE0yGTMF.js → useLifecycle-CCV7yZ-v.js} +1 -1
  69. package/dist/{vega-component-DTf7GHQe.js → vega-component-DpTyTrz3.js} +6 -6
  70. package/dist/{vennDiagram-4TSXK5OY-lIM3SAjl.js → vennDiagram-4TSXK5OY-Di3T2YMb.js} +1 -1
  71. package/dist/{wardleyDiagram-VM6X3IG4-Bw_t7uvA.js → wardleyDiagram-VM6X3IG4-CKOF5DTi.js} +1 -1
  72. package/dist/{xychartDiagram-S5SC5T6Z-BXwkLYKj.js → xychartDiagram-S5SC5T6Z-GYLPWSeb.js} +1 -1
  73. package/package.json +1 -1
  74. package/src/__mocks__/executions.ts +27 -5
  75. package/src/__tests__/branded.ts +4 -0
  76. package/src/__tests__/notebook-analysis.ts +48 -0
  77. package/src/components/editor/ai/__tests__/completion-utils.test.ts +28 -61
  78. package/src/components/editor/cell/__tests__/useRunCells.test.tsx +2 -2
  79. package/src/components/editor/navigation/__tests__/navigation.test.ts +0 -4
  80. package/src/components/tracing/tracing-keyboard.test.tsx +4 -3
  81. package/src/core/cells/__tests__/add-missing-import.test.ts +14 -9
  82. package/src/core/cells/__tests__/pending-delete-service.test.tsx +4 -11
  83. package/src/core/cells/__tests__/runs.test.ts +11 -11
  84. package/src/core/cells/add-missing-import.ts +2 -3
  85. package/src/core/cells/runs.ts +6 -4
  86. package/src/core/cells/session.ts +4 -1
  87. package/src/core/codemirror/code-lens/__tests__/entities.test.ts +7 -11
  88. package/src/core/codemirror/code-lens/__tests__/extension.test.ts +8 -13
  89. package/src/core/codemirror/code-lens/__tests__/perf.test.ts +7 -9
  90. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +9 -13
  91. package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +16 -35
  92. package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +2 -18
  93. package/src/core/codemirror/reactive-references/__tests__/extension.test.ts +8 -14
  94. package/src/core/datasets/__tests__/data-source.test.ts +15 -17
  95. package/src/core/datasets/data-source-connections.ts +8 -11
  96. package/src/core/datasets/state.ts +7 -12
  97. package/src/core/executions/__tests__/atoms.test.ts +2 -2
  98. package/src/core/executions/__tests__/freshness.test.ts +10 -5
  99. package/src/core/executions/__tests__/interrupt.test.ts +3 -1
  100. package/src/core/executions/__tests__/output-lifecycle.test.ts +3 -3
  101. package/src/core/executions/__tests__/output.test.ts +2 -2
  102. package/src/core/executions/__tests__/run.test.ts +2 -2
  103. package/src/core/executions/__tests__/select.test.ts +10 -10
  104. package/src/core/executions/atoms.ts +2 -1
  105. package/src/core/executions/freshness.ts +2 -2
  106. package/src/core/islands/bootstrap.ts +0 -2
  107. package/src/core/notebook/replica/__tests__/executions.test.ts +13 -9
  108. package/src/core/notebook/replica/__tests__/replica.test.ts +7 -2
  109. package/src/core/notebook/replica/replica.ts +11 -2
  110. package/src/core/notebook/replica/resources/executions.ts +29 -20
  111. package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +192 -1
  112. package/src/core/session/useNotebookSession.tsx +37 -37
  113. package/src/core/storage/__tests__/state.test.ts +6 -9
  114. package/src/core/storage/state.ts +5 -8
  115. package/src/core/transports/__tests__/static.test.ts +2 -1
  116. package/src/core/variables/state.ts +73 -68
  117. package/src/core/variables/types.ts +2 -2
  118. package/src/core/wasm/bridge.ts +5 -4
  119. package/src/core/variables/__tests__/state.test.ts +0 -148
@@ -2,39 +2,39 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { h as t, i as n, p as r } from "./button-Z2R2272J.js";
3
3
  import { t as i } from "./react-Bgs_wQh3.js";
4
4
  import { t as a } from "./compiler-runtime-C5KHtL5D.js";
5
- import { m as o } from "./tooltip-D0h-ZJ6j.js";
6
- import { a as s, s as c } from "./assertNever-CqwxSD_2.js";
5
+ import { m as o } from "./tooltip-DSWC_Td_.js";
6
+ import { a as s, s as c } from "./assertNever-BHnIohkX.js";
7
7
  import { t as l } from "./react-dom-DdqGVp5N.js";
8
8
  import { t as u } from "./jsx-runtime-D8btoEHk.js";
9
- import { _n as d, dn as f, gn as p, hn as m, in as h, ln as g, mn as _, pn as v, un as y, vn as b, yn as x } from "./use-restore-focus-BFvwj2Hj.js";
9
+ import { _n as d, an as f, bn as p, dn as m, fn as h, gn as g, hn as _, mn as v, un as ee, vn as te, yn as y } from "./use-restore-focus-ocw7t85i.js";
10
10
  //#region ../node_modules/.pnpm/@radix-ui+react-toast@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_72d2e12f1af98becc17c9660ff8081b2/node_modules/@radix-ui/react-toast/dist/index.mjs
11
- var S = /* @__PURE__ */ e(i(), 1), ee = /* @__PURE__ */ e(l(), 1), C = u(), w = Object.defineProperty, T = (e, t) => w(e, "name", {
11
+ var b = /* @__PURE__ */ e(i(), 1), ne = /* @__PURE__ */ e(l(), 1), x = u(), S = Object.defineProperty, C = (e, t) => S(e, "name", {
12
12
  value: t,
13
13
  configurable: !0
14
- }), E = S.startTransition || (() => void 0), D = "ToastProvider", [O, te, k] = s("Toast"), A = {
14
+ }), w = b.startTransition || (() => void 0), T = "ToastProvider", [E, re, D] = s("Toast"), O = {
15
15
  Up: "up",
16
16
  Down: "down",
17
17
  Left: "left",
18
18
  Right: "right"
19
- }, ne = {
19
+ }, ie = {
20
20
  Foreground: "foreground",
21
21
  Background: "background"
22
- }, [j, M] = d("Toast", [k]), [N, P] = j(D);
23
- function F(e) {
24
- typeof E == "function" ? E(e) : e();
22
+ }, [k, A] = te("Toast", [D]), [j, M] = k(T);
23
+ function N(e) {
24
+ typeof w == "function" ? w(e) : e();
25
25
  }
26
- T(F, "scheduleUpdate");
27
- var I = /* @__PURE__ */ T((e) => {
28
- let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = A.Right, swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = S.useState(null), [u, d] = S.useState(0), f = S.useRef(!1), p = S.useCallback((e) => {
29
- F(() => l(e));
30
- }, []), m = S.useCallback(() => {
31
- F(() => d((e) => e + 1));
32
- }, []), h = S.useCallback(() => {
33
- F(() => d((e) => e - 1));
26
+ C(N, "scheduleUpdate");
27
+ var P = /* @__PURE__ */ C((e) => {
28
+ let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = O.Right, swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = b.useState(null), [u, d] = b.useState(0), f = b.useRef(!1), p = b.useCallback((e) => {
29
+ N(() => l(e));
30
+ }, []), m = b.useCallback(() => {
31
+ N(() => d((e) => e + 1));
32
+ }, []), h = b.useCallback(() => {
33
+ N(() => d((e) => e - 1));
34
34
  }, []);
35
- return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${D}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ (0, C.jsx)(O.Provider, {
35
+ return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${T}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ (0, x.jsx)(E.Provider, {
36
36
  scope: t,
37
- children: /* @__PURE__ */ (0, C.jsx)(N, {
37
+ children: /* @__PURE__ */ (0, x.jsx)(j, {
38
38
  scope: t,
39
39
  label: n,
40
40
  duration: r,
@@ -50,47 +50,47 @@ var I = /* @__PURE__ */ T((e) => {
50
50
  children: s
51
51
  })
52
52
  });
53
- }, "ToastProvider"), L = "ToastViewport", R = ["F8"], z = "toast.viewportPause", B = "toast.viewportResume", V = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
54
- let { __scopeToast: n, hotkey: i = R, label: a = "Notifications ({hotkey})", ...o } = e, s = P(L, n), c = te(n), l = S.useRef(null), u = S.useRef(null), d = S.useRef(null), f = S.useRef(null), p = r(t, f, s.onViewportChange), m = i.join("+").replace(/Key/g, "").replace(/Digit/g, ""), h = s.toastCount > 0;
55
- S.useEffect(() => {
56
- let e = /* @__PURE__ */ T((e) => {
53
+ }, "ToastProvider"), F = "ToastViewport", I = ["F8"], L = "toast.viewportPause", R = "toast.viewportResume", z = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
54
+ let { __scopeToast: n, hotkey: i = I, label: a = "Notifications ({hotkey})", ...o } = e, s = M(F, n), c = re(n), l = b.useRef(null), u = b.useRef(null), d = b.useRef(null), f = b.useRef(null), p = r(t, f, s.onViewportChange), h = i.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = s.toastCount > 0;
55
+ b.useEffect(() => {
56
+ let e = /* @__PURE__ */ C((e) => {
57
57
  i.length !== 0 && i.every((t) => e[t] || e.code === t) && f.current?.focus();
58
58
  }, "handleKeyDown");
59
59
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
60
- }, [i]), S.useEffect(() => {
60
+ }, [i]), b.useEffect(() => {
61
61
  let e = l.current, t = f.current;
62
- if (h && e && t) {
63
- let n = /* @__PURE__ */ T(() => {
62
+ if (g && e && t) {
63
+ let n = /* @__PURE__ */ C(() => {
64
64
  if (!s.isClosePausedRef.current) {
65
- let e = new CustomEvent(z);
65
+ let e = new CustomEvent(L);
66
66
  t.dispatchEvent(e), s.isClosePausedRef.current = !0;
67
67
  }
68
- }, "handlePause"), r = /* @__PURE__ */ T(() => {
68
+ }, "handlePause"), r = /* @__PURE__ */ C(() => {
69
69
  if (s.isClosePausedRef.current) {
70
- let e = new CustomEvent(B);
70
+ let e = new CustomEvent(R);
71
71
  t.dispatchEvent(e), s.isClosePausedRef.current = !1;
72
72
  }
73
- }, "handleResume"), i = /* @__PURE__ */ T((t) => {
73
+ }, "handleResume"), i = /* @__PURE__ */ C((t) => {
74
74
  e.contains(t.relatedTarget) || r();
75
- }, "handleFocusOutResume"), a = /* @__PURE__ */ T(() => {
75
+ }, "handleFocusOutResume"), a = /* @__PURE__ */ C(() => {
76
76
  e.contains(document.activeElement) || r();
77
77
  }, "handlePointerLeaveResume");
78
78
  return e.addEventListener("focusin", n), e.addEventListener("focusout", i), e.addEventListener("pointermove", n), e.addEventListener("pointerleave", a), window.addEventListener("blur", n), window.addEventListener("focus", r), () => {
79
79
  e.removeEventListener("focusin", n), e.removeEventListener("focusout", i), e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", a), window.removeEventListener("blur", n), window.removeEventListener("focus", r);
80
80
  };
81
81
  }
82
- }, [h, s.isClosePausedRef]);
83
- let g = S.useCallback(({ tabbingDirection: e }) => {
82
+ }, [g, s.isClosePausedRef]);
83
+ let _ = b.useCallback(({ tabbingDirection: e }) => {
84
84
  let t = c().map((t) => {
85
- let n = t.ref.current, r = [n, ..._e(n)];
85
+ let n = t.ref.current, r = [n, ...ye(n)];
86
86
  return e === "forwards" ? r : r.reverse();
87
87
  });
88
88
  return (e === "forwards" ? t.reverse() : t).flat();
89
89
  }, [c]);
90
- return S.useEffect(() => {
90
+ return b.useEffect(() => {
91
91
  let e = f.current;
92
92
  if (e) {
93
- let t = /* @__PURE__ */ T((t) => {
93
+ let t = /* @__PURE__ */ C((t) => {
94
94
  let n = t.altKey || t.ctrlKey || t.metaKey;
95
95
  if (t.key === "Tab" && !n) {
96
96
  let n = document.activeElement, r = t.shiftKey;
@@ -98,44 +98,44 @@ var I = /* @__PURE__ */ T((e) => {
98
98
  u.current?.focus();
99
99
  return;
100
100
  }
101
- let i = g({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
102
- Q(i.slice(a + 1)) ? t.preventDefault() : r ? u.current?.focus() : d.current?.focus();
101
+ let i = _({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
102
+ X(i.slice(a + 1)) ? t.preventDefault() : r ? u.current?.focus() : d.current?.focus();
103
103
  }
104
104
  }, "handleKeyDown");
105
105
  return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
106
106
  }
107
- }, [c, g]), /* @__PURE__ */ (0, C.jsxs)(y, {
107
+ }, [c, _]), /* @__PURE__ */ (0, x.jsxs)(m, {
108
108
  ref: l,
109
109
  role: "region",
110
- "aria-label": a.replace("{hotkey}", m),
110
+ "aria-label": a.replace("{hotkey}", h),
111
111
  tabIndex: -1,
112
- style: { pointerEvents: h ? void 0 : "none" },
112
+ style: { pointerEvents: g ? void 0 : "none" },
113
113
  children: [
114
- h && /* @__PURE__ */ (0, C.jsx)(re, {
114
+ g && /* @__PURE__ */ (0, x.jsx)(ae, {
115
115
  ref: u,
116
116
  onFocusFromOutsideViewport: () => {
117
- Q(g({ tabbingDirection: "forwards" }));
117
+ X(_({ tabbingDirection: "forwards" }));
118
118
  }
119
119
  }),
120
- /* @__PURE__ */ (0, C.jsx)(O.Slot, {
120
+ /* @__PURE__ */ (0, x.jsx)(E.Slot, {
121
121
  scope: n,
122
- children: /* @__PURE__ */ (0, C.jsx)(b.ol, {
122
+ children: /* @__PURE__ */ (0, x.jsx)(y.ol, {
123
123
  tabIndex: -1,
124
124
  ...o,
125
125
  ref: p
126
126
  })
127
127
  }),
128
- h && /* @__PURE__ */ (0, C.jsx)(re, {
128
+ g && /* @__PURE__ */ (0, x.jsx)(ae, {
129
129
  ref: d,
130
130
  onFocusFromOutsideViewport: () => {
131
- Q(g({ tabbingDirection: "backwards" }));
131
+ X(_({ tabbingDirection: "backwards" }));
132
132
  }
133
133
  })
134
134
  ]
135
135
  });
136
- }, "ToastViewport")), H = "ToastFocusProxy", re = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
137
- let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = P(H, n);
138
- return /* @__PURE__ */ (0, C.jsx)(o, {
136
+ }, "ToastViewport")), B = "ToastFocusProxy", ae = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
137
+ let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = M(B, n);
138
+ return /* @__PURE__ */ (0, x.jsx)(o, {
139
139
  tabIndex: 0,
140
140
  ...i,
141
141
  ref: t,
@@ -145,309 +145,309 @@ var I = /* @__PURE__ */ T((e) => {
145
145
  a.viewport?.contains(t) || r();
146
146
  }
147
147
  });
148
- }, "ToastFocusProxy")), U = "Toast", ie = "toast.swipeStart", ae = "toast.swipeMove", oe = "toast.swipeCancel", se = "toast.swipeEnd", W = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
148
+ }, "ToastFocusProxy")), V = "Toast", oe = "toast.swipeStart", se = "toast.swipeMove", ce = "toast.swipeCancel", le = "toast.swipeEnd", H = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
149
149
  let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, c] = _({
150
150
  prop: r,
151
151
  defaultProp: i ?? !0,
152
152
  onChange: a,
153
- caller: U
153
+ caller: V
154
154
  });
155
- return /* @__PURE__ */ (0, C.jsx)(v, {
155
+ return /* @__PURE__ */ (0, x.jsx)(v, {
156
156
  present: n || s,
157
- children: /* @__PURE__ */ (0, C.jsx)(ue, {
157
+ children: /* @__PURE__ */ (0, x.jsx)(fe, {
158
158
  open: s,
159
159
  ...o,
160
160
  ref: t,
161
161
  onClose: () => c(!1),
162
- onPause: f(e.onPause),
163
- onResume: f(e.onResume),
164
- onSwipeStart: m(e.onSwipeStart, (e) => {
162
+ onPause: h(e.onPause),
163
+ onResume: h(e.onResume),
164
+ onSwipeStart: g(e.onSwipeStart, (e) => {
165
165
  e.currentTarget.setAttribute("data-swipe", "start");
166
166
  }),
167
- onSwipeMove: m(e.onSwipeMove, (e) => {
167
+ onSwipeMove: g(e.onSwipeMove, (e) => {
168
168
  let { x: t, y: n } = e.detail.delta;
169
169
  e.currentTarget.setAttribute("data-swipe", "move"), e.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${n}px`);
170
170
  }),
171
- onSwipeCancel: m(e.onSwipeCancel, (e) => {
171
+ onSwipeCancel: g(e.onSwipeCancel, (e) => {
172
172
  e.currentTarget.setAttribute("data-swipe", "cancel"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
173
173
  }),
174
- onSwipeEnd: m(e.onSwipeEnd, (e) => {
174
+ onSwipeEnd: g(e.onSwipeEnd, (e) => {
175
175
  let { x: t, y: n } = e.detail.delta;
176
176
  e.currentTarget.setAttribute("data-swipe", "end"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${n}px`), c(!1);
177
177
  })
178
178
  })
179
179
  });
180
- }, "Toast")), [ce, le] = j(U, { onClose() {} }), ue = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
181
- let { __scopeToast: n, type: i = ne.Foreground, duration: a, open: o, onClose: s, onEscapeKeyDown: c, onPause: l, onResume: u, onSwipeStart: d, onSwipeMove: p, onSwipeCancel: h, onSwipeEnd: _, ...v } = e, y = P(U, n), x = te(n), [w, E] = S.useState(null), D = r(t, E), k = S.useRef(null), A = S.useRef(null), j = a || y.duration, M = S.useRef(0), N = S.useRef(j), F = S.useRef(0), { onToastAdd: I, onToastRemove: L } = y, R = f(() => {
182
- w?.contains(document.activeElement) && y.viewport?.focus(), s();
183
- }), V = S.useCallback((e) => {
184
- e && e !== Infinity && (window.clearTimeout(F.current), M.current = (/* @__PURE__ */ new Date()).getTime(), F.current = window.setTimeout(R, e));
185
- }, [R]);
186
- S.useEffect(() => {
187
- let e = y.viewport;
180
+ }, "Toast")), [ue, de] = k(V, { onClose() {} }), fe = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
181
+ let { __scopeToast: n, type: i = ie.Foreground, duration: a, open: o, onClose: s, onEscapeKeyDown: c, onPause: l, onResume: u, onSwipeStart: d, onSwipeMove: f, onSwipeCancel: p, onSwipeEnd: m, ..._ } = e, v = M(V, n), te = re(n), [S, w] = b.useState(null), T = r(t, w), D = b.useRef(null), O = b.useRef(null), k = a || v.duration, A = b.useRef(0), j = b.useRef(k), N = b.useRef(0), { onToastAdd: P, onToastRemove: F } = v, I = h(() => {
182
+ S?.contains(document.activeElement) && v.viewport?.focus(), s();
183
+ }), z = b.useCallback((e) => {
184
+ e && e !== Infinity && (window.clearTimeout(N.current), A.current = (/* @__PURE__ */ new Date()).getTime(), N.current = window.setTimeout(I, e));
185
+ }, [I]);
186
+ b.useEffect(() => {
187
+ let e = v.viewport;
188
188
  if (e) {
189
- let t = /* @__PURE__ */ T(() => {
190
- V(N.current), u?.();
191
- }, "handleResume"), n = /* @__PURE__ */ T(() => {
192
- let e = (/* @__PURE__ */ new Date()).getTime() - M.current;
193
- N.current -= e, window.clearTimeout(F.current), l?.();
189
+ let t = /* @__PURE__ */ C(() => {
190
+ z(j.current), u?.();
191
+ }, "handleResume"), n = /* @__PURE__ */ C(() => {
192
+ let e = (/* @__PURE__ */ new Date()).getTime() - A.current;
193
+ j.current -= e, window.clearTimeout(N.current), l?.();
194
194
  }, "handlePause");
195
- return e.addEventListener(z, n), e.addEventListener(B, t), () => {
196
- e.removeEventListener(z, n), e.removeEventListener(B, t);
195
+ return e.addEventListener(L, n), e.addEventListener(R, t), () => {
196
+ e.removeEventListener(L, n), e.removeEventListener(R, t);
197
197
  };
198
198
  }
199
199
  }, [
200
- y.viewport,
201
- j,
200
+ v.viewport,
201
+ k,
202
202
  l,
203
203
  u,
204
- V
205
- ]), S.useEffect(() => {
206
- N.current = j, o && !y.isClosePausedRef.current && V(j);
204
+ z
205
+ ]), b.useEffect(() => {
206
+ j.current = k, o && !v.isClosePausedRef.current && z(k);
207
207
  }, [
208
208
  o,
209
- j,
210
- y.isClosePausedRef,
211
- V
212
- ]), S.useEffect(() => () => {
213
- window.clearTimeout(F.current);
214
- }, []), S.useEffect(() => (I(), () => L()), [I, L]);
215
- let H = S.useMemo(() => w ? X(w) : null, [w]);
216
- return y.viewport ? /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [H && /* @__PURE__ */ (0, C.jsx)(de, {
209
+ k,
210
+ v.isClosePausedRef,
211
+ z
212
+ ]), b.useEffect(() => () => {
213
+ window.clearTimeout(N.current);
214
+ }, []), b.useEffect(() => (P(), () => F()), [P, F]);
215
+ let B = b.useMemo(() => S ? J(S) : null, [S]);
216
+ return v.viewport ? /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [B && /* @__PURE__ */ (0, x.jsx)(pe, {
217
217
  __scopeToast: n,
218
218
  role: "status",
219
- "aria-live": i === ne.Foreground ? "assertive" : "polite",
220
- children: H
221
- }), /* @__PURE__ */ (0, C.jsx)(ce, {
219
+ "aria-live": i === ie.Foreground ? "assertive" : "polite",
220
+ children: B
221
+ }), /* @__PURE__ */ (0, x.jsx)(ue, {
222
222
  scope: n,
223
- onClose: R,
224
- children: ee.createPortal(/* @__PURE__ */ (0, C.jsx)(O.ItemSlot, {
223
+ onClose: I,
224
+ children: ne.createPortal(/* @__PURE__ */ (0, x.jsx)(E.ItemSlot, {
225
225
  scope: n,
226
- children: /* @__PURE__ */ (0, C.jsx)(g, {
226
+ children: /* @__PURE__ */ (0, x.jsx)(ee, {
227
227
  asChild: !0,
228
- onEscapeKeyDown: m(c, (e) => {
229
- x().some((t) => t.ref.current?.contains(e.target)) || R();
228
+ onEscapeKeyDown: g(c, (e) => {
229
+ te().some((t) => t.ref.current?.contains(e.target)) || I();
230
230
  }),
231
- children: /* @__PURE__ */ (0, C.jsx)(b.li, {
231
+ children: /* @__PURE__ */ (0, x.jsx)(y.li, {
232
232
  tabIndex: 0,
233
233
  "data-state": o ? "open" : "closed",
234
- "data-swipe-direction": y.swipeDirection,
235
- ...v,
236
- ref: D,
234
+ "data-swipe-direction": v.swipeDirection,
235
+ ..._,
236
+ ref: T,
237
237
  style: {
238
238
  userSelect: "none",
239
239
  touchAction: "none",
240
240
  ...e.style
241
241
  },
242
- onKeyDown: m(e.onKeyDown, (e) => {
243
- e.key === "Escape" && (c?.(e.nativeEvent), e.nativeEvent.defaultPrevented || R());
242
+ onKeyDown: g(e.onKeyDown, (e) => {
243
+ e.key === "Escape" && (c?.(e.nativeEvent), e.nativeEvent.defaultPrevented || I());
244
244
  }),
245
- onPointerDown: m(e.onPointerDown, (e) => {
246
- e.button === 0 && (k.current = {
245
+ onPointerDown: g(e.onPointerDown, (e) => {
246
+ e.button === 0 && (D.current = {
247
247
  x: e.clientX,
248
248
  y: e.clientY
249
249
  });
250
250
  }),
251
- onPointerMove: m(e.onPointerMove, (e) => {
252
- if (!k.current) return;
253
- let t = e.clientX - k.current.x, n = e.clientY - k.current.y, r = !!A.current, i = ["left", "right"].includes(y.swipeDirection), a = ["left", "up"].includes(y.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
251
+ onPointerMove: g(e.onPointerMove, (e) => {
252
+ if (!D.current) return;
253
+ let t = e.clientX - D.current.x, n = e.clientY - D.current.y, r = !!O.current, i = ["left", "right"].includes(v.swipeDirection), a = ["left", "up"].includes(v.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
254
254
  x: o,
255
255
  y: s
256
256
  }, u = {
257
257
  originalEvent: e,
258
258
  delta: l
259
259
  };
260
- r ? (A.current = l, Z(ae, p, u, { discrete: !1 })) : me(l, y.swipeDirection, c) ? (A.current = l, Z(ie, d, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (k.current = null);
260
+ r ? (O.current = l, Y(se, f, u, { discrete: !1 })) : ge(l, v.swipeDirection, c) ? (O.current = l, Y(oe, d, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (D.current = null);
261
261
  }),
262
- onPointerUp: m(e.onPointerUp, (e) => {
263
- let t = A.current, n = e.target;
264
- if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), A.current = null, k.current = null, t) {
262
+ onPointerUp: g(e.onPointerUp, (e) => {
263
+ let t = O.current, n = e.target;
264
+ if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), O.current = null, D.current = null, t) {
265
265
  let n = e.currentTarget, r = {
266
266
  originalEvent: e,
267
267
  delta: t
268
268
  };
269
- me(t, y.swipeDirection, y.swipeThreshold) ? Z(se, _, r, { discrete: !0 }) : Z(oe, h, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
269
+ ge(t, v.swipeDirection, v.swipeThreshold) ? Y(le, m, r, { discrete: !0 }) : Y(ce, p, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
270
270
  }
271
271
  })
272
272
  })
273
273
  })
274
- }), y.viewport)
274
+ }), v.viewport)
275
275
  })] }) : null;
276
- }, "ToastImpl")), de = /* @__PURE__ */ T((e) => {
277
- let { __scopeToast: t, children: n, ...r } = e, i = P(U, t), [a, s] = S.useState(!1), [c, l] = S.useState(!1);
278
- return he(() => s(!0)), S.useEffect(() => {
276
+ }, "ToastImpl")), pe = /* @__PURE__ */ C((e) => {
277
+ let { __scopeToast: t, children: n, ...r } = e, i = M(V, t), [a, s] = b.useState(!1), [c, l] = b.useState(!1);
278
+ return _e(() => s(!0)), b.useEffect(() => {
279
279
  let e = window.setTimeout(() => l(!0), 1e3);
280
280
  return () => window.clearTimeout(e);
281
- }, []), c ? null : /* @__PURE__ */ (0, C.jsx)(h, {
281
+ }, []), c ? null : /* @__PURE__ */ (0, x.jsx)(f, {
282
282
  asChild: !0,
283
283
  container: i.announcerContainer || void 0,
284
- children: /* @__PURE__ */ (0, C.jsx)(o, {
284
+ children: /* @__PURE__ */ (0, x.jsx)(o, {
285
285
  ...r,
286
- children: a && /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [
286
+ children: a && /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [
287
287
  i.label,
288
288
  " ",
289
289
  n
290
290
  ] })
291
291
  })
292
292
  });
293
- }, "ToastAnnounce"), G = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
293
+ }, "ToastAnnounce"), U = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
294
294
  let { __scopeToast: n, ...r } = e;
295
- return /* @__PURE__ */ (0, C.jsx)(b.div, {
295
+ return /* @__PURE__ */ (0, x.jsx)(y.div, {
296
296
  ...r,
297
297
  ref: t
298
298
  });
299
- }, "ToastTitle")), K = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
299
+ }, "ToastTitle")), W = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
300
300
  let { __scopeToast: n, ...r } = e;
301
- return /* @__PURE__ */ (0, C.jsx)(b.div, {
301
+ return /* @__PURE__ */ (0, x.jsx)(y.div, {
302
302
  ...r,
303
303
  ref: t
304
304
  });
305
- }, "ToastDescription")), fe = "ToastAction", q = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
305
+ }, "ToastDescription")), me = "ToastAction", G = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
306
306
  let { altText: n, ...r } = e;
307
- return n.trim() ? /* @__PURE__ */ (0, C.jsx)(Y, {
307
+ return n.trim() ? /* @__PURE__ */ (0, x.jsx)(q, {
308
308
  altText: n,
309
309
  asChild: !0,
310
- children: /* @__PURE__ */ (0, C.jsx)(J, {
310
+ children: /* @__PURE__ */ (0, x.jsx)(K, {
311
311
  ...r,
312
312
  ref: t
313
313
  })
314
- }) : (console.error(`Invalid prop \`altText\` supplied to \`${fe}\`. Expected non-empty \`string\`.`), null);
315
- }, "ToastAction")), pe = "ToastClose", J = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
316
- let { __scopeToast: n, ...r } = e, i = le(pe, n);
317
- return /* @__PURE__ */ (0, C.jsx)(Y, {
314
+ }) : (console.error(`Invalid prop \`altText\` supplied to \`${me}\`. Expected non-empty \`string\`.`), null);
315
+ }, "ToastAction")), he = "ToastClose", K = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
316
+ let { __scopeToast: n, ...r } = e, i = de(he, n);
317
+ return /* @__PURE__ */ (0, x.jsx)(q, {
318
318
  asChild: !0,
319
- children: /* @__PURE__ */ (0, C.jsx)(b.button, {
319
+ children: /* @__PURE__ */ (0, x.jsx)(y.button, {
320
320
  type: "button",
321
321
  ...r,
322
322
  ref: t,
323
- onClick: m(e.onClick, i.onClose)
323
+ onClick: g(e.onClick, i.onClose)
324
324
  })
325
325
  });
326
- }, "ToastClose")), Y = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
326
+ }, "ToastClose")), q = /* @__PURE__ */ b.forwardRef(/* @__PURE__ */ C(function(e, t) {
327
327
  let { __scopeToast: n, altText: r, ...i } = e;
328
- return /* @__PURE__ */ (0, C.jsx)(b.div, {
328
+ return /* @__PURE__ */ (0, x.jsx)(y.div, {
329
329
  "data-radix-toast-announce-exclude": "",
330
330
  "data-radix-toast-announce-alt": r || void 0,
331
331
  ...i,
332
332
  ref: t
333
333
  });
334
334
  }, "ToastAnnounceExclude"));
335
- function X(e) {
335
+ function J(e) {
336
336
  let t = [];
337
337
  return Array.from(e.childNodes).forEach((e) => {
338
- if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), ge(e)) {
338
+ if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), ve(e)) {
339
339
  let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
340
340
  if (!n) {
341
341
  if (r) {
342
342
  let n = e.dataset.radixToastAnnounceAlt;
343
343
  n && t.push(n);
344
- } else t.push(...X(e));
344
+ } else t.push(...J(e));
345
345
  }
346
346
  }
347
347
  }), t;
348
348
  }
349
- T(X, "getAnnounceTextContent");
350
- function Z(e, t, n, { discrete: r }) {
349
+ C(J, "getAnnounceTextContent");
350
+ function Y(e, t, n, { discrete: r }) {
351
351
  let i = n.originalEvent.currentTarget, a = new CustomEvent(e, {
352
352
  bubbles: !0,
353
353
  cancelable: !0,
354
354
  detail: n
355
355
  });
356
- t && i.addEventListener(e, t, { once: !0 }), r ? x(i, a) : i.dispatchEvent(a);
356
+ t && i.addEventListener(e, t, { once: !0 }), r ? p(i, a) : i.dispatchEvent(a);
357
357
  }
358
- T(Z, "handleAndDispatchCustomEvent");
359
- var me = /* @__PURE__ */ T((e, t, n = 0) => {
358
+ C(Y, "handleAndDispatchCustomEvent");
359
+ var ge = /* @__PURE__ */ C((e, t, n = 0) => {
360
360
  let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
361
- return t === A.Left || t === A.Right ? a && r > n : !a && i > n;
361
+ return t === O.Left || t === O.Right ? a && r > n : !a && i > n;
362
362
  }, "isDeltaInDirection");
363
- function he(e = () => {}) {
364
- let t = f(e);
365
- p(() => {
363
+ function _e(e = () => {}) {
364
+ let t = h(e);
365
+ d(() => {
366
366
  let e = 0, n = 0;
367
367
  return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
368
368
  window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
369
369
  };
370
370
  }, [t]);
371
371
  }
372
- T(he, "useNextFrame");
373
- function ge(e) {
372
+ C(_e, "useNextFrame");
373
+ function ve(e) {
374
374
  return e.nodeType === e.ELEMENT_NODE;
375
375
  }
376
- T(ge, "isHTMLElement");
377
- function _e(e) {
378
- let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ T((e) => {
376
+ C(ve, "isHTMLElement");
377
+ function ye(e) {
378
+ let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ C((e) => {
379
379
  let t = e.tagName === "INPUT" && e.type === "hidden";
380
380
  return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
381
381
  }, "acceptNode") });
382
382
  for (; n.nextNode();) t.push(n.currentNode);
383
383
  return t;
384
384
  }
385
- T(_e, "getTabbableCandidates");
386
- function Q(e) {
385
+ C(ye, "getTabbableCandidates");
386
+ function X(e) {
387
387
  let t = document.activeElement;
388
388
  return e.some((e) => e === t || (e.focus(), document.activeElement !== t));
389
389
  }
390
- T(Q, "focusFirst");
390
+ C(X, "focusFirst");
391
391
  //#endregion
392
392
  //#region src/components/ui/toast.tsx
393
- var $ = a(), ve = I, ye = S.forwardRef((e, n) => {
394
- let r = (0, $.c)(9), i, a;
393
+ var Z = a(), be = P, Q = b.forwardRef((e, n) => {
394
+ let r = (0, Z.c)(9), i, a;
395
395
  r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
396
396
  let o;
397
397
  r[3] === i ? o = r[4] : (o = t("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:w-fit md:max-w-[420px]", "print:hidden", i), r[3] = i, r[4] = o);
398
398
  let s;
399
- return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(V, {
399
+ return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, x.jsx)(z, {
400
400
  ref: n,
401
401
  className: o,
402
402
  ...a
403
403
  }), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
404
404
  });
405
- ye.displayName = V.displayName;
406
- var be = {
405
+ Q.displayName = z.displayName;
406
+ var xe = {
407
407
  default: "bg-background border forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
408
408
  danger: "group destructive text-(--red-11) border-destructive bg-(--red-1) shadow-md-solid shadow-error forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"
409
- }, xe = n("data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full forced-color-adjust-none", {
410
- variants: { variant: be },
409
+ }, Se = n("data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full forced-color-adjust-none", {
410
+ variants: { variant: xe },
411
411
  defaultVariants: { variant: "default" }
412
412
  });
413
- function Se(e) {
414
- return typeof e == "string" && e in be;
413
+ function Ce(e) {
414
+ return typeof e == "string" && e in xe;
415
415
  }
416
- var Ce = S.forwardRef((e, n) => {
417
- let r = (0, $.c)(11), i, a, o;
416
+ var we = b.forwardRef((e, n) => {
417
+ let r = (0, Z.c)(11), i, a, o;
418
418
  r[0] === e ? (i = r[1], a = r[2], o = r[3]) : ({className: i, variant: o, ...a} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o);
419
- let s = Se(o) ? o : "default", c;
420
- r[4] !== i || r[5] !== s ? (c = t(xe({ variant: s }), "print:hidden", i), r[4] = i, r[5] = s, r[6] = c) : c = r[6];
419
+ let s = Ce(o) ? o : "default", c;
420
+ r[4] !== i || r[5] !== s ? (c = t(Se({ variant: s }), "print:hidden", i), r[4] = i, r[5] = s, r[6] = c) : c = r[6];
421
421
  let l;
422
- return r[7] !== a || r[8] !== n || r[9] !== c ? (l = /* @__PURE__ */ (0, C.jsx)(W, {
422
+ return r[7] !== a || r[8] !== n || r[9] !== c ? (l = /* @__PURE__ */ (0, x.jsx)(H, {
423
423
  ref: n,
424
424
  className: c,
425
425
  ...a
426
426
  }), r[7] = a, r[8] = n, r[9] = c, r[10] = l) : l = r[10], l;
427
427
  });
428
- Ce.displayName = W.displayName;
429
- var we = S.forwardRef((e, n) => {
430
- let r = (0, $.c)(9), i, a;
428
+ we.displayName = H.displayName;
429
+ var Te = b.forwardRef((e, n) => {
430
+ let r = (0, Z.c)(9), i, a;
431
431
  r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
432
432
  let o;
433
433
  r[3] === i ? o = r[4] : (o = t("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus-visible:group-[.destructive]:ring-destructive", "forced-color-adjust-none forced-colors:border-[ButtonText] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText] forced-colors:hover:bg-[Highlight] forced-colors:hover:text-[HighlightText] forced-colors:disabled:border-[GrayText] forced-colors:disabled:text-[GrayText]", i), r[3] = i, r[4] = o);
434
434
  let s;
435
- return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(q, {
435
+ return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, x.jsx)(G, {
436
436
  ref: n,
437
437
  className: o,
438
438
  ...a
439
439
  }), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
440
440
  });
441
- we.displayName = q.displayName;
442
- var Te = S.forwardRef((e, n) => {
443
- let r = (0, $.c)(10), i, a;
441
+ Te.displayName = G.displayName;
442
+ var Ee = b.forwardRef((e, n) => {
443
+ let r = (0, Z.c)(10), i, a;
444
444
  r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
445
445
  let o;
446
446
  r[3] === i ? o = r[4] : (o = t("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600", "forced-colors:text-[CanvasText] forced-colors:hover:text-[CanvasText] forced-colors:group-[.destructive]:text-[CanvasText] forced-colors:hover:group-[.destructive]:text-[CanvasText]", i), r[3] = i, r[4] = o);
447
447
  let s;
448
- r[5] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, C.jsx)(c, { className: "h-4 w-4" }), r[5] = s) : s = r[5];
448
+ r[5] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, x.jsx)(c, { className: "h-4 w-4" }), r[5] = s) : s = r[5];
449
449
  let l;
450
- return r[6] !== a || r[7] !== n || r[8] !== o ? (l = /* @__PURE__ */ (0, C.jsx)(J, {
450
+ return r[6] !== a || r[7] !== n || r[8] !== o ? (l = /* @__PURE__ */ (0, x.jsx)(K, {
451
451
  ref: n,
452
452
  className: o,
453
453
  "toast-close": "",
@@ -455,22 +455,22 @@ var Te = S.forwardRef((e, n) => {
455
455
  children: s
456
456
  }), r[6] = a, r[7] = n, r[8] = o, r[9] = l) : l = r[9], l;
457
457
  });
458
- Te.displayName = J.displayName;
459
- var Ee = S.forwardRef((e, n) => {
460
- let r = (0, $.c)(9), i, a;
458
+ Ee.displayName = K.displayName;
459
+ var De = b.forwardRef((e, n) => {
460
+ let r = (0, Z.c)(9), i, a;
461
461
  r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
462
462
  let o;
463
463
  r[3] === i ? o = r[4] : (o = t("text-sm font-semibold", i), r[3] = i, r[4] = o);
464
464
  let s;
465
- return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(G, {
465
+ return r[5] !== a || r[6] !== n || r[7] !== o ? (s = /* @__PURE__ */ (0, x.jsx)(U, {
466
466
  ref: n,
467
467
  className: o,
468
468
  ...a
469
469
  }), r[5] = a, r[6] = n, r[7] = o, r[8] = s) : s = r[8], s;
470
470
  });
471
- Ee.displayName = G.displayName;
472
- var De = S.forwardRef((e, n) => {
473
- let r = (0, $.c)(13), i, a, o;
471
+ De.displayName = U.displayName;
472
+ var $ = b.forwardRef((e, n) => {
473
+ let r = (0, Z.c)(13), i, a, o;
474
474
  r[0] === e ? (i = r[1], a = r[2], o = r[3]) : ({className: i, onPointerDown: a, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o);
475
475
  let s;
476
476
  r[4] === i ? s = r[5] : (s = t("max-h-48 overflow-auto text-sm opacity-90 whitespace-pre-wrap wrap-break-word select-text cursor-text", i), r[4] = i, r[5] = s);
@@ -479,13 +479,13 @@ var De = S.forwardRef((e, n) => {
479
479
  e.stopPropagation(), a?.(e);
480
480
  }, r[6] = a, r[7] = c);
481
481
  let l;
482
- return r[8] !== o || r[9] !== n || r[10] !== s || r[11] !== c ? (l = /* @__PURE__ */ (0, C.jsx)(K, {
482
+ return r[8] !== o || r[9] !== n || r[10] !== s || r[11] !== c ? (l = /* @__PURE__ */ (0, x.jsx)(W, {
483
483
  ref: n,
484
484
  className: s,
485
485
  onPointerDown: c,
486
486
  ...o
487
487
  }), r[8] = o, r[9] = n, r[10] = s, r[11] = c, r[12] = l) : l = r[12], l;
488
488
  });
489
- De.displayName = K.displayName;
489
+ $.displayName = W.displayName;
490
490
  //#endregion
491
- export { ve as a, De as i, we as n, Ee as o, Te as r, ye as s, Ce as t };
491
+ export { be as a, $ as i, Te as n, De as o, Ee as r, Q as s, we as t };