@versini/sassysaint 4.3.2 → 4.3.3

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.
@@ -1,7 +1,7 @@
1
- import { jsxs as x, Fragment as fe, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as w, Fragment as ke, jsx as c } from "react/jsx-runtime";
2
2
  import i from "clsx";
3
- import H, { useContext as O, useRef as N, useState as J, useLayoutEffect as L, useSyncExternalStore as ke, useCallback as q, useEffect as _e } from "react";
4
- import { A as xe, i as we, f as Ne, S as Te, f$1 as ve, V as Se, j as Ce, F as Ie, r as Ee, o as He, n as ae, l as Oe, a as j, MODEL_GPT4 as Ae } from "./index.CRgG-bmB.js";
3
+ import H, { useContext as A, useRef as x, useState as z, useLayoutEffect as L, useEffect as ae, useSyncExternalStore as _e, useCallback as j } from "react";
4
+ import { A as xe, i as we, f as Te, S as Ne, f$1 as ve, V as Se, j as Ce, F as Ie, r as Ee, o as He, n as se, l as Ae, a as J, MODEL_GPT4 as Oe } from "./index.Bd1O6OvY.js";
5
5
  const $e = (e) => {
6
6
  let r = "";
7
7
  if (typeof e == "number" || typeof e == "string")
@@ -18,21 +18,21 @@ const $e = (e) => {
18
18
  className: a,
19
19
  defaultViewBox: s,
20
20
  defaultClassName: o,
21
- spacing: c,
22
- title: d,
21
+ spacing: d,
22
+ title: l,
23
23
  semantic: n = !1,
24
24
  ...m
25
25
  }) => {
26
- const h = $e(c), y = i(
26
+ const h = $e(d), u = i(
27
27
  h,
28
28
  a || o
29
29
  );
30
- return /* @__PURE__ */ x(fe, { children: [
31
- /* @__PURE__ */ l(
30
+ return /* @__PURE__ */ w(ke, { children: [
31
+ /* @__PURE__ */ c(
32
32
  "svg",
33
33
  {
34
34
  xmlns: "http://www.w3.org/2000/svg",
35
- className: y,
35
+ className: u,
36
36
  viewBox: t || s,
37
37
  fill: r || "currentColor",
38
38
  role: "img",
@@ -42,7 +42,7 @@ const $e = (e) => {
42
42
  children: e
43
43
  }
44
44
  ),
45
- d && n && /* @__PURE__ */ l("span", { className: "sr-only", children: d })
45
+ l && n && /* @__PURE__ */ c("span", { className: "sr-only", children: l })
46
46
  ] });
47
47
  };
48
48
  /*!
@@ -78,7 +78,7 @@ const Be = ({
78
78
  title: a,
79
79
  monotone: s,
80
80
  ...o
81
- }) => /* @__PURE__ */ x(
81
+ }) => /* @__PURE__ */ w(
82
82
  Q,
83
83
  {
84
84
  defaultViewBox: "0 0 576 512",
@@ -89,14 +89,14 @@ const Be = ({
89
89
  title: a || "Sort",
90
90
  ...o,
91
91
  children: [
92
- /* @__PURE__ */ l(
92
+ /* @__PURE__ */ c(
93
93
  "path",
94
94
  {
95
95
  opacity: s ? "1" : "0.4",
96
96
  d: "M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
97
97
  }
98
98
  ),
99
- /* @__PURE__ */ l("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
99
+ /* @__PURE__ */ c("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
100
100
  ]
101
101
  }
102
102
  ), Me = ({
@@ -106,7 +106,7 @@ const Be = ({
106
106
  title: a,
107
107
  monotone: s,
108
108
  ...o
109
- }) => /* @__PURE__ */ x(
109
+ }) => /* @__PURE__ */ w(
110
110
  Q,
111
111
  {
112
112
  defaultViewBox: "0 0 576 512",
@@ -117,14 +117,14 @@ const Be = ({
117
117
  title: a || "Sort Down",
118
118
  ...o,
119
119
  children: [
120
- /* @__PURE__ */ l(
120
+ /* @__PURE__ */ c(
121
121
  "path",
122
122
  {
123
123
  opacity: s ? "1" : "0.4",
124
124
  d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
125
125
  }
126
126
  ),
127
- /* @__PURE__ */ l("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
127
+ /* @__PURE__ */ c("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
128
128
  ]
129
129
  }
130
130
  ), Le = ({
@@ -134,7 +134,7 @@ const Be = ({
134
134
  title: a,
135
135
  monotone: s,
136
136
  ...o
137
- }) => /* @__PURE__ */ x(
137
+ }) => /* @__PURE__ */ w(
138
138
  Q,
139
139
  {
140
140
  defaultViewBox: "0 0 576 512",
@@ -145,17 +145,17 @@ const Be = ({
145
145
  title: a || "Sort Up",
146
146
  ...o,
147
147
  children: [
148
- /* @__PURE__ */ l(
148
+ /* @__PURE__ */ c(
149
149
  "path",
150
150
  {
151
151
  opacity: s ? "1" : "0.4",
152
152
  d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
153
153
  }
154
154
  ),
155
- /* @__PURE__ */ l("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
155
+ /* @__PURE__ */ c("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
156
156
  ]
157
157
  }
158
- ), se = H.forwardRef(
158
+ ), oe = H.forwardRef(
159
159
  ({
160
160
  children: e,
161
161
  disabled: r = !1,
@@ -163,41 +163,41 @@ const Be = ({
163
163
  focusMode: a = "system",
164
164
  fullWidth: s = !1,
165
165
  className: o,
166
- type: c = "button",
167
- raw: d = !1,
166
+ type: d = "button",
167
+ raw: l = !1,
168
168
  noBorder: n = !1,
169
169
  "aria-label": m,
170
170
  label: h,
171
- size: y = "medium",
172
- labelRight: p,
171
+ size: u = "medium",
172
+ labelRight: g,
173
173
  labelLeft: _,
174
- spacing: g,
174
+ spacing: y,
175
175
  noBackground: S = !1,
176
176
  align: C = "center",
177
- active: A = !1,
177
+ active: O = !1,
178
178
  ...$
179
179
  }, B) => {
180
180
  const U = xe({
181
- type: Ne,
181
+ type: Te,
182
182
  mode: t,
183
183
  focusMode: a,
184
184
  fullWidth: s,
185
185
  disabled: r,
186
- raw: d,
186
+ raw: l,
187
187
  className: o,
188
188
  noBorder: n,
189
- size: y,
190
- labelRight: p,
189
+ size: u,
190
+ labelRight: g,
191
191
  labelLeft: _,
192
- spacing: g,
192
+ spacing: y,
193
193
  noBackground: S,
194
194
  align: C
195
- }), z = i({
196
- "text-copy-accent-dark": t === "light" && !d,
197
- "text-copy-light": t === "dark" && !d,
198
- "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !d,
199
- "text-copy-light dark:text-copy-accent-dark": t === "system" && !d
200
- }), G = A ? i(
195
+ }), G = i({
196
+ "text-copy-accent-dark": t === "light" && !l,
197
+ "text-copy-light": t === "dark" && !l,
198
+ "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
199
+ "text-copy-light dark:text-copy-accent-dark": t === "system" && !l
200
+ }), D = O ? i(
201
201
  "relative",
202
202
  "focus-within:static",
203
203
  "focus-within:after:border-transparent",
@@ -214,32 +214,32 @@ const Be = ({
214
214
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
215
215
  }
216
216
  ) : "";
217
- return /* @__PURE__ */ l("div", { className: G, children: /* @__PURE__ */ x(
217
+ return /* @__PURE__ */ c("div", { className: D, children: /* @__PURE__ */ w(
218
218
  we,
219
219
  {
220
220
  ref: B,
221
221
  className: U,
222
222
  disabled: r,
223
- type: c,
223
+ type: d,
224
224
  "aria-label": m || h,
225
225
  ...$,
226
226
  children: [
227
- _ && /* @__PURE__ */ l("span", { className: "pr-2", children: _ }),
228
- /* @__PURE__ */ l("div", { className: z, children: e }),
229
- p && /* @__PURE__ */ l("span", { className: "pl-2", children: p })
227
+ _ && /* @__PURE__ */ c("span", { className: "pr-2", children: _ }),
228
+ /* @__PURE__ */ c("div", { className: G, children: e }),
229
+ g && /* @__PURE__ */ c("span", { className: "pl-2", children: g })
230
230
  ]
231
231
  }
232
232
  ) });
233
233
  }
234
234
  );
235
- se.displayName = "ButtonSort";
235
+ oe.displayName = "ButtonSort";
236
236
  const v = H.createContext({
237
237
  mode: "light",
238
238
  cellWrapper: "thead",
239
239
  stickyHeader: !1,
240
240
  stickyFooter: !1,
241
241
  compact: !1
242
- }), R = "thead", Y = "tfoot", T = "tbody", V = {
242
+ }), R = "thead", Y = "tfoot", N = "tbody", V = {
243
243
  ASC: "asc",
244
244
  DESC: "desc"
245
245
  }, Ve = ({
@@ -252,7 +252,7 @@ const v = H.createContext({
252
252
  }) => ({
253
253
  wrapper: i(
254
254
  "not-prose relative w-full rounded-lg shadow-md",
255
- Te(o),
255
+ Ne(o),
256
256
  {
257
257
  "overflow-x-auto": !a && !s,
258
258
  "overflow-y-scroll": a || s,
@@ -275,7 +275,7 @@ const v = H.createContext({
275
275
  "text-copy-light dark:text-copy-dark": e === "system",
276
276
  "text-copy-dark dark:text-copy-light": e === "alt-system"
277
277
  })
278
- }), Re = ({
278
+ }), ze = ({
279
279
  className: e,
280
280
  stickyHeader: r,
281
281
  mode: t
@@ -285,7 +285,7 @@ const v = H.createContext({
285
285
  "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "system",
286
286
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "light",
287
287
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
288
- }), Ue = ({
288
+ }), Re = ({
289
289
  className: e,
290
290
  stickyFooter: r,
291
291
  mode: t
@@ -295,7 +295,7 @@ const v = H.createContext({
295
295
  "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "system",
296
296
  "shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "light",
297
297
  "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
298
- }), ze = ({
298
+ }), Ue = ({
299
299
  mode: e,
300
300
  className: r,
301
301
  cellWrapper: t
@@ -306,13 +306,13 @@ const v = H.createContext({
306
306
  "bg-table-head-light dark:bg-table-head-dark": e === "alt-system"
307
307
  }) : i("border-b last:border-0", r, {
308
308
  "border-table-dark": e === "dark",
309
- "odd:bg-table-dark-odd even:bg-table-dark-even": t === T && e === "dark",
309
+ "odd:bg-table-dark-odd even:bg-table-dark-even": t === N && e === "dark",
310
310
  "border-table-light": e === "light",
311
- "odd:bg-table-light-odd even:bg-table-light-even": t === T && e === "light",
311
+ "odd:bg-table-light-odd even:bg-table-light-even": t === N && e === "light",
312
312
  "border-table-dark dark:border-table-light": e === "system",
313
- "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === T && e === "system",
313
+ "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === N && e === "system",
314
314
  "border-table-light dark:border-table-dark": e === "alt-system",
315
- "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === T && e === "alt-system"
315
+ "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === N && e === "alt-system"
316
316
  }), Ge = ({
317
317
  cellWrapper: e,
318
318
  className: r,
@@ -324,7 +324,7 @@ const v = H.createContext({
324
324
  "text-copy-light dark:text-copy-dark": a === "system",
325
325
  "text-copy-dark dark:text-copy-light": a === "alt-system",
326
326
  "px-4 py-3": !t && (e === R || e === Y),
327
- "p-4": !t && e === T,
327
+ "p-4": !t && e === N,
328
328
  "px-4 py-1": t
329
329
  }), lt = ({
330
330
  children: e,
@@ -333,34 +333,34 @@ const v = H.createContext({
333
333
  compact: a,
334
334
  summary: s,
335
335
  className: o,
336
- wrapperClassName: c,
337
- maxHeight: d,
336
+ wrapperClassName: d,
337
+ maxHeight: l,
338
338
  stickyHeader: n,
339
339
  stickyFooter: m,
340
340
  spacing: h,
341
- ...y
341
+ ...u
342
342
  }) => {
343
- const p = Ve({
343
+ const g = Ve({
344
344
  mode: r,
345
345
  className: o,
346
- wrapperClassName: c,
346
+ wrapperClassName: d,
347
347
  stickyHeader: n,
348
348
  stickyFooter: m,
349
349
  spacing: h
350
350
  });
351
- return /* @__PURE__ */ l(
351
+ return /* @__PURE__ */ c(
352
352
  v.Provider,
353
353
  {
354
354
  value: { mode: r, stickyHeader: n, stickyFooter: m, compact: a },
355
- children: /* @__PURE__ */ l(
355
+ children: /* @__PURE__ */ c(
356
356
  "div",
357
357
  {
358
- className: p.wrapper,
359
- ...d && {
360
- style: { maxHeight: d }
358
+ className: g.wrapper,
359
+ ...l && {
360
+ style: { maxHeight: l }
361
361
  },
362
- children: /* @__PURE__ */ x("table", { className: p.table, summary: s, ...y, children: [
363
- t && /* @__PURE__ */ l("caption", { className: p.caption, children: t }),
362
+ children: /* @__PURE__ */ w("table", { className: g.table, summary: s, ...u, children: [
363
+ t && /* @__PURE__ */ c("caption", { className: g.caption, children: t }),
364
364
  e
365
365
  ] })
366
366
  }
@@ -372,54 +372,54 @@ const v = H.createContext({
372
372
  className: r,
373
373
  ...t
374
374
  }) => {
375
- const a = O(v);
375
+ const a = A(v);
376
376
  a.cellWrapper = R;
377
- const s = Re({
377
+ const s = ze({
378
378
  className: r,
379
379
  mode: a.mode,
380
380
  stickyHeader: a.stickyHeader
381
381
  });
382
- return /* @__PURE__ */ l("thead", { className: s, ...t, children: e });
382
+ return /* @__PURE__ */ c("thead", { className: s, ...t, children: e });
383
383
  }, dt = ({
384
384
  children: e,
385
385
  className: r,
386
386
  ...t
387
387
  }) => {
388
- const a = O(v);
388
+ const a = A(v);
389
389
  a.cellWrapper = Y;
390
- const s = Ue({
390
+ const s = Re({
391
391
  className: r,
392
392
  mode: a.mode,
393
393
  stickyFooter: a.stickyFooter
394
394
  });
395
- return /* @__PURE__ */ l("tfoot", { className: s, ...t, children: e });
395
+ return /* @__PURE__ */ c("tfoot", { className: s, ...t, children: e });
396
396
  }, it = ({ children: e, ...r }) => {
397
- const t = O(v);
398
- return t.cellWrapper = T, /* @__PURE__ */ l("tbody", { ...r, children: e });
397
+ const t = A(v);
398
+ return t.cellWrapper = N, /* @__PURE__ */ c("tbody", { ...r, children: e });
399
399
  }, nt = ({
400
400
  children: e,
401
401
  className: r,
402
402
  ...t
403
403
  }) => {
404
- const a = O(v), s = ze({
404
+ const a = A(v), s = Ue({
405
405
  mode: a.mode,
406
406
  cellWrapper: a.cellWrapper,
407
407
  className: r
408
408
  });
409
- return /* @__PURE__ */ l("tr", { className: s, ...t, children: e });
410
- }, Fe = ({
409
+ return /* @__PURE__ */ c("tr", { className: s, ...t, children: e });
410
+ }, De = ({
411
411
  children: e,
412
412
  component: r,
413
413
  className: t,
414
414
  ...a
415
415
  }) => {
416
- const s = O(v), o = r || (s.cellWrapper === R ? "th" : "td"), c = Ge({
416
+ const s = A(v), o = r || (s.cellWrapper === R ? "th" : "td"), d = Ge({
417
417
  cellWrapper: s.cellWrapper,
418
418
  className: t,
419
419
  mode: s.mode,
420
420
  compact: s.compact
421
421
  });
422
- return /* @__PURE__ */ l(o, { className: c, ...a, children: e });
422
+ return /* @__PURE__ */ c(o, { className: d, ...a, children: e });
423
423
  }, mt = ({
424
424
  align: e,
425
425
  children: r,
@@ -427,49 +427,54 @@ const v = H.createContext({
427
427
  component: a,
428
428
  focusMode: s = "alt-system",
429
429
  mode: o = "alt-system",
430
- onClick: c,
431
- sortDirection: d,
430
+ onClick: d,
431
+ sortDirection: l,
432
432
  sortedCell: n,
433
433
  cellId: m,
434
434
  ...h
435
- }) => /* @__PURE__ */ l(
436
- Fe,
435
+ }) => /* @__PURE__ */ c(
436
+ De,
437
437
  {
438
438
  component: a,
439
439
  className: t,
440
440
  role: "columnheader",
441
- "aria-sort": d === V.ASC && n === m ? "ascending" : d === V.DESC && n === m ? "descending" : "other",
441
+ "aria-sort": l === V.ASC && n === m ? "ascending" : l === V.DESC && n === m ? "descending" : "other",
442
442
  ...h,
443
- children: /* @__PURE__ */ l(
444
- se,
443
+ children: /* @__PURE__ */ c(
444
+ oe,
445
445
  {
446
446
  active: n === m,
447
447
  className: "rounded-none text-sm",
448
- onClick: c,
448
+ onClick: d,
449
449
  align: e,
450
450
  noBorder: !0,
451
451
  focusMode: s,
452
452
  mode: o,
453
453
  fullWidth: !0,
454
454
  labelRight: r,
455
- children: d === V.ASC && n === m ? /* @__PURE__ */ l(Le, { className: "size-4", monotone: !0 }) : d === V.DESC && n === m ? /* @__PURE__ */ l(Me, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(Be, { className: "size-4", monotone: !0 })
455
+ children: l === V.ASC && n === m ? /* @__PURE__ */ c(Le, { className: "size-4", monotone: !0 }) : l === V.DESC && n === m ? /* @__PURE__ */ c(Me, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Be, { className: "size-4", monotone: !0 })
456
456
  }
457
457
  )
458
458
  }
459
459
  );
460
- function De({
460
+ function Fe({
461
461
  value: e,
462
462
  defaultValue: r,
463
463
  finalValue: t,
464
464
  onChange: a = () => {
465
- }
465
+ },
466
+ initialControlledDelay: s = 0
466
467
  }) {
467
- const [s, o] = J(
468
+ const o = x(!1), [d, l] = z(), [n, m] = z(
468
469
  r !== void 0 ? r : t
469
- );
470
- return e !== void 0 ? [e, a, !0] : [s, (c) => {
471
- o(c), a == null || a(c);
472
- }, !1];
470
+ ), h = (u) => {
471
+ m(u), a == null || a(u);
472
+ };
473
+ return ae(() => {
474
+ (async () => e !== void 0 && (!o.current && s > 0 && (await new Promise(
475
+ (u) => setTimeout(u, s)
476
+ ), o.current = !0), l(e)))();
477
+ }, [e, s]), e !== void 0 ? [d, a, !0] : [n, h, !1];
473
478
  }
474
479
  const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", We = ({
475
480
  mode: e
@@ -527,18 +532,18 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
527
532
  return "";
528
533
  if (a)
529
534
  return i(
530
- j,
535
+ J,
531
536
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
532
537
  );
533
538
  if (!e)
534
- return i(j, "absolute px-2 font-medium", {
539
+ return i(J, "absolute px-2 font-medium", {
535
540
  "text-copy-medium": t === "dark",
536
541
  "text-copy-dark": t === "light",
537
542
  "text-copy-dark dark:text-copy-medium": t === "system",
538
543
  "text-copy-medium dark:text-copy-dark": t === "alt-system"
539
544
  });
540
545
  if (e)
541
- return i(j, "absolute px-2 font-medium", {
546
+ return i(J, "absolute px-2 font-medium", {
542
547
  "text-copy-error-light": t === "dark",
543
548
  "text-copy-error-dark": t === "light",
544
549
  "text-copy-error-dark dark:text-copy-error-light": t === "system",
@@ -551,46 +556,46 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
551
556
  focusMode: a,
552
557
  disabled: s,
553
558
  noBorder: o,
554
- error: c,
555
- spacing: d,
559
+ error: d,
560
+ spacing: l,
556
561
  mode: n
557
562
  }) => {
558
563
  const m = t ? e : i(
559
564
  "relative flex w-full flex-col justify-center",
560
565
  Ee,
561
566
  e,
562
- He(d)
567
+ He(l)
563
568
  ), h = t ? i(r) : i(
564
- ae,
569
+ se,
565
570
  r,
566
571
  Pe(),
567
572
  We({ mode: n }),
568
573
  qe({ focusMode: a }),
569
574
  je({
570
575
  noBorder: o,
571
- error: c
576
+ error: d
572
577
  }),
573
578
  {
574
579
  "disabled:cursor-not-allowed disabled:opacity-50": s
575
580
  }
576
- ), y = t ? void 0 : "sr-only", p = Je({
581
+ ), u = t ? void 0 : "sr-only", g = Je({
577
582
  disabled: s,
578
583
  raw: t,
579
- error: c,
584
+ error: d,
580
585
  mode: n
581
586
  }), _ = Qe({
582
- error: c,
587
+ error: d,
583
588
  raw: t,
584
589
  mode: n,
585
590
  disabled: s
586
- }), g = t ? void 0 : i(Oe, "absolute");
591
+ }), y = t ? void 0 : i(Ae, "absolute");
587
592
  return {
588
593
  wrapper: m,
589
594
  textArea: h,
590
- accessibleLabel: y,
591
- visibleLabel: p,
595
+ accessibleLabel: u,
596
+ visibleLabel: g,
592
597
  helperText: _,
593
- rightElement: g
598
+ rightElement: y
594
599
  };
595
600
  }, Ke = ({
596
601
  scrollHeight: e,
@@ -600,8 +605,8 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
600
605
  }) => {
601
606
  let s, o;
602
607
  if (e > 0 && e !== r) {
603
- const c = e - r, d = Math.abs(c / 24);
604
- s = t + -1 * Math.sign(c) * (12 * d), o = a + Math.sign(c) * (12 * d);
608
+ const d = e - r, l = Math.abs(d / 24);
609
+ s = t + -1 * Math.sign(d) * (12 * l), o = a + Math.sign(d) * (12 * l);
605
610
  }
606
611
  return {
607
612
  labelOffset: s,
@@ -616,139 +621,140 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
616
621
  error: a = !1,
617
622
  raw: s = !1,
618
623
  className: o,
619
- textAreaClassName: c,
620
- mode: d = "system",
624
+ textAreaClassName: d,
625
+ mode: l = "system",
621
626
  focusMode: n = "system",
622
627
  value: m,
623
628
  defaultValue: h,
624
- disabled: y = !1,
625
- noBorder: p = !1,
629
+ disabled: u = !1,
630
+ noBorder: g = !1,
626
631
  labelId: _,
627
- helperText: g = "",
632
+ helperText: y = "",
628
633
  helperTextOnFocus: S = !1,
629
634
  rightElement: C,
630
- onChange: A,
635
+ onChange: O,
631
636
  onFocus: $,
632
637
  onBlur: B,
633
638
  spacing: U,
634
- ...z
635
- }, G) => {
636
- const b = N(null), ce = ve([G, b]), [de, M] = Se(), F = N(80), K = N(-25), I = N(null), X = N(30), D = N(null), E = Ce({ id: e, prefix: `${ae}-` }), [ie, ne] = J(0), [me, Z] = J(
637
- !!(!S && g)
638
- ), ue = `${r} error, ${g}`, w = Ye({
639
+ ...G
640
+ }, D) => {
641
+ const b = x(null), de = ve([D, b]), [ie, M] = Se(), F = x(80), K = x(-25), I = x(null), X = x(30), P = x(null), E = Ce({ id: e, prefix: `${se}-` }), [ne, me] = z(0), [ue, Z] = z(
642
+ !!(!S && y)
643
+ ), he = `${r} error, ${y}`, T = Ye({
639
644
  className: o,
640
- textAreaClassName: c,
645
+ textAreaClassName: d,
641
646
  error: a,
642
647
  raw: s,
643
648
  focusMode: n,
644
- disabled: y,
645
- noBorder: p,
649
+ disabled: u,
650
+ noBorder: g,
646
651
  spacing: U,
647
- mode: d
648
- }), [f, he] = De({
652
+ mode: l
653
+ }), [f, pe] = Fe({
649
654
  value: m,
655
+ initialControlledDelay: 100,
650
656
  defaultValue: h,
651
- onChange: (u) => {
652
- A && A({
657
+ onChange: (p) => {
658
+ O && O({
653
659
  target: {
654
- value: u
660
+ value: p
655
661
  }
656
662
  });
657
663
  }
658
- }), pe = (u) => {
659
- he(u.target.value);
660
- }, ge = (u) => {
661
- S && g && Z(!0), $ && $(u);
662
- }, ye = (u) => {
663
- S && g && !f && Z(!1), B && B(u);
664
+ }), ge = (p) => {
665
+ pe(p.target.value);
666
+ }, ye = (p) => {
667
+ S && y && Z(!0), $ && $(p);
668
+ }, be = (p) => {
669
+ S && y && !f && Z(!1), B && B(p);
664
670
  };
665
671
  return L(() => {
666
- M && M.width && ne(M.width + 18 + 10);
672
+ M && M.width && me(M.width + 18 + 10);
667
673
  }, [M]), L(() => {
668
674
  s || b && b.current && f !== void 0 && (b.current.style.height = "inherit", b.current.style.height = b.current.scrollHeight + "px");
669
675
  }, [f, s]), L(() => {
670
676
  s || setTimeout(() => {
671
- var u;
672
- (u = I == null ? void 0 : I.current) == null || u.style.setProperty(
677
+ var p;
678
+ (p = I == null ? void 0 : I.current) == null || p.style.setProperty(
673
679
  "--av-text-area-wrapper-transition",
674
680
  f ? "none" : "all 0.2s ease-out"
675
681
  );
676
682
  }, 0);
677
683
  }, [f, s]), L(() => {
678
- var u, ee;
684
+ var p, ee;
679
685
  if (!s && b && b.current && f !== void 0) {
680
- const { labelOffset: P, helperTextOffset: W, scrollHeight: be } = Ke({
686
+ const { labelOffset: W, helperTextOffset: q, scrollHeight: fe } = Ke({
681
687
  scrollHeight: b.current.scrollHeight,
682
688
  currentHeight: F.current,
683
689
  currentLabelOffset: K.current,
684
690
  currentHelperTextOffset: X.current
685
691
  });
686
- P && (K.current = P, (u = I == null ? void 0 : I.current) == null || u.style.setProperty(
692
+ W && (K.current = W, (p = I == null ? void 0 : I.current) == null || p.style.setProperty(
687
693
  "--av-text-area-label",
688
- `${P}px`
689
- )), W && (X.current = W, (ee = D == null ? void 0 : D.current) == null || ee.style.setProperty(
690
- "--av-text-area-helper-text",
691
694
  `${W}px`
692
- )), F.current = be || F.current;
695
+ )), q && (X.current = q, (ee = P == null ? void 0 : P.current) == null || ee.style.setProperty(
696
+ "--av-text-area-helper-text",
697
+ `${q}px`
698
+ )), F.current = fe || F.current;
693
699
  }
694
- }, [f, s]), /* @__PURE__ */ x("div", { className: w.wrapper, children: [
695
- /* @__PURE__ */ l(
700
+ }, [f, s]), /* @__PURE__ */ w("div", { className: T.wrapper, children: [
701
+ /* @__PURE__ */ c(
696
702
  "label",
697
703
  {
698
704
  htmlFor: E,
699
705
  id: _,
700
- className: w.accessibleLabel,
706
+ className: T.accessibleLabel,
701
707
  children: t
702
708
  }
703
709
  ),
704
- /* @__PURE__ */ l(
710
+ /* @__PURE__ */ c(
705
711
  "textarea",
706
712
  {
707
- ref: ce,
713
+ ref: de,
708
714
  id: E,
709
715
  name: r,
710
- disabled: y,
716
+ disabled: u,
711
717
  placeholder: s ? void 0 : " ",
712
- className: w.textArea,
718
+ className: T.textArea,
713
719
  rows: 1,
714
- ...g && { "aria-describedby": `${E}-helper` },
720
+ ...y && { "aria-describedby": `${E}-helper` },
715
721
  ...a && { "aria-invalid": "true" },
716
- ...C && !s && { style: { paddingRight: ie } },
722
+ ...C && !s && { style: { paddingRight: ne } },
717
723
  value: f,
718
- onChange: pe,
719
- onFocus: ge,
720
- onBlur: ye,
721
- ...z
724
+ onChange: ge,
725
+ onFocus: ye,
726
+ onBlur: be,
727
+ ...G
722
728
  }
723
729
  ),
724
- !s && /* @__PURE__ */ l(
730
+ !s && /* @__PURE__ */ c(
725
731
  "label",
726
732
  {
727
733
  ref: I,
728
734
  "aria-hidden": !0,
729
735
  htmlFor: E,
730
- className: w.visibleLabel,
736
+ className: T.visibleLabel,
731
737
  children: t
732
738
  }
733
739
  ),
734
- me && /* @__PURE__ */ l(
740
+ ue && /* @__PURE__ */ c(
735
741
  "div",
736
742
  {
737
- ref: D,
743
+ ref: P,
738
744
  id: `${E}-helper`,
739
- className: w.helperText,
740
- children: g
745
+ className: T.helperText,
746
+ children: y
741
747
  }
742
748
  ),
743
- C && /* @__PURE__ */ l(
749
+ C && /* @__PURE__ */ c(
744
750
  "div",
745
751
  {
746
- ref: de,
747
- className: w.rightElement,
752
+ ref: ie,
753
+ className: T.rightElement,
748
754
  children: C
749
755
  }
750
756
  ),
751
- a && g && /* @__PURE__ */ l(Ie, { politeness: "polite", clearAnnouncementDelay: 500, children: ue })
757
+ a && y && /* @__PURE__ */ c(Ie, { politeness: "polite", clearAnnouncementDelay: 500, children: he })
752
758
  ] });
753
759
  }
754
760
  );
@@ -879,11 +885,11 @@ const k = {
879
885
  location: e.location
880
886
  })
881
887
  }
882
- }, oe = process.env.PUBLIC_SASSY_API_SERVER_URL, Ze = async ({
888
+ }, le = process.env.PUBLIC_SASSY_API_SERVER_URL, Ze = async ({
883
889
  query: e,
884
890
  data: r,
885
891
  headers: t = {}
886
- }) => await fetch(`${oe}/graphql`, {
892
+ }) => await fetch(`${le}/graphql`, {
887
893
  method: "POST",
888
894
  credentials: "include",
889
895
  headers: {
@@ -911,11 +917,11 @@ const k = {
911
917
  });
912
918
  if (o.status !== 200)
913
919
  return { status: o.status, data: [] };
914
- const { data: c, errors: d } = await o.json();
920
+ const { data: d, errors: l } = await o.json();
915
921
  return {
916
922
  status: o.status,
917
- data: c[r.method],
918
- errors: d
923
+ data: d[r.method],
924
+ errors: l
919
925
  };
920
926
  } catch (s) {
921
927
  return console.error(s), { status: 500, data: [] };
@@ -927,7 +933,7 @@ const k = {
927
933
  method: a = "POST"
928
934
  }) => {
929
935
  const s = `Bearer ${e}`;
930
- return await fetch(`${oe}/api/${r}`, {
936
+ return await fetch(`${le}/api/${r}`, {
931
937
  method: a,
932
938
  credentials: "include",
933
939
  headers: {
@@ -939,7 +945,7 @@ const k = {
939
945
  }, gt = H.createContext({
940
946
  state: {
941
947
  id: "",
942
- model: Ae,
948
+ model: Oe,
943
949
  usage: 0,
944
950
  messages: [],
945
951
  isComponent: !1
@@ -952,51 +958,51 @@ const k = {
952
958
  dispatch: () => {
953
959
  }
954
960
  });
955
- function le(e, r) {
961
+ function ce(e, r) {
956
962
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: r }));
957
963
  }
958
964
  const te = (e, r) => {
959
965
  const t = JSON.stringify(
960
966
  typeof r == "function" ? r() : r
961
967
  );
962
- window.localStorage.setItem(e, t), le(e, t);
968
+ window.localStorage.setItem(e, t), ce(e, t);
963
969
  }, et = (e) => {
964
- window.localStorage.removeItem(e), le(e, null);
970
+ window.localStorage.removeItem(e), ce(e, null);
965
971
  }, re = (e) => window.localStorage.getItem(e), tt = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
966
972
  function bt({
967
973
  key: e,
968
974
  initialValue: r
969
975
  }) {
970
- const t = ke(tt, () => re(e)), a = q(
971
- (c) => {
976
+ const t = _e(tt, () => re(e)), a = j(
977
+ (d) => {
972
978
  try {
973
- const d = typeof c == "function" ? c(JSON.parse(t)) : c;
974
- d == null ? et(e) : te(e, d);
975
- } catch (d) {
976
- console.warn(d);
979
+ const l = typeof d == "function" ? d(JSON.parse(t)) : d;
980
+ l == null ? et(e) : te(e, l);
981
+ } catch (l) {
982
+ console.warn(l);
977
983
  }
978
984
  },
979
985
  [e, t]
980
- ), s = q(() => {
986
+ ), s = j(() => {
981
987
  a(r);
982
- }, [r, a]), o = q(() => {
988
+ }, [r, a]), o = j(() => {
983
989
  a(null);
984
990
  }, [a]);
985
- return _e(() => {
991
+ return ae(() => {
986
992
  try {
987
993
  re(e) === null && typeof r < "u" && te(e, r);
988
- } catch (c) {
989
- console.warn(c);
994
+ } catch (d) {
995
+ console.warn(d);
990
996
  }
991
997
  }, [e, r]), [t ? JSON.parse(t) : null, a, s, o];
992
998
  }
993
999
  export {
994
1000
  gt as AppContext,
995
- Xe as At,
996
1001
  bt as E,
997
1002
  yt as HistoryContext,
998
- Fe as J,
1003
+ De as J,
999
1004
  ut as SERVICE_TYPES,
1005
+ Xe as Tt,
1000
1006
  ct as at,
1001
1007
  mt as ct,
1002
1008
  lt as et,