@mechane-ai/elements 0.12.0 → 0.13.0

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 (48) hide show
  1. package/README.md +15 -0
  2. package/dist/ai.js +167 -140
  3. package/dist/{categorical-values-CTrHn9jH.js → categorical-values-DwobbjBq.js} +2 -2
  4. package/dist/{chart-frame-38ES6kwK.js → chart-frame-DAxsgMyl.js} +1 -1
  5. package/dist/{chart-input-C9fu7f1Q.js → chart-input-B0snxbMH.js} +2 -2
  6. package/dist/charts/cartesian.js +6 -6
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +2 -2
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +2 -2
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-BjV2EFZS.js → code-block-VwrOHz5j.js} +1 -1
  14. package/dist/collections.js +282 -199
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +2 -2
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-C460m-O7.js → content-link-Oj-MtNYi.js} +1 -1
  21. package/dist/content.js +3 -3
  22. package/dist/elements.css +8 -16
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +1 -1
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +1 -1
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/navigation.js +26 -12
  30. package/dist/packages/ai/src/index.d.ts +2 -2
  31. package/dist/packages/ai/src/prompt-input.d.ts +4 -0
  32. package/dist/packages/collections/src/data-table.d.ts +19 -2
  33. package/dist/packages/collections/src/index.d.ts +2 -2
  34. package/dist/packages/feedback/src/async-region.d.ts +15 -9
  35. package/dist/packages/feedback/src/control-placeholders.d.ts +8 -3
  36. package/dist/packages/feedback/src/index.d.ts +2 -3
  37. package/dist/packages/foundations/src/control-styles.d.ts +21 -0
  38. package/dist/packages/foundations/src/tokens.stylex.d.ts +5 -0
  39. package/dist/packages/navigation/src/index.d.ts +2 -2
  40. package/dist/packages/navigation/src/page-navigation.d.ts +5 -0
  41. package/dist/{pierre-tree-DKN2eGlZ.js → pierre-tree-Db1yaDM2.js} +2 -2
  42. package/dist/{src-CI6KtN2w.js → src-B0UTwpOz.js} +339 -364
  43. package/dist/{src-3gzujMhN.js → src-BNlyCwOr.js} +21 -7
  44. package/dist/{src-DOzle5d4.js → src-DMsnWyru.js} +155 -170
  45. package/dist/tokens.js +8 -4
  46. package/package.json +1 -1
  47. package/packages/foundations/src/tokens.stylex.ts +2 -0
  48. package/dist/packages/feedback/src/loading.d.ts +0 -7
@@ -1,41 +1,41 @@
1
- import { O as e, i as t, s as n } from "./src-3gzujMhN.js";
2
- import { controls as r, layers as i, spacing as a } from "./tokens.js";
3
- import { t as o } from "./accessibility-C-aIZ1Yx.js";
4
- import { mergeProps as s } from "@base-ui/react/merge-props";
5
- import * as c from "@stylexjs/stylex";
6
- import l, { createContext as ee, useContext as u, useEffect as d, useState as f } from "react";
7
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
- import { Box as h, CircleCheck as g, CircleX as _, Info as v, LoaderCircle as y, TriangleAlert as b, X as te } from "lucide-react";
9
- import { Meter as x } from "@base-ui/react/meter";
10
- import { Progress as S } from "@base-ui/react/progress";
11
- import C from "react-dom";
1
+ import { O as e, i as t, s as n } from "./src-BNlyCwOr.js";
2
+ import { controls as r, layers as i, loading as a, spacing as o } from "./tokens.js";
3
+ import { t as s } from "./accessibility-C-aIZ1Yx.js";
4
+ import { mergeProps as c } from "@base-ui/react/merge-props";
5
+ import * as l from "@stylexjs/stylex";
6
+ import u, { createContext as d, useContext as f, useEffect as p, useRef as m, useState as h } from "react";
7
+ import { Fragment as ee, jsx as g, jsxs as _ } from "react/jsx-runtime";
8
+ import { Box as v, CircleCheck as y, CircleX as b, Info as te, LoaderCircle as x, TriangleAlert as S, X as C } from "lucide-react";
9
+ import { Meter as w } from "@base-ui/react/meter";
10
+ import { Progress as T } from "@base-ui/react/progress";
11
+ import E from "react-dom";
12
12
  // packages/feedback/src/feedback.tsx
