@topjoao/top-design-system 0.1.0-beta.8 → 0.1.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.
@@ -0,0 +1,2534 @@
1
+ import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onBeforeUnmount as ee, onMounted as te, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useAttrs as ne, useId as T, useSlots as E, watch as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
2
+ import j from "primevue/button";
3
+ import M from "primevue/tooltip";
4
+ import { twMerge as N } from "tailwind-merge";
5
+ import P from "primevue/dialog";
6
+ import F from "primevue/datepicker";
7
+ import I from "primevue/fileupload";
8
+ import L from "primevue/inputtext";
9
+ import re from "primevue/drawer";
10
+ import ie from "primevue/menu";
11
+ import R from "primevue/autocomplete";
12
+ import z from "primevue/tab";
13
+ import B from "primevue/tablist";
14
+ import V from "primevue/tabpanel";
15
+ import ae from "primevue/tabpanels";
16
+ import H from "primevue/tabs";
17
+ import U from "primevue/toast";
18
+ //#region src/components/TopButton.vue?vue&type=script&setup=true&lang.ts
19
+ var W = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px] bg-transparent" }, oe = /* @__PURE__ */ u({
20
+ __name: "TopButton",
21
+ props: {
22
+ tooltip: { default: "" },
23
+ tooltipClass: { default: "text-xs" },
24
+ label: { default: "" },
25
+ icon: { default: "" },
26
+ loading: {
27
+ type: Boolean,
28
+ default: !1
29
+ },
30
+ class: { default: "" },
31
+ outlined: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ severity: { default: "primary" },
36
+ secondary: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ disabled: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ unstyled: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ type: { default: "button" }
49
+ },
50
+ emits: ["click"],
51
+ setup(e, { emit: t }) {
52
+ let i = E(), o = n(() => !!i.icon), c = e, l = t, u = n(() => c.secondary ? "secondary" : c.severity), d = n(() => {
53
+ let e = c.unstyled ? "" : u.value === "secondary" ? "rounded-[10px] border px-3 py-2 font-bold dark:!border-zinc-500 dark:!bg-zinc-700 dark:!text-zinc-100 dark:hover:!bg-zinc-600" : c.outlined ? u.value === "primary" ? "shrink-0 rounded-[10px] border-primary-800 px-3 py-2 text-primary-800 hover:bg-primary-50 dark:border-primary-200 dark:bg-transparent dark:text-primary-100 dark:hover:bg-primary-900" : "shrink-0 rounded-[10px] border px-3 py-2 font-bold" : u.value === "primary" ? "rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 dark:!text-white" : "rounded-[10px] border px-3 py-2 font-bold";
54
+ return N(e, c.class);
55
+ });
56
+ return (t, n) => (_(), a("span", W, [k((_(), r(w(j), {
57
+ type: e.type,
58
+ label: e.label,
59
+ disabled: e.disabled || e.loading,
60
+ icon: o.value ? void 0 : e.icon || void 0,
61
+ loading: e.loading,
62
+ outlined: e.outlined || u.value === "secondary",
63
+ severity: u.value === "primary" ? void 0 : u.value,
64
+ class: m(d.value),
65
+ pt: { root: { class: d.value } },
66
+ onClick: n[0] ||= (e) => l("click")
67
+ }, s({ _: 2 }, [o.value ? {
68
+ name: "icon",
69
+ fn: O(() => [b(t.$slots, "icon")]),
70
+ key: "0"
71
+ } : void 0]), 1032, [
72
+ "type",
73
+ "label",
74
+ "disabled",
75
+ "icon",
76
+ "loading",
77
+ "outlined",
78
+ "severity",
79
+ "class",
80
+ "pt"
81
+ ])), [[
82
+ w(M),
83
+ {
84
+ value: e.tooltip,
85
+ class: e.tooltipClass
86
+ },
87
+ void 0,
88
+ { top: !0 }
89
+ ]])]));
90
+ }
91
+ }), se = {
92
+ primary: {
93
+ 50: "#EEF9FF",
94
+ 100: "#DFF4FF",
95
+ 200: "#C5E6F8",
96
+ 300: "#8EC4DF",
97
+ 400: "#66ACD1",
98
+ 500: "#2488BC",
99
+ 600: "#036DA3",
100
+ 700: "#1B5783",
101
+ 800: "#02466B",
102
+ 900: "#052F4A",
103
+ 950: "#0C192D"
104
+ },
105
+ secondary: {
106
+ 50: "#FAFAFA",
107
+ 100: "#F4F4F5",
108
+ 200: "#E9E9E9",
109
+ 300: "#D8D8D8",
110
+ 400: "#B8B8B8",
111
+ 500: "#8E8E8E",
112
+ 600: "#676767",
113
+ 700: "#4B4B4B",
114
+ 800: "#343434",
115
+ 900: "#1C1917",
116
+ 950: "#0C0A09"
117
+ },
118
+ success: {
119
+ 50: "#FAFFFA",
120
+ 100: "#F4FBF6",
121
+ 200: "#DFF6DE",
122
+ 300: "#CBE3CA",
123
+ 400: "#A3CCA1",
124
+ 500: "#6BA968",
125
+ 600: "#358F30",
126
+ 700: "#2C7B27",
127
+ 800: "#1E631A",
128
+ 900: "#10430D",
129
+ 950: "#062804"
130
+ },
131
+ warn: {
132
+ 50: "#FFF7ED",
133
+ 100: "#FDF3D8",
134
+ 200: "#FDE9B2",
135
+ 300: "#FDD566",
136
+ 400: "#FFB900",
137
+ 500: "#FFA515",
138
+ 600: "#FD9024",
139
+ 700: "#DD781F",
140
+ 800: "#BC4E00",
141
+ 900: "#A42D02",
142
+ 950: "#792202"
143
+ },
144
+ danger: {
145
+ 50: "#F8E6E4",
146
+ 100: "#FFDDD9",
147
+ 200: "#EEC1BC",
148
+ 300: "#E3938C",
149
+ 400: "#E3675C",
150
+ 500: "#DC3F32",
151
+ 600: "#CF150E",
152
+ 700: "#B10404",
153
+ 800: "#820907",
154
+ 900: "#5D0803",
155
+ 950: "#450501"
156
+ }
157
+ }, G = ["aria-label", "disabled"], K = { class: "flex flex-col items-center gap-2 pt-2" }, q = { class: "text-base font-bold text-secondary-900 dark:text-zinc-100" }, ce = { class: "text-sm leading-5 text-secondary-700 dark:text-zinc-300" }, J = { class: "mt-2 flex w-full items-center justify-center gap-3" }, le = /* @__PURE__ */ u({
158
+ __name: "TopConfirmDialog",
159
+ props: {
160
+ modelValue: {
161
+ type: Boolean,
162
+ default: !1
163
+ },
164
+ title: { default: "Confirmar" },
165
+ message: { default: "" },
166
+ confirmText: { default: "Confirmar" },
167
+ cancelText: { default: "Cancelar" },
168
+ loading: {
169
+ type: Boolean,
170
+ default: !1
171
+ },
172
+ loadingText: { default: "Processando..." },
173
+ severity: { default: "danger" },
174
+ icon: { default: "pi pi-exclamation-triangle" }
175
+ },
176
+ emits: [
177
+ "update:modelValue",
178
+ "confirm",
179
+ "cancel",
180
+ "close"
181
+ ],
182
+ setup(e, { emit: t }) {
183
+ let i = e, a = t, s = n({
184
+ get: () => i.modelValue,
185
+ set: (e) => {
186
+ !e && i.loading || a("update:modelValue", e);
187
+ }
188
+ }), u = n(() => ({
189
+ "--top-confirm-dialog-accent": i.severity === "danger" ? se.danger[600] : se.primary[800],
190
+ "--top-confirm-dialog-accent-hover": i.severity === "danger" ? se.danger[700] : se.primary[700]
191
+ })), d = n(() => ["px-3 py-2 text-sm", i.severity === "danger" ? "!border-red-600 !bg-red-600 hover:!border-red-700 hover:!bg-red-700" : ""].filter(Boolean).join(" "));
192
+ function f() {
193
+ i.loading || a("confirm");
194
+ }
195
+ function p() {
196
+ i.loading || (a("cancel"), s.value = !1);
197
+ }
198
+ function h() {
199
+ i.loading || (s.value = !1);
200
+ }
201
+ return (t, n) => (_(), r(w(P), {
202
+ visible: s.value,
203
+ "onUpdate:visible": n[0] ||= (e) => s.value = e,
204
+ modal: "",
205
+ closable: !1,
206
+ "close-on-escape": !e.loading,
207
+ "dismissable-mask": !1,
208
+ draggable: !1,
209
+ "show-header": !1,
210
+ style: {
211
+ width: "500px",
212
+ maxWidth: "calc(100vw - 2rem)"
213
+ },
214
+ "aria-label": e.title,
215
+ pt: {
216
+ root: { class: "top-confirm-dialog top-solutions-component" },
217
+ content: { class: "p-6" },
218
+ footer: { class: "hidden" }
219
+ },
220
+ onHide: n[1] ||= (e) => a("close")
221
+ }, {
222
+ default: O(() => [o("div", {
223
+ class: "relative flex flex-col items-center gap-4 text-center",
224
+ style: g(u.value)
225
+ }, [
226
+ o("button", {
227
+ type: "button",
228
+ class: "absolute right-[-0.25rem] top-[-0.5rem] flex size-8 items-center justify-center rounded-full border-0 bg-transparent p-0 text-secondary-700 outline-none transition-colors hover:bg-secondary-200 focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:text-zinc-200 dark:hover:bg-zinc-700",
229
+ "aria-label": e.cancelText,
230
+ disabled: e.loading,
231
+ onClick: h
232
+ }, [...n[2] ||= [o("i", {
233
+ class: "pi pi-times text-lg",
234
+ "aria-hidden": "true"
235
+ }, null, -1)]], 8, G),
236
+ o("div", K, [o("i", {
237
+ class: m([e.icon, "top-confirm-dialog__icon text-[40px]"]),
238
+ "aria-hidden": "true"
239
+ }, null, 2), o("p", q, C(e.title), 1)]),
240
+ o("div", ce, [b(t.$slots, "message", {}, () => [b(t.$slots, "default", {}, () => [c(C(e.message), 1)])])]),
241
+ o("div", J, [l(oe, {
242
+ label: e.cancelText,
243
+ secondary: "",
244
+ disabled: e.loading,
245
+ class: "px-3 py-2 text-sm",
246
+ onClick: p
247
+ }, null, 8, ["label", "disabled"]), l(oe, {
248
+ label: e.loading ? e.loadingText : e.confirmText,
249
+ loading: e.loading,
250
+ class: m(d.value),
251
+ onClick: f
252
+ }, null, 8, [
253
+ "label",
254
+ "loading",
255
+ "class"
256
+ ])])
257
+ ], 4)]),
258
+ _: 3
259
+ }, 8, [
260
+ "visible",
261
+ "close-on-escape",
262
+ "aria-label"
263
+ ]));
264
+ }
265
+ }), ue = { class: "top-date-picker top-solutions-component flex w-full flex-col gap-1" }, de = ["for"], fe = {
266
+ key: 0,
267
+ "aria-hidden": "true",
268
+ class: "text-red-600 dark:text-red-400"
269
+ }, pe = ["id"], me = /* @__PURE__ */ u({
270
+ inheritAttrs: !1,
271
+ __name: "TopDatePicker",
272
+ props: {
273
+ modelValue: { default: null },
274
+ label: { default: "" },
275
+ placeholder: { default: "dd/mm/aaaa" },
276
+ required: {
277
+ type: Boolean,
278
+ default: !1
279
+ },
280
+ error: { default: "" },
281
+ invalid: {
282
+ type: Boolean,
283
+ default: !1
284
+ },
285
+ disabled: {
286
+ type: Boolean,
287
+ default: !1
288
+ },
289
+ readonly: {
290
+ type: Boolean,
291
+ default: !1
292
+ },
293
+ selectionMode: { default: "single" },
294
+ dateFormat: { default: "dd/mm/yy" },
295
+ minDate: { default: void 0 },
296
+ maxDate: { default: void 0 },
297
+ showIcon: {
298
+ type: Boolean,
299
+ default: !0
300
+ },
301
+ iconDisplay: { default: "input" },
302
+ manualInput: {
303
+ type: Boolean,
304
+ default: !0
305
+ },
306
+ showButtonBar: {
307
+ type: Boolean,
308
+ default: !1
309
+ },
310
+ appendTo: { default: "body" }
311
+ },
312
+ emits: [
313
+ "update:modelValue",
314
+ "input",
315
+ "change",
316
+ "date-select",
317
+ "show",
318
+ "hide",
319
+ "today-click",
320
+ "clear-click",
321
+ "month-change",
322
+ "year-change",
323
+ "focus",
324
+ "blur",
325
+ "keydown"
326
+ ],
327
+ setup(e, { emit: t }) {
328
+ let r = e, o = t, u = ne(), p = E(), m = T(), g = n(() => u.id === void 0 || u.id === null || u.id === "" ? m : String(u.id)), ee = n(() => `${g.value}-error`), te = n(() => r.invalid || !!r.error), v = n(() => r.manualInput && !r.readonly && !r.disabled && r.selectionMode === "single" && r.dateFormat === "dd/mm/yy"), x = n(() => {
329
+ if (te.value) return !0;
330
+ let e = u["aria-invalid"];
331
+ return typeof e == "boolean" || e === "true" || e === "false" || e === "grammar" || e === "spelling" ? e : void 0;
332
+ }), S = n(() => {
333
+ let e = u["aria-describedby"], t = [typeof e == "string" ? e : "", r.error ? ee.value : ""].filter(Boolean);
334
+ return t.length ? t.join(" ") : void 0;
335
+ }), D = n(() => {
336
+ let { id: e, "aria-describedby": t, "aria-invalid": n, ...r } = u;
337
+ return r;
338
+ }), k = n(() => ({ pcInputText: { root: {
339
+ "aria-describedby": S.value,
340
+ "aria-invalid": x.value,
341
+ onChange: (e) => o("change", e),
342
+ inputmode: v.value ? "numeric" : void 0,
343
+ maxlength: v.value ? 10 : void 0
344
+ } } }));
345
+ function A(e) {
346
+ o("update:modelValue", e ?? null);
347
+ }
348
+ function j(e) {
349
+ let t = e.target;
350
+ if (v.value && t instanceof HTMLInputElement && !e.isComposing) {
351
+ let e = t.value.replace(/\D/g, "").slice(0, 8);
352
+ t.value = [
353
+ e.slice(0, 2),
354
+ e.slice(2, 4),
355
+ e.slice(4, 8)
356
+ ].filter(Boolean).join("/");
357
+ }
358
+ o("input", e);
359
+ }
360
+ return (t, n) => (_(), a("div", ue, [
361
+ e.label ? (_(), a("label", {
362
+ key: 0,
363
+ for: g.value,
364
+ class: "top-field-label text-xs font-bold"
365
+ }, [c(C(e.label) + " ", 1), e.required ? (_(), a("span", fe, "*")) : i("", !0)], 8, de)) : i("", !0),
366
+ l(w(F), f(D.value, {
367
+ "model-value": e.modelValue,
368
+ "input-id": g.value,
369
+ placeholder: e.placeholder,
370
+ required: e.required,
371
+ invalid: te.value,
372
+ disabled: e.disabled,
373
+ readonly: e.readonly,
374
+ "selection-mode": e.selectionMode,
375
+ "date-format": e.dateFormat,
376
+ "update-model-type": "date",
377
+ "min-date": e.minDate,
378
+ "max-date": e.maxDate,
379
+ "show-icon": e.showIcon,
380
+ "icon-display": e.iconDisplay,
381
+ "manual-input": e.manualInput,
382
+ "show-button-bar": e.showButtonBar,
383
+ "append-to": e.appendTo,
384
+ pt: k.value,
385
+ "input-class": "top-date-picker__input top-field-control h-[40px] w-full rounded-[10px] border px-3 py-2 text-xs read-only:cursor-default disabled:cursor-not-allowed",
386
+ "panel-class": "top-date-picker-panel top-solutions-component",
387
+ fluid: "",
388
+ "onUpdate:modelValue": A,
389
+ onInput: j,
390
+ onDateSelect: n[0] ||= (e) => o("date-select", e),
391
+ onShow: n[1] ||= (e) => o("show"),
392
+ onHide: n[2] ||= (e) => o("hide"),
393
+ onTodayClick: n[3] ||= (e) => o("today-click", e),
394
+ onClearClick: n[4] ||= (e) => o("clear-click", e),
395
+ onMonthChange: n[5] ||= (e) => o("month-change", e),
396
+ onYearChange: n[6] ||= (e) => o("year-change", e),
397
+ onFocus: n[7] ||= (e) => o("focus", e),
398
+ onBlur: n[8] ||= (e) => o("blur", e),
399
+ onKeydown: n[9] ||= (e) => o("keydown", e)
400
+ }), s({ _: 2 }, [y(w(p), (e, n) => ({
401
+ name: n,
402
+ fn: O((e) => [b(t.$slots, n, h(d(e ?? {})))])
403
+ }))]), 1040, [
404
+ "model-value",
405
+ "input-id",
406
+ "placeholder",
407
+ "required",
408
+ "invalid",
409
+ "disabled",
410
+ "readonly",
411
+ "selection-mode",
412
+ "date-format",
413
+ "min-date",
414
+ "max-date",
415
+ "show-icon",
416
+ "icon-display",
417
+ "manual-input",
418
+ "show-button-bar",
419
+ "append-to",
420
+ "pt"
421
+ ]),
422
+ e.error ? (_(), a("span", {
423
+ key: 1,
424
+ id: ee.value,
425
+ class: "text-[11px] text-red-600 dark:text-red-400",
426
+ role: "alert"
427
+ }, C(e.error), 9, pe)) : i("", !0)
428
+ ]));
429
+ }
430
+ }), Y = [["path", {
431
+ d: "M17.4776 9.01106C17.485 9.01102 17.4925 9.01101 17.5 9.01101C19.9853 9.01101 22 11.0294 22 13.5193C22 15.8398 20.25 17.7508 18 18M17.4776 9.01106C17.4924 8.84606 17.5 8.67896 17.5 8.51009C17.5 5.46695 15.0376 3 12 3C9.12324 3 6.76233 5.21267 6.52042 8.03192M17.4776 9.01106C17.3753 10.1476 16.9286 11.1846 16.2428 12.0165M6.52042 8.03192C3.98398 8.27373 2 10.4139 2 13.0183C2 15.4417 3.71776 17.4632 6 17.9273M6.52042 8.03192C6.67826 8.01687 6.83823 8.00917 7 8.00917C8.12582 8.00917 9.16474 8.38194 10.0005 9.01101",
432
+ stroke: "currentColor",
433
+ strokeLinecap: "round",
434
+ strokeLinejoin: "round",
435
+ strokeWidth: "1.5",
436
+ key: "0"
437
+ }], ["path", {
438
+ d: "M12 13L12 21M12 13C11.2998 13 9.99153 14.9943 9.5 15.5M12 13C12.7002 13 14.0085 14.9943 14.5 15.5",
439
+ stroke: "currentColor",
440
+ strokeLinecap: "round",
441
+ strokeLinejoin: "round",
442
+ strokeWidth: "1.5",
443
+ key: "1"
444
+ }]], he = [["path", {
445
+ d: "M12.8924 2.80982L21.4876 9.59547C21.8112 9.85095 22 10.2405 22 10.6528C22 11.3969 21.3969 12 20.6528 12H20V15.5C20 18.3284 20 19.7426 19.1213 20.6213C18.2426 21.5 16.8284 21.5 14 21.5H10C7.17157 21.5 5.75736 21.5 4.87868 20.6213C4 19.7426 4 18.3284 4 15.5V12H3.34716C2.60315 12 2 11.3969 2 10.6528C2 10.2405 2.1888 9.85095 2.5124 9.59547L11.1076 2.80982C11.3617 2.60915 11.6761 2.5 12 2.5C12.3239 2.5 12.6383 2.60915 12.8924 2.80982Z",
446
+ stroke: "currentColor",
447
+ strokeLinecap: "round",
448
+ strokeLinejoin: "round",
449
+ strokeWidth: "1.5",
450
+ key: "0"
451
+ }], ["path", {
452
+ d: "M14.5 21.5V17C14.5 16.0654 14.5 15.5981 14.299 15.25C14.1674 15.022 13.978 14.8326 13.75 14.701C13.4019 14.5 12.9346 14.5 12 14.5C11.0654 14.5 10.5981 14.5 10.25 14.701C10.022 14.8326 9.83261 15.022 9.70096 15.25C9.5 15.5981 9.5 16.0654 9.5 17V21.5",
453
+ stroke: "currentColor",
454
+ strokeLinecap: "round",
455
+ strokeLinejoin: "round",
456
+ strokeWidth: "1.5",
457
+ key: "1"
458
+ }]], ge = u({
459
+ name: "HugeiconsIcon",
460
+ inheritAttrs: !1,
461
+ props: {
462
+ icon: {
463
+ type: Array,
464
+ required: !0
465
+ },
466
+ size: {
467
+ type: [Number, String],
468
+ default: 24,
469
+ validator(e) {
470
+ let t = typeof e == "string" ? parseInt(e, 10) : e;
471
+ return !isNaN(t) && t > 0;
472
+ }
473
+ },
474
+ strokeWidth: {
475
+ type: Number,
476
+ default: void 0
477
+ },
478
+ absoluteStrokeWidth: {
479
+ type: Boolean,
480
+ default: !1
481
+ },
482
+ altIcon: {
483
+ type: Array,
484
+ default: void 0
485
+ },
486
+ showAlt: {
487
+ type: Boolean,
488
+ default: !1
489
+ },
490
+ color: {
491
+ type: String,
492
+ default: "currentColor"
493
+ }
494
+ },
495
+ setup(e) {
496
+ let t = n(() => {
497
+ let t = typeof e.size == "string" ? parseInt(e.size, 10) : e.size;
498
+ return !isNaN(t) && t > 0 ? t : 24;
499
+ });
500
+ return {
501
+ computedSize: t,
502
+ calculatedStrokeWidth: n(() => {
503
+ if (e.strokeWidth !== void 0) return e.absoluteStrokeWidth ? e.strokeWidth * 24 / t.value : e.strokeWidth;
504
+ }),
505
+ transformAttrs: (e, t) => {
506
+ let n = {};
507
+ for (let [t, r] of Object.entries(e)) {
508
+ let e = t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
509
+ n[e] = r;
510
+ }
511
+ return t !== void 0 && (n["stroke-width"] = t, n.stroke = "currentColor"), n;
512
+ },
513
+ currentIcon: n(() => e.altIcon && e.showAlt ? e.altIcon : e.icon)
514
+ };
515
+ }
516
+ }), _e = (e, t) => {
517
+ let n = e.__vccOpts || e;
518
+ for (let [e, r] of t) n[e] = r;
519
+ return n;
520
+ }, ve = [
521
+ "width",
522
+ "height",
523
+ "color"
524
+ ];
525
+ function ye(t, n, i, o, s, c) {
526
+ return _(), a("svg", f({
527
+ width: t.computedSize,
528
+ height: t.computedSize,
529
+ viewBox: "0 0 24 24",
530
+ xmlns: "http://www.w3.org/2000/svg",
531
+ fill: "none",
532
+ color: t.color
533
+ }, t.$attrs), [(_(!0), a(e, null, y(t.currentIcon, (e, n) => (_(), r(S(e[0]), f({
534
+ key: n,
535
+ ref_for: !0
536
+ }, t.transformAttrs(e[1], t.calculatedStrokeWidth)), null, 16))), 128))], 16, ve);
537
+ }
538
+ var be = /* @__PURE__ */ _e(ge, [["render", ye], ["__file", "/Users/mahmudulhasan/Desktop/Projects/Hugeicons/hugeicons-monorepo/packages/vue/src/components/HugeiconsIcon.vue"]]), xe = { class: "top-file-upload top-solutions-component flex w-full flex-col gap-1" }, Se = ["for"], Ce = {
539
+ key: 0,
540
+ "aria-hidden": "true",
541
+ class: "text-red-600 dark:text-red-400"
542
+ }, we = { class: "flex min-h-[130px] w-full flex-col items-center justify-center gap-3" }, Te = {
543
+ class: "top-file-upload__empty-icon",
544
+ "aria-hidden": "true"
545
+ }, Ee = {
546
+ key: 0,
547
+ "aria-label": "Carregando...",
548
+ class: "pi pi-spin pi-spinner text-5xl"
549
+ }, De = { class: "m-0 text-center text-xs text-secondary-600 dark:text-zinc-300" }, Oe = {
550
+ key: 1,
551
+ class: "flex w-full flex-col gap-2"
552
+ }, ke = ["src", "alt"], Ae = {
553
+ key: 1,
554
+ class: "flex size-12 shrink-0 items-center justify-center rounded-lg bg-primary-50 text-primary-800 dark:bg-primary-950 dark:text-primary-200"
555
+ }, je = { class: "min-w-0 flex-1" }, Me = { class: "m-0 truncate text-xs font-bold text-secondary-900 dark:text-zinc-100" }, Ne = { class: "text-[11px] text-secondary-500 dark:text-zinc-400" }, X = [
556
+ "aria-label",
557
+ "disabled",
558
+ "onClick"
559
+ ], Pe = ["id"], Fe = /* @__PURE__ */ u({
560
+ inheritAttrs: !1,
561
+ __name: "TopFileUpload",
562
+ props: {
563
+ modelValue: { default: null },
564
+ label: { default: "" },
565
+ placeholder: { default: "Arraste e solte o arquivo aqui" },
566
+ required: {
567
+ type: Boolean,
568
+ default: !1
569
+ },
570
+ disabled: {
571
+ type: Boolean,
572
+ default: !1
573
+ },
574
+ accept: { default: "" },
575
+ multiple: {
576
+ type: Boolean,
577
+ default: !1
578
+ },
579
+ maxFileSize: { default: null },
580
+ maxFiles: { default: null },
581
+ error: { default: "" },
582
+ selectLabel: { default: "Selecionar arquivo" },
583
+ removeLabel: { default: "Remover" },
584
+ loading: {
585
+ type: Boolean,
586
+ default: !1
587
+ }
588
+ },
589
+ emits: [
590
+ "update:modelValue",
591
+ "select",
592
+ "change",
593
+ "remove",
594
+ "clear",
595
+ "error"
596
+ ],
597
+ setup(t, { expose: s, emit: u }) {
598
+ let d = t, f = u, m = ne(), h = T(), g = v(null), x = v(F(d.modelValue)), S = v([]), E = /* @__PURE__ */ new Map(), k = n(() => m.id === void 0 || m.id === null || m.id === "" ? h : String(m.id)), A = n(() => `${k.value}-error`), j = n(() => d.error || S.value[0]?.message || ""), M = n(() => d.disabled || d.loading), N = n(() => {
599
+ let e = m["aria-describedby"], t = [typeof e == "string" ? e : "", j.value ? A.value : ""].filter(Boolean);
600
+ return t.length ? t.join(" ") : void 0;
601
+ }), P = n(() => ({
602
+ ...m,
603
+ id: k.value,
604
+ required: d.required,
605
+ "aria-invalid": j.value ? !0 : m["aria-invalid"],
606
+ "aria-describedby": N.value,
607
+ "aria-label": m["aria-label"] || (d.label ? void 0 : d.selectLabel)
608
+ }));
609
+ function F(e) {
610
+ return e ? Array.isArray(e) ? d.multiple ? [...e] : e.slice(0, 1) : [e] : [];
611
+ }
612
+ function L(e, t) {
613
+ return e.name === t.name && e.type === t.type && e.size === t.size;
614
+ }
615
+ function re(e) {
616
+ return !d.accept.trim() || d.accept.split(",").some((t) => {
617
+ let n = t.trim().toLowerCase(), r = e.type.toLowerCase();
618
+ return n ? n.startsWith(".") ? e.name.toLowerCase().endsWith(n) : n.endsWith("/*") ? r.startsWith(n.slice(0, -1)) : r === n : !1;
619
+ });
620
+ }
621
+ function ie(e) {
622
+ return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(2)} MB`;
623
+ }
624
+ function R(e) {
625
+ let t = [];
626
+ return {
627
+ errors: t,
628
+ validFiles: e.filter((e) => re(e) ? d.maxFileSize && e.size > d.maxFileSize ? (t.push({
629
+ code: "file-size",
630
+ file: e,
631
+ message: `O arquivo "${e.name}" excede o tamanho máximo de ${ie(d.maxFileSize)}.`
632
+ }), !1) : !0 : (t.push({
633
+ code: "file-type",
634
+ file: e,
635
+ message: `O arquivo "${e.name}" não possui um tipo aceito.`
636
+ }), !1))
637
+ };
638
+ }
639
+ function z(e) {
640
+ let t = e.originalEvent;
641
+ return Array.from(t.dataTransfer?.files ?? t.target?.files ?? []);
642
+ }
643
+ function B(e) {
644
+ return d.multiple ? [...e] : e[0] ?? null;
645
+ }
646
+ function V() {
647
+ g.value && (g.value.files = [...x.value]);
648
+ }
649
+ function ae(e, t) {
650
+ x.value = e, S.value = [], q(), p(V);
651
+ let n = B(e);
652
+ f("update:modelValue", n), f("change", n), t === "select" && f("select", [...e]), t === "clear" && f("clear");
653
+ }
654
+ function H(e) {
655
+ let { errors: t, validFiles: n } = R(z(e)), r = d.multiple ? [...x.value, ...n.filter((e) => !x.value.some((t) => L(t, e)))] : n.slice(-1);
656
+ if (d.maxFiles && r.length > d.maxFiles) {
657
+ let e = r.slice(d.maxFiles);
658
+ t.push(...e.map((e) => ({
659
+ code: "file-limit",
660
+ file: e,
661
+ message: `O limite máximo é de ${d.maxFiles} arquivo(s).`
662
+ }))), r = r.slice(0, d.maxFiles);
663
+ }
664
+ if (t.length ? (S.value = t, f("error", t)) : S.value = [], V(), n.length && !U(r, x.value)) {
665
+ x.value = r, q(), p(V);
666
+ let e = B(r);
667
+ f("update:modelValue", e), f("change", e), f("select", [...r]);
668
+ }
669
+ }
670
+ function U(e, t) {
671
+ return e.length === t.length && e.every((e, n) => L(e, t[n]));
672
+ }
673
+ function W() {
674
+ M.value || g.value?.choose();
675
+ }
676
+ function se(e, t) {
677
+ if (M.value) return;
678
+ let n = x.value[t];
679
+ if (!n) return;
680
+ e(t);
681
+ let r = x.value.filter((e, n) => n !== t);
682
+ ae(r, "remove"), f("remove", n, t), r.length || f("clear");
683
+ }
684
+ function G() {
685
+ M.value || !x.value.length || ae([], "clear");
686
+ }
687
+ function K(e) {
688
+ if (!e.type.startsWith("image/") || typeof URL.createObjectURL != "function") return "";
689
+ let t = E.get(e);
690
+ if (t) return t;
691
+ let n = URL.createObjectURL(e);
692
+ return E.set(e, n), n;
693
+ }
694
+ function q() {
695
+ for (let [e, t] of E) x.value.includes(e) || (URL.revokeObjectURL(t), E.delete(e));
696
+ }
697
+ return D(() => d.modelValue, (e) => {
698
+ let t = F(e);
699
+ U(t, x.value) || (x.value = t, S.value = [], q(), p(V));
700
+ }), D(() => d.multiple, () => {
701
+ let e = F(d.modelValue);
702
+ x.value = e, q(), p(V);
703
+ }), te(V), ee(() => {
704
+ for (let e of E.values()) URL.revokeObjectURL(e);
705
+ E.clear();
706
+ }), s({
707
+ choose: W,
708
+ clear: G
709
+ }), (n, s) => (_(), a("div", xe, [
710
+ t.label ? (_(), a("label", {
711
+ key: 0,
712
+ for: k.value,
713
+ class: "text-xs font-bold text-secondary-800 dark:text-zinc-200"
714
+ }, [c(C(t.label) + " ", 1), t.required ? (_(), a("span", Ce, "*")) : i("", !0)], 8, Se)) : i("", !0),
715
+ l(w(I), {
716
+ ref_key: "fileUploadRef",
717
+ ref: g,
718
+ mode: "advanced",
719
+ accept: t.accept || void 0,
720
+ multiple: t.multiple,
721
+ disabled: M.value,
722
+ "custom-upload": !0,
723
+ "show-upload-button": !1,
724
+ "show-cancel-button": !1,
725
+ pt: {
726
+ root: { class: "top-file-upload__root w-full" },
727
+ header: { class: "hidden" },
728
+ input: P.value,
729
+ content: { class: [
730
+ "top-file-upload__dropzone min-h-[224px] rounded-[10px] border p-4 transition-colors",
731
+ j.value ? "border-red-600 bg-red-50 dark:border-red-400 dark:bg-red-950/20" : "border-secondary-300 bg-white hover:border-primary-600 hover:bg-primary-50 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:border-primary-400 dark:hover:bg-zinc-700",
732
+ M.value ? "cursor-not-allowed opacity-60" : ""
733
+ ].join(" ") }
734
+ },
735
+ onSelect: H
736
+ }, {
737
+ content: O(({ removeFileCallback: c }) => [o("div", we, [x.value.length ? (_(), a("div", Oe, [(_(!0), a(e, null, y(x.value, (e, r) => (_(), a("div", {
738
+ key: `${e.name}-${e.size}-${e.lastModified}`,
739
+ class: "flex min-w-0 items-center gap-3 rounded-[10px] border border-secondary-300 bg-white p-3 dark:border-zinc-600 dark:bg-zinc-900"
740
+ }, [
741
+ b(n.$slots, "preview", {
742
+ file: e,
743
+ index: r,
744
+ url: K(e)
745
+ }, () => [K(e) ? (_(), a("img", {
746
+ key: 0,
747
+ src: K(e),
748
+ alt: `Pré-visualização de ${e.name}`,
749
+ class: "size-12 shrink-0 rounded-lg object-cover"
750
+ }, null, 8, ke)) : (_(), a("span", Ae, [...s[0] ||= [o("i", {
751
+ class: "pi pi-file text-2xl",
752
+ "aria-hidden": "true"
753
+ }, null, -1)]]))]),
754
+ o("div", je, [o("p", Me, C(e.name), 1), o("span", Ne, C(ie(e.size)), 1)]),
755
+ o("button", {
756
+ type: "button",
757
+ class: "flex size-8 shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0 text-red-600 transition-colors hover:bg-red-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:text-red-400 dark:hover:bg-red-950/40 dark:focus-visible:ring-offset-zinc-900",
758
+ "aria-label": `${t.removeLabel}: ${e.name}`,
759
+ disabled: M.value,
760
+ onClick: (e) => se(c, r)
761
+ }, [...s[1] ||= [o("i", {
762
+ class: "pi pi-times",
763
+ "aria-hidden": "true"
764
+ }, null, -1)]], 8, X)
765
+ ]))), 128)), t.multiple && (!t.maxFiles || x.value.length < t.maxFiles) ? (_(), r(oe, {
766
+ key: 0,
767
+ label: t.selectLabel,
768
+ icon: "pi pi-plus-circle",
769
+ outlined: "",
770
+ disabled: t.disabled,
771
+ loading: t.loading,
772
+ class: "mt-1 px-3 py-2 text-xs",
773
+ onClick: W
774
+ }, null, 8, [
775
+ "label",
776
+ "disabled",
777
+ "loading"
778
+ ])) : i("", !0)])) : b(n.$slots, "empty", {
779
+ choose: W,
780
+ disabled: M.value
781
+ }, () => [
782
+ o("span", Te, [t.loading ? (_(), a("i", Ee)) : (_(), r(w(be), {
783
+ key: 1,
784
+ icon: w(Y),
785
+ size: 72,
786
+ "stroke-width": 1.5,
787
+ class: "text-primary-800 dark:text-primary-300"
788
+ }, null, 8, ["icon"]))]),
789
+ o("p", De, C(t.placeholder), 1),
790
+ l(oe, {
791
+ label: t.selectLabel,
792
+ icon: "pi pi-plus-circle",
793
+ disabled: t.disabled,
794
+ loading: t.loading,
795
+ class: "px-3 py-2 text-xs",
796
+ onClick: W
797
+ }, null, 8, [
798
+ "label",
799
+ "disabled",
800
+ "loading"
801
+ ])
802
+ ], void 0, 0)])]),
803
+ _: 3
804
+ }, 8, [
805
+ "accept",
806
+ "multiple",
807
+ "disabled",
808
+ "pt"
809
+ ]),
810
+ j.value ? (_(), a("span", {
811
+ key: 1,
812
+ id: A.value,
813
+ class: "text-[11px] text-red-600 dark:text-red-400",
814
+ role: "alert"
815
+ }, C(j.value), 9, Pe)) : i("", !0)
816
+ ]));
817
+ }
818
+ }), Z = { class: "top-input-text top-solutions-component flex w-full flex-col gap-1" }, Ie = ["for"], Le = {
819
+ key: 0,
820
+ "aria-hidden": "true",
821
+ class: "text-red-600 dark:text-red-400"
822
+ }, Re = ["id"], ze = /* @__PURE__ */ u({
823
+ inheritAttrs: !1,
824
+ __name: "TopInputText",
825
+ props: {
826
+ modelValue: { default: "" },
827
+ label: { default: "" },
828
+ placeholder: { default: "" },
829
+ required: {
830
+ type: Boolean,
831
+ default: !1
832
+ },
833
+ error: { default: "" },
834
+ disabled: {
835
+ type: Boolean,
836
+ default: !1
837
+ },
838
+ readonly: {
839
+ type: Boolean,
840
+ default: !1
841
+ }
842
+ },
843
+ emits: ["update:modelValue"],
844
+ setup(e, { emit: t }) {
845
+ let r = e, o = t, s = ne(), u = T(), d = n(() => s.id === void 0 || s.id === null || s.id === "" ? u : String(s.id)), p = n(() => `${d.value}-error`), m = n(() => {
846
+ if (r.error) return !0;
847
+ let e = s["aria-invalid"];
848
+ return typeof e == "boolean" || e === "true" || e === "false" || e === "grammar" || e === "spelling" ? e : void 0;
849
+ }), h = n(() => {
850
+ let e = s["aria-describedby"], t = [typeof e == "string" ? e : "", r.error ? p.value : ""].filter(Boolean);
851
+ return t.length ? t.join(" ") : void 0;
852
+ });
853
+ function g(e) {
854
+ o("update:modelValue", e ?? "");
855
+ }
856
+ return (t, n) => (_(), a("div", Z, [
857
+ e.label ? (_(), a("label", {
858
+ key: 0,
859
+ for: d.value,
860
+ class: "top-field-label text-xs font-bold"
861
+ }, [c(C(e.label) + " ", 1), e.required ? (_(), a("span", Le, "*")) : i("", !0)], 8, Ie)) : i("", !0),
862
+ l(w(L), f(t.$attrs, {
863
+ id: d.value,
864
+ "model-value": e.modelValue,
865
+ type: "text",
866
+ placeholder: e.placeholder,
867
+ required: e.required,
868
+ disabled: e.disabled,
869
+ readonly: e.readonly,
870
+ invalid: !!e.error,
871
+ "aria-invalid": m.value,
872
+ "aria-describedby": h.value,
873
+ fluid: "",
874
+ class: "top-input-text__control top-field-control h-[40px] w-full rounded-[10px] border px-3 py-2 text-xs read-only:cursor-default disabled:cursor-not-allowed",
875
+ "onUpdate:modelValue": g
876
+ }), null, 16, [
877
+ "id",
878
+ "model-value",
879
+ "placeholder",
880
+ "required",
881
+ "disabled",
882
+ "readonly",
883
+ "invalid",
884
+ "aria-invalid",
885
+ "aria-describedby"
886
+ ]),
887
+ e.error ? (_(), a("span", {
888
+ key: 1,
889
+ id: p.value,
890
+ class: "text-[11px] text-red-600 dark:text-red-400",
891
+ role: "alert"
892
+ }, C(e.error), 9, Re)) : i("", !0)
893
+ ]));
894
+ }
895
+ }), Be = [
896
+ "disabled",
897
+ "aria-expanded",
898
+ "onClick"
899
+ ], Ve = { class: "top-nav-bar__mobile-item-label" }, He = {
900
+ key: 1,
901
+ class: "top-nav-bar__mobile-count",
902
+ "aria-hidden": "true"
903
+ }, Ue = /* @__PURE__ */ u({
904
+ name: "TopNavMobileTree",
905
+ __name: "TopNavMobileTree",
906
+ props: {
907
+ items: {},
908
+ activeItemId: { default: "" },
909
+ level: { default: 0 },
910
+ forceOpen: {
911
+ type: Boolean,
912
+ default: !1
913
+ },
914
+ showSectionDividers: {
915
+ type: Boolean,
916
+ default: !1
917
+ }
918
+ },
919
+ emits: ["select"],
920
+ setup(s, { emit: c }) {
921
+ let u = s, d = c, f = v(/* @__PURE__ */ new Set());
922
+ function p(e) {
923
+ return e.children?.filter(Boolean) ?? [];
924
+ }
925
+ function h(e) {
926
+ return e.id === u.activeItemId || p(e).some(h);
927
+ }
928
+ function ee(e) {
929
+ return u.forceOpen || f.value.has(e.id);
930
+ }
931
+ function te(e) {
932
+ if (e.disabled) return;
933
+ if (!p(e).length) {
934
+ d("select", e);
935
+ return;
936
+ }
937
+ let t = new Set(f.value);
938
+ t.has(e.id) ? t.delete(e.id) : t.add(e.id), f.value = t;
939
+ }
940
+ D(() => [u.activeItemId, u.items], () => {
941
+ let e = new Set(f.value);
942
+ u.items.forEach((t) => {
943
+ p(t).length && h(t) && e.add(t.id);
944
+ }), f.value = e;
945
+ }, {
946
+ immediate: !0,
947
+ deep: !0
948
+ });
949
+ let b = n(() => u.level > 0 ? { "--top-nav-tree-level": String(u.level) } : void 0);
950
+ return (n, c) => {
951
+ let u = x("TopNavMobileTree", !0);
952
+ return _(), a("div", {
953
+ class: m(["top-nav-bar__mobile-tree", {
954
+ "top-nav-bar__mobile-tree--nested": s.level > 0,
955
+ "top-nav-bar__mobile-tree--sections": s.showSectionDividers && s.level === 0
956
+ }]),
957
+ style: g(b.value)
958
+ }, [(_(!0), a(e, null, y(s.items, (e, n) => (_(), a("div", {
959
+ key: e.id,
960
+ class: m(["top-nav-bar__mobile-node", { "top-nav-bar__mobile-node--section": s.showSectionDividers && s.level === 0 && n > 0 }])
961
+ }, [o("button", {
962
+ class: m(["top-nav-bar__mobile-item", {
963
+ "top-nav-bar__mobile-item--active": e.id === s.activeItemId,
964
+ "top-nav-bar__mobile-item--ancestor": e.id !== s.activeItemId && h(e)
965
+ }]),
966
+ type: "button",
967
+ disabled: e.disabled,
968
+ "aria-expanded": p(e).length ? ee(e) : void 0,
969
+ onClick: (t) => te(e)
970
+ }, [
971
+ e.icon ? (_(), a("i", {
972
+ key: 0,
973
+ class: m(e.icon),
974
+ "aria-hidden": "true"
975
+ }, null, 2)) : i("", !0),
976
+ o("span", Ve, C(e.label), 1),
977
+ p(e).length ? (_(), a("span", He, C(p(e).length), 1)) : i("", !0),
978
+ p(e).length ? (_(), a("i", {
979
+ key: 2,
980
+ class: m(["pi pi-chevron-down top-nav-bar__mobile-chevron", { "top-nav-bar__mobile-chevron--open": ee(e) }]),
981
+ "aria-hidden": "true"
982
+ }, null, 2)) : i("", !0)
983
+ ], 10, Be), l(t, { name: "top-nav-bar-menu-expand" }, {
984
+ default: O(() => [p(e).length && ee(e) ? (_(), r(u, {
985
+ key: 0,
986
+ items: p(e),
987
+ "active-item-id": s.activeItemId,
988
+ level: s.level + 1,
989
+ "force-open": s.forceOpen,
990
+ onSelect: c[0] ||= (e) => d("select", e)
991
+ }, null, 8, [
992
+ "items",
993
+ "active-item-id",
994
+ "level",
995
+ "force-open"
996
+ ])) : i("", !0)]),
997
+ _: 2
998
+ }, 1024)], 2))), 128))], 6);
999
+ };
1000
+ }
1001
+ }), We = ["aria-expanded"], Ge = { class: "top-nav-bar__brand" }, Ke = {
1002
+ key: 1,
1003
+ class: "top-nav-bar__brand-context-divider",
1004
+ "aria-hidden": "true"
1005
+ }, qe = {
1006
+ key: 2,
1007
+ class: "top-nav-bar__context"
1008
+ }, Je = {
1009
+ key: 0,
1010
+ class: "top-nav-bar__client"
1011
+ }, Ye = ["src"], Xe = {
1012
+ key: 1,
1013
+ class: "top-nav-bar__client-logo"
1014
+ }, Ze = {
1015
+ key: 2,
1016
+ class: "top-nav-bar__client-details"
1017
+ }, Qe = { class: "top-nav-bar__client-name" }, $e = {
1018
+ key: 0,
1019
+ class: "top-nav-bar__client-subtitle"
1020
+ }, et = { class: "top-nav-bar__desktop-tools" }, tt = {
1021
+ key: 0,
1022
+ class: "top-nav-bar__search-shell",
1023
+ "data-top-nav-search": ""
1024
+ }, nt = ["value", "placeholder"], rt = ["aria-label"], it = {
1025
+ key: 1,
1026
+ class: "top-nav-bar__search-results",
1027
+ role: "menu"
1028
+ }, at = { class: "top-nav-bar__search-results-scroll" }, ot = ["disabled", "onClick"], st = {
1029
+ key: 0,
1030
+ class: "top-nav-bar__empty"
1031
+ }, ct = {
1032
+ key: 1,
1033
+ class: "top-nav-bar__quick-actions",
1034
+ "data-top-nav-actions": ""
1035
+ }, lt = [
1036
+ "disabled",
1037
+ "aria-label",
1038
+ "aria-pressed",
1039
+ "title",
1040
+ "onClick"
1041
+ ], ut = ["aria-expanded"], dt = {
1042
+ key: 0,
1043
+ class: "top-nav-bar__popover-layer top-nav-bar__actions-layer"
1044
+ }, ft = {
1045
+ class: "top-nav-bar__small-panel",
1046
+ role: "menu"
1047
+ }, pt = ["disabled", "onClick"], mt = {
1048
+ key: 2,
1049
+ class: "top-nav-bar__custom-actions"
1050
+ }, ht = ["aria-haspopup", "aria-expanded"], gt = ["src"], _t = {
1051
+ key: 1,
1052
+ class: "top-nav-bar__user-avatar"
1053
+ }, vt = {
1054
+ key: 2,
1055
+ class: "top-nav-bar__user-details"
1056
+ }, yt = { class: "top-nav-bar__user-name" }, bt = {
1057
+ key: 0,
1058
+ class: "top-nav-bar__user-subtitle"
1059
+ }, xt = {
1060
+ key: 0,
1061
+ class: "pi pi-chevron-down top-nav-bar__chevron",
1062
+ "aria-hidden": "true"
1063
+ }, St = {
1064
+ key: 0,
1065
+ class: "top-nav-bar__popover-layer top-nav-bar__user-layer"
1066
+ }, Ct = {
1067
+ class: "top-nav-bar__small-panel top-nav-bar__user-dropdown",
1068
+ role: "menu"
1069
+ }, wt = {
1070
+ key: 0,
1071
+ class: "top-nav-bar__user-separator",
1072
+ role: "separator"
1073
+ }, Tt = ["disabled", "onClick"], Et = {
1074
+ class: "top-nav-bar__breadcrumbs",
1075
+ "aria-label": "Breadcrumb"
1076
+ }, Dt = {
1077
+ key: 0,
1078
+ class: "top-nav-bar__separator top-nav-bar__desktop-navigation-separator",
1079
+ "aria-hidden": "true"
1080
+ }, Ot = ["aria-expanded"], kt = {
1081
+ key: 0,
1082
+ class: "top-nav-bar__menu-layer"
1083
+ }, At = {
1084
+ class: "top-nav-bar__menu-panel",
1085
+ role: "menu"
1086
+ }, jt = { class: "top-nav-bar__section-list" }, Mt = [
1087
+ "aria-expanded",
1088
+ "onMouseenter",
1089
+ "onClick"
1090
+ ], Nt = { class: "top-nav-bar__menu-label" }, Pt = { class: "top-nav-bar__item-count" }, Ft = {
1091
+ key: 0,
1092
+ class: "top-nav-bar__submenu-region"
1093
+ }, It = [
1094
+ "disabled",
1095
+ "aria-haspopup",
1096
+ "aria-expanded",
1097
+ "onMouseenter",
1098
+ "onClick"
1099
+ ], Lt = { class: "top-nav-bar__menu-label" }, Rt = {
1100
+ key: 1,
1101
+ class: "pi pi-chevron-right top-nav-bar__menu-arrow",
1102
+ "aria-hidden": "true"
1103
+ }, zt = ["onMouseenter"], Bt = {
1104
+ key: 0,
1105
+ class: "top-nav-bar__crumb top-nav-bar__crumb--static"
1106
+ }, Vt = ["aria-expanded", "onClick"], Ht = {
1107
+ key: 2,
1108
+ class: "top-nav-bar__menu-layer"
1109
+ }, Ut = {
1110
+ class: "top-nav-bar__menu-panel top-nav-bar__breadcrumb-panel",
1111
+ role: "menu"
1112
+ }, Wt = [
1113
+ "disabled",
1114
+ "onMouseenter",
1115
+ "onClick"
1116
+ ], Gt = { class: "top-nav-bar__menu-label" }, Kt = {
1117
+ key: 1,
1118
+ class: "pi pi-chevron-right top-nav-bar__menu-arrow",
1119
+ "aria-hidden": "true"
1120
+ }, qt = ["onClick"], Jt = ["title"], Yt = { class: "top-nav-bar__current-label" }, Xt = ["aria-label", "aria-pressed"], Zt = { class: "top-nav-bar__breadcrumb-actions" }, Qt = ["aria-expanded"], $t = {
1121
+ key: 0,
1122
+ class: "top-nav-bar__popover-layer top-nav-bar__favorites-layer"
1123
+ }, en = {
1124
+ class: "top-nav-bar__small-panel top-nav-bar__favorites-panel",
1125
+ role: "menu"
1126
+ }, tn = ["disabled", "onClick"], nn = { class: "top-nav-bar__favorites-title" }, rn = {
1127
+ key: 0,
1128
+ class: "top-nav-bar__favorites-separator"
1129
+ }, an = {
1130
+ key: 0,
1131
+ class: "top-nav-bar__favorites-row top-nav-bar__desktop-only"
1132
+ }, on = { class: "top-nav-bar__favorites-title" }, sn = { class: "top-nav-bar__favorites-list" }, cn = {
1133
+ key: 0,
1134
+ class: "top-nav-bar__favorites-separator",
1135
+ "aria-hidden": "true"
1136
+ }, ln = ["disabled", "onClick"], un = { class: "top-nav-bar__mobile-menu" }, dn = { class: "top-nav-bar__mobile-menu-header" }, fn = { class: "top-nav-bar__drawer-brand" }, pn = ["onClick"], mn = {
1137
+ key: 0,
1138
+ class: "top-nav-bar__drawer-tools"
1139
+ }, hn = { class: "top-nav-bar__drawer-search" }, gn = ["value", "placeholder"], _n = ["disabled", "onClick"], vn = { class: "top-nav-bar__mobile-menu-scroll" }, yn = { class: "top-nav-bar__mobile-menu-track" }, bn = {
1140
+ key: 0,
1141
+ class: "top-nav-bar__mobile-favorites"
1142
+ }, xn = ["aria-expanded"], Sn = { class: "top-nav-bar__mobile-item-label" }, Cn = { class: "top-nav-bar__mobile-count" }, wn = {
1143
+ key: 1,
1144
+ class: "top-nav-bar__drawer-empty"
1145
+ }, Tn = {
1146
+ key: 1,
1147
+ class: "top-nav-bar__mobile-footer"
1148
+ }, En = ["aria-haspopup", "aria-expanded"], Dn = ["src"], On = {
1149
+ key: 1,
1150
+ class: "top-nav-bar__user-avatar"
1151
+ }, kn = {
1152
+ key: 2,
1153
+ class: "top-nav-bar__user-details"
1154
+ }, An = { class: "top-nav-bar__user-name" }, jn = {
1155
+ key: 0,
1156
+ class: "top-nav-bar__user-subtitle"
1157
+ }, Mn = {
1158
+ key: 3,
1159
+ class: "pi pi-chevron-down top-nav-bar__mobile-chevron",
1160
+ "aria-hidden": "true"
1161
+ }, Nn = 120, Pn = 24, Fn = /* @__PURE__ */ u({
1162
+ __name: "TopNavBar",
1163
+ props: {
1164
+ sections: { default: () => [] },
1165
+ breadcrumbs: { default: () => [] },
1166
+ homeItem: { default: () => ({
1167
+ id: "home",
1168
+ label: "Início",
1169
+ to: "/"
1170
+ }) },
1171
+ navigationLabel: { default: "Navegação" },
1172
+ activeItemId: { default: "" },
1173
+ searchable: {
1174
+ type: Boolean,
1175
+ default: !1
1176
+ },
1177
+ searchValue: { default: void 0 },
1178
+ searchPlaceholder: { default: "Pesquisar no menu..." },
1179
+ searchResults: { default: void 0 },
1180
+ showAia: {
1181
+ type: Boolean,
1182
+ default: !1
1183
+ },
1184
+ aiaActive: {
1185
+ type: Boolean,
1186
+ default: !1
1187
+ },
1188
+ aiaLabel: { default: "Aia" },
1189
+ showSupport: {
1190
+ type: Boolean,
1191
+ default: !1
1192
+ },
1193
+ supportLabel: { default: "Central de Suporte" },
1194
+ actions: { default: () => [] },
1195
+ client: {},
1196
+ user: { default: void 0 },
1197
+ userMenuItems: { default: () => [] },
1198
+ favoriteItems: { default: () => [] },
1199
+ showFavoriteToggle: {
1200
+ type: Boolean,
1201
+ default: !1
1202
+ },
1203
+ favoriteActive: {
1204
+ type: Boolean,
1205
+ default: !1
1206
+ },
1207
+ favoriteLabel: { default: "Favoritos" },
1208
+ mobileOpen: {
1209
+ type: Boolean,
1210
+ default: void 0
1211
+ },
1212
+ appearance: { default: () => ({}) }
1213
+ },
1214
+ emits: [
1215
+ "navigate",
1216
+ "search",
1217
+ "update:searchValue",
1218
+ "update:mobileOpen",
1219
+ "toggle-aia",
1220
+ "open-support",
1221
+ "toggle-favorite",
1222
+ "action",
1223
+ "user-action",
1224
+ "user-click"
1225
+ ],
1226
+ setup(s, { expose: u, emit: d }) {
1227
+ let f = s, h = d, x = E(), S = v(null), ne = v(null), T = v(null), k = v(null), j = v(null), M = v(null), N = v(f.mobileOpen ?? !1), P = v(!1), F = v(null), I = v([]), L = v(null), R = v([]), z = v(!1), B = v(!1), V = v(!1), ae = v(null), H = v(!1), U = v(!1), W = v(!1), oe = v(!0), se = v(!1), G = v(f.searchValue ?? ""), K = v(!1), q = v(!1), ce = v(!1), J = v({
1228
+ collapseActions: !1,
1229
+ searchIconOnly: !1,
1230
+ hideUserName: !1,
1231
+ hideContextDetails: !1
1232
+ }), le, ue, de, fe, pe = 0;
1233
+ function me(e) {
1234
+ return (e.children ?? []).filter(Boolean).map((e) => {
1235
+ let t = me(e);
1236
+ if (!t.length) {
1237
+ let { children: t, ...n } = e;
1238
+ return n;
1239
+ }
1240
+ return {
1241
+ ...e,
1242
+ children: t
1243
+ };
1244
+ });
1245
+ }
1246
+ let Y = n(() => f.sections.map((e) => ({
1247
+ ...e,
1248
+ children: me(e)
1249
+ })).filter((e) => e.children.length > 0));
1250
+ function ge(e, t = []) {
1251
+ return e.forEach((e) => {
1252
+ let n = e.children ?? [];
1253
+ n.length ? ge(n, t) : t.push(e);
1254
+ }), t;
1255
+ }
1256
+ let _e = n(() => Y.value.flatMap((e) => ge(e.children)));
1257
+ function ve(e) {
1258
+ return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase("pt-BR");
1259
+ }
1260
+ let ye = n(() => {
1261
+ if (f.searchResults !== void 0) return f.searchResults;
1262
+ let e = ve(G.value.trim());
1263
+ return e ? _e.value.filter((t) => ve(t.label).includes(e)) : _e.value;
1264
+ });
1265
+ function xe(e, t) {
1266
+ return t ? e.flatMap((e) => {
1267
+ let n = ve(e.label).includes(t), r = xe(e.children ?? [], t);
1268
+ return !n && !r.length ? [] : [{
1269
+ ...e,
1270
+ children: n ? e.children : r
1271
+ }];
1272
+ }) : e;
1273
+ }
1274
+ let Se = n(() => xe(Y.value, ve(G.value.trim())));
1275
+ function Ce(e, t, n = []) {
1276
+ for (let r of e) {
1277
+ let e = [...n, r];
1278
+ if (r.id === t) return e;
1279
+ let i = Ce(r.children ?? [], t, e);
1280
+ if (i) return i;
1281
+ }
1282
+ return null;
1283
+ }
1284
+ function we(e, t) {
1285
+ for (let n of e) {
1286
+ if (n.id === t) return n;
1287
+ let e = we(n.children ?? [], t);
1288
+ if (e) return e;
1289
+ }
1290
+ return null;
1291
+ }
1292
+ let Te = n(() => {
1293
+ if (!f.activeItemId) return null;
1294
+ for (let e of Y.value) {
1295
+ if (e.id === f.activeItemId) return [e];
1296
+ let t = Ce(e.children, f.activeItemId);
1297
+ if (t) return [e, ...t];
1298
+ }
1299
+ return null;
1300
+ }), Ee = n(() => {
1301
+ if (f.breadcrumbs.length) return f.breadcrumbs;
1302
+ let e = Te.value;
1303
+ if (!e?.length) return [];
1304
+ let t = e.length - 1;
1305
+ return e.map((e, n) => ({
1306
+ id: e.id,
1307
+ label: e.label,
1308
+ to: n === t ? void 0 : e.to,
1309
+ sectionId: n === 0 ? e.id : void 0,
1310
+ menuId: n > 0 && e.children?.length ? e.id : void 0
1311
+ }));
1312
+ });
1313
+ function De(e) {
1314
+ return e.menuId ? we(Y.value, e.menuId) : e.sectionId ? Y.value.find((t) => t.id === e.sectionId) ?? null : null;
1315
+ }
1316
+ let Oe = n(() => Y.value.find((e) => e.id === F.value) ?? null);
1317
+ function ke(e, t) {
1318
+ let n = [], r = e, i = 0;
1319
+ for (; r.length;) {
1320
+ n.push(r);
1321
+ let e = t[i];
1322
+ if (!e) break;
1323
+ let a = r.find((t) => t.id === e);
1324
+ if (!a?.children?.length) break;
1325
+ r = a.children, i += 1;
1326
+ }
1327
+ return n;
1328
+ }
1329
+ let Ae = n(() => Oe.value ? ke(Oe.value.children, I.value) : []);
1330
+ function je(e, t = 10) {
1331
+ let n = [];
1332
+ for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
1333
+ return n;
1334
+ }
1335
+ let Me = n(() => {
1336
+ let e = [];
1337
+ return f.showAia && e.push({
1338
+ id: "__aia",
1339
+ label: f.aiaLabel,
1340
+ icon: "pi pi-comments",
1341
+ kind: "aia"
1342
+ }), f.showSupport && e.push({
1343
+ id: "__support",
1344
+ label: f.supportLabel,
1345
+ icon: "pi pi-headphones",
1346
+ kind: "support"
1347
+ }), f.actions.forEach((t) => e.push({
1348
+ ...t,
1349
+ kind: "action"
1350
+ })), e;
1351
+ }), Ne = n(() => {
1352
+ let e = [];
1353
+ return f.userMenuItems.forEach((t) => {
1354
+ if (t.separator) {
1355
+ e.length && !e.at(-1)?.separator && e.push(t);
1356
+ return;
1357
+ }
1358
+ e.push(t);
1359
+ }), e.at(-1)?.separator && e.pop(), e;
1360
+ }), X = n(() => !!x["user-menu"] || Ne.value.some((e) => !e.separator)), Pe = n(() => !!f.user || !!x.user), Fe = n(() => !!(f.client || x.context || x.scope || x.client || x["context-compact"])), Z = n(() => f.favoriteItems.filter(Boolean)), Ie = n(() => W.value || !oe.value), Le = n(() => Z.value.length > 0 && !Ie.value), Re = n(() => Y.value.length > 0 || f.searchable || Me.value.length > 0 || Pe.value || !!(x["drawer-menu"] || x["drawer-actions"] || x["drawer-footer"])), ze = n(() => f.user ? f.user.initials ? f.user.initials : f.user.name.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toLocaleUpperCase("pt-BR")).join("") : ""), Be = n(() => Ne.value.map((e) => e.separator ? { separator: !0 } : {
1361
+ label: e.label,
1362
+ icon: e.icon,
1363
+ disabled: e.disabled,
1364
+ command: () => zn(e)
1365
+ })), Ve = n(() => {
1366
+ let e = f.appearance, t = {}, n = (e, n) => {
1367
+ n !== void 0 && n !== "" && (t[e] = n);
1368
+ };
1369
+ return n("--top-nav-bg", e.colors?.navigation), n("--top-nav-breadcrumb-bg", e.surfaces?.breadcrumb ?? e.colors?.navigation), n("--top-nav-drawer-bg", e.surfaces?.drawer ?? e.colors?.navigation), n("--top-nav-drawer-footer-bg", e.surfaces?.drawerFooter), n("--top-nav-fg", e.colors?.text), n("--top-nav-muted-fg", e.colors?.mutedText), n("--top-nav-accent", e.colors?.accent), n("--top-nav-menu-bg", e.surfaces?.menu), n("--top-nav-menu-fg", e.colors?.menuText), n("--top-nav-menu-hover", e.surfaces?.menuHover), n("--top-nav-menu-explored", e.surfaces?.menuExplored), n("--top-nav-border", e.colors?.border), n("--top-nav-menu-border", e.borders?.menu), n("--top-nav-menu-outline", e.borders?.menuOutline), n("--top-nav-radius", e.shape?.radius), n("--top-nav-drawer-radius", e.shape?.drawerRadius), n("--top-nav-shadow", e.shape?.shadow), n("--top-nav-mobile-active-bg", e.surfaces?.mobileActive), n("--top-nav-mobile-active-fg", e.colors?.mobileActiveText), n("--top-nav-mobile-divider", e.borders?.mobileDivider), n("--top-nav-favorites-bg", e.surfaces?.favorites), n("--top-nav-favorites-fg", e.colors?.favoritesText), n("--top-nav-favorites-border", e.borders?.favorites), n("--top-nav-favorites-shadow", e.shape?.favoritesShadow), n("--top-nav-focus-ring", e.focus?.onDark), n("--top-nav-focus-ring-light", e.focus?.onLight), n("--top-nav-current-bg", e.surfaces?.currentPage), n("--top-nav-current-border", e.borders?.currentPage), t;
1370
+ }), He = n(() => f.client ? f.client.initials ? f.client.initials : f.client.name.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toLocaleUpperCase("pt-BR")).join("") : "");
1371
+ function Fn() {
1372
+ let e = Math.max(0, window.scrollY);
1373
+ if (!W.value && e >= Nn) {
1374
+ W.value = !0;
1375
+ return;
1376
+ }
1377
+ W.value && e <= Pn && (W.value = !1);
1378
+ }
1379
+ function In() {
1380
+ let e = T.value, t = k.value;
1381
+ !e || !t || (oe.value = t.scrollWidth <= e.clientWidth + 1);
1382
+ }
1383
+ function Ln() {
1384
+ fe = window.requestAnimationFrame(() => {
1385
+ fe = window.requestAnimationFrame(() => {
1386
+ se.value = !0;
1387
+ });
1388
+ });
1389
+ }
1390
+ function Q() {
1391
+ return typeof window < "u" && window.matchMedia?.("(hover: hover) and (pointer: fine)").matches;
1392
+ }
1393
+ function $(e) {
1394
+ e.disabled || (h("navigate", e), N.value = !1, er());
1395
+ }
1396
+ function Rn(e, t = !1) {
1397
+ e.disabled || (e.kind === "aia" ? h("toggle-aia") : e.kind === "support" ? h("open-support") : h("action", e), z.value = !1, t && (N.value = !1));
1398
+ }
1399
+ function zn(e, t = !1) {
1400
+ e.disabled || e.separator || (h("user-action", e), B.value = !1, V.value = !1, t && (N.value = !1));
1401
+ }
1402
+ function Bn(e) {
1403
+ if (!X.value) {
1404
+ h("user-click", f.user);
1405
+ return;
1406
+ }
1407
+ ae.value?.toggle(e);
1408
+ }
1409
+ function Vn(e) {
1410
+ G.value = e, h("update:searchValue", e), h("search", e);
1411
+ }
1412
+ function Hn() {
1413
+ Vn(""), p(() => N.value ? M.value?.focus() : j.value?.focus());
1414
+ }
1415
+ function Un() {
1416
+ Q() && (P.value = !0);
1417
+ }
1418
+ function Wn() {
1419
+ !Q() || window.innerWidth < 1024 || (P.value = !1, F.value = null, I.value = []);
1420
+ }
1421
+ function Gn() {
1422
+ if (Q()) {
1423
+ P.value = !0;
1424
+ return;
1425
+ }
1426
+ P.value = !P.value, P.value || (F.value = null, I.value = []);
1427
+ }
1428
+ function Kn(e) {
1429
+ Q() && (F.value = e, I.value = []);
1430
+ }
1431
+ function qn(e) {
1432
+ if (Q()) {
1433
+ F.value = e, I.value = [];
1434
+ return;
1435
+ }
1436
+ let t = F.value === e;
1437
+ F.value = t ? null : e, I.value = [];
1438
+ }
1439
+ function Jn(e, t, n, r) {
1440
+ if (r && !Q()) return;
1441
+ let i = e.value[n];
1442
+ if (!t.children?.length) {
1443
+ e.value = e.value.slice(0, n), r || $(t);
1444
+ return;
1445
+ }
1446
+ if (!r && Q()) {
1447
+ e.value = [...e.value.slice(0, n), t.id];
1448
+ return;
1449
+ }
1450
+ e.value = i === t.id && !r ? e.value.slice(0, n) : [...e.value.slice(0, n), t.id];
1451
+ }
1452
+ function Yn(e, t, n) {
1453
+ Jn(I, e, t, n);
1454
+ }
1455
+ function Xn(e, t, n) {
1456
+ Jn(R, e, t, n);
1457
+ }
1458
+ function Zn(e) {
1459
+ Q() && (L.value = e, R.value = []);
1460
+ }
1461
+ function Qn() {
1462
+ !Q() || window.innerWidth < 1024 || (L.value = null, R.value = []);
1463
+ }
1464
+ function $n(e) {
1465
+ if (Q()) {
1466
+ L.value = e;
1467
+ return;
1468
+ }
1469
+ L.value = L.value === e ? null : e, R.value = [];
1470
+ }
1471
+ function er() {
1472
+ P.value = !1, F.value = null, I.value = [], L.value = null, R.value = [], z.value = !1, B.value = !1, H.value = !1, K.value = !1;
1473
+ }
1474
+ async function tr() {
1475
+ if (typeof window < "u" && window.innerWidth < 1024) {
1476
+ N.value = !0, await p(), M.value?.focus();
1477
+ return;
1478
+ }
1479
+ q.value = !0, K.value = !0, await p(), j.value?.focus(), ar();
1480
+ }
1481
+ function nr() {
1482
+ window.setTimeout(() => {
1483
+ K.value = !1, J.value.searchIconOnly && !G.value.trim() && (q.value = !1, ar());
1484
+ }, 150);
1485
+ }
1486
+ function rr() {
1487
+ return Math.round(window.visualViewport?.width ?? window.innerWidth);
1488
+ }
1489
+ async function ir() {
1490
+ if (typeof window > "u" || !ne.value) return;
1491
+ let e = ++pe, t = rr();
1492
+ ce.value = t < 1024;
1493
+ let n = {
1494
+ collapseActions: !1,
1495
+ searchIconOnly: !1,
1496
+ hideUserName: !1,
1497
+ hideContextDetails: !1
1498
+ };
1499
+ if (t < 1024) {
1500
+ J.value = n, q.value = !1;
1501
+ return;
1502
+ }
1503
+ if (J.value = {
1504
+ collapseActions: t < 1440,
1505
+ searchIconOnly: t < 1320,
1506
+ hideUserName: t < 1180,
1507
+ hideContextDetails: !1
1508
+ }, await p(), e === pe) for (let t of [
1509
+ "collapseActions",
1510
+ "searchIconOnly",
1511
+ "hideUserName",
1512
+ "hideContextDetails"
1513
+ ]) {
1514
+ let n = ne.value;
1515
+ if (!n || n.scrollWidth <= n.clientWidth + 1) break;
1516
+ if (J.value = {
1517
+ ...J.value,
1518
+ [t]: !0
1519
+ }, await p(), e !== pe) return;
1520
+ }
1521
+ }
1522
+ function ar() {
1523
+ typeof window > "u" || (de !== void 0 && window.cancelAnimationFrame(de), de = window.requestAnimationFrame(() => {
1524
+ de = void 0, ir();
1525
+ }));
1526
+ }
1527
+ function or(e) {
1528
+ let t = e.target;
1529
+ if (t instanceof Element && !t.closest(".top-nav-bar__mobile-menu")) {
1530
+ if (!S.value?.contains(t)) {
1531
+ er();
1532
+ return;
1533
+ }
1534
+ t.closest("[data-top-nav-navigation]") || (P.value = !1, F.value = null, I.value = []), t.closest("[data-top-nav-breadcrumb]") || (L.value = null, R.value = []), t.closest("[data-top-nav-actions]") || (z.value = !1), t.closest("[data-top-nav-user]") || (B.value = !1), t.closest("[data-top-nav-favorites]") || (H.value = !1), t.closest("[data-top-nav-search]") || (K.value = !1);
1535
+ }
1536
+ }
1537
+ function sr(e) {
1538
+ if ((e.ctrlKey || e.metaKey) && e.key.toLocaleLowerCase() === "k" && f.searchable) {
1539
+ e.preventDefault(), tr();
1540
+ return;
1541
+ }
1542
+ if (e.key === "Escape") {
1543
+ if (V.value) {
1544
+ ae.value?.hide();
1545
+ return;
1546
+ }
1547
+ N.value &&= !1, er(), J.value.searchIconOnly && !G.value.trim() && (q.value = !1);
1548
+ }
1549
+ }
1550
+ function cr() {
1551
+ if (!X.value) {
1552
+ h("user-click", f.user);
1553
+ return;
1554
+ }
1555
+ if (Q()) {
1556
+ B.value = !0;
1557
+ return;
1558
+ }
1559
+ B.value = !B.value;
1560
+ }
1561
+ function lr() {
1562
+ if (Q()) {
1563
+ H.value = !0;
1564
+ return;
1565
+ }
1566
+ H.value = !H.value;
1567
+ }
1568
+ return D(() => f.searchValue, (e) => {
1569
+ e !== void 0 && e !== G.value && (G.value = e);
1570
+ }), D(() => f.mobileOpen, (e) => {
1571
+ e !== void 0 && e !== N.value && (N.value = e);
1572
+ }), D(N, (e) => h("update:mobileOpen", e)), D([
1573
+ Y,
1574
+ () => f.user,
1575
+ Me
1576
+ ], () => p(ar), { deep: !0 }), D(Z, () => p(In), { deep: !0 }), te(() => {
1577
+ document.addEventListener("keydown", sr), document.addEventListener("pointerdown", or), window.addEventListener("resize", ar), window.visualViewport?.addEventListener("resize", ar), window.addEventListener("resize", In), window.addEventListener("scroll", Fn, { passive: !0 }), typeof ResizeObserver < "u" && (le = new ResizeObserver(ar), ne.value && le.observe(ne.value), ue = new ResizeObserver(In), T.value && ue.observe(T.value)), ar(), p(() => {
1578
+ In(), Fn(), Ln();
1579
+ });
1580
+ }), ee(() => {
1581
+ document.removeEventListener("keydown", sr), document.removeEventListener("pointerdown", or), window.removeEventListener("resize", ar), window.visualViewport?.removeEventListener("resize", ar), window.removeEventListener("resize", In), window.removeEventListener("scroll", Fn), le?.disconnect(), ue?.disconnect(), de !== void 0 && window.cancelAnimationFrame(de), fe !== void 0 && window.cancelAnimationFrame(fe);
1582
+ }), u({
1583
+ close: er,
1584
+ closeDrawer: () => {
1585
+ N.value = !1;
1586
+ },
1587
+ focusSearch: tr,
1588
+ openDrawer: () => {
1589
+ N.value = !0;
1590
+ }
1591
+ }), (n, u) => (_(), a("nav", {
1592
+ ref_key: "rootRef",
1593
+ ref: S,
1594
+ class: "top-nav-bar top-solutions-component",
1595
+ style: g(Ve.value),
1596
+ "aria-label": "Navegação principal"
1597
+ }, [
1598
+ o("header", {
1599
+ ref_key: "headerRef",
1600
+ ref: ne,
1601
+ class: m(["top-nav-bar__header", { "top-nav-bar__header--context-compact": J.value.hideContextDetails }])
1602
+ }, [
1603
+ Re.value ? (_(), a("button", {
1604
+ key: 0,
1605
+ class: "top-nav-bar__mobile-trigger top-nav-bar__square-button",
1606
+ type: "button",
1607
+ "aria-label": "Abrir navegação",
1608
+ "aria-expanded": N.value,
1609
+ onClick: u[0] ||= (e) => N.value = !N.value
1610
+ }, [...u[19] ||= [o("i", {
1611
+ class: "pi pi-bars",
1612
+ "aria-hidden": "true"
1613
+ }, null, -1)]], 8, We)) : i("", !0),
1614
+ o("div", Ge, [b(n.$slots, "brand", { compact: J.value.hideContextDetails })]),
1615
+ Fe.value ? (_(), a("div", Ke)) : i("", !0),
1616
+ Fe.value ? (_(), a("div", qe, [J.value.hideContextDetails && n.$slots["context-compact"] ? b(n.$slots, "context-compact", {
1617
+ client: s.client,
1618
+ compact: !0
1619
+ }, void 0, void 0, 0) : n.$slots.context ? b(n.$slots, "context", {
1620
+ client: s.client,
1621
+ compact: J.value.hideContextDetails
1622
+ }, void 0, void 0, 1) : n.$slots.scope ? b(n.$slots, "scope", {
1623
+ client: s.client,
1624
+ compact: J.value.hideContextDetails
1625
+ }, void 0, void 0, 2) : b(n.$slots, "client", {
1626
+ client: s.client,
1627
+ compact: J.value.hideContextDetails
1628
+ }, () => [s.client ? (_(), a("div", Je, [s.client.logoUrl ? (_(), a("img", {
1629
+ key: 0,
1630
+ src: s.client.logoUrl,
1631
+ alt: "",
1632
+ class: "top-nav-bar__client-logo"
1633
+ }, null, 8, Ye)) : (_(), a("span", Xe, C(He.value), 1)), J.value.hideContextDetails ? i("", !0) : (_(), a("span", Ze, [o("span", Qe, C(s.client.name), 1), s.client.subtitle ? (_(), a("span", $e, C(s.client.subtitle), 1)) : i("", !0)]))])) : i("", !0)], void 0, 3)])) : i("", !0),
1634
+ u[24] ||= o("div", {
1635
+ class: "top-nav-bar__spacer",
1636
+ "aria-hidden": "true"
1637
+ }, null, -1),
1638
+ o("div", et, [
1639
+ s.searchable ? (_(), a("div", tt, [J.value.searchIconOnly && !q.value ? (_(), a("button", {
1640
+ key: 0,
1641
+ class: "top-nav-bar__square-button",
1642
+ type: "button",
1643
+ "aria-label": "Pesquisar no menu",
1644
+ title: "Pesquisar no menu (Ctrl+K)",
1645
+ onClick: tr
1646
+ }, [...u[20] ||= [o("i", {
1647
+ class: "pi pi-search",
1648
+ "aria-hidden": "true"
1649
+ }, null, -1)]])) : (_(), a("div", {
1650
+ key: 1,
1651
+ class: m(["top-nav-bar__search", { "top-nav-bar__search--expanded": q.value }])
1652
+ }, [
1653
+ u[22] ||= o("i", {
1654
+ class: "pi pi-search",
1655
+ "aria-hidden": "true"
1656
+ }, null, -1),
1657
+ o("input", {
1658
+ ref_key: "searchInputRef",
1659
+ ref: j,
1660
+ value: G.value,
1661
+ type: "text",
1662
+ role: "searchbox",
1663
+ placeholder: s.searchPlaceholder,
1664
+ "aria-label": "Pesquisar no menu",
1665
+ onFocus: u[1] ||= (e) => K.value = !0,
1666
+ onBlur: nr,
1667
+ onInput: u[2] ||= (e) => Vn(e.target.value)
1668
+ }, null, 40, nt),
1669
+ G.value || J.value.searchIconOnly && q.value ? (_(), a("button", {
1670
+ key: 0,
1671
+ class: "top-nav-bar__search-clear",
1672
+ type: "button",
1673
+ "aria-label": G.value ? "Limpar pesquisa" : "Fechar pesquisa",
1674
+ onMousedown: u[3] ||= A(() => {}, ["prevent"]),
1675
+ onClick: u[4] ||= (e) => G.value ? Hn() : q.value = !1
1676
+ }, [...u[21] ||= [o("i", {
1677
+ class: "pi pi-times",
1678
+ "aria-hidden": "true"
1679
+ }, null, -1)]], 40, rt)) : i("", !0),
1680
+ K.value ? (_(), a("div", it, [o("div", at, [b(n.$slots, "search-results", {
1681
+ items: ye.value,
1682
+ select: $
1683
+ }, () => [(_(!0), a(e, null, y(ye.value, (e) => (_(), a("button", {
1684
+ key: e.id,
1685
+ class: "top-nav-bar__menu-item",
1686
+ type: "button",
1687
+ role: "menuitem",
1688
+ disabled: e.disabled,
1689
+ onMousedown: u[5] ||= A(() => {}, ["prevent"]),
1690
+ onClick: (t) => $(e)
1691
+ }, [e.icon ? (_(), a("i", {
1692
+ key: 0,
1693
+ class: m(e.icon),
1694
+ "aria-hidden": "true"
1695
+ }, null, 2)) : i("", !0), o("span", null, C(e.label), 1)], 40, ot))), 128)), ye.value.length ? i("", !0) : (_(), a("span", st, "Nenhum item encontrado."))])])])) : i("", !0)
1696
+ ], 2))])) : i("", !0),
1697
+ Me.value.length ? (_(), a("div", ct, [J.value.collapseActions ? (_(), a(e, { key: 1 }, [o("button", {
1698
+ class: "top-nav-bar__square-button",
1699
+ type: "button",
1700
+ "aria-label": "Mais ações",
1701
+ "aria-expanded": z.value,
1702
+ onClick: u[6] ||= (e) => z.value = !z.value
1703
+ }, [...u[23] ||= [o("i", {
1704
+ class: "pi pi-ellipsis-h",
1705
+ "aria-hidden": "true"
1706
+ }, null, -1)]], 8, ut), z.value ? (_(), a("div", dt, [o("div", ft, [(_(!0), a(e, null, y(Me.value, (e) => (_(), a("button", {
1707
+ key: e.id,
1708
+ class: "top-nav-bar__menu-item",
1709
+ type: "button",
1710
+ role: "menuitem",
1711
+ disabled: e.disabled,
1712
+ onClick: (t) => Rn(e)
1713
+ }, [o("i", {
1714
+ class: m(e.icon),
1715
+ "aria-hidden": "true"
1716
+ }, null, 2), o("span", null, C(e.label), 1)], 8, pt))), 128))])])) : i("", !0)], 64)) : (_(!0), a(e, { key: 0 }, y(Me.value, (e) => (_(), a("button", {
1717
+ key: e.id,
1718
+ class: m(["top-nav-bar__square-button", { "top-nav-bar__square-button--active": e.kind === "aia" && s.aiaActive }]),
1719
+ type: "button",
1720
+ disabled: e.disabled,
1721
+ "aria-label": e.label,
1722
+ "aria-pressed": e.kind === "aia" ? s.aiaActive : void 0,
1723
+ title: e.label,
1724
+ onClick: (t) => Rn(e)
1725
+ }, [e.kind === "aia" ? b(n.$slots, "aia-icon", {}, () => [o("i", {
1726
+ class: m(e.icon),
1727
+ "aria-hidden": "true"
1728
+ }, null, 2)], void 0, 0) : e.kind === "support" ? b(n.$slots, "support-icon", {}, () => [o("i", {
1729
+ class: m(e.icon),
1730
+ "aria-hidden": "true"
1731
+ }, null, 2)], void 0, 1) : (_(), a("i", {
1732
+ key: 2,
1733
+ class: m(e.icon),
1734
+ "aria-hidden": "true"
1735
+ }, null, 2))], 10, lt))), 128))])) : i("", !0),
1736
+ n.$slots.actions ? (_(), a("div", mt, [b(n.$slots, "actions", {
1737
+ compact: J.value.collapseActions,
1738
+ close: er
1739
+ })])) : i("", !0),
1740
+ Pe.value ? (_(), a("div", {
1741
+ key: 3,
1742
+ class: "top-nav-bar__user-menu",
1743
+ "data-top-nav-user": "",
1744
+ onMouseenter: u[7] ||= (e) => X.value && Q() && (B.value = !0),
1745
+ onMouseleave: u[8] ||= (e) => Q() && (B.value = !1)
1746
+ }, [o("button", {
1747
+ class: "top-nav-bar__user-trigger",
1748
+ type: "button",
1749
+ "aria-haspopup": X.value ? "menu" : void 0,
1750
+ "aria-expanded": X.value ? B.value : void 0,
1751
+ onClick: cr
1752
+ }, [b(n.$slots, "user", {
1753
+ user: s.user,
1754
+ compact: J.value.hideUserName
1755
+ }, () => [s.user?.avatarUrl ? (_(), a("img", {
1756
+ key: 0,
1757
+ src: s.user.avatarUrl,
1758
+ alt: "",
1759
+ class: "top-nav-bar__user-avatar"
1760
+ }, null, 8, gt)) : (_(), a("span", _t, C(ze.value), 1)), s.user && !J.value.hideUserName ? (_(), a("span", vt, [o("span", yt, C(s.user.name), 1), s.user.subtitle ? (_(), a("span", bt, C(s.user.subtitle), 1)) : i("", !0)])) : i("", !0)]), X.value ? (_(), a("i", xt)) : i("", !0)], 8, ht), X.value && B.value ? (_(), a("div", St, [o("div", Ct, [b(n.$slots, "user-menu", {
1761
+ items: Ne.value,
1762
+ select: zn
1763
+ }, () => [(_(!0), a(e, null, y(Ne.value, (t) => (_(), a(e, { key: t.id }, [t.separator ? (_(), a("div", wt)) : (_(), a("button", {
1764
+ key: 1,
1765
+ class: "top-nav-bar__menu-item",
1766
+ type: "button",
1767
+ role: "menuitem",
1768
+ disabled: t.disabled,
1769
+ onClick: (e) => zn(t)
1770
+ }, [t.icon ? (_(), a("i", {
1771
+ key: 0,
1772
+ class: m(t.icon),
1773
+ "aria-hidden": "true"
1774
+ }, null, 2)) : i("", !0), o("span", null, C(t.label), 1)], 8, Tt))], 64))), 128))])])])) : i("", !0)], 32)) : i("", !0)
1775
+ ])
1776
+ ], 2),
1777
+ o("div", Et, [
1778
+ o("button", {
1779
+ class: "top-nav-bar__crumb",
1780
+ type: "button",
1781
+ onClick: u[9] ||= (e) => $(s.homeItem)
1782
+ }, [l(w(be), { icon: w(he) }, null, 8, ["icon"]), o("span", null, C(s.homeItem.label), 1)]),
1783
+ Y.value.length ? (_(), a("span", Dt, "/")) : i("", !0),
1784
+ Y.value.length ? (_(), a("div", {
1785
+ key: 1,
1786
+ class: "top-nav-bar__dropdown top-nav-bar__desktop-navigation",
1787
+ "data-top-nav-navigation": "",
1788
+ onMouseenter: Un,
1789
+ onMouseleave: Wn
1790
+ }, [o("button", {
1791
+ class: "top-nav-bar__crumb",
1792
+ type: "button",
1793
+ "aria-haspopup": "menu",
1794
+ "aria-expanded": P.value,
1795
+ onClick: Gn
1796
+ }, [
1797
+ u[25] ||= o("i", {
1798
+ class: "pi pi-bars",
1799
+ "aria-hidden": "true"
1800
+ }, null, -1),
1801
+ o("span", null, C(s.navigationLabel), 1),
1802
+ u[26] ||= o("i", {
1803
+ class: "pi pi-chevron-down top-nav-bar__chevron",
1804
+ "aria-hidden": "true"
1805
+ }, null, -1)
1806
+ ], 8, Ot), P.value ? (_(), a("div", kt, [o("div", At, [o("div", jt, [(_(!0), a(e, null, y(Y.value, (e) => (_(), a("button", {
1807
+ key: e.id,
1808
+ class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": F.value === e.id }]),
1809
+ type: "button",
1810
+ role: "menuitem",
1811
+ "aria-haspopup": "menu",
1812
+ "aria-expanded": F.value === e.id,
1813
+ onMouseenter: (t) => Kn(e.id),
1814
+ onClick: (t) => qn(e.id)
1815
+ }, [
1816
+ e.icon ? (_(), a("i", {
1817
+ key: 0,
1818
+ class: m(e.icon),
1819
+ "aria-hidden": "true"
1820
+ }, null, 2)) : i("", !0),
1821
+ o("span", Nt, C(e.label), 1),
1822
+ o("span", Pt, C(e.children.length), 1),
1823
+ u[27] ||= o("i", {
1824
+ class: "pi pi-chevron-right top-nav-bar__menu-arrow",
1825
+ "aria-hidden": "true"
1826
+ }, null, -1)
1827
+ ], 42, Mt))), 128))]), Oe.value ? (_(), a("div", Ft, [(_(!0), a(e, null, y(Ae.value, (t, n) => (_(), a("div", {
1828
+ key: `navigation-level-${n}`,
1829
+ class: m(["top-nav-bar__cascade-level", { "top-nav-bar__section-items": n === 0 }]),
1830
+ role: "menu"
1831
+ }, [(_(!0), a(e, null, y(je(t), (t, r) => (_(), a("div", {
1832
+ key: `navigation-${n}-${r}`,
1833
+ class: "top-nav-bar__menu-column"
1834
+ }, [(_(!0), a(e, null, y(t, (e) => (_(), a("button", {
1835
+ key: e.id,
1836
+ class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": I.value[n] === e.id }]),
1837
+ type: "button",
1838
+ role: "menuitem",
1839
+ disabled: e.disabled,
1840
+ "aria-haspopup": e.children?.length ? "menu" : void 0,
1841
+ "aria-expanded": e.children?.length ? I.value[n] === e.id : void 0,
1842
+ onMouseenter: (t) => Yn(e, n, !0),
1843
+ onClick: (t) => Yn(e, n, !1)
1844
+ }, [
1845
+ e.icon ? (_(), a("i", {
1846
+ key: 0,
1847
+ class: m(e.icon),
1848
+ "aria-hidden": "true"
1849
+ }, null, 2)) : i("", !0),
1850
+ o("span", Lt, C(e.label), 1),
1851
+ e.children?.length ? (_(), a("i", Rt)) : i("", !0)
1852
+ ], 42, It))), 128))]))), 128))], 2))), 128))])) : i("", !0)])])) : i("", !0)], 32)) : i("", !0),
1853
+ (_(!0), a(e, null, y(Ee.value, (t, n) => (_(), a(e, { key: t.id }, [o("span", {
1854
+ class: m(["top-nav-bar__separator", { "top-nav-bar__separator--current": !t.to && n === Ee.value.length - 1 }]),
1855
+ "aria-hidden": "true"
1856
+ }, "/", 2), De(t)?.children?.length ? (_(), a("div", {
1857
+ key: 0,
1858
+ class: "top-nav-bar__dropdown top-nav-bar__breadcrumb-dropdown",
1859
+ "data-top-nav-breadcrumb": "",
1860
+ onMouseenter: (e) => !ce.value && Zn(t.id),
1861
+ onMouseleave: u[10] ||= (e) => !ce.value && Qn()
1862
+ }, [ce.value ? (_(), a("span", Bt, C(t.label), 1)) : (_(), a("button", {
1863
+ key: 1,
1864
+ class: "top-nav-bar__crumb",
1865
+ type: "button",
1866
+ "aria-haspopup": "menu",
1867
+ "aria-expanded": L.value === t.id,
1868
+ onClick: (e) => $n(t.id)
1869
+ }, [o("span", null, C(t.label), 1), u[28] ||= o("i", {
1870
+ class: "pi pi-chevron-down top-nav-bar__chevron",
1871
+ "aria-hidden": "true"
1872
+ }, null, -1)], 8, Vt)), !ce.value && L.value === t.id ? (_(), a("div", Ht, [o("div", Ut, [(_(!0), a(e, null, y(ke(De(t)?.children ?? [], R.value), (n, r) => (_(), a("div", {
1873
+ key: `breadcrumb-${t.id}-${r}`,
1874
+ class: m(["top-nav-bar__cascade-level", { "top-nav-bar__breadcrumb-main-items": r === 0 }])
1875
+ }, [(_(!0), a(e, null, y(je(n), (n, s) => (_(), a("div", {
1876
+ key: `breadcrumb-${t.id}-${r}-${s}`,
1877
+ class: "top-nav-bar__menu-column"
1878
+ }, [(_(!0), a(e, null, y(n, (e) => (_(), a("button", {
1879
+ key: e.id,
1880
+ class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": R.value[r] === e.id }]),
1881
+ type: "button",
1882
+ role: "menuitem",
1883
+ disabled: e.disabled,
1884
+ onMouseenter: (t) => Xn(e, r, !0),
1885
+ onClick: (t) => Xn(e, r, !1)
1886
+ }, [
1887
+ e.icon ? (_(), a("i", {
1888
+ key: 0,
1889
+ class: m(e.icon),
1890
+ "aria-hidden": "true"
1891
+ }, null, 2)) : i("", !0),
1892
+ o("span", Gt, C(e.label), 1),
1893
+ e.children?.length ? (_(), a("i", Kt)) : i("", !0)
1894
+ ], 42, Wt))), 128))]))), 128))], 2))), 128))])])) : i("", !0)], 40, zt)) : t.to ? (_(), a("button", {
1895
+ key: 1,
1896
+ class: "top-nav-bar__crumb",
1897
+ type: "button",
1898
+ onClick: (e) => $(t)
1899
+ }, C(t.label), 9, qt)) : (_(), a("span", {
1900
+ key: 2,
1901
+ class: "top-nav-bar__current",
1902
+ title: t.label
1903
+ }, [o("span", Yt, C(t.label), 1), s.showFavoriteToggle ? (_(), a("button", {
1904
+ key: 0,
1905
+ class: "top-nav-bar__favorite-toggle",
1906
+ type: "button",
1907
+ "aria-label": s.favoriteActive ? "Remover dos favoritos" : "Adicionar aos favoritos",
1908
+ "aria-pressed": s.favoriteActive,
1909
+ onClick: u[11] ||= A((e) => h("toggle-favorite"), ["stop"])
1910
+ }, [o("i", {
1911
+ class: m(s.favoriteActive ? "pi pi-star-fill" : "pi pi-star"),
1912
+ "aria-hidden": "true"
1913
+ }, null, 2)], 8, Xt)) : i("", !0)], 8, Jt))], 64))), 128)),
1914
+ o("div", Zt, [l(t, {
1915
+ name: "top-nav-bar-favorites-trigger",
1916
+ css: se.value
1917
+ }, {
1918
+ default: O(() => [Ie.value && Z.value.length ? (_(), a("div", {
1919
+ key: 0,
1920
+ class: "top-nav-bar__favorites-menu top-nav-bar__desktop-only",
1921
+ "data-top-nav-favorites": "",
1922
+ onMouseenter: u[12] ||= (e) => Q() && (H.value = !0),
1923
+ onMouseleave: u[13] ||= (e) => Q() && (H.value = !1)
1924
+ }, [o("button", {
1925
+ class: "top-nav-bar__crumb",
1926
+ type: "button",
1927
+ "aria-haspopup": "menu",
1928
+ "aria-expanded": H.value,
1929
+ onClick: lr
1930
+ }, [
1931
+ u[29] ||= o("i", {
1932
+ class: "pi pi-star-fill top-nav-bar__accent",
1933
+ "aria-hidden": "true"
1934
+ }, null, -1),
1935
+ o("span", null, C(s.favoriteLabel), 1),
1936
+ u[30] ||= o("i", {
1937
+ class: "pi pi-chevron-down top-nav-bar__chevron",
1938
+ "aria-hidden": "true"
1939
+ }, null, -1)
1940
+ ], 8, Qt), H.value ? (_(), a("div", $t, [o("div", en, [(_(!0), a(e, null, y(Z.value, (e) => (_(), a("button", {
1941
+ key: e.id,
1942
+ class: "top-nav-bar__menu-item",
1943
+ type: "button",
1944
+ role: "menuitem",
1945
+ disabled: e.disabled,
1946
+ onClick: (t) => $(e)
1947
+ }, [e.icon ? (_(), a("i", {
1948
+ key: 0,
1949
+ class: m(e.icon),
1950
+ "aria-hidden": "true"
1951
+ }, null, 2)) : i("", !0), o("span", null, C(e.label), 1)], 8, tn))), 128))])])) : i("", !0)], 32)) : i("", !0)]),
1952
+ _: 1
1953
+ }, 8, ["css"]), b(n.$slots, "breadcrumb-actions")])
1954
+ ]),
1955
+ o("div", {
1956
+ ref_key: "favoritesMeasureContainerRef",
1957
+ ref: T,
1958
+ class: "top-nav-bar__favorites-measure",
1959
+ "aria-hidden": "true"
1960
+ }, [o("div", {
1961
+ ref_key: "favoritesMeasureContentRef",
1962
+ ref: k,
1963
+ class: "top-nav-bar__favorites-measure-content"
1964
+ }, [o("span", nn, [u[31] ||= o("i", {
1965
+ class: "pi pi-star-fill top-nav-bar__favorites-icon",
1966
+ "aria-hidden": "true"
1967
+ }, null, -1), o("span", null, C(s.favoriteLabel), 1)]), (_(!0), a(e, null, y(Z.value, (e, t) => (_(), a("span", {
1968
+ key: `measure-${e.id}`,
1969
+ class: "top-nav-bar__favorites-measure-item"
1970
+ }, [t > 0 ? (_(), a("span", rn, "|")) : i("", !0), o("span", null, [e.icon ? (_(), a("i", {
1971
+ key: 0,
1972
+ class: m(e.icon),
1973
+ "aria-hidden": "true"
1974
+ }, null, 2)) : i("", !0), c(" " + C(e.label), 1)])]))), 128))], 512)], 512),
1975
+ l(t, {
1976
+ name: "top-nav-bar-favorites-row",
1977
+ css: se.value
1978
+ }, {
1979
+ default: O(() => [Le.value ? (_(), a("div", an, [o("span", on, [u[32] ||= o("i", {
1980
+ class: "pi pi-star-fill top-nav-bar__favorites-icon",
1981
+ "aria-hidden": "true"
1982
+ }, null, -1), o("span", null, C(s.favoriteLabel), 1)]), o("div", sn, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: `row-${t.id}` }, [n > 0 ? (_(), a("span", cn, "|")) : i("", !0), o("button", {
1983
+ class: "top-nav-bar__favorites-row-item",
1984
+ type: "button",
1985
+ disabled: t.disabled,
1986
+ onClick: (e) => $(t)
1987
+ }, [t.icon ? (_(), a("i", {
1988
+ key: 0,
1989
+ class: m(t.icon),
1990
+ "aria-hidden": "true"
1991
+ }, null, 2)) : i("", !0), o("span", null, C(t.label), 1)], 8, ln)], 64))), 128))])])) : i("", !0)]),
1992
+ _: 1
1993
+ }, 8, ["css"]),
1994
+ l(w(re), {
1995
+ visible: N.value,
1996
+ "onUpdate:visible": u[16] ||= (e) => N.value = e,
1997
+ position: "left",
1998
+ class: "top-nav-bar__mobile-drawer",
1999
+ style: g([Ve.value, { width: "var(--top-nav-drawer-width, min(22rem, calc(100vw - 1.5rem)))" }])
2000
+ }, {
2001
+ container: O(({ closeCallback: c }) => [o("div", un, [
2002
+ o("header", dn, [b(n.$slots, "drawer-header", { close: c }, () => [o("div", fn, [b(n.$slots, "drawer-brand", {}, () => [b(n.$slots, "brand", { compact: !1 })])]), o("button", {
2003
+ class: "top-nav-bar__drawer-close top-nav-bar__square-button",
2004
+ type: "button",
2005
+ "aria-label": "Fechar navegação",
2006
+ onClick: c
2007
+ }, [...u[33] ||= [o("i", {
2008
+ class: "pi pi-times",
2009
+ "aria-hidden": "true"
2010
+ }, null, -1)]], 8, pn)])]),
2011
+ s.searchable || Me.value.length || n.$slots["drawer-actions"] ? (_(), a("div", mn, [s.searchable ? b(n.$slots, "drawer-search", {
2012
+ query: G.value,
2013
+ update: Vn,
2014
+ clear: Hn
2015
+ }, () => [o("div", hn, [
2016
+ u[35] ||= o("i", {
2017
+ class: "pi pi-search",
2018
+ "aria-hidden": "true"
2019
+ }, null, -1),
2020
+ o("input", {
2021
+ ref_key: "mobileSearchInputRef",
2022
+ ref: M,
2023
+ value: G.value,
2024
+ type: "text",
2025
+ role: "searchbox",
2026
+ placeholder: s.searchPlaceholder,
2027
+ "aria-label": "Pesquisar no menu",
2028
+ onInput: u[14] ||= (e) => Vn(e.target.value)
2029
+ }, null, 40, gn),
2030
+ G.value ? (_(), a("button", {
2031
+ key: 0,
2032
+ class: "top-nav-bar__search-clear",
2033
+ type: "button",
2034
+ "aria-label": "Limpar pesquisa",
2035
+ onClick: Hn
2036
+ }, [...u[34] ||= [o("i", {
2037
+ class: "pi pi-times",
2038
+ "aria-hidden": "true"
2039
+ }, null, -1)]])) : i("", !0)
2040
+ ])], void 0, 0) : i("", !0), b(n.$slots, "drawer-actions", {
2041
+ actions: Me.value,
2042
+ select: (e) => Rn(e, !0),
2043
+ close: c
2044
+ }, () => [(_(!0), a(e, null, y(Me.value, (e) => (_(), a("button", {
2045
+ key: `drawer-${e.id}`,
2046
+ class: m(["top-nav-bar__drawer-action", { "top-nav-bar__drawer-action--active": e.kind === "aia" && s.aiaActive }]),
2047
+ type: "button",
2048
+ disabled: e.disabled,
2049
+ onClick: (t) => Rn(e, !0)
2050
+ }, [o("i", {
2051
+ class: m(e.icon),
2052
+ "aria-hidden": "true"
2053
+ }, null, 2), o("span", null, C(e.label), 1)], 10, _n))), 128))])])) : i("", !0),
2054
+ o("div", vn, [
2055
+ b(n.$slots, "drawer-before-menu", { close: c }),
2056
+ o("div", yn, [Z.value.length ? (_(), a("section", bn, [o("button", {
2057
+ class: "top-nav-bar__mobile-item",
2058
+ type: "button",
2059
+ "aria-expanded": U.value,
2060
+ onClick: u[15] ||= (e) => U.value = !U.value
2061
+ }, [
2062
+ u[36] ||= o("i", {
2063
+ class: "pi pi-star-fill top-nav-bar__accent",
2064
+ "aria-hidden": "true"
2065
+ }, null, -1),
2066
+ o("span", Sn, C(s.favoriteLabel), 1),
2067
+ o("span", Cn, C(Z.value.length), 1),
2068
+ o("i", {
2069
+ class: m(["pi pi-chevron-down top-nav-bar__mobile-chevron", { "top-nav-bar__mobile-chevron--open": U.value }]),
2070
+ "aria-hidden": "true"
2071
+ }, null, 2)
2072
+ ], 8, xn), l(t, { name: "top-nav-bar-menu-expand" }, {
2073
+ default: O(() => [U.value ? (_(), r(Ue, {
2074
+ key: 0,
2075
+ items: Z.value,
2076
+ "active-item-id": s.activeItemId,
2077
+ level: 1,
2078
+ onSelect: $
2079
+ }, null, 8, ["items", "active-item-id"])) : i("", !0)]),
2080
+ _: 1
2081
+ })])) : i("", !0), b(n.$slots, "drawer-menu", {
2082
+ sections: Se.value,
2083
+ select: $,
2084
+ close: c
2085
+ }, () => [Se.value.length ? (_(), r(Ue, {
2086
+ key: 0,
2087
+ items: Se.value,
2088
+ "active-item-id": s.activeItemId,
2089
+ "force-open": !!G.value.trim(),
2090
+ "show-section-dividers": "",
2091
+ onSelect: $
2092
+ }, null, 8, [
2093
+ "items",
2094
+ "active-item-id",
2095
+ "force-open"
2096
+ ])) : (_(), a("div", wn, "Nenhum menu encontrado."))])]),
2097
+ b(n.$slots, "drawer-after-menu", { close: c })
2098
+ ]),
2099
+ Pe.value || n.$slots["drawer-footer"] ? (_(), a("footer", Tn, [Pe.value ? b(n.$slots, "drawer-user", {
2100
+ user: s.user,
2101
+ open: V.value,
2102
+ toggle: () => V.value = !V.value
2103
+ }, () => [o("button", {
2104
+ class: "top-nav-bar__drawer-user",
2105
+ type: "button",
2106
+ "aria-haspopup": X.value ? "menu" : void 0,
2107
+ "aria-expanded": X.value ? V.value : void 0,
2108
+ onClick: Bn
2109
+ }, [
2110
+ s.user?.avatarUrl ? (_(), a("img", {
2111
+ key: 0,
2112
+ src: s.user.avatarUrl,
2113
+ alt: "",
2114
+ class: "top-nav-bar__user-avatar"
2115
+ }, null, 8, Dn)) : (_(), a("span", On, C(ze.value), 1)),
2116
+ s.user ? (_(), a("span", kn, [o("span", An, C(s.user.name), 1), s.user.subtitle ? (_(), a("span", jn, C(s.user.subtitle), 1)) : i("", !0)])) : i("", !0),
2117
+ X.value ? (_(), a("i", Mn)) : i("", !0)
2118
+ ], 8, En)], void 0, 0) : i("", !0), b(n.$slots, "drawer-footer", { close: c })])) : i("", !0)
2119
+ ])]),
2120
+ _: 3
2121
+ }, 8, ["visible", "style"]),
2122
+ l(w(ie), {
2123
+ ref_key: "drawerUserMenuRef",
2124
+ ref: ae,
2125
+ class: "top-nav-bar__drawer-user-popup",
2126
+ model: Be.value,
2127
+ popup: !0,
2128
+ "append-to": "body",
2129
+ "base-z-index": 10001,
2130
+ onShow: u[17] ||= (e) => V.value = !0,
2131
+ onHide: u[18] ||= (e) => V.value = !1
2132
+ }, null, 8, ["model"])
2133
+ ], 4));
2134
+ }
2135
+ }), In = { class: "top-field-icon pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2" }, Ln = {
2136
+ key: 0,
2137
+ class: "pi pi-spin pi-spinner"
2138
+ }, Q = {
2139
+ key: 1,
2140
+ class: "pi pi-search"
2141
+ }, $ = {
2142
+ key: 1,
2143
+ class: "flex items-center gap-1 !text-sm"
2144
+ }, Rn = { class: "flex items-center gap-2 rounded-[9px] bg-primary-500 px-2 py-1 text-white" }, zn = ["onClick"], Bn = { class: "line-clamp-1 max-w-[300px] overflow-hidden text-ellipsis" }, Vn = {
2145
+ key: 1,
2146
+ class: "flex min-h-[100px] flex-col items-center justify-center gap-2 py-2"
2147
+ }, Hn = {
2148
+ key: 0,
2149
+ class: "text-xs font-medium text-primary-600"
2150
+ }, Un = {
2151
+ key: 2,
2152
+ class: "text-xs text-secondary-500"
2153
+ }, Wn = { key: 1 }, Gn = {
2154
+ key: 1,
2155
+ class: "flex items-center gap-2 font-semibold"
2156
+ }, Kn = {
2157
+ key: 1,
2158
+ class: "flex w-full min-w-0 items-start gap-2 overflow-hidden px-2 py-3 text-sm",
2159
+ style: { "white-space": "normal" }
2160
+ }, qn = ["title"], Jn = {
2161
+ key: 0,
2162
+ class: "top-select-option-prefix whitespace-nowrap font-bold text-primary-800 dark:text-primary-100"
2163
+ }, Yn = {
2164
+ key: 0,
2165
+ class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
2166
+ }, Xn = {
2167
+ key: 0,
2168
+ class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
2169
+ }, Zn = /* @__PURE__ */ u({
2170
+ __name: "TopSelect",
2171
+ props: {
2172
+ modelValue: { default: null },
2173
+ options: { default: () => [] },
2174
+ loading: {
2175
+ type: Boolean,
2176
+ default: !1
2177
+ },
2178
+ disabled: {
2179
+ type: Boolean,
2180
+ default: !1
2181
+ },
2182
+ placeholder: { default: "Pesquisar..." },
2183
+ optionLabel: {
2184
+ type: [String, Function],
2185
+ default: "label"
2186
+ },
2187
+ optionKey: { default: "id" },
2188
+ optionPrefix: { default: "" },
2189
+ showOptionPrefix: {
2190
+ type: Boolean,
2191
+ default: !1
2192
+ },
2193
+ showSelectedPrefix: {
2194
+ type: Boolean,
2195
+ default: !1
2196
+ },
2197
+ panelWidth: { default: null },
2198
+ scrollHeight: { default: "250px" },
2199
+ invalid: {
2200
+ type: Boolean,
2201
+ default: !1
2202
+ },
2203
+ showTooltip: {
2204
+ type: Boolean,
2205
+ default: !0
2206
+ },
2207
+ optionGroupLabel: { default: null },
2208
+ optionGroupChildren: { default: null },
2209
+ minQueryLength: { default: 1 },
2210
+ emptyMessage: { default: "Nenhum resultado encontrado." },
2211
+ loadingMessage: { default: "Carregando..." },
2212
+ showLoadingMessage: {
2213
+ type: Boolean,
2214
+ default: !0
2215
+ },
2216
+ multiple: {
2217
+ type: Boolean,
2218
+ default: !1
2219
+ },
2220
+ forceSelection: {
2221
+ type: Boolean,
2222
+ default: !0
2223
+ },
2224
+ closeOnSelect: {
2225
+ type: Boolean,
2226
+ default: !1
2227
+ }
2228
+ },
2229
+ emits: [
2230
+ "update:modelValue",
2231
+ "search",
2232
+ "loadMore",
2233
+ "clear",
2234
+ "select",
2235
+ "change"
2236
+ ],
2237
+ setup(t, { expose: r, emit: u }) {
2238
+ let g = t, x = u, S = E(), ne = R, T = v(""), A = v(!1), j = v(null), N = `top-select-${Math.random().toString(36).slice(2)}`, P = null, F = n({
2239
+ get: () => g.modelValue,
2240
+ set: (e) => x("update:modelValue", e)
2241
+ });
2242
+ function I(e, t) {
2243
+ return e == null ? "" : String(typeof e == "object" ? e[t] ?? "" : e);
2244
+ }
2245
+ function L(e) {
2246
+ return e == null ? "" : typeof g.optionLabel == "function" ? g.optionLabel(e) : I(e, g.optionLabel);
2247
+ }
2248
+ function re(e) {
2249
+ return g.optionPrefix ? I(e, g.optionPrefix) : "";
2250
+ }
2251
+ function ie(e, t = g.showSelectedPrefix) {
2252
+ let n = L(e), r = re(e);
2253
+ return t && r ? `${r} - ${n}` : n;
2254
+ }
2255
+ function z(e) {
2256
+ let t = T.value;
2257
+ if (!t) return [{
2258
+ text: e,
2259
+ highlighted: !1
2260
+ }];
2261
+ let n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), r = RegExp(`(${n})`, "gi");
2262
+ return e.split(r).filter(Boolean).map((e) => ({
2263
+ text: e,
2264
+ highlighted: e.toLowerCase() === t.toLowerCase()
2265
+ }));
2266
+ }
2267
+ function B() {
2268
+ j.value?.hide?.();
2269
+ }
2270
+ function V() {
2271
+ typeof window > "u" || window.dispatchEvent(new CustomEvent("top-select:close-others", { detail: { instanceId: N } }));
2272
+ }
2273
+ function ae(e) {
2274
+ e.detail?.instanceId !== N && B();
2275
+ }
2276
+ function H() {
2277
+ if (g.disabled || P) {
2278
+ B();
2279
+ return;
2280
+ }
2281
+ A.value = !0, V();
2282
+ }
2283
+ function U() {
2284
+ g.closeOnSelect && (A.value = !1, B(), p(B), P && clearTimeout(P), P = setTimeout(() => {
2285
+ B(), P = null;
2286
+ }, 200));
2287
+ }
2288
+ return r({ hideDropdown: B }), te(() => window.addEventListener("top-select:close-others", ae)), ee(() => {
2289
+ window.removeEventListener("top-select:close-others", ae), P && clearTimeout(P);
2290
+ }), D(() => g.disabled, (e) => {
2291
+ e && (A.value = !1, B());
2292
+ }), D(() => g.options, () => {
2293
+ A.value || B();
2294
+ }), (n, r) => (_(), a("div", {
2295
+ class: m(["top-select top-solutions-component relative w-full", { "pointer-events-none": t.disabled }]),
2296
+ onFocusin: H
2297
+ }, [o("span", In, [b(n.$slots, "icon", { loading: t.loading }, () => [t.loading ? (_(), a("i", Ln)) : (_(), a("i", Q))])]), l(w(ne), {
2298
+ ref_key: "autocompleteRef",
2299
+ ref: j,
2300
+ modelValue: F.value,
2301
+ "onUpdate:modelValue": r[0] ||= (e) => F.value = e,
2302
+ "option-group-label": t.optionGroupLabel ?? void 0,
2303
+ "option-group-children": t.optionGroupChildren ?? void 0,
2304
+ suggestions: t.options,
2305
+ "data-key": t.optionKey,
2306
+ "option-label": (e) => ie(e),
2307
+ placeholder: t.placeholder,
2308
+ multiple: t.multiple,
2309
+ "min-length": t.minQueryLength,
2310
+ disabled: t.disabled,
2311
+ delay: 500,
2312
+ "show-clear": !t.multiple && !t.disabled,
2313
+ dropdown: "",
2314
+ "dropdown-mode": "current",
2315
+ "complete-on-focus": !1,
2316
+ invalid: t.invalid,
2317
+ fluid: "",
2318
+ "force-selection": t.forceSelection,
2319
+ "input-class": "text-xs",
2320
+ "virtual-scroller-options": {
2321
+ lazy: !0,
2322
+ onLazyLoad: (e) => x("loadMore", e),
2323
+ itemSize: 84,
2324
+ showLoader: !0,
2325
+ scrollHeight: t.scrollHeight
2326
+ },
2327
+ pt: {
2328
+ root: { class: ["w-full text-xs", t.multiple ? "h-auto" : "h-[40px]"].join(" ") },
2329
+ pcInputText: { root: { class: "top-field-control w-full h-auto text-xs border rounded-[10px] !pl-9 min-h-[36px]" } },
2330
+ input: { class: ["top-field-control w-full h-auto text-xs", t.multiple ? "border-0 py-1 !shadow-none outline-none ring-0" : "border rounded-[10px] !pl-9 min-h-[36px]"].join(" ") },
2331
+ inputMultiple: { class: "top-field-control rounded-[10px] pl-9 min-h-[40px]" },
2332
+ inputChip: { class: "py-0" },
2333
+ token: { class: "bg-primary-100 text-primary-900 rounded-md gap-2 px-2 my-1 dark:bg-primary-900 dark:text-primary-100" },
2334
+ removeTokenIcon: { class: "text-primary-900 w-3 h-3 cursor-pointer dark:text-primary-100" },
2335
+ panel: { class: "top-select-panel top-solutions-component max-w-[85vw] overflow-hidden h-fit shadow-xl" },
2336
+ listContainer: {
2337
+ class: "max-w-full overflow-x-hidden",
2338
+ style: {
2339
+ overflowX: "hidden",
2340
+ maxWidth: t.panelWidth ?? "85vw",
2341
+ ...t.panelWidth ? { width: t.panelWidth } : {}
2342
+ }
2343
+ },
2344
+ list: { class: "max-w-full overflow-x-hidden" },
2345
+ option: { class: "max-w-full overflow-hidden min-h-[84px]" },
2346
+ placeholder: { class: "!text-xs" }
2347
+ },
2348
+ "search-message": " ",
2349
+ onClear: r[1] ||= (e) => {
2350
+ T.value = "", x("clear");
2351
+ },
2352
+ onItemSelect: r[2] ||= (e) => {
2353
+ T.value = "", x("select", e), U();
2354
+ },
2355
+ onComplete: r[3] ||= (e) => {
2356
+ if (t.disabled) {
2357
+ B();
2358
+ return;
2359
+ }
2360
+ T.value = e.query ?? "", V(), x("search", {
2361
+ ...e,
2362
+ query: T.value
2363
+ });
2364
+ },
2365
+ onChange: r[4] ||= (e) => x("change", e)
2366
+ }, s({
2367
+ chip: O((e) => [w(S).chip ? b(n.$slots, "chip", h(d(e)), void 0, void 0, 0) : (_(), a("div", $, [o("div", Rn, [o("i", {
2368
+ class: "pi pi-times-circle shrink-0 cursor-pointer rounded-full hover:bg-primary-800",
2369
+ onClick: (t) => e.removeCallback(t)
2370
+ }, null, 8, zn), k((_(), a("span", Bn, [c(C(ie(e.value)), 1)])), [[
2371
+ w(M),
2372
+ ie(e.value),
2373
+ void 0,
2374
+ { top: !0 }
2375
+ ]])])]))]),
2376
+ empty: O(() => [w(S).empty ? b(n.$slots, "empty", {}, void 0, void 0, 0) : t.loading ? (_(), a("div", Vn, [r[5] ||= o("span", { class: "pi pi-spin pi-spinner text-2xl text-primary-600" }, null, -1), t.showLoadingMessage ? (_(), a("span", Hn, C(t.loadingMessage), 1)) : i("", !0)])) : (_(), a("span", Un, C(t.emptyMessage), 1))]),
2377
+ "selected-item": O((e) => [w(S)["selected-item"] ? b(n.$slots, "selected-item", h(d(e)), void 0, void 0, 0) : e.item ? (_(), a("span", Wn, C(ie(e.item)), 1)) : i("", !0)]),
2378
+ optiongroup: O((e) => [w(S)["option-group"] ? b(n.$slots, "option-group", h(d(e)), void 0, void 0, 0) : (_(), a("div", Gn, [e.option.icon ? (_(), a("i", {
2379
+ key: 0,
2380
+ class: m(e.option.icon)
2381
+ }, null, 2)) : i("", !0), o("span", null, C(e.option[t.optionGroupLabel ?? "label"]), 1)]))]),
2382
+ option: O((s) => [w(S).option ? b(n.$slots, "option", f(s, {
2383
+ label: L(s.option),
2384
+ prefix: re(s.option),
2385
+ query: T.value
2386
+ }), void 0, void 0, 0) : k((_(), a("div", Kn, [o("span", {
2387
+ class: "top-select-option-label line-clamp-2 min-w-0 flex-1 text-secondary-700 dark:text-zinc-200",
2388
+ title: L(s.option)
2389
+ }, [t.showOptionPrefix && re(s.option) ? (_(), a("span", Jn, [(_(!0), a(e, null, y(z(re(s.option)), (t, n) => (_(), a(e, { key: n }, [t.highlighted ? (_(), a("mark", Yn, C(t.text), 1)) : (_(), a(e, { key: 1 }, [c(C(t.text), 1)], 64))], 64))), 128)), r[6] ||= o("span", { class: "font-bold text-secondary-500 dark:text-zinc-400" }, "\xA0-\xA0", -1)])) : i("", !0), (_(!0), a(e, null, y(z(L(s.option)), (t, n) => (_(), a(e, { key: n }, [t.highlighted ? (_(), a("mark", Xn, C(t.text), 1)) : (_(), a(e, { key: 1 }, [c(C(t.text), 1)], 64))], 64))), 128))], 8, qn)])), [[
2390
+ w(M),
2391
+ t.showTooltip ? L(s.option) : null,
2392
+ void 0,
2393
+ { top: !0 }
2394
+ ]])]),
2395
+ _: 2
2396
+ }, [w(S).footer ? {
2397
+ name: "footer",
2398
+ fn: O((e) => [b(n.$slots, "footer", h(d(e)))]),
2399
+ key: "0"
2400
+ } : void 0]), 1032, [
2401
+ "modelValue",
2402
+ "option-group-label",
2403
+ "option-group-children",
2404
+ "suggestions",
2405
+ "data-key",
2406
+ "option-label",
2407
+ "placeholder",
2408
+ "multiple",
2409
+ "min-length",
2410
+ "disabled",
2411
+ "show-clear",
2412
+ "invalid",
2413
+ "force-selection",
2414
+ "virtual-scroller-options",
2415
+ "pt"
2416
+ ])], 34));
2417
+ }
2418
+ }), Qn = /* @__PURE__ */ u({
2419
+ inheritAttrs: !1,
2420
+ __name: "TopTabs",
2421
+ props: {
2422
+ modelValue: {},
2423
+ tabs: {},
2424
+ lazy: {
2425
+ type: Boolean,
2426
+ default: !1
2427
+ },
2428
+ scrollable: {
2429
+ type: Boolean,
2430
+ default: !0
2431
+ }
2432
+ },
2433
+ emits: ["update:modelValue"],
2434
+ setup(t, { emit: n }) {
2435
+ let i = n;
2436
+ function o(e) {
2437
+ return String(e.value);
2438
+ }
2439
+ return (n, s) => (_(), r(w(H), f(n.$attrs, {
2440
+ class: "top-tabs top-solutions-component w-full min-w-0",
2441
+ value: t.modelValue,
2442
+ lazy: t.lazy,
2443
+ scrollable: t.scrollable,
2444
+ "onUpdate:value": s[0] ||= (e) => i("update:modelValue", e)
2445
+ }), {
2446
+ default: O(() => [l(w(B), null, {
2447
+ default: O(() => [(_(!0), a(e, null, y(t.tabs, (e) => (_(), r(w(z), {
2448
+ key: e.value,
2449
+ value: e.value,
2450
+ disabled: e.disabled
2451
+ }, {
2452
+ default: O(() => [c(C(e.label), 1)]),
2453
+ _: 2
2454
+ }, 1032, ["value", "disabled"]))), 128))]),
2455
+ _: 1
2456
+ }), l(w(ae), null, {
2457
+ default: O(() => [(_(!0), a(e, null, y(t.tabs, (e) => (_(), r(w(V), {
2458
+ key: e.value,
2459
+ value: e.value
2460
+ }, {
2461
+ default: O(() => [b(n.$slots, o(e), {
2462
+ tab: e,
2463
+ active: t.modelValue === e.value
2464
+ })]),
2465
+ _: 2
2466
+ }, 1032, ["value"]))), 128))]),
2467
+ _: 3
2468
+ })]),
2469
+ _: 3
2470
+ }, 16, [
2471
+ "value",
2472
+ "lazy",
2473
+ "scrollable"
2474
+ ]));
2475
+ }
2476
+ }), $n = { class: "top-toast__content" }, er = { class: "top-toast__detail" }, tr = ["onClick"], nr = {
2477
+ key: 0,
2478
+ class: "top-toast__footer"
2479
+ }, rr = /* @__PURE__ */ u({
2480
+ __name: "TopToast",
2481
+ props: { baseZIndex: { default: 3e4 } },
2482
+ setup(e) {
2483
+ function t(e) {
2484
+ return e.data?.footer;
2485
+ }
2486
+ function n(e) {
2487
+ return e.data?.action;
2488
+ }
2489
+ function s(e) {
2490
+ n(e)?.onClick?.();
2491
+ }
2492
+ function l(e) {
2493
+ return t(e) !== void 0;
2494
+ }
2495
+ function u(e) {
2496
+ return !!n(e);
2497
+ }
2498
+ function d(e, t) {
2499
+ return `top-toast__${t}--${e.severity ?? "info"}`;
2500
+ }
2501
+ return (f, p) => (_(), r(w(U), {
2502
+ position: "top-right",
2503
+ "base-z-index": e.baseZIndex
2504
+ }, {
2505
+ message: O((e) => [o("div", $n, [
2506
+ o("div", { class: m(["top-toast__summary", d(e.message, "summary")]) }, C(e.message.summary), 3),
2507
+ o("div", er, C(e.message.detail), 1),
2508
+ u(e.message) ? b(f.$slots, "action", {
2509
+ action: n(e.message),
2510
+ message: e.message,
2511
+ run: () => s(e.message)
2512
+ }, () => [n(e.message) ? (_(), a("button", {
2513
+ key: 0,
2514
+ class: m(["top-toast__action", d(e.message, "action")]),
2515
+ type: "button",
2516
+ onClick: (t) => s(e.message)
2517
+ }, [n(e.message)?.icon ? (_(), a("i", {
2518
+ key: 0,
2519
+ class: m(n(e.message)?.icon),
2520
+ "aria-hidden": "true"
2521
+ }, null, 2)) : i("", !0), c(" " + C(n(e.message)?.label), 1)], 10, tr)) : i("", !0)], void 0, 0) : i("", !0),
2522
+ l(e.message) ? b(f.$slots, "footer", {
2523
+ message: e.message,
2524
+ footer: t(e.message)
2525
+ }, () => [t(e.message) === void 0 ? i("", !0) : (_(), a("div", nr, C(t(e.message)), 1))], void 0, 1) : i("", !0)
2526
+ ])]),
2527
+ _: 3
2528
+ }, 8, ["base-z-index"]));
2529
+ }
2530
+ });
2531
+ //#endregion
2532
+ export { ze as a, le as c, Fn as i, se as l, Qn as n, Fe as o, Zn as r, me as s, rr as t, oe as u };
2533
+
2534
+ //# sourceMappingURL=TopToast-BFY94BWZ.js.map