mgv-backoffice 1.45.0 → 1.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-lib.js CHANGED
@@ -3289,7 +3289,76 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3289
3289
  }, P(e.label), 9, ba)
3290
3290
  ], 8, va))), 128))], 8, _a));
3291
3291
  }
3292
- }), Sa = /* @__PURE__ */ m({
3292
+ }), Sa = { class: "flex items-center gap-2 border-b border-slate-200 dark:border-slate-700 pb-2" }, Ca = ["checked", "aria-label"], wa = { class: "text-sm font-medium text-slate-700 dark:text-slate-200" }, Ta = { class: "flex items-center gap-2 pb-1.5" }, Ea = [
3293
+ "checked",
3294
+ "aria-label",
3295
+ "onChange"
3296
+ ], Da = { class: "text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400" }, Oa = { class: "grid grid-cols-[repeat(2,minmax(0,1fr))] sm:grid-cols-[repeat(3,minmax(0,1fr))] gap-x-3 gap-y-1.5" }, ka = [
3297
+ "checked",
3298
+ "aria-label",
3299
+ "onChange"
3300
+ ], Aa = /* @__PURE__ */ m({
3301
+ __name: "BaseGroupedChecklist",
3302
+ props: {
3303
+ groups: {},
3304
+ modelValue: {},
3305
+ allLabel: { default: "Select all" },
3306
+ allAriaLabel: { default: "Select all items" },
3307
+ itemAriaLabel: {
3308
+ type: Function,
3309
+ default: void 0
3310
+ },
3311
+ mono: {
3312
+ type: Boolean,
3313
+ default: !1
3314
+ },
3315
+ maxHeightClass: { default: "max-h-72" }
3316
+ },
3317
+ emits: ["update:modelValue"],
3318
+ setup(t, { emit: n }) {
3319
+ let r = t, i = n, o = a(() => r.groups.filter((e) => e.items.length > 0)), s = a(() => o.value.flatMap((e) => e.items)), u = a(() => new Set(r.modelValue)), d = a(() => s.value.length > 0 && s.value.every((e) => u.value.has(e)));
3320
+ function f(e) {
3321
+ return e.items.every((e) => u.value.has(e));
3322
+ }
3323
+ function p(e) {
3324
+ i("update:modelValue", s.value.filter((t) => e.has(t)));
3325
+ }
3326
+ function m() {
3327
+ p(d.value ? /* @__PURE__ */ new Set() : new Set(s.value));
3328
+ }
3329
+ function h(e) {
3330
+ let t = new Set(u.value), n = !f(e);
3331
+ for (let r of e.items) n ? t.add(r) : t.delete(r);
3332
+ p(t);
3333
+ }
3334
+ function g(e) {
3335
+ let t = new Set(u.value);
3336
+ t.has(e) ? t.delete(e) : t.add(e), p(t);
3337
+ }
3338
+ return (n, r) => (D(), c("div", null, [l("label", Sa, [l("input", {
3339
+ type: "checkbox",
3340
+ class: "h-4 w-4",
3341
+ checked: d.value,
3342
+ "aria-label": t.allAriaLabel,
3343
+ onChange: m
3344
+ }, null, 40, Ca), l("span", wa, P(t.allLabel) + " (" + P(s.value.length) + ") ", 1)]), l("div", { class: b(["overflow-y-auto space-y-3 mt-3", t.maxHeightClass]) }, [(D(!0), c(e, null, A(o.value, (n) => (D(), c("div", { key: n.key }, [l("label", Ta, [l("input", {
3345
+ type: "checkbox",
3346
+ class: "h-4 w-4",
3347
+ checked: f(n),
3348
+ "aria-label": `${t.allLabel} ${n.label}`,
3349
+ onChange: (e) => h(n)
3350
+ }, null, 40, Ea), l("span", Da, P(n.label) + " (" + P(n.items.length) + ") ", 1)]), l("div", Oa, [(D(!0), c(e, null, A(n.items, (e) => (D(), c("label", {
3351
+ key: e,
3352
+ class: "flex items-center gap-2"
3353
+ }, [l("input", {
3354
+ type: "checkbox",
3355
+ class: "h-4 w-4",
3356
+ checked: u.value.has(e),
3357
+ "aria-label": t.itemAriaLabel ? t.itemAriaLabel(e) : e,
3358
+ onChange: (t) => g(e)
3359
+ }, null, 40, ka), l("span", { class: b(["text-sm text-slate-700 dark:text-slate-200", { "font-mono": t.mono }]) }, P(e), 3)]))), 128))])]))), 128))], 2)]));
3360
+ }
3361
+ }), ja = /* @__PURE__ */ m({
3293
3362
  __name: "BaseDateTimePicker",
3294
3363
  props: {
3295
3364
  modelValue: { default: null },
@@ -3342,28 +3411,28 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3342
3411
  "teleport"
3343
3412
  ]));
3344
3413
  }
