@grapadigital/shared-app-modules 0.0.189 → 0.0.192

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,30 +1,30 @@
1
- import { aZ as h, w as S, c, F as I, B as k, aq as _, ar as z, as as M, bf as H, W as L, X as D, $ as v, _ as j, Y as B, a0 as $ } from "./chuncks/switch.D4GUsewk.js";
2
- import { jsx as e, jsxs as d, Fragment as T } from "react/jsx-runtime";
3
- import { QueryErrorResetBoundary as O, useQuery as P } from "@tanstack/react-query";
4
- import { Suspense as q, useState as F, useRef as R, useEffect as A, useMemo as U } from "react";
5
- import { n as K, M as W, o as X } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
6
- import { v as Ge, w as Ye, D as Ze, O as Je, E as et, G as tt, F as nt, H as at, Q as rt, J as st, K as it, L as ot, N as lt, u as dt, x as ct, U as gt, V as ut, p as xt, q as bt, r as pt, s as mt, t as ht, W as ft, y as yt, R as wt, z as kt, X as vt, Y as Nt, Z as Ct } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
7
- import { S as w, c as Q, T as V, a as G, b as Y, B as Z } from "./chuncks/badge.Cur4Mrd7.js";
8
- import { parseISO as N, differenceInCalendarDays as J, format as ee } from "date-fns";
9
- import { u as te, a as ne } from "./chuncks/axios.lib.DebbmKD8.js";
1
+ import { aZ as v, c as g, B as N, bf as I, w as M, F as R, aq as T, ar as F, as as A, W as j, X as O, $ as C, _ as B, Y as P, a0 as U } from "./chuncks/switch.D4GUsewk.js";
2
+ import { jsxs as l, jsx as e, Fragment as D } from "react/jsx-runtime";
3
+ import S, { Suspense as K, useState as L, useRef as E, useEffect as H, useMemo as W } from "react";
4
+ import { B as q, S as k, c as X, T as Q, a as V, b as G } from "./chuncks/badge.Cur4Mrd7.js";
5
+ import { QueryErrorResetBoundary as Y, useQuery as Z } from "@tanstack/react-query";
6
+ import { o as J, M as ee, p as te } from "./chuncks/youtube-icon.component.DTkVj8Ri.js";
7
+ import { w as nt, x as at, G as rt, U as st, H as it, J as ot, F as lt, K as dt, V as ct, L as gt, N as ut, O as mt, Q as pt, v as xt, y as ht, W as bt, X as ft, q as yt, r as vt, s as wt, t as kt, u as Nt, Y as Ct, z as St, R as _t, E as zt, Z as It, _ as Mt, $ as Rt } from "./chuncks/youtube-icon.component.DTkVj8Ri.js";
8
+ import { parseISO as _, differenceInCalendarDays as ne, format as ae } from "date-fns";
9
+ import { u as re, a as se } from "./chuncks/axios.lib.DebbmKD8.js";
10
10
  import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
11
11
  import "axios";
