@aeria-ui/ui 0.0.64 → 0.0.66

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,3431 @@
1
+ import { defineComponent as U, ref as J, resolveDirective as ne, openBlock as o, createElementBlock as i, normalizeClass as K, Fragment as N, renderList as D, withDirectives as x, toDisplayString as k, createCommentVNode as y, createTextVNode as W, unref as e, renderSlot as I, inject as ve, computed as Q, createElementVNode as V, mergeProps as H, createBlock as g, resolveDynamicComponent as he, withCtx as f, useCssVars as Ct, Teleport as Xe, onMounted as vt, watch as ue, createVNode as z, vModelDynamic as Ot, onBeforeMount as yt, normalizeStyle as $e, withModifiers as qe, pushScopeId as Ee, popScopeId as De, provide as ye, createSlots as ce, normalizeProps as pe, guardReactiveProps as Ve, vModelCheckbox as It, onUnmounted as At, isRef as ct, resolveComponent as Bt, Suspense as wt, useSlots as St, h as jt } from "vue";
2
+ import { t as M, useI18n as Tt } from "@aeria-ui/i18n";
3
+ import { useScrollObserver as Ye, useBreakpoints as ze, useMask as Lt, PAGINATION_PER_PAGE_DEFAULTS as Rt, API_URL as ht, request as zt, useDebounce as $t, isDocumentComplete as Mt, getObjectKey as Ft, convertToSearchQuery as qt, useAction as Ut, convertFromSearchQuery as Et, usePasswordPolicy as Dt } from "@aeria-ui/core";
4
+ import { arraysIntersect as bt, getReferenceProperty as _e, convertConditionToQuery as Ht, deepClone as Re, freshItem as Qt, isRequired as Gt, evaluateCondition as Ke } from "@aeriajs/common";
5
+ import { useStore as ie, getStoreId as Me, useParentStore as ge, STORE_ID as He, getGlobalStateManager as gt } from "@aeria-ui/state-management";
6
+ import { useRouter as Ie } from "vue-router";
7
+ const Wt = ["onClick"], Kt = { key: 0 }, Xt = {
8
+ key: 0,
9
+ class: "accordion__content"
10
+ }, Yt = /* @__PURE__ */ U({
11
+ __name: "aeria-accordion",
12
+ props: {
13
+ enumerate: { type: Boolean },
14
+ noPadding: { type: Boolean },
15
+ headers: {}
16
+ },
17
+ setup(d) {
18
+ const r = J(null), a = (t) => typeof t == "string" ? t : t.title;
19
+ return (t, l) => {
20
+ const s = ne("clickable");
21
+ return o(), i("div", {
22
+ class: K({
23
+ accordion: !0,
24
+ "accordion--padded": !t.noPadding
25
+ })
26
+ }, [
27
+ (o(!0), i(N, null, D(Object.keys(t.$slots).filter((u) => u !== "default"), (u, v) => (o(), i("div", {
28
+ key: u,
29
+ class: "accordion__slot"
30
+ }, [
31
+ x((o(), i("div", {
32
+ class: "accordion__header",
33
+ onClick: (c) => r.value === u ? r.value = null : r.value = u
34
+ }, [
35
+ t.enumerate ? (o(), i("span", Kt, k(v + 1) + ". ", 1)) : y("", !0),
36
+ W(" " + k(t.headers[u] ? a(t.headers[u]) : e(M)(u)), 1)
37
+ ], 8, Wt)), [
38
+ [s]
39
+ ]),
40
+ r.value === u ? (o(), i("div", Xt, [
41
+ I(t.$slots, u, {}, void 0, !0)
42
+ ])) : y("", !0)
43
+ ]))), 128))
44
+ ], 2);
45
+ };
46
+ }
47
+ });
48
+ const X = (d, r) => {
49
+ const a = d.__vccOpts || d;
50
+ for (const [t, l] of r)
51
+ a[t] = l;
52
+ return a;
53
+ }, Rl = /* @__PURE__ */ X(Yt, [["__scopeId", "data-v-3ea933d4"]]), Jt = /* @__PURE__ */ U({
54
+ __name: "aeria-badge",
55
+ props: {
56
+ large: { type: Boolean },
57
+ alt: { type: Boolean }
58
+ },
59
+ setup(d) {
60
+ return (r, a) => (o(), i("div", {
61
+ class: K(`
62
+ badge
63
+ ${r.large && "badge--large"}
64
+ ${r.alt && "badge--alt"}
65
+ `)
66
+ }, [
67
+ I(r.$slots, "default", {}, void 0, !0)
68
+ ], 2));
69
+ }
70
+ });
71
+ const be = /* @__PURE__ */ X(Jt, [["__scopeId", "data-v-47f92648"]]), Zt = /* @__PURE__ */ U({
72
+ __name: "aeria-bare-button",
73
+ props: {
74
+ disabled: { type: Boolean }
75
+ },
76
+ emits: ["click"],
77
+ setup(d, { emit: r }) {
78
+ const a = d, t = r, l = (s) => {
79
+ a.disabled || t("click", s);
80
+ };
81
+ return (s, u) => (o(), i("button", {
82
+ class: K(`
83
+ barebutton
84
+ barebutton--${s.disabled ? "disabled" : "enabled"}
85
+ `),
86
+ onClick: l
87
+ }, [
88
+ I(s.$slots, "default", {}, void 0, !0)
89
+ ], 2));
90
+ }
91
+ });
92
+ const fe = /* @__PURE__ */ X(Zt, [["__scopeId", "data-v-35bc81ae"]]), Pt = ["href"], Nt = {
93
+ key: 0,
94
+ "data-component": "icon-label"
95
+ }, xt = /* @__PURE__ */ U({
96
+ __name: "aeria-icon",
97
+ props: {
98
+ icon: {},
99
+ size: {},
100
+ medium: { type: Boolean },
101
+ reactive: { type: [Boolean, null] },
102
+ iconRight: { type: Boolean },
103
+ fill: {}
104
+ },
105
+ setup(d) {
106
+ const r = d, a = typeof r.reactive == "boolean" ? r.reactive : ve("iconReactive", !1), t = Q(() => {
107
+ var l;
108
+ return (l = r.icon) != null && l.includes(":") ? r.icon : `regular:${r.icon}`;
109
+ });
110
+ return (l, s) => (o(), i("a", {
111
+ class: K(`
112
+ icon
113
+ ${e(a) && "icon--reactive"}
114
+ ${l.$slots.default ? "icon--centered" : "icon--standalone"}
115
+ `)
116
+ }, [
117
+ V("div", {
118
+ class: K(`
119
+ icon__icon
120
+ ${l.size && `icon__icon--${l.size}`}
121
+ ${l.iconRight && "icon__icon--right"}
122
+ `)
123
+ }, [
124
+ (o(), i("svg", H({
125
+ width: "24",
126
+ height: "24",
127
+ viewBox: "0 0 256 256",
128
+ "data-component": "icon"
129
+ }, {
130
+ ...l.fill ? { fill: l.fill } : {}
131
+ }), [
132
+ V("use", {
133
+ href: `/assets/icons.svg#${t.value}`
134
+ }, null, 8, Pt)
135
+ ], 16))
136
+ ], 2),
137
+ l.$slots.default ? (o(), i("div", Nt, [
138
+ I(l.$slots, "default", {}, void 0, !0)
139
+ ])) : y("", !0)
140
+ ], 2));
141
+ }
142
+ });
143
+ const Z = /* @__PURE__ */ X(xt, [["__scopeId", "data-v-4b763bd3"]]), en = { class: "panel__header-left" }, tn = { key: 1 }, nn = {
144
+ key: 2,
145
+ style: { "margin-left": "auto" }
146
+ }, on = /* @__PURE__ */ U({
147
+ __name: "aeria-panel",
148
+ props: {
149
+ closeHint: { type: Boolean, default: !1 },
150
+ modelValue: { default: !0 },
151
+ title: {},
152
+ float: { type: Boolean },
153
+ fixedRight: { type: Boolean },
154
+ floating: { type: Boolean },
155
+ loading: { type: Boolean },
156
+ bordered: { type: Boolean },
157
+ overlay: { type: Boolean },
158
+ invisibleOverlay: { type: Boolean },
159
+ collapsed: { type: Boolean },
160
+ collapsible: { type: Boolean, default: !1 },
161
+ fill: { type: Boolean },
162
+ fillFooter: { type: Boolean },
163
+ transparent: { type: Boolean },
164
+ transparentMobile: { type: Boolean },
165
+ outerHeader: { type: Boolean },
166
+ overlayLayer: {}
167
+ },
168
+ emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
169
+ setup(d, { emit: r }) {
170
+ const a = d, t = r, l = Q(() => a.floating || a.float), s = J(a.collapsed), u = J(null), { reachedEnd: v } = Ye(u), c = () => {
171
+ t("update:modelValue", !1), t("close");
172
+ }, h = () => {
173
+ t("overlayClick");
174
+ }, p = (n) => {
175
+ t("update:collapsed", n), s.value = n;
176
+ };
177
+ return (n, _) => {
178
+ const $ = ne("clickable"), b = ne("loading"), S = ne("overlay");
179
+ return n.modelValue ? x((o(), i("div", {
180
+ key: 0,
181
+ class: K(`
182
+ panel
183
+ ${n.fixedRight && "panel--fixed"}
184
+ `)
185
+ }, [
186
+ (o(), g(he(
187
+ l.value ? "dialog" : "div"
188
+ ), {
189
+ "data-component": "panel",
190
+ class: K(`
191
+ aeria-surface
192
+ panel__content
193
+ ${l.value && "panel__content--floating"}
194
+ ${n.bordered && "panel__content--bordered"}
195
+ ${n.fixedRight && "panel__content--fixed-right"}
196
+ ${n.transparent && "panel__content--transparent"}
197
+ ${n.transparentMobile && "panel__content--transparent-mobile"}
198
+ ${n.outerHeader && "panel__content--outer-header"}
199
+ `),
200
+ onClick: _[2] || (_[2] = (T) => T.stopPropagation())
201
+ }, {
202
+ default: f(() => [
203
+ n.$slots.header || n.title ? (o(), i("div", {
204
+ key: 0,
205
+ class: K(`
206
+ panel__header
207
+ ${s.value && "panel__header--collapsed"}
208
+ ${n.outerHeader && "panel__header--outer"}
209
+ `)
210
+ }, [
211
+ V("div", en, [
212
+ n.$slots.header ? I(n.$slots, "header", { key: 0 }, void 0, !0) : n.title ? (o(), i("div", tn, k(n.title), 1)) : y("", !0),
213
+ n.$slots.extra ? (o(), i("div", nn, [
214
+ I(n.$slots, "extra", {}, void 0, !0)
215
+ ])) : y("", !0)
216
+ ]),
217
+ n.collapsible && s.value ? x((o(), g(Z, {
218
+ key: 0,
219
+ reactive: "",
220
+ icon: "plus",
221
+ onClick: _[0] || (_[0] = (T) => p(!s.value))
222
+ }, null, 512)), [
223
+ [$]
224
+ ]) : n.collapsible && !s.value ? x((o(), g(Z, {
225
+ key: 1,
226
+ reactive: "",
227
+ icon: "minus",
228
+ onClick: _[1] || (_[1] = (T) => p(!s.value))
229
+ }, null, 512)), [
230
+ [$]
231
+ ]) : n.closeHint ? x((o(), g(Z, {
232
+ key: 2,
233
+ reactive: "",
234
+ icon: "x",
235
+ onClick: c
236
+ }, null, 512)), [
237
+ [$]
238
+ ]) : y("", !0)
239
+ ], 2)) : y("", !0),
240
+ s.value ? y("", !0) : x((o(), i("div", {
241
+ key: 1,
242
+ ref_key: "body",
243
+ ref: u,
244
+ class: K(`
245
+ panel__body
246
+ ${n.fill || "panel__body--padded"}
247
+ `)
248
+ }, [
249
+ I(n.$slots, "default", {}, void 0, !0)
250
+ ], 2)), [
251
+ [b, n.loading]
252
+ ]),
253
+ n.$slots.footer ? (o(), i("div", {
254
+ key: 2,
255
+ class: K(`
256
+ panel__footer
257
+ ${n.fillFooter || "panel__footer--padded"}
258
+ ${e(v) || "panel__footer--shadowed"}
259
+ `)
260
+ }, [
261
+ I(n.$slots, "footer", {}, void 0, !0)
262
+ ], 2)) : y("", !0)
263
+ ]),
264
+ _: 3
265
+ }, 8, ["class"]))
266
+ ], 2)), [
267
+ [S, {
268
+ condition: n.overlay || n.fixedRight || l.value,
269
+ invisible: n.invisibleOverlay,
270
+ click: h,
271
+ layer: n.overlayLayer || (l.value ? 60 : n.fixedRight ? 50 : 0)
272
+ }]
273
+ ]) : y("", !0);
274
+ };
275
+ }
276
+ });
277
+ const Ae = /* @__PURE__ */ X(on, [["__scopeId", "data-v-73b47cf0"]]), an = { class: "button__content" }, ln = {
278
+ key: 1,
279
+ class: "button__content"
280
+ }, sn = /* @__PURE__ */ U({
281
+ __name: "aeria-button",
282
+ props: {
283
+ size: {},
284
+ variant: {},
285
+ small: { type: Boolean },
286
+ large: { type: Boolean },
287
+ icon: {},
288
+ disabled: { type: Boolean },
289
+ loading: { type: Boolean }
290
+ },
291
+ setup(d) {
292
+ const r = d, a = ve("buttonVariant", r.variant) || "primary", t = (() => {
293
+ switch (!0) {
294
+ case r.small:
295
+ return "small";
296
+ case r.large:
297
+ return "large";
298
+ }
299
+ return ve("buttonSize", r.size) || "medium";
300
+ })();
301
+ return (l, s) => (o(), g(fe, {
302
+ class: K(`
303
+ button
304
+ button--${e(a)}
305
+ button--${e(t)}
306
+ ${l.loading && "button--loading"}
307
+ `),
308
+ disabled: l.disabled
309
+ }, {
310
+ default: f(() => [
311
+ l.icon ? (o(), g(Z, {
312
+ key: 0,
313
+ icon: l.icon
314
+ }, {
315
+ default: f(() => [
316
+ V("div", an, [
317
+ I(l.$slots, "default", {}, void 0, !0)
318
+ ])
319
+ ]),
320
+ _: 3
321
+ }, 8, ["icon"])) : (o(), i("div", ln, [
322
+ I(l.$slots, "default", {}, void 0, !0)
323
+ ]))
324
+ ]),
325
+ _: 3
326
+ }, 8, ["class", "disabled"]));
327
+ }
328
+ });
329
+ const re = /* @__PURE__ */ X(sn, [["__scopeId", "data-v-c328251b"]]), rn = { class: "card__picture" }, un = { class: "card__footer" }, cn = { class: "card__footer-upper" }, dn = { class: "card__badge" }, pn = /* @__PURE__ */ U({
330
+ __name: "aeria-card",
331
+ props: {
332
+ inactive: { type: Boolean },
333
+ horizontal: { type: Boolean }
334
+ },
335
+ setup(d) {
336
+ return (r, a) => (o(), i("div", {
337
+ class: K(`
338
+ card
339
+ ${r.inactive && "card--inactive"}
340
+ ${r.horizontal && "card--horizontal"}
341
+ `)
342
+ }, [
343
+ V("div", rn, [
344
+ I(r.$slots, "default", {}, void 0, !0)
345
+ ]),
346
+ V("div", un, [
347
+ V("div", cn, [
348
+ V("div", null, [
349
+ I(r.$slots, "footer", {}, void 0, !0)
350
+ ]),
351
+ r.$slots.actions ? I(r.$slots, "actions", { key: 0 }, void 0, !0) : y("", !0)
352
+ ]),
353
+ V("div", dn, [
354
+ I(r.$slots, "badge", {}, void 0, !0)
355
+ ])
356
+ ])
357
+ ], 2));
358
+ }
359
+ });
360
+ const _n = /* @__PURE__ */ X(pn, [["__scopeId", "data-v-c1a322df"]]), mn = { class: "content__body" }, fn = {
361
+ key: 0,
362
+ class: "content__section"
363
+ }, vn = { class: "content__item" }, yn = /* @__PURE__ */ U({
364
+ __name: "aeria-context-menu",
365
+ props: {
366
+ actions: {},
367
+ subject: {},
368
+ overlayLayer: {}
369
+ },
370
+ emits: ["actionClick"],
371
+ setup(d, { emit: r }) {
372
+ Ct((c) => ({
373
+ "21ea8da7": v.value.x,
374
+ "21ea8da8": v.value.y
375
+ }));
376
+ const a = r, t = J(null), l = J(!1), s = (c) => c == null ? void 0 : c.filter((h) => {
377
+ if (h.roles) {
378
+ const p = ie("user");
379
+ return bt(h.roles, p.currentUser.roles);
380
+ }
381
+ return !0;
382
+ }), u = (c, h) => {
383
+ c.click(h), a("actionClick", {
384
+ action: c,
385
+ subject: h
386
+ }), l.value = !1;
387
+ }, v = Q(() => {
388
+ if (!t.value)
389
+ return {
390
+ x: 0,
391
+ y: 0
392
+ };
393
+ const c = t.value.getBoundingClientRect().top, h = t.value.getBoundingClientRect().left, p = t.value.offsetHeight;
394
+ return {
395
+ _: l.value,
396
+ x: Math.floor(h) + "px",
397
+ y: Math.floor(c + p) + "px"
398
+ };
399
+ });
400
+ return (c, h) => {
401
+ const p = ne("overlay");
402
+ return o(), i(N, null, [
403
+ Object.keys(c.$slots).some((n) => n !== "default") || c.actions !== void 0 && c.actions.length > 0 ? (o(), i("div", {
404
+ key: 0,
405
+ ref_key: "contextmenu",
406
+ ref: t,
407
+ class: "contextmenu"
408
+ }, [
409
+ V("a", {
410
+ class: "contextmenu__trigger",
411
+ onClick: h[0] || (h[0] = (n) => l.value = !0)
412
+ }, [
413
+ I(c.$slots, "default", {}, void 0, !0)
414
+ ])
415
+ ], 512)) : y("", !0),
416
+ l.value ? (o(), g(Xe, {
417
+ key: 1,
418
+ to: "main"
419
+ }, [
420
+ x((o(), g(Ae, {
421
+ modelValue: l.value,
422
+ "onUpdate:modelValue": h[4] || (h[4] = (n) => l.value = n),
423
+ fill: "",
424
+ bordered: "",
425
+ class: "content",
426
+ style: { "--panel-min-width": "0" }
427
+ }, {
428
+ default: f(() => [
429
+ V("div", mn, [
430
+ c.$slots.header ? (o(), i("div", fn, [
431
+ I(c.$slots, "header", {}, void 0, !0)
432
+ ])) : y("", !0),
433
+ Object.keys(c.$slots).filter((n) => !["default", "extra", "header"].includes(n)).length > 0 ? (o(), i("div", {
434
+ key: 1,
435
+ class: "content__section",
436
+ onClick: h[1] || (h[1] = (n) => l.value = !1)
437
+ }, [
438
+ (o(!0), i(N, null, D(Object.keys(c.$slots).filter((n) => !["default", "extra", "header"].includes(n)), (n, _) => (o(), g(fe, {
439
+ key: `slot-${_}`,
440
+ class: "content__item content__item--reactive"
441
+ }, {
442
+ default: f(() => [
443
+ I(c.$slots, n, {}, void 0, !0)
444
+ ]),
445
+ _: 2
446
+ }, 1024))), 128))
447
+ ])) : y("", !0),
448
+ c.actions !== void 0 && c.actions.length > 0 ? (o(), i("div", {
449
+ key: 2,
450
+ class: "content__section",
451
+ onClick: h[2] || (h[2] = (n) => l.value = !1)
452
+ }, [
453
+ (o(!0), i(N, null, D(s(c.actions), (n, _) => (o(), g(fe, {
454
+ key: `action-${_}`,
455
+ class: "content__item content__item--reactive",
456
+ onClick: ($) => u(n, c.subject)
457
+ }, {
458
+ default: f(() => [
459
+ n.icon ? (o(), g(Z, {
460
+ key: 0,
461
+ icon: n.icon
462
+ }, {
463
+ default: f(() => [
464
+ W(k(n.translate ? e(M)(n.label, { capitalize: !0 }) : n.label), 1)
465
+ ]),
466
+ _: 2
467
+ }, 1032, ["icon"])) : y("", !0)
468
+ ]),
469
+ _: 2
470
+ }, 1032, ["onClick"]))), 128))
471
+ ])) : y("", !0),
472
+ c.$slots.extra ? (o(), i("div", {
473
+ key: 3,
474
+ class: "content__section",
475
+ onClick: h[3] || (h[3] = (n) => l.value = !1)
476
+ }, [
477
+ V("div", vn, [
478
+ c.$slots.extra ? I(c.$slots, "extra", { key: 0 }, void 0, !0) : y("", !0)
479
+ ])
480
+ ])) : y("", !0)
481
+ ])
482
+ ]),
483
+ _: 3
484
+ }, 8, ["modelValue"])), [
485
+ [
486
+ p,
487
+ {
488
+ layer: c.overlayLayer,
489
+ click: () => {
490
+ l.value = !1;
491
+ }
492
+ },
493
+ void 0,
494
+ { invisibleOnLarge: !0 }
495
+ ]
496
+ ])
497
+ ])) : y("", !0)
498
+ ], 64);
499
+ };
500
+ }
501
+ });
502
+ const Ce = /* @__PURE__ */ X(yn, [["__scopeId", "data-v-35e35d32"]]), hn = { class: "info__content" }, $n = /* @__PURE__ */ U({
503
+ __name: "aeria-info",
504
+ props: {
505
+ where: {}
506
+ },
507
+ setup(d) {
508
+ const r = d, a = ze(), t = J(!1), l = r.where || "top";
509
+ return (s, u) => e(a).md ? (o(), i("div", {
510
+ key: 0,
511
+ class: "info",
512
+ onMouseleave: u[1] || (u[1] = (v) => t.value = !1)
513
+ }, [
514
+ t.value ? (o(), i("div", {
515
+ key: 0,
516
+ class: K(`
517
+ info__bubble
518
+ info__bubble--${e(l)}
519
+ `)
520
+ }, [
521
+ V("div", hn, [
522
+ I(s.$slots, "text", {}, void 0, !0)
523
+ ])
524
+ ], 2)) : y("", !0),
525
+ V("div", {
526
+ onMouseover: u[0] || (u[0] = (v) => t.value = !0)
527
+ }, [
528
+ I(s.$slots, "default", {}, void 0, !0)
529
+ ], 32)
530
+ ], 32)) : I(s.$slots, "default", { key: 1 }, void 0, !0);
531
+ }
532
+ });
533
+ const bn = /* @__PURE__ */ X($n, [["__scopeId", "data-v-76defa0b"]]), gn = { class: "input" }, kn = {
534
+ key: 0,
535
+ class: "input__label"
536
+ }, Vn = {
537
+ key: 1,
538
+ class: "input__hint"
539
+ }, Cn = ["placeholder", "readonly", "value"], On = ["value"], In = {
540
+ key: 1,
541
+ class: "input__clipboard"
542
+ }, An = /* @__PURE__ */ U({
543
+ __name: "aeria-input",
544
+ props: {
545
+ modelValue: {},
546
+ property: {},
547
+ propertyName: {},
548
+ parentPropertyName: {},
549
+ parentCollection: {},
550
+ readOnly: { type: Boolean },
551
+ variant: {}
552
+ },
553
+ emits: ["update:modelValue", "input", "change"],
554
+ setup(d, { emit: r }) {
555
+ var B;
556
+ const a = d, t = a.property || {}, l = "icon" in t || "inputType" in t && t.inputType === "search", s = ve("searchOnly", !1), u = ve("innerInputLabel", !1), v = !s && (a.readOnly || t.readOnly), c = (F) => navigator.clipboard.writeText(F), h = r, p = ve("inputVariant", a.variant) || "normal", n = {
557
+ name: a.propertyName,
558
+ readonly: v,
559
+ type: (() => {
560
+ if ("type" in t)
561
+ switch (t.type) {
562
+ case "number":
563
+ case "integer":
564
+ return "number";
565
+ }
566
+ if (t.inputType)
567
+ return t.inputType;
568
+ switch (typeof a.modelValue) {
569
+ case "string":
570
+ return "text";
571
+ case "number":
572
+ return "number";
573
+ default:
574
+ return "text";
575
+ }
576
+ })(),
577
+ placeholder: u ? t.description || a.propertyName : t.placeholder
578
+ };
579
+ "type" in t && ((t.type === "number" || t.type === "integer") && (t.minimum && (n.min = t.minimum), t.exclusiveMinimum && (n.min = t.exclusiveMinimum + 1), t.maximum && (n.max = t.maximum), t.exclusiveMaximum && (n.max = t.exclusiveMaximum - 1)), t.type === "string" && ((t.format === "date" || t.format === "date-time") && (n.type = !s && t.format === "date-time" ? "datetime-local" : "date"), n.minlength = t.minLength, n.maxlength = t.maxLength)), n.type === "text" && s && (n.type = "search"), vt(() => {
580
+ a.modelValue !== null && T(a.modelValue);
581
+ });
582
+ const _ = () => {
583
+ try {
584
+ return a.modelValue ? new Date(a.modelValue).toISOString().split("T").shift() : "";
585
+ } catch {
586
+ return "";
587
+ }
588
+ }, $ = J([
589
+ "date",
590
+ "date-time"
591
+ ].includes(n.type) ? _() : a.modelValue === null || a.modelValue === void 0 ? "" : a.modelValue), b = ((B = a.property) == null ? void 0 : B.type) === "string" && a.property.mask ? Lt(a.property.mask) : null, S = (F) => {
592
+ var Y;
593
+ return typeof $.value == "string" && ((Y = a.property) == null ? void 0 : Y.type) === "string" && b !== null ? ($.value = b.enmask($.value, void 0, {
594
+ defaultValue: !0
595
+ }), a.property.maskedValue === !0 ? $.value : b.unmask($.value)) : F;
596
+ }, T = (F) => {
597
+ const Y = (() => {
598
+ if (!F || typeof F != "string")
599
+ return F;
600
+ if (n.type === "number" || n.type === "integer")
601
+ return Number(F);
602
+ if (!("type" in t && t.type === "string"))
603
+ return S(F);
604
+ switch (t.format) {
605
+ case "date":
606
+ case "date-time":
607
+ return new Date(F);
608
+ default:
609
+ return S(F);
610
+ }
611
+ })();
612
+ h("input", Y), h("update:modelValue", Y);
613
+ }, P = (F) => {
614
+ const Y = F.target.value;
615
+ $.value = Y, T(Y);
616
+ };
617
+ return ue(() => a.modelValue, (F, Y) => {
618
+ F instanceof Date || (Y && !F ? $.value = void 0 : $.value = b ? b.enmask(String(F), void 0, {
619
+ defaultValue: !0
620
+ }) : String(F));
621
+ }), (F, Y) => {
622
+ const w = ne("focus"), te = ne("clickable");
623
+ return o(), i("label", gn, [
624
+ e(u) ? y("", !0) : (o(), i("div", kn, [
625
+ F.$slots.default ? I(F.$slots, "default", { key: 0 }, void 0, !0) : I(F.$slots, "description", { key: 1 }, void 0, !0)
626
+ ])),
627
+ F.$slots.hint ? (o(), i("div", Vn, [
628
+ I(F.$slots, "hint", {}, void 0, !0)
629
+ ])) : y("", !0),
630
+ "element" in e(t) && e(t).element === "textarea" ? (o(), i("div", {
631
+ key: 2,
632
+ class: K(`
633
+ input__container
634
+ input__container--${e(p)}
635
+ `)
636
+ }, [
637
+ x(V("textarea", {
638
+ placeholder: n.placeholder,
639
+ readonly: n.readonly,
640
+ value: F.modelValue,
641
+ class: K(`
642
+ input__textarea
643
+ input__input--${e(p)}
644
+ `),
645
+ onInput: P
646
+ }, null, 42, Cn), [
647
+ [w, e(t).focus]
648
+ ])
649
+ ], 2)) : (o(), i("div", {
650
+ key: 3,
651
+ class: K(`
652
+ input__container
653
+ input__container--${e(p)}
654
+ `)
655
+ }, [
656
+ x(V("input", H(n, {
657
+ value: $.value,
658
+ "data-component": "input",
659
+ class: `
660
+ input__input
661
+ input__input--${e(p)}
662
+ ${e(l) && "input__input--icon"}
663
+ ${e(v) && "input__input--readOnly"}
664
+ `,
665
+ onInput: P,
666
+ onChange: Y[0] || (Y[0] = (C) => h("change", C))
667
+ }), null, 16, On), [
668
+ [w, e(t).focus]
669
+ ]),
670
+ e(l) ? (o(), g(Z, {
671
+ key: 0,
672
+ icon: e(t).icon || "magnifying-glass",
673
+ class: K(`
674
+ input__icon
675
+ input__icon--${e(p)}
676
+ `)
677
+ }, null, 8, ["icon", "class"])) : y("", !0),
678
+ e(v) ? (o(), i("div", In, [
679
+ z(bn, null, {
680
+ text: f(() => [
681
+ W("Copiar")
682
+ ]),
683
+ default: f(() => [
684
+ x(z(Z, {
685
+ icon: "clipboard",
686
+ onClick: Y[1] || (Y[1] = (C) => c(String(F.modelValue || "")))
687
+ }, null, 512), [
688
+ [te]
689
+ ])
690
+ ]),
691
+ _: 1
692
+ })
693
+ ])) : y("", !0)
694
+ ], 2))
695
+ ]);
696
+ };
697
+ }
698
+ });
699
+ const Oe = /* @__PURE__ */ X(An, [["__scopeId", "data-v-fa830575"]]), Bn = ["value"], wn = {
700
+ key: 1,
701
+ value: ""
702
+ }, Sn = ["value", "data-selected"], jn = /* @__PURE__ */ U({
703
+ __name: "aeria-select",
704
+ props: {
705
+ modelValue: {},
706
+ property: {},
707
+ propertyName: {},
708
+ parentPropertyName: {},
709
+ parentCollection: {},
710
+ readOnly: { type: Boolean },
711
+ booleanRef: { type: Boolean },
712
+ multiple: { type: [Boolean, Number] },
713
+ noOutline: { type: Boolean }
714
+ },
715
+ emits: ["update:modelValue", "change"],
716
+ setup(d, { emit: r }) {
717
+ const a = d, t = r, l = J(null), s = a.property, u = (p) => {
718
+ a.booleanRef && (v.value = p), t("update:modelValue", (p == null ? void 0 : p._id) || p), t("change", (p == null ? void 0 : p._id) || p);
719
+ }, v = a.booleanRef ? (() => {
720
+ const p = J(a.modelValue);
721
+ return Q({
722
+ get: () => {
723
+ switch (p.value) {
724
+ case "true":
725
+ return !0;
726
+ case "false":
727
+ return !1;
728
+ default:
729
+ return null;
730
+ }
731
+ },
732
+ set: (_) => {
733
+ p.value = _;
734
+ }
735
+ });
736
+ })() : Q({
737
+ get: () => a.modelValue,
738
+ set: u
739
+ }), c = (p) => Array.isArray(a.modelValue) ? a.modelValue.includes(p) : a.modelValue === p, h = Q(() => a.multiple ? typeof a.multiple == "number" ? a.multiple : 5 : 1);
740
+ return a.multiple && ue(() => a.modelValue, (p) => {
741
+ var _;
742
+ if (!l.value)
743
+ return;
744
+ const n = l.value.querySelector('option[data-selected="true"]');
745
+ n && n.removeAttribute("data-selected"), (_ = l.value.querySelector(`option[value="${p}"]`)) == null || _.setAttribute("data-selected", "true");
746
+ }), (p, n) => (o(), i("div", {
747
+ class: K({
748
+ select: !0,
749
+ "select--outline": !p.noOutline
750
+ })
751
+ }, [
752
+ V("select", H({
753
+ ref_key: "select",
754
+ ref: l,
755
+ value: e(v)
756
+ }, {
757
+ size: h.value
758
+ }, {
759
+ class: {
760
+ select__select: !0,
761
+ "select__select--multiple": !!a.multiple
762
+ },
763
+ onChange: n[0] || (n[0] = (_) => u(_.target.value))
764
+ }), [
765
+ e(s) && e(s).icon ? (o(), g(Z, {
766
+ key: 0,
767
+ icon: e(s).icon
768
+ }, null, 8, ["icon"])) : y("", !0),
769
+ a.multiple ? y("", !0) : (o(), i("option", wn, k(e(M)("none")), 1)),
770
+ (o(!0), i(N, null, D(e(s) && "enum" in e(s) ? e(s).enum : [], (_) => {
771
+ var $;
772
+ return o(), i("option", {
773
+ key: _,
774
+ value: _,
775
+ "data-selected": c(_)
776
+ }, k(($ = e(s)) != null && $.translate ? e(M)(_) : _), 9, Sn);
777
+ }), 128)),
778
+ I(p.$slots, "default", {}, void 0, !0)
779
+ ], 16, Bn)
780
+ ], 2));
781
+ }
782
+ });
783
+ const Qe = /* @__PURE__ */ X(jn, [["__scopeId", "data-v-1f76ec88"]]), Tn = { class: "pagination" }, Ln = ["value"], Rn = { class: "pagination__control" }, zn = { class: "pagination__page-input" }, Mn = /* @__PURE__ */ U({
784
+ __name: "aeria-pagination",
785
+ props: {
786
+ pagination: {}
787
+ },
788
+ emits: ["paginate"],
789
+ setup(d, { emit: r }) {
790
+ const a = d, t = r, l = Q({
791
+ get: () => Math.floor(a.pagination.offset / a.pagination.limit),
792
+ set: (h) => {
793
+ a.pagination.offset = h * a.pagination.limit;
794
+ }
795
+ }), s = Q({
796
+ get: () => a.pagination.limit,
797
+ set: (h) => {
798
+ a.pagination.limit = Number(h);
799
+ }
800
+ }), u = J(l.value ? l.value + 1 : 1), v = Q(() => Math.ceil(a.pagination.recordsTotal / a.pagination.limit)), c = (h) => {
801
+ l.value = h === "previous" ? l.value - 1 : l.value + 1;
802
+ };
803
+ return ue([
804
+ l,
805
+ s
806
+ ], ([h]) => {
807
+ u.value = h + 1, t("paginate", {
808
+ offset: l.value * s.value,
809
+ limit: s.value
810
+ });
811
+ }), (h, p) => (o(), i("div", Tn, [
812
+ z(Qe, {
813
+ modelValue: s.value,
814
+ "onUpdate:modelValue": p[0] || (p[0] = (n) => s.value = n),
815
+ property: {
816
+ enum: [],
817
+ icon: "list"
818
+ },
819
+ class: "pagination__control"
820
+ }, {
821
+ default: f(() => [
822
+ (o(!0), i(N, null, D(e(Rt), (n) => (o(), i("option", {
823
+ key: `limit-${n}`,
824
+ value: n
825
+ }, k(n), 9, Ln))), 128))
826
+ ]),
827
+ _: 1
828
+ }, 8, ["modelValue"]),
829
+ V("div", Rn, [
830
+ z(fe, {
831
+ onClick: p[1] || (p[1] = (n) => l.value = 0)
832
+ }, {
833
+ default: f(() => [
834
+ z(Z, {
835
+ reactive: "",
836
+ icon: "caret-double-left"
837
+ })
838
+ ]),
839
+ _: 1
840
+ }),
841
+ z(fe, {
842
+ disabled: l.value === 0,
843
+ onClick: p[2] || (p[2] = (n) => c("previous"))
844
+ }, {
845
+ default: f(() => [
846
+ z(Z, {
847
+ reactive: "",
848
+ icon: "caret-left"
849
+ })
850
+ ]),
851
+ _: 1
852
+ }, 8, ["disabled"]),
853
+ V("div", zn, [
854
+ (o(), g(Oe, {
855
+ key: l.value,
856
+ modelValue: u.value,
857
+ "onUpdate:modelValue": p[3] || (p[3] = (n) => u.value = n),
858
+ property: {
859
+ type: "number",
860
+ minimum: 1
861
+ },
862
+ onChange: p[4] || (p[4] = (n) => {
863
+ l.value = u.value === 0 ? 0 : u.value - 1;
864
+ })
865
+ }, null, 8, ["modelValue"])),
866
+ V("span", null, k(e(M)("of")) + " " + k(v.value), 1)
867
+ ]),
868
+ z(fe, {
869
+ disabled: l.value === v.value - 1,
870
+ onClick: p[5] || (p[5] = (n) => c("next"))
871
+ }, {
872
+ default: f(() => [
873
+ z(Z, {
874
+ reactive: "",
875
+ icon: "caret-right"
876
+ })
877
+ ]),
878
+ _: 1
879
+ }, 8, ["disabled"]),
880
+ z(fe, {
881
+ onClick: p[6] || (p[6] = (n) => l.value = v.value - 1)
882
+ }, {
883
+ default: f(() => [
884
+ z(Z, {
885
+ reactive: "",
886
+ icon: "caret-double-right"
887
+ })
888
+ ]),
889
+ _: 1
890
+ })
891
+ ])
892
+ ]));
893
+ }
894
+ });
895
+ const Fn = /* @__PURE__ */ X(Mn, [["__scopeId", "data-v-41aa1ffc"]]), qn = { class: "checkbox__text" }, Un = ["innerHTML"], En = { class: "checkbox__hint" }, Dn = ["innerHTML"], Hn = {
896
+ inheritAttrs: !1
897
+ }, Qn = /* @__PURE__ */ U({
898
+ ...Hn,
899
+ __name: "aeria-checkbox",
900
+ props: {
901
+ modelValue: {},
902
+ property: {},
903
+ propertyName: {},
904
+ parentPropertyName: {},
905
+ parentCollection: {},
906
+ readOnly: { type: Boolean },
907
+ value: {},
908
+ variant: {}
909
+ },
910
+ emits: ["update:modelValue", "change"],
911
+ setup(d, { emit: r }) {
912
+ const a = d, t = a.property, l = a.readOnly || (t == null ? void 0 : t.readOnly), s = (() => {
913
+ if (t && "type" in t)
914
+ switch (t.type) {
915
+ case "array":
916
+ case "boolean":
917
+ return "checkbox";
918
+ }
919
+ return "radio";
920
+ })(), u = r, v = a.value || !1, c = Q({
921
+ get: () => {
922
+ var p;
923
+ if (t) {
924
+ if ("type" in t && t.type === "boolean")
925
+ return !!a.value;
926
+ if ("items" in t)
927
+ return (p = a.modelValue) == null ? void 0 : p.includes(a.value);
928
+ }
929
+ return a.modelValue === a.value;
930
+ },
931
+ set: () => {
932
+ var p;
933
+ if (!l) {
934
+ if (t) {
935
+ if ("type" in t && t.type === "boolean") {
936
+ u("update:modelValue", !a.modelValue);
937
+ return;
938
+ }
939
+ if ("items" in t) {
940
+ if ((p = a.modelValue) != null && p.includes(v)) {
941
+ u("update:modelValue", a.modelValue.filter((n) => n !== v));
942
+ return;
943
+ }
944
+ u("update:modelValue", [v].concat(a.modelValue || []));
945
+ return;
946
+ }
947
+ }
948
+ u("update:modelValue", a.value);
949
+ }
950
+ }
951
+ }), h = (p) => {
952
+ l && p.preventDefault();
953
+ };
954
+ return (p, n) => {
955
+ var $, b;
956
+ const _ = ne("clickable");
957
+ return x((o(), i("label", {
958
+ class: K(`
959
+ checkbox
960
+ ${e(l) && "checkbox--readOnly"}
961
+ `)
962
+ }, [
963
+ x(V("input", H({
964
+ "onUpdate:modelValue": n[0] || (n[0] = (S) => c.value = S)
965
+ }, {
966
+ type: e(s),
967
+ readOnly: e(l),
968
+ checked: c.value
969
+ }, {
970
+ class: "checkbox__input",
971
+ onClick: h
972
+ }), null, 16), [
973
+ [Ot, c.value]
974
+ ]),
975
+ V("div", qn, [
976
+ V("div", null, [
977
+ p.$slots.description ? I(p.$slots, "description", { key: 0 }, void 0, !0) : e(v) ? (o(), i("div", {
978
+ key: 1,
979
+ innerHTML: ($ = e(t)) != null && $.translate ? e(M)(e(v)) : e(v)
980
+ }, null, 8, Un)) : I(p.$slots, "default", { key: 2 }, void 0, !0)
981
+ ]),
982
+ V("div", En, [
983
+ p.$slots.hint ? I(p.$slots, "hint", { key: 0 }, void 0, !0) : (b = e(t)) != null && b.hint ? (o(), i("div", {
984
+ key: 1,
985
+ innerHTML: e(t).hint
986
+ }, null, 8, Dn)) : y("", !0)
987
+ ])
988
+ ])
989
+ ], 2)), [
990
+ [_]
991
+ ]);
992
+ };
993
+ }
994
+ });
995
+ const Gn = /* @__PURE__ */ X(Qn, [["__scopeId", "data-v-db5fafae"]]), Wn = {
996
+ inheritAttrs: !1
997
+ }, Kn = /* @__PURE__ */ U({
998
+ ...Wn,
999
+ __name: "aeria-options",
1000
+ props: {
1001
+ modelValue: {},
1002
+ propertyName: {},
1003
+ parentPropertyName: {},
1004
+ parentCollection: {},
1005
+ readOnly: { type: Boolean },
1006
+ property: {},
1007
+ columns: { default: 1 }
1008
+ },
1009
+ emits: ["update:modelValue"],
1010
+ setup(d, { emit: r }) {
1011
+ const a = d, t = r, l = a.readOnly || a.property.readOnly, s = "items" in a.property ? a.property.items.enum : a.property.enum, u = (v) => {
1012
+ t("update:modelValue", v);
1013
+ };
1014
+ return yt(() => {
1015
+ a.modelValue || t(
1016
+ "update:modelValue",
1017
+ "items" in a.property ? [] : ""
1018
+ );
1019
+ }), (v, c) => (o(), i("div", {
1020
+ class: "options",
1021
+ style: $e(`
1022
+ --columns: ${v.columns};
1023
+ grid-template-columns: repeat(var(--columns), 1fr);
1024
+ `)
1025
+ }, [
1026
+ (o(!0), i(N, null, D(e(s), (h) => (o(), i("div", {
1027
+ key: `option-${h}`,
1028
+ class: "options__checkbox"
1029
+ }, [
1030
+ z(Gn, H({ ref_for: !0 }, {
1031
+ value: h,
1032
+ readOnly: e(l),
1033
+ property: v.property
1034
+ }, {
1035
+ "model-value": v.modelValue,
1036
+ "onUpdate:modelValue": u
1037
+ }), null, 16, ["model-value"])
1038
+ ]))), 128))
1039
+ ], 4));
1040
+ }
1041
+ });
1042
+ const Xn = /* @__PURE__ */ X(Kn, [["__scopeId", "data-v-39b61318"]]), Yn = (d) => (Ee("data-v-220b2101"), d = d(), De(), d), Jn = { class: "switch-wrapper" }, Zn = /* @__PURE__ */ Yn(() => /* @__PURE__ */ V("div", { class: "switch__slider" }, null, -1)), Pn = { key: 1 }, Nn = {
1043
+ inheritAttrs: !1
1044
+ }, xn = /* @__PURE__ */ U({
1045
+ ...Nn,
1046
+ __name: "aeria-switch",
1047
+ props: {
1048
+ modelValue: {},
1049
+ property: {},
1050
+ propertyName: {},
1051
+ parentPropertyName: {},
1052
+ parentCollection: {},
1053
+ readOnly: { type: Boolean }
1054
+ },
1055
+ emits: ["update:modelValue", "change"],
1056
+ setup(d, { emit: r }) {
1057
+ const a = d, t = r, l = a.property, s = a.readOnly || (l == null ? void 0 : l.readOnly), u = () => {
1058
+ s || (t("change", !a.modelValue), t("update:modelValue", !a.modelValue));
1059
+ };
1060
+ return (v, c) => {
1061
+ var p;
1062
+ const h = ne("clickable");
1063
+ return o(), i("div", Jn, [
1064
+ x((o(), i("a", {
1065
+ class: K(`
1066
+ switch
1067
+ ${v.modelValue && "switch--active"}
1068
+ ${e(s) && "switch--readOnly"}
1069
+ `),
1070
+ onClick: qe(u, ["stop"])
1071
+ }, [
1072
+ Zn,
1073
+ V("div", {
1074
+ class: K(`
1075
+ switch__dummy
1076
+ ${!v.modelValue && "switch__dummy--flex"}
1077
+ `)
1078
+ }, null, 2)
1079
+ ], 2)), [
1080
+ [h, {
1081
+ blocked: e(s)
1082
+ }]
1083
+ ]),
1084
+ v.$slots.default ? I(v.$slots, "default", { key: 0 }, void 0, !0) : (o(), i("div", Pn, k(((p = e(l)) == null ? void 0 : p.description) || v.propertyName), 1))
1085
+ ]);
1086
+ };
1087
+ }
1088
+ });
1089
+ const eo = /* @__PURE__ */ X(xn, [["__scopeId", "data-v-220b2101"]]), kt = (d) => (Ee("data-v-153a2e0f"), d = d(), De(), d), to = { class: "picture" }, no = {
1090
+ key: 0,
1091
+ style: { position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }
1092
+ }, oo = ["src", "alt"], ao = {
1093
+ key: 0,
1094
+ class: "picture__meta"
1095
+ }, lo = ["src"], so = /* @__PURE__ */ kt(() => /* @__PURE__ */ V("line", {
1096
+ x1: "0",
1097
+ y1: "0",
1098
+ x2: "200",
1099
+ y2: "200",
1100
+ stroke: "#000",
1101
+ "vector-effect": "non-scaling-stroke"
1102
+ }, null, -1)), io = /* @__PURE__ */ kt(() => /* @__PURE__ */ V("line", {
1103
+ x1: "200",
1104
+ y1: "0",
1105
+ x2: "0",
1106
+ y2: "200",
1107
+ stroke: "#000",
1108
+ "vector-effect": "non-scaling-stroke"
1109
+ }, null, -1)), ro = [
1110
+ so,
1111
+ io
1112
+ ], uo = { key: 5 }, co = /* @__PURE__ */ U({
1113
+ __name: "aeria-picture",
1114
+ props: {
1115
+ url: {},
1116
+ alt: {},
1117
+ fileId: {},
1118
+ modelValue: {},
1119
+ objectFit: {},
1120
+ bordered: { type: Boolean },
1121
+ width: {},
1122
+ height: {},
1123
+ expandable: { type: Boolean },
1124
+ meta: {}
1125
+ },
1126
+ setup(d) {
1127
+ const r = d, a = Q(() => r.fileId ? `${ht}/file/${r.fileId}/picture` : r.url || r.modelValue), t = J(!1);
1128
+ return (l, s) => {
1129
+ var v;
1130
+ const u = ne("overlay");
1131
+ return o(), i("figure", to, [
1132
+ a.value ? (o(), g(Xe, {
1133
+ key: 0,
1134
+ to: "main"
1135
+ }, [
1136
+ t.value ? x((o(), i("div", no, [
1137
+ V("img", {
1138
+ src: a.value,
1139
+ alt: l.alt,
1140
+ style: `
1141
+ max-height: 60vh;
1142
+ object-fit: contain;
1143
+ `,
1144
+ onClick: s[0] || (s[0] = (c) => t.value = !0)
1145
+ }, null, 8, oo),
1146
+ (v = l.meta) != null && v.owner ? (o(), i("div", ao, " Criado por " + k(l.meta.owner.name) + " em " + k(l.formatDateTime(l.meta.created_at, { hours: !0 })), 1)) : y("", !0)
1147
+ ])), [
1148
+ [u, {
1149
+ click: () => {
1150
+ t.value = !1;
1151
+ }
1152
+ }]
1153
+ ]) : y("", !0)
1154
+ ])) : y("", !0),
1155
+ a.value ? (o(), i("img", {
1156
+ key: 1,
1157
+ src: a.value,
1158
+ class: K(`
1159
+ picture__image
1160
+ ${l.bordered && "picture__image--bordered"}
1161
+ ${l.expandable && "picture__image--expandable"}
1162
+ `),
1163
+ style: $e(`
1164
+ object-fit: ${l.objectFit || "cover"};
1165
+ width: ${l.width || "100%"};
1166
+ height: ${l.height || "100%"};
1167
+ `),
1168
+ onClick: s[1] || (s[1] = () => {
1169
+ l.expandable && (t.value = !0);
1170
+ })
1171
+ }, null, 14, lo)) : l.$slots.fallback ? I(l.$slots, "fallback", { key: 2 }, void 0, !0) : l.$slots.default ? I(l.$slots, "default", { key: 3 }, void 0, !0) : (o(), i("svg", {
1172
+ key: 4,
1173
+ class: K(["picture__background", `
1174
+ ${l.bordered && "picture__image--bordered"}
1175
+ `]),
1176
+ xmlns: "http://www.w3.org/2000/svg",
1177
+ viewBox: "0 0 200 200",
1178
+ preserveAspectRatio: "none",
1179
+ style: $e(`
1180
+ object-fit: ${l.objectFit || "cover"};
1181
+ width: ${l.width || "100%"};
1182
+ height: ${l.height || "100%"};
1183
+ `)
1184
+ }, ro, 6)),
1185
+ l.$slots.caption ? (o(), i("figcaption", uo, [
1186
+ I(l.$slots, "caption", {}, void 0, !0)
1187
+ ])) : y("", !0)
1188
+ ]);
1189
+ };
1190
+ }
1191
+ });
1192
+ const Ue = /* @__PURE__ */ X(co, [["__scopeId", "data-v-153a2e0f"]]), po = { class: "file" }, _o = { key: 0 }, mo = ["href"], fo = {
1193
+ key: 1,
1194
+ class: "file__actions"
1195
+ }, vo = ["accept"], yo = {
1196
+ key: 0,
1197
+ class: "file__buttons"
1198
+ }, ho = {
1199
+ key: 1,
1200
+ class: "file__buttons"
1201
+ }, $o = /* @__PURE__ */ U({
1202
+ __name: "aeria-file",
1203
+ props: {
1204
+ modelValue: {},
1205
+ property: {},
1206
+ propertyName: {},
1207
+ parentPropertyName: {},
1208
+ parentCollection: {},
1209
+ readOnly: { type: Boolean },
1210
+ meta: {},
1211
+ content: {}
1212
+ },
1213
+ emits: ["update:content", "change", "update:modelValue"],
1214
+ setup(d, { emit: r }) {
1215
+ var $;
1216
+ const a = d, t = r, s = Me() ? ge() : null, u = J((($ = a.modelValue) == null ? void 0 : $.file) || null), v = Q(() => {
1217
+ var b;
1218
+ return u.value ? URL.createObjectURL(u.value) : (b = a.modelValue) == null ? void 0 : b.link;
1219
+ }), c = Q(() => {
1220
+ var b, S, T;
1221
+ return /^image\//.test((b = a.modelValue) == null ? void 0 : b.type) && !((S = u.value) != null && S.type) || /^image\//.test((T = u.value) == null ? void 0 : T.type);
1222
+ }), h = (b) => new Promise((S) => {
1223
+ const T = new FileReader();
1224
+ T.onload = () => S(T.result), T.readAsArrayBuffer(b);
1225
+ }), p = () => {
1226
+ a.modelValue.tempId && t("update:modelValue", null), u.value = null;
1227
+ }, n = async (b) => {
1228
+ u.value = b.target.files[0];
1229
+ const S = u.value, T = await h(S);
1230
+ if (s) {
1231
+ const { data: { error: P, result: B } } = await zt(`${ht}/${s.$id}/upload?name=${S.name}`, T, {
1232
+ params: {
1233
+ method: "POST",
1234
+ headers: {
1235
+ "content-type": S.type || "application/octet-stream",
1236
+ "x-stream-request": "1"
1237
+ }
1238
+ }
1239
+ });
1240
+ if (P)
1241
+ return;
1242
+ t("update:modelValue", {
1243
+ tempId: B.tempId,
1244
+ file: S
1245
+ });
1246
+ } else
1247
+ t("update:modelValue", S);
1248
+ t("update:content", T), t("change", T);
1249
+ }, _ = async () => {
1250
+ t("update:modelValue", null);
1251
+ };
1252
+ return (b, S) => {
1253
+ var T, P, B, F, Y, w;
1254
+ return o(), i("div", po, [
1255
+ u.value || (T = b.modelValue) != null && T._id ? (o(), i("div", _o, [
1256
+ c.value ? (o(), g(Ue, {
1257
+ key: 0,
1258
+ modelValue: v.value,
1259
+ "onUpdate:modelValue": S[0] || (S[0] = (te) => v.value = te),
1260
+ alt: "Image preview",
1261
+ expandable: b.readOnly,
1262
+ class: K(`
1263
+ file__image
1264
+ ${!e(s) || ((P = b.modelValue) == null ? void 0 : P._id) || "file__image--unsent"}
1265
+ `)
1266
+ }, null, 8, ["modelValue", "expandable", "class"])) : y("", !0),
1267
+ (B = b.modelValue) != null && B._id ? (o(), i("a", {
1268
+ key: 1,
1269
+ href: b.modelValue.download_link
1270
+ }, k(b.modelValue.filename), 9, mo)) : y("", !0)
1271
+ ])) : y("", !0),
1272
+ b.readOnly ? y("", !0) : (o(), i("div", fo, [
1273
+ V("input", {
1274
+ ref: "file",
1275
+ type: "file",
1276
+ accept: (Y = (F = b.property) == null ? void 0 : F.accept) == null ? void 0 : Y.join(","),
1277
+ onChange: n
1278
+ }, null, 40, vo),
1279
+ u.value ? (o(), i("div", yo, [
1280
+ z(re, {
1281
+ small: "",
1282
+ onClick: qe(p, ["prevent"])
1283
+ }, {
1284
+ default: f(() => [
1285
+ W(k(e(M)("action.clear", { capitalize: !0 })), 1)
1286
+ ]),
1287
+ _: 1
1288
+ })
1289
+ ])) : (w = b.modelValue) != null && w._id ? (o(), i("div", ho, [
1290
+ z(re, {
1291
+ small: "",
1292
+ onClick: qe(_, ["prevent"])
1293
+ }, {
1294
+ default: f(() => [
1295
+ W(k(e(M)("action.remove", { capitalize: !0 })), 1)
1296
+ ]),
1297
+ _: 1
1298
+ })
1299
+ ])) : y("", !0)
1300
+ ]))
1301
+ ]);
1302
+ };
1303
+ }
1304
+ });
1305
+ const bo = /* @__PURE__ */ X($o, [["__scopeId", "data-v-aeeec9a8"]]), go = { class: "container" }, ko = {
1306
+ key: 1,
1307
+ class: "container__footer"
1308
+ }, Vo = /* @__PURE__ */ U({
1309
+ __name: "aeria-search-container",
1310
+ props: {
1311
+ observeScroll: { type: Boolean }
1312
+ },
1313
+ emits: ["endReached"],
1314
+ setup(d, { emit: r }) {
1315
+ const a = d, t = r, l = J(null), s = a.observeScroll ? Ye(l, {
1316
+ antecipate: 100
1317
+ }).reachedEnd : null;
1318
+ return s !== null && ue(s, (u) => {
1319
+ u && t("endReached", u);
1320
+ }), (u, v) => (o(), i("div", go, [
1321
+ u.$slots.default ? (o(), i("div", {
1322
+ key: 0,
1323
+ ref_key: "containerEl",
1324
+ ref: l,
1325
+ class: "container__content"
1326
+ }, [
1327
+ I(u.$slots, "default", {}, void 0, !0)
1328
+ ], 512)) : y("", !0),
1329
+ u.$slots.footer ? (o(), i("div", ko, [
1330
+ I(u.$slots, "footer", {}, void 0, !0)
1331
+ ])) : y("", !0)
1332
+ ]));
1333
+ }
1334
+ });
1335
+ const dt = /* @__PURE__ */ X(Vo, [["__scopeId", "data-v-c86e2d2a"]]), Co = { class: "item__values" }, Oo = /* @__PURE__ */ U({
1336
+ __name: "aeria-search-item",
1337
+ props: {
1338
+ item: {},
1339
+ indexes: {},
1340
+ modelValue: {},
1341
+ property: {},
1342
+ readOnly: { type: Boolean }
1343
+ },
1344
+ emits: ["update:modelValue", "change"],
1345
+ setup(d, { emit: r }) {
1346
+ const a = Ie(), t = d, l = r, s = t.property, u = _e(s), v = ge(), c = Q(() => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && Object.values(t.modelValue).some(({ _id: _ }) => t.item._id === _) : t.modelValue && t.modelValue._id === t.item._id), h = () => {
1347
+ if (c.value)
1348
+ return;
1349
+ const _ = (b) => b.filter((S) => !!(S != null && S._id)), $ = "items" in s ? _(Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue]) : t.modelValue;
1350
+ Array.isArray($) ? l("update:modelValue", $.concat([t.item])) : l("update:modelValue", t.item), l("change", t.item);
1351
+ }, p = async (_) => {
1352
+ if (u.purge && (_ != null && _.purge)) {
1353
+ const { _id: b } = t.item;
1354
+ await v.$actions.remove({
1355
+ filters: {
1356
+ _id: b
1357
+ }
1358
+ });
1359
+ }
1360
+ const $ = () => {
1361
+ const b = [...t.modelValue], S = b.findIndex((T) => T._id === t.item._id);
1362
+ return b.splice(S, 1), b;
1363
+ };
1364
+ l("update:modelValue", "items" in s ? $() : null);
1365
+ }, n = () => {
1366
+ if (t.readOnly) {
1367
+ a.push({
1368
+ name: "/dashboard/crud/:id",
1369
+ params: {
1370
+ collection: u.$ref,
1371
+ id: t.item._id
1372
+ }
1373
+ });
1374
+ return;
1375
+ }
1376
+ return c.value ? p() : h();
1377
+ };
1378
+ return (_, $) => {
1379
+ const b = ne("clickable");
1380
+ return x((o(), i("div", {
1381
+ class: K({
1382
+ item: !0,
1383
+ "item--selected": c.value
1384
+ }),
1385
+ onClick: n
1386
+ }, [
1387
+ I(_.$slots, "default", {}, void 0, !0),
1388
+ V("div", Co, [
1389
+ (o(!0), i(N, null, D(_.indexes, (S, T) => (o(), i("div", {
1390
+ key: `index-${_.item._id}-${T}`,
1391
+ class: "item__value"
1392
+ }, k(_.item[S]), 1))), 128))
1393
+ ]),
1394
+ _.readOnly ? (o(), g(Z, {
1395
+ key: 0,
1396
+ icon: "arrow-square-out",
1397
+ style: { "--icon-color": "var(--theme-brand-color-contrast)" }
1398
+ })) : y("", !0)
1399
+ ], 2)), [
1400
+ [b]
1401
+ ]);
1402
+ };
1403
+ }
1404
+ });
1405
+ const We = /* @__PURE__ */ X(Oo, [["__scopeId", "data-v-5e6ec702"]]), Io = { class: "search__panel" }, Ao = { class: "search__input" }, Bo = ["value"], wo = { style: { flex: "1" } }, So = { key: 1 }, jo = { key: 0 }, To = { key: 1 }, Lo = { class: "search__summary" }, Ro = {
1406
+ key: 1,
1407
+ class: "search"
1408
+ }, zo = { key: 0 }, Fe = 10, Mo = /* @__PURE__ */ U({
1409
+ __name: "aeria-search",
1410
+ props: {
1411
+ modelValue: {},
1412
+ parentPropertyName: {},
1413
+ parentCollection: {},
1414
+ readOnly: { type: Boolean },
1415
+ property: {},
1416
+ propertyName: {},
1417
+ selectOnly: { type: Boolean },
1418
+ panel: { default: void 0 }
1419
+ },
1420
+ emits: ["update:modelValue", "change", "update:panel"],
1421
+ setup(d, { emit: r }) {
1422
+ const a = d, t = _e(a.property), l = a.panel !== void 0 ? Q(() => a.panel) : J(!1), s = r, u = ie(_e(a.property).$ref), v = Me(), c = v ? ge() : null, h = t.indexes;
1423
+ ye(He, _e(a.property).$ref), ye("innerInputLabel", !0), ye("omitInputLabels", !0);
1424
+ const p = J(a.modelValue), n = J({
1425
+ data: [],
1426
+ pagination: {}
1427
+ }), _ = Q(() => n.value.data), $ = Q(() => n.value.pagination), b = J(0), S = J(h[0]), T = J(!1), P = J({}), B = () => {
1428
+ const L = {};
1429
+ if (v) {
1430
+ const R = e(v);
1431
+ L[R] = c;
1432
+ }
1433
+ return t.constraints ? Ht(t.constraints, L) : {};
1434
+ }, F = () => {
1435
+ _.value.length < $.value.recordsTotal && (b.value += 1, w());
1436
+ }, Y = async () => {
1437
+ if (Object.values(P.value).every((R) => !(String(R).length > 0)))
1438
+ return u.$actions.custom("getAll", {
1439
+ limit: Fe,
1440
+ offset: b.value * Fe,
1441
+ filters: B()
1442
+ });
1443
+ const L = h.filter((R) => {
1444
+ var m;
1445
+ return ((m = P.value[R]) == null ? void 0 : m.length) > 0;
1446
+ }).map((R) => ({
1447
+ [R]: {
1448
+ $regex: P.value[R].trim().replace("(", "\\(").replace(")", "\\)"),
1449
+ $options: "i"
1450
+ }
1451
+ }));
1452
+ return u.$actions.custom("getAll", {
1453
+ limit: Fe,
1454
+ offset: b.value * Fe,
1455
+ filters: {
1456
+ ...B(),
1457
+ ...L.length > 0 && {
1458
+ $or: L
1459
+ }
1460
+ }
1461
+ });
1462
+ }, w = async () => {
1463
+ if (u.loading.getAll)
1464
+ return;
1465
+ const { error: L, result: R } = await Y();
1466
+ if (L) {
1467
+ ie("meta").$actions.spawnToast({
1468
+ text: "Request failed",
1469
+ icon: "warning"
1470
+ });
1471
+ return;
1472
+ }
1473
+ n.value.pagination = R.pagination, b.value === 0 && n.value.data.splice(0), n.value.data.push(...R.data);
1474
+ }, [te] = $t({
1475
+ delay: 800
1476
+ })(() => {
1477
+ b.value = 0, w(), T.value = !1;
1478
+ }), C = () => {
1479
+ T.value = !0, te();
1480
+ }, j = () => {
1481
+ "effect" in l ? s("update:panel", !0) : l.value = !0, w();
1482
+ }, oe = () => {
1483
+ b.value = 0, n.value.data.splice(0), "effect" in l ? s("update:panel", !1) : l.value = !1;
1484
+ }, ae = Q(() => !Object.values(P.value).some((L) => !!L));
1485
+ ue(ae, (L, R) => {
1486
+ L && !R && w();
1487
+ }), vt(() => {
1488
+ a.selectOnly && w();
1489
+ });
1490
+ const se = (L) => {
1491
+ p.value = L, a.selectOnly || s("update:modelValue", L);
1492
+ }, le = () => {
1493
+ oe(), s("update:modelValue", p.value);
1494
+ };
1495
+ return (L, R) => {
1496
+ const m = ne("clickable");
1497
+ return o(), i("div", null, [
1498
+ e(l) ? (o(), g(Xe, {
1499
+ key: 0,
1500
+ to: "main"
1501
+ }, [
1502
+ z(Ae, {
1503
+ float: "",
1504
+ "close-hint": "",
1505
+ title: `${e(M)("action.select", { capitalize: !0 })} ${e(M)(L.propertyName)}`,
1506
+ "overlay-layer": 65,
1507
+ "model-value": e(l),
1508
+ style: { "--panel-max-width": "36rem" },
1509
+ onClose: oe,
1510
+ onOverlayClick: oe
1511
+ }, {
1512
+ footer: f(() => [
1513
+ z(re, {
1514
+ large: "",
1515
+ onClick: le
1516
+ }, {
1517
+ default: f(() => [
1518
+ W(k(e(M)("action.save", { capitalize: !0 })), 1)
1519
+ ]),
1520
+ _: 1
1521
+ })
1522
+ ]),
1523
+ default: f(() => {
1524
+ var E, G;
1525
+ return [
1526
+ V("div", Io, [
1527
+ V("div", Ao, [
1528
+ e(h).length > 1 ? (o(), g(Qe, {
1529
+ key: 0,
1530
+ modelValue: S.value,
1531
+ "onUpdate:modelValue": R[0] || (R[0] = (O) => S.value = O),
1532
+ onChange: R[1] || (R[1] = (O) => P.value = {})
1533
+ }, {
1534
+ default: f(() => [
1535
+ (o(!0), i(N, null, D(e(h), (O) => (o(), i("option", {
1536
+ key: `searchfield-${O}`,
1537
+ value: O
1538
+ }, k(e(M)(O)), 9, Bo))), 128))
1539
+ ]),
1540
+ _: 1
1541
+ }, 8, ["modelValue"])) : y("", !0),
1542
+ V("div", wo, [
1543
+ (o(), g(Oe, {
1544
+ key: `field-${S.value}`,
1545
+ modelValue: P.value[S.value],
1546
+ "onUpdate:modelValue": R[2] || (R[2] = (O) => P.value[S.value] = O),
1547
+ property: {
1548
+ ...e(u).properties[S.value],
1549
+ inputType: "search"
1550
+ },
1551
+ onInput: C
1552
+ }, null, 8, ["modelValue", "property"]))
1553
+ ])
1554
+ ]),
1555
+ _.value.length ? (o(), g(dt, {
1556
+ key: 0,
1557
+ "observe-scroll": "",
1558
+ onEndReached: F
1559
+ }, {
1560
+ default: f(() => [
1561
+ (o(!0), i(N, null, D(_.value, (O) => (o(), g(We, H({ ref_for: !0 }, {
1562
+ item: O,
1563
+ indexes: e(h),
1564
+ property: L.property
1565
+ }, {
1566
+ key: `matching-${O._id}`,
1567
+ modelValue: p.value,
1568
+ "onUpdate:modelValue": R[3] || (R[3] = (A) => p.value = A)
1569
+ }), null, 16, ["modelValue"]))), 128))
1570
+ ]),
1571
+ _: 1
1572
+ })) : (o(), i("div", So, [
1573
+ T.value ? (o(), i("div", jo, k(e(M)("searching", { capitalize: !0 })) + "... ", 1)) : !e(u).loading.getAll && Object.values(P.value).filter((O) => !!O).length > 0 && !("items" in L.property && ((E = L.modelValue) != null && E.length) || !Array.isArray(L.modelValue) && ((G = L.modelValue) != null && G._id)) ? (o(), i("div", To, k(e(M)("no_results", { capitalize: !0 })), 1)) : y("", !0)
1574
+ ]))
1575
+ ]),
1576
+ V("div", Lo, k(e(M)("showing", { capitalize: !0 })) + " " + k(_.value.length) + " " + k(e(M)("of")) + " " + k($.value.recordsTotal), 1)
1577
+ ];
1578
+ }),
1579
+ _: 1
1580
+ }, 8, ["title", "model-value"])
1581
+ ])) : y("", !0),
1582
+ L.selectOnly ? y("", !0) : (o(), i("div", Ro, [
1583
+ z(dt, null, ce({
1584
+ default: f(() => {
1585
+ var E;
1586
+ return [
1587
+ "items" in L.property ? (o(), i("div", zo, [
1588
+ (o(!0), i(N, null, D(L.modelValue, (G) => (o(), g(We, H({ ref_for: !0 }, {
1589
+ item: G,
1590
+ indexes: e(h),
1591
+ property: L.property,
1592
+ readOnly: L.readOnly,
1593
+ modelValue: L.modelValue
1594
+ }, {
1595
+ key: `selected-${G._id}`,
1596
+ "onUpdate:modelValue": se
1597
+ }), null, 16))), 128))
1598
+ ])) : (E = L.modelValue) != null && E._id ? (o(), g(We, H({ key: 1 }, {
1599
+ item: L.modelValue,
1600
+ indexes: e(h),
1601
+ property: e(t),
1602
+ readOnly: L.readOnly,
1603
+ modelValue: L.modelValue
1604
+ }, { "onUpdate:modelValue": se }), null, 16)) : y("", !0)
1605
+ ];
1606
+ }),
1607
+ _: 2
1608
+ }, [
1609
+ L.readOnly ? void 0 : {
1610
+ name: "footer",
1611
+ fn: f(() => [
1612
+ x((o(), g(Z, {
1613
+ icon: "plus",
1614
+ onClick: j
1615
+ }, {
1616
+ default: f(() => [
1617
+ W(k(e(M)("action.select", { capitalize: !0 })), 1)
1618
+ ]),
1619
+ _: 1
1620
+ })), [
1621
+ [m]
1622
+ ])
1623
+ ]),
1624
+ key: "0"
1625
+ }
1626
+ ]), 1024)
1627
+ ]))
1628
+ ]);
1629
+ };
1630
+ }
1631
+ });
1632
+ const Fo = /* @__PURE__ */ X(Mo, [["__scopeId", "data-v-49af6338"]]), pt = (d, r) => {
1633
+ const a = "items" in d ? d.items : d, t = {
1634
+ options: Xn,
1635
+ select: Qe,
1636
+ switch: eo,
1637
+ file: bo,
1638
+ search: Fo,
1639
+ input: Oe,
1640
+ form: Ge
1641
+ }, l = (() => {
1642
+ if ("type" in a) {
1643
+ if (a.type === "object")
1644
+ return "form";
1645
+ if (a.type === "boolean")
1646
+ return "switch";
1647
+ }
1648
+ if ("element" in d) {
1649
+ if (d.element === "checkbox" || d.element === "radio")
1650
+ return "options";
1651
+ if (d.element === "select")
1652
+ return "select";
1653
+ }
1654
+ const s = _e(d);
1655
+ return s ? s.inline ? "form" : s.$ref === "file" ? "file" : "search" : "items" in d && d.uniqueItems ? "options" : "enum" in a ? "select" : "input";
1656
+ })();
1657
+ return r[l] ? r[l] : t[l];
1658
+ }, qo = (d, r, a) => {
1659
+ d ?? (d = []);
1660
+ const t = "items" in r ? r.items : r;
1661
+ if ("$ref" in t) {
1662
+ const l = ie(t.$ref, a), s = Re(l.$freshItem);
1663
+ return d.push(s);
1664
+ }
1665
+ return "properties" in t ? d.push(Qt(t)) : "type" in t && t.type === "boolean" ? d.push({}) : d.push(null);
1666
+ }, Uo = (d, r) => {
1667
+ d.splice(r, 1);
1668
+ }, Eo = {
1669
+ key: 0,
1670
+ class: "form__header"
1671
+ }, Do = { class: "form__fieldset" }, Ho = { key: 0 }, Qo = ["innerHTML"], Go = ["onInput"], Wo = { key: 4 }, Ko = { value: "true" }, Xo = { value: "false" }, Yo = {
1672
+ key: 5,
1673
+ style: { display: "grid", "row-gap": ".4rem" }
1674
+ }, Jo = { class: "form__array" }, Zo = { style: { "flex-grow": "1" } }, Po = {
1675
+ key: 7,
1676
+ class: "form__validation-error"
1677
+ }, No = { key: 0 }, xo = { key: 1 }, ea = {
1678
+ key: 2,
1679
+ class: "form__footer"
1680
+ }, ta = /* @__PURE__ */ U({
1681
+ __name: "aeria-form",
1682
+ props: {
1683
+ modelValue: {},
1684
+ property: {},
1685
+ propertyName: {},
1686
+ parentPropertyName: {},
1687
+ parentCollection: {},
1688
+ readOnly: { type: Boolean },
1689
+ form: {},
1690
+ collection: {},
1691
+ searchOnly: { type: Boolean },
1692
+ layout: {},
1693
+ formLayout: {},
1694
+ required: {},
1695
+ formComponents: {},
1696
+ propertyComponents: {},
1697
+ omitFormHeader: { type: Boolean },
1698
+ omitInputLabels: { type: Boolean },
1699
+ innerInputLabel: { type: Boolean },
1700
+ validationErrors: { default: null },
1701
+ highlightRequired: { type: Boolean, default: !0 },
1702
+ focus: { type: Boolean }
1703
+ },
1704
+ emits: ["update:modelValue", "input", "change"],
1705
+ setup(d, { emit: r }) {
1706
+ var R;
1707
+ const a = gt(), t = d, l = r;
1708
+ yt(() => {
1709
+ t.modelValue || l("update:modelValue", t.property && "items" in t.property ? [] : {});
1710
+ });
1711
+ const s = t.property && _e(t.property), u = s ? s.$ref : t.collection || Me(), v = t.readOnly || ((R = t.property) == null ? void 0 : R.readOnly), c = u ? ie(e(u)) : null;
1712
+ !u && process.env.NODE_ENV !== "production" && console.warn(`aeria-form was used without providing storeId or specifying
1713
+ collection prop, some features may not work as intended`);
1714
+ const h = J(!1), p = Q(() => !t.form && t.property ? "properties" in t.property ? t.property.properties : c == null ? void 0 : c.properties : t.form), n = Q(() => t.layout || (c == null ? void 0 : c.description.formLayout)), _ = (m) => {
1715
+ const E = ve(m, t[m]);
1716
+ return t[m] && ye(m, t[m]), E;
1717
+ }, $ = Q(() => t.validationErrors !== null ? t.validationErrors : c == null ? void 0 : c.validationErrors), b = _("formComponents") || {}, S = _("propertyComponents") || {}, T = _("omitFormHeader"), P = _("omitInputLabels"), B = _("innerInputLabel");
1718
+ u && ye(He, u), ye("searchOnly", t.searchOnly);
1719
+ const F = (m) => p.value ? Object.entries(p.value).filter(([E, G]) => !G.noForm && m([
1720
+ E,
1721
+ G
1722
+ ])) : null, Y = (m) => {
1723
+ var G;
1724
+ if (t.searchOnly || !u)
1725
+ return !0;
1726
+ const E = t.property && "properties" in t.property ? t.property.form : (G = c == null ? void 0 : c.description) == null ? void 0 : G.form;
1727
+ return !E || E.includes(m);
1728
+ }, w = F(([m]) => Y(m)), te = ze(), C = {}, j = (m, E) => {
1729
+ var q, me, Be, we;
1730
+ const G = [], O = ((me = (q = n.value) == null ? void 0 : q.fields) == null ? void 0 : me[m]) || ((we = (Be = n.value) == null ? void 0 : Be.fields) == null ? void 0 : we.$default);
1731
+ if (!E)
1732
+ return;
1733
+ if (O != null && O.if && !t.searchOnly) {
1734
+ const Se = Ke(
1735
+ t.modelValue,
1736
+ O.if
1737
+ );
1738
+ Se.satisfied || (C[m] && (c ? t.modelValue[m] = typeof c.$freshItem[m] == "object" ? Re(c.$freshItem[m]) : c.$freshItem[m] : t.modelValue[m] = [
1739
+ void 0,
1740
+ null
1741
+ ].includes(t.modelValue[m]) ? null : t.modelValue[m].constructor()), G.push("display: none;")), C[m] = Se.satisfied;
1742
+ }
1743
+ const A = te.value.md && (O == null ? void 0 : O.span) || 6;
1744
+ return G.push(`
1745
+ --field-span: ${A};
1746
+ grid-column: span var(--field-span) / span var(--field-span);
1747
+ `), O && (O.verticalSpacing && G.push(`
1748
+ --vertical-spacing: ${O.verticalSpacing};
1749
+ padding: var(--vertical-spacing) 0;
1750
+ `), O.separator && G.push(`
1751
+ border-top: 1px solid var(--theme-border-color);
1752
+ border-width: 1px 0 1px 0;
1753
+ padding: 1rem 0;
1754
+ margin: 1rem 0;
1755
+ `)), G.join("");
1756
+ }, oe = (m) => m === null || m instanceof Object && !Object.keys(m).length, ae = Q(() => t.required ? t.required : t.property && "required" in t.property ? t.property.required : c == null ? void 0 : c.description.required), se = Q(() => t.form ? Mt(
1757
+ t.modelValue,
1758
+ t.form,
1759
+ ae.value,
1760
+ c == null ? void 0 : c.description
1761
+ ) : !0), le = (m, E) => {
1762
+ var G;
1763
+ return (G = $.value) != null && G[m] && (typeof $.value[m].index != "number" || $.value[m].index === E) ? $.value[m].errors : null;
1764
+ }, L = () => {
1765
+ if (!v && !h.value)
1766
+ return h.value = !0, !0;
1767
+ };
1768
+ return (m, E) => {
1769
+ const G = ne("clickable"), O = ne("focus");
1770
+ return o(), i("form", {
1771
+ class: "form",
1772
+ style: $e(`row-gap: ${e(T) ? ".8rem" : "var(--form-internal-gap, 1.6rem);"};`)
1773
+ }, [
1774
+ m.$slots.header && !e(T) ? (o(), i("header", Eo, [
1775
+ I(m.$slots, "header", {}, void 0, !0)
1776
+ ])) : y("", !0),
1777
+ I(m.$slots, "default", {}, void 0, !0),
1778
+ V("fieldset", Do, [
1779
+ (o(!0), i(N, null, D(e(w), ([A, q]) => {
1780
+ var me, Be, we, Se, Je, Ze, Pe, Ne, xe, et, tt, nt, ot;
1781
+ return o(), i("div", {
1782
+ key: `field-${A}`,
1783
+ style: $e(j(A, q)),
1784
+ class: "form__field"
1785
+ }, [
1786
+ (!("type" in q) || q.type !== "boolean" || m.searchOnly) && !q.noLabel && !e(P) && !e(B) ? (o(), i("label", Ho, [
1787
+ V("div", {
1788
+ class: K({
1789
+ "form__field-label": !0,
1790
+ "form__field-label--section": "items" in q ? "properties" in q.items : "properties" in q,
1791
+ "form__field-required-hint": m.highlightRequired && !e(v) && !m.searchOnly && (!ae.value || e(Gt)(A, ae.value, m.modelValue))
1792
+ })
1793
+ }, k(q.description || e(M)(A)), 3),
1794
+ q.hint ? (o(), i("div", {
1795
+ key: 0,
1796
+ innerHTML: q.hint
1797
+ }, null, 8, Qo)) : y("", !0)
1798
+ ])) : y("", !0),
1799
+ m.$slots[`field-${A}`] ? I(m.$slots, `field-${A}`, H({
1800
+ key: 1,
1801
+ ref_for: !0
1802
+ }, {
1803
+ propery: q,
1804
+ properyName: A,
1805
+ modelValue: m.modelValue
1806
+ }), void 0, !0) : (we = (Be = (me = m.layout) == null ? void 0 : me.fields) == null ? void 0 : Be[A]) != null && we.component && e(S)[m.layout.fields[A].component.name] ? (o(), g(he(e(S)[m.layout.fields[A].component.name]), H({
1807
+ key: 2,
1808
+ modelValue: m.modelValue[A],
1809
+ "onUpdate:modelValue": (ee) => m.modelValue[A] = ee,
1810
+ ref_for: !0
1811
+ }, {
1812
+ readOnly: e(v),
1813
+ property: q,
1814
+ propertyName: A,
1815
+ ...m.layout.fields[A].component.props || {}
1816
+ }, {
1817
+ onInput: (ee) => l("input", A),
1818
+ onChange: E[0] || (E[0] = (ee) => l("change", ee))
1819
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in q && ["date", "date-time"].includes(q.format) && m.searchOnly ? (o(), i("div", {
1820
+ key: 3,
1821
+ style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
1822
+ onInput: (ee) => l("input", A),
1823
+ onChange: E[1] || (E[1] = (ee) => l("change", ee))
1824
+ }, [
1825
+ z(Oe, H({
1826
+ modelValue: m.modelValue[A].$gte,
1827
+ "onUpdate:modelValue": (ee) => m.modelValue[A].$gte = ee,
1828
+ ref_for: !0
1829
+ }, {
1830
+ property: q,
1831
+ propertyName: A
1832
+ }), null, 16, ["modelValue", "onUpdate:modelValue"]),
1833
+ z(Oe, H({
1834
+ modelValue: m.modelValue[A].$lte,
1835
+ "onUpdate:modelValue": (ee) => m.modelValue[A].$lte = ee,
1836
+ ref_for: !0
1837
+ }, {
1838
+ property: q,
1839
+ propertyName: A
1840
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])
1841
+ ], 40, Go)) : "type" in q && q.type === "boolean" && m.searchOnly ? (o(), i("div", Wo, [
1842
+ z(Qe, H({ ref_for: !0 }, {
1843
+ property: q,
1844
+ propertyName: A
1845
+ }, {
1846
+ "boolean-ref": "",
1847
+ "model-value": m.modelValue[A],
1848
+ onChange: E[2] || (E[2] = (ee) => l("change", ee)),
1849
+ "onUpdate:modelValue": (ee) => {
1850
+ m.modelValue[A] = ee == "true" ? !0 : ee == "false" ? !1 : null;
1851
+ }
1852
+ }), {
1853
+ default: f(() => [
1854
+ V("option", Ko, k(e(M)("yes")), 1),
1855
+ V("option", Xo, k(e(M)("no")), 1)
1856
+ ]),
1857
+ _: 2
1858
+ }, 1040, ["model-value", "onUpdate:modelValue"])
1859
+ ])) : m.modelValue && "items" in q && !q.uniqueItems && (!("$ref" in q.items) || q.items.inline || q.items.$ref === "file") ? (o(), i("div", Yo, [
1860
+ V("div", null, [
1861
+ z(re, {
1862
+ small: "",
1863
+ variant: "alt",
1864
+ icon: "plus",
1865
+ disabled: !("inline" in q.items && q.items.inline) && (((Se = m.modelValue[A]) == null ? void 0 : Se.length) >= q.maxItems || oe((Ze = m.modelValue[A]) == null ? void 0 : Ze[((Je = m.modelValue[A]) == null ? void 0 : Je.length) - 1])),
1866
+ onClick: qe((ee) => {
1867
+ m.modelValue[A] || (m.modelValue[A] = []), e(qo)(m.modelValue[A], q, e(a));
1868
+ }, ["prevent"])
1869
+ }, {
1870
+ default: f(() => [
1871
+ W(k(e(M)("action.add", { capitalize: !0 })), 1)
1872
+ ]),
1873
+ _: 2
1874
+ }, 1032, ["disabled", "onClick"])
1875
+ ]),
1876
+ V("div", Jo, [
1877
+ (o(!0), i(N, null, D(m.modelValue[A], (ee, je) => {
1878
+ var at, lt, st, it, rt, ut;
1879
+ return o(), i("div", {
1880
+ key: `rep-${A}-${e(Ft)(ee, je)}`,
1881
+ class: "form__array-item"
1882
+ }, [
1883
+ V("div", Zo, [
1884
+ (o(), g(he(e(pt)(q, e(b))), H({
1885
+ modelValue: m.modelValue[A][je],
1886
+ "onUpdate:modelValue": (Te) => m.modelValue[A][je] = Te,
1887
+ ref_for: !0
1888
+ }, {
1889
+ readOnly: e(v),
1890
+ property: q.items,
1891
+ propertyName: A,
1892
+ parentCollection: e(u),
1893
+ parentPropertyName: m.parentPropertyName,
1894
+ columns: ((st = (lt = (at = m.layout) == null ? void 0 : at.fields) == null ? void 0 : lt[A]) == null ? void 0 : st.optionsColumns) || ((ut = (rt = (it = m.layout) == null ? void 0 : it.fields) == null ? void 0 : rt.$default) == null ? void 0 : ut.optionsColumns),
1895
+ validationErrors: le(A, je),
1896
+ ...q.componentProps || {}
1897
+ }, {
1898
+ onInput: (Te) => l("input", A),
1899
+ onChange: E[3] || (E[3] = (Te) => l("change", Te))
1900
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
1901
+ ]),
1902
+ x(z(Z, {
1903
+ reactive: "",
1904
+ icon: "trash",
1905
+ onClick: (Te) => e(Uo)(m.modelValue[A], je)
1906
+ }, null, 8, ["onClick"]), [
1907
+ [G]
1908
+ ])
1909
+ ]);
1910
+ }), 128))
1911
+ ])
1912
+ ])) : m.modelValue ? x((o(), g(he(e(pt)(q, e(b))), H({
1913
+ key: 6,
1914
+ modelValue: m.modelValue[A],
1915
+ "onUpdate:modelValue": (ee) => m.modelValue[A] = ee,
1916
+ ref_for: !0
1917
+ }, {
1918
+ readOnly: e(v),
1919
+ property: q,
1920
+ propertyName: A,
1921
+ parentPropertyName: m.parentPropertyName,
1922
+ parentCollection: e(u),
1923
+ columns: ((xe = (Ne = (Pe = m.layout) == null ? void 0 : Pe.fields) == null ? void 0 : Ne[A]) == null ? void 0 : xe.optionsColumns) || ((nt = (tt = (et = m.layout) == null ? void 0 : et.fields) == null ? void 0 : tt.$default) == null ? void 0 : nt.optionsColumns),
1924
+ ...q.componentProps || {},
1925
+ validationErrors: le(A)
1926
+ }, {
1927
+ onInput: (ee) => l("input", A),
1928
+ onChange: E[4] || (E[4] = (ee) => l("change", ee))
1929
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
1930
+ [O, L()]
1931
+ ]) : y("", !0),
1932
+ (ot = $.value) != null && ot[A] ? (o(), i("div", Po, [
1933
+ $.value[A].type ? (o(), i("span", No, k(e(M)(`validation_error.${$.value[A].type}`)), 1)) : y("", !0),
1934
+ $.value[A].detail ? (o(), i("span", xo, k(e(M)($.value[A].detail)), 1)) : y("", !0)
1935
+ ])) : y("", !0)
1936
+ ], 4);
1937
+ }), 128))
1938
+ ]),
1939
+ m.$slots.after ? I(m.$slots, "after", { key: 1 }, void 0, !0) : y("", !0),
1940
+ m.$slots.footer ? (o(), i("div", ea, [
1941
+ I(m.$slots, "footer", pe(Ve({
1942
+ isInsertReady: se.value
1943
+ })), void 0, !0)
1944
+ ])) : y("", !0)
1945
+ ], 4);
1946
+ };
1947
+ }
1948
+ });
1949
+ const Ge = /* @__PURE__ */ X(ta, [["__scopeId", "data-v-fb16d65c"]]), na = /* @__PURE__ */ U({
1950
+ __name: "aeria-filter-panel",
1951
+ emits: ["update:modelValue"],
1952
+ setup(d, { emit: r }) {
1953
+ const a = r, t = ge(), l = Ie(), s = () => {
1954
+ t.pagination.offset = 0, t.$actions.filter(), a("update:modelValue", !1), l.push({
1955
+ query: qt(t)
1956
+ });
1957
+ };
1958
+ return (u, v) => (o(), g(Ae, {
1959
+ "close-hint": "",
1960
+ "fixed-right": "",
1961
+ title: u.t("filter_by", { capitalize: !0 }),
1962
+ onClose: v[2] || (v[2] = (c) => a("update:modelValue", !1)),
1963
+ onOverlayClick: v[3] || (v[3] = (c) => a("update:modelValue", !1))
1964
+ }, {
1965
+ footer: f(() => [
1966
+ e(t).filtersCount > 0 ? (o(), g(re, {
1967
+ key: 0,
1968
+ variant: "transparent",
1969
+ onClick: v[1] || (v[1] = (c) => {
1970
+ e(t).$actions.clearFilters(), s(), a("update:modelValue", !1);
1971
+ })
1972
+ }, {
1973
+ default: f(() => [
1974
+ W(k(u.t("action.clear", { capitalize: !0 })) + " ", 1),
1975
+ z(be, null, {
1976
+ default: f(() => [
1977
+ W(k(e(t).filtersCount), 1)
1978
+ ]),
1979
+ _: 1
1980
+ })
1981
+ ]),
1982
+ _: 1
1983
+ })) : y("", !0),
1984
+ z(re, {
1985
+ large: "",
1986
+ icon: "funnel",
1987
+ disabled: !e(t).hasActiveFilters,
1988
+ onClick: s
1989
+ }, {
1990
+ default: f(() => [
1991
+ W(k(u.t("action.filter", { capitalize: !0 })), 1)
1992
+ ]),
1993
+ _: 1
1994
+ }, 8, ["disabled"])
1995
+ ]),
1996
+ default: f(() => [
1997
+ z(Ge, H({
1998
+ modelValue: e(t).filters,
1999
+ "onUpdate:modelValue": v[0] || (v[0] = (c) => e(t).filters = c)
2000
+ }, {
2001
+ searchOnly: !0,
2002
+ form: e(t).availableFilters,
2003
+ layout: e(t).description.formLayout || {}
2004
+ }, { focus: "" }), null, 16, ["modelValue"])
2005
+ ]),
2006
+ _: 1
2007
+ }, 8, ["title"]));
2008
+ }
2009
+ }), oa = /* @__PURE__ */ U({
2010
+ __name: "aeria-insert-panel",
2011
+ props: {
2012
+ collection: {},
2013
+ modelValue: { type: [Boolean, String] },
2014
+ readOnly: { type: Boolean }
2015
+ },
2016
+ emits: ["update:modelValue", "cancel"],
2017
+ setup(d, { emit: r }) {
2018
+ const a = d, t = r, l = ie("meta"), s = ie(a.collection || l.view.collection), u = ve("individualActions", []), v = async () => {
2019
+ const { error: p } = await s.$actions.deepInsert();
2020
+ p || t("update:modelValue", !1);
2021
+ }, { t: c } = Tt(), h = () => {
2022
+ l.$actions.ask({
2023
+ action: () => {
2024
+ s.$actions.clearItem(), s.validationErrors = {}, t("cancel");
2025
+ },
2026
+ body: c("prompt.close_panel")
2027
+ });
2028
+ };
2029
+ return ue(() => s.item._id, (p) => {
2030
+ p === null && t("update:modelValue", !1);
2031
+ }), (p, n) => {
2032
+ const _ = ne("clickable");
2033
+ return o(), g(Ae, {
2034
+ loading: e(s).loading.get,
2035
+ onOverlayClick: h
2036
+ }, ce({
2037
+ extra: f(() => [
2038
+ z(Ce, H({
2039
+ subject: e(s).item,
2040
+ actions: e(u).filter(({ action: $ }) => $ !== "ui/spawnEdit")
2041
+ }, {
2042
+ onActionClick: n[2] || (n[2] = ($) => t("update:modelValue", !1))
2043
+ }), {
2044
+ default: f(() => [
2045
+ e(s).item._id ? x((o(), g(Z, {
2046
+ key: 0,
2047
+ reactive: "",
2048
+ icon: "dots-three"
2049
+ }, null, 512)), [
2050
+ [_]
2051
+ ]) : y("", !0)
2052
+ ]),
2053
+ _: 1
2054
+ }, 16)
2055
+ ]),
2056
+ default: f(() => [
2057
+ z(Ge, H({
2058
+ modelValue: e(s).item,
2059
+ "onUpdate:modelValue": n[0] || (n[0] = ($) => e(s).item = $)
2060
+ }, {
2061
+ readOnly: p.readOnly,
2062
+ collection: e(l).view.collection,
2063
+ form: e(s).description.form ? e(s).$actions.useProperties(e(s).description.form) : e(s).properties,
2064
+ layout: e(s).description.formLayout || {}
2065
+ }, {
2066
+ focus: "",
2067
+ onAdd: n[1] || (n[1] = ($) => $.preventDefault())
2068
+ }), ce({ _: 2 }, [
2069
+ D(Object.keys(p.$slots).filter(($) => $.startsWith("field-")), ($) => ({
2070
+ name: $,
2071
+ fn: f((b) => [
2072
+ I(p.$slots, $, pe(Ve(b)))
2073
+ ])
2074
+ }))
2075
+ ]), 1040, ["modelValue"])
2076
+ ]),
2077
+ _: 2
2078
+ }, [
2079
+ p.$slots.header ? {
2080
+ name: "header",
2081
+ fn: f(() => [
2082
+ I(p.$slots, "header")
2083
+ ]),
2084
+ key: "0"
2085
+ } : void 0,
2086
+ p.readOnly ? void 0 : {
2087
+ name: "footer",
2088
+ fn: f(() => [
2089
+ z(re, {
2090
+ variant: "transparent",
2091
+ onClick: h
2092
+ }, {
2093
+ default: f(() => [
2094
+ W(k(e(c)("action.cancel", { capitalize: !0 })), 1)
2095
+ ]),
2096
+ _: 1
2097
+ }),
2098
+ z(re, {
2099
+ large: "",
2100
+ disabled: !e(s).isInsertReady || e(s).loading.get,
2101
+ loading: e(s).loading.insert,
2102
+ onClick: v
2103
+ }, {
2104
+ default: f(() => [
2105
+ W(k(e(c)("action.insert", { capitalize: !0 })), 1)
2106
+ ]),
2107
+ _: 1
2108
+ }, 8, ["disabled", "loading"])
2109
+ ]),
2110
+ key: "1"
2111
+ }
2112
+ ]), 1032, ["loading"]);
2113
+ };
2114
+ }
2115
+ }), Vt = (d, r) => {
2116
+ if (r) {
2117
+ if (!d) {
2118
+ r.filtersPreset = {}, r.preferredTableProperties = [], r.pagination.offset = 0;
2119
+ return;
2120
+ }
2121
+ r.filtersPreset = d.filters || {}, r.preferredTableProperties = d.table ? Array.from(d.table) : [], r.pagination.offset = 0;
2122
+ }
2123
+ }, aa = (d, r = {
2124
+ persistInQuery: !0
2125
+ }) => {
2126
+ const t = Ie().currentRoute;
2127
+ return ue(() => t.value.query.section, (l) => {
2128
+ if (d) {
2129
+ if (d.description.filtersPresets) {
2130
+ const s = l || Object.keys(d.description.filtersPresets)[0];
2131
+ Vt(d.description.filtersPresets[s], d);
2132
+ }
2133
+ if (r.persistInQuery) {
2134
+ const s = t.value.query;
2135
+ s.offset && (d.pagination.offset = +s.offset), s.limit && (d.pagination.limit = +s.limit), s.search && (d.textQuery = s.search, d.filters.$text = {
2136
+ $search: `"${s.search}"`,
2137
+ $caseSensitive: !1
2138
+ });
2139
+ }
2140
+ }
2141
+ }, {
2142
+ immediate: !0
2143
+ });
2144
+ }, la = (d) => (Ee("data-v-7f75c4c2"), d = d(), De(), d), sa = {
2145
+ key: 0,
2146
+ class: "table aeria-surface"
2147
+ }, ia = { key: 0 }, ra = { key: 1 }, ua = { key: 0 }, ca = ["checked"], da = {
2148
+ key: 1,
2149
+ style: { "text-align": "right" }
2150
+ }, pa = { key: 2 }, _a = { key: 3 }, ma = ["onClick"], fa = { key: 0 }, va = ["value"], ya = { class: "table__cell-mobile-label" }, ha = {
2151
+ key: 0,
2152
+ class: "table__cell-container"
2153
+ }, $a = {
2154
+ key: 1,
2155
+ class: "table__cell-container"
2156
+ }, ba = { class: "table__cell-grid" }, ga = { key: 0 }, ka = { key: 1 }, Va = ["href"], Ca = { key: 3 }, Oa = { key: 2 }, Ia = { key: 0 }, Aa = { key: 1 }, Ba = { key: 2 }, wa = {
2157
+ key: 1,
2158
+ class: "no-print"
2159
+ }, Sa = { class: "table__cell-actions" }, ja = {
2160
+ key: 2,
2161
+ class: "no-print table__mobile-actions"
2162
+ }, Ta = ["id"], La = { key: 1 }, Ra = /* @__PURE__ */ la(() => /* @__PURE__ */ V("td", { colspan: 10 }, [
2163
+ /* @__PURE__ */ V("div", { class: "table__empty" }, " Não foram encontrados resultados. ")
2164
+ ], -1)), za = [
2165
+ Ra
2166
+ ], Ma = /* @__PURE__ */ U({
2167
+ __name: "aeria-table",
2168
+ props: {
2169
+ columns: {},
2170
+ rows: {},
2171
+ collection: {},
2172
+ checkbox: { type: Boolean },
2173
+ actions: {},
2174
+ layout: {}
2175
+ },
2176
+ emits: ["itemClick"],
2177
+ setup(d, { emit: r }) {
2178
+ const a = d, t = r, l = ze(), s = a.collection || Me(), u = s ? ie(typeof s == "string" ? s : s.value) : null, v = Q({
2179
+ get: () => u == null ? void 0 : u.selected,
2180
+ set: (_) => u == null ? void 0 : u.$actions.selectManyItems(_, !0)
2181
+ }), c = (_, $) => _ != null && _.button ? typeof _.button == "object" ? Ke($, _.button).satisfied : _.button : !1, h = (_) => {
2182
+ var $;
2183
+ return !l.value.xl || !(($ = a.layout) != null && $.actions) || !a.actions ? [] : a.actions.filter((b) => {
2184
+ const S = a.layout.actions[b.action];
2185
+ return c(S, _);
2186
+ });
2187
+ }, p = (_) => {
2188
+ var $;
2189
+ return a.actions ? !l.value.xl || !(($ = a.layout) != null && $.actions) ? a.actions : a.actions.filter((b) => {
2190
+ const S = a.layout.actions[b.action];
2191
+ if (b.roles) {
2192
+ const T = ie("user");
2193
+ if (!bt(b.roles, T.currentUser.roles))
2194
+ return !1;
2195
+ }
2196
+ return !c(S, _);
2197
+ }) : [];
2198
+ }, n = (_, $) => {
2199
+ var T, P;
2200
+ const b = [], S = (P = (T = a.layout) == null ? void 0 : T.actions) == null ? void 0 : P[$.action];
2201
+ return S != null && S.if && (Ke(
2202
+ _,
2203
+ S.if
2204
+ ).satisfied || b.push("display: none;")), b.join("");
2205
+ };
2206
+ return (_, $) => {
2207
+ var S, T, P;
2208
+ const b = ne("clickable");
2209
+ return _.columns && Object.keys(_.columns).length > 0 || _.$slots.thead ? (o(), i("table", sa, [
2210
+ _.$slots.thead ? (o(), i("thead", ia, [
2211
+ I(_.$slots, "thead", {}, void 0, !0)
2212
+ ])) : (o(), i("thead", ra, [
2213
+ V("tr", null, [
2214
+ _.checkbox && e(u) && e(l).md ? (o(), i("th", ua, [
2215
+ V("input", {
2216
+ type: "checkbox",
2217
+ checked: e(u).selected.length > 0 && e(u).selected.length === e(u).itemsCount,
2218
+ onChange: $[0] || ($[0] = (B) => e(u).$actions.selectAllItems(B.target.checked))
2219
+ }, null, 40, ca)
2220
+ ])) : y("", !0),
2221
+ (o(!0), i(N, null, D(Object.entries(_.columns), ([B, F], Y) => (o(), i("th", {
2222
+ key: `header-${Y}`,
2223
+ class: "table__header"
2224
+ }, k(F.description || e(M)(B)), 1))), 128)),
2225
+ (S = _.actions) != null && S.length ? (o(), i("th", da)) : y("", !0)
2226
+ ])
2227
+ ])),
2228
+ _.$slots.tbody ? (o(), i("tbody", pa, [
2229
+ I(_.$slots, "tbody", {}, void 0, !0)
2230
+ ])) : (o(), i("tbody", _a, [
2231
+ (o(!0), i(N, null, D(_.rows, (B) => {
2232
+ var F, Y;
2233
+ return o(), i("tr", {
2234
+ key: B._id,
2235
+ onClick: (w) => t("itemClick", B)
2236
+ }, [
2237
+ e(u) && _.checkbox && e(l).md ? (o(), i("td", fa, [
2238
+ x(V("input", {
2239
+ "onUpdate:modelValue": $[1] || ($[1] = (w) => v.value = w),
2240
+ type: "checkbox",
2241
+ value: B._id
2242
+ }, null, 8, va), [
2243
+ [It, v.value]
2244
+ ])
2245
+ ])) : y("", !0),
2246
+ (o(!0), i(N, null, D(Object.entries(_.columns), ([w, te], C) => {
2247
+ var j, oe, ae, se, le, L;
2248
+ return o(), i("td", {
2249
+ key: `column-${B._id}-${C}`
2250
+ }, [
2251
+ V("div", ya, k(te.description || e(M)(w)), 1),
2252
+ `row-${w}` in _.$slots ? (o(), i("div", ha, [
2253
+ I(_.$slots, `row-${w}`, H({ ref_for: !0 }, {
2254
+ store: e(u),
2255
+ column: w,
2256
+ property: te,
2257
+ row: B
2258
+ }), void 0, !0)
2259
+ ])) : (o(), i("div", $a, [
2260
+ V("div", ba, [
2261
+ "type" in te && te.type === "boolean" ? (o(), i("div", ga, [
2262
+ B[w] ? (o(), g(Z, {
2263
+ key: 0,
2264
+ icon: "check",
2265
+ "icon-classes": "aeria-blueish"
2266
+ }, {
2267
+ default: f(() => [
2268
+ W(k(e(M)("yes")), 1)
2269
+ ]),
2270
+ _: 1
2271
+ })) : (o(), g(Z, {
2272
+ key: 1,
2273
+ icon: "x",
2274
+ "icon-classes": "aeria-redish"
2275
+ }, {
2276
+ default: f(() => [
2277
+ W(k(e(M)("no")), 1)
2278
+ ]),
2279
+ _: 1
2280
+ }))
2281
+ ])) : ((j = e(_e)(te)) == null ? void 0 : j.$ref) === "file" ? (o(), i("div", ka, [
2282
+ /^image/.test((oe = B[w][0]) == null ? void 0 : oe.type) && "items" in te ? (o(), g(Ue, {
2283
+ key: 0,
2284
+ modelValue: B[w][0].link,
2285
+ "onUpdate:modelValue": (R) => B[w][0].link = R,
2286
+ expandable: "",
2287
+ meta: B[w][0],
2288
+ alt: "Row image",
2289
+ class: "table__picture"
2290
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test((ae = B[w]) == null ? void 0 : ae.type) ? (o(), g(Ue, {
2291
+ key: 1,
2292
+ modelValue: B[w].link,
2293
+ "onUpdate:modelValue": (R) => B[w].link = R,
2294
+ expandable: "",
2295
+ meta: B[w],
2296
+ alt: "Row image",
2297
+ class: "table__picture"
2298
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : (se = B[w]) != null && se.link ? (o(), i("a", {
2299
+ key: 2,
2300
+ href: B[w].link,
2301
+ style: { "font-size": "10pt" }
2302
+ }, k(B[w].filename), 9, Va)) : (o(), i("div", Ca, " - "))
2303
+ ])) : (o(), i("div", Oa, [
2304
+ e(u) ? (o(), i("span", Ia, k(e(u).$actions.formatValue({
2305
+ value: B[w],
2306
+ key: w,
2307
+ property: te
2308
+ })), 1)) : (o(), i("span", Aa, k(Array.isArray(B[w]) ? B[w].filter((R) => !!R).join(", ") : [void 0, null].includes(B[w]) ? "-" : B[w]), 1)),
2309
+ ((L = (le = e(_e)(te)) == null ? void 0 : le.indexes) == null ? void 0 : L.length) > 1 ? (o(), i("div", Ba, [
2310
+ (o(!0), i(N, null, D(e(_e)(te).indexes.slice(1, 2), (R, m) => (o(), i("div", {
2311
+ key: `subvalue-${m}`,
2312
+ class: "table__cell-subvalue"
2313
+ }, k(e(u).$actions.formatValue({
2314
+ value: B[w],
2315
+ key: w,
2316
+ property: te,
2317
+ index: R
2318
+ })), 1))), 128))
2319
+ ])) : y("", !0)
2320
+ ]))
2321
+ ])
2322
+ ]))
2323
+ ]);
2324
+ }), 128)),
2325
+ (F = _.actions) != null && F.length && e(l).md ? (o(), i("td", wa, [
2326
+ V("div", Sa, [
2327
+ (o(!0), i(N, null, D(h(B), (w) => (o(), g(re, {
2328
+ key: `action-${w.action}`,
2329
+ small: "",
2330
+ variant: "transparent",
2331
+ icon: w.icon,
2332
+ style: $e(n(B, w)),
2333
+ onClick: (te) => w.click(B)
2334
+ }, {
2335
+ default: f(() => [
2336
+ W(k(e(M)(w.label)), 1)
2337
+ ]),
2338
+ _: 2
2339
+ }, 1032, ["icon", "style", "onClick"]))), 128)),
2340
+ p(B).length > 0 ? (o(), g(Ce, H({
2341
+ key: 0,
2342
+ ref_for: !0
2343
+ }, {
2344
+ subject: B,
2345
+ actions: p(B)
2346
+ }), {
2347
+ default: f(() => [
2348
+ x(z(Z, {
2349
+ reactive: "",
2350
+ icon: "dots-three"
2351
+ }, null, 512), [
2352
+ [b]
2353
+ ])
2354
+ ]),
2355
+ _: 2
2356
+ }, 1040)) : y("", !0)
2357
+ ])
2358
+ ])) : (Y = _.actions) != null && Y.length ? (o(), i("td", ja, [
2359
+ V("div", {
2360
+ class: "table__mobile-actions-grid",
2361
+ style: $e(`grid-template-columns: repeat(${h(B).length + (p(B).length ? 1 : 0)}, 1fr);`)
2362
+ }, [
2363
+ (o(!0), i(N, null, D(h(B), (w) => (o(), g(fe, {
2364
+ key: `action-${w.action}`,
2365
+ class: "table__mobile-actions-button",
2366
+ onClick: (te) => w.click(B)
2367
+ }, {
2368
+ default: f(() => [
2369
+ z(Z, {
2370
+ icon: w.icon || "gear"
2371
+ }, {
2372
+ default: f(() => [
2373
+ W(k(e(M)(w.label)), 1)
2374
+ ]),
2375
+ _: 2
2376
+ }, 1032, ["icon"])
2377
+ ]),
2378
+ _: 2
2379
+ }, 1032, ["onClick"]))), 128)),
2380
+ p(B).length > 0 ? (o(), g(Ce, H({
2381
+ key: 0,
2382
+ ref_for: !0
2383
+ }, {
2384
+ subject: B,
2385
+ actions: p(B)
2386
+ }), {
2387
+ default: f(() => [
2388
+ z(Z, {
2389
+ icon: "dots-three",
2390
+ class: "table__mobile-actions-button"
2391
+ })
2392
+ ]),
2393
+ _: 2
2394
+ }, 1040)) : y("", !0)
2395
+ ], 4)
2396
+ ])) : y("", !0),
2397
+ V("div", {
2398
+ id: `dropdown-${B._id}`
2399
+ }, null, 8, Ta)
2400
+ ], 8, ma);
2401
+ }), 128))
2402
+ ])),
2403
+ V("tfoot", null, [
2404
+ _.$slots.tfoot ? I(_.$slots, "tfoot", { key: 0 }, void 0, !0) : _.columns && !((T = _.rows) != null && T.length) && !((P = e(u)) != null && P.loading.getAll) ? (o(), i("tr", La, za)) : y("", !0)
2405
+ ])
2406
+ ])) : y("", !0);
2407
+ };
2408
+ }
2409
+ });
2410
+ const Fa = /* @__PURE__ */ X(Ma, [["__scopeId", "data-v-7f75c4c2"]]), qa = /* @__PURE__ */ U({
2411
+ __name: "aeria-tabular",
2412
+ props: {
2413
+ individualActions: {},
2414
+ layoutOptions: {},
2415
+ componentProps: {}
2416
+ },
2417
+ setup(d) {
2418
+ const r = d, a = ge(), t = Me(), l = Q(() => {
2419
+ const s = {
2420
+ collection: t,
2421
+ checkbox: a.hasSelectionActions,
2422
+ columns: a.tableProperties,
2423
+ rows: a.items,
2424
+ actions: r.individualActions,
2425
+ layout: a.tableLayout
2426
+ };
2427
+ return Object.assign(s, r.componentProps);
2428
+ });
2429
+ return (s, u) => (o(), i("div", null, [
2430
+ s.$slots.inner ? I(s.$slots, "inner", { key: 0 }) : y("", !0),
2431
+ e(a).properties ? (o(), g(Fa, H({ key: 1 }, l.value, {
2432
+ key: e(a).$id
2433
+ }), ce({ _: 2 }, [
2434
+ D(Object.keys(s.$slots).filter((v) => !["inner"].includes(v)), (v) => ({
2435
+ name: v,
2436
+ fn: f((c) => [
2437
+ I(s.$slots, v, pe(Ve(c)))
2438
+ ])
2439
+ }))
2440
+ ]), 1040)) : y("", !0)
2441
+ ]));
2442
+ }
2443
+ }), Ua = /* @__PURE__ */ U({
2444
+ __name: "aeria-grid",
2445
+ props: {
2446
+ list: { type: Boolean }
2447
+ },
2448
+ setup(d) {
2449
+ return (r, a) => (o(), i("div", {
2450
+ class: K(`
2451
+ grid
2452
+ ${r.list && "grid--list"}
2453
+ `)
2454
+ }, [
2455
+ I(r.$slots, "default", {}, void 0, !0)
2456
+ ], 2));
2457
+ }
2458
+ });
2459
+ const Ea = /* @__PURE__ */ X(Ua, [["__scopeId", "data-v-438c4aed"]]), Da = { key: 0 }, Ha = {
2460
+ key: 1,
2461
+ class: "card__information"
2462
+ }, Qa = /* @__PURE__ */ U({
2463
+ __name: "aeria-grid",
2464
+ props: {
2465
+ individualActions: {},
2466
+ hasSelectionActions: { type: Boolean },
2467
+ layoutOptions: {},
2468
+ componentName: {}
2469
+ },
2470
+ setup(d) {
2471
+ const a = d.layoutOptions, t = ge(), l = (s) => Array.isArray(s) ? s[0] : s;
2472
+ return (s, u) => {
2473
+ const v = ne("clickable");
2474
+ return o(), g(Ea, {
2475
+ list: s.componentName === "list"
2476
+ }, {
2477
+ default: f(() => [
2478
+ (o(!0), i(N, null, D(e(t).items, (c) => (o(), g(_n, {
2479
+ key: c,
2480
+ inactive: !!(e(a).active && !c[e(a).active]),
2481
+ horizontal: s.componentName === "list"
2482
+ }, ce({
2483
+ footer: f(() => [
2484
+ e(a).title ? (o(), i("div", Da, k(c[e(a).title]), 1)) : y("", !0),
2485
+ e(a).information ? (o(), i("div", Ha, k(c[e(a).information]), 1)) : y("", !0)
2486
+ ]),
2487
+ actions: f(() => [
2488
+ s.individualActions.length > 0 ? (o(), g(Ce, H({
2489
+ key: 0,
2490
+ ref_for: !0
2491
+ }, {
2492
+ subject: c,
2493
+ actions: s.individualActions
2494
+ }), {
2495
+ default: f(() => [
2496
+ x(z(Z, {
2497
+ reactive: "",
2498
+ icon: "dots-three-vertical"
2499
+ }, null, 512), [
2500
+ [v]
2501
+ ])
2502
+ ]),
2503
+ _: 2
2504
+ }, 1040)) : y("", !0)
2505
+ ]),
2506
+ default: f(() => {
2507
+ var h;
2508
+ return [
2509
+ z(Ue, {
2510
+ alt: "Item picture",
2511
+ expandable: "",
2512
+ url: (h = l(c[e(a).picture])) == null ? void 0 : h.link,
2513
+ meta: l(c[e(a).picture])
2514
+ }, null, 8, ["url", "meta"])
2515
+ ];
2516
+ }),
2517
+ _: 2
2518
+ }, [
2519
+ e(a).badge && Array.isArray(c[e(a).badge]) ? {
2520
+ name: "badge",
2521
+ fn: f(() => [
2522
+ (o(!0), i(N, null, D(c[e(a).badge], (h) => (o(), g(be, {
2523
+ key: `${c._id}-${h}`,
2524
+ large: ""
2525
+ }, {
2526
+ default: f(() => [
2527
+ W(k(e(a).translateBadge ? e(M)(h) : h), 1)
2528
+ ]),
2529
+ _: 2
2530
+ }, 1024))), 128))
2531
+ ]),
2532
+ key: "0"
2533
+ } : e(a).badge ? {
2534
+ name: "badge",
2535
+ fn: f(() => [
2536
+ z(be, null, {
2537
+ default: f(() => [
2538
+ W(k(e(a).translateBadge ? e(M)(c[e(a).badge]) : c[e(a).badge]), 1)
2539
+ ]),
2540
+ _: 2
2541
+ }, 1024)
2542
+ ]),
2543
+ key: "1"
2544
+ } : void 0
2545
+ ]), 1032, ["inactive", "horizontal"]))), 128))
2546
+ ]),
2547
+ _: 1
2548
+ }, 8, ["list"]);
2549
+ };
2550
+ }
2551
+ });
2552
+ const _t = /* @__PURE__ */ X(Qa, [["__scopeId", "data-v-113dd7db"]]), Ga = (d) => ({
2553
+ tabular: qa,
2554
+ grid: _t,
2555
+ list: _t
2556
+ })[d], de = J(!1);
2557
+ J(!1);
2558
+ const ke = J(!1), Le = J((...d) => null), mt = J(), Wa = (d) => (Ee("data-v-2f942d7a"), d = d(), De(), d), Ka = {
2559
+ key: 2,
2560
+ class: "crud__controls"
2561
+ }, Xa = {
2562
+ key: 0,
2563
+ class: "crud__search"
2564
+ }, Ya = { class: "crud__actions" }, Ja = { class: "crud__context-badge" }, Za = /* @__PURE__ */ Wa(() => /* @__PURE__ */ V("div", null, "Filtros", -1)), Pa = { key: 0 }, Na = {
2565
+ key: 3,
2566
+ class: "crud__pagination"
2567
+ }, ft = 30, xa = /* @__PURE__ */ U({
2568
+ __name: "aeria-crud",
2569
+ props: {
2570
+ collection: {},
2571
+ noControls: { type: Boolean },
2572
+ noActions: { type: Boolean },
2573
+ noFetch: { type: Boolean },
2574
+ noLayoutToggle: { type: Boolean },
2575
+ layout: {},
2576
+ action: {},
2577
+ componentProps: {},
2578
+ scrollPagination: { type: Boolean },
2579
+ noQueryPersistence: { type: Boolean }
2580
+ },
2581
+ emits: ["uiEvent"],
2582
+ setup(d, { emit: r }) {
2583
+ const a = d, t = r, l = Ie(), s = $t({
2584
+ delay: 600
2585
+ }), u = ie("meta"), v = ze(), { reachedEnd: c, detach: h } = Ye(null, {
2586
+ antecipate: 600
2587
+ }), p = !v.value.md || a.scrollPagination;
2588
+ p && ue(c, (C) => {
2589
+ C && n.pagination.recordsTotal > n.items.length && b.value < ft && (b.value += 1, T());
2590
+ });
2591
+ const n = ie(a.collection);
2592
+ aa(n, {
2593
+ persistInQuery: !a.noQueryPersistence
2594
+ });
2595
+ const _ = gt(), $ = a.action ? e(a.action) : Ut(n, l, _);
2596
+ Le.value = $[0], mt.value = $[1];
2597
+ const b = J(0), S = J(!1), T = async (C) => {
2598
+ n.activeFilters = Object.assign({}, (C == null ? void 0 : C.filters) || n.$filters), Object.assign(n.activeFilters, n.filtersPreset);
2599
+ const j = {
2600
+ filters: n.activeFilters,
2601
+ limit: n.pagination.limit,
2602
+ offset: n.pagination.offset,
2603
+ project: n.preferredTableProperties.length > 0 ? n.preferredTableProperties : n.description.table || Object.keys(n.properties)
2604
+ };
2605
+ b.value > 0 && (j.limit = 15, j.offset = b.value * j.limit), n.description.tableMeta && (j.project = j.project.concat(n.description.tableMeta)), C && Object.assign(j, C), n.loading.getAll = !0;
2606
+ const { error: oe, result: ae } = await n.$actions.retrieveItems(j);
2607
+ if (oe)
2608
+ return;
2609
+ const { data: se, pagination: le } = ae;
2610
+ n.pagination.recordsCount = le.recordsCount, n.pagination.recordsTotal = le.recordsTotal, b.value === 0 && n.items.splice(0), n.items.push(...se), n.loading.getAll = !1, S.value = !0;
2611
+ }, P = async (C) => {
2612
+ l.push({
2613
+ query: {
2614
+ ...l.currentRoute.value.query,
2615
+ offset: C.offset,
2616
+ limit: C.limit
2617
+ }
2618
+ }), n.pagination.offset = C.offset, n.pagination.limit = C.limit, T();
2619
+ }, B = ve("noResultsComponent", null);
2620
+ ue(() => [
2621
+ l.currentRoute.value.path,
2622
+ l.currentRoute.value.query.section
2623
+ ], async (C, j) => {
2624
+ if (j && j[0] === C[0] && j[1] === C[1])
2625
+ return;
2626
+ const oe = l.currentRoute.value;
2627
+ if (u.view.title = a.collection, u.view.collection = a.collection, !a.noFetch && !oe.query._popstate) {
2628
+ const ae = Et(n, oe);
2629
+ Object.keys(ae).length > 0 && Object.assign(n.filters, ae), await T();
2630
+ }
2631
+ }, {
2632
+ immediate: !0,
2633
+ flush: "post"
2634
+ });
2635
+ const [F] = s((C) => (l.push({
2636
+ query: {
2637
+ search: C || void 0
2638
+ }
2639
+ }), C ? (n.filters = Object.assign(Re(n.freshFilters), {
2640
+ $text: {
2641
+ $search: `"${C}"`,
2642
+ $caseSensitive: !1
2643
+ }
2644
+ }), T({
2645
+ offset: 0
2646
+ })) : (n.filters = Re(n.freshFilters), b.value = 0, T())));
2647
+ ue(() => n.textQuery, (C) => {
2648
+ F(C);
2649
+ });
2650
+ const Y = (C) => {
2651
+ C.currentLayout = C.currentLayout === "tabular" ? C.description.layout.name : "tabular";
2652
+ };
2653
+ At(() => {
2654
+ n.$actions.clearFilters(), n.textQuery = "", h();
2655
+ }), ue(() => mt.value, async (C) => {
2656
+ var ae;
2657
+ const j = Re(C);
2658
+ let oe;
2659
+ if (j)
2660
+ if ((j.name === "spawnEdit" || j.name === "duplicate") && (oe = n.$actions.get({
2661
+ filters: {
2662
+ _id: j.params._id
2663
+ }
2664
+ })), j.name === "spawnAdd")
2665
+ n.$actions.clearItem(), (ae = j.params) != null && ae.item && (n.$actions.setItem(j.params.item), Object.keys(j.params.item).forEach((se) => {
2666
+ delete n.referenceItem[se];
2667
+ })), de.value = "add";
2668
+ else if (j.name === "spawnEdit")
2669
+ n.$actions.setItem(j.params), de.value = "edit";
2670
+ else if (j.name === "duplicate") {
2671
+ await oe;
2672
+ const se = Object.entries(n.item).reduce((le, [L, R]) => {
2673
+ if (!(L in n.properties))
2674
+ return {
2675
+ ...le,
2676
+ [L]: R
2677
+ };
2678
+ const m = n.properties[L];
2679
+ if (m.readOnly)
2680
+ return le;
2681
+ const E = (G) => {
2682
+ const O = _e(m);
2683
+ if (!O)
2684
+ return G;
2685
+ if (O.$ref === "file")
2686
+ return {};
2687
+ if (O.inline && G) {
2688
+ const { _id: A, ...q } = G;
2689
+ return q;
2690
+ }
2691
+ return G;
2692
+ };
2693
+ return R = Array.isArray(R) ? R.map(E) : E(R), {
2694
+ ...le,
2695
+ [L]: R
2696
+ };
2697
+ }, {});
2698
+ n.$actions.setItem(se), delete n.item._id, n.referenceItem = {}, de.value = "duplicate";
2699
+ } else
2700
+ t("uiEvent", j);
2701
+ }, {
2702
+ deep: !0
2703
+ }), ue(() => de, (C) => {
2704
+ C.value === !1 && (u.view.collection = a.collection, n.$actions.clearItem());
2705
+ });
2706
+ const w = Q(() => n.individualActions.map((C) => ({
2707
+ click: Le.value(C),
2708
+ ...C
2709
+ }))), te = Q(() => n.actions.filter((C) => !C.button));
2710
+ return ye(He, Q(() => a.collection)), ye("individualActions", w), (C, j) => {
2711
+ var se, le, L, R, m, E, G;
2712
+ const oe = ne("clickable"), ae = ne("loading");
2713
+ return o(), i(N, null, [
2714
+ e(ke) ? (o(), g(na, {
2715
+ key: e(n).$id,
2716
+ modelValue: e(ke),
2717
+ "onUpdate:modelValue": j[0] || (j[0] = (O) => ct(ke) ? ke.value = O : null)
2718
+ }, null, 8, ["modelValue"])) : y("", !0),
2719
+ e(de) ? (o(), g(oa, {
2720
+ key: 1,
2721
+ modelValue: e(de),
2722
+ "onUpdate:modelValue": j[1] || (j[1] = (O) => ct(de) ? de.value = O : null),
2723
+ "fixed-right": "",
2724
+ onCancel: j[2] || (j[2] = (O) => de.value = !1)
2725
+ }, ce({
2726
+ header: f(() => [
2727
+ V("span", null, k((() => {
2728
+ switch (e(de)) {
2729
+ case "add":
2730
+ return e(M)("action.add", { capitalize: !0 });
2731
+ case "duplicate":
2732
+ return e(M)("action.duplicate", { capitalize: !0 });
2733
+ case "edit":
2734
+ default:
2735
+ return e(M)("action.edit", { capitalize: !0 });
2736
+ }
2737
+ })()), 1),
2738
+ V("span", null, " " + k(e(M)(e(u).view.collection)), 1)
2739
+ ]),
2740
+ _: 2
2741
+ }, [
2742
+ D(Object.keys(C.$slots).filter((O) => O.startsWith("field-")), (O) => ({
2743
+ name: O,
2744
+ fn: f((A) => [
2745
+ I(C.$slots, O, pe(Ve(A)), void 0, !0)
2746
+ ])
2747
+ }))
2748
+ ]), 1032, ["modelValue"])) : y("", !0),
2749
+ !C.noActions && (e(n).description.search || Object.keys(e(n).availableFilters).length > 0 || ((se = e(n)) == null ? void 0 : se.actions.length) > 0 || C.$slots.actions || !C.noLayoutToggle && e(n).description.layout && ((le = e(n).description.layout) == null ? void 0 : le.name) !== "tabular") ? (o(), i("div", Ka, [
2750
+ e(n).description.search ? (o(), i("div", Xa, [
2751
+ z(Oe, H({
2752
+ modelValue: e(n).textQuery,
2753
+ "onUpdate:modelValue": j[3] || (j[3] = (O) => e(n).textQuery = O)
2754
+ }, {
2755
+ property: {
2756
+ type: "string",
2757
+ placeholder: e(n).description.search.placeholder || "Pesquise aqui",
2758
+ inputType: "search"
2759
+ }
2760
+ }), null, 16, ["modelValue"])
2761
+ ])) : y("", !0),
2762
+ V("div", Ya, [
2763
+ te.value.length > 0 || !C.noLayoutToggle && e(n).description.layout && ((L = e(n).description.layout) == null ? void 0 : L.name) !== "tabular" ? (o(), g(Ce, { key: 0 }, ce({
2764
+ default: f(() => [
2765
+ z(re, {
2766
+ variant: "alt",
2767
+ icon: "sliders"
2768
+ }, {
2769
+ default: f(() => [
2770
+ e(n).filtersCount ? (o(), g(be, { key: 0 }, {
2771
+ default: f(() => [
2772
+ W(k(e(n).filtersCount), 1)
2773
+ ]),
2774
+ _: 1
2775
+ })) : y("", !0)
2776
+ ]),
2777
+ _: 1
2778
+ })
2779
+ ]),
2780
+ _: 2
2781
+ }, [
2782
+ Object.keys(e(n).availableFilters).length > 0 ? {
2783
+ name: "filter",
2784
+ fn: f(() => [
2785
+ x((o(), g(Z, {
2786
+ icon: "funnel",
2787
+ onClick: j[4] || (j[4] = (O) => ke.value = !0)
2788
+ }, {
2789
+ default: f(() => [
2790
+ W(k(e(M)("filters", { capitalize: !0 })), 1)
2791
+ ]),
2792
+ _: 1
2793
+ })), [
2794
+ [oe]
2795
+ ]),
2796
+ V("div", Ja, [
2797
+ e(n).filtersCount ? (o(), g(be, { key: 0 }, {
2798
+ default: f(() => [
2799
+ W(k(e(n).filtersCount), 1)
2800
+ ]),
2801
+ _: 1
2802
+ })) : y("", !0)
2803
+ ])
2804
+ ]),
2805
+ key: "0"
2806
+ } : void 0,
2807
+ !C.noLayoutToggle && e(n).description.layout && ((R = e(n).description.layout) == null ? void 0 : R.name) !== "tabular" ? {
2808
+ name: "layout-toggle",
2809
+ fn: f(() => [
2810
+ x((o(), g(Z, {
2811
+ icon: "table",
2812
+ onClick: j[5] || (j[5] = (O) => Y(e(n)))
2813
+ }, {
2814
+ default: f(() => [
2815
+ W(k(e(M)("change_layout", { capitalize: !0 })), 1)
2816
+ ]),
2817
+ _: 1
2818
+ })), [
2819
+ [oe]
2820
+ ])
2821
+ ]),
2822
+ key: "1"
2823
+ } : void 0,
2824
+ D(te.value, (O, A) => ({
2825
+ name: `action-${A}`,
2826
+ fn: f(() => [
2827
+ O ? (o(), g(Z, {
2828
+ key: 0,
2829
+ icon: O.icon || "gear",
2830
+ disabled: e(n).selected.length === 0 && O.selection,
2831
+ onClick: (q) => e(Le)(O)({ _id: e(n).selected.map((me) => me._id) })
2832
+ }, {
2833
+ default: f(() => [
2834
+ W(k(e(M)(O.label, { capitalize: !0 })), 1)
2835
+ ]),
2836
+ _: 2
2837
+ }, 1032, ["icon", "disabled", "onClick"])) : y("", !0)
2838
+ ])
2839
+ }))
2840
+ ]), 1024)) : Object.keys(e(n).availableFilters).length > 0 ? (o(), g(re, {
2841
+ key: 1,
2842
+ variant: "alt",
2843
+ icon: "funnel",
2844
+ onClick: j[6] || (j[6] = (O) => ke.value = !0)
2845
+ }, {
2846
+ default: f(() => [
2847
+ Za,
2848
+ e(n).filtersCount ? (o(), g(be, { key: 0 }, {
2849
+ default: f(() => [
2850
+ W(k(e(n).filtersCount), 1)
2851
+ ]),
2852
+ _: 1
2853
+ })) : y("", !0)
2854
+ ]),
2855
+ _: 1
2856
+ })) : y("", !0),
2857
+ (o(!0), i(N, null, D(e(n).actions.filter((O) => O.button), (O, A) => (o(), g(re, {
2858
+ key: `action-${A}`,
2859
+ icon: O.icon,
2860
+ disabled: e(n).selected.length === 0 && O.selection,
2861
+ onClick: (q) => e(Le)(O)({ _id: e(n).selected.map((me) => me._id) })
2862
+ }, {
2863
+ default: f(() => [
2864
+ W(k(e(M)(O.label, { capitalize: !0 })), 1)
2865
+ ]),
2866
+ _: 2
2867
+ }, 1032, ["icon", "disabled", "onClick"]))), 128)),
2868
+ C.$slots.actions ? I(C.$slots, "actions", { key: 2 }, void 0, !0) : y("", !0)
2869
+ ])
2870
+ ])) : y("", !0),
2871
+ x((o(), i("div", null, [
2872
+ e(n).itemsCount === 0 && !e(n).loading.getAll && S.value && (e(B) || C.$slots.empty) ? (o(), i("div", Pa, [
2873
+ e(B) ? (o(), g(he(e(B)), pe(H({ key: 0 }, {
2874
+ collection: e(n).$id
2875
+ })), {
2876
+ default: f(() => [
2877
+ e(n).filtersCount === 0 && e(n).description.actions && "ui:spawnAdd" in e(n).description.actions ? (o(), g(re, {
2878
+ key: 0,
2879
+ icon: "plus",
2880
+ onClick: j[7] || (j[7] = (O) => e(Le)({
2881
+ action: "ui:spawnAdd"
2882
+ })())
2883
+ }, {
2884
+ default: f(() => [
2885
+ W(k(e(M)("add_first_item", { capitalize: !0 })), 1)
2886
+ ]),
2887
+ _: 1
2888
+ })) : y("", !0)
2889
+ ]),
2890
+ _: 1
2891
+ }, 16)) : I(C.$slots, "empty", pe(H({ key: 1 }, {
2892
+ collection: e(n).$id
2893
+ })), void 0, !0)
2894
+ ])) : C.$slots.component ? I(C.$slots, "component", pe(H({ key: 1 }, {
2895
+ store: e(n)
2896
+ })), void 0, !0) : (o(), g(he(e(Ga)(((m = C.layout) == null ? void 0 : m.name) || e(n).$currentLayout)), H({ key: 2 }, {
2897
+ individualActions: w.value,
2898
+ layoutOptions: ((E = C.layout) == null ? void 0 : E.options) || e(n).layout.options,
2899
+ componentProps: C.componentProps
2900
+ }, {
2901
+ "component-name": ((G = C.layout) == null ? void 0 : G.name) || e(n).$currentLayout
2902
+ }), ce({ _: 2 }, [
2903
+ D(Object.keys(C.$slots).filter((O) => O.startsWith("row-")), (O) => ({
2904
+ name: O,
2905
+ fn: f((A) => [
2906
+ I(C.$slots, O, pe(Ve(A)), void 0, !0)
2907
+ ])
2908
+ })),
2909
+ C.$slots.tfoot ? {
2910
+ name: "tfoot",
2911
+ fn: f(() => [
2912
+ I(C.$slots, "tfoot", {}, void 0, !0)
2913
+ ]),
2914
+ key: "0"
2915
+ } : void 0
2916
+ ]), 1040, ["component-name"]))
2917
+ ])), [
2918
+ [ae, (!e(p) || b.value === ft) && e(n).loading.getAll]
2919
+ ]),
2920
+ !e(n).loading.getAll && e(n).itemsCount > 0 ? (o(), i("div", Na, [
2921
+ z(Fn, {
2922
+ pagination: e(n).pagination,
2923
+ onPaginate: P
2924
+ }, null, 8, ["pagination"])
2925
+ ])) : y("", !0)
2926
+ ], 64);
2927
+ };
2928
+ }
2929
+ });
2930
+ const zl = /* @__PURE__ */ X(xa, [["__scopeId", "data-v-2f942d7a"]]), el = { class: "prompt" }, tl = /* @__PURE__ */ U({
2931
+ __name: "aeria-prompt",
2932
+ props: {
2933
+ title: {},
2934
+ actions: {}
2935
+ },
2936
+ setup(d) {
2937
+ const r = ie("meta"), a = (t) => {
2938
+ r.$actions.fulfillPrompt(t);
2939
+ };
2940
+ return (t, l) => (o(), g(Ae, {
2941
+ float: "",
2942
+ "fill-footer": "",
2943
+ "close-hint": !1,
2944
+ style: { "--panel-min-width": "32rem" }
2945
+ }, ce({
2946
+ footer: f(() => [
2947
+ V("div", {
2948
+ class: "prompt__actions",
2949
+ style: $e(`grid-template-columns: repeat(${t.actions.length}, 1fr)`)
2950
+ }, [
2951
+ (o(!0), i(N, null, D(t.actions, (s, u) => (o(), g(fe, {
2952
+ key: `action-${u}`,
2953
+ class: K(`
2954
+ prompt__action
2955
+ prompt__action--${s.variant || "primary"}
2956
+ `),
2957
+ onClick: (v) => s.click ? s.click(s) : a(s)
2958
+ }, {
2959
+ default: f(() => [
2960
+ W(k(s.title || s.name), 1)
2961
+ ]),
2962
+ _: 2
2963
+ }, 1032, ["class", "onClick"]))), 128))
2964
+ ], 4)
2965
+ ]),
2966
+ default: f(() => [
2967
+ V("div", el, [
2968
+ I(t.$slots, "default", {}, void 0, !0)
2969
+ ])
2970
+ ]),
2971
+ _: 2
2972
+ }, [
2973
+ t.title ? {
2974
+ name: "title",
2975
+ fn: f(() => [
2976
+ W(k(t.title), 1)
2977
+ ]),
2978
+ key: "0"
2979
+ } : void 0
2980
+ ]), 1024));
2981
+ }
2982
+ });
2983
+ const nl = /* @__PURE__ */ X(tl, [["__scopeId", "data-v-5443f297"]]), ol = { class: "toast__content" }, al = { class: "toast__time" }, ll = /* @__PURE__ */ U({
2984
+ __name: "aeria-toast",
2985
+ props: {
2986
+ idx: {},
2987
+ itr: {},
2988
+ date: {},
2989
+ icon: {}
2990
+ },
2991
+ setup(d) {
2992
+ const r = ie("meta");
2993
+ return (a, t) => {
2994
+ const l = ne("clickable");
2995
+ return x((o(), i("div", {
2996
+ class: K({
2997
+ toast: !0,
2998
+ "toast--animate": e(r).toasts[0].itr === a.itr
2999
+ }),
3000
+ onAnimationend: t[0] || (t[0] = (s) => e(r).$actions.popToast()),
3001
+ onClick: t[1] || (t[1] = (s) => e(r).$actions.popToast(a.itr))
3002
+ }, [
3003
+ z(Z, H(
3004
+ a.icon ? { icon: a.icon } : { icon: "warning-circle" },
3005
+ { style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
3006
+ ), null, 16),
3007
+ V("div", ol, [
3008
+ I(a.$slots, "default", {}, void 0, !0),
3009
+ V("div", al, k(a.formatDateTime(a.date, { hoursOnly: !0 })), 1)
3010
+ ])
3011
+ ], 34)), [
3012
+ [l]
3013
+ ]);
3014
+ };
3015
+ }
3016
+ });
3017
+ const sl = /* @__PURE__ */ X(ll, [["__scopeId", "data-v-21bbe178"]]), il = ["innerHTML"], rl = { class: "main__toasts" }, ul = ["innerHTML"], cl = /* @__PURE__ */ U({
3018
+ __name: "aeria-main",
3019
+ setup(d) {
3020
+ const r = ie("meta"), a = Q(() => r.themeOverride || r.theme);
3021
+ return (t, l) => {
3022
+ const s = Bt("router-view");
3023
+ return o(), i("main", {
3024
+ id: "main",
3025
+ class: K(`
3026
+ main
3027
+ main--${a.value}
3028
+ ${a.value === "dark" && "tw-dark"}
3029
+ `)
3030
+ }, [
3031
+ (o(), g(wt, null, {
3032
+ default: f(() => [
3033
+ z(s, null, {
3034
+ default: f(({ Component: u }) => [
3035
+ (o(), g(he(u), null, ce({ _: 2 }, [
3036
+ D(Object.keys(t.$slots), (v) => ({
3037
+ name: v,
3038
+ fn: f(() => [
3039
+ I(t.$slots, v, {}, void 0, !0)
3040
+ ])
3041
+ }))
3042
+ ]), 1024))
3043
+ ]),
3044
+ _: 3
3045
+ })
3046
+ ]),
3047
+ _: 3
3048
+ })),
3049
+ I(t.$slots, "default", {}, void 0, !0),
3050
+ z(Ae, H({
3051
+ modelValue: e(r).modal.visible,
3052
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => e(r).modal.visible = u),
3053
+ float: "",
3054
+ "close-hint": ""
3055
+ }, e(r).modal, {
3056
+ "overlay-layer": 70,
3057
+ onOverlayClick: l[1] || (l[1] = (u) => e(r).modal.visible = !1)
3058
+ }), {
3059
+ default: f(() => [
3060
+ e(r).modal.body ? (o(), i("div", {
3061
+ key: 0,
3062
+ style: { "white-space": "pre-wrap" },
3063
+ innerHTML: e(r).modal.body
3064
+ }, null, 8, il)) : y("", !0),
3065
+ e(r).modal.component ? (o(), g(he(e(r).modal.component), { key: 1 })) : y("", !0)
3066
+ ]),
3067
+ _: 1
3068
+ }, 16, ["modelValue"]),
3069
+ e(r).prompt.visible ? (o(), g(nl, pe(H({ key: 0 }, e(r).prompt)), {
3070
+ default: f(() => [
3071
+ W(k(e(r).prompt.body), 1)
3072
+ ]),
3073
+ _: 1
3074
+ }, 16)) : y("", !0),
3075
+ V("div", rl, [
3076
+ (o(!0), i(N, null, D(e(r).toasts, (u) => (o(), g(sl, H({ ref_for: !0 }, u, {
3077
+ key: `toast-${u.itr}`
3078
+ }), {
3079
+ default: f(() => [
3080
+ V("div", {
3081
+ innerHTML: e(M)(u.text)
3082
+ }, null, 8, ul)
3083
+ ]),
3084
+ _: 2
3085
+ }, 1040))), 128))
3086
+ ])
3087
+ ], 2);
3088
+ };
3089
+ }
3090
+ });
3091
+ const Ml = /* @__PURE__ */ X(cl, [["__scopeId", "data-v-1166be3d"]]);
3092
+ const dl = {}, pl = { class: "menu" };
3093
+ function _l(d, r) {
3094
+ return o(), i("menu", pl, [
3095
+ (o(!0), i(N, null, D(Object.keys(d.$slots), (a) => (o(), i("div", {
3096
+ key: a,
3097
+ class: "menu__entry"
3098
+ }, [
3099
+ I(d.$slots, a, {}, void 0, !0)
3100
+ ]))), 128))
3101
+ ]);
3102
+ }
3103
+ const Fl = /* @__PURE__ */ X(dl, [["render", _l], ["__scopeId", "data-v-3cfef7fb"]]), ml = { class: "tabs" }, fl = {
3104
+ key: 0,
3105
+ class: "tabs__horizontal"
3106
+ }, vl = {
3107
+ key: 0,
3108
+ class: "tabs__tab tabs__tab--info"
3109
+ }, yl = ["onClick"], hl = {
3110
+ key: 1,
3111
+ class: "tabs__context-menu"
3112
+ }, $l = ["onClick"], bl = /* @__PURE__ */ U({
3113
+ __name: "aeria-tabs",
3114
+ props: {
3115
+ query: {},
3116
+ param: {},
3117
+ dropdown: { type: Boolean }
3118
+ },
3119
+ setup(d) {
3120
+ const r = d, a = St(), t = Ie(), l = ze(), s = "query" in r && r.query ? "query" : "params", u = Q(() => {
3121
+ const c = t.currentRoute.value[s][r.query || r.param];
3122
+ return c || Object.keys(a)[0];
3123
+ }), v = (c) => {
3124
+ if (s === "query") {
3125
+ t.push({
3126
+ query: {
3127
+ ...t.currentRoute.value.query,
3128
+ [r.query]: c
3129
+ }
3130
+ });
3131
+ return;
3132
+ }
3133
+ t.push({
3134
+ params: {
3135
+ [r.param]: c
3136
+ }
3137
+ });
3138
+ };
3139
+ return (c, h) => {
3140
+ const p = ne("clickable");
3141
+ return o(), i("div", ml, [
3142
+ e(l).md && !c.dropdown ? (o(), i("div", fl, [
3143
+ c.$slots.default ? (o(), i("div", vl, [
3144
+ I(c.$slots, "default", {}, void 0, !0)
3145
+ ])) : y("", !0),
3146
+ (o(!0), i(N, null, D(Object.keys(c.$slots).filter((n) => n !== "default"), (n, _) => (o(), i("div", {
3147
+ key: n,
3148
+ class: K({
3149
+ tabs__tab: !0,
3150
+ "tabs__tab--current": n === u.value || !u.value && _ === 0
3151
+ }),
3152
+ onClick: ($) => v(n)
3153
+ }, [
3154
+ I(c.$slots, n, {}, void 0, !0)
3155
+ ], 10, yl))), 128))
3156
+ ])) : (o(), i("div", hl, [
3157
+ z(Ce, null, ce({
3158
+ default: f(() => [
3159
+ x((o(), g(Z, {
3160
+ "icon-right": "",
3161
+ icon: "caret-down",
3162
+ style: { "--icon-color": "var(--theme-brand-color-shade-1)" },
3163
+ class: "tabs__context-menu-icon"
3164
+ }, {
3165
+ default: f(() => [
3166
+ I(c.$slots, u.value, {}, void 0, !0)
3167
+ ]),
3168
+ _: 3
3169
+ })), [
3170
+ [p]
3171
+ ])
3172
+ ]),
3173
+ _: 2
3174
+ }, [
3175
+ D(Object.keys(c.$slots).filter((n) => n !== "default"), (n) => ({
3176
+ name: n,
3177
+ fn: f(() => [
3178
+ V("div", {
3179
+ onClick: (_) => v(n)
3180
+ }, [
3181
+ I(c.$slots, n, {}, void 0, !0)
3182
+ ], 8, $l)
3183
+ ])
3184
+ }))
3185
+ ]), 1024)
3186
+ ]))
3187
+ ]);
3188
+ };
3189
+ }
3190
+ });
3191
+ const gl = /* @__PURE__ */ X(bl, [["__scopeId", "data-v-4dd516ec"]]), kl = U({
3192
+ props: {
3193
+ initialValue: String,
3194
+ promise: Promise
3195
+ },
3196
+ setup(d) {
3197
+ const r = J(d.initialValue);
3198
+ return d.promise instanceof Promise && d.promise.then((a) => {
3199
+ r.value = a;
3200
+ }), () => jt("div", r.value);
3201
+ }
3202
+ }), Vl = ["onClick"], Cl = { key: 1 }, Ol = /* @__PURE__ */ U({
3203
+ __name: "aeria-crud-topbar",
3204
+ props: {
3205
+ collection: {}
3206
+ },
3207
+ setup(d) {
3208
+ const r = d, t = Ie().currentRoute, l = Q(() => {
3209
+ try {
3210
+ const s = r.collection ? r.collection : t.value.meta.collection || t.value.params.collection;
3211
+ return ge(s);
3212
+ } catch {
3213
+ return null;
3214
+ }
3215
+ });
3216
+ return (s, u) => l.value && l.value.description.filtersPresets ? (o(), g(gl, {
3217
+ key: 0,
3218
+ dropdown: "",
3219
+ query: "section"
3220
+ }, ce({ _: 2 }, [
3221
+ D(Object.entries(l.value.description.filtersPresets), ([v, c]) => ({
3222
+ name: v,
3223
+ fn: f(() => [
3224
+ V("div", {
3225
+ class: "topbar__preset",
3226
+ onClick: (h) => e(Vt)(c, l.value)
3227
+ }, [
3228
+ c.icon ? (o(), g(Z, {
3229
+ key: 0,
3230
+ icon: c.icon
3231
+ }, {
3232
+ default: f(() => [
3233
+ W(k(c.label || e(M)(v, { plural: !0 })), 1)
3234
+ ]),
3235
+ _: 2
3236
+ }, 1032, ["icon"])) : (o(), i("div", Cl, k(c.label || e(M)(v, { plural: !0 })), 1)),
3237
+ c.badgeFunction ? (o(), g(be, { key: 2 }, {
3238
+ default: f(() => [
3239
+ z(e(kl), {
3240
+ "initial-value": "0",
3241
+ promise: l.value.$functions[c.badgeFunction]({ filters: c.filters })
3242
+ }, null, 8, ["promise"])
3243
+ ]),
3244
+ _: 2
3245
+ }, 1024)) : y("", !0)
3246
+ ], 8, Vl)
3247
+ ])
3248
+ }))
3249
+ ]), 1024)) : y("", !0);
3250
+ }
3251
+ });
3252
+ const Il = /* @__PURE__ */ X(Ol, [["__scopeId", "data-v-326eee9d"]]), Al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3253
+ __proto__: null,
3254
+ default: Il
3255
+ }, Symbol.toStringTag, { value: "Module" })), ql = /* @__PURE__ */ U({
3256
+ __name: "aeria-password-form",
3257
+ props: {
3258
+ modelValue: {}
3259
+ },
3260
+ emits: ["update:modelValue"],
3261
+ setup(d) {
3262
+ const r = d;
3263
+ ye(He, null);
3264
+ const a = Dt(), t = Q(() => a(
3265
+ r.modelValue.password,
3266
+ r.modelValue.confirmation
3267
+ ));
3268
+ return (l, s) => (o(), g(Ge, {
3269
+ form: {
3270
+ password: {
3271
+ type: "string",
3272
+ icon: "key",
3273
+ inputType: "password"
3274
+ },
3275
+ confirmation: {
3276
+ type: "string",
3277
+ icon: "key",
3278
+ inputType: "password"
3279
+ }
3280
+ },
3281
+ "model-value": l.modelValue,
3282
+ "onUpdate:modelValue": s[0] || (s[0] = (u) => l.$emit("update:modelValue", u))
3283
+ }, {
3284
+ after: f(() => [
3285
+ V("div", null, k(t.value || "Senhas conferem"), 1),
3286
+ I(l.$slots, "default", pe(Ve({ passwordError: t.value })))
3287
+ ]),
3288
+ _: 3
3289
+ }, 8, ["model-value"]));
3290
+ }
3291
+ }), Ul = (d, r = []) => ({
3292
+ path: "/user",
3293
+ name: "/builtin:user",
3294
+ component: d,
3295
+ children: r.concat([
3296
+ {
3297
+ path: "invite/:id",
3298
+ name: "/user/invite/:id",
3299
+ redirect: (a) => ({
3300
+ path: "/user/signup",
3301
+ params: {
3302
+ inviteId: a.params.id
3303
+ }
3304
+ })
3305
+ },
3306
+ {
3307
+ path: "signin",
3308
+ name: "/user/signin",
3309
+ component: () => import("./signin-8a9e7c03.js"),
3310
+ meta: {
3311
+ title: "Autenticação"
3312
+ }
3313
+ },
3314
+ {
3315
+ path: "signup",
3316
+ name: "/user/signup",
3317
+ component: () => import("./signup-4f18d92f.js"),
3318
+ meta: {
3319
+ title: "Registro"
3320
+ }
3321
+ },
3322
+ {
3323
+ path: "activation",
3324
+ name: "/user/activation",
3325
+ component: () => import("./activation-30f72a30.js"),
3326
+ meta: {
3327
+ title: "Ativação"
3328
+ }
3329
+ }
3330
+ ])
3331
+ }), El = (d, r = []) => ({
3332
+ path: "/dashboard",
3333
+ name: "/builtin:dashboard",
3334
+ component: d,
3335
+ redirect: {
3336
+ name: "/dashboard/"
3337
+ },
3338
+ meta: {
3339
+ title: "Dashboard"
3340
+ },
3341
+ children: r.concat([
3342
+ {
3343
+ path: "c/:collection",
3344
+ name: "/dashboard/crud",
3345
+ props: !0,
3346
+ components: {
3347
+ default: () => import("./index-8fb4713f.js"),
3348
+ topbar: () => Promise.resolve().then(() => Al)
3349
+ },
3350
+ meta: {
3351
+ title: "%viewTitle%"
3352
+ }
3353
+ },
3354
+ {
3355
+ path: "c/:collection/:id/:section?",
3356
+ name: "/dashboard/crud/:id",
3357
+ props: !0,
3358
+ components: {
3359
+ default: () => import("./_id_-94ab6f53.js")
3360
+ },
3361
+ meta: {
3362
+ title: "%viewTitle%"
3363
+ }
3364
+ },
3365
+ {
3366
+ path: "user",
3367
+ name: "/dashboard/user",
3368
+ meta: {
3369
+ title: "user",
3370
+ icon: "users",
3371
+ collection: "user"
3372
+ },
3373
+ redirect: "/dashboard/c/user",
3374
+ children: [
3375
+ {
3376
+ path: "profile",
3377
+ component: () => import("./index-f523d5d9.js"),
3378
+ meta: {
3379
+ title: "Meu perfil",
3380
+ icon: "user-square"
3381
+ }
3382
+ },
3383
+ {
3384
+ path: "changepass",
3385
+ name: "/dashboard/user/changepass",
3386
+ component: () => import("./index-dd5f2d02.js"),
3387
+ meta: {
3388
+ title: "Mudar senha",
3389
+ icon: "lock"
3390
+ }
3391
+ }
3392
+ ]
3393
+ }
3394
+ ])
3395
+ });
3396
+ export {
3397
+ Ge as A,
3398
+ kl as B,
3399
+ nl as C,
3400
+ sl as D,
3401
+ Il as E,
3402
+ Ul as F,
3403
+ El as G,
3404
+ ql as _,
3405
+ re as a,
3406
+ Z as b,
3407
+ Gn as c,
3408
+ zl as d,
3409
+ oa as e,
3410
+ Ue as f,
3411
+ Fl as g,
3412
+ Ae as h,
3413
+ X as i,
3414
+ Rl as j,
3415
+ be as k,
3416
+ fe as l,
3417
+ _n as m,
3418
+ Ce as n,
3419
+ Ea as o,
3420
+ bn as p,
3421
+ Ml as q,
3422
+ Fn as r,
3423
+ Fa as s,
3424
+ gl as t,
3425
+ bo as u,
3426
+ Oe as v,
3427
+ Xn as w,
3428
+ Fo as x,
3429
+ Qe as y,
3430
+ eo as z
3431
+ };