3345
- }), Ca = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, wa = { class: "truncate" }, Ta = [
3414
+ }), Ma = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, Na = { class: "truncate" }, Pa = [
3346
3415
  "aria-label",
3347
3416
  "disabled",
3348
3417
  "onClick"
3349
- ], Ea = [
3418
+ ], Fa = [
3350
3419
  "disabled",
3351
3420
  "readonly",
3352
3421
  "aria-label",
3353
3422
  "aria-expanded",
3354
3423
  "aria-activedescendant",
3355
3424
  "placeholder"
3356
- ], Da = ["aria-multiselectable"], Oa = [
3425
+ ], Ia = ["aria-multiselectable"], La = [
3357
3426
  "id",
3358
3427
  "aria-selected",
3359
3428
  "aria-disabled",
3360
3429
  "title",
3361
3430
  "onMouseenter",
3362
3431
  "onClick"
3363
- ], ka = { class: "truncate" }, Aa = {
3432
+ ], Ra = { class: "truncate" }, za = {
3364
3433
  key: 0,
3365
3434
  class: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400"
3366
- }, ja = /* @__PURE__ */ m({
3435
+ }, Ba = /* @__PURE__ */ m({
3367
3436
  __name: "BaseSearchSelect",
3368
3437
  props: {
3369
3438
  options: {},
@@ -3472,10 +3541,10 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3472
3541
  class: b(["flex min-h-[38px] items-center gap-1.5 rounded-lg border bg-white px-3 py-1.5 text-sm transition-colors dark:bg-slate-900", [f.value ? "border-emerald-500 ring-2 ring-emerald-500/30" : "border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:border-slate-500", t.disabled ? "cursor-not-allowed opacity-60" : "cursor-text"]]),
3473
3542
  onMousedown: N
3474
3543
  }, [
3475
- l("div", Ca, [(D(!0), c(e, null, A(v.value, (e) => R((D(), c("span", {
3544
+ l("div", Ma, [(D(!0), c(e, null, A(v.value, (e) => R((D(), c("span", {
3476
3545
  key: String(e.value),
3477
3546
  class: "inline-flex max-w-full items-center gap-1 rounded-md bg-emerald-50 py-0.5 pl-2 pr-1 text-xs font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300"
3478
- }, [l("span", wa, P(e.label), 1), l("button", {
3547
+ }, [l("span", Na, P(e.label), 1), l("button", {
3479
3548
  type: "button",
3480
3549
  class: "rounded p-0.5 hover:bg-emerald-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:bg-emerald-500/25",
3481
3550
  "aria-label": `Remove ${e.label}`,
@@ -3485,7 +3554,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3485
3554
  }, [p(F(Ae), {
3486
3555
  class: "h-3 w-3",
3487
3556
  "aria-hidden": "true"
3488
- })], 40, Ta)])), [[oe, t.multiple]])), 128)), R(l("input", {
3557
+ })], 40, Pa)])), [[oe, t.multiple]])), 128)), R(l("input", {
3489
3558
  ref_key: "inputEl",
3490
3559
  ref: d,
3491
3560
  "onUpdate:modelValue": r[1] ||= (e) => m.value = e,
@@ -3504,7 +3573,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3504
3573
  onFocus: j,
3505
3574
  onInput: j,
3506
3575
  onKeydown: se
3507
- }, null, 42, Ea), [[ae, m.value]])]),
3576
+ }, null, 42, Fa), [[ae, m.value]])]),
3508
3577
  t.clearable && x.value && !t.disabled ? (D(), c("button", {
3509
3578
  key: 0,
3510
3579
  type: "button",
@@ -3537,28 +3606,28 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3537
3606
  onMousedown: r[3] ||= z(() => {}, ["prevent"]),
3538
3607
  onMouseenter: (e) => h.value = t,
3539
3608
  onClick: (t) => ne(e)
3540
- }, [l("span", ka, P(e.label), 1), O(e) ? (D(), o(F(me), {
3609
+ }, [l("span", Ra, P(e.label), 1), O(e) ? (D(), o(F(me), {
3541
3610
  key: 0,
3542
3611
  class: "h-4 w-4 shrink-0",
3543
3612
  "aria-hidden": "true"
3544
- })) : s("", !0)], 42, Oa))), 128)), E.value.length === 0 ? (D(), c("li", Aa, P(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : s("", !0)], 8, Da)) : s("", !0)], 2));
3613
+ })) : s("", !0)], 42, La))), 128)), E.value.length === 0 ? (D(), c("li", za, P(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : s("", !0)], 8, Ia)) : s("", !0)], 2));
3545
3614
  }
3546
- }), Ma = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, Na = {
3615
+ }), Va = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, Ha = {
3547
3616
  key: 0,
3548
3617
  class: "flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-700"
3549
- }, Pa = { class: "min-w-0" }, Fa = {
3618
+ }, Ua = { class: "min-w-0" }, Wa = {
3550
3619
  key: 0,
3551
3620
  class: "text-base font-semibold text-slate-900 dark:text-slate-100"
3552
- }, Ia = {
3621
+ }, Ga = {
3553
3622
  key: 1,
3554
3623
  class: "text-sm text-slate-500 dark:text-slate-400"
3555
- }, La = {
3624
+ }, Ka = {
3556
3625
  key: 0,
3557
3626
  class: "flex items-center gap-2"
3558
- }, Ra = {
3627
+ }, qa = {
3559
3628
  key: 1,
3560
3629
  class: "flex flex-wrap items-center justify-end gap-2 border-t border-slate-200 px-5 py-3 dark:border-slate-700"
3561
- }, za = /* @__PURE__ */ m({
3630
+ }, Ja = /* @__PURE__ */ m({
3562
3631
  __name: "BaseCard",
3563
3632
  props: {
3564
3633
  title: { default: "" },
@@ -3566,24 +3635,24 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3566
3635
  padding: { default: "md" }
3567
3636
  },
3568
3637
  setup(e) {
3569
- return (t, n) => (D(), c("section", Ma, [
3570
- e.title || e.subtitle || t.$slots.actions ? (D(), c("header", Na, [l("div", Pa, [e.title ? (D(), c("h2", Fa, P(e.title), 1)) : s("", !0), e.subtitle ? (D(), c("p", Ia, P(e.subtitle), 1)) : s("", !0)]), t.$slots.actions ? (D(), c("div", La, [j(t.$slots, "actions")])) : s("", !0)])) : s("", !0),
3638
+ return (t, n) => (D(), c("section", Va, [
3639
+ e.title || e.subtitle || t.$slots.actions ? (D(), c("header", Ha, [l("div", Ua, [e.title ? (D(), c("h2", Wa, P(e.title), 1)) : s("", !0), e.subtitle ? (D(), c("p", Ga, P(e.subtitle), 1)) : s("", !0)]), t.$slots.actions ? (D(), c("div", Ka, [j(t.$slots, "actions")])) : s("", !0)])) : s("", !0),
3571
3640
  l("div", { class: b(e.padding === "sm" ? "p-4" : e.padding === "none" ? "" : "p-5") }, [j(t.$slots, "default")], 2),
3572
- t.$slots.footer ? (D(), c("footer", Ra, [j(t.$slots, "footer")])) : s("", !0)
3641
+ t.$slots.footer ? (D(), c("footer", qa, [j(t.$slots, "footer")])) : s("", !0)
3573
3642
  ]));
3574
3643
  }
3575
- }), Ba = ["for"], Va = {
3644
+ }), Ya = ["for"], Xa = {
3576
3645
  key: 0,
3577
3646
  class: "ml-0.5 text-red-500",
3578
3647
  "aria-hidden": "true"
3579
- }, Ha = {
3648
+ }, Za = {
3580
3649
  key: 1,
3581
3650
  class: "mt-1 text-xs font-medium text-red-600 dark:text-red-400",
3582
3651
  role: "alert"
3583
- }, Ua = {
3652
+ }, Qa = {
3584
3653
  key: 2,
3585
3654
  class: "mt-1 text-xs text-slate-500 dark:text-slate-400"
3586
- }, Wa = /* @__PURE__ */ m({
3655
+ }, $a = /* @__PURE__ */ m({
3587
3656
  __name: "BaseField",
3588
3657
  props: {
3589
3658
  label: { default: "" },
@@ -3609,12 +3678,12 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3609
3678
  key: 0,
3610
3679
  for: e.labelFor || void 0,
3611
3680
  class: b(["mb-1 block", e.compact ? "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" : "text-sm font-medium text-slate-700 dark:text-slate-200"])
3612
- }, [f(P(e.label), 1), e.required ? (D(), c("span", Va, "*")) : s("", !0)], 10, Ba)) : s("", !0),
3681
+ }, [f(P(e.label), 1), e.required ? (D(), c("span", Xa, "*")) : s("", !0)], 10, Ya)) : s("", !0),
3613
3682
  j(t.$slots, "default"),
3614
- e.error ? (D(), c("p", Ha, P(e.error), 1)) : e.hint ? (D(), c("p", Ua, P(e.hint), 1)) : s("", !0)
3683
+ e.error ? (D(), c("p", Za, P(e.error), 1)) : e.hint ? (D(), c("p", Qa, P(e.hint), 1)) : s("", !0)
3615
3684
  ], 2));