13
- function w({ title: e, children: r, action: i, ...a }) {
14
- return /* @__PURE__ */ m("div", {
15
- ...s({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, a),
13
+ function ne({ title: e, children: r, action: i, ...a }) {
14
+ return /* @__PURE__ */ _("div", {
15
+ ...c({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, a),
16
16
  children: [
17
- /* @__PURE__ */ p(h, {
17
+ /* @__PURE__ */ g(v, {
18
18
  size: 22,
19
19
  "aria-hidden": !0,
20
20
  className: "x153jb6y x2lah0s"
21
21
  }),
22
- /* @__PURE__ */ p(n, { children: e }),
23
- r != null && /* @__PURE__ */ p(t, { children: r }),
24
- i != null && /* @__PURE__ */ p("div", {
22
+ /* @__PURE__ */ g(n, { children: e }),
23
+ r != null && /* @__PURE__ */ g(t, { children: r }),
24
+ i != null && /* @__PURE__ */ g("div", {
25
25
  className: "x78zum5 xl56j7k x1a02dak x1hnptsi xeuugli x193iq5w",
26
26
  children: i
27
27
  })
28
28
  ]
29
29
  });
30
30
  }
31
- function T({ error: e = !1, ...t }) {
32
- return /* @__PURE__ */ p("div", { ...s({ role: e ? "alert" : "status" }, {
31
+ function re({ error: e = !1, ...t }) {
32
+ return /* @__PURE__ */ g("div", { ...c({ role: e ? "alert" : "status" }, {
33
33
  0: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi x1dqe72f x1f9ixgr xj0a0fe" },
34
34
  1: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi xj0a0fe xr5kp14 xcqwzn" }
35
35
  }[!!e | 0], t) });
36
36
  }
37
37
  // packages/feedback/src/skeleton.tsx
38
- var E = {
38
+ var D = {
39
39
  skeleton: {
40
40
  k1xSpc: "x1lliihq",
41
41
  ks0D6T: "x193iq5w",
@@ -73,50 +73,50 @@ var E = {
73
73
  k7Eaqz: "xeuugli",
74
74
  $$css: !0
75
75
  }
76
- }, ne = {
77
- rectangle: E.rectangle,
78
- circle: E.circle
76
+ }, O = {
77
+ rectangle: D.rectangle,
78
+ circle: D.circle
79
79
  };
80
- function D({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
81
- return /* @__PURE__ */ p("span", {
80
+ function k({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
81
+ return /* @__PURE__ */ g("span", {
82
82
  "aria-hidden": !0,
83
- ...c.props(E.skeleton, E.dimensions(e, t), ne[n])
83
+ ...l.props(D.skeleton, D.dimensions(e, t), O[n])
84
84
  });
85
85
  }
86
- function O({ lines: e = 1, width: t = "100%" }) {
87
- return /* @__PURE__ */ p("span", {
86
+ function A({ lines: e = 1, width: t = "100%" }) {
87
+ return /* @__PURE__ */ g("span", {
88
88
  "aria-hidden": !0,
89
- ...c.props(E.text, E.width(t)),
90
- children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ p("span", {
89
+ ...l.props(D.text, D.width(t)),
90
+ children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ g("span", {
91
91
  className: "x78zum5 x6s0dn4 xg2ss61",
92
- children: /* @__PURE__ */ p(D, {
92
+ children: /* @__PURE__ */ g(k, {
93
93
  width: e > 1 && n === e - 1 ? "65%" : "100%",
94
94
  height: "0.6em"
95
95
  })
96
96
  }, `placeholder-${n}`))
97
97
  });
98
98
  }
99
- function k({ label: e, showLabel: t = !1 }) {
100
- return /* @__PURE__ */ m("span", {
99
+ function j({ label: e, showLabel: t = !1 }) {
100
+ return /* @__PURE__ */ _("span", {
101
101
  role: "status",
102
102
  className: "x3nfvp2 x1n2onr6 x6s0dn4 xeuugli x193iq5w x1hnptsi x153jb6y x1hz01jw xtqrqnz x1778rvt xj57cvi xj0a0fe",
103
- children: [/* @__PURE__ */ p(y, {
103
+ children: [/* @__PURE__ */ g(x, {
104
104
  "aria-hidden": !0,
105
105
  className: "xtwnzbg x18utl2x x2lah0s"
106
- }), /* @__PURE__ */ p("span", {
107
- ...c.props(E.label, !t && o.hidden),
106
+ }), /* @__PURE__ */ g("span", {
107
+ ...l.props(D.label, !t && s.hidden),
108
108
  children: e
109
109
  })]
110
110
  });
111
111
  }
112
112
  // packages/feedback/src/control-placeholders.tsx
113
- var A = {
113
+ var M = {
114
114
  ks0D6T: "x193iq5w",
115
115
  $$css: !0
116
- }, re = {
116
+ }, N = {
117
117
  kZKoxP: "x16ye13r",
118
118
  $$css: !0
119
- }, j = {
119
+ }, P = {
120
120
  button: {
121
121
  kWkggS: "x1r7kqkb",
122
122
  kXLuUW: "xxymvpz",
@@ -128,220 +128,173 @@ var A = {
128
128
  $$css: !0
129
129
  },
130
130
  width: (e) => [
131
- A,
131
+ M,
132
132
  {
133
133
  kzqmXN: e == null ? e : "x5lhr3w",
134
134
  $$css: !0
135
135
  },
136
136
  { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
137
137
  ],
138
- rows: (e) => [re, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${r.paddingBlock} + 2px)`) }]
138
+ rows: (e) => [N, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${r.paddingBlock} + 2px)`) }]
139
139
  };
140
- function M({ width: t = "7ch", xstyle: n }) {
141
- return /* @__PURE__ */ p("span", {
140
+ function F({ width: t = "7ch", icon: n = !1, xstyle: i }) {
141
+ return /* @__PURE__ */ g("span", {
142
142
  "aria-hidden": !0,
143
- ...c.props(e.base, e.button, j.button, n),
144
- children: /* @__PURE__ */ p(O, { width: t })
143
+ inert: !0,
144
+ ...l.props(e.base, e.button, n && e.iconButton, P.button, i),
145
+ children: n ? /* @__PURE__ */ g(k, {
146
+ width: r.iconSize,
147
+ height: r.iconSize
148
+ }) : /* @__PURE__ */ g(A, { width: t })
145
149
  });
146
150
  }
147
- function N({ label: t, hint: n, multiline: r = !1, rows: i = 4, width: a = "100%", xstyle: o }) {
151
+ function I({ label: t, hint: n, multiline: r = !1, rows: i = 4, width: a = "100%", xstyle: o }) {
148
152
  let s = r ? Math.min(i, 6) : 1;
149
- return /* @__PURE__ */ m("div", {
153
+ return /* @__PURE__ */ _("div", {
150
154
  "aria-hidden": !0,
151
- ...c.props(e.fieldRoot, j.width(a), o),
155
+ ...l.props(e.fieldRoot, P.width(a), o),
152
156
  children: [
153
- t !== void 0 && /* @__PURE__ */ p("span", {
154
- ...c.props(e.label),
157
+ t !== void 0 && /* @__PURE__ */ g("span", {
158
+ ...l.props(e.label),
155
159
  children: t
156
160
  }),
157
- /* @__PURE__ */ p("div", {
158
- ...c.props(e.base, e.field, !r && j.singleLine, r && e.textarea, r && j.rows(i)),
159
- children: /* @__PURE__ */ p(O, {
161
+ /* @__PURE__ */ g("div", {
162
+ ...l.props(e.base, e.field, !r && P.singleLine, r && e.textarea, r && P.rows(i)),
163
+ children: /* @__PURE__ */ g(A, {
160
164
  width: "60%",
161
165
  lines: s
162
166
  })
163
167
  }),
164
- n !== void 0 && /* @__PURE__ */ p("span", {
165
- ...c.props(e.description),
168
+ n !== void 0 && /* @__PURE__ */ g("span", {
169
+ ...l.props(e.description),
166
170
  children: n
167
171
  })
168
172
  ]
169
173
  });
170
174
  }
171
- // packages/feedback/src/loading.tsx
172
- function P({ label: e, shape: t = "rows" }) {
173
- return /* @__PURE__ */ m("div", {
174
- role: "status",
175
- className: "xeuugli x1n2onr6",
176
- children: [/* @__PURE__ */ p("span", {
177
- ...c.props(o.hidden),
178
- children: e
179
- }), t === "rows" ? /* @__PURE__ */ m("div", {
180
- "aria-hidden": !0,
181
- children: [/* @__PURE__ */ p("div", {
182
- className: "xrvj5dj x18zg5m9 x6s0dn4 x9f619 x1hyy85k xso031l x1q0q8m5 x1qndepd",
183
- children: /* @__PURE__ */ p("div", {
184
- className: "xeuugli x1m92p3w",
185
- children: /* @__PURE__ */ p(D, { width: 54 })
186
- })
187
- }), [
188
- 0,
189
- 1,
190
- 2
191
- ].map((e) => /* @__PURE__ */ m("div", {
192
- className: "xrvj5dj x18zg5m9 x6s0dn4 xb4ss6y x9f619",
193
- children: [
194
- /* @__PURE__ */ p("div", {
195
- className: "xeuugli x1m92p3w",
196
- children: /* @__PURE__ */ p(D, { width: e === 1 ? 108 : 174 })
197
- }),
198
- /* @__PURE__ */ p("div", {
199
- className: "xeuugli x1m92p3w",
200
- children: /* @__PURE__ */ p(D, { width: 54 })
201
- }),
202
- /* @__PURE__ */ p("div", {
203
- className: "xeuugli x1m92p3w",
204
- children: /* @__PURE__ */ p(D, { width: 108 })
205
- })
206
- ]
207
- }, e))]
208
- }) : /* @__PURE__ */ m("div", {
209
- "aria-hidden": !0,
210
- className: "xrvj5dj xaml1ju x1ydxw8w",
211
- children: [
212
- /* @__PURE__ */ p(D, {
213
- width: 216,
214
- height: 24
215
- }),
216
- /* @__PURE__ */ p(D, { width: 174 }),
217
- /* @__PURE__ */ p(D, { width: 108 })
218
- ]
219
- })]
220
- });
221
- }
222
175
  // packages/feedback/src/progress.tsx
223
- function F({ label: e, value: t, max: n, valueLabel: r }) {
224
- return /* @__PURE__ */ m(S.Root, {
176
+ function ie({ label: e, value: t, max: n, valueLabel: r }) {
177
+ return /* @__PURE__ */ _(T.Root, {
225
178
  value: t,
226
179
  max: n,
227
180
  locale: "en-US",
228
181
  getAriaValueText: () => r,
229
182
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
230
- children: [/* @__PURE__ */ m("div", {
183
+ children: [/* @__PURE__ */ _("div", {
231
184
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
232
- children: [/* @__PURE__ */ p(S.Label, {
185
+ children: [/* @__PURE__ */ g(T.Label, {
233
186
  className: "xeuugli x193iq5w",
234
187
  children: e
235
- }), /* @__PURE__ */ p("span", {
188
+ }), /* @__PURE__ */ g("span", {
236
189
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
237
190
  children: r
238
191
  })]
239
- }), /* @__PURE__ */ p(S.Track, {
192
+ }), /* @__PURE__ */ g(T.Track, {
240
193
  ...{
241
194
  0: { className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr" },
242
195
  1: { className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619" }
243
196
  }[t === null | 0],
244
- children: t !== null && /* @__PURE__ */ p(S.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
197
+ children: t !== null && /* @__PURE__ */ g(T.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
245
198
  })]
246
199
  });
247
200
  }
248
- function I({ label: e, value: t, max: n, valueLabel: r }) {
249
- return t === null ? /* @__PURE__ */ m("div", {
201
+ function L({ label: e, value: t, max: n, valueLabel: r }) {
202
+ return t === null ? /* @__PURE__ */ _("div", {
250
203
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
251
- children: [/* @__PURE__ */ m("div", {
204
+ children: [/* @__PURE__ */ _("div", {
252
205
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
253
- children: [/* @__PURE__ */ p("span", {
206
+ children: [/* @__PURE__ */ g("span", {
254
207
  className: "xeuugli x193iq5w",
255
208
  children: e
256
- }), /* @__PURE__ */ p("span", {
209
+ }), /* @__PURE__ */ g("span", {
257
210
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
258
211
  children: r
259
212
  })]
260
- }), /* @__PURE__ */ p("div", {
213
+ }), /* @__PURE__ */ g("div", {
261
214
  "aria-hidden": !0,
262
215
  className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619"
263
216
  })]
264
- }) : /* @__PURE__ */ m(x.Root, {
217
+ }) : /* @__PURE__ */ _(w.Root, {
265
218
  value: t,
266
219
  max: n,
267
220
  locale: "en-US",
268
221
  getAriaValueText: () => r,
269
222
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
270
- children: [/* @__PURE__ */ m("div", {
223
+ children: [/* @__PURE__ */ _("div", {
271
224
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
272
- children: [/* @__PURE__ */ p(x.Label, {
225
+ children: [/* @__PURE__ */ g(w.Label, {
273
226
  className: "xeuugli x193iq5w",
274
227
  children: e
275
- }), /* @__PURE__ */ p("span", {
228
+ }), /* @__PURE__ */ g("span", {
276
229
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
277
230
  children: r
278
231
  })]
279
- }), /* @__PURE__ */ p(x.Track, {
232
+ }), /* @__PURE__ */ g(w.Track, {
280
233
  className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr",
281
- children: /* @__PURE__ */ p(x.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
234
+ children: /* @__PURE__ */ g(w.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
282
235
  })]
283
236
  });
284
237
  }
285
238
  // ../../../node_modules/.pnpm/sonner@2.0.8_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/sonner/dist/index.mjs
286
- var ie = (e) => {
239
+ var ae = (e) => {
287
240
  switch (e) {
288
- case "success": return L;
289
- case "info": return R;
290
- case "warning": return se;
241
+ case "success": return ce;
242
+ case "info": return le;
243
+ case "warning": return R;
291
244
  case "error": return z;
292
245
  default: return null;
293
246
  }
294
- }, ae = Array(12).fill(0), oe = ({ visible: e, className: t }) => /*#__PURE__*/ l.createElement("div", {
247
+ }, oe = Array(12).fill(0), se = ({ visible: e, className: t }) => /*#__PURE__*/ u.createElement("div", {
295
248
  className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
296
249
  "data-visible": e
297
- }, /*#__PURE__*/ l.createElement("div", { className: "sonner-spinner" }, ae.map((e, t) => /*#__PURE__*/ l.createElement("div", {
250
+ }, /*#__PURE__*/ u.createElement("div", { className: "sonner-spinner" }, oe.map((e, t) => /*#__PURE__*/ u.createElement("div", {
298
251
  className: "sonner-loading-bar",
299
252
  key: `spinner-bar-${t}`
300
- })))), L = /*#__PURE__*/ l.createElement("svg", {
253
+ })))), ce = /*#__PURE__*/ u.createElement("svg", {
301
254
  xmlns: "http://www.w3.org/2000/svg",
302
255
  viewBox: "0 0 20 20",
303
256
  fill: "currentColor",
304
257
  height: "20",
305
258
  width: "20",
306
259
  "aria-hidden": "true"
307
- }, /*#__PURE__*/ l.createElement("path", {
260
+ }, /*#__PURE__*/ u.createElement("path", {
308
261
  fillRule: "evenodd",
309
262
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
310
263
  clipRule: "evenodd"
311
- })), se = /*#__PURE__*/ l.createElement("svg", {
264
+ })), R = /*#__PURE__*/ u.createElement("svg", {
312
265
  xmlns: "http://www.w3.org/2000/svg",
313
266
  viewBox: "0 0 24 24",
314
267
  fill: "currentColor",
315
268
  height: "20",
316
269
  width: "20",
317
270
  "aria-hidden": "true"
318
- }, /*#__PURE__*/ l.createElement("path", {
271
+ }, /*#__PURE__*/ u.createElement("path", {
319
272
  fillRule: "evenodd",
320
273
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
321
274
  clipRule: "evenodd"
322
- })), R = /*#__PURE__*/ l.createElement("svg", {
275
+ })), le = /*#__PURE__*/ u.createElement("svg", {
323
276
  xmlns: "http://www.w3.org/2000/svg",
324
277
  viewBox: "0 0 20 20",
325
278
  fill: "currentColor",
326
279
  height: "20",
327
280
  width: "20",
328
281
  "aria-hidden": "true"
329
- }, /*#__PURE__*/ l.createElement("path", {
282
+ }, /*#__PURE__*/ u.createElement("path", {
330
283
  fillRule: "evenodd",
331
284
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
332
285
  clipRule: "evenodd"
333
- })), z = /*#__PURE__*/ l.createElement("svg", {
286
+ })), z = /*#__PURE__*/ u.createElement("svg", {
334
287
  xmlns: "http://www.w3.org/2000/svg",
335
288
  viewBox: "0 0 20 20",
336
289
  fill: "currentColor",
337
290
  height: "20",
338
291
  width: "20",
339
292
  "aria-hidden": "true"
340
- }, /*#__PURE__*/ l.createElement("path", {
293
+ }, /*#__PURE__*/ u.createElement("path", {
341
294
  fillRule: "evenodd",
342
295
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
343
296
  clipRule: "evenodd"
344
- })), ce = /*#__PURE__*/ l.createElement("svg", {
297
+ })), ue = /*#__PURE__*/ u.createElement("svg", {
345
298
  xmlns: "http://www.w3.org/2000/svg",
346
299
  width: "12",
347
300
  height: "12",
@@ -352,25 +305,25 @@ var ie = (e) => {
352
305
  strokeLinecap: "round",
353
306
  strokeLinejoin: "round",
354
307
  "aria-hidden": "true"
355
- }, /*#__PURE__*/ l.createElement("line", {
308
+ }, /*#__PURE__*/ u.createElement("line", {
356
309
  x1: "18",
357
310
  y1: "6",
358
311
  x2: "6",
359
312
  y2: "18"
360
- }), /*#__PURE__*/ l.createElement("line", {
313
+ }), /*#__PURE__*/ u.createElement("line", {
361
314
  x1: "6",
362
315
  y1: "6",
363
316
  x2: "18",
364
317
  y2: "18"
365
- })), le = () => {
366
- let [e, t] = l.useState(document.hidden);
367
- return l.useEffect(() => {
318
+ })), de = () => {
319
+ let [e, t] = u.useState(document.hidden);
320
+ return u.useEffect(() => {
368
321
  let e = () => {
369
322
  t(document.hidden);
370
323
  };
371
324
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
372
325
  }, []), e;
373
- }, B = 1, V = 100, ue = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : B++, H = new class {
326
+ }, fe = 1, pe = 100, B = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : fe++, V = new class {
374
327
  constructor() {
375
328
  this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
376
329
  let t = this.subscribers.indexOf(e);
@@ -380,10 +333,10 @@ var ie = (e) => {
380
333
  }, this.addToast = (e) => {
381
334
  this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
382
335
  }, this.trimHistory = () => {
383
- let e = this.toasts.length - V;
336
+ let e = this.toasts.length - pe;
384
337
  e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
385
338
  }, this.create = (e) => {
386
- let { message: t, ...n } = e, r = ue(e), i = this.pendingDismissals.get(r);
339
+ let { message: t, ...n } = e, r = B(e), i = this.pendingDismissals.get(r);
387
340
  i !== void 0 && (cancelAnimationFrame(i), this.pendingDismissals.delete(r), this.dismissedToasts.delete(r));
388
341
  let a = this.dismissedToasts.has(r), o = e.dismissible === void 0 || e.dismissible;
389
342
  return a && (this.dismissedToasts.delete(r), this.toasts = this.toasts.filter((e) => e.id !== r)), !a && this.toasts.find((e) => e.id === r) ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
@@ -453,14 +406,14 @@ var ie = (e) => {
453
406
  description: typeof t.description == "function" ? void 0 : t.description
454
407
  }));
455
408
  let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
456
- if (a = ["resolve", e], l.isValidElement(e)) i = !1, this.create({
409
+ if (a = ["resolve", e], u.isValidElement(e)) i = !1, this.create({
457
410
  id: n,
458
411
  type: "default",
459
412
  message: e
460
413
  });
461
- else if (de(e) && !e.ok) {
414
+ else if (me(e) && !e.ok) {
462
415
  i = !1;
463
- let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !l.isValidElement(r) ? r : { message: r };
416
+ let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !u.isValidElement(r) ? r : { message: r };
464
417
  this.create({
465
418
  id: n,
466
419
  type: "error",
@@ -469,7 +422,7 @@ var ie = (e) => {
469
422
  });
470
423
  } else if (e instanceof Error) {
471
424
  i = !1;
472
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !l.isValidElement(r) ? r : { message: r };
425
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !u.isValidElement(r) ? r : { message: r };
473
426
  this.create({
474
427
  id: n,
475
428
  type: "error",
@@ -478,7 +431,7 @@ var ie = (e) => {
478
431
  });
479
432
  } else if (t.success !== void 0) {
480
433
  i = !1;
481
- let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !l.isValidElement(r) ? r : { message: r };
434
+ let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !u.isValidElement(r) ? r : { message: r };
482
435
  this.create({
483
436
  id: n,
484
437
  type: "success",
@@ -489,7 +442,7 @@ var ie = (e) => {
489
442
  }).catch(async (e) => {
490
443
  if (a = ["reject", e], t.error !== void 0) {
491
444
  i = !1;
492
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !l.isValidElement(r) ? r : { message: r };
445
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !u.isValidElement(r) ? r : { message: r };
493
446
  this.create({
494
447
  id: n,
495
448
  type: "error",
@@ -502,7 +455,7 @@ var ie = (e) => {
502
455
  }), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
503
456
  return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
504
457
  }, this.custom = (e, t) => {
505
- let n = ue(t);
458
+ let n = B(t);
506
459
  return this.create({
507
460
  ...t,
508
461
  jsx: e(n),
@@ -511,53 +464,53 @@ var ie = (e) => {
511
464
  }), n;
512
465
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
513
466
  }
514
- }(), U = (e, t) => H.message(e, t), de = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", W = Object.assign(U, {
515
- success: H.success,
516
- info: H.info,
517
- warning: H.warning,
518
- error: H.error,
519
- custom: H.custom,
520
- message: H.message,
521
- promise: H.promise,
522
- dismiss: H.dismiss,
523
- loading: H.loading
467
+ }(), H = (e, t) => V.message(e, t), me = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", he = Object.assign(H, {
468
+ success: V.success,
469
+ info: V.info,
470
+ warning: V.warning,
471
+ error: V.error,
472
+ custom: V.custom,
473
+ message: V.message,
474
+ promise: V.promise,
475
+ dismiss: V.dismiss,
476
+ loading: V.loading
524
477
  }, {
525
- getHistory: () => H.toasts,
526
- getToasts: () => H.getActiveToasts()
478
+ getHistory: () => V.toasts,
479
+ getToasts: () => V.getActiveToasts()
527
480
  });
528
- function G(e) {
481
+ function U(e) {
529
482
  return e.label !== void 0;
530
483
  }
531
- var fe = 3, pe = "24px", K = "16px", me = 4e3, he = 356, ge = 14, _e = 45, ve = 200;
484
+ var W = 3, ge = "24px", _e = "16px", ve = 4e3, G = 356, K = 14, ye = 45, be = 200;
532
485
  function q(...e) {
533
486
  return e.filter(Boolean).join(" ");
534
487
  }
535
- function ye(e) {
488
+ function xe(e) {
536
489
  let [t, n] = e.split("-"), r = [];
537
490
  return t && r.push(t), n && r.push(n), r;
538
491
  }
539
- var J = (e) => {
540
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: ee, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = l.useState(null), [ne, D] = l.useState(null), [O, k] = l.useState(!1), [A, re] = l.useState(!1), [j, M] = l.useState(!1), [N, P] = l.useState(!1), [F, I] = l.useState(!1), [ae, L] = l.useState(0), [se, R] = l.useState(0), z = l.useRef(n.duration || y || me), B = l.useRef(null), V = l.useRef(null), ue = c === 0, H = c + 1 <= o, U = n.type, de = U ?? "default", W = n.dismissible !== !1, fe = n.className || "", pe = n.descriptionClassName || "", K = l.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), he = l.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), ge = l.useMemo(() => n.duration || y || me, [n.duration, y]), J = l.useRef(0), Y = l.useRef(0), be = l.useRef(0), X = l.useRef(null), [xe, Se] = b.split("-"), Z = l.useMemo(() => s.reduce((e, t, n) => n >= K ? e : e + t.height, 0), [s, K]), Ce = le(), Q = l.useMemo(() => e.swipeDirections ?? ye(b), [e.swipeDirections, b]), we = n.invert || t, Te = U === "loading";
541
- Y.current = l.useMemo(() => K * te + Z, [K, Z]), l.useEffect(() => {
542
- z.current = ge;
543
- }, [ge]), l.useEffect(() => {
544
- k(!0);
545
- }, []), l.useEffect(() => {
546
- let e = V.current;
492
+ var Se = (e) => {
493
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: d, removeToast: f, defaultRichColors: p, closeButton: m, style: h, cancelButtonStyle: ee, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = u.useState(null), [ne, re] = u.useState(null), [D, O] = u.useState(!1), [k, A] = u.useState(!1), [j, M] = u.useState(!1), [N, P] = u.useState(!1), [F, I] = u.useState(!1), [ie, L] = u.useState(0), [oe, ce] = u.useState(0), R = u.useRef(n.duration || y || ve), le = u.useRef(null), z = u.useRef(null), fe = c === 0, pe = c + 1 <= o, B = n.type, V = B ?? "default", H = n.dismissible !== !1, me = n.className || "", he = n.descriptionClassName || "", W = u.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = u.useMemo(() => n.closeButton ?? m, [n.closeButton, m]), _e = u.useMemo(() => n.duration || y || ve, [n.duration, y]), G = u.useRef(0), K = u.useRef(0), Se = u.useRef(0), J = u.useRef(null), [Ce, we] = b.split("-"), Te = u.useMemo(() => s.reduce((e, t, n) => n >= W ? e : e + t.height, 0), [s, W]), Y = de(), X = u.useMemo(() => e.swipeDirections ?? xe(b), [e.swipeDirections, b]), Z = n.invert || t, Q = B === "loading";
494
+ K.current = u.useMemo(() => W * te + Te, [W, Te]), u.useEffect(() => {
495
+ R.current = _e;
496
+ }, [_e]), u.useEffect(() => {
497
+ O(!0);
498
+ }, []), u.useEffect(() => {
499
+ let e = z.current;
547
500
  if (e) {
548
501
  let t = e.getBoundingClientRect().height;
549
- return R(t), a((e) => [{
502
+ return ce(t), a((e) => [{
550
503
  toastId: n.id,
551
504
  height: t,
552
505
  position: n.position
553
506
  }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
554
507
  }
555
- }, [a, n.id]), l.useLayoutEffect(() => {
556
- if (!O) return;
557
- let e = V.current, t = e.style.height;
508
+ }, [a, n.id]), u.useLayoutEffect(() => {
509
+ if (!D) return;
510
+ let e = z.current, t = e.style.height;
558
511
  e.style.height = "auto";
559
512
  let r = e.getBoundingClientRect().height;
560
- e.style.height = t, R(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
513
+ e.style.height = t, ce(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
561
514
  ...e,
562
515
  height: r
563
516
  } : e) : [{
@@ -566,7 +519,7 @@ var J = (e) => {
566
519
  position: n.position
567
520
  }, ...e]);
568
521
  }, [
569
- O,
522
+ D,
570
523
  n.title,
571
524
  n.description,
572
525
  a,
@@ -575,173 +528,173 @@ var J = (e) => {
575
528
  n.action,
576
529
  n.cancel
577
530
  ]);
578
- let $ = l.useCallback(() => {
579
- re(!0), L(Y.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
580
- d(n);
581
- }, ve);
531
+ let $ = u.useCallback(() => {
532
+ A(!0), L(K.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
533
+ f(n);
534
+ }, be);
582
535
  }, [
583
536
  n,
584
- d,
537
+ f,
585
538
  a,
586
- Y
539
+ K
587
540
  ]);
588
- l.useEffect(() => {
589
- if (n.promise && U === "loading" || n.duration === Infinity || n.type === "loading") return;
541
+ u.useEffect(() => {
542
+ if (n.promise && B === "loading" || n.duration === Infinity || n.type === "loading") return;
590
543
  let e;
591
- return u || i || Ce ? (() => {
592
- if (be.current < J.current) {
593
- let e = (/* @__PURE__ */ new Date()).getTime() - J.current;
594
- z.current -= e;
544
+ return d || i || Y ? (() => {
545
+ if (Se.current < G.current) {
546
+ let e = (/* @__PURE__ */ new Date()).getTime() - G.current;
547
+ R.current -= e;
595
548
  }
596
- be.current = (/* @__PURE__ */ new Date()).getTime();
597
- })() : z.current !== Infinity && (J.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
549
+ Se.current = (/* @__PURE__ */ new Date()).getTime();
550
+ })() : R.current !== Infinity && (G.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
598
551
  n.onAutoClose == null || n.onAutoClose.call(n, n), $();
599
- }, z.current)), () => clearTimeout(e);
552
+ }, R.current)), () => clearTimeout(e);
600
553
  }, [
601
- u,
554
+ d,
602
555
  i,
603
556
  n,
604
- U,
605
- Ce,
557
+ B,
558
+ Y,
606
559
  $
607
- ]), l.useEffect(() => {
560
+ ]), u.useEffect(() => {
608
561
  n.delete && ($(), n.onDismiss == null || n.onDismiss.call(n, n));
609
562
  }, [$, n.delete]);
610
563
  function Ee() {
611
- return C?.loading ? /*#__PURE__*/ l.createElement("div", {
564
+ return C?.loading ? /*#__PURE__*/ u.createElement("div", {
612
565
  className: q(S?.loader, n?.classNames?.loader, "sonner-loader"),
613
- "data-visible": U === "loading"
614
- }, C.loading) : /*#__PURE__*/ l.createElement(oe, {
566
+ "data-visible": B === "loading"
567
+ }, C.loading) : /*#__PURE__*/ u.createElement(se, {
615
568
  className: q(S?.loader, n?.classNames?.loader),
616
- visible: U === "loading"
569
+ visible: B === "loading"
617
570
  });
618
571
  }
619
- let De = n.icon || C?.[U] || ie(U);
620
- return /*#__PURE__*/ l.createElement("li", {
572
+ let De = n.icon || C?.[B] || ae(B);
573
+ return /*#__PURE__*/ u.createElement("li", {
621
574
  tabIndex: 0,
622
- ref: V,
623
- className: q(_, fe, S?.toast, n?.classNames?.toast, S?.[de], n?.classNames?.[de]),
575
+ ref: z,
576
+ className: q(_, me, S?.toast, n?.classNames?.toast, S?.[V], n?.classNames?.[V]),
624
577
  "data-sonner-toast": "",
625
- "data-rich-colors": n.richColors ?? f,
578
+ "data-rich-colors": n.richColors ?? p,
626
579
  "data-styled": !(n.jsx || n.unstyled || r),
627
- "data-mounted": O,
580
+ "data-mounted": D,
628
581
  "data-promise": !!n.promise,
629
582
  "data-swiped": F,
630
- "data-removed": A,
631
- "data-visible": H,
632
- "data-y-position": xe,
633
- "data-x-position": Se,
583
+ "data-removed": k,
584
+ "data-visible": pe,
585
+ "data-y-position": Ce,
586
+ "data-x-position": we,
634
587
  "data-index": c,
635
- "data-front": ue,
588
+ "data-front": fe,
636
589
  "data-swiping": j,
637
- "data-dismissible": W,
638
- "data-type": U,
639
- "data-invert": we,
590
+ "data-dismissible": H,
591
+ "data-type": B,
592
+ "data-invert": Z,
640
593
  "data-swipe-out": N,
641
594
  "data-swipe-direction": ne,
642
- "data-expanded": !!(u || x && O),
595
+ "data-expanded": !!(d || x && D),
643
596
  "data-testid": n.testId,
644
597
  style: {
645
598
  "--index": c,
646
599
  "--toasts-before": c,
647
- "--z-index": ee.length - c,
648
- "--offset": `${A ? ae : Y.current}px`,
649
- "--initial-height": x ? "auto" : `${se}px`,
650
- ...m,
600
+ "--z-index": l.length - c,
601
+ "--offset": `${k ? ie : K.current}px`,
602
+ "--initial-height": x ? "auto" : `${oe}px`,
603
+ ...h,
651
604
  ...n.style
652
605
  },
653
606
  onDragEnd: () => {
654
- M(!1), E(null), X.current = null;
607
+ M(!1), E(null), J.current = null;
655
608
  },
656
609
  onPointerDown: (e) => {
657
- e.button !== 2 && !Te && W && (B.current = /* @__PURE__ */ new Date(), L(Y.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (M(!0), X.current = {
610
+ e.button !== 2 && !Q && H && (le.current = /* @__PURE__ */ new Date(), L(K.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (M(!0), J.current = {
658
611
  x: e.clientX,
659
612
  y: e.clientY
660
613
  }));
661
614
  },
662
615
  onPointerUp: () => {
663
- if (N || !W) return;
664
- X.current = null;
665
- let e = Number(V.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(V.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - B.current?.getTime(), i = T === "x" ? e : t, a = Math.abs(i) / r;
666
- if ((T === "x" ? Q.includes(e > 0 ? "right" : "left") : Q.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= _e || a > .11)) L(Y.current), n.onDismiss == null || n.onDismiss.call(n, n), D(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), P(!0);
616
+ if (N || !H) return;
617
+ J.current = null;
618
+ let e = Number(z.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(z.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - le.current?.getTime(), i = T === "x" ? e : t, a = Math.abs(i) / r;
619
+ if ((T === "x" ? X.includes(e > 0 ? "right" : "left") : X.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= ye || a > .11)) L(K.current), n.onDismiss == null || n.onDismiss.call(n, n), re(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), P(!0);
667
620
  else {
668
621
  var o, s;
669
- (o = V.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = V.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), I(!1), M(!1), E(null);
622
+ (o = z.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = z.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), I(!1), M(!1), E(null);
670
623
  }
671
624
  },
672
625
  onPointerMove: (e) => {
673
626
  var t, n;
674
- if (!X.current || !W || window.getSelection()?.toString().length > 0) return;
675
- let r = e.clientY - X.current.y, i = e.clientX - X.current.x;
627
+ if (!J.current || !H || window.getSelection()?.toString().length > 0) return;
628
+ let r = e.clientY - J.current.y, i = e.clientX - J.current.x;
676
629
  !T && (Math.abs(i) > 1 || Math.abs(r) > 1) && E(Math.abs(i) > Math.abs(r) ? "x" : "y");
677
630
  let a = {
678
631
  x: 0,
679
632
  y: 0
680
633
  }, o = (e) => 1 / (1.5 + Math.abs(e) / 20);
681
634
  if (T === "y") {
682
- if (Q.includes("top") || Q.includes("bottom")) {
683
- if (Q.includes("top") && r < 0 || Q.includes("bottom") && r > 0) a.y = r;
635
+ if (X.includes("top") || X.includes("bottom")) {
636
+ if (X.includes("top") && r < 0 || X.includes("bottom") && r > 0) a.y = r;
684
637
  else {
685
638
  let e = r * o(r);
686
639
  a.y = Math.abs(e) < Math.abs(r) ? e : r;
687
640
  }
688
641
  }
689
- } else if (T === "x" && (Q.includes("left") || Q.includes("right"))) {
690
- if (Q.includes("left") && i < 0 || Q.includes("right") && i > 0) a.x = i;
642
+ } else if (T === "x" && (X.includes("left") || X.includes("right"))) {
643
+ if (X.includes("left") && i < 0 || X.includes("right") && i > 0) a.x = i;
691
644
  else {
692
645
  let e = i * o(i);
693
646
  a.x = Math.abs(e) < Math.abs(i) ? e : i;
694
647
  }
695
648
  }
696
- (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && I(!0), (t = V.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = V.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
649
+ (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && I(!0), (t = z.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = z.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
697
650
  }
698
- }, he && !n.jsx && U !== "loading" ? /*#__PURE__*/ l.createElement("button", {
651
+ }, ge && !n.jsx && B !== "loading" ? /*#__PURE__*/ u.createElement("button", {
699
652
  "aria-label": w,
700
- "data-disabled": Te,
653
+ "data-disabled": Q,
701
654
  "data-close-button": !0,
702
- onClick: Te || !W ? () => {} : () => {
655
+ onClick: Q || !H ? () => {} : () => {
703
656
  $(), n.onDismiss == null || n.onDismiss.call(n, n);
704
657
  },
705
658
  className: q(S?.closeButton, n?.classNames?.closeButton)
706
- }, C?.close ?? ce) : null, (U || n.icon || n.promise) && n.icon !== null && (C?.[U] !== null || n.icon) ? /*#__PURE__*/ l.createElement("div", {
659
+ }, C?.close ?? ue) : null, (B || n.icon || n.promise) && n.icon !== null && (C?.[B] !== null || n.icon) ? /*#__PURE__*/ u.createElement("div", {
707
660
  "data-icon": "",
708
661
  className: q(S?.icon, n?.classNames?.icon)
709
- }, U === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, U === "loading" ? null : De) : null, /*#__PURE__*/ l.createElement("div", {
662
+ }, B === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, B === "loading" ? null : De) : null, /*#__PURE__*/ u.createElement("div", {
710
663
  "data-content": "",
711
664
  className: q(S?.content, n?.classNames?.content)
712
- }, /*#__PURE__*/ l.createElement("div", {
665
+ }, /*#__PURE__*/ u.createElement("div", {
713
666
  "data-title": "",
714
667
  className: q(S?.title, n?.classNames?.title)
715
- }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ l.createElement("div", {
668
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ u.createElement("div", {
716
669
  "data-description": "",
717
- className: q(v, pe, S?.description, n?.classNames?.description)
718
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ l.isValidElement(n.cancel) ? n.cancel : n.cancel && G(n.cancel) ? /*#__PURE__*/ l.createElement("button", {
670
+ className: q(v, he, S?.description, n?.classNames?.description)
671
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ u.isValidElement(n.cancel) ? n.cancel : n.cancel && U(n.cancel) ? /*#__PURE__*/ u.createElement("button", {
719
672
  "data-button": !0,
720
673
  "data-cancel": !0,
721
- style: n.cancelButtonStyle || h,
674
+ style: n.cancelButtonStyle || ee,
722
675
  onClick: (e) => {
723
- G(n.cancel) && W && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
676
+ U(n.cancel) && H && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
724
677
  },
725
678
  className: q(S?.cancelButton, n?.classNames?.cancelButton)
726
- }, n.cancel.label) : null, /*#__PURE__*/ l.isValidElement(n.action) ? n.action : n.action && G(n.action) ? /*#__PURE__*/ l.createElement("button", {
679
+ }, n.cancel.label) : null, /*#__PURE__*/ u.isValidElement(n.action) ? n.action : n.action && U(n.action) ? /*#__PURE__*/ u.createElement("button", {
727
680
  "data-button": !0,
728
681
  "data-action": !0,
729
682
  style: n.actionButtonStyle || g,
730
683
  onClick: (e) => {
731
- G(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
684
+ U(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
732
685
  },
733
686
  className: q(S?.actionButton, n?.classNames?.actionButton)
734
687
  }, n.action.label) : null);
735
688
  };
736
- function Y() {
689
+ function J() {
737
690
  if (typeof window > "u" || typeof document > "u") return "ltr";
738
691
  let e = document.documentElement.getAttribute("dir");
739
692
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
740
693
  }
741
- function be(e, t) {
694
+ function Ce(e, t) {
742
695
  let n = {};
743
696
  return [e, t].forEach((e, t) => {
744
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? K : pe;
697
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? _e : ge;
745
698
  function o(e) {
746
699
  [
747
700
  "top",
@@ -762,18 +715,18 @@ function be(e, t) {
762
715
  }) : o(a);
763
716
  }), n;
764
717
  }
765
- var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
766
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: ee, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = fe, toastOptions: g, dir: _ = Y(), gap: v = ge, icons: y, customAriaLabel: b, containerAriaLabel: te = "Notifications" } = e, [x, S] = l.useState([]), w = l.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), T = l.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, ne] = l.useState([]), [D, O] = l.useState(!1), [k, A] = l.useState(!1), [re, j] = l.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), M = l.useRef(null), N = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = l.useRef(null), F = l.useRef(!1), I = l.useCallback((e) => {
767
- S((t) => (t.find((t) => t.id === e.id)?.delete || H.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
718
+ var we = /*#__PURE__*/ u.forwardRef(function(e, t) {
719
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: d, theme: f = "light", richColors: p, duration: m, style: h, visibleToasts: ee = W, toastOptions: g, dir: _ = J(), gap: v = K, icons: y, customAriaLabel: b, containerAriaLabel: te = "Notifications" } = e, [x, S] = u.useState([]), C = u.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = u.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, ne] = u.useState([]), [re, D] = u.useState(!1), [O, k] = u.useState(!1), [A, j] = u.useState(f === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : f), M = u.useRef(null), N = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = u.useRef(null), F = u.useRef(!1), I = u.useCallback((e) => {
720
+ S((t) => (t.find((t) => t.id === e.id)?.delete || V.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
768
721
  }, []);
769
- return l.useEffect(() => H.subscribe((e) => {
722
+ return u.useEffect(() => V.subscribe((e) => {
770
723
  e.dismiss ? requestAnimationFrame(() => {
771
724
  S((t) => t.map((t) => t.id === e.id ? {
772
725
  ...t,
773
726
  delete: !0
774
727
  } : t));
775
728
  }) : setTimeout(() => {
776
- C.flushSync(() => {
729
+ E.flushSync(() => {
777
730
  S((t) => {
778
731
  let n = t.findIndex((t) => t.id === e.id);
779
732
  return n === -1 ? [e, ...t] : [
@@ -787,12 +740,12 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
787
740
  });
788
741
  });
789
742
  });
790
- }), []), l.useEffect(() => {
791
- if (d !== "system") {
792
- j(d);
743
+ }), []), u.useEffect(() => {
744
+ if (f !== "system") {
745
+ j(f);
793
746
  return;
794
747
  }
795
- if (d === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? j("dark") : j("light")), typeof window > "u") return;
748
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? j("dark") : j("light")), typeof window > "u") return;
796
749
  let e = window.matchMedia("(prefers-color-scheme: dark)");
797
750
  try {
798
751
  e.addEventListener("change", ({ matches: e }) => {
@@ -807,22 +760,22 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
807
760
  }
808
761
  });
809
762
  }
810
- }, [d]), l.useEffect(() => {
811
- x.length <= 1 && O(!1);
812
- }, [x]), l.useEffect(() => {
763
+ }, [f]), u.useEffect(() => {
764
+ x.length <= 1 && D(!1);
765
+ }, [x]), u.useEffect(() => {
813
766
  let e = (e) => {
814
767
  if (a.length > 0 && a.every((t) => e[t] || e.code === t)) {
815
768
  var t;
816
- O(!0), (t = M.current) == null || t.focus();
769
+ D(!0), (t = M.current) == null || t.focus();
817
770
  }
818
- e.code === "Escape" && (document.activeElement === M.current || M.current?.contains(document.activeElement)) && O(!1);
771
+ e.code === "Escape" && (document.activeElement === M.current || M.current?.contains(document.activeElement)) && D(!1);
819
772
  };
820
773
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
821
- }, [a]), l.useEffect(() => {
774
+ }, [a]), u.useEffect(() => {
822
775
  if (M.current) return () => {
823
776
  P.current && (P.current.focus({ preventScroll: !0 }), P.current = null, F.current = !1);
824
777
  };
825
- }, [M.current]), /*#__PURE__*/ l.createElement("section", {
778
+ }, [M.current]), /*#__PURE__*/ u.createElement("section", {
826
779
  ref: t,
827
780
  "aria-label": b ?? `${te} ${N}`,
828
781
  tabIndex: -1,
@@ -831,24 +784,24 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
831
784
  "aria-atomic": "false",
832
785
  suppressHydrationWarning: !0,
833
786
  "data-react-aria-top-layer": !0
834
- }, T.map((t, n) => {
787
+ }, w.map((t, n) => {
835
788
  let [i, a] = t.split("-");
836
- return w.length ? /*#__PURE__*/ l.createElement("ol", {
789
+ return C.length ? /*#__PURE__*/ u.createElement("ol", {
837
790
  key: t,
838
- dir: _ === "auto" ? Y() : _,
791
+ dir: _ === "auto" ? J() : _,
839
792
  tabIndex: -1,
840
793
  ref: M,
841
794
  className: c,
842
795
  "data-sonner-toaster": !0,
843
- "data-sonner-theme": re,
796
+ "data-sonner-theme": A,
844
797
  "data-y-position": i,
845
798
  "data-x-position": a,
846
799
  style: {
847
- "--front-toast-height": `${E[0]?.height || 0}px`,
848
- "--width": `${he}px`,
800
+ "--front-toast-height": `${T[0]?.height || 0}px`,
801
+ "--width": `${G}px`,
849
802
  "--gap": `${v}px`,
850
- ...m,
851
- ...be(ee, u)
803
+ ...h,
804
+ ...Ce(l, d)
852
805
  },
853
806
  onBlur: (e) => {
854
807
  F.current && !e.currentTarget.contains(e.relatedTarget) && (F.current = !1, P.current &&= (P.current.focus({ preventScroll: !0 }), null));
@@ -856,29 +809,29 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
856
809
  onFocus: (e) => {
857
810
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || F.current || (F.current = !0, P.current = e.relatedTarget);
858
811
  },
859
- onMouseEnter: () => O(!0),
860
- onMouseMove: () => O(!0),
812
+ onMouseEnter: () => D(!0),
813
+ onMouseMove: () => D(!0),
861
814
  onMouseLeave: () => {
862
- k || O(!1);
815
+ O || D(!1);
863
816
  },
864
- onDragEnd: () => O(!1),
817
+ onDragEnd: () => D(!1),
865
818
  onPointerDown: (e) => {
866
- e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || A(!0);
819
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || k(!0);
867
820
  },
868
- onPointerUp: () => A(!1)
869
- }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ l.createElement(J, {
821
+ onPointerUp: () => k(!1)
822
+ }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ u.createElement(Se, {
870
823
  key: n.id,
871
824
  icons: y,
872
825
  index: i,
873
826
  toast: n,
874
- defaultRichColors: f,
875
- duration: g?.duration ?? p,
827
+ defaultRichColors: p,
828
+ duration: g?.duration ?? m,
876
829
  className: g?.className,
877
830
  descriptionClassName: g?.descriptionClassName,
878
831
  invert: r,
879
- visibleToasts: h,
832
+ visibleToasts: ee,
880
833
  closeButton: g?.closeButton ?? s,
881
- interacting: k,
834
+ interacting: O,
882
835
  position: t,
883
836
  style: g?.style,
884
837
  unstyled: g?.unstyled,
@@ -887,20 +840,20 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
887
840
  actionButtonStyle: g?.actionButtonStyle,
888
841
  closeButtonAriaLabel: g?.closeButtonAriaLabel,
889
842
  removeToast: I,
890
- toasts: w.filter((e) => e.position == n.position),
891
- heights: E.filter((e) => e.position == n.position),
843
+ toasts: C.filter((e) => e.position == n.position),
844
+ heights: T.filter((e) => e.position == n.position),
892
845
  setHeights: ne,
893
846
  expandByDefault: o,
894
847
  gap: v,
895
- expanded: D,
848
+ expanded: re,
896
849
  swipeDirections: e.swipeDirections
897
850
  }))) : null;
898
851
  }));
899
852
  });
900
853
  // packages/feedback/src/toast.tsx
901
- function xe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = a.xl, mobileOffset: r = a.lg, ...o }) {
902
- return /* @__PURE__ */ p(X, {
903
- ...o,
854
+ function Te({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = o.xl, mobileOffset: r = o.lg, ...a }) {
855
+ return /* @__PURE__ */ g(we, {
856
+ ...a,
904
857
  className: "x1xzild6 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk",
905
858
  style: {
906
859
  zIndex: i.popup,
@@ -910,27 +863,27 @@ function xe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notificati
910
863
  mobileOffset: r,
911
864
  closeButton: e,
912
865
  icons: {
913
- success: /* @__PURE__ */ p(g, {
866
+ success: /* @__PURE__ */ g(y, {
914
867
  "aria-hidden": !0,
915
868
  className: "xtwnzbg x18utl2x x7zct4q x7ixh4y"
916
869
  }),
917
- error: /* @__PURE__ */ p(_, {
870
+ error: /* @__PURE__ */ g(b, {
918
871
  "aria-hidden": !0,
919
872
  className: "xtwnzbg x18utl2x x7zct4q xr5kp14"
920
873
  }),
921
- warning: /* @__PURE__ */ p(b, {
874
+ warning: /* @__PURE__ */ g(S, {
922
875
  "aria-hidden": !0,
923
876
  className: "xtwnzbg x18utl2x x7zct4q x1f9ixgr"
924
877
  }),
925
- info: /* @__PURE__ */ p(v, {
878
+ info: /* @__PURE__ */ g(te, {
926
879
  "aria-hidden": !0,
927
880
  className: "xtwnzbg x18utl2x x7zct4q x153jb6y"
928
881
  }),
929
- loading: /* @__PURE__ */ p(y, {
882
+ loading: /* @__PURE__ */ g(x, {
930
883
  "aria-hidden": !0,
931
884
  className: "xtwnzbg x18utl2x x7zct4q x153jb6y"
932
885
  }),
933
- close: /* @__PURE__ */ p(te, {
886
+ close: /* @__PURE__ */ g(C, {
934
887
  "aria-hidden": !0,
935
888
  className: "xtwnzbg x18utl2x x7zct4q"
936
889
  })
@@ -954,75 +907,97 @@ function xe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notificati
954
907
  });
955
908
  }
956
909
  // packages/feedback/src/async-region.tsx
957
- var Se = ee(!1);
958
- function Z({ enter: e, fill: t = !1, children: n }) {
959
- let r = u(Se), [i] = f(e && !r), [a, o] = f(i);
960
- return d(() => {
961
- let e = requestAnimationFrame(() => o(!1));
962
- return () => cancelAnimationFrame(e);
963
- }, []), /* @__PURE__ */ p("div", {
910
+ var Y = d(void 0), X = d(!1), Z = a.delaySeconds * 1e3;
911
+ function Q({ identity: e, children: t }) {
912
+ let [n, r] = h(() => ({
913
+ identity: e,
914
+ startedAt: Date.now()
915
+ })), i = n;
916
+ return n.identity !== e && (i = {
917
+ identity: e,
918
+ startedAt: Date.now()
919
+ }, r(i)), /* @__PURE__ */ g(Y, {
920
+ value: i,
921
+ children: t
922
+ });
923
+ }
924
+ function $({ enter: e, children: t }) {
925
+ let n = f(X), [r, i] = h(e && !n), a = m(null);
926
+ return p(() => {
927
+ let e = a.current;
928
+ if (!r || e === null) return;
929
+ let t = !0;
930
+ return Promise.allSettled(e.getAnimations().map((e) => e.finished)).then(() => {
931
+ t && i(!1);
932
+ }), () => {
933
+ t = !1;
934
+ };
935
+ }, [r]), /* @__PURE__ */ g("div", {
936
+ ref: a,
964
937
  ...{
965
- 0: { className: "xeuugli" },
966
- 2: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" },
967
- 1: { className: "xeuugli xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
968
- 3: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xqcmdr3 xcgnenq xwkv4th x1c3o69q" }
969
- }[!!t << 1 | !!i],
970
- children: /* @__PURE__ */ p(Se, {
971
- value: a,
972
- children: n
938
+ 0: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu" },
939
+ 1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 xcgnenq xk4ixfy x1c3o69q" }
940
+ }[!!r | 0],
941
+ children: /* @__PURE__ */ g(X, {
942
+ value: n || r,
943
+ children: t
973
944
  })
974
945
  });
975
946
  }
976
- function Ce({ label: e, placeholder: t, fill: n = !1, startedAt: r, delayMs: i = 0 }) {
977
- let [a] = f(() => r ?? Date.now()), [s, l] = f(i <= 0);
978
- return d(() => {
979
- let e = Math.max(0, i - (Date.now() - a)), t = setTimeout(() => l(!0), e);
947
+ function Ee({ label: e, placeholder: t, startedAt: n }) {
948
+ let [r, i] = h(() => Date.now() - n >= Z ? n : void 0), a = r === n;
949
+ return p(() => {
950
+ let e = Math.max(0, Z - (Date.now() - n)), t = setTimeout(() => i(n), e);
980
951
  return () => clearTimeout(t);
981
- }, [a, i]), /* @__PURE__ */ m("div", {
982
- ...{
983
- 0: { className: "xeuugli" },
984
- 4: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" },
985
- 2: { className: "xeuugli xlshs6z" },
986
- 6: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xlshs6z" },
987
- 1: { className: "xeuugli xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
988
- 5: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
989
- 3: { className: "xeuugli xlshs6z xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
990
- 7: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xlshs6z xqcmdr3 xcgnenq xwkv4th x1c3o69q" }
991
- }[!!n << 2 | !s << 1 | !!s],
992
- children: [s && /* @__PURE__ */ p("span", {
993
- role: "status",
994
- ...c.props(o.hidden),
995
- children: e
996
- }), /* @__PURE__ */ p("div", {
997
- "aria-hidden": "true",
952
+ }, [n]), /* @__PURE__ */ _(ee, { children: [/* @__PURE__ */ g("div", {
953
+ "aria-busy": !0,
954
+ className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
955
+ children: /* @__PURE__ */ g("div", {
956
+ "aria-hidden": !0,
998
957
  inert: !0,
999
958
  ...{
1000
- 0: { className: "xeuugli" },
1001
- 1: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" }
1002
- }[!!n | 0],
959
+ 0: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu x1nked9z" },
960
+ 2: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z x1nked9z" },
961
+ 1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 xcgnenq x1c3o69q x1nked9z" },
962
+ 3: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z xqcmdr3 xcgnenq x1c3o69q x1nked9z" }
963
+ }[!a << 1 | !!a],
1003
964
  children: t
1004
- })]
1005
- });
965
+ })
966
+ }), a && /* @__PURE__ */ g("span", {
967
+ role: "status",
968
+ ...l.props(s.hidden),
969
+ children: e
970
+ })] });
1006
971
  }
1007
- function Q({ pending: e, label: t, placeholder: n, children: r, fill: i = !1, startedAt: a, delayMs: o }) {
1008
- let [s, c] = f(e);
1009
- return e && !s && c(!0), /* @__PURE__ */ p("div", {
1010
- "aria-busy": e,
1011
- ...{
1012
- 0: { className: "x1n2onr6 xeuugli" },
1013
- 1: { className: "x1n2onr6 xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" }
1014
- }[!!i | 0],
1015
- children: e ? /* @__PURE__ */ p(Ce, {
1016
- label: t,
1017
- placeholder: n,
1018
- fill: i,
1019
- startedAt: a,
1020
- delayMs: o
1021
- }, a) : /* @__PURE__ */ p(Z, {
1022
- enter: s,
1023
- fill: i,
1024
- children: r
972
+ function De(e) {
973
+ let t = f(Y), [n, r] = h(() => ({
974
+ state: e.state,
975
+ scope: t,
976
+ startedAt: t?.startedAt ?? Date.now(),
977
+ wasPending: e.state === "pending"
978
+ })), i = n;
979
+ if (n.scope !== t || n.state !== e.state) {
980
+ let a = n.scope !== t, o = n.startedAt;
981
+ a ? o = t?.startedAt ?? Date.now() : e.state === "pending" && (o = Date.now()), i = {
982
+ state: e.state,
983
+ scope: t,
984
+ startedAt: o,
985
+ wasPending: e.state === "pending" || !a && n.wasPending
986
+ }, r(i);
987
+ }
988
+ return /* @__PURE__ */ g("div", {
989
+ className: "x1n2onr6 xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
990
+ children: e.state === "pending" ? /* @__PURE__ */ g(Ee, {
991
+ label: e.label,
992
+ placeholder: e.placeholder,
993
+ startedAt: i.startedAt
994
+ }) : e.state === "failed" ? /* @__PURE__ */ g("div", {
995
+ className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
996
+ children: e.children
997
+ }) : /* @__PURE__ */ g($, {
998
+ enter: i.wasPending,
999
+ children: e.children
1025
1000
  })
1026
1001
  });
1027
1002
  }
1028
- export { I as a, M as c, O as d, k as f, W as i, N as l, T as m, Z as n, F as o, w as p, xe as r, P as s, Q as t, D as u };
1003
+ export { he as a, F as c, A as d, j as f, Te as i, I as l, re as m, $ as n, L as o, ne as p, Q as r, ie as s, De as t, k as u };