12
- import { l as ae } from "./chuncks/organization-users.service.I1WrInGh.js";
13
- const re = [
12
+ import { l as ie } from "./chuncks/organization-users.service.I1WrInGh.js";
13
+ const oe = [
14
14
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
15
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
16
16
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
17
- ], se = h("circle-alert", re);
18
- const ie = [
17
+ ], le = v("circle-alert", oe);
18
+ const de = [
19
19
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
20
20
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
21
21
  ["path", { d: "M12 17h.01", key: "p32p05" }]
22
- ], oe = h("circle-question-mark", ie);
23
- const le = [
22
+ ], ce = v("circle-question-mark", de);
23
+ const ge = [
24
24
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
25
25
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
26
- ], de = h("copy", le);
27
- const ce = [
26
+ ], ue = v("copy", ge);
27
+ const me = [
28
28
  [
29
29
  "path",
30
30
  {
@@ -36,13 +36,13 @@ const ce = [
36
36
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
37
37
  ["path", { d: "M16 13H8", key: "t4e002" }],
38
38
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
39
- ], ge = h("file-text", ce);
40
- const ue = [
39
+ ], pe = v("file-text", me);
40
+ const xe = [
41
41
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
42
42
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
43
43
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
44
44
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
45
- ], xe = h("refresh-cw", ue);
45
+ ], he = v("refresh-cw", xe);
46
46
  const be = [
47
47
  [
48
48
  "path",
@@ -53,61 +53,162 @@ const be = [
53
53
  ],
54
54
  ["path", { d: "M12 9v4", key: "juzpu7" }],
55
55
  ["path", { d: "M12 17h.01", key: "p32p05" }]
56
- ], pe = h("triangle-alert", be);
57
- function me({
58
- icon: a = pe,
59
- title: t = "Algo deu errado",
56
+ ], fe = v("triangle-alert", be);
57
+ const ye = [
58
+ ["path", { d: "M12 3v12", key: "1x0j5s" }],
59
+ ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
60
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
61
+ ], ve = v("upload", ye);
62
+ function Oe({
63
+ icon: a = ve,
64
+ title: n = "Enviar arquivos",
65
+ description: r = "Arraste e solte os arquivos aqui ou clique para selecionar.",
66
+ buttonText: s = "Selecionar novos arquivos",
67
+ files: i,
68
+ disabled: t,
69
+ onFilesChange: o,
70
+ ...d
71
+ }) {
72
+ const [p, b] = S.useState(!1), x = S.useRef(null), w = (c) => {
73
+ const y = Array.from(c.target.files ?? []);
74
+ o([...i, ...y]);
75
+ }, f = (c) => {
76
+ const y = [...i];
77
+ y.splice(c, 1), o(y);
78
+ };
79
+ function h(c) {
80
+ c.preventDefault(), b(!0);
81
+ }
82
+ function m(c) {
83
+ c.preventDefault(), b(!1);
84
+ }
85
+ function u(c) {
86
+ c.preventDefault(), b(!1);
87
+ const y = Array.from(c.dataTransfer.files);
88
+ o([...i, ...y]);
89
+ }
90
+ return /* @__PURE__ */ l(
91
+ "div",
92
+ {
93
+ onDragOver: h,
94
+ onDragLeave: m,
95
+ onDrop: u,
96
+ className: g(
97
+ "w-full space-y-3",
98
+ t && "pointer-events-none opacity-60 select-none"
99
+ ),
100
+ children: [
101
+ /* @__PURE__ */ l(
102
+ "div",
103
+ {
104
+ className: g(
105
+ "border border-dashed rounded-md p-6 text-center grid gap-6 duration-200",
106
+ p && "bg-zinc-100"
107
+ ),
108
+ children: [
109
+ /* @__PURE__ */ e(
110
+ "input",
111
+ {
112
+ multiple: !0,
113
+ ...d,
114
+ ref: x,
115
+ type: "file",
116
+ className: "hidden",
117
+ onChange: w,
118
+ disabled: t
119
+ }
120
+ ),
121
+ /* @__PURE__ */ e("div", { className: "w-fit mx-auto", children: /* @__PURE__ */ e(a, { className: "text-muted-foreground size-8" }) }),
122
+ /* @__PURE__ */ l("div", { children: [
123
+ /* @__PURE__ */ e("h3", { className: "font-semibold", children: n }),
124
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: r })
125
+ ] }),
126
+ /* @__PURE__ */ e(
127
+ N,
128
+ {
129
+ type: "button",
130
+ disabled: t,
131
+ size: "sm",
132
+ onClick: () => x.current?.click(),
133
+ className: "w-fit mx-auto",
134
+ children: s
135
+ }
136
+ )
137
+ ]
138
+ }
139
+ ),
140
+ i.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: i.map((c, y) => /* @__PURE__ */ l(q, { children: [
141
+ /* @__PURE__ */ e(
142
+ "button",
143
+ {
144
+ onClick: () => f(y),
145
+ className: "hover:text-red-500",
146
+ "aria-label": "Remover anexo",
147
+ title: "Remover anexo",
148
+ disabled: t,
149
+ children: /* @__PURE__ */ e(I, { className: "size-3" })
150
+ }
151
+ ),
152
+ c.name
153
+ ] }, c.name)) })
154
+ ]
155
+ }
156
+ );
157
+ }
158
+ function we({
159
+ icon: a = fe,
160
+ title: n = "Algo deu errado",
60
161
  description: r = "Não foi possível concluir esta operação no momento. Tente novamente em alguns instantes. Se o problema persistir, entre em contato com o suporte.",
61
162
  onRetry: s,
62
163
  tip: i,
63
- className: n,
164
+ className: t,
64
165
  ...o
65
166
  }) {
66
- return /* @__PURE__ */ e(S, { className: c(n), ...o, children: /* @__PURE__ */ d(I, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
167
+ return /* @__PURE__ */ e(M, { className: g(t), ...o, children: /* @__PURE__ */ l(R, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
67
168
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
68
- /* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
169
+ /* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: n }),
69
170
  /* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
70
- s && /* @__PURE__ */ d(k, { onClick: s, variant: "outline", className: "mt-6", children: [
71
- /* @__PURE__ */ e(xe, {}),
171
+ s && /* @__PURE__ */ l(N, { onClick: s, variant: "outline", className: "mt-6", children: [
172
+ /* @__PURE__ */ e(he, {}),
72
173
  "Tentar novamente"
73
174
  ] }),
74
175
  i && /* @__PURE__ */ e("div", { className: "bg-destructive/5 border-destructive/20 mt-6 rounded-lg border border-dashed px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: i }) })
75
176
  ] }) });
76
177
  }
77
- function Le({
78
- suspenseFallback: a = he,
79
- errorFallback: t = me,
178
+ function Be({
179
+ suspenseFallback: a = ke,
180
+ errorFallback: n = we,
80
181
  children: r
81
182
  }) {
82
- return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
83
- K,
183
+ return /* @__PURE__ */ e(K, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(Y, { children: ({ reset: s }) => /* @__PURE__ */ e(
184
+ J,
84
185
  {
85
186
  onReset: s,
86
- fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
187
+ fallbackRender: ({ resetErrorBoundary: i, error: t }) => /* @__PURE__ */ e(n, { error: t, onRetry: i }),
87
188
  children: r
88
189
  }
89
190
  ) }) });
90
191
  }
91
- function he() {
92
- return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
192
+ function ke() {
193
+ return /* @__PURE__ */ e(k, { className: "h-[13.75625rem]" });
93
194
  }
94
- function De({
195
+ function Pe({
95
196
  content: a,
96
- align: t,
197
+ align: n,
97
198
  asChild: r,
98
199
  className: s,
99
200
  openDelay: i = 0,
100
- closeDelay: n = 0,
201
+ closeDelay: t = 0,
101
202
  children: o,
102
- disabled: l = !1,
103
- ...x
203
+ disabled: d = !1,
204
+ ...p
104
205
  }) {
105
- return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(_, { openDelay: i, closeDelay: n, ...x, children: [
106
- /* @__PURE__ */ e(z, { asChild: r, children: o }),
107
- /* @__PURE__ */ e(M, { align: t, className: s, children: a })
206
+ return /* @__PURE__ */ e(D, { children: d === !0 ? o : /* @__PURE__ */ l(T, { openDelay: i, closeDelay: t, ...p, children: [
207
+ /* @__PURE__ */ e(F, { asChild: r, children: o }),
208
+ /* @__PURE__ */ e(A, { align: n, className: s, children: a })
108
209
  ] }) });
109
210
  }
110
- const fe = {
211
+ const Ne = {
111
212
  red: { bg: "bg-red-50", text: "text-red-600" },
112
213
  orange: { bg: "bg-orange-50", text: "text-orange-600" },
113
214
  amber: { bg: "bg-amber-50", text: "text-amber-600" },
@@ -130,7 +231,7 @@ const fe = {
130
231
  zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
131
232
  neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
132
233
  stone: { bg: "bg-stone-200", text: "text-stone-800" }
133
- }, ye = {
234
+ }, Ce = {
134
235
  red: { bg: "bg-red-500", text: "text-white" },
135
236
  orange: { bg: "bg-orange-500", text: "text-white" },
136
237
  amber: { bg: "bg-amber-500", text: "text-white" },
@@ -154,82 +255,82 @@ const fe = {
154
255
  neutral: { bg: "bg-neutral-500", text: "text-white" },
155
256
  stone: { bg: "bg-stone-500", text: "text-white" },
156
257
  black: { bg: "bg-black", text: "text-white" }
157
- }, C = {
258
+ }, z = {
158
259
  xs: "size-3",
159
260
  sm: "size-4",
160
261
  md: "size-5",
161
262
  lg: "size-6",
162
263
  xl: "size-7"
163
264
  };
164
- function je({
265
+ function Ue({
165
266
  size: a,
166
- color: t,
267
+ color: n,
167
268
  className: r,
168
269
  icon: s,
169
270
  filled: i
170
271
  }) {
171
- const n = i ? ye[t] : fe[t], o = a ? C[a] : C.md;
172
- return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", n?.bg, r), children: /* @__PURE__ */ e(s, { className: c(o, n?.text) }) });
272
+ const t = i ? Ce[n] : Ne[n], o = a ? z[a] : z.md;
273
+ return /* @__PURE__ */ e("div", { className: g("w-fit p-2 rounded-lg", t?.bg, r), children: /* @__PURE__ */ e(s, { className: g(o, t?.text) }) });
173
274
  }
174
- function Be({ className: a, ...t }) {
175
- return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...t });
275
+ function Ke({ className: a, ...n }) {
276
+ return /* @__PURE__ */ e("div", { className: g("divide-y", a), ...n });
176
277
  }
177
- function $e({
278
+ function We({
178
279
  label: a,
179
- value: t,
280
+ value: n,
180
281
  tooltip: r,
181
282
  highlight: s = !1,
182
283
  negative: i = !1,
183
- positive: n = !1,
284
+ positive: t = !1,
184
285
  isPercentage: o = !1,
185
- isDate: l = !1,
186
- isText: x = !1,
187
- isInvoiced: f = !1,
188
- hasCopyButton: p = !1,
189
- enableHoverableContent: y = !1,
190
- handleCopy: m
286
+ isDate: d = !1,
287
+ isText: p = !1,
288
+ isInvoiced: b = !1,
289
+ hasCopyButton: x = !1,
290
+ enableHoverableContent: w = !1,
291
+ handleCopy: f
191
292
  }) {
192
- let b = "";
193
- if (l && typeof t == "string" && !f && s) {
194
- const u = N(t), g = J(u, /* @__PURE__ */ new Date());
195
- g > 15 ? b = "bg-yellow-100 font-bold" : g > 7 ? b = "bg-yellow-300 font-bold" : g >= 0 ? b = "bg-red-300 font-bold" : b = "bg-red-500 text-white font-bold";
196
- } else s && (b = "bg-[#ffe0b2] font-bold");
197
- return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(_, { openDelay: 0, closeDelay: 0, children: [
198
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
199
- /* @__PURE__ */ d(
293
+ let h = "";
294
+ if (d && typeof n == "string" && !b && s) {
295
+ const m = _(n), u = ne(m, /* @__PURE__ */ new Date());
296
+ u > 15 ? h = "bg-yellow-100 font-bold" : u > 7 ? h = "bg-yellow-300 font-bold" : u >= 0 ? h = "bg-red-300 font-bold" : h = "bg-red-500 text-white font-bold";
297
+ } else s && (h = "bg-[#ffe0b2] font-bold");
298
+ return /* @__PURE__ */ e("div", { className: g("px-2 py-1 text-sm", h), children: /* @__PURE__ */ l(T, { openDelay: 0, closeDelay: 0, children: [
299
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ l("div", { className: "flex justify-between", children: [
300
+ /* @__PURE__ */ l(
200
301
  "span",
201
302
  {
202
- className: c(
303
+ className: g(
203
304
  "flex flex-row gap-1",
204
- i ? "text-red-600" : n ? "text-green-600" : ""
305
+ i ? "text-red-600" : t ? "text-green-600" : ""
205
306
  ),
206
307
  children: [
207
308
  a,
208
309
  " ",
209
- /* @__PURE__ */ e(se, { className: "size-3.5" })
310
+ /* @__PURE__ */ e(le, { className: "size-3.5" })
210
311
  ]
211
312
  }
212
313
  ),
213
- /* @__PURE__ */ d(
314
+ /* @__PURE__ */ l(
214
315
  "span",
215
316
  {
216
- className: c(
317
+ className: g(
217
318
  "flex flex-row justify-end gap-2 text-right",
218
- i ? "text-red-600" : n ? "text-green-600" : ""
319
+ i ? "text-red-600" : t ? "text-green-600" : ""
219
320
  ),
220
321
  children: [
221
- o && typeof t == "number" ? `${t.toFixed(2)}%` : l && typeof t == "string" ? ee(N(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
222
- p && m && /* @__PURE__ */ e(de, { size: 15, onClick: () => m(t) })
322
+ o && typeof n == "number" ? `${n.toFixed(2)}%` : d && typeof n == "string" ? ae(_(n), "dd/MM/yyyy") : p && typeof n == "string" ? n : `R$ ${n.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
323
+ x && f && /* @__PURE__ */ e(ue, { size: 15, onClick: () => f(n) })
223
324
  ]
224
325
  }
225
326
  )
226
327
  ] }) }),
227
328
  /* @__PURE__ */ e(
228
- M,
329
+ A,
229
330
  {
230
331
  align: "start",
231
- className: c(!y && "pointer-events-none"),
232
- children: /* @__PURE__ */ d("div", { className: "space-y-0.5", children: [
332
+ className: g(!w && "pointer-events-none"),
333
+ children: /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
233
334
  /* @__PURE__ */ e("div", { className: "font-medium", children: a }),
234
335
  /* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: r })
235
336
  ] })
@@ -237,15 +338,15 @@ function $e({
237
338
  )
238
339
  ] }) });
239
340
  }
240
- function Oe({
241
- icon: a = ge,
242
- title: t,
341
+ function Xe({
342
+ icon: a = pe,
343
+ title: n,
243
344
  description: r,
244
345
  tip: s,
245
346
  className: i,
246
- ...n
347
+ ...t
247
348
  }) {
248
- return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(I, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
349
+ return /* @__PURE__ */ e(M, { className: g(i), ...t, children: /* @__PURE__ */ l(R, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
249
350
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
250
351
  a,
251
352
  {
@@ -253,135 +354,135 @@ function Oe({
253
354
  className: "size-16 text-muted-foreground/40"
254
355
  }
255
356
  ) }),
256
- /* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: t }),
357
+ /* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: n }),
257
358
  /* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children: r }),
258
359
  s && /* @__PURE__ */ e("div", { className: "mt-6 rounded-lg border border-dashed border-muted-foreground/20 bg-muted/50 px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s }) })
259
360
  ] }) });
260
361
  }
261
- function Pe({
362
+ function Qe({
262
363
  actions: a,
263
- icon: t = oe
364
+ icon: n = ce
264
365
  }) {
265
- const [r, s] = F(!1), i = R(null);
266
- return A(() => {
366
+ const [r, s] = L(!1), i = E(null);
367
+ return H(() => {
267
368
  if (!r) return;
268
- const n = (l) => {
269
- i.current?.contains(l.target) || s(!1);
270
- }, o = (l) => {
271
- l.key === "Escape" && s(!1);
369
+ const t = (d) => {
370
+ i.current?.contains(d.target) || s(!1);
371
+ }, o = (d) => {
372
+ d.key === "Escape" && s(!1);
272
373
  };
273
- return document.addEventListener("mousedown", n), document.addEventListener("keydown", o), () => {
274
- document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
374
+ return document.addEventListener("mousedown", t), document.addEventListener("keydown", o), () => {
375
+ document.removeEventListener("mousedown", t), document.removeEventListener("keydown", o);
275
376
  };
276
- }, [r]), /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ d(
377
+ }, [r]), /* @__PURE__ */ e(X, { children: /* @__PURE__ */ l(
277
378
  "div",
278
379
  {
279
380
  ref: i,
280
381
  className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
281
382
  children: [
282
- /* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((n, o) => /* @__PURE__ */ e(
383
+ /* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((t, o) => /* @__PURE__ */ e(
283
384
  "div",
284
385
  {
285
- className: c(
386
+ className: g(
286
387
  "transition-all duration-200 ease-out",
287
388
  r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
288
389
  ),
289
390
  style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
290
- children: /* @__PURE__ */ d(V, { children: [
291
- /* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
292
- k,
391
+ children: /* @__PURE__ */ l(Q, { children: [
392
+ /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
393
+ N,
293
394
  {
294
395
  size: "icon",
295
396
  variant: "outline",
296
- disabled: n.disabled,
297
- "aria-disabled": n.disabled,
298
- className: c(
397
+ disabled: t.disabled,
398
+ "aria-disabled": t.disabled,
399
+ className: g(
299
400
  "size-11 rounded-full shadow-md",
300
- n.disabled && "opacity-50"
401
+ t.disabled && "opacity-50"
301
402
  ),
302
403
  onClick: () => {
303
- n.disabled || (n.onClick(), s(!1));
404
+ t.disabled || (t.onClick(), s(!1));
304
405
  },
305
- children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
406
+ children: /* @__PURE__ */ e(t.icon, { className: "size-5" })
306
407
  }
307
408
  ) }),
308
- /* @__PURE__ */ e(Y, { side: "left", children: n.label })
409
+ /* @__PURE__ */ e(G, { side: "left", children: t.label })
309
410
  ] })
310
411
  },
311
- n.label
412
+ t.label
312
413
  )) }),
313
414
  /* @__PURE__ */ e(
314
- k,
415
+ N,
315
416
  {
316
417
  size: "icon",
317
418
  variant: "outline",
318
419
  className: "size-11 rounded-full shadow-md",
319
420
  "aria-label": r ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
320
421
  "aria-expanded": r,
321
- onClick: () => s((n) => !n),
322
- children: r ? /* @__PURE__ */ e(H, { className: "size-5" }) : /* @__PURE__ */ e(t, { className: "size-5" })
422
+ onClick: () => s((t) => !t),
423
+ children: r ? /* @__PURE__ */ e(I, { className: "size-5" }) : /* @__PURE__ */ e(n, { className: "size-5" })
323
424
  }
324
425
  )
325
426
  ]
326
427
  }
327
428
  ) });
328
429
  }
329
- function qe({
430
+ function Ve({
330
431
  columns: a = 9,
331
- rows: t = 20,
432
+ rows: n = 20,
332
433
  hasActions: r = !1,
333
434
  actionsCount: s = 1
334
435
  }) {
335
- return /* @__PURE__ */ d(L, { children: [
336
- /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(v, { children: Array.from({ length: a }).map((i, n) => {
337
- const o = r && n === a - 1;
436
+ return /* @__PURE__ */ l(j, { children: [
437
+ /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(C, { children: Array.from({ length: a }).map((i, t) => {
438
+ const o = r && t === a - 1;
338
439
  return /* @__PURE__ */ e(
339
- j,
440
+ B,
340
441
  {
341
442
  className: o ? "w-0 text-right" : "",
342
443
  children: /* @__PURE__ */ e(
343
- w,
444
+ k,
344
445
  {
345
446
  className: o ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
346
447
  }
347
448
  )
348
449
  },
349
- n
450
+ t
350
451
  );
351
452
  }) }) }),
352
- /* @__PURE__ */ e(B, { children: Array.from({ length: t }).map((i, n) => /* @__PURE__ */ e(v, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((o, l) => {
353
- const x = r && l === a - 1;
354
- return /* @__PURE__ */ e($, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, p) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, p)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, l);
355
- }) }, n)) })
453
+ /* @__PURE__ */ e(P, { children: Array.from({ length: n }).map((i, t) => /* @__PURE__ */ e(C, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((o, d) => {
454
+ const p = r && d === a - 1;
455
+ return /* @__PURE__ */ e(U, { children: p ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((b, x) => /* @__PURE__ */ e(k, { className: "ml-auto size-8" }, x)) }) : /* @__PURE__ */ e(k, { className: "h-4 w-full" }) }, d);
456
+ }) }, t)) })
356
457
  ] });
357
458
  }
358
- const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
359
- function ke(a) {
360
- const t = [], r = new RegExp(E);
459
+ const Se = "@[__display__](__id__)", $ = /@\[([^\]]+)\]\(([^)]+)\)/g;
460
+ function _e(a) {
461
+ const n = [], r = new RegExp($);
361
462
  let s;
362
463
  for (; (s = r.exec(a)) !== null; )
363
- t.push({ display: s[1], id: s[2] });
364
- return t;
464
+ n.push({ display: s[1], id: s[2] });
465
+ return n;
365
466
  }
366
- function Ue(a) {
367
- return ke(a).map((t) => ({
368
- userId: t.id,
369
- username: t.display
467
+ function Ge(a) {
468
+ return _e(a).map((n) => ({
469
+ userId: n.id,
470
+ username: n.display
370
471
  }));
371
472
  }
372
- function ve(a, t) {
373
- const { environments: r } = te();
374
- return P({
375
- queryKey: ["organization-users", a, t],
376
- queryFn: () => ae({
473
+ function ze(a, n) {
474
+ const { environments: r } = re();
475
+ return Z({
476
+ queryKey: ["organization-users", a, n],
477
+ queryFn: () => ie({
377
478
  organizationId: a,
378
- search: t,
479
+ search: n,
379
480
  environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
380
481
  }),
381
- enabled: a.length > 0 && t.length > 0
482
+ enabled: a.length > 0 && n.length > 0
382
483
  });
383
484
  }
384
- const Ne = {
485
+ const Ie = {
385
486
  control: {
386
487
  fontSize: 14,
387
488
  fontWeight: "normal"
@@ -433,72 +534,72 @@ const Ne = {
433
534
  }
434
535
  }
435
536
  }
436
- }, Ce = {
537
+ }, Me = {
437
538
  backgroundColor: "var(--accent, #dbeafe)",
438
539
  color: "var(--accent-foreground, #1d4ed8)",
439
540
  fontWeight: 600,
440
541
  borderRadius: 4,
441
542
  padding: "1px 2px"
442
543
  };
443
- function Ke({
544
+ function Ye({
444
545
  value: a,
445
- onChange: t,
546
+ onChange: n,
446
547
  onBlur: r,
447
548
  organizationId: s,
448
549
  placeholder: i,
449
- disabled: n,
550
+ disabled: t,
450
551
  singleLine: o = !1
451
552
  }) {
452
- const [l, x] = F(""), f = ne(l, 200), { data: p } = ve(s, f), y = R(void 0), m = U(
453
- () => p?.map((u) => ({ id: u._id, display: u.username })) ?? [],
454
- [p]
553
+ const [d, p] = L(""), b = se(d, 200), { data: x } = ze(s, b), w = E(void 0), f = W(
554
+ () => x?.map((m) => ({ id: m._id, display: m.username })) ?? [],
555
+ [x]
455
556
  );
456
- return A(() => {
457
- y.current?.(m);
458
- }, [m]), /* @__PURE__ */ e(
459
- W,
557
+ return H(() => {
558
+ w.current?.(f);
559
+ }, [f]), /* @__PURE__ */ e(
560
+ ee,
460
561
  {
461
562
  value: a,
462
- onChange: (u, g) => t(g),
563
+ onChange: (m, u) => n(u),
463
564
  onBlur: r,
464
565
  placeholder: i,
465
- disabled: n,
566
+ disabled: t,
466
567
  singleLine: o,
467
568
  allowSuggestionsAboveCursor: !0,
468
- style: Ne,
569
+ style: Ie,
469
570
  children: /* @__PURE__ */ e(
470
- X,
571
+ te,
471
572
  {
472
573
  trigger: "@",
473
- markup: we,
474
- data: (u, g) => {
475
- y.current = g, x(u), g(m);
574
+ markup: Se,
575
+ data: (m, u) => {
576
+ w.current = u, p(m), u(f);
476
577
  },
477
- displayTransform: (u, g) => `@${g}`,
578
+ displayTransform: (m, u) => `@${u}`,
478
579
  appendSpaceOnAdd: !0,
479
- style: Ce
580
+ style: Me
480
581
  }
481
582
  )
482
583
  }
483
584
  );
484
585
  }
485
- function We({ text: a, className: t }) {
486
- const r = new RegExp(E), s = [];
487
- let i = 0, n, o = 0;
488
- for (; (n = r.exec(a)) !== null; )
489
- n.index > i && s.push(
490
- /* @__PURE__ */ e("span", { children: a.slice(i, n.index) }, o++)
586
+ function Ze({ text: a, className: n }) {
587
+ const r = new RegExp($), s = [];
588
+ let i = 0, t, o = 0;
589
+ for (; (t = r.exec(a)) !== null; )
590
+ t.index > i && s.push(
591
+ /* @__PURE__ */ e("span", { children: a.slice(i, t.index) }, o++)
491
592
  ), s.push(
492
- /* @__PURE__ */ d(Z, { variant: "secondary", className: t, children: [
593
+ /* @__PURE__ */ l(q, { variant: "secondary", className: n, children: [
493
594
  "@",
494
- n[1]
595
+ t[1]
495
596
  ] }, o++)
496
- ), i = n.index + n[0].length;
497
- return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
597
+ ), i = t.index + t[0].length;
598
+ return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(D, { children: s });
498
599
  }
499
- function Xe({
600
+ function Je({
500
601
  size: a = 24,
501
- color: t = "currentColor",
602
+ color: n = "currentColor",
502
603
  ...r
503
604
  }) {
504
605
  return /* @__PURE__ */ e(
@@ -509,7 +610,7 @@ function Xe({
509
610
  height: a,
510
611
  viewBox: "0 0 24 24",
511
612
  fill: "none",
512
- stroke: t,
613
+ stroke: n,
513
614
  "stroke-width": "2",
514
615
  "stroke-linecap": "round",
515
616
  "stroke-linejoin": "round",
@@ -520,47 +621,48 @@ function Xe({
520
621
  );
521
622
  }
522
623
  export {
523
- Le as AsyncBoundary,
524
- Ge as CampaignsSelectInput,
525
- Ye as ClientSelectInput,
526
- me as ErrorCard,
527
- Ze as FieldCalendar,
528
- Je as FieldCheckbox,
529
- et as FieldClientSelectInput,
530
- tt as FieldInput,
531
- nt as FieldLabelWithAsterisk,
532
- at as FieldProfileSelectInput,
533
- rt as FieldResponsibleSelectInput,
534
- st as FieldSaleSelectInput,
535
- it as FieldSelect,
536
- ot as FieldSwitch,
537
- lt as FieldTextarea,
538
- De as HoverContent,
539
- je as IconBadge,
540
- dt as Image,
541
- ct as InfluencerSelectInput,
542
- gt as InstagramIcon,
543
- ut as LinkedInIcon,
544
- Be as List,
545
- $e as ListRow,
546
- Ke as MentionInput,
547
- We as MentionText,
548
- Oe as NotFoundCard,
549
- xt as PageHeader,
550
- bt as PageHeaderActions,
551
- pt as PageHeaderContent,
552
- mt as PageHeaderDescription,
553
- ht as PageHeaderTitle,
554
- ft as PinterestIcon,
555
- yt as ProfileSelectInput,
556
- wt as ResponsibleSelectInput,
557
- kt as SaleSelectInput,
558
- Pe as SpeedDialButton,
559
- qe as TableSkeleton,
560
- vt as TikTokIcon,
561
- Xe as TwitterIcon,
562
- Nt as XIcon,
563
- Ct as YoutubeIcon,
564
- Ue as getMentionedUsers,
565
- ke as parseMentions
624
+ Be as AsyncBoundary,
625
+ Oe as AttachmentInput,
626
+ nt as CampaignsSelectInput,
627
+ at as ClientSelectInput,
628
+ we as ErrorCard,
629
+ rt as FieldCalendar,
630
+ st as FieldCheckbox,
631
+ it as FieldClientSelectInput,
632
+ ot as FieldInput,
633
+ lt as FieldLabelWithAsterisk,
634
+ dt as FieldProfileSelectInput,
635
+ ct as FieldResponsibleSelectInput,
636
+ gt as FieldSaleSelectInput,
637
+ ut as FieldSelect,
638
+ mt as FieldSwitch,
639
+ pt as FieldTextarea,
640
+ Pe as HoverContent,
641
+ Ue as IconBadge,
642
+ xt as Image,
643
+ ht as InfluencerSelectInput,
644
+ bt as InstagramIcon,
645
+ ft as LinkedInIcon,
646
+ Ke as List,
647
+ We as ListRow,
648
+ Ye as MentionInput,
649
+ Ze as MentionText,
650
+ Xe as NotFoundCard,
651
+ yt as PageHeader,
652
+ vt as PageHeaderActions,
653
+ wt as PageHeaderContent,
654
+ kt as PageHeaderDescription,
655
+ Nt as PageHeaderTitle,
656
+ Ct as PinterestIcon,
657
+ St as ProfileSelectInput,
658
+ _t as ResponsibleSelectInput,
659
+ zt as SaleSelectInput,
660
+ Qe as SpeedDialButton,
661
+ Ve as TableSkeleton,
662
+ It as TikTokIcon,
663
+ Je as TwitterIcon,
664
+ Mt as XIcon,
665
+ Rt as YoutubeIcon,
666
+ Ge as getMentionedUsers,
667
+ _e as parseMentions
566
668
  };