3616
3685
  }
3617
- }), Ga = { class: "flex items-start justify-between gap-3" }, Ka = { class: "min-w-0 text-left" }, qa = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, Ja = /* @__PURE__ */ m({
3686
+ }), eo = { class: "flex items-start justify-between gap-3" }, to = { class: "min-w-0 text-left" }, no = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, ro = /* @__PURE__ */ m({
3618
3687
  __name: "BaseStatCard",
3619
3688
  props: {
3620
3689
  title: {},
@@ -3662,8 +3731,8 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3662
3731
  }
3663
3732
  }, r = a(() => n[t.accent]);
3664
3733
  return (t, n) => (D(), o(N(e.to ? F(Me) : "div"), v(e.to ? { to: e.to } : {}, { class: ["relative block rounded-xl border-2 border-dashed bg-white p-5 transition-colors dark:bg-slate-800", [r.value.border, e.to ? "hover:bg-slate-50 dark:hover:bg-slate-700/60 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""]] }), {
3665
- default: L(() => [l("div", Ga, [l("div", Ka, [
3666
- l("p", qa, P(e.title), 1),
3734
+ default: L(() => [l("div", eo, [l("div", to, [
3735
+ l("p", no, P(e.title), 1),
3667
3736
  l("p", { class: b(["mt-1 truncate text-3xl font-bold", r.value.value]) }, P(e.value), 3),
3668
3737
  e.subtitle ? (D(), c("p", {
3669
3738
  key: 0,
@@ -3677,14 +3746,14 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3677
3746
  _: 3
3678
3747
  }, 16, ["class"]));
3679
3748
  }
3680
- }), Ya = [
3749
+ }), io = [
3681
3750
  "aria-checked",
3682
3751
  "aria-label",
3683
3752
  "disabled"
3684
- ], Xa = {
3753
+ ], ao = {
3685
3754
  key: 0,
3686
3755
  class: "text-sm font-medium text-slate-700 dark:text-slate-200"
3687
- }, Za = /* @__PURE__ */ m({
3756
+ }, oo = /* @__PURE__ */ m({
3688
3757
  __name: "BaseToggle",
3689
3758
  props: {
3690
3759
  modelValue: {
@@ -3724,12 +3793,12 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3724
3793
  }, [l("span", {
3725
3794
  class: b(["inline-block h-5 w-5 rounded-full bg-white shadow ring-1 ring-black/5 transition-transform", e.modelValue ? "translate-x-[22px]" : "translate-x-0.5"]),
3726
3795
  "aria-hidden": "true"
3727
- }, null, 2)], 10, Ya), e.label ? (D(), c("span", Xa, P(e.label), 1)) : s("", !0)], 2));
3796
+ }, null, 2)], 10, io), e.label ? (D(), c("span", ao, P(e.label), 1)) : s("", !0)], 2));
3728
3797
  }
3729
- }), Qa = ["checked", "disabled"], $a = {
3798
+ }), so = ["checked", "disabled"], co = {
3730
3799
  key: 0,
3731
3800
  class: "text-sm text-slate-700 dark:text-slate-200"
3732
- }, eo = /* @__PURE__ */ m({
3801
+ }, lo = /* @__PURE__ */ m({
3733
3802
  inheritAttrs: !1,
3734
3803
  __name: "BaseCheckbox",
3735
3804
  props: {
@@ -3756,15 +3825,15 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3756
3825
  disabled: e.disabled,
3757
3826
  class: "h-5 w-5 shrink-0 cursor-[inherit] rounded-md border-slate-300 bg-white text-emerald-600 accent-emerald-600 transition-colors focus:ring-2 focus:ring-emerald-500/40 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-900 dark:checked:bg-emerald-600",
3758
3827
  onChange: r
3759
- }), null, 16, Qa), e.label || t.$slots.default ? (D(), c("span", $a, [j(t.$slots, "default", {}, () => [f(P(e.label), 1)])])) : s("", !0)], 2));
3828
+ }), null, 16, so), e.label || t.$slots.default ? (D(), c("span", co, [j(t.$slots, "default", {}, () => [f(P(e.label), 1)])])) : s("", !0)], 2));
3760
3829
  }
3761
- }), to = { class: "flex flex-col gap-2 text-left" }, no = {
3830
+ }), uo = { class: "flex flex-col gap-2 text-left" }, fo = {
3762
3831
  class: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-sm font-semibold text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
3763
3832
  "aria-hidden": "true"
3764
- }, ro = { class: "min-w-0" }, io = { class: "block truncate text-sm font-medium text-slate-900 dark:text-slate-100" }, ao = {
3833
+ }, po = { class: "min-w-0" }, mo = { class: "block truncate text-sm font-medium text-slate-900 dark:text-slate-100" }, ho = {
3765
3834
  key: 0,
3766
3835
  class: "block truncate text-xs text-slate-500 dark:text-slate-400"
3767
- }, oo = /* @__PURE__ */ m({
3836
+ }, go = /* @__PURE__ */ m({
3768
3837
  __name: "BaseSidebarUser",
3769
3838
  props: {
3770
3839
  name: {},
@@ -3780,11 +3849,11 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3780
3849
  emits: ["logout"],
3781
3850
  setup(e, { emit: t }) {
3782
3851
  let n = e, r = t, i = a(() => (n.name || "?").split(/[\s._-]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join(""));
3783
- return (t, n) => (D(), c("div", to, [(D(), o(N(e.to ? F(Me) : "div"), v(e.to ? { to: e.to } : {}, {
3852
+ return (t, n) => (D(), c("div", uo, [(D(), o(N(e.to ? F(Me) : "div"), v(e.to ? { to: e.to } : {}, {
3784
3853
  class: ["flex items-center gap-3 rounded-lg p-2 transition-colors", e.to ? "hover:bg-slate-100 dark:hover:bg-slate-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""],
3785
3854
  title: e.to ? e.profileLabel : void 0
3786
3855
  }), {
3787
- default: L(() => [l("span", no, P(i.value), 1), l("span", ro, [l("span", io, P(e.name), 1), e.email ? (D(), c("span", ao, P(e.email), 1)) : s("", !0)])]),
3856
+ default: L(() => [l("span", fo, P(i.value), 1), l("span", po, [l("span", mo, P(e.name), 1), e.email ? (D(), c("span", ho, P(e.email), 1)) : s("", !0)])]),
3788
3857
  _: 1
3789
3858
  }, 16, ["class", "title"])), e.showLogout ? (D(), o(it, {
3790
3859
  key: 0,
@@ -3807,16 +3876,16 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3807
3876
  "size"
3808
3877
  ])) : s("", !0)]));
3809
3878
  }
3810
- }), so = { class: "flex min-h-screen w-full flex-col items-center justify-center bg-slate-50 px-4 py-10 dark:bg-slate-950" }, co = { class: "mb-6 flex justify-center" }, lo = {
3879
+ }), _o = { class: "flex min-h-screen w-full flex-col items-center justify-center bg-slate-50 px-4 py-10 dark:bg-slate-950" }, vo = { class: "mb-6 flex justify-center" }, yo = {
3811
3880
  key: 0,
3812
3881
  class: "mb-1 text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-100"
3813
- }, uo = {
3882
+ }, bo = {
3814
3883
  key: 1,
3815
3884
  class: "text-sm text-slate-500 dark:text-slate-400"
3816
- }, fo = {
3885
+ }, xo = {
3817
3886
  key: 2,
3818
3887
  class: "mt-6 border-t border-slate-200 pt-4 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400"
3819
- }, po = /* @__PURE__ */ m({
3888
+ }, So = /* @__PURE__ */ m({
3820
3889
  __name: "BaseAuthLayout",
3821
3890
  props: {
3822
3891
  title: { default: "" },
@@ -3827,17 +3896,17 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
3827
3896
  }
3828
3897
  },
3829
3898
  setup(e) {
3830
- return (t, n) => (D(), c("div", so, [l("div", co, [j(t.$slots, "logo", {}, () => [p(Nt, { size: F(q).MEDIUM }, null, 8, ["size"])])]), l("div", { class: b(["w-full rounded-xl border border-slate-200 bg-white p-6 text-left shadow-sm sm:p-8 dark:border-slate-700 dark:bg-slate-900", e.wide ? "max-w-3xl" : "max-w-md"]) }, [
3831
- e.title ? (D(), c("h1", lo, P(e.title), 1)) : s("", !0),
3832
- e.subtitle ? (D(), c("p", uo, P(e.subtitle), 1)) : s("", !0),
3899
+ return (t, n) => (D(), c("div", _o, [l("div", vo, [j(t.$slots, "logo", {}, () => [p(Nt, { size: F(q).MEDIUM }, null, 8, ["size"])])]), l("div", { class: b(["w-full rounded-xl border border-slate-200 bg-white p-6 text-left shadow-sm sm:p-8 dark:border-slate-700 dark:bg-slate-900", e.wide ? "max-w-3xl" : "max-w-md"]) }, [
3900
+ e.title ? (D(), c("h1", yo, P(e.title), 1)) : s("", !0),
3901
+ e.subtitle ? (D(), c("p", bo, P(e.subtitle), 1)) : s("", !0),
3833
3902
  l("div", { class: b(e.title || e.subtitle ? "mt-6" : "") }, [j(t.$slots, "default")], 2),
3834
- t.$slots.footer ? (D(), c("div", fo, [j(t.$slots, "footer")])) : s("", !0)
3903
+ t.$slots.footer ? (D(), c("div", xo, [j(t.$slots, "footer")])) : s("", !0)
3835
3904
  ], 2)]));
3836
3905
  }
3837
3906
  });
3838
3907
  //#endregion
3839
3908
  //#region node_modules/@heroicons/vue/20/solid/esm/CheckCircleIcon.js
3840
- function mo(e, t) {
3909
+ function Co(e, t) {
3841
3910
  return D(), c("svg", {
3842
3911
  xmlns: "http://www.w3.org/2000/svg",
3843
3912
  viewBox: "0 0 20 20",
@@ -3852,7 +3921,7 @@ function mo(e, t) {
3852
3921
  }
3853
3922
  //#endregion
3854
3923
  //#region node_modules/@heroicons/vue/20/solid/esm/XCircleIcon.js
3855
- function ho(e, t) {
3924
+ function wo(e, t) {
3856
3925
  return D(), c("svg", {
3857
3926
  xmlns: "http://www.w3.org/2000/svg",
3858
3927
  viewBox: "0 0 20 20",
@@ -3867,7 +3936,7 @@ function ho(e, t) {
3867
3936
  }
3868
3937
  //#endregion
3869
3938
  //#region src/components/BaseBooleanBadge.vue
3870
- var go = /* @__PURE__ */ m({
3939
+ var To = /* @__PURE__ */ m({
3871
3940
  __name: "BaseBooleanBadge",
3872
3941
  props: {
3873
3942
  value: {
@@ -3878,20 +3947,20 @@ var go = /* @__PURE__ */ m({
3878
3947
  falseLabel: { default: "No" }
3879
3948
  },
3880
3949
  setup(e) {
3881
- return (t, n) => (D(), c("span", { class: b(["inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset", e.value ? "bg-emerald-50 text-emerald-700 ring-emerald-600/20 dark:bg-emerald-500/10 dark:text-emerald-300 dark:ring-emerald-400/30" : "bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-500/10 dark:text-red-300 dark:ring-red-400/30"]) }, [e.value ? (D(), o(F(mo), {
3950
+ return (t, n) => (D(), c("span", { class: b(["inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset", e.value ? "bg-emerald-50 text-emerald-700 ring-emerald-600/20 dark:bg-emerald-500/10 dark:text-emerald-300 dark:ring-emerald-400/30" : "bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-500/10 dark:text-red-300 dark:ring-red-400/30"]) }, [e.value ? (D(), o(F(Co), {
3882
3951
  key: 0,
3883
3952
  class: "h-3.5 w-3.5",
3884
3953
  "aria-hidden": "true"
3885
- })) : (D(), o(F(ho), {
3954
+ })) : (D(), o(F(wo), {
3886
3955
  key: 1,
3887
3956
  class: "h-3.5 w-3.5",
3888
3957
  "aria-hidden": "true"
3889
3958
  })), f(" " + P(e.value ? e.trueLabel : e.falseLabel), 1)], 2));
3890
3959
  }
3891
- }), _o = { class: "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" }, vo = ["href"], yo = {
3960
+ }), Eo = { class: "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" }, Do = ["href"], Oo = {
3892
3961
  key: 1,
3893
3962
  class: "text-slate-400 dark:text-slate-500"
3894
- }, bo = /* @__PURE__ */ m({
3963
+ }, ko = /* @__PURE__ */ m({
3895
3964
  __name: "BaseDetailList",
3896
3965
  props: {
3897
3966
  items: {},
@@ -3905,18 +3974,18 @@ var go = /* @__PURE__ */ m({
3905
3974
  return (r, i) => (D(), c("dl", { class: b(["grid grid-cols-[minmax(0,1fr)] gap-x-6 gap-y-4 text-left", t.columns === 2 ? "sm:grid-cols-[repeat(2,minmax(0,1fr))]" : t.columns === 3 ? "sm:grid-cols-[repeat(2,minmax(0,1fr))] lg:grid-cols-[repeat(3,minmax(0,1fr))]" : ""]) }, [(D(!0), c(e, null, A(t.items, (r) => (D(), c("div", {
3906
3975
  key: r.label,
3907
3976
  class: "min-w-0"
3908
- }, [l("dt", _o, P(r.label), 1), l("dd", { class: b(["mt-1 break-words text-sm text-slate-900 dark:text-slate-100", r.mono ? "font-mono" : ""]) }, [r.href && !n(r.value) ? (D(), c("a", {
3977
+ }, [l("dt", Eo, P(r.label), 1), l("dd", { class: b(["mt-1 break-words text-sm text-slate-900 dark:text-slate-100", r.mono ? "font-mono" : ""]) }, [r.href && !n(r.value) ? (D(), c("a", {
3909
3978
  key: 0,
3910
3979
  href: r.href,
3911
3980
  target: "_blank",
3912
3981
  rel: "noopener noreferrer",
3913
3982
  class: "text-emerald-600 hover:underline dark:text-emerald-400"
3914
- }, P(r.value), 9, vo)) : n(r.value) ? (D(), c("span", yo, P(t.emptyText), 1)) : (D(), c(e, { key: 2 }, [f(P(r.value), 1)], 64))], 2)]))), 128))], 2));
3983
+ }, P(r.value), 9, Do)) : n(r.value) ? (D(), c("span", Oo, P(t.emptyText), 1)) : (D(), c(e, { key: 2 }, [f(P(r.value), 1)], 64))], 2)]))), 128))], 2));
3915
3984
  }
3916
3985
  });
3917
3986
  //#endregion
3918
3987
  //#region src/composables/useDebounce.ts
3919
- function xo(e, t = 300) {
3988
+ function Ao(e, t = 300) {
3920
3989
  let n = k(e.value), r = null;
3921
3990
  return I(e, (e) => {
3922
3991
  r && clearTimeout(r), r = setTimeout(() => {
@@ -3928,7 +3997,7 @@ function xo(e, t = 300) {
3928
3997
  }
3929
3998
  //#endregion
3930
3999
  //#region src/composables/useToast.ts
3931
- function So(e = 3e3) {
4000
+ function jo(e = 3e3) {
3932
4001
  let t = k(!1), n = k(""), r = k(J.SUCCESS), i = null;
3933
4002
  function a() {
3934
4003
  i &&= (clearTimeout(i), null);
@@ -3949,7 +4018,7 @@ function So(e = 3e3) {
3949
4018
  }
3950
4019
  //#endregion
3951
4020
  //#region src/composables/useQueryParamSync.ts
3952
- function Co() {
4021
+ function Mo() {
3953
4022
  let e = Ne(), t = Pe();
3954
4023
  function n(t) {
3955
4024
  let n = e.query[t];
@@ -3971,7 +4040,7 @@ function Co() {
3971
4040
  }
3972
4041
  //#endregion
3973
4042
  //#region src/composables/useFieldClasses.ts
3974
- function wo() {
4043
+ function No() {
3975
4044
  let { isDark: e } = U(), t = a(() => e.value ? "text-gray-300" : "text-gray-600"), n = a(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
3976
4045
  function r(t) {
3977
4046
  return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
@@ -3984,7 +4053,7 @@ function wo() {
3984
4053
  }
3985
4054
  //#endregion
3986
4055
  //#region src/composables/usePolling.ts
3987
- function To(e, t, n = {}) {
4056
+ function Po(e, t, n = {}) {
3988
4057
  let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = k(!1), s = !1;
3989
4058
  function c() {
3990
4059
  a === null && t !== null && (a = setInterval(() => void e(), t));
@@ -4019,7 +4088,7 @@ function To(e, t, n = {}) {
4019
4088
  }
4020
4089
  //#endregion
4021
4090
  //#region src/composables/useLatestRequest.ts
4022
- function Eo() {
4091
+ function Fo() {
4023
4092
  let e = 0, t = null;
4024
4093
  function n() {
4025
4094
  let n = ++e;
@@ -4038,17 +4107,39 @@ function Eo() {
4038
4107
  cancel: r
4039
4108
  };
4040
4109
  }
4041
- function Do(e) {
4110
+ function Io(e) {
4042
4111
  return typeof DOMException < "u" && e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError";
4043
4112
  }
4044
4113
  //#endregion
4114
+ //#region src/composables/useDirtyState.ts
4115
+ function Lo(e) {
4116
+ return JSON.stringify(e, (e, t) => {
4117
+ if (typeof t == "object" && t && !Array.isArray(t)) {
4118
+ let e = {};
4119
+ for (let n of Object.keys(t).sort()) e[n] = t[n];
4120
+ return e;
4121
+ }
4122
+ return t;
4123
+ });
4124
+ }
4125
+ function Ro(e) {
4126
+ let t = k(Lo(e())), n = a(() => Lo(e()) !== t.value);
4127
+ function r() {
4128
+ t.value = Lo(e());
4129
+ }
4130
+ return {
4131
+ dirty: n,
4132
+ markClean: r
4133
+ };
4134
+ }
4135
+ //#endregion
4045
4136
  //#region src/enums/BaseBadgeEnum.ts
4046
- var Oo = /* @__PURE__ */ function(e) {
4137
+ var zo = /* @__PURE__ */ function(e) {
4047
4138
  return e.WIN = "WIN", e.LOSE = "LOSE", e;
4048
4139
  }({});
4049
4140
  //#endregion
4050
4141
  //#region src/utils/util.ts
4051
- function ko(e) {
4142
+ function Bo(e) {
4052
4143
  let t = "red";
4053
4144
  switch (e) {
4054
4145
  case B.ERROR:
@@ -4064,7 +4155,7 @@ function ko(e) {
4064
4155
  }
4065
4156
  return t;
4066
4157
  }
4067
- function Ao(e) {
4158
+ function Vo(e) {
4068
4159
  let t = "red";
4069
4160
  switch (e) {
4070
4161
  case W.GREEN:
@@ -4091,14 +4182,14 @@ function Ao(e) {
4091
4182
  }
4092
4183
  //#endregion
4093
4184
  //#region src/utils/httpColors.ts
4094
- var jo = {
4185
+ var Ho = {
4095
4186
  GET: "bg-blue-600",
4096
4187
  POST: "bg-emerald-600",
4097
4188
  PUT: "bg-amber-600",
4098
4189
  DELETE: "bg-red-600",
4099
4190
  PATCH: "bg-purple-600",
4100
4191
  HEAD: "bg-gray-600"
4101
- }, Mo = {
4192
+ }, Uo = {
4102
4193
  GET: "bg-blue-500",
4103
4194
  POST: "bg-green-500",
4104
4195
  PUT: "bg-yellow-500",
@@ -4106,39 +4197,39 @@ var jo = {
4106
4197
  PATCH: "bg-purple-500",
4107
4198
  HEAD: "bg-gray-500"
4108
4199
  };
4109
- function No(e) {
4110
- return e ? jo[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
4200
+ function Wo(e) {
4201
+ return e ? Ho[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
4111
4202
  }
4112
- function Po(e) {
4113
- return e ? Mo[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
4203
+ function Go(e) {
4204
+ return e ? Uo[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
4114
4205
  }
4115
- function Fo(e) {
4206
+ function Ko(e) {
4116
4207
  let t = e ?? 0;
4117
4208
  return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
4118
4209
  }
4119
- function Io(e, t) {
4210
+ function qo(e, t) {
4120
4211
  let n = (e || "ANY").toUpperCase();
4121
4212
  return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
4122
4213
  }
4123
- function Lo(e, t) {
4214
+ function Jo(e, t) {
4124
4215
  let n = e ?? 200;
4125
4216
  return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
4126
4217
  }
4127
- function Ro(e, t) {
4218
+ function Yo(e, t) {
4128
4219
  let n = e ?? 200;
4129
4220
  return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
4130
4221
  }
4131
4222
  //#endregion
4132
4223
  //#region src/utils/kvRows.ts
4133
- function zo(e) {
4224
+ function Xo(e) {
4134
4225
  return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
4135
4226
  }
4136
- function Bo(e) {
4227
+ function Zo(e) {
4137
4228
  return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
4138
4229
  }
4139
4230
  //#endregion
4140
4231
  //#region src/utils/sanitizeHtml.ts
4141
- var Vo = /* @__PURE__ */ new Set([
4232
+ var Qo = /* @__PURE__ */ new Set([
4142
4233
  "A",
4143
4234
  "B",
4144
4235
  "STRONG",
@@ -4153,7 +4244,7 @@ var Vo = /* @__PURE__ */ new Set([
4153
4244
  "LI",
4154
4245
  "SPAN",
4155
4246
  "DIV"
4156
- ]), Ho = /* @__PURE__ */ new Set([
4247
+ ]), $o = /* @__PURE__ */ new Set([
4157
4248
  "SCRIPT",
4158
4249
  "STYLE",
4159
4250
  "IFRAME",
@@ -4161,40 +4252,40 @@ var Vo = /* @__PURE__ */ new Set([
4161
4252
  "EMBED",
4162
4253
  "NOSCRIPT",
4163
4254
  "TEMPLATE"
4164
- ]), Uo = { A: /* @__PURE__ */ new Set(["href", "title"]) };
4165
- function Wo(e) {
4255
+ ]), es = { A: /* @__PURE__ */ new Set(["href", "title"]) };
4256
+ function ts(e) {
4166
4257
  let t = e.trim().toLowerCase();
4167
4258
  return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
4168
4259
  }
4169
- function Go(e) {
4260
+ function ns(e) {
4170
4261
  if (e.nodeType !== Node.ELEMENT_NODE) return;
4171
4262
  let t = e, n = t.tagName.toUpperCase();
4172
- if (!Vo.has(n)) {
4173
- Ho.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
4263
+ if (!Qo.has(n)) {
4264
+ $o.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
4174
4265
  return;
4175
4266
  }
4176
- let r = Uo[n] ?? /* @__PURE__ */ new Set();
4267
+ let r = es[n] ?? /* @__PURE__ */ new Set();
4177
4268
  for (let e of Array.from(t.attributes)) {
4178
4269
  if (!r.has(e.name.toLowerCase())) {
4179
4270
  t.removeAttribute(e.name);
4180
4271
  continue;
4181
4272
  }
4182
- n === "A" && e.name.toLowerCase() === "href" && !Wo(e.value) && t.removeAttribute(e.name);
4273
+ n === "A" && e.name.toLowerCase() === "href" && !ts(e.value) && t.removeAttribute(e.name);
4183
4274
  }
4184
4275
  n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
4185
- for (let e of Array.from(t.childNodes)) Go(e);
4276
+ for (let e of Array.from(t.childNodes)) ns(e);
4186
4277
  }
4187
- function Ko(e) {
4278
+ function rs(e) {
4188
4279
  if (!e) return "";
4189
4280
  let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
4190
4281
  if (!t) return "";
4191
- for (let e of Array.from(t.childNodes)) Go(e);
4282
+ for (let e of Array.from(t.childNodes)) ns(e);
4192
4283
  return t.innerHTML;
4193
4284
  }
4194
4285
  //#endregion
4195
4286
  //#region src/utils/format.ts
4196
4287
  var $ = "—";
4197
- function qo(e, t = 4) {
4288
+ function is(e, t = 4) {
4198
4289
  if (e == null || typeof e == "string" && e.trim() === "") return $;
4199
4290
  let n = typeof e == "string" ? Number(e) : e;
4200
4291
  return isFinite(n) ? n.toLocaleString(void 0, {
@@ -4202,12 +4293,12 @@ function qo(e, t = 4) {
4202
4293
  maximumFractionDigits: t
4203
4294
  }) : $;
4204
4295
  }
4205
- function Jo(e) {
4296
+ function as(e) {
4206
4297
  if (e == null || e === "") return $;
4207
4298
  let t = new Date(e);
4208
4299
  return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
4209
4300
  }
4210
- function Yo(e) {
4301
+ function os(e) {
4211
4302
  return new Date(e).toLocaleString(void 0, {
4212
4303
  month: "short",
4213
4304
  day: "numeric",
@@ -4215,13 +4306,13 @@ function Yo(e) {
4215
4306
  minute: "2-digit"
4216
4307
  });
4217
4308
  }
4218
- function Xo(e) {
4309
+ function ss(e) {
4219
4310
  return new Date(e).toLocaleDateString(void 0, {
4220
4311
  month: "short",
4221
4312
  day: "numeric"
4222
4313
  });
4223
4314
  }
4224
- function Zo(e) {
4315
+ function cs(e) {
4225
4316
  try {
4226
4317
  return new Date(e).toLocaleString(void 0, {
4227
4318
  year: "numeric",
@@ -4237,7 +4328,7 @@ function Zo(e) {
4237
4328
  return String(e);
4238
4329
  }
4239
4330
  }
4240
- function Qo(e) {
4331
+ function ls(e) {
4241
4332
  if (!isFinite(e) || e === 0) return e.toFixed(2);
4242
4333
  let t = Math.abs(e), n = 2;
4243
4334
  return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
@@ -4245,13 +4336,13 @@ function Qo(e) {
4245
4336
  maximumFractionDigits: n
4246
4337
  });
4247
4338
  }
4248
- function $o(e, t = 2) {
4339
+ function us(e, t = 2) {
4249
4340
  return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
4250
4341
  }
4251
- function es(e) {
4342
+ function ds(e) {
4252
4343
  return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
4253
4344
  }
4254
- function ts(e, t = 2, n = "$") {
4345
+ function fs(e, t = 2, n = "$") {
4255
4346
  if (e == null || typeof e == "string" && e.trim() === "") return $;
4256
4347
  let r = typeof e == "string" ? Number(e) : e;
4257
4348
  if (!isFinite(r)) return $;
@@ -4261,7 +4352,7 @@ function ts(e, t = 2, n = "$") {
4261
4352
  });
4262
4353
  return `${r < 0 && Number(Math.abs(r).toFixed(t)) !== 0 ? "-" : ""}${n}${i}`;
4263
4354
  }
4264
- function ns(e) {
4355
+ function ps(e) {
4265
4356
  if (e == null || e === "") return $;
4266
4357
  let t = new Date(e);
4267
4358
  return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
@@ -4270,7 +4361,7 @@ function ns(e) {
4270
4361
  day: "numeric"
4271
4362
  });
4272
4363
  }
4273
- function rs(e) {
4364
+ function ms(e) {
4274
4365
  if (e == null || e === "") return $;
4275
4366
  let t = new Date(e);
4276
4367
  return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
@@ -4281,22 +4372,22 @@ function rs(e) {
4281
4372
  minute: "2-digit"
4282
4373
  });
4283
4374
  }
4284
- function is(e) {
4375
+ function hs(e) {
4285
4376
  if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
4286
4377
  let t = e / 1e3, n = t < 1 ? 3 : 2;
4287
4378
  return `= ${t.toFixed(n)} s`;
4288
4379
  }
4289
- function as(e) {
4380
+ function gs(e) {
4290
4381
  return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
4291
4382
  }
4292
- function os(e) {
4383
+ function _s(e) {
4293
4384
  try {
4294
4385
  return JSON.stringify(JSON.parse(e), null, 2);
4295
4386
  } catch {
4296
4387
  return e;
4297
4388
  }
4298
4389
  }
4299
- function ss(e) {
4390
+ function vs(e) {
4300
4391
  if (e == null) return "";
4301
4392
  if (typeof e == "string") return e;
4302
4393
  try {
@@ -4305,14 +4396,14 @@ function ss(e) {
4305
4396
  return String(e);
4306
4397
  }
4307
4398
  }
4308
- function cs(e, t = 2) {
4399
+ function ys(e, t = 2) {
4309
4400
  if (e == null || !isFinite(e)) return $;
4310
4401
  let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
4311
4402
  return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
4312
4403
  }
4313
4404
  //#endregion
4314
4405
  //#region src/utils/validate.ts
4315
- function ls(e) {
4406
+ function bs(e) {
4316
4407
  let t = (e ?? "").trim();
4317
4408
  if (!t) return !1;
4318
4409
  try {
@@ -4322,7 +4413,7 @@ function ls(e) {
4322
4413
  return !1;
4323
4414
  }
4324
4415
  }
4325
- function us(e) {
4416
+ function xs(e) {
4326
4417
  if (!e.trim()) return !0;
4327
4418
  try {
4328
4419
  return JSON.parse(e), !0;
@@ -4330,7 +4421,7 @@ function us(e) {
4330
4421
  return !1;
4331
4422
  }
4332
4423
  }
4333
- function ds(e) {
4424
+ function Ss(e) {
4334
4425
  if (!e.trim()) return !0;
4335
4426
  try {
4336
4427
  return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
@@ -4338,7 +4429,7 @@ function ds(e) {
4338
4429
  return !1;
4339
4430
  }
4340
4431
  }
4341
- function fs(e) {
4432
+ function Cs(e) {
4342
4433
  if (!e.trim()) return !0;
4343
4434
  let t = e.replace(/\s+/g, "");
4344
4435
  if (!t) return !0;
@@ -4351,7 +4442,7 @@ function fs(e) {
4351
4442
  }
4352
4443
  //#endregion
4353
4444
  //#region src/utils/specForm.ts
4354
- function ps(e, t) {
4445
+ function ws(e, t) {
4355
4446
  let n = {};
4356
4447
  if (!e) return n;
4357
4448
  for (let r of e) {
@@ -4360,7 +4451,7 @@ function ps(e, t) {
4360
4451
  }
4361
4452
  return n;
4362
4453
  }
4363
- function ms(e, t) {
4454
+ function Ts(e, t) {
4364
4455
  if (!e) return null;
4365
4456
  for (let n of e) if (n.type === "decimal" || n.type === "integer") {
4366
4457
  let e = t[n.key], r = e === "" || e == null;
@@ -4371,7 +4462,7 @@ function ms(e, t) {
4371
4462
  }
4372
4463
  //#endregion
4373
4464
  //#region src/utils/pnl.ts
4374
- function hs(e) {
4465
+ function Es(e) {
4375
4466
  if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
4376
4467
  pnlUsd: null,
4377
4468
  pnlPct: null
@@ -4386,4 +4477,4 @@ function hs(e) {
4386
4477
  };
4387
4478
  }
4388
4479
  //#endregion
4389
- export { B as AlertEnum, Or as BaseActionButton, Ve as BaseAlert, vr as BaseAppLayout, po as BaseAuthLayout, Ge as BaseBadge, Oo as BaseBadgeEnum, xa as BaseBarDistribution, go as BaseBooleanBadge, Ye as BaseBreadcrumb, it as BaseButton, G as BaseButtonEnum, K as BaseButtonSizeEnum, za as BaseCard, eo as BaseCheckbox, ti as BaseChipButton, li as BaseCodeBlock, Tn as BaseCollapsibleSection, kn as BaseConfirmModal, Ar as BaseCopyButton, oa as BaseCredentialsForm, Sa as BaseDateTimePicker, bo as BaseDetailList, vi as BaseDropdown, hr as BaseEntityPickerModal, Wa as BaseField, ci as BaseFileDropzone, Ui as BaseFilterChip, Pr as BaseGoogleSignInButton, di as BaseInput, lt as BaseLine, ut as BaseLoginEnum, Kr as BaseLoginForm, Nt as BaseLogo, q as BaseLogoEnum, Bt as BaseModal, Pt as BaseModalEnum, Sn as BaseModalShell, In as BaseNotFoundPage, $r as BaseNotificationPanel, Sr as BasePageHeader, ga as BasePillPickerModal, ni as BaseRemoveButton, Vt as BaseRow, ja as BaseSearchSelect, Si as BaseSegmentedControl, pi as BaseSelect, nr as BaseSidebar, oo as BaseSidebarUser, Ri as BaseSpecFields, Ht as BaseSpinner, Vi as BaseStatBreakdown, Ja as BaseStatCard, ai as BaseStatusPill, Ai as BaseTable, Nn as BaseTextInputModal, Gt as BaseToast, J as BaseToastEnum, Za as BaseToggle, Tr as BaseToolbarButton, qt as ColoredSquares, W as ColorsEnums, Xt as EarningsCard, tn as EuroAmount, at as LineEnum, sn as Pagination, Y as PositioningEnum, fn as TrendArrow, ps as buildSpecParams, hs as computePnL, ms as firstInvalidNumericSpec, as as fmtBytes, ns as fmtCalendarDate, rs as fmtCalendarDateTime, Jo as fmtDate, Xo as fmtDateShort, Yo as fmtDateTime, Zo as fmtDateTimeMs, cs as fmtDuration, ts as fmtMoney, is as fmtMsAsSeconds, qo as fmtNumber, $o as fmtPct, Qo as fmtPrice, es as fmtUsd, os as formatJson, ko as getBaseColor, Ao as getBaseColorOf, He as humanizeEnum, Ue as humanizeTextVNodes, Re as initTheme, Do as isAbortError, Wo as isSafeHref, ls as isValidAbsoluteUrl, fs as isValidBase64, us as isValidJson, ds as isValidXml, Po as methodBadgeBright, No as methodBadgeSolid, Io as methodBadgeTinted, Bo as rowKeyMissing, zo as rowValueMissing, Ko as sanitizeHtml, Lo as statusBadgeSoft, Fo as statusBadgeSolid, Ro as statusBadgeTinted, ss as stringifyValue, xo as useDebouncedRef, pn as useEscapeKey, wo as useFieldClasses, Eo as useLatestRequest, Rn as useMobileSidebar, Gn as useNotifications, To as usePolling, Co as useQueryParamSync, Hn as useSidebarCollapse, U as useTheme, X as useThemeClasses, So as useToast };
4480
+ export { B as AlertEnum, Or as BaseActionButton, Ve as BaseAlert, vr as BaseAppLayout, So as BaseAuthLayout, Ge as BaseBadge, zo as BaseBadgeEnum, xa as BaseBarDistribution, To as BaseBooleanBadge, Ye as BaseBreadcrumb, it as BaseButton, G as BaseButtonEnum, K as BaseButtonSizeEnum, Ja as BaseCard, lo as BaseCheckbox, ti as BaseChipButton, li as BaseCodeBlock, Tn as BaseCollapsibleSection, kn as BaseConfirmModal, Ar as BaseCopyButton, oa as BaseCredentialsForm, ja as BaseDateTimePicker, ko as BaseDetailList, vi as BaseDropdown, hr as BaseEntityPickerModal, $a as BaseField, ci as BaseFileDropzone, Ui as BaseFilterChip, Pr as BaseGoogleSignInButton, Aa as BaseGroupedChecklist, di as BaseInput, lt as BaseLine, ut as BaseLoginEnum, Kr as BaseLoginForm, Nt as BaseLogo, q as BaseLogoEnum, Bt as BaseModal, Pt as BaseModalEnum, Sn as BaseModalShell, In as BaseNotFoundPage, $r as BaseNotificationPanel, Sr as BasePageHeader, ga as BasePillPickerModal, ni as BaseRemoveButton, Vt as BaseRow, Ba as BaseSearchSelect, Si as BaseSegmentedControl, pi as BaseSelect, nr as BaseSidebar, go as BaseSidebarUser, Ri as BaseSpecFields, Ht as BaseSpinner, Vi as BaseStatBreakdown, ro as BaseStatCard, ai as BaseStatusPill, Ai as BaseTable, Nn as BaseTextInputModal, Gt as BaseToast, J as BaseToastEnum, oo as BaseToggle, Tr as BaseToolbarButton, qt as ColoredSquares, W as ColorsEnums, Xt as EarningsCard, tn as EuroAmount, at as LineEnum, sn as Pagination, Y as PositioningEnum, fn as TrendArrow, ws as buildSpecParams, Es as computePnL, Ts as firstInvalidNumericSpec, gs as fmtBytes, ps as fmtCalendarDate, ms as fmtCalendarDateTime, as as fmtDate, ss as fmtDateShort, os as fmtDateTime, cs as fmtDateTimeMs, ys as fmtDuration, fs as fmtMoney, hs as fmtMsAsSeconds, is as fmtNumber, us as fmtPct, ls as fmtPrice, ds as fmtUsd, _s as formatJson, Bo as getBaseColor, Vo as getBaseColorOf, He as humanizeEnum, Ue as humanizeTextVNodes, Re as initTheme, Io as isAbortError, ts as isSafeHref, bs as isValidAbsoluteUrl, Cs as isValidBase64, xs as isValidJson, Ss as isValidXml, Go as methodBadgeBright, Wo as methodBadgeSolid, qo as methodBadgeTinted, Zo as rowKeyMissing, Xo as rowValueMissing, rs as sanitizeHtml, Lo as stableStringify, Jo as statusBadgeSoft, Ko as statusBadgeSolid, Yo as statusBadgeTinted, vs as stringifyValue, Ao as useDebouncedRef, Ro as useDirtyState, pn as useEscapeKey, No as useFieldClasses, Fo as useLatestRequest, Rn as useMobileSidebar, Gn as useNotifications, Po as usePolling, Mo as useQueryParamSync, Hn as useSidebarCollapse, U as useTheme, X as useThemeClasses, jo as useToast };