@choubo/kerthus-web-admin-shell 0.2.0 → 0.3.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/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { inject as le, defineComponent as k, h as O, computed as I, reactive as oe, onUnmounted as Q, watch as U, openBlock as a, createBlock as P, unref as y, normalizeClass as N, withCtx as j, createElementBlock as o, Fragment as x, renderList as M, toDisplayString as d, createCommentVNode as p, ref as S, createElementVNode as s, createVNode as $, onMounted as Y, withKeys as J, createTextVNode as z, provide as ve, toRef as pe, renderSlot as B, Teleport as ge, withModifiers as H, withDirectives as K, vModelText as V, nextTick as se, normalizeStyle as ie, resolveDynamicComponent as he, createSlots as fe } from "vue";
2
- import { Menu as Z, Switch as ye, Select as ke, InputNumber as _e, Drawer as we } from "ant-design-vue";
3
- import { Icon as w, Dropdown as re } from "@choubo/kerthus-web-vue-ui";
4
- import { useFrontendRuntime as q } from "@choubo/kerthus-web-vue-runtime";
5
- const ne = {
1
+ import { inject as Ae, defineComponent as P, h as le, computed as E, reactive as Te, onUnmounted as ne, watch as Z, openBlock as t, createBlock as z, unref as f, normalizeClass as U, withCtx as re, createElementBlock as l, Fragment as F, renderList as K, toDisplayString as m, createCommentVNode as b, ref as M, createElementVNode as r, createVNode as x, onMounted as ie, withKeys as be, createTextVNode as Q, provide as Qe, toRef as Xe, renderSlot as T, Teleport as Pe, withModifiers as ee, withDirectives as Y, vModelText as J, nextTick as Be, normalizeStyle as he, createSlots as Ge, toRaw as Ye, resolveDynamicComponent as Je } from "vue";
2
+ import { Menu as we, Switch as Ze, Select as et, InputNumber as tt, Drawer as at } from "ant-design-vue";
3
+ import { Icon as L, Dropdown as Fe } from "@choubo/kerthus-web-vue-ui";
4
+ import { useFrontendRuntime as te, applyAdminAppearance as nt } from "@choubo/kerthus-web-vue-runtime";
5
+ const Me = {
6
6
  "en-US": {
7
7
  navigation: "Navigation",
8
8
  closeNavigation: "Close navigation",
@@ -62,10 +62,10 @@ const ne = {
62
62
  reject: "拒绝"
63
63
  }
64
64
  };
65
- function Wn(e, c) {
66
- return (e === "zh-CN" ? ne["zh-CN"] : ne["en-US"])[c];
65
+ function mo(e, d) {
66
+ return (e === "zh-CN" ? Me["zh-CN"] : Me["en-US"])[d];
67
67
  }
68
- const On = {
68
+ const vo = {
69
69
  "en-US": {
70
70
  layout: {
71
71
  footer: {
@@ -431,65 +431,65 @@ const On = {
431
431
  }
432
432
  }
433
433
  }
434
- }, de = Symbol("admin-menu");
435
- function Hn(e) {
434
+ }, Ee = Symbol("admin-menu");
435
+ function go(e) {
436
436
  return {
437
- install(c) {
438
- c.provide(de, e);
437
+ install(d) {
438
+ d.provide(Ee, e);
439
439
  }
440
440
  };
441
441
  }
442
- function ce() {
443
- const e = le(de);
442
+ function Se() {
443
+ const e = Ae(Ee);
444
444
  if (!e)
445
445
  throw new Error("Admin menu port is not installed");
446
446
  return e;
447
447
  }
448
- function ee(e, c) {
449
- for (const t of e) {
450
- if (t.path === c)
451
- return [t.path];
452
- const i = ee(t.children ?? [], c);
453
- if (i.length)
454
- return [t.path, ...i];
448
+ function ue(e, d) {
449
+ for (const a of e) {
450
+ if (a.path === d)
451
+ return [a.path];
452
+ const o = ue(a.children ?? [], d);
453
+ if (o.length)
454
+ return [a.path, ...o];
455
455
  }
456
456
  return [];
457
457
  }
458
- const ue = k({
458
+ const Ie = P({
459
459
  name: "AdminMenuNode",
460
460
  props: {
461
461
  item: { type: Object, required: !0 }
462
462
  },
463
463
  setup(e) {
464
- const { ports: c } = q();
464
+ const { ports: d } = te();
465
465
  return () => {
466
- var r, n;
467
- const t = e.item;
468
- if ((r = t.meta) != null && r.hideMenu)
466
+ var u, i;
467
+ const a = e.item;
468
+ if ((u = a.meta) != null && u.hideMenu)
469
469
  return null;
470
- const i = () => {
471
- var u, b;
472
- return O("span", { class: "dsea-basic-menu-item-content" }, [
473
- t.icon ? O(w, { icon: t.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
474
- c.locale.translate(t.name),
475
- (u = t.tag) != null && u.content || (b = t.tag) != null && b.dot ? O("span", {
476
- class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${t.tag.type ?? "error"}`, {
477
- "dsea-simple-menu-tag--dot": t.tag.dot
470
+ const o = () => {
471
+ var n, c;
472
+ return le("span", { class: "dsea-basic-menu-item-content" }, [
473
+ a.icon ? le(L, { icon: a.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
474
+ d.locale.translate(a.name),
475
+ (n = a.tag) != null && n.content || (c = a.tag) != null && c.dot ? le("span", {
476
+ class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${a.tag.type ?? "error"}`, {
477
+ "dsea-simple-menu-tag--dot": a.tag.dot
478
478
  }]
479
- }, t.tag.dot ? "" : t.tag.content) : null
479
+ }, a.tag.dot ? "" : a.tag.content) : null
480
480
  ]);
481
- }, l = (n = t.meta) != null && n.hideChildrenInMenu ? [] : t.children ?? [];
482
- return l.length ? O(Z.SubMenu, {
483
- key: t.path,
481
+ }, s = (i = a.meta) != null && i.hideChildrenInMenu ? [] : a.children ?? [];
482
+ return s.length ? le(we.SubMenu, {
483
+ key: a.path,
484
484
  popupClassName: "app-top-menu-popup",
485
- disabled: t.disabled
485
+ disabled: a.disabled
486
486
  }, {
487
- title: i,
488
- default: () => l.map((u) => O(ue, { key: u.path, item: u }))
489
- }) : O(Z.Item, { key: t.path, disabled: t.disabled }, { default: i });
487
+ title: o,
488
+ default: () => s.map((n) => le(Ie, { key: n.path, item: n }))
489
+ }) : le(we.Item, { key: a.path, disabled: a.disabled }, { default: o });
490
490
  };
491
491
  }
492
- }), te = /* @__PURE__ */ k({
492
+ }), oe = /* @__PURE__ */ P({
493
493
  __name: "BasicMenu",
494
494
  props: {
495
495
  items: { default: () => [] },
@@ -501,96 +501,98 @@ const ue = k({
501
501
  isHorizontal: { type: Boolean },
502
502
  accordion: { type: Boolean, default: !0 },
503
503
  collapse: { type: Boolean },
504
+ split: { type: Boolean },
505
+ topMenuAlign: {},
504
506
  beforeClickFn: {}
505
507
  },
506
508
  emits: ["menuClick"],
507
- setup(e, { emit: c }) {
508
- const t = e, i = c, l = ce(), r = I(() => t.collapse ?? l.settings.collapsed.value), n = oe({
509
+ setup(e, { emit: d }) {
510
+ const a = e, o = d, s = Se(), u = E(() => a.collapse ?? s.settings.collapsed.value), i = E(() => a.split ?? s.settings.split.value), n = Te({
509
511
  defaultSelectedKeys: [],
510
512
  selectedKeys: [],
511
513
  openKeys: [],
512
514
  collapsedOpenKeys: []
513
- }), u = I(() => r.value && !l.settings.mixSidebar.value ? n.collapsedOpenKeys : n.openKeys), b = I(() => {
514
- const T = t.type === "top" && t.mode === "horizontal" || t.isHorizontal && l.settings.split.value;
515
+ }), c = E(() => u.value && !s.settings.mixSidebar.value ? n.collapsedOpenKeys : n.openKeys), y = E(() => {
516
+ const $ = a.type === "top" && a.mode === "horizontal" || a.isHorizontal && i.value;
515
517
  return [
516
518
  "dsea-basic-menu",
517
- `justify-${t.isHorizontal && l.settings.split.value ? "start" : l.settings.topMenuAlign.value}`,
519
+ `justify-${a.isHorizontal && i.value ? "start" : a.topMenuAlign ?? s.settings.topMenuAlign.value}`,
518
520
  {
519
- "dsea-basic-menu__second": !t.isHorizontal && l.settings.split.value,
520
- "dsea-basic-menu__sidebar-hor": T
521
+ "dsea-basic-menu__second": !a.isHorizontal && i.value,
522
+ "dsea-basic-menu__sidebar-hor": $
521
523
  }
522
524
  ];
523
525
  });
524
- let g = !1, v = 0;
525
- async function m(T) {
526
- var C, E;
527
- if (T.name === l.redirectRouteName)
526
+ let h = !1, p = 0;
527
+ async function N($) {
528
+ var B, V;
529
+ if (s.redirectRouteName && $.name === s.redirectRouteName)
528
530
  return;
529
- if (g) {
530
- g = !1;
531
+ if (h) {
532
+ h = !1;
531
533
  return;
532
534
  }
533
- const f = ((C = T.meta) == null ? void 0 : C.currentActiveMenu) || T.path, h = ++v, _ = ee(t.items, f);
534
- if (t.isHorizontal && l.settings.split.value) {
535
- const R = await ((E = l.getCurrentParentPath) == null ? void 0 : E.call(l, f));
536
- if (h !== v)
535
+ const v = ((B = $.meta) == null ? void 0 : B.currentActiveMenu) || $.path, k = ++p, C = ue(a.items, v);
536
+ if (a.isHorizontal && i.value) {
537
+ const G = await ((V = s.getCurrentParentPath) == null ? void 0 : V.call(s, v));
538
+ if (k !== p)
537
539
  return;
538
- n.selectedKeys = [R || _[0] || f];
540
+ n.selectedKeys = [G || C[0] || v];
539
541
  } else
540
- n.selectedKeys = _.length ? _ : [f];
541
- L(f);
542
+ n.selectedKeys = C.length ? C : [v];
543
+ A(v);
542
544
  }
543
- function L(T) {
544
- if (t.mode === "horizontal")
545
+ function A($) {
546
+ if (a.mode === "horizontal")
545
547
  return;
546
- const f = ee(t.items, T);
547
- n.openKeys = t.accordion ? f : [.../* @__PURE__ */ new Set([...n.openKeys, ...f])];
548
+ const v = ue(a.items, $);
549
+ n.openKeys = a.accordion ? v : [.../* @__PURE__ */ new Set([...n.openKeys, ...v])];
548
550
  }
549
- function F(T) {
550
- const f = T.map(String);
551
- if (t.mode === "horizontal" || !t.accordion || l.settings.mixSidebar.value) {
552
- n.openKeys = f;
551
+ function O($) {
552
+ const v = $.map(String);
553
+ if (a.mode === "horizontal" || !a.accordion || s.settings.mixSidebar.value) {
554
+ n.openKeys = v;
553
555
  return;
554
556
  }
555
- if (r.value) {
556
- n.collapsedOpenKeys = f;
557
+ if (u.value) {
558
+ n.collapsedOpenKeys = v;
557
559
  return;
558
560
  }
559
- const h = t.items.filter((C) => {
560
- var E;
561
- return (E = C.children) == null ? void 0 : E.length;
562
- }).map((C) => C.path), _ = f.find((C) => !n.openKeys.includes(C));
563
- n.openKeys = _ && h.includes(_) ? [_] : f;
564
- }
565
- async function D(T) {
566
- const f = String(T.key);
567
- t.beforeClickFn && !await t.beforeClickFn(f) || (i("menuClick", f), g = !0, n.selectedKeys = [f]);
568
- }
569
- const W = l.onRouteChange(m);
570
- return Q(W), U(() => t.items, () => m(l.currentRoute.value)), m(l.currentRoute.value), (T, f) => (a(), P(y(Z), {
561
+ const k = a.items.filter((B) => {
562
+ var V;
563
+ return (V = B.children) == null ? void 0 : V.length;
564
+ }).map((B) => B.path), C = v.find((B) => !n.openKeys.includes(B));
565
+ n.openKeys = C && k.includes(C) ? [C] : v;
566
+ }
567
+ async function D($) {
568
+ const v = String($.key);
569
+ a.beforeClickFn && !await a.beforeClickFn(v) || (o("menuClick", v), h = !0, n.selectedKeys = [v]);
570
+ }
571
+ const j = s.onRouteChange(N);
572
+ return ne(j), Z(() => a.items, () => N(s.currentRoute.value)), N(s.currentRoute.value), ($, v) => (t(), z(f(we), {
571
573
  selectedKeys: n.selectedKeys,
572
574
  defaultSelectedKeys: n.defaultSelectedKeys,
573
575
  mode: e.mode,
574
- openKeys: u.value,
576
+ openKeys: c.value,
575
577
  inlineIndent: e.inlineIndent,
576
578
  theme: e.theme,
577
- inlineCollapsed: e.mode === "inline" && !e.mixSider && r.value,
578
- class: N(b.value),
579
+ inlineCollapsed: e.mode === "inline" && !e.mixSider && u.value,
580
+ class: U(y.value),
579
581
  subMenuOpenDelay: 0.2,
580
- onOpenChange: F,
582
+ onOpenChange: O,
581
583
  onClick: D
582
584
  }, {
583
- default: j(() => [
584
- (a(!0), o(x, null, M(e.items, (h) => (a(), P(y(ue), {
585
- key: h.path,
586
- item: h
585
+ default: re(() => [
586
+ (t(!0), l(F, null, K(e.items, (k) => (t(), z(f(Ie), {
587
+ key: k.path,
588
+ item: k
587
589
  }, null, 8, ["item"]))), 128))
588
590
  ]),
589
591
  _: 1
590
592
  }, 8, ["selectedKeys", "defaultSelectedKeys", "mode", "openKeys", "inlineIndent", "theme", "inlineCollapsed", "class"]));
591
593
  }
592
594
  });
593
- const jn = /* @__PURE__ */ k({
595
+ const bo = /* @__PURE__ */ P({
594
596
  __name: "SimpleMenu",
595
597
  props: {
596
598
  items: { default: () => [] },
@@ -603,12 +605,12 @@ const jn = /* @__PURE__ */ k({
603
605
  beforeClickFn: {}
604
606
  },
605
607
  emits: ["menuClick"],
606
- setup(e, { emit: c }) {
607
- const t = e, i = c;
608
- async function l(r) {
609
- return /^https?:\/\//i.test(r) ? (window.open(r, "_blank", "noopener,noreferrer"), !1) : t.beforeClickFn ? t.beforeClickFn(r) : !0;
608
+ setup(e, { emit: d }) {
609
+ const a = e, o = d;
610
+ async function s(u) {
611
+ return /^https?:\/\//i.test(u) ? (window.open(u, "_blank", "noopener,noreferrer"), !1) : a.beforeClickFn ? a.beforeClickFn(u) : !0;
610
612
  }
611
- return (r, n) => (a(), P(te, {
613
+ return (u, i) => (t(), z(oe, {
612
614
  class: "dsea-simple-menu",
613
615
  items: e.items,
614
616
  mode: "inline",
@@ -616,11 +618,11 @@ const jn = /* @__PURE__ */ k({
616
618
  collapse: e.collapse,
617
619
  mixSider: e.mixSider,
618
620
  accordion: e.accordion,
619
- beforeClickFn: l,
620
- onMenuClick: n[0] || (n[0] = (u) => i("menuClick", u))
621
+ beforeClickFn: s,
622
+ onMenuClick: i[0] || (i[0] = (n) => o("menuClick", n))
621
623
  }, null, 8, ["items", "theme", "collapse", "mixSider", "accordion"]));
622
624
  }
623
- }), Qn = /* @__PURE__ */ k({
625
+ }), ho = /* @__PURE__ */ P({
624
626
  __name: "SimpleMenuTag",
625
627
  props: {
626
628
  item: {},
@@ -628,18 +630,18 @@ const jn = /* @__PURE__ */ k({
628
630
  collapseParent: { type: Boolean, default: !1 }
629
631
  },
630
632
  setup(e) {
631
- return (c, t) => {
632
- var i, l;
633
- return (i = e.item.tag) != null && i.content || (l = e.item.tag) != null && l.dot ? (a(), o("span", {
633
+ return (d, a) => {
634
+ var o, s;
635
+ return (o = e.item.tag) != null && o.content || (s = e.item.tag) != null && s.dot ? (t(), l("span", {
634
636
  key: 0,
635
- class: N(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
637
+ class: U(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
636
638
  "dsea-simple-menu-tag--dot": e.dot || e.item.tag.dot,
637
639
  "dsea-simple-menu-tag--collapse": e.collapseParent
638
640
  }]])
639
- }, d(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : p("", !0);
641
+ }, m(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : b("", !0);
640
642
  };
641
643
  }
642
- }), $e = ["src", "alt"], Le = /* @__PURE__ */ k({
644
+ }), lt = ["src", "alt"], ot = /* @__PURE__ */ P({
643
645
  __name: "AppLogo",
644
646
  props: {
645
647
  theme: {},
@@ -648,35 +650,35 @@ const jn = /* @__PURE__ */ k({
648
650
  collapsedShowTitle: { type: Boolean }
649
651
  },
650
652
  setup(e) {
651
- const { ports: c } = q(), t = I(() => c.appConfig.getTitle()), i = I(() => {
652
- var r, n;
653
- return (n = (r = c.appConfig).getLogo) == null ? void 0 : n.call(r);
653
+ const { ports: d } = te(), a = E(() => d.appConfig.getTitle()), o = E(() => {
654
+ var u, i;
655
+ return (i = (u = d.appConfig).getLogo) == null ? void 0 : i.call(u);
654
656
  });
655
- function l() {
656
- c.navigation.go(c.navigation.getHome());
657
+ function s() {
658
+ d.navigation.go(d.navigation.getHome());
657
659
  }
658
- return (r, n) => (a(), o("div", {
659
- class: N(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
660
- onClick: l
660
+ return (u, i) => (t(), l("div", {
661
+ class: U(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
662
+ onClick: s
661
663
  }, [
662
- i.value ? (a(), o("img", {
664
+ o.value ? (t(), l("img", {
663
665
  key: 0,
664
- src: i.value,
665
- alt: t.value
666
- }, null, 8, $e)) : p("", !0),
667
- e.showTitle ? (a(), o("div", {
666
+ src: o.value,
667
+ alt: a.value
668
+ }, null, 8, lt)) : b("", !0),
669
+ e.showTitle ? (t(), l("div", {
668
670
  key: 1,
669
- class: N(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
670
- }, d(t.value), 3)) : p("", !0)
671
+ class: U(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
672
+ }, m(a.value), 3)) : b("", !0)
671
673
  ], 2));
672
674
  }
673
675
  });
674
- const A = (e, c) => {
675
- const t = e.__vccOpts || e;
676
- for (const [i, l] of c)
677
- t[i] = l;
678
- return t;
679
- }, Ce = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-f9695ead"]]), Se = { class: "dsea-app-locale-picker" }, xe = { key: 0 }, Gn = /* @__PURE__ */ k({
676
+ const W = (e, d) => {
677
+ const a = e.__vccOpts || e;
678
+ for (const [o, s] of d)
679
+ a[o] = s;
680
+ return a;
681
+ }, ve = /* @__PURE__ */ W(ot, [["__scopeId", "data-v-f9695ead"]]), it = { class: "dsea-app-locale-picker" }, st = { key: 0 }, rt = /* @__PURE__ */ P({
680
682
  __name: "AppLocalePicker",
681
683
  props: {
682
684
  locales: {},
@@ -685,115 +687,115 @@ const A = (e, c) => {
685
687
  reload: { type: Boolean }
686
688
  },
687
689
  setup(e) {
688
- const c = e, { ports: t } = q(), i = S(c.locale ?? t.locale.getLocale()), l = I(() => {
689
- var n;
690
- return ((n = c.locales.find((u) => u.event === i.value)) == null ? void 0 : n.text) ?? "";
690
+ const d = e, { ports: a } = te(), o = M(d.locale ?? a.locale.getLocale()), s = E(() => {
691
+ var i;
692
+ return ((i = d.locales.find((n) => n.event === o.value)) == null ? void 0 : i.text) ?? "";
691
693
  });
692
- U(() => c.locale, (n) => {
693
- n && (i.value = n);
694
+ Z(() => d.locale, (i) => {
695
+ i && (o.value = i);
694
696
  });
695
- async function r(n) {
696
- n.event !== i.value && (await t.locale.setLocale(n.event), i.value = n.event, c.reload && location.reload());
697
+ async function u(i) {
698
+ i.event !== o.value && (await a.locale.setLocale(i.event), o.value = i.event, d.reload && location.reload());
697
699
  }
698
- return (n, u) => (a(), P(y(re), {
700
+ return (i, n) => (t(), z(f(Fe), {
699
701
  placement: "bottom",
700
702
  trigger: ["click"],
701
703
  dropMenuList: e.locales,
702
- selectedKeys: [i.value],
704
+ selectedKeys: [o.value],
703
705
  overlayClassName: "app-locale-picker-overlay",
704
- onMenuEvent: r
706
+ onMenuEvent: u
705
707
  }, {
706
- default: j(() => [
707
- s("span", Se, [
708
- $(y(w), { icon: "ion:language" }),
709
- e.showText ? (a(), o("span", xe, d(l.value), 1)) : p("", !0)
708
+ default: re(() => [
709
+ r("span", it, [
710
+ x(f(L), { icon: "ion:language" }),
711
+ e.showText ? (t(), l("span", st, m(s.value), 1)) : b("", !0)
710
712
  ])
711
713
  ]),
712
714
  _: 1
713
715
  }, 8, ["dropMenuList", "selectedKeys"]));
714
716
  }
715
717
  });
716
- const Ae = ["aria-label"], Me = /* @__PURE__ */ k({
718
+ const ut = ["aria-label"], dt = /* @__PURE__ */ P({
717
719
  __name: "AppDarkModeToggle",
718
720
  props: {
719
721
  darkMode: { type: Boolean },
720
722
  visible: { type: Boolean, default: !0 }
721
723
  },
722
724
  emits: ["update:darkMode"],
723
- setup(e, { emit: c }) {
724
- const t = c;
725
- return (i, l) => e.visible ? (a(), o("button", {
725
+ setup(e, { emit: d }) {
726
+ const a = d;
727
+ return (o, s) => e.visible ? (t(), l("button", {
726
728
  key: 0,
727
729
  type: "button",
728
- class: N(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
730
+ class: U(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
729
731
  "aria-label": e.darkMode ? "Switch to light mode" : "Switch to dark mode",
730
- onClick: l[0] || (l[0] = (r) => t("update:darkMode", !e.darkMode))
732
+ onClick: s[0] || (s[0] = (u) => a("update:darkMode", !e.darkMode))
731
733
  }, [
732
- l[1] || (l[1] = s("span", { class: "dsea-dark-switch-inner" }, null, -1)),
733
- $(y(w), {
734
+ s[1] || (s[1] = r("span", { class: "dsea-dark-switch-inner" }, null, -1)),
735
+ x(f(L), {
734
736
  icon: "lucide:sun",
735
737
  size: 14
736
738
  }),
737
- $(y(w), {
739
+ x(f(L), {
738
740
  icon: "lucide:moon",
739
741
  size: 14
740
742
  })
741
- ], 10, Ae)) : p("", !0);
743
+ ], 10, ut)) : b("", !0);
742
744
  }
743
745
  });
744
- const Xn = /* @__PURE__ */ A(Me, [["__scopeId", "data-v-bc7f2cad"]]), Te = ["aria-label", "title", "aria-pressed"], Be = /* @__PURE__ */ k({
746
+ const po = /* @__PURE__ */ W(dt, [["__scopeId", "data-v-bc7f2cad"]]), ct = ["aria-label", "title", "aria-pressed"], mt = /* @__PURE__ */ P({
745
747
  __name: "AdminFullscreenButton",
746
748
  props: {
747
749
  enterLabel: { default: "Enter fullscreen" },
748
750
  exitLabel: { default: "Exit fullscreen" }
749
751
  },
750
752
  setup(e) {
751
- const c = S(!1);
752
- function t() {
753
- c.value = !!document.fullscreenElement;
753
+ const d = M(!1);
754
+ function a() {
755
+ d.value = !!document.fullscreenElement;
754
756
  }
755
- async function i() {
756
- document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), t();
757
+ async function o() {
758
+ document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), a();
757
759
  }
758
- return Y(() => {
759
- t(), document.addEventListener("fullscreenchange", t);
760
- }), Q(() => document.removeEventListener("fullscreenchange", t)), (l, r) => (a(), o("button", {
760
+ return ie(() => {
761
+ a(), document.addEventListener("fullscreenchange", a);
762
+ }), ne(() => document.removeEventListener("fullscreenchange", a)), (s, u) => (t(), l("button", {
761
763
  type: "button",
762
764
  class: "dsea-icon-command",
763
- "aria-label": c.value ? e.exitLabel : e.enterLabel,
764
- title: c.value ? e.exitLabel : e.enterLabel,
765
- "aria-pressed": c.value,
766
- onClick: i
765
+ "aria-label": d.value ? e.exitLabel : e.enterLabel,
766
+ title: d.value ? e.exitLabel : e.enterLabel,
767
+ "aria-pressed": d.value,
768
+ onClick: o
767
769
  }, [
768
- $(y(w), {
769
- icon: c.value ? "lucide:minimize" : "lucide:maximize",
770
+ x(f(L), {
771
+ icon: d.value ? "lucide:minimize" : "lucide:maximize",
770
772
  size: 18
771
773
  }, null, 8, ["icon"])
772
- ], 8, Te));
774
+ ], 8, ct));
773
775
  }
774
776
  });
775
- const Yn = /* @__PURE__ */ A(Be, [["__scopeId", "data-v-1787f599"]]);
777
+ const vt = /* @__PURE__ */ W(mt, [["__scopeId", "data-v-1787f599"]]);
776
778
  new TextEncoder().encode("kerthus-web-shared-auth-v2-key!!");
777
- function X(e) {
779
+ function ge(e) {
778
780
  if (typeof e != "string")
779
781
  return "";
780
- const c = e.trim();
781
- if (!/^https?:\/\/[^/]/i.test(c) || /^https?:\/\/[^/?#]*@/i.test(c) || /[\s\\\u0000-\u001f\u007f]/.test(c))
782
+ const d = e.trim();
783
+ if (!/^https?:\/\/[^/]/i.test(d) || /^https?:\/\/[^/?#]*@/i.test(d) || /[\s\\\u0000-\u001f\u007f]/.test(d))
782
784
  return "";
783
785
  try {
784
- const t = new URL(c);
785
- return !["http:", "https:"].includes(t.protocol) || !t.hostname || t.username || t.password ? "" : c;
786
+ const a = new URL(d);
787
+ return !["http:", "https:"].includes(a.protocol) || !a.hostname || a.username || a.password ? "" : d;
786
788
  } catch {
787
789
  return "";
788
790
  }
789
791
  }
790
- const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" }, Ee = {
792
+ const gt = ["aria-label", "title"], bt = { class: "dsea-app-switcher__panel" }, ht = {
791
793
  key: 0,
792
794
  role: "status"
793
- }, Fe = {
795
+ }, pt = {
794
796
  key: 1,
795
797
  role: "alert"
796
- }, Ne = { key: 2 }, ze = { key: 3 }, De = ["href"], Ke = ["src"], Ve = { key: 0 }, Re = ["title"], Ue = ["disabled", "aria-current", "onClick"], qe = ["src"], We = { key: 0 }, Oe = /* @__PURE__ */ k({
798
+ }, ft = { key: 2 }, yt = { key: 3 }, kt = ["href"], wt = ["src"], St = { key: 0 }, _t = ["title"], $t = ["disabled", "aria-current", "onClick"], Ct = ["src"], xt = { key: 0 }, Lt = /* @__PURE__ */ P({
797
799
  __name: "AdminAppSwitcher",
798
800
  props: {
799
801
  apps: {},
@@ -807,120 +809,120 @@ const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" },
807
809
  confirmSwitch: {}
808
810
  },
809
811
  emits: ["open", "switch", "error"],
810
- setup(e, { emit: c }) {
811
- const t = e, i = c, l = S(), r = S();
812
- function n() {
813
- l.value && (l.value.open = !1);
814
- }
815
- function u(g) {
816
- g.target.open && i("open");
817
- }
818
- async function b(g) {
819
- var v;
820
- if (!(r.value || g.id === t.currentId)) {
821
- r.value = g.id;
812
+ setup(e, { emit: d }) {
813
+ const a = e, o = d, s = M(), u = M();
814
+ function i() {
815
+ s.value && (s.value.open = !1);
816
+ }
817
+ function n(y) {
818
+ y.target.open && o("open");
819
+ }
820
+ async function c(y) {
821
+ var h;
822
+ if (!(u.value || y.id === a.currentId)) {
823
+ u.value = y.id;
822
824
  try {
823
- if (await ((v = t.confirmSwitch) == null ? void 0 : v.call(t, g)) === !1)
825
+ if (await ((h = a.confirmSwitch) == null ? void 0 : h.call(a, y)) === !1)
824
826
  return;
825
- i("switch", g), n();
826
- } catch (m) {
827
- i("error", m);
827
+ o("switch", y), i();
828
+ } catch (p) {
829
+ o("error", p);
828
830
  } finally {
829
- r.value = void 0;
831
+ u.value = void 0;
830
832
  }
831
833
  }
832
834
  }
833
- return (g, v) => (a(), o("details", {
835
+ return (y, h) => (t(), l("details", {
834
836
  ref_key: "menu",
835
- ref: l,
837
+ ref: s,
836
838
  class: "dsea-app-switcher",
837
- onToggle: u,
838
- onKeydown: J(n, ["esc"])
839
+ onToggle: n,
840
+ onKeydown: be(i, ["esc"])
839
841
  }, [
840
- s("summary", {
842
+ r("summary", {
841
843
  "aria-label": e.label,
842
844
  title: e.label
843
845
  }, [
844
- $(y(w), {
846
+ x(f(L), {
845
847
  icon: "lucide:layout-grid",
846
848
  size: 18
847
849
  })
848
- ], 8, Pe),
849
- s("div", Ie, [
850
- e.loading ? (a(), o("p", Ee, d(e.loadingLabel), 1)) : e.error ? (a(), o("p", Fe, d(e.error), 1)) : e.apps.length ? (a(), o("ul", ze, [
851
- (a(!0), o(x, null, M(e.apps, (m) => (a(), o("li", {
852
- key: m.id
850
+ ], 8, gt),
851
+ r("div", bt, [
852
+ e.loading ? (t(), l("p", ht, m(e.loadingLabel), 1)) : e.error ? (t(), l("p", pt, m(e.error), 1)) : e.apps.length ? (t(), l("ul", yt, [
853
+ (t(!0), l(F, null, K(e.apps, (p) => (t(), l("li", {
854
+ key: p.id
853
855
  }, [
854
- m.url && y(X)(m.url) ? (a(), o("a", {
856
+ p.url && f(ge)(p.url) ? (t(), l("a", {
855
857
  key: 0,
856
- href: y(X)(m.url),
858
+ href: f(ge)(p.url),
857
859
  target: "_blank",
858
860
  rel: "noopener noreferrer",
859
861
  referrerpolicy: "no-referrer",
860
- onClick: n
862
+ onClick: i
861
863
  }, [
862
- m.icon ? (a(), o("img", {
864
+ p.icon ? (t(), l("img", {
863
865
  key: 0,
864
- src: m.icon,
866
+ src: p.icon,
865
867
  alt: ""
866
- }, null, 8, Ke)) : p("", !0),
867
- s("span", null, [
868
- z(d(m.name), 1),
869
- m.description ? (a(), o("small", Ve, d(m.description), 1)) : p("", !0)
868
+ }, null, 8, wt)) : b("", !0),
869
+ r("span", null, [
870
+ Q(m(p.name), 1),
871
+ p.description ? (t(), l("small", St, m(p.description), 1)) : b("", !0)
870
872
  ]),
871
- $(y(w), {
873
+ x(f(L), {
872
874
  icon: "lucide:external-link",
873
875
  size: 14
874
876
  })
875
- ], 8, De)) : m.url ? (a(), o("button", {
877
+ ], 8, kt)) : p.url ? (t(), l("button", {
876
878
  key: 1,
877
879
  type: "button",
878
880
  disabled: "",
879
881
  title: e.invalidUrlLabel
880
882
  }, [
881
- s("span", null, [
882
- z(d(m.name), 1),
883
- s("small", null, d(e.invalidUrlLabel), 1)
883
+ r("span", null, [
884
+ Q(m(p.name), 1),
885
+ r("small", null, m(e.invalidUrlLabel), 1)
884
886
  ])
885
- ], 8, Re)) : (a(), o("button", {
887
+ ], 8, _t)) : (t(), l("button", {
886
888
  key: 2,
887
889
  type: "button",
888
- disabled: m.id === e.currentId || r.value === m.id,
889
- "aria-current": m.id === e.currentId ? "page" : void 0,
890
- onClick: (L) => b(m)
890
+ disabled: p.id === e.currentId || u.value === p.id,
891
+ "aria-current": p.id === e.currentId ? "page" : void 0,
892
+ onClick: (N) => c(p)
891
893
  }, [
892
- m.icon ? (a(), o("img", {
894
+ p.icon ? (t(), l("img", {
893
895
  key: 0,
894
- src: m.icon,
896
+ src: p.icon,
895
897
  alt: ""
896
- }, null, 8, qe)) : p("", !0),
897
- s("span", null, [
898
- z(d(m.name), 1),
899
- m.description ? (a(), o("small", We, d(m.description), 1)) : p("", !0)
898
+ }, null, 8, Ct)) : b("", !0),
899
+ r("span", null, [
900
+ Q(m(p.name), 1),
901
+ p.description ? (t(), l("small", xt, m(p.description), 1)) : b("", !0)
900
902
  ]),
901
- m.id === e.currentId ? (a(), P(y(w), {
903
+ p.id === e.currentId ? (t(), z(f(L), {
902
904
  key: 1,
903
905
  icon: "lucide:check",
904
906
  size: 16
905
- })) : p("", !0)
906
- ], 8, Ue))
907
+ })) : b("", !0)
908
+ ], 8, $t))
907
909
  ]))), 128))
908
- ])) : (a(), o("p", Ne, d(e.emptyLabel), 1))
910
+ ])) : (t(), l("p", ft, m(e.emptyLabel), 1))
909
911
  ])
910
912
  ], 544));
911
913
  }
912
914
  });
913
- const Jn = /* @__PURE__ */ A(Oe, [["__scopeId", "data-v-29d987c2"]]), me = Symbol("app-provider");
914
- function be(e) {
915
- return ve(me, e), e;
915
+ const Mt = /* @__PURE__ */ W(Lt, [["__scopeId", "data-v-29d987c2"]]), Ne = Symbol("app-provider");
916
+ function ze(e) {
917
+ return Qe(Ne, e), e;
916
918
  }
917
- function Zn() {
918
- const e = le(me);
919
+ function fo() {
920
+ const e = Ae(Ne);
919
921
  if (!e)
920
922
  throw new Error("AppProvider is missing");
921
923
  return e;
922
924
  }
923
- const el = /* @__PURE__ */ k({
925
+ const yo = /* @__PURE__ */ P({
924
926
  __name: "AppProvider",
925
927
  props: {
926
928
  prefixCls: { default: "dsea" },
@@ -928,163 +930,166 @@ const el = /* @__PURE__ */ k({
928
930
  onMobileChange: {}
929
931
  },
930
932
  setup(e) {
931
- const c = e, t = S(!1);
932
- be({ prefixCls: pe(c, "prefixCls"), isMobile: t });
933
- function i() {
934
- var r;
935
- const l = window.innerWidth < c.mobileBreakpoint;
936
- l !== t.value && (t.value = l, (r = c.onMobileChange) == null || r.call(c, l));
933
+ const d = e, a = M(!1);
934
+ ze({ prefixCls: Xe(d, "prefixCls"), isMobile: a });
935
+ function o() {
936
+ var u;
937
+ const s = window.innerWidth < d.mobileBreakpoint;
938
+ s !== a.value && (a.value = s, (u = d.onMobileChange) == null || u.call(d, s));
937
939
  }
938
- return Y(() => {
939
- i(), window.addEventListener("resize", i);
940
- }), Q(() => window.removeEventListener("resize", i)), (l, r) => B(l.$slots, "default");
940
+ return ie(() => {
941
+ o(), window.addEventListener("resize", o);
942
+ }), ne(() => window.removeEventListener("resize", o)), (s, u) => T(s.$slots, "default");
941
943
  }
942
- }), He = ["aria-label"], je = ["aria-label"], Qe = { class: "dsea-app-search-input-row" }, Ge = ["placeholder", "aria-label"], Xe = ["aria-label"], Ye = ["data-index", "aria-selected", "onMouseenter", "onClick"], Je = {
944
+ }), At = ["aria-label"], Tt = ["aria-label"], Pt = { class: "dsea-app-search-input-row" }, Bt = ["placeholder", "aria-label"], Ft = ["aria-label"], Et = ["data-index", "aria-selected", "onMouseenter", "onClick"], It = {
943
945
  key: 1,
944
946
  class: "dsea-app-search-empty"
945
- }, Ze = /* @__PURE__ */ k({
947
+ }, Nt = /* @__PURE__ */ P({
946
948
  __name: "AppSearch",
949
+ props: {
950
+ menuItems: {}
951
+ },
947
952
  setup(e) {
948
- const { ports: c } = q(), t = ce(), i = (f) => c.locale.translate(f), l = S(!1), r = S(""), n = S([]), u = S(0), b = S(), g = S();
949
- function v(f, h = "") {
950
- return f.flatMap((_) => {
951
- var G, ae;
952
- if ((G = _.meta) != null && G.hideMenu)
953
+ const d = e, { ports: a } = te(), o = Se(), s = (v) => a.locale.translate(v), u = M(!1), i = M(""), n = M([]), c = M(0), y = M(), h = M();
954
+ function p(v, k = "") {
955
+ return v.flatMap((C) => {
956
+ var de, ce;
957
+ if ((de = C.meta) != null && de.hideMenu)
953
958
  return [];
954
- const C = i(_.name), E = h ? `${h} > ${C}` : C, R = (ae = _.meta) != null && ae.hideChildrenInMenu ? [] : _.children ?? [];
955
- return R.length ? v(R, E) : [{ label: E, path: _.path, icon: _.icon }];
959
+ const B = s(C.name), V = k ? `${k} > ${B}` : B, G = (ce = C.meta) != null && ce.hideChildrenInMenu ? [] : C.children ?? [];
960
+ return G.length ? p(G, V) : [{ label: V, path: C.path, icon: C.icon }];
956
961
  });
957
962
  }
958
- function m(f, h) {
959
- const _ = f.toLocaleLowerCase();
960
- let C = 0;
961
- for (const E of h.toLocaleLowerCase()) {
962
- if (C = _.indexOf(E, C), C < 0)
963
+ function N(v, k) {
964
+ const C = v.toLocaleLowerCase();
965
+ let B = 0;
966
+ for (const V of k.toLocaleLowerCase()) {
967
+ if (B = C.indexOf(V, B), B < 0)
963
968
  return !1;
964
- C += 1;
969
+ B += 1;
965
970
  }
966
971
  return !0;
967
972
  }
968
- const L = I(() => {
969
- const f = r.value.trim();
970
- return f ? v(n.value).filter((h) => m(h.label, f)) : [];
973
+ const A = E(() => {
974
+ const v = i.value.trim();
975
+ return v ? p(n.value).filter((k) => N(k.label, v)) : [];
971
976
  });
972
- U(L, () => {
973
- u.value = 0;
977
+ Z(A, () => {
978
+ c.value = 0;
974
979
  });
975
- async function F() {
976
- var f, h;
977
- l.value = !0, n.value = await ((f = t.getItems) == null ? void 0 : f.call(t)) ?? [], l.value && (await se(), (h = b.value) == null || h.focus());
980
+ async function O() {
981
+ var v, k;
982
+ u.value = !0, n.value = d.menuItems ?? await ((v = o.getItems) == null ? void 0 : v.call(o)) ?? [], u.value && (await Be(), (k = y.value) == null || k.focus());
978
983
  }
979
984
  function D() {
980
- l.value = !1, r.value = "";
985
+ u.value = !1, i.value = "";
981
986
  }
982
- function W(f) {
983
- D(), c.navigation.go(f.path);
987
+ function j(v) {
988
+ D(), a.navigation.go(v.path);
984
989
  }
985
- function T(f) {
986
- var h, _;
987
- if (l.value)
988
- if (f.key === "Escape")
990
+ function $(v) {
991
+ var k, C;
992
+ if (u.value)
993
+ if (v.key === "Escape")
989
994
  D();
990
- else if (f.key === "ArrowDown" || f.key === "ArrowUp") {
991
- if (f.preventDefault(), !L.value.length)
995
+ else if (v.key === "ArrowDown" || v.key === "ArrowUp") {
996
+ if (v.preventDefault(), !A.value.length)
992
997
  return;
993
- const C = f.key === "ArrowDown" ? 1 : -1;
994
- u.value = (u.value + C + L.value.length) % L.value.length, (_ = (h = g.value) == null ? void 0 : h.querySelector(`[data-index="${u.value}"]`)) == null || _.scrollIntoView({ block: "nearest" });
998
+ const B = v.key === "ArrowDown" ? 1 : -1;
999
+ c.value = (c.value + B + A.value.length) % A.value.length, (C = (k = h.value) == null ? void 0 : k.querySelector(`[data-index="${c.value}"]`)) == null || C.scrollIntoView({ block: "nearest" });
995
1000
  } else
996
- f.key === "Enter" && L.value[u.value] && (f.preventDefault(), W(L.value[u.value]));
1001
+ v.key === "Enter" && A.value[c.value] && (v.preventDefault(), j(A.value[c.value]));
997
1002
  }
998
- return Y(() => window.addEventListener("keydown", T)), Q(() => window.removeEventListener("keydown", T)), (f, h) => (a(), o(x, null, [
999
- s("button", {
1003
+ return ie(() => window.addEventListener("keydown", $)), ne(() => window.removeEventListener("keydown", $)), (v, k) => (t(), l(F, null, [
1004
+ r("button", {
1000
1005
  type: "button",
1001
1006
  class: "dsea-app-search-trigger",
1002
- "aria-label": i("common.searchText"),
1003
- onClick: F
1007
+ "aria-label": s("common.searchText"),
1008
+ onClick: O
1004
1009
  }, [
1005
- $(y(w), {
1010
+ x(f(L), {
1006
1011
  icon: "ant-design:search-outlined",
1007
1012
  size: 18
1008
1013
  })
1009
- ], 8, He),
1010
- (a(), P(ge, { to: "body" }, [
1011
- l.value ? (a(), o("div", {
1014
+ ], 8, At),
1015
+ (t(), z(Pe, { to: "body" }, [
1016
+ u.value ? (t(), l("div", {
1012
1017
  key: 0,
1013
1018
  class: "dsea-app-search-backdrop",
1014
- onClick: H(D, ["self"])
1019
+ onClick: ee(D, ["self"])
1015
1020
  }, [
1016
- s("section", {
1021
+ r("section", {
1017
1022
  class: "dsea-app-search-modal",
1018
1023
  role: "dialog",
1019
1024
  "aria-modal": "true",
1020
- "aria-label": i("common.searchText")
1025
+ "aria-label": s("common.searchText")
1021
1026
  }, [
1022
- s("div", Qe, [
1023
- $(y(w), {
1027
+ r("div", Pt, [
1028
+ x(f(L), {
1024
1029
  icon: "ant-design:search-outlined",
1025
1030
  size: 18
1026
1031
  }),
1027
- K(s("input", {
1032
+ Y(r("input", {
1028
1033
  ref_key: "inputEl",
1029
- ref: b,
1030
- "onUpdate:modelValue": h[0] || (h[0] = (_) => r.value = _),
1034
+ ref: y,
1035
+ "onUpdate:modelValue": k[0] || (k[0] = (C) => i.value = C),
1031
1036
  type: "search",
1032
- placeholder: i("common.searchText"),
1033
- "aria-label": i("common.searchText")
1034
- }, null, 8, Ge), [
1035
- [V, r.value]
1037
+ placeholder: s("common.searchText"),
1038
+ "aria-label": s("common.searchText")
1039
+ }, null, 8, Bt), [
1040
+ [J, i.value]
1036
1041
  ]),
1037
- s("button", {
1042
+ r("button", {
1038
1043
  type: "button",
1039
1044
  class: "dsea-app-search-close",
1040
- "aria-label": i("common.cancelText"),
1045
+ "aria-label": s("common.cancelText"),
1041
1046
  onClick: D
1042
1047
  }, [
1043
- $(y(w), {
1048
+ x(f(L), {
1044
1049
  icon: "lucide:x",
1045
1050
  size: 18
1046
1051
  })
1047
- ], 8, Xe)
1052
+ ], 8, Ft)
1048
1053
  ]),
1049
- L.value.length ? (a(), o("ul", {
1054
+ A.value.length ? (t(), l("ul", {
1050
1055
  key: 0,
1051
1056
  ref_key: "resultList",
1052
- ref: g,
1057
+ ref: h,
1053
1058
  class: "dsea-app-search-results",
1054
1059
  role: "listbox"
1055
1060
  }, [
1056
- (a(!0), o(x, null, M(L.value, (_, C) => (a(), o("li", {
1057
- key: _.path,
1058
- "data-index": C,
1061
+ (t(!0), l(F, null, K(A.value, (C, B) => (t(), l("li", {
1062
+ key: C.path,
1063
+ "data-index": B,
1059
1064
  role: "option",
1060
- "aria-selected": C === u.value,
1061
- class: N({ active: C === u.value }),
1062
- onMouseenter: (E) => u.value = C,
1063
- onClick: (E) => W(_)
1065
+ "aria-selected": B === c.value,
1066
+ class: U({ active: B === c.value }),
1067
+ onMouseenter: (V) => c.value = B,
1068
+ onClick: (V) => j(C)
1064
1069
  }, [
1065
- _.icon ? (a(), P(y(w), {
1070
+ C.icon ? (t(), z(f(L), {
1066
1071
  key: 0,
1067
- icon: _.icon,
1072
+ icon: C.icon,
1068
1073
  size: 18
1069
- }, null, 8, ["icon"])) : p("", !0),
1070
- s("span", null, d(_.label), 1),
1071
- C === u.value ? (a(), P(y(w), {
1074
+ }, null, 8, ["icon"])) : b("", !0),
1075
+ r("span", null, m(C.label), 1),
1076
+ B === c.value ? (t(), z(f(L), {
1072
1077
  key: 1,
1073
1078
  icon: "ant-design:enter-outlined",
1074
1079
  size: 16
1075
- })) : p("", !0)
1076
- ], 42, Ye))), 128))
1077
- ], 512)) : r.value.trim() ? (a(), o("div", Je, d(i("component.app.searchNotData")), 1)) : p("", !0)
1078
- ], 8, je)
1079
- ])) : p("", !0)
1080
+ })) : b("", !0)
1081
+ ], 42, Et))), 128))
1082
+ ], 512)) : i.value.trim() ? (t(), l("div", It, m(s("component.app.searchNotData")), 1)) : b("", !0)
1083
+ ], 8, Tt)
1084
+ ])) : b("", !0)
1080
1085
  ]))
1081
1086
  ], 64));
1082
1087
  }
1083
1088
  });
1084
- const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["aria-label"], tt = ["src", "alt"], at = {
1089
+ const zt = /* @__PURE__ */ W(Nt, [["__scopeId", "data-v-9d504bc3"]]), Dt = ["aria-label"], Rt = ["src", "alt"], Kt = {
1085
1090
  key: 1,
1086
1091
  class: "dsea-user-menu__initial"
1087
- }, nt = { class: "dsea-user-menu__name" }, lt = { role: "menu" }, ot = ["onClick"], st = /* @__PURE__ */ k({
1092
+ }, Wt = { class: "dsea-user-menu__name" }, Ot = { role: "menu" }, Vt = ["onClick"], Ut = /* @__PURE__ */ P({
1088
1093
  __name: "AdminUserMenu",
1089
1094
  props: {
1090
1095
  name: {},
@@ -1093,64 +1098,64 @@ const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["ari
1093
1098
  items: {}
1094
1099
  },
1095
1100
  emits: ["select"],
1096
- setup(e, { emit: c }) {
1097
- const t = c, i = S();
1098
- function l(n) {
1099
- n.currentTarget.open = !1;
1101
+ setup(e, { emit: d }) {
1102
+ const a = d, o = M();
1103
+ function s(i) {
1104
+ i.currentTarget.open = !1;
1100
1105
  }
1101
- function r(n) {
1102
- t("select", n), i.value && (i.value.open = !1);
1106
+ function u(i) {
1107
+ a("select", i), o.value && (o.value.open = !1);
1103
1108
  }
1104
- return (n, u) => (a(), o("details", {
1109
+ return (i, n) => (t(), l("details", {
1105
1110
  ref_key: "menu",
1106
- ref: i,
1111
+ ref: o,
1107
1112
  class: "dsea-user-menu",
1108
- onKeydown: J(l, ["esc"])
1113
+ onKeydown: be(s, ["esc"])
1109
1114
  }, [
1110
- s("summary", { "aria-label": e.label }, [
1111
- e.avatar ? (a(), o("img", {
1115
+ r("summary", { "aria-label": e.label }, [
1116
+ e.avatar ? (t(), l("img", {
1112
1117
  key: 0,
1113
1118
  src: e.avatar,
1114
1119
  alt: e.name
1115
- }, null, 8, tt)) : (a(), o("span", at, d(e.name.slice(0, 1).toUpperCase()), 1)),
1116
- s("span", nt, d(e.name), 1),
1117
- $(y(w), {
1120
+ }, null, 8, Rt)) : (t(), l("span", Kt, m(e.name.slice(0, 1).toUpperCase()), 1)),
1121
+ r("span", Wt, m(e.name), 1),
1122
+ x(f(L), {
1118
1123
  icon: "lucide:chevron-down",
1119
1124
  size: 14
1120
1125
  })
1121
- ], 8, et),
1122
- s("ul", lt, [
1123
- (a(!0), o(x, null, M(e.items, (b) => (a(), o("li", {
1124
- key: b.key,
1126
+ ], 8, Dt),
1127
+ r("ul", Ot, [
1128
+ (t(!0), l(F, null, K(e.items, (c) => (t(), l("li", {
1129
+ key: c.key,
1125
1130
  role: "none"
1126
1131
  }, [
1127
- s("button", {
1132
+ r("button", {
1128
1133
  type: "button",
1129
1134
  role: "menuitem",
1130
- onClick: (g) => r(b.key)
1135
+ onClick: (y) => u(c.key)
1131
1136
  }, [
1132
- b.icon ? (a(), P(y(w), {
1137
+ c.icon ? (t(), z(f(L), {
1133
1138
  key: 0,
1134
- icon: b.icon,
1139
+ icon: c.icon,
1135
1140
  size: 16
1136
- }, null, 8, ["icon"])) : p("", !0),
1137
- z(" " + d(b.label), 1)
1138
- ], 8, ot)
1141
+ }, null, 8, ["icon"])) : b("", !0),
1142
+ Q(" " + m(c.label), 1)
1143
+ ], 8, Vt)
1139
1144
  ]))), 128))
1140
1145
  ])
1141
1146
  ], 544));
1142
1147
  }
1143
1148
  });
1144
- const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["aria-label"], rt = {
1149
+ const qt = /* @__PURE__ */ W(Ut, [["__scopeId", "data-v-d193d9f3"]]), Ht = ["aria-label"], jt = {
1145
1150
  key: 0,
1146
1151
  class: "dsea-notifications__count"
1147
- }, dt = ["aria-label"], ct = {
1152
+ }, Qt = ["aria-label"], Xt = {
1148
1153
  class: "dsea-notifications__tabs",
1149
1154
  role: "tablist"
1150
- }, ut = ["aria-selected", "onClick"], mt = { key: 0 }, bt = ["onClick"], vt = { key: 0 }, pt = { key: 1 }, gt = {
1155
+ }, Gt = ["aria-selected", "onClick"], Yt = { key: 0 }, Jt = ["onClick"], Zt = { key: 0 }, ea = { key: 1 }, ta = {
1151
1156
  key: 1,
1152
1157
  class: "dsea-notifications__empty"
1153
- }, ht = /* @__PURE__ */ k({
1158
+ }, aa = /* @__PURE__ */ P({
1154
1159
  __name: "AdminNotificationCenter",
1155
1160
  props: {
1156
1161
  items: {},
@@ -1160,80 +1165,80 @@ const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["ari
1160
1165
  markAllLabel: { default: "Mark all as read" }
1161
1166
  },
1162
1167
  emits: ["open", "markAllRead"],
1163
- setup(e, { emit: c }) {
1164
- var b;
1165
- const t = e, i = c, l = S(((b = t.categories[0]) == null ? void 0 : b.key) ?? "");
1166
- U(() => t.categories, (g) => {
1167
- var v;
1168
- g.some((m) => m.key === l.value) || (l.value = ((v = g[0]) == null ? void 0 : v.key) ?? "");
1168
+ setup(e, { emit: d }) {
1169
+ var c;
1170
+ const a = e, o = d, s = M(((c = a.categories[0]) == null ? void 0 : c.key) ?? "");
1171
+ Z(() => a.categories, (y) => {
1172
+ var h;
1173
+ y.some((p) => p.key === s.value) || (s.value = ((h = y[0]) == null ? void 0 : h.key) ?? "");
1169
1174
  });
1170
- const r = I(() => t.items.filter((g) => !g.read).length), n = I(() => t.items.filter((g) => g.category === l.value));
1171
- function u(g) {
1172
- g.currentTarget.open = !1;
1175
+ const u = E(() => a.items.filter((y) => !y.read).length), i = E(() => a.items.filter((y) => y.category === s.value));
1176
+ function n(y) {
1177
+ y.currentTarget.open = !1;
1173
1178
  }
1174
- return (g, v) => (a(), o("details", {
1179
+ return (y, h) => (t(), l("details", {
1175
1180
  class: "dsea-notifications",
1176
- onKeydown: J(u, ["esc"])
1181
+ onKeydown: be(n, ["esc"])
1177
1182
  }, [
1178
- s("summary", { "aria-label": e.label }, [
1179
- $(y(w), {
1183
+ r("summary", { "aria-label": e.label }, [
1184
+ x(f(L), {
1180
1185
  icon: "lucide:bell",
1181
1186
  size: 18
1182
1187
  }),
1183
- r.value ? (a(), o("span", rt, d(r.value > 99 ? "99+" : r.value), 1)) : p("", !0)
1184
- ], 8, it),
1185
- s("section", {
1188
+ u.value ? (t(), l("span", jt, m(u.value > 99 ? "99+" : u.value), 1)) : b("", !0)
1189
+ ], 8, Ht),
1190
+ r("section", {
1186
1191
  class: "dsea-notifications__panel",
1187
1192
  "aria-label": e.label
1188
1193
  }, [
1189
- s("header", null, d(e.label), 1),
1190
- s("div", ct, [
1191
- (a(!0), o(x, null, M(e.categories, (m) => (a(), o("button", {
1192
- key: m.key,
1194
+ r("header", null, m(e.label), 1),
1195
+ r("div", Xt, [
1196
+ (t(!0), l(F, null, K(e.categories, (p) => (t(), l("button", {
1197
+ key: p.key,
1193
1198
  type: "button",
1194
1199
  role: "tab",
1195
- "aria-selected": l.value === m.key,
1196
- onClick: (L) => l.value = m.key
1197
- }, d(m.label), 9, ut))), 128))
1200
+ "aria-selected": s.value === p.key,
1201
+ onClick: (N) => s.value = p.key
1202
+ }, m(p.label), 9, Gt))), 128))
1198
1203
  ]),
1199
- n.value.length ? (a(), o("ul", mt, [
1200
- (a(!0), o(x, null, M(n.value, (m) => (a(), o("li", {
1201
- key: m.id,
1202
- class: N({ "is-read": m.read })
1204
+ i.value.length ? (t(), l("ul", Yt, [
1205
+ (t(!0), l(F, null, K(i.value, (p) => (t(), l("li", {
1206
+ key: p.id,
1207
+ class: U({ "is-read": p.read })
1203
1208
  }, [
1204
- s("button", {
1209
+ r("button", {
1205
1210
  type: "button",
1206
- onClick: (L) => i("open", m)
1211
+ onClick: (N) => o("open", p)
1207
1212
  }, [
1208
- s("strong", null, d(m.title), 1),
1209
- m.description ? (a(), o("span", vt, d(m.description), 1)) : p("", !0),
1210
- m.time ? (a(), o("small", pt, d(m.time), 1)) : p("", !0)
1211
- ], 8, bt)
1213
+ r("strong", null, m(p.title), 1),
1214
+ p.description ? (t(), l("span", Zt, m(p.description), 1)) : b("", !0),
1215
+ p.time ? (t(), l("small", ea, m(p.time), 1)) : b("", !0)
1216
+ ], 8, Jt)
1212
1217
  ], 2))), 128))
1213
- ])) : (a(), o("p", gt, d(e.emptyLabel), 1)),
1214
- r.value ? (a(), o("button", {
1218
+ ])) : (t(), l("p", ta, m(e.emptyLabel), 1)),
1219
+ u.value ? (t(), l("button", {
1215
1220
  key: 2,
1216
1221
  type: "button",
1217
1222
  class: "dsea-notifications__mark",
1218
- onClick: v[0] || (v[0] = (m) => i("markAllRead"))
1219
- }, d(e.markAllLabel), 1)) : p("", !0)
1220
- ], 8, dt)
1223
+ onClick: h[0] || (h[0] = (p) => o("markAllRead"))
1224
+ }, m(e.markAllLabel), 1)) : b("", !0)
1225
+ ], 8, Qt)
1221
1226
  ], 32));
1222
1227
  }
1223
1228
  });
1224
- const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["aria-hidden", "inert"], yt = { class: "dsea-admin-layout__brand" }, kt = ["aria-label"], _t = {
1229
+ const na = /* @__PURE__ */ W(aa, [["__scopeId", "data-v-c5c5a82f"]]), la = ["aria-hidden", "inert"], oa = { class: "dsea-admin-layout__brand" }, ia = ["aria-label"], sa = {
1225
1230
  key: 0,
1226
1231
  class: "dsea-admin-layout__sidebar-footer"
1227
- }, wt = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], $t = ["aria-label"], Lt = { class: "dsea-admin-layout__main" }, Ct = {
1232
+ }, ra = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], ua = ["aria-label"], da = { class: "dsea-admin-layout__main" }, ca = {
1228
1233
  key: 0,
1229
1234
  class: "dsea-admin-layout__header"
1230
- }, St = ["aria-label", "aria-expanded"], xt = ["aria-label"], At = { class: "dsea-admin-layout__header-actions" }, Mt = {
1235
+ }, ma = ["aria-label", "aria-expanded"], va = ["aria-label"], ga = { class: "dsea-admin-layout__header-actions" }, ba = {
1231
1236
  key: 1,
1232
1237
  class: "dsea-admin-layout__tabs"
1233
- }, Tt = { class: "dsea-admin-layout__content" }, Bt = {
1238
+ }, ha = { class: "dsea-admin-layout__content" }, pa = {
1234
1239
  key: 2,
1235
1240
  class: "dsea-admin-layout__footer"
1236
- }, ll = /* @__PURE__ */ k({
1241
+ }, ko = /* @__PURE__ */ P({
1237
1242
  __name: "AdminLayout",
1238
1243
  props: {
1239
1244
  menus: { default: () => [] },
@@ -1257,86 +1262,86 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
1257
1262
  resizeLabel: { default: "Resize sidebar" }
1258
1263
  },
1259
1264
  emits: ["update:collapsed", "menuClick", "update:sidebarWidth"],
1260
- setup(e, { emit: c }) {
1261
- const t = e, i = c, { ports: l } = q(), r = S(!1), n = S(!1), u = I(() => t.showSidebar && t.mode !== "top" && !t.fullContent);
1262
- let b;
1263
- function g(h) {
1264
- return Math.min(t.maxSidebarWidth, Math.max(t.minSidebarWidth, h));
1265
- }
1266
- function v(h) {
1267
- if (h.button !== 0)
1265
+ setup(e, { emit: d }) {
1266
+ const a = e, o = d, { ports: s } = te(), u = M(!1), i = M(!1), n = E(() => a.showSidebar && a.mode !== "top" && !a.fullContent);
1267
+ let c;
1268
+ function y(v) {
1269
+ return Math.min(a.maxSidebarWidth, Math.max(a.minSidebarWidth, v));
1270
+ }
1271
+ function h(v) {
1272
+ if (v.button !== 0)
1268
1273
  return;
1269
- b == null || b();
1270
- const _ = h.clientX, C = t.sidebarWidth, E = (G) => i("update:sidebarWidth", g(C + G.clientX - _)), R = () => b == null ? void 0 : b();
1271
- window.addEventListener("pointermove", E), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", R), b = () => {
1272
- window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", R), b = void 0;
1274
+ c == null || c();
1275
+ const k = v.clientX, C = a.sidebarWidth, B = (G) => o("update:sidebarWidth", y(C + G.clientX - k)), V = () => c == null ? void 0 : c();
1276
+ window.addEventListener("pointermove", B), window.addEventListener("pointerup", V), window.addEventListener("pointercancel", V), c = () => {
1277
+ window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", V), window.removeEventListener("pointercancel", V), c = void 0;
1273
1278
  };
1274
1279
  }
1275
- function m(h) {
1276
- h.key !== "ArrowLeft" && h.key !== "ArrowRight" || (h.preventDefault(), i("update:sidebarWidth", g(t.sidebarWidth + (h.key === "ArrowRight" ? 10 : -10))));
1280
+ function p(v) {
1281
+ v.key !== "ArrowLeft" && v.key !== "ArrowRight" || (v.preventDefault(), o("update:sidebarWidth", y(a.sidebarWidth + (v.key === "ArrowRight" ? 10 : -10))));
1277
1282
  }
1278
- be({ prefixCls: S("dsea"), isMobile: r });
1279
- const L = I(() => ({
1280
- "--dsea-sidebar-width": `${t.sidebarWidth}px`,
1281
- "--dsea-collapsed-width": `${t.collapsedWidth}px`,
1282
- "--dsea-header-height": `${t.headerHeight}px`
1283
+ ze({ prefixCls: M("dsea"), isMobile: u });
1284
+ const N = E(() => ({
1285
+ "--dsea-sidebar-width": `${a.sidebarWidth}px`,
1286
+ "--dsea-collapsed-width": `${a.collapsedWidth}px`,
1287
+ "--dsea-header-height": `${a.headerHeight}px`
1283
1288
  }));
1284
- function F() {
1285
- const h = window.innerWidth < t.mobileBreakpoint;
1286
- h !== r.value && (r.value = h, n.value = !1);
1289
+ function A() {
1290
+ const v = window.innerWidth < a.mobileBreakpoint;
1291
+ v !== u.value && (u.value = v, i.value = !1);
1292
+ }
1293
+ function O() {
1294
+ i.value = !1;
1287
1295
  }
1288
1296
  function D() {
1289
- n.value = !1;
1290
- }
1291
- function W() {
1292
- r.value ? n.value = !n.value : i("update:collapsed", !t.collapsed);
1293
- }
1294
- function T(h) {
1295
- i("menuClick", h), D(), l.navigation.go(h);
1296
- }
1297
- function f(h) {
1298
- h.key === "Escape" && n.value && D();
1299
- }
1300
- return U(() => t.mobileBreakpoint, F), U(() => t.fullContent, () => {
1301
- n.value = !1;
1302
- }), Y(() => {
1303
- F(), window.addEventListener("resize", F), window.addEventListener("keydown", f);
1304
- }), Q(() => {
1305
- b == null || b(), window.removeEventListener("resize", F), window.removeEventListener("keydown", f);
1306
- }), (h, _) => (a(), o("div", {
1307
- class: N(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !u.value }]),
1308
- style: ie(L.value)
1297
+ u.value ? i.value = !i.value : o("update:collapsed", !a.collapsed);
1298
+ }
1299
+ function j(v) {
1300
+ o("menuClick", v), O(), s.navigation.go(v);
1301
+ }
1302
+ function $(v) {
1303
+ v.key === "Escape" && i.value && O();
1304
+ }
1305
+ return Z(() => a.mobileBreakpoint, A), Z(() => a.fullContent, () => {
1306
+ i.value = !1;
1307
+ }), ie(() => {
1308
+ A(), window.addEventListener("resize", A), window.addEventListener("keydown", $);
1309
+ }), ne(() => {
1310
+ c == null || c(), window.removeEventListener("resize", A), window.removeEventListener("keydown", $);
1311
+ }), (v, k) => (t(), l("div", {
1312
+ class: U(["dsea-admin-layout", { "dsea-admin-layout--mobile": u.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !n.value }]),
1313
+ style: he(N.value)
1309
1314
  }, [
1310
- u.value ? (a(), o("aside", {
1315
+ n.value ? (t(), l("aside", {
1311
1316
  key: 0,
1312
- class: N(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": n.value }]),
1313
- "aria-hidden": r.value && !n.value,
1314
- inert: r.value && !n.value
1317
+ class: U(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": i.value }]),
1318
+ "aria-hidden": u.value && !i.value,
1319
+ inert: u.value && !i.value
1315
1320
  }, [
1316
- s("div", yt, [
1317
- B(h.$slots, "brand", {}, () => [
1318
- $(Ce, {
1319
- "show-title": !e.collapsed || r.value
1321
+ r("div", oa, [
1322
+ T(v.$slots, "brand", {}, () => [
1323
+ x(ve, {
1324
+ "show-title": !e.collapsed || u.value
1320
1325
  }, null, 8, ["show-title"])
1321
1326
  ])
1322
1327
  ]),
1323
- s("nav", {
1328
+ r("nav", {
1324
1329
  class: "dsea-admin-layout__navigation",
1325
1330
  "aria-label": e.navigationLabel
1326
1331
  }, [
1327
- B(h.$slots, "navigation", {}, () => [
1328
- $(te, {
1332
+ T(v.$slots, "navigation", {}, () => [
1333
+ x(oe, {
1329
1334
  items: e.menus,
1330
- collapse: e.collapsed && !r.value,
1335
+ collapse: e.collapsed && !u.value,
1331
1336
  theme: e.menuTheme,
1332
- onMenuClick: T
1337
+ onMenuClick: j
1333
1338
  }, null, 8, ["items", "collapse", "theme"])
1334
1339
  ])
1335
- ], 8, kt),
1336
- h.$slots.sidebarFooter ? (a(), o("div", _t, [
1337
- B(h.$slots, "sidebarFooter")
1338
- ])) : p("", !0),
1339
- e.resizableSidebar && !r.value && !e.collapsed ? (a(), o("div", {
1340
+ ], 8, ia),
1341
+ v.$slots.sidebarFooter ? (t(), l("div", sa, [
1342
+ T(v.$slots, "sidebarFooter")
1343
+ ])) : b("", !0),
1344
+ e.resizableSidebar && !u.value && !e.collapsed ? (t(), l("div", {
1340
1345
  key: 1,
1341
1346
  class: "dsea-admin-layout__resize",
1342
1347
  role: "separator",
@@ -1346,104 +1351,1140 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
1346
1351
  "aria-valuenow": e.sidebarWidth,
1347
1352
  "aria-valuemin": e.minSidebarWidth,
1348
1353
  "aria-valuemax": e.maxSidebarWidth,
1349
- onPointerdown: v,
1350
- onKeydown: m
1351
- }, null, 40, wt)) : p("", !0)
1352
- ], 10, ft)) : p("", !0),
1353
- u.value && r.value && n.value ? (a(), o("button", {
1354
+ onPointerdown: h,
1355
+ onKeydown: p
1356
+ }, null, 40, ra)) : b("", !0)
1357
+ ], 10, la)) : b("", !0),
1358
+ n.value && u.value && i.value ? (t(), l("button", {
1354
1359
  key: 1,
1355
1360
  type: "button",
1356
1361
  class: "dsea-admin-layout__scrim",
1357
1362
  "aria-label": e.closeNavigationLabel,
1358
- onClick: D
1359
- }, null, 8, $t)) : p("", !0),
1360
- s("div", Lt, [
1361
- e.fullContent ? p("", !0) : (a(), o("header", Ct, [
1362
- u.value ? (a(), o("button", {
1363
+ onClick: O
1364
+ }, null, 8, ua)) : b("", !0),
1365
+ r("div", da, [
1366
+ e.fullContent ? b("", !0) : (t(), l("header", ca, [
1367
+ n.value ? (t(), l("button", {
1363
1368
  key: 0,
1364
1369
  type: "button",
1365
1370
  class: "dsea-admin-layout__toggle",
1366
1371
  "aria-label": e.navigationLabel,
1367
- "aria-expanded": r.value ? n.value : !e.collapsed,
1368
- onClick: W
1372
+ "aria-expanded": u.value ? i.value : !e.collapsed,
1373
+ onClick: D
1369
1374
  }, [
1370
- $(y(w), {
1371
- icon: r.value && n.value ? "lucide:x" : "lucide:menu",
1375
+ x(f(L), {
1376
+ icon: u.value && i.value ? "lucide:x" : "lucide:menu",
1372
1377
  size: 20
1373
1378
  }, null, 8, ["icon"])
1374
- ], 8, St)) : p("", !0),
1375
- B(h.$slots, "header"),
1376
- e.mode !== "sidebar" ? (a(), o("nav", {
1379
+ ], 8, ma)) : b("", !0),
1380
+ T(v.$slots, "header"),
1381
+ e.mode !== "sidebar" ? (t(), l("nav", {
1377
1382
  key: 1,
1378
1383
  class: "dsea-admin-layout__top-navigation",
1379
1384
  "aria-label": e.topNavigationLabel
1380
1385
  }, [
1381
- B(h.$slots, "topNavigation", {}, () => [
1382
- $(te, {
1386
+ T(v.$slots, "topNavigation", {}, () => [
1387
+ x(oe, {
1383
1388
  items: e.mode === "top" ? e.menus : e.topMenus,
1384
1389
  mode: "horizontal",
1385
1390
  type: "top",
1386
1391
  theme: e.topMenuTheme,
1387
- onMenuClick: T
1392
+ onMenuClick: j
1388
1393
  }, null, 8, ["items", "theme"])
1389
1394
  ])
1390
- ], 8, xt)) : p("", !0),
1391
- s("div", At, [
1392
- B(h.$slots, "headerActions")
1395
+ ], 8, va)) : b("", !0),
1396
+ r("div", ga, [
1397
+ T(v.$slots, "headerActions")
1393
1398
  ])
1394
1399
  ])),
1395
- !e.fullContent && h.$slots.tabs ? (a(), o("div", Mt, [
1396
- B(h.$slots, "tabs")
1397
- ])) : p("", !0),
1398
- s("main", Tt, [
1399
- B(h.$slots, "default")
1400
+ !e.fullContent && v.$slots.tabs ? (t(), l("div", ba, [
1401
+ T(v.$slots, "tabs")
1402
+ ])) : b("", !0),
1403
+ r("main", ha, [
1404
+ T(v.$slots, "default")
1400
1405
  ]),
1401
- !e.fullContent && h.$slots.footer ? (a(), o("footer", Bt, [
1402
- B(h.$slots, "footer")
1403
- ])) : p("", !0)
1406
+ !e.fullContent && v.$slots.footer ? (t(), l("footer", pa, [
1407
+ T(v.$slots, "footer")
1408
+ ])) : b("", !0)
1404
1409
  ])
1405
1410
  ], 6));
1406
1411
  }
1407
1412
  });
1408
- const Pt = ["aria-label"], It = {
1413
+ const fa = ["aria-label"], ya = {
1409
1414
  key: 0,
1410
1415
  class: "dsea-breadcrumb__separator",
1411
1416
  "aria-hidden": "true"
1412
- }, Et = ["onClick"], Ft = ["aria-current"], Nt = /* @__PURE__ */ k({
1417
+ }, ka = ["onClick"], wa = ["aria-current"], Sa = /* @__PURE__ */ P({
1413
1418
  __name: "AdminBreadcrumb",
1414
1419
  props: {
1415
1420
  items: {},
1416
1421
  label: {}
1417
1422
  },
1418
1423
  setup(e) {
1419
- const { ports: c } = q();
1420
- function t(i) {
1421
- c.navigation.go(i);
1424
+ const { ports: d } = te();
1425
+ function a(o) {
1426
+ d.navigation.go(o);
1422
1427
  }
1423
- return (i, l) => e.items.length ? (a(), o("nav", {
1428
+ return (o, s) => e.items.length ? (t(), l("nav", {
1424
1429
  key: 0,
1425
1430
  class: "dsea-breadcrumb",
1426
1431
  "aria-label": e.label
1427
1432
  }, [
1428
- s("ol", null, [
1429
- (a(!0), o(x, null, M(e.items, (r, n) => (a(), o("li", {
1430
- key: r.path || n
1433
+ r("ol", null, [
1434
+ (t(!0), l(F, null, K(e.items, (u, i) => (t(), l("li", {
1435
+ key: u.path || i
1431
1436
  }, [
1432
- n ? (a(), o("span", It, "/")) : p("", !0),
1433
- r.path && n < e.items.length - 1 ? (a(), o("button", {
1437
+ i ? (t(), l("span", ya, "/")) : b("", !0),
1438
+ u.path && i < e.items.length - 1 ? (t(), l("button", {
1434
1439
  key: 1,
1435
1440
  type: "button",
1436
- onClick: (u) => t(r.path)
1437
- }, d(r.title), 9, Et)) : (a(), o("span", {
1441
+ onClick: (n) => a(u.path)
1442
+ }, m(u.title), 9, ka)) : (t(), l("span", {
1438
1443
  key: 2,
1439
- "aria-current": n === e.items.length - 1 ? "page" : void 0
1440
- }, d(r.title), 9, Ft))
1444
+ "aria-current": i === e.items.length - 1 ? "page" : void 0
1445
+ }, m(u.title), 9, wa))
1441
1446
  ]))), 128))
1442
1447
  ])
1443
- ], 8, Pt)) : p("", !0);
1448
+ ], 8, fa)) : b("", !0);
1449
+ }
1450
+ });
1451
+ const _a = /* @__PURE__ */ W(Sa, [["__scopeId", "data-v-49bfd66c"]]), $a = { class: "dsea-admin-tabs" }, Ca = {
1452
+ class: "dsea-admin-tabs__list",
1453
+ role: "tablist"
1454
+ }, xa = ["draggable", "onDragstart", "onDrop", "onContextmenu"], La = ["aria-selected", "onClick"], Ma = ["aria-label", "onClick"], Aa = {
1455
+ key: 0,
1456
+ class: "dsea-admin-tabs__tools"
1457
+ }, Ta = ["aria-label"], Pa = ["aria-label"], Ba = ["aria-label"], Fa = ["onClick"], Ea = /* @__PURE__ */ P({
1458
+ __name: "AdminTabs",
1459
+ props: {
1460
+ tabs: {},
1461
+ activeKey: {},
1462
+ labels: {},
1463
+ navigateOnSelect: { type: Boolean, default: !0 },
1464
+ showRedo: { type: Boolean, default: !0 },
1465
+ showQuick: { type: Boolean, default: !0 },
1466
+ showFold: { type: Boolean, default: !1 },
1467
+ canDrag: { type: Boolean, default: !1 }
1468
+ },
1469
+ emits: ["select", "close", "refresh", "closeAction", "fold", "reorder"],
1470
+ setup(e, { emit: d }) {
1471
+ const a = e, o = d, { ports: s } = te(), u = M(""), i = M(null), n = E(() => [
1472
+ { event: "left", text: a.labels.closeLeft },
1473
+ { event: "right", text: a.labels.closeRight },
1474
+ { event: "others", text: a.labels.closeOthers },
1475
+ { event: "all", text: a.labels.closeAll }
1476
+ ]);
1477
+ function c($) {
1478
+ i.value = null, o("select", $), a.navigateOnSelect && s.navigation.go($);
1479
+ }
1480
+ function y($) {
1481
+ o("close", $);
1482
+ }
1483
+ function h($) {
1484
+ $ && o("closeAction", $.event, a.activeKey);
1485
+ }
1486
+ function p($) {
1487
+ a.canDrag && $.dataTransfer && ($.dataTransfer.dropEffect = "move");
1488
+ }
1489
+ function N($) {
1490
+ if (!a.canDrag || !u.value || u.value === $)
1491
+ return;
1492
+ const v = a.tabs.map((B) => B.key), k = v.indexOf(u.value), C = v.indexOf($);
1493
+ k < 0 || C < 0 || (v.splice(C, 0, v.splice(k, 1)[0]), o("reorder", v), u.value = "");
1494
+ }
1495
+ function A($, v) {
1496
+ i.value = {
1497
+ key: $,
1498
+ x: Math.max(0, Math.min(v.clientX, window.innerWidth - 180)),
1499
+ y: Math.max(0, Math.min(v.clientY, window.innerHeight - 180))
1500
+ };
1501
+ }
1502
+ function O($) {
1503
+ i.value && (o("closeAction", $, i.value.key), i.value = null);
1504
+ }
1505
+ function D($) {
1506
+ var v, k;
1507
+ (k = (v = $.target) == null ? void 0 : v.closest) != null && k.call(v, ".dsea-admin-tabs__context") || (i.value = null);
1508
+ }
1509
+ function j($) {
1510
+ $.key === "Escape" && (i.value = null);
1511
+ }
1512
+ return ie(() => {
1513
+ window.addEventListener("pointerdown", D), window.addEventListener("keydown", j), window.addEventListener("resize", D), window.addEventListener("scroll", D, !0);
1514
+ }), ne(() => {
1515
+ window.removeEventListener("pointerdown", D), window.removeEventListener("keydown", j), window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
1516
+ }), ($, v) => (t(), l(F, null, [
1517
+ r("div", $a, [
1518
+ r("div", Ca, [
1519
+ (t(!0), l(F, null, K(e.tabs, (k) => (t(), l("div", {
1520
+ key: k.key,
1521
+ class: U(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": k.key === e.activeKey }]),
1522
+ draggable: e.canDrag,
1523
+ onDragstart: (C) => u.value = k.key,
1524
+ onDragend: v[0] || (v[0] = (C) => u.value = ""),
1525
+ onDragover: ee(p, ["prevent"]),
1526
+ onDrop: ee((C) => N(k.key), ["prevent"]),
1527
+ onContextmenu: ee((C) => A(k.key, C), ["prevent"])
1528
+ }, [
1529
+ r("button", {
1530
+ type: "button",
1531
+ role: "tab",
1532
+ "aria-selected": k.key === e.activeKey,
1533
+ class: "dsea-admin-tabs__select",
1534
+ onClick: (C) => c(k.key)
1535
+ }, [
1536
+ k.icon ? (t(), z(f(L), {
1537
+ key: 0,
1538
+ icon: k.icon,
1539
+ size: 14
1540
+ }, null, 8, ["icon"])) : b("", !0),
1541
+ r("span", null, m(k.label), 1)
1542
+ ], 8, La),
1543
+ k.affix ? b("", !0) : (t(), l("button", {
1544
+ key: 0,
1545
+ type: "button",
1546
+ class: "dsea-admin-tabs__close",
1547
+ "aria-label": `${e.labels.close}: ${k.label}`,
1548
+ onClick: (C) => y(k.key)
1549
+ }, [
1550
+ x(f(L), {
1551
+ icon: "lucide:x",
1552
+ size: 14
1553
+ })
1554
+ ], 8, Ma))
1555
+ ], 42, xa))), 128))
1556
+ ]),
1557
+ e.tabs.length ? (t(), l("div", Aa, [
1558
+ e.showRedo ? (t(), l("button", {
1559
+ key: 0,
1560
+ type: "button",
1561
+ "aria-label": e.labels.refresh,
1562
+ onClick: v[1] || (v[1] = (k) => o("refresh", e.activeKey))
1563
+ }, [
1564
+ x(f(L), {
1565
+ icon: "lucide:refresh-cw",
1566
+ size: 16
1567
+ })
1568
+ ], 8, Ta)) : b("", !0),
1569
+ e.showQuick ? (t(), z(f(Fe), {
1570
+ key: 1,
1571
+ "drop-menu-list": n.value,
1572
+ trigger: ["click"],
1573
+ onMenuEvent: h
1574
+ }, {
1575
+ default: re(() => [
1576
+ r("button", {
1577
+ type: "button",
1578
+ "aria-label": e.labels.actions
1579
+ }, [
1580
+ x(f(L), {
1581
+ icon: "lucide:chevron-down",
1582
+ size: 16
1583
+ })
1584
+ ], 8, Pa)
1585
+ ]),
1586
+ _: 1
1587
+ }, 8, ["drop-menu-list"])) : b("", !0),
1588
+ e.showFold ? (t(), l("button", {
1589
+ key: 2,
1590
+ type: "button",
1591
+ "aria-label": e.labels.fold || "Toggle full content",
1592
+ onClick: v[2] || (v[2] = (k) => o("fold"))
1593
+ }, [
1594
+ x(f(L), {
1595
+ icon: "lucide:maximize",
1596
+ size: 16
1597
+ })
1598
+ ], 8, Ba)) : b("", !0)
1599
+ ])) : b("", !0)
1600
+ ]),
1601
+ (t(), z(Pe, { to: "body" }, [
1602
+ i.value ? (t(), l("div", {
1603
+ key: 0,
1604
+ class: "dsea-admin-tabs__context",
1605
+ role: "menu",
1606
+ style: he({ left: `${i.value.x}px`, top: `${i.value.y}px` })
1607
+ }, [
1608
+ (t(!0), l(F, null, K(n.value, (k) => (t(), l("button", {
1609
+ key: k.event,
1610
+ type: "button",
1611
+ role: "menuitem",
1612
+ onClick: (C) => O(k.event)
1613
+ }, m(k.text), 9, Fa))), 128))
1614
+ ], 4)) : b("", !0)
1615
+ ]))
1616
+ ], 64));
1617
+ }
1618
+ });
1619
+ const Ia = { class: "dsea-settings-panel" }, Na = ["for"], za = { key: 1 }, Da = ["aria-label"], Ra = ["aria-label", "aria-pressed", "disabled", "onClick"], Ka = ["aria-label"], Wa = ["aria-pressed", "disabled", "onClick"], Oa = /* @__PURE__ */ P({
1620
+ __name: "SettingsPanel",
1621
+ props: {
1622
+ sections: {}
1623
+ },
1624
+ emits: ["change"],
1625
+ setup(e, { emit: d }) {
1626
+ const a = d;
1627
+ function o(n, c) {
1628
+ a("change", n, c);
1629
+ }
1630
+ function s(n, c) {
1631
+ typeof c == "boolean" && o(n, c);
1632
+ }
1633
+ function u(n, c) {
1634
+ (typeof c == "string" || typeof c == "number") && o(n, c);
1635
+ }
1636
+ function i(n, c) {
1637
+ typeof c == "number" && Number.isFinite(c) && o(n, c);
1638
+ }
1639
+ return (n, c) => (t(), l("div", Ia, [
1640
+ (t(!0), l(F, null, K(e.sections, (y) => (t(), l("section", {
1641
+ key: y.title,
1642
+ class: "dsea-settings-panel__section"
1643
+ }, [
1644
+ r("h3", null, m(y.title), 1),
1645
+ (t(!0), l(F, null, K(y.items, (h) => (t(), l("div", {
1646
+ key: h.key,
1647
+ class: U(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": h.type === "color" || h.type === "mode" }])
1648
+ }, [
1649
+ h.type === "switch" || h.type === "select" || h.type === "number" ? (t(), l("label", {
1650
+ key: 0,
1651
+ for: h.key
1652
+ }, m(h.label), 9, Na)) : (t(), l("span", za, m(h.label), 1)),
1653
+ h.type === "switch" ? (t(), z(f(Ze), {
1654
+ key: 2,
1655
+ id: h.key,
1656
+ checked: h.value,
1657
+ disabled: h.disabled,
1658
+ onChange: (p) => s(h.key, p)
1659
+ }, null, 8, ["id", "checked", "disabled", "onChange"])) : h.type === "select" ? (t(), z(f(et), {
1660
+ key: 3,
1661
+ id: h.key,
1662
+ value: h.value,
1663
+ options: h.options,
1664
+ disabled: h.disabled,
1665
+ class: "dsea-settings-panel__select",
1666
+ onChange: (p) => u(h.key, p)
1667
+ }, null, 8, ["id", "value", "options", "disabled", "onChange"])) : h.type === "number" ? (t(), z(f(tt), {
1668
+ key: 4,
1669
+ id: h.key,
1670
+ value: h.value,
1671
+ min: h.min,
1672
+ max: h.max,
1673
+ step: h.step,
1674
+ disabled: h.disabled,
1675
+ class: "dsea-settings-panel__number",
1676
+ onChange: (p) => i(h.key, p)
1677
+ }, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : h.type === "color" ? (t(), l("div", {
1678
+ key: 5,
1679
+ class: "dsea-settings-panel__colors",
1680
+ role: "group",
1681
+ "aria-label": h.label
1682
+ }, [
1683
+ (t(!0), l(F, null, K(h.colors, (p) => (t(), l("button", {
1684
+ key: p,
1685
+ type: "button",
1686
+ class: U(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": h.value === p }]),
1687
+ style: he({ backgroundColor: p }),
1688
+ "aria-label": p,
1689
+ "aria-pressed": h.value === p,
1690
+ disabled: h.disabled,
1691
+ onClick: (N) => o(h.key, p)
1692
+ }, [
1693
+ h.value === p ? (t(), z(f(L), {
1694
+ key: 0,
1695
+ icon: "lucide:check",
1696
+ size: 14
1697
+ })) : b("", !0)
1698
+ ], 14, Ra))), 128))
1699
+ ], 8, Da)) : h.type === "mode" ? (t(), l("div", {
1700
+ key: 6,
1701
+ class: "dsea-settings-panel__modes",
1702
+ role: "group",
1703
+ "aria-label": h.label
1704
+ }, [
1705
+ (t(!0), l(F, null, K(h.options, (p) => (t(), l("button", {
1706
+ key: p.value,
1707
+ type: "button",
1708
+ class: U({ active: h.value === p.value }),
1709
+ "aria-pressed": h.value === p.value,
1710
+ disabled: h.disabled,
1711
+ onClick: (N) => o(h.key, p.value)
1712
+ }, [
1713
+ p.icon ? (t(), z(f(L), {
1714
+ key: 0,
1715
+ icon: p.icon,
1716
+ size: 16
1717
+ }, null, 8, ["icon"])) : b("", !0),
1718
+ Q(" " + m(p.label), 1)
1719
+ ], 10, Wa))), 128))
1720
+ ], 8, Ka)) : b("", !0)
1721
+ ], 2))), 128))
1722
+ ]))), 128))
1723
+ ]));
1724
+ }
1725
+ });
1726
+ const Va = /* @__PURE__ */ P({
1727
+ __name: "AdminSettingsDrawer",
1728
+ props: {
1729
+ open: { type: Boolean },
1730
+ title: {},
1731
+ sections: {},
1732
+ width: { default: 340 },
1733
+ resetLabel: {}
1734
+ },
1735
+ emits: ["update:open", "change", "reset"],
1736
+ setup(e, { emit: d }) {
1737
+ const a = d;
1738
+ return (o, s) => (t(), z(f(at), {
1739
+ visible: e.open,
1740
+ title: e.title,
1741
+ placement: "right",
1742
+ width: e.width,
1743
+ onClose: s[2] || (s[2] = (u) => a("update:open", !1))
1744
+ }, Ge({
1745
+ default: re(() => [
1746
+ x(Oa, {
1747
+ sections: e.sections,
1748
+ onChange: s[0] || (s[0] = (u, i) => a("change", u, i))
1749
+ }, null, 8, ["sections"])
1750
+ ]),
1751
+ _: 2
1752
+ }, [
1753
+ o.$slots.footer || e.resetLabel ? {
1754
+ name: "footer",
1755
+ fn: re(() => [
1756
+ T(o.$slots, "footer", {}, () => [
1757
+ r("button", {
1758
+ type: "button",
1759
+ class: "dsea-settings-drawer__reset",
1760
+ onClick: s[1] || (s[1] = (u) => a("reset"))
1761
+ }, m(e.resetLabel), 1)
1762
+ ])
1763
+ ]),
1764
+ key: "0"
1765
+ } : void 0
1766
+ ]), 1032, ["visible", "title", "width"]));
1444
1767
  }
1445
1768
  });
1446
- const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { class: "dsea-iframe-view" }, Dt = ["src", "title", "loading", "referrerpolicy"], Kt = /* @__PURE__ */ k({
1769
+ const ae = {
1770
+ darkMode: "light",
1771
+ themeColor: "#0960bd",
1772
+ grayMode: !1,
1773
+ colorWeak: !1,
1774
+ fullContent: !1,
1775
+ contentMode: "full",
1776
+ showLogo: !0,
1777
+ showFooter: !1,
1778
+ showBreadCrumb: !0,
1779
+ showBreadCrumbIcon: !0,
1780
+ showSettingButton: !0,
1781
+ headerSetting: {
1782
+ show: !0,
1783
+ fixed: !0,
1784
+ theme: "light",
1785
+ bgColor: "#ffffff",
1786
+ showSearch: !0,
1787
+ showNotice: !0,
1788
+ showFullScreen: !0
1789
+ },
1790
+ menuSetting: {
1791
+ type: "mix",
1792
+ mode: "inline",
1793
+ show: !0,
1794
+ hidden: !1,
1795
+ fixed: !0,
1796
+ collapsed: !1,
1797
+ collapsedShowTitle: !1,
1798
+ menuWidth: 240,
1799
+ bgColor: "#212121",
1800
+ theme: "dark",
1801
+ split: !0,
1802
+ topMenuAlign: "center",
1803
+ trigger: "FOOTER",
1804
+ accordion: !0,
1805
+ canDrag: !1,
1806
+ mixSideTrigger: "click",
1807
+ mixSideFixed: !1,
1808
+ closeMixSidebarOnChange: !1
1809
+ },
1810
+ multiTabsSetting: {
1811
+ show: !0,
1812
+ canDrag: !0,
1813
+ showQuick: !0,
1814
+ showRedo: !0,
1815
+ showFold: !0
1816
+ }
1817
+ }, Ua = ["sidebar", "top-menu", "mix", "mix-sidebar"], ye = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i;
1818
+ function ke(e = {}) {
1819
+ const d = {
1820
+ ...ae,
1821
+ ...e,
1822
+ headerSetting: { ...ae.headerSetting, ...e.headerSetting },
1823
+ menuSetting: { ...ae.menuSetting, ...e.menuSetting },
1824
+ multiTabsSetting: { ...ae.multiTabsSetting, ...e.multiTabsSetting }
1825
+ };
1826
+ return Ua.includes(d.menuSetting.type) || (d.menuSetting.type = "mix"), d.menuSetting.type === "top-menu" ? d.menuSetting.mode = "horizontal" : d.menuSetting.mode = "inline", Number.isFinite(d.menuSetting.menuWidth) || (d.menuSetting.menuWidth = 240), d.menuSetting.menuWidth = Math.max(160, Math.min(420, d.menuSetting.menuWidth)), ye.test(d.themeColor) || (d.themeColor = ae.themeColor), ye.test(d.headerSetting.bgColor) || (d.headerSetting.bgColor = ae.headerSetting.bgColor), ye.test(d.menuSetting.bgColor) || (d.menuSetting.bgColor = ae.menuSetting.bgColor), d;
1827
+ }
1828
+ function qa(e, d = "admin-shell:classic-layout", a = {}) {
1829
+ const o = e == null ? void 0 : e.read(d), s = M(ke({
1830
+ ...a,
1831
+ ...o,
1832
+ headerSetting: { ...a.headerSetting, ...o == null ? void 0 : o.headerSetting },
1833
+ menuSetting: { ...a.menuSetting, ...o == null ? void 0 : o.menuSetting },
1834
+ multiTabsSetting: { ...a.multiTabsSetting, ...o == null ? void 0 : o.multiTabsSetting }
1835
+ }));
1836
+ function u(n) {
1837
+ return s.value = ke({
1838
+ ...s.value,
1839
+ ...n,
1840
+ headerSetting: { ...s.value.headerSetting, ...n.headerSetting },
1841
+ menuSetting: { ...s.value.menuSetting, ...n.menuSetting },
1842
+ multiTabsSetting: { ...s.value.multiTabsSetting, ...n.multiTabsSetting }
1843
+ }), e == null || e.write(d, Ye(s.value)), s.value;
1844
+ }
1845
+ function i() {
1846
+ return s.value = ke(a), e == null || e.remove(d), s.value;
1847
+ }
1848
+ return { settings: s, patch: u, reset: i };
1849
+ }
1850
+ function De(e) {
1851
+ var d;
1852
+ if (!(e.disabled || (d = e.meta) != null && d.hideMenu)) {
1853
+ for (const a of e.children ?? []) {
1854
+ const o = De(a);
1855
+ if (o)
1856
+ return o;
1857
+ }
1858
+ return e.path && !/[:*]/.test(e.path) ? e.path : void 0;
1859
+ }
1860
+ }
1861
+ function Ha(e, d, a) {
1862
+ var y;
1863
+ const o = e.filter((h) => {
1864
+ var p;
1865
+ return !((p = h.meta) != null && p.hideMenu);
1866
+ }), s = ue(o, d)[0] ?? ((y = o[0]) == null ? void 0 : y.path), u = o.find((h) => h.path === s), i = a.type === "mix" && a.split, n = a.type === "top-menu" || i ? o.map((h) => ({ ...h, children: [] })) : [], c = i ? (u == null ? void 0 : u.children) ?? [] : o;
1867
+ return { rootPath: s, root: u, top: n, sidebar: c, split: i };
1868
+ }
1869
+ const ja = {
1870
+ key: 0,
1871
+ class: "dsea-classic-layout__header"
1872
+ }, Qa = { class: "dsea-classic-layout__header-left" }, Xa = {
1873
+ key: 0,
1874
+ class: "dsea-classic-layout__header-brand"
1875
+ }, Ga = ["aria-label", "aria-expanded"], Ya = ["aria-label"], Ja = { class: "dsea-classic-layout__header-actions" }, Za = ["aria-label", "title"], en = { class: "dsea-classic-layout__body" }, tn = ["aria-hidden", "inert"], an = { class: "dsea-classic-layout__rail" }, nn = {
1876
+ key: 0,
1877
+ class: "dsea-classic-layout__sidebar-brand"
1878
+ }, ln = ["title", "onClick", "onMouseenter"], on = { key: 1 }, sn = ["aria-label"], rn = { class: "dsea-classic-layout__mix-panel-header" }, un = ["aria-label", "aria-pressed"], dn = {
1879
+ key: 0,
1880
+ class: "dsea-classic-layout__sidebar-brand"
1881
+ }, cn = ["aria-label"], mn = ["aria-label"], vn = ["aria-label", "aria-valuenow"], gn = ["aria-label"], bn = { class: "dsea-classic-layout__workspace" }, hn = {
1882
+ key: 0,
1883
+ class: "dsea-classic-layout__tabs"
1884
+ }, pn = {
1885
+ key: 1,
1886
+ class: "dsea-classic-layout__footer"
1887
+ }, fn = ["aria-label", "title"], yn = { class: "dsea-classic-layout__content dsea-classic-layout__content--full" }, wo = /* @__PURE__ */ P({
1888
+ __name: "ClassicAdminLayout",
1889
+ props: {
1890
+ menus: {},
1891
+ tabs: { default: () => [] },
1892
+ activeTab: { default: "" },
1893
+ breadcrumbs: { default: () => [] },
1894
+ headerPorts: {},
1895
+ initialSettings: { default: () => ({}) },
1896
+ settingsCache: {},
1897
+ settingsKey: { default: "admin-shell:classic-layout" },
1898
+ mobileBreakpoint: { default: 992 },
1899
+ tabLabels: { default: () => ({
1900
+ refresh: "Refresh",
1901
+ actions: "Tab actions",
1902
+ close: "Close",
1903
+ closeLeft: "Close left",
1904
+ closeRight: "Close right",
1905
+ closeOthers: "Close others",
1906
+ closeAll: "Close all"
1907
+ }) }
1908
+ },
1909
+ emits: ["settingsChange", "menuClick", "tabSelect", "tabClose", "tabRefresh", "tabCloseAction", "tabReorder"],
1910
+ setup(e, { emit: d }) {
1911
+ var xe;
1912
+ const a = e, o = d, { ports: s } = te(), u = Se(), i = qa(a.settingsCache ?? s.cache, a.settingsKey, a.initialSettings), n = i.settings, c = M(!1), y = M(!1), h = M(!1), p = M(((xe = u.currentRoute.value.meta) == null ? void 0 : xe.currentActiveMenu) || u.currentRoute.value.path), N = M(""), A = M(n.value.menuSetting.mixSideFixed), O = E(() => n.value.menuSetting.type), D = E(() => Ha(a.menus, p.value, n.value.menuSetting)), j = E(() => a.menus.find((g) => g.path === N.value)), $ = E(() => {
1913
+ var g;
1914
+ return ((g = j.value) == null ? void 0 : g.children) ?? [];
1915
+ }), v = E(() => c.value ? a.menus : D.value.sidebar), k = E(() => n.value.menuSetting.show && !n.value.menuSetting.hidden && (c.value || O.value !== "top-menu" && (O.value !== "mix" || !D.value.split || D.value.sidebar.length > 0))), C = E(() => n.value.headerSetting.show && !n.value.fullContent), B = E(() => [
1916
+ `dsea-classic-layout--${O.value}`,
1917
+ {
1918
+ "is-mobile": c.value,
1919
+ "is-collapsed": n.value.menuSetting.collapsed,
1920
+ "is-full-content": n.value.fullContent,
1921
+ "has-fixed-header": n.value.headerSetting.fixed,
1922
+ "has-sidebar": k.value,
1923
+ "has-header": C.value,
1924
+ "has-pinned-mix": O.value === "mix-sidebar" && n.value.menuSetting.mixSideFixed && A.value
1925
+ }
1926
+ ]), V = E(() => ({
1927
+ "--classic-header-height": C.value ? "48px" : "0px",
1928
+ "--classic-menu-width": `${n.value.menuSetting.menuWidth}px`,
1929
+ "--classic-side-width": `${n.value.menuSetting.collapsed ? n.value.menuSetting.collapsedShowTitle ? 80 : 48 : n.value.menuSetting.menuWidth}px`,
1930
+ "--classic-rail-width": `${n.value.menuSetting.collapsed ? 48 : 80}px`,
1931
+ "--classic-header-bg": n.value.headerSetting.bgColor,
1932
+ "--classic-sider-bg": n.value.menuSetting.bgColor,
1933
+ "--classic-primary": n.value.themeColor
1934
+ }));
1935
+ function G(g) {
1936
+ return s.locale.translate(g);
1937
+ }
1938
+ function de(g, w) {
1939
+ const S = ue(g, w);
1940
+ function _(I, R) {
1941
+ for (const q of I) {
1942
+ if (q.path === R)
1943
+ return q;
1944
+ const Le = _(q.children ?? [], R);
1945
+ if (Le)
1946
+ return Le;
1947
+ }
1948
+ }
1949
+ return S.map((I) => {
1950
+ const R = _(g, I);
1951
+ return { title: G((R == null ? void 0 : R.name) ?? I), path: I };
1952
+ });
1953
+ }
1954
+ const ce = E(() => a.breadcrumbs.length ? a.breadcrumbs : de(a.menus, p.value)), H = E(() => s.locale.getLocale().toLowerCase().startsWith("zh") ? {
1955
+ navigation: "侧边导航",
1956
+ topNavigation: "顶部导航",
1957
+ toggleNavigation: "折叠导航",
1958
+ closeNavigation: "关闭导航",
1959
+ resizeNavigation: "调整导航宽度",
1960
+ pinNavigation: "固定菜单",
1961
+ breadcrumb: "面包屑",
1962
+ settings: "偏好设置",
1963
+ reset: "恢复默认",
1964
+ restoreLayout: "退出全屏内容"
1965
+ } : {
1966
+ navigation: "Navigation",
1967
+ topNavigation: "Top navigation",
1968
+ toggleNavigation: "Toggle navigation",
1969
+ closeNavigation: "Close navigation",
1970
+ resizeNavigation: "Resize navigation",
1971
+ pinNavigation: "Pin menu",
1972
+ breadcrumb: "Breadcrumb",
1973
+ settings: "Settings",
1974
+ reset: "Reset defaults",
1975
+ restoreLayout: "Restore layout"
1976
+ }), Re = E(() => {
1977
+ const g = n.value, w = s.locale.getLocale().toLowerCase().startsWith("zh"), S = (_, I) => w ? _ : I;
1978
+ return [
1979
+ { title: S("布局", "Layout"), items: [
1980
+ {
1981
+ key: "menuSetting.type",
1982
+ type: "mode",
1983
+ label: S("导航布局", "Navigation layout"),
1984
+ value: g.menuSetting.type,
1985
+ options: [
1986
+ { value: "sidebar", label: S("左侧", "Sidebar"), icon: "lucide:panel-left" },
1987
+ { value: "mix", label: S("混合", "Mixed"), icon: "lucide:panels-top-left" },
1988
+ { value: "mix-sidebar", label: S("双栏", "Rail"), icon: "lucide:panel-left-dashed" },
1989
+ { value: "top-menu", label: S("顶部", "Top"), icon: "lucide:panel-top" }
1990
+ ]
1991
+ },
1992
+ {
1993
+ key: "menuSetting.split",
1994
+ type: "switch",
1995
+ label: S("分割菜单", "Split menu"),
1996
+ value: g.menuSetting.split,
1997
+ disabled: g.menuSetting.type !== "mix"
1998
+ },
1999
+ { key: "menuSetting.collapsed", type: "switch", label: S("折叠侧栏", "Collapse sidebar"), value: g.menuSetting.collapsed },
2000
+ { key: "menuSetting.fixed", type: "switch", label: S("固定侧栏", "Fixed sidebar"), value: g.menuSetting.fixed },
2001
+ {
2002
+ key: "menuSetting.menuWidth",
2003
+ type: "number",
2004
+ label: S("侧栏宽度", "Sidebar width"),
2005
+ value: g.menuSetting.menuWidth,
2006
+ min: 160,
2007
+ max: 420,
2008
+ step: 8
2009
+ },
2010
+ {
2011
+ key: "menuSetting.topMenuAlign",
2012
+ type: "select",
2013
+ label: S("顶部菜单对齐", "Top menu alignment"),
2014
+ value: g.menuSetting.topMenuAlign,
2015
+ options: [
2016
+ { value: "start", label: S("左", "Start") },
2017
+ { value: "center", label: S("中", "Center") },
2018
+ { value: "end", label: S("右", "End") }
2019
+ ]
2020
+ },
2021
+ {
2022
+ key: "menuSetting.mixSideFixed",
2023
+ type: "switch",
2024
+ label: S("固定双栏菜单", "Pin rail menu"),
2025
+ value: g.menuSetting.mixSideFixed,
2026
+ disabled: g.menuSetting.type !== "mix-sidebar"
2027
+ },
2028
+ {
2029
+ key: "menuSetting.mixSideTrigger",
2030
+ type: "select",
2031
+ label: S("双栏触发", "Rail trigger"),
2032
+ value: g.menuSetting.mixSideTrigger,
2033
+ options: [{ value: "click", label: S("点击", "Click") }, { value: "hover", label: S("悬停", "Hover") }],
2034
+ disabled: g.menuSetting.type !== "mix-sidebar"
2035
+ }
2036
+ ] },
2037
+ { title: S("外观", "Appearance"), items: [
2038
+ {
2039
+ key: "themeColor",
2040
+ type: "color",
2041
+ label: S("主题色", "Primary color"),
2042
+ value: g.themeColor,
2043
+ colors: ["#0960bd", "#0084f4", "#009688", "#536dfe", "#ff5c93", "#ee4f12", "#0096c7", "#9c27b0", "#ff9800"]
2044
+ },
2045
+ {
2046
+ key: "headerSetting.bgColor",
2047
+ type: "color",
2048
+ label: S("顶栏颜色", "Header color"),
2049
+ value: g.headerSetting.bgColor,
2050
+ colors: ["#ffffff", "#151515", "#009688", "#5172dc", "#018ffb", "#409eff", "#e74c3c", "#24292e", "#394664", "#001529"]
2051
+ },
2052
+ {
2053
+ key: "menuSetting.bgColor",
2054
+ type: "color",
2055
+ label: S("侧栏颜色", "Sidebar color"),
2056
+ value: g.menuSetting.bgColor,
2057
+ colors: ["#001529", "#212121", "#273352", "#ffffff", "#191b24", "#304156", "#28333e", "#344058"]
2058
+ },
2059
+ { key: "darkMode", type: "switch", label: S("深色模式", "Dark mode"), value: g.darkMode === "dark" },
2060
+ { key: "grayMode", type: "switch", label: S("灰度模式", "Grayscale"), value: g.grayMode },
2061
+ { key: "colorWeak", type: "switch", label: S("色弱模式", "Color assist"), value: g.colorWeak }
2062
+ ] },
2063
+ { title: S("界面", "Interface"), items: [
2064
+ { key: "headerSetting.show", type: "switch", label: S("显示顶栏", "Show header"), value: g.headerSetting.show },
2065
+ { key: "headerSetting.fixed", type: "switch", label: S("固定顶栏", "Fixed header"), value: g.headerSetting.fixed },
2066
+ { key: "headerSetting.showSearch", type: "switch", label: S("菜单搜索", "Menu search"), value: g.headerSetting.showSearch },
2067
+ { key: "multiTabsSetting.show", type: "switch", label: S("显示标签页", "Show tabs"), value: g.multiTabsSetting.show },
2068
+ { key: "multiTabsSetting.showQuick", type: "switch", label: S("标签快捷操作", "Tab actions"), value: g.multiTabsSetting.showQuick },
2069
+ { key: "multiTabsSetting.showRedo", type: "switch", label: S("标签刷新", "Tab refresh"), value: g.multiTabsSetting.showRedo },
2070
+ { key: "multiTabsSetting.showFold", type: "switch", label: S("内容全屏", "Content fullscreen"), value: g.multiTabsSetting.showFold },
2071
+ { key: "showBreadCrumb", type: "switch", label: S("面包屑", "Breadcrumb"), value: g.showBreadCrumb },
2072
+ { key: "showFooter", type: "switch", label: S("页脚", "Footer"), value: g.showFooter },
2073
+ {
2074
+ key: "contentMode",
2075
+ type: "select",
2076
+ label: S("内容宽度", "Content width"),
2077
+ value: g.contentMode,
2078
+ options: [{ value: "full", label: S("流式", "Fluid") }, { value: "fixed", label: S("固定", "Fixed") }]
2079
+ }
2080
+ ] }
2081
+ ];
2082
+ });
2083
+ function se(g, w) {
2084
+ if (g === "darkMode") {
2085
+ o("settingsChange", i.patch({ darkMode: w ? "dark" : "light" }));
2086
+ return;
2087
+ }
2088
+ const [S, _] = g.split(".");
2089
+ if (S === "menuSetting" || S === "headerSetting" || S === "multiTabsSetting") {
2090
+ const I = { [S]: { [_]: w } };
2091
+ g === "menuSetting.bgColor" && (I.menuSetting.theme = w === "#ffffff" ? "light" : "dark"), g === "headerSetting.bgColor" && (I.headerSetting.theme = w === "#ffffff" ? "light" : "dark"), o("settingsChange", i.patch(I));
2092
+ } else
2093
+ o("settingsChange", i.patch({ [g]: w }));
2094
+ g === "menuSetting.mixSideFixed" && (A.value = !!w);
2095
+ }
2096
+ function Ke() {
2097
+ o("settingsChange", i.reset());
2098
+ }
2099
+ function pe() {
2100
+ c.value ? y.value = !y.value : se("menuSetting.collapsed", !n.value.menuSetting.collapsed);
2101
+ }
2102
+ function _e() {
2103
+ o("settingsChange", i.patch({ fullContent: !n.value.fullContent }));
2104
+ }
2105
+ function me(g) {
2106
+ o("menuClick", g), y.value = !1, n.value.menuSetting.closeMixSidebarOnChange && !n.value.menuSetting.mixSideFixed && (A.value = !1), s.navigation.go(g);
2107
+ }
2108
+ function We(g) {
2109
+ const w = a.menus.find((_) => _.path === g), S = w ? De(w) : g;
2110
+ S && me(S);
2111
+ }
2112
+ function Oe(g) {
2113
+ var w;
2114
+ if (!((w = g.children) != null && w.length))
2115
+ return me(g.path);
2116
+ N.value === g.path && !n.value.menuSetting.mixSideFixed ? A.value = !A.value : A.value = !0, N.value = g.path;
2117
+ }
2118
+ function Ve(g) {
2119
+ var w;
2120
+ n.value.menuSetting.mixSideTrigger === "hover" && ((w = g.children) != null && w.length) && (N.value = g.path, A.value = !0);
2121
+ }
2122
+ function Ue(g, w) {
2123
+ o("tabCloseAction", g, w);
2124
+ }
2125
+ function fe() {
2126
+ c.value = window.innerWidth < a.mobileBreakpoint, y.value = !1;
2127
+ }
2128
+ function $e(g) {
2129
+ g.key === "Escape" && (y.value = !1, n.value.menuSetting.mixSideFixed || (A.value = !1));
2130
+ }
2131
+ let X;
2132
+ function qe(g) {
2133
+ if (g.button !== 0)
2134
+ return;
2135
+ X == null || X();
2136
+ const w = g.clientX, S = n.value.menuSetting.menuWidth, _ = (R) => se("menuSetting.menuWidth", S + R.clientX - w), I = () => X == null ? void 0 : X();
2137
+ window.addEventListener("pointermove", _), window.addEventListener("pointerup", I), window.addEventListener("pointercancel", I), X = () => {
2138
+ window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", I), window.removeEventListener("pointercancel", I), X = void 0;
2139
+ };
2140
+ }
2141
+ function He(g) {
2142
+ g.key !== "ArrowLeft" && g.key !== "ArrowRight" || (g.preventDefault(), se("menuSetting.menuWidth", n.value.menuSetting.menuWidth + (g.key === "ArrowRight" ? 10 : -10)));
2143
+ }
2144
+ function Ce() {
2145
+ typeof document < "u" && nt({
2146
+ theme: n.value.darkMode,
2147
+ grayMode: n.value.grayMode,
2148
+ colorWeak: n.value.colorWeak,
2149
+ primaryColor: n.value.themeColor
2150
+ }, document.documentElement);
2151
+ }
2152
+ Z(n, Ce, { deep: !0 }), Z(D, (g) => {
2153
+ g.rootPath && (N.value = g.rootPath);
2154
+ }, { immediate: !0 });
2155
+ const je = u.onRouteChange((g) => {
2156
+ var w;
2157
+ p.value = ((w = g.meta) == null ? void 0 : w.currentActiveMenu) || g.path, n.value.menuSetting.closeMixSidebarOnChange && !n.value.menuSetting.mixSideFixed && (A.value = !1);
2158
+ });
2159
+ return ie(() => {
2160
+ fe(), Ce(), window.addEventListener("resize", fe), window.addEventListener("keydown", $e);
2161
+ }), ne(() => {
2162
+ je(), X == null || X(), window.removeEventListener("resize", fe), window.removeEventListener("keydown", $e);
2163
+ }), (g, w) => {
2164
+ var S;
2165
+ return t(), l("div", {
2166
+ class: U(["dsea-classic-layout", B.value]),
2167
+ style: he(V.value)
2168
+ }, [
2169
+ f(n).fullContent ? (t(), l(F, { key: 1 }, [
2170
+ r("button", {
2171
+ type: "button",
2172
+ class: "dsea-classic-layout__restore",
2173
+ "aria-label": H.value.restoreLayout,
2174
+ title: H.value.restoreLayout,
2175
+ onClick: _e
2176
+ }, [
2177
+ x(f(L), {
2178
+ icon: "lucide:minimize",
2179
+ size: 18
2180
+ })
2181
+ ], 8, fn),
2182
+ r("main", yn, [
2183
+ T(g.$slots, "default")
2184
+ ])
2185
+ ], 64)) : (t(), l(F, { key: 0 }, [
2186
+ f(n).headerSetting.show ? (t(), l("header", ja, [
2187
+ r("div", Qa, [
2188
+ f(n).showLogo && (O.value !== "sidebar" || c.value) ? (t(), l("div", Xa, [
2189
+ T(g.$slots, "brand", {}, () => [
2190
+ x(ve)
2191
+ ])
2192
+ ])) : b("", !0),
2193
+ c.value || f(n).menuSetting.trigger === "HEADER" && k.value ? (t(), l("button", {
2194
+ key: 1,
2195
+ type: "button",
2196
+ class: "dsea-classic-layout__icon-button",
2197
+ "aria-label": H.value.toggleNavigation,
2198
+ "aria-expanded": c.value ? y.value : !f(n).menuSetting.collapsed,
2199
+ onClick: pe
2200
+ }, [
2201
+ x(f(L), {
2202
+ icon: c.value && y.value ? "lucide:x" : "lucide:menu",
2203
+ size: 19
2204
+ }, null, 8, ["icon"])
2205
+ ], 8, Ga)) : b("", !0),
2206
+ !c.value && f(n).showBreadCrumb && !D.value.split && O.value !== "top-menu" ? (t(), z(_a, {
2207
+ key: 2,
2208
+ items: ce.value,
2209
+ label: H.value.breadcrumb
2210
+ }, null, 8, ["items", "label"])) : b("", !0)
2211
+ ]),
2212
+ !c.value && D.value.top.length ? (t(), l("nav", {
2213
+ key: 0,
2214
+ class: "dsea-classic-layout__top-menu",
2215
+ "aria-label": H.value.topNavigation
2216
+ }, [
2217
+ x(oe, {
2218
+ items: D.value.top,
2219
+ mode: "horizontal",
2220
+ type: "top",
2221
+ "is-horizontal": "",
2222
+ theme: f(n).headerSetting.theme,
2223
+ split: D.value.split,
2224
+ "top-menu-align": f(n).menuSetting.topMenuAlign,
2225
+ onMenuClick: We
2226
+ }, null, 8, ["items", "theme", "split", "top-menu-align"])
2227
+ ], 8, Ya)) : b("", !0),
2228
+ r("div", Ja, [
2229
+ T(g.$slots, "search", {}, () => [
2230
+ f(n).headerSetting.showSearch && !c.value ? (t(), z(zt, {
2231
+ key: 0,
2232
+ "menu-items": e.menus
2233
+ }, null, 8, ["menu-items"])) : b("", !0)
2234
+ ]),
2235
+ T(g.$slots, "apps", {}, () => {
2236
+ var _;
2237
+ return [
2238
+ (_ = e.headerPorts) != null && _.apps && !c.value ? (t(), z(Mt, {
2239
+ key: 0,
2240
+ apps: e.headerPorts.apps.apps,
2241
+ "current-id": e.headerPorts.apps.currentId,
2242
+ loading: e.headerPorts.apps.loading,
2243
+ "confirm-switch": e.headerPorts.apps.confirmSwitch,
2244
+ onOpen: w[0] || (w[0] = (I) => {
2245
+ var R, q;
2246
+ return (q = (R = e.headerPorts.apps).onOpen) == null ? void 0 : q.call(R);
2247
+ }),
2248
+ onSwitch: w[1] || (w[1] = (I) => {
2249
+ var R, q;
2250
+ return (q = (R = e.headerPorts.apps).onSwitch) == null ? void 0 : q.call(R, I);
2251
+ })
2252
+ }, null, 8, ["apps", "current-id", "loading", "confirm-switch"])) : b("", !0)
2253
+ ];
2254
+ }),
2255
+ T(g.$slots, "notifications", {}, () => {
2256
+ var _;
2257
+ return [
2258
+ (_ = e.headerPorts) != null && _.notifications && f(n).headerSetting.showNotice && !c.value ? (t(), z(na, {
2259
+ key: 0,
2260
+ items: e.headerPorts.notifications.items,
2261
+ categories: e.headerPorts.notifications.categories,
2262
+ onOpen: w[2] || (w[2] = (I) => {
2263
+ var R, q;
2264
+ return (q = (R = e.headerPorts.notifications).onOpen) == null ? void 0 : q.call(R, I);
2265
+ }),
2266
+ onMarkAllRead: w[3] || (w[3] = (I) => {
2267
+ var R, q;
2268
+ return (q = (R = e.headerPorts.notifications).onMarkAllRead) == null ? void 0 : q.call(R);
2269
+ })
2270
+ }, null, 8, ["items", "categories"])) : b("", !0)
2271
+ ];
2272
+ }),
2273
+ T(g.$slots, "fullscreen", {}, () => [
2274
+ f(n).headerSetting.showFullScreen && !c.value ? (t(), z(vt, { key: 0 })) : b("", !0)
2275
+ ]),
2276
+ T(g.$slots, "locale", {}, () => {
2277
+ var _, I;
2278
+ return [
2279
+ (I = (_ = e.headerPorts) == null ? void 0 : _.locales) != null && I.length ? (t(), z(rt, {
2280
+ key: 0,
2281
+ locales: e.headerPorts.locales,
2282
+ "show-text": !1
2283
+ }, null, 8, ["locales"])) : b("", !0)
2284
+ ];
2285
+ }),
2286
+ T(g.$slots, "help"),
2287
+ T(g.$slots, "user", {}, () => {
2288
+ var _;
2289
+ return [
2290
+ (_ = e.headerPorts) != null && _.user ? (t(), z(qt, {
2291
+ key: 0,
2292
+ name: e.headerPorts.user.name,
2293
+ avatar: e.headerPorts.user.avatar,
2294
+ items: e.headerPorts.user.items,
2295
+ onSelect: w[4] || (w[4] = (I) => {
2296
+ var R, q;
2297
+ return (q = (R = e.headerPorts.user).onSelect) == null ? void 0 : q.call(R, I);
2298
+ })
2299
+ }, null, 8, ["name", "avatar", "items"])) : b("", !0)
2300
+ ];
2301
+ }),
2302
+ T(g.$slots, "headerActions"),
2303
+ f(n).showSettingButton ? (t(), l("button", {
2304
+ key: 0,
2305
+ type: "button",
2306
+ class: "dsea-classic-layout__icon-button",
2307
+ "aria-label": H.value.settings,
2308
+ title: H.value.settings,
2309
+ onClick: w[5] || (w[5] = (_) => h.value = !0)
2310
+ }, [
2311
+ x(f(L), {
2312
+ icon: "lucide:settings",
2313
+ size: 18
2314
+ })
2315
+ ], 8, Za)) : b("", !0)
2316
+ ])
2317
+ ])) : b("", !0),
2318
+ r("div", en, [
2319
+ k.value ? (t(), l("aside", {
2320
+ key: 0,
2321
+ class: U(["dsea-classic-layout__sidebar", { "is-open": y.value, "is-fixed": f(n).menuSetting.fixed }]),
2322
+ "aria-hidden": c.value && !y.value,
2323
+ inert: c.value && !y.value
2324
+ }, [
2325
+ O.value === "mix-sidebar" && !c.value ? (t(), l(F, { key: 0 }, [
2326
+ r("div", an, [
2327
+ f(n).showLogo ? (t(), l("div", nn, [
2328
+ T(g.$slots, "brand", {}, () => [
2329
+ x(ve, { "show-title": !1 })
2330
+ ])
2331
+ ])) : b("", !0),
2332
+ (t(!0), l(F, null, K(e.menus, (_) => (t(), l("button", {
2333
+ key: _.path,
2334
+ type: "button",
2335
+ class: U(["dsea-classic-layout__module", { "is-active": _.path === N.value }]),
2336
+ title: _.name,
2337
+ onClick: (I) => Oe(_),
2338
+ onMouseenter: (I) => Ve(_)
2339
+ }, [
2340
+ _.icon ? (t(), z(f(L), {
2341
+ key: 0,
2342
+ icon: _.icon,
2343
+ size: f(n).menuSetting.collapsed ? 16 : 20
2344
+ }, null, 8, ["icon", "size"])) : b("", !0),
2345
+ f(n).menuSetting.collapsed ? b("", !0) : (t(), l("span", on, m(G(_.name)), 1))
2346
+ ], 42, ln))), 128)),
2347
+ r("button", {
2348
+ type: "button",
2349
+ class: "dsea-classic-layout__rail-trigger",
2350
+ "aria-label": H.value.toggleNavigation,
2351
+ onClick: pe
2352
+ }, [
2353
+ x(f(L), {
2354
+ icon: f(n).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
2355
+ size: 16
2356
+ }, null, 8, ["icon"])
2357
+ ], 8, sn)
2358
+ ]),
2359
+ A.value && $.value.length ? (t(), l("div", {
2360
+ key: 0,
2361
+ class: U(["dsea-classic-layout__mix-panel", { "is-floating": !f(n).menuSetting.mixSideFixed }])
2362
+ }, [
2363
+ r("div", rn, [
2364
+ r("span", null, m(G(((S = j.value) == null ? void 0 : S.name) || "")), 1),
2365
+ r("button", {
2366
+ type: "button",
2367
+ "aria-label": H.value.pinNavigation,
2368
+ "aria-pressed": f(n).menuSetting.mixSideFixed,
2369
+ onClick: w[6] || (w[6] = (_) => se("menuSetting.mixSideFixed", !f(n).menuSetting.mixSideFixed))
2370
+ }, [
2371
+ x(f(L), {
2372
+ icon: f(n).menuSetting.mixSideFixed ? "lucide:pin-off" : "lucide:pin",
2373
+ size: 16
2374
+ }, null, 8, ["icon"])
2375
+ ], 8, un)
2376
+ ]),
2377
+ x(oe, {
2378
+ items: $.value,
2379
+ theme: f(n).menuSetting.theme,
2380
+ accordion: f(n).menuSetting.accordion,
2381
+ split: !1,
2382
+ onMenuClick: me
2383
+ }, null, 8, ["items", "theme", "accordion"])
2384
+ ], 2)) : b("", !0)
2385
+ ], 64)) : (t(), l(F, { key: 1 }, [
2386
+ f(n).showLogo && (O.value === "sidebar" || c.value) ? (t(), l("div", dn, [
2387
+ T(g.$slots, "brand", {}, () => [
2388
+ x(ve, {
2389
+ "show-title": !f(n).menuSetting.collapsed || c.value
2390
+ }, null, 8, ["show-title"])
2391
+ ])
2392
+ ])) : b("", !0),
2393
+ r("nav", {
2394
+ class: "dsea-classic-layout__side-menu",
2395
+ "aria-label": H.value.navigation
2396
+ }, [
2397
+ T(g.$slots, "navigation", { items: v.value }, () => [
2398
+ x(oe, {
2399
+ items: v.value,
2400
+ collapse: f(n).menuSetting.collapsed && !c.value,
2401
+ theme: f(n).menuSetting.theme,
2402
+ accordion: f(n).menuSetting.accordion,
2403
+ split: D.value.split,
2404
+ onMenuClick: me
2405
+ }, null, 8, ["items", "collapse", "theme", "accordion", "split"])
2406
+ ])
2407
+ ], 8, cn),
2408
+ f(n).menuSetting.trigger === "FOOTER" && !c.value ? (t(), l("button", {
2409
+ key: 1,
2410
+ type: "button",
2411
+ class: "dsea-classic-layout__sidebar-trigger",
2412
+ "aria-label": H.value.toggleNavigation,
2413
+ onClick: pe
2414
+ }, [
2415
+ x(f(L), {
2416
+ icon: f(n).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
2417
+ size: 16
2418
+ }, null, 8, ["icon"])
2419
+ ], 8, mn)) : b("", !0)
2420
+ ], 64)),
2421
+ f(n).menuSetting.canDrag && !c.value && !f(n).menuSetting.collapsed && O.value !== "mix-sidebar" ? (t(), l("div", {
2422
+ key: 2,
2423
+ class: "dsea-classic-layout__resize",
2424
+ role: "separator",
2425
+ tabindex: "0",
2426
+ "aria-orientation": "vertical",
2427
+ "aria-label": H.value.resizeNavigation,
2428
+ "aria-valuenow": f(n).menuSetting.menuWidth,
2429
+ "aria-valuemin": "160",
2430
+ "aria-valuemax": "420",
2431
+ onPointerdown: qe,
2432
+ onKeydown: He
2433
+ }, null, 40, vn)) : b("", !0)
2434
+ ], 10, tn)) : b("", !0),
2435
+ c.value && y.value && k.value ? (t(), l("button", {
2436
+ key: 1,
2437
+ type: "button",
2438
+ class: "dsea-classic-layout__scrim",
2439
+ "aria-label": H.value.closeNavigation,
2440
+ onClick: w[7] || (w[7] = (_) => y.value = !1)
2441
+ }, null, 8, gn)) : b("", !0),
2442
+ r("div", bn, [
2443
+ f(n).multiTabsSetting.show ? (t(), l("div", hn, [
2444
+ T(g.$slots, "tabs", {}, () => [
2445
+ x(Ea, {
2446
+ tabs: e.tabs,
2447
+ "active-key": e.activeTab,
2448
+ labels: e.tabLabels,
2449
+ "show-quick": f(n).multiTabsSetting.showQuick,
2450
+ "show-redo": f(n).multiTabsSetting.showRedo,
2451
+ "show-fold": f(n).multiTabsSetting.showFold,
2452
+ "can-drag": f(n).multiTabsSetting.canDrag,
2453
+ onSelect: w[8] || (w[8] = (_) => o("tabSelect", _)),
2454
+ onClose: w[9] || (w[9] = (_) => o("tabClose", _)),
2455
+ onRefresh: w[10] || (w[10] = (_) => o("tabRefresh", _)),
2456
+ onCloseAction: Ue,
2457
+ onReorder: w[11] || (w[11] = (_) => o("tabReorder", _)),
2458
+ onFold: _e
2459
+ }, null, 8, ["tabs", "active-key", "labels", "show-quick", "show-redo", "show-fold", "can-drag"])
2460
+ ])
2461
+ ])) : b("", !0),
2462
+ r("main", {
2463
+ class: U(["dsea-classic-layout__content", { "is-fixed": f(n).contentMode === "fixed" }])
2464
+ }, [
2465
+ T(g.$slots, "default")
2466
+ ], 2),
2467
+ f(n).showFooter && g.$slots.footer ? (t(), l("footer", pn, [
2468
+ T(g.$slots, "footer")
2469
+ ])) : b("", !0)
2470
+ ])
2471
+ ])
2472
+ ], 64)),
2473
+ f(n).showSettingButton ? (t(), z(Va, {
2474
+ key: 2,
2475
+ open: h.value,
2476
+ "onUpdate:open": w[12] || (w[12] = (_) => h.value = _),
2477
+ title: H.value.settings,
2478
+ sections: Re.value,
2479
+ "reset-label": H.value.reset,
2480
+ onChange: se,
2481
+ onReset: Ke
2482
+ }, null, 8, ["open", "title", "sections", "reset-label"])) : b("", !0)
2483
+ ], 6);
2484
+ };
2485
+ }
2486
+ });
2487
+ const kn = { class: "dsea-iframe-view" }, wn = ["src", "title", "loading", "referrerpolicy"], Sn = /* @__PURE__ */ P({
1447
2488
  __name: "AdminIframeView",
1448
2489
  props: {
1449
2490
  src: {},
@@ -1452,35 +2493,35 @@ const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { cla
1452
2493
  referrerPolicy: { default: "strict-origin-when-cross-origin" }
1453
2494
  },
1454
2495
  emits: ["load"],
1455
- setup(e, { emit: c }) {
1456
- const t = e, i = c, l = I(() => {
1457
- var n;
1458
- const r = ((n = t.src) == null ? void 0 : n.trim()) ?? "";
1459
- return X(r) || (r.startsWith("/") && !r.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(r) ? r : "");
2496
+ setup(e, { emit: d }) {
2497
+ const a = e, o = d, s = E(() => {
2498
+ var i;
2499
+ const u = ((i = a.src) == null ? void 0 : i.trim()) ?? "";
2500
+ return ge(u) || (u.startsWith("/") && !u.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(u) ? u : "");
1460
2501
  });
1461
- return (r, n) => (a(), o("div", zt, [
1462
- l.value ? (a(), o("iframe", {
1463
- key: l.value,
1464
- src: l.value,
2502
+ return (u, i) => (t(), l("div", kn, [
2503
+ s.value ? (t(), l("iframe", {
2504
+ key: s.value,
2505
+ src: s.value,
1465
2506
  title: e.title,
1466
2507
  loading: e.loading,
1467
2508
  referrerpolicy: e.referrerPolicy,
1468
- onLoad: n[0] || (n[0] = (u) => i("load"))
1469
- }, null, 40, Dt)) : B(r.$slots, "invalid", {}, void 0, !0, 1)
2509
+ onLoad: i[0] || (i[0] = (n) => o("load"))
2510
+ }, null, 40, wn)) : T(u.$slots, "invalid", {}, void 0, !0, 1)
1470
2511
  ]));
1471
2512
  }
1472
2513
  });
1473
- const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { class: "dsea-login-view" }, Rt = { class: "dsea-login-view__identity" }, Ut = {
2514
+ const So = /* @__PURE__ */ W(Sn, [["__scopeId", "data-v-b964cc57"]]), _n = { class: "dsea-login-view" }, $n = { class: "dsea-login-view__identity" }, Cn = {
1474
2515
  key: 0,
1475
2516
  class: "dsea-login-view__subtitle"
1476
- }, qt = ["for"], Wt = ["id", "disabled"], Ot = ["for"], Ht = ["id", "disabled"], jt = {
2517
+ }, xn = ["for"], Ln = ["id", "disabled"], Mn = ["for"], An = ["id", "disabled"], Tn = {
1477
2518
  key: 1,
1478
2519
  class: "dsea-login-view__error",
1479
2520
  role: "alert"
1480
- }, Qt = ["disabled"], Gt = {
2521
+ }, Pn = ["disabled"], Bn = {
1481
2522
  key: 2,
1482
2523
  class: "dsea-login-view__footer"
1483
- }, Xt = /* @__PURE__ */ k({
2524
+ }, Fn = /* @__PURE__ */ P({
1484
2525
  __name: "AdminLoginView",
1485
2526
  props: {
1486
2527
  title: {},
@@ -1494,71 +2535,71 @@ const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { cla
1494
2535
  formId: { default: "admin-login" }
1495
2536
  },
1496
2537
  emits: ["submit"],
1497
- setup(e, { emit: c }) {
1498
- const t = c, i = S(""), l = S("");
1499
- function r() {
1500
- t("submit", { username: i.value, password: l.value });
2538
+ setup(e, { emit: d }) {
2539
+ const a = d, o = M(""), s = M("");
2540
+ function u() {
2541
+ a("submit", { username: o.value, password: s.value });
1501
2542
  }
1502
- return (n, u) => (a(), o("main", Vt, [
1503
- s("form", {
2543
+ return (i, n) => (t(), l("main", _n, [
2544
+ r("form", {
1504
2545
  class: "dsea-login-view__form",
1505
- onSubmit: H(r, ["prevent"])
2546
+ onSubmit: ee(u, ["prevent"])
1506
2547
  }, [
1507
- s("div", Rt, [
1508
- B(n.$slots, "brand", {}, void 0, !0)
2548
+ r("div", $n, [
2549
+ T(i.$slots, "brand", {}, void 0, !0)
1509
2550
  ]),
1510
- s("h1", null, d(e.title), 1),
1511
- e.subtitle ? (a(), o("p", Ut, d(e.subtitle), 1)) : p("", !0),
1512
- s("label", {
2551
+ r("h1", null, m(e.title), 1),
2552
+ e.subtitle ? (t(), l("p", Cn, m(e.subtitle), 1)) : b("", !0),
2553
+ r("label", {
1513
2554
  for: `${e.formId}-username`
1514
- }, d(e.usernameLabel), 9, qt),
1515
- K(s("input", {
2555
+ }, m(e.usernameLabel), 9, xn),
2556
+ Y(r("input", {
1516
2557
  id: `${e.formId}-username`,
1517
- "onUpdate:modelValue": u[0] || (u[0] = (b) => i.value = b),
2558
+ "onUpdate:modelValue": n[0] || (n[0] = (c) => o.value = c),
1518
2559
  type: "text",
1519
2560
  name: "username",
1520
2561
  autocomplete: "username",
1521
2562
  required: "",
1522
2563
  disabled: e.loading
1523
- }, null, 8, Wt), [
2564
+ }, null, 8, Ln), [
1524
2565
  [
1525
- V,
1526
- i.value,
2566
+ J,
2567
+ o.value,
1527
2568
  void 0,
1528
2569
  { trim: !0 }
1529
2570
  ]
1530
2571
  ]),
1531
- s("label", {
2572
+ r("label", {
1532
2573
  for: `${e.formId}-password`
1533
- }, d(e.passwordLabel), 9, Ot),
1534
- K(s("input", {
2574
+ }, m(e.passwordLabel), 9, Mn),
2575
+ Y(r("input", {
1535
2576
  id: `${e.formId}-password`,
1536
- "onUpdate:modelValue": u[1] || (u[1] = (b) => l.value = b),
2577
+ "onUpdate:modelValue": n[1] || (n[1] = (c) => s.value = c),
1537
2578
  type: "password",
1538
2579
  name: "password",
1539
2580
  autocomplete: "current-password",
1540
2581
  required: "",
1541
2582
  disabled: e.loading
1542
- }, null, 8, Ht), [
1543
- [V, l.value]
2583
+ }, null, 8, An), [
2584
+ [J, s.value]
1544
2585
  ]),
1545
- e.error ? (a(), o("p", jt, d(e.error), 1)) : p("", !0),
1546
- s("button", {
2586
+ e.error ? (t(), l("p", Tn, m(e.error), 1)) : b("", !0),
2587
+ r("button", {
1547
2588
  type: "submit",
1548
2589
  disabled: e.loading
1549
- }, d(e.loading ? e.loadingLabel : e.submitLabel), 9, Qt),
1550
- n.$slots.footer ? (a(), o("div", Gt, [
1551
- B(n.$slots, "footer", {}, void 0, !0)
1552
- ])) : p("", !0)
2590
+ }, m(e.loading ? e.loadingLabel : e.submitLabel), 9, Pn),
2591
+ i.$slots.footer ? (t(), l("div", Bn, [
2592
+ T(i.$slots, "footer", {}, void 0, !0)
2593
+ ])) : b("", !0)
1553
2594
  ], 32)
1554
2595
  ]));
1555
2596
  }
1556
2597
  });
1557
- const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { class: "dsea-lock-view" }, Jt = { key: 0 }, Zt = ["for"], ea = ["id", "disabled"], ta = {
2598
+ const _o = /* @__PURE__ */ W(Fn, [["__scopeId", "data-v-65bdd32a"]]), En = { class: "dsea-lock-view" }, In = { key: 0 }, Nn = ["for"], zn = ["id", "disabled"], Dn = {
1558
2599
  key: 1,
1559
2600
  class: "dsea-lock-view__error",
1560
2601
  role: "alert"
1561
- }, aa = ["disabled"], na = /* @__PURE__ */ k({
2602
+ }, Rn = ["disabled"], Kn = /* @__PURE__ */ P({
1562
2603
  __name: "AdminLockView",
1563
2604
  props: {
1564
2605
  title: {},
@@ -1571,51 +2612,51 @@ const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { cla
1571
2612
  formId: { default: "admin-lock" }
1572
2613
  },
1573
2614
  emits: ["unlock", "switchAccount"],
1574
- setup(e, { emit: c }) {
1575
- const t = c, i = S("");
1576
- function l() {
1577
- t("unlock", i.value);
2615
+ setup(e, { emit: d }) {
2616
+ const a = d, o = M("");
2617
+ function s() {
2618
+ a("unlock", o.value);
1578
2619
  }
1579
- return (r, n) => (a(), o("main", Yt, [
1580
- s("form", {
2620
+ return (u, i) => (t(), l("main", En, [
2621
+ r("form", {
1581
2622
  class: "dsea-lock-view__form",
1582
- onSubmit: H(l, ["prevent"])
2623
+ onSubmit: ee(s, ["prevent"])
1583
2624
  }, [
1584
- B(r.$slots, "avatar", {}, void 0, !0),
1585
- s("h1", null, d(e.title), 1),
1586
- e.identity ? (a(), o("p", Jt, d(e.identity), 1)) : p("", !0),
1587
- s("label", {
2625
+ T(u.$slots, "avatar", {}, void 0, !0),
2626
+ r("h1", null, m(e.title), 1),
2627
+ e.identity ? (t(), l("p", In, m(e.identity), 1)) : b("", !0),
2628
+ r("label", {
1588
2629
  for: `${e.formId}-password`
1589
- }, d(e.passwordLabel), 9, Zt),
1590
- K(s("input", {
2630
+ }, m(e.passwordLabel), 9, Nn),
2631
+ Y(r("input", {
1591
2632
  id: `${e.formId}-password`,
1592
- "onUpdate:modelValue": n[0] || (n[0] = (u) => i.value = u),
2633
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => o.value = n),
1593
2634
  type: "password",
1594
2635
  autocomplete: "current-password",
1595
2636
  required: "",
1596
2637
  disabled: e.loading
1597
- }, null, 8, ea), [
1598
- [V, i.value]
2638
+ }, null, 8, zn), [
2639
+ [J, o.value]
1599
2640
  ]),
1600
- e.error ? (a(), o("p", ta, d(e.error), 1)) : p("", !0),
1601
- s("button", {
2641
+ e.error ? (t(), l("p", Dn, m(e.error), 1)) : b("", !0),
2642
+ r("button", {
1602
2643
  type: "submit",
1603
2644
  disabled: e.loading
1604
- }, d(e.unlockLabel), 9, aa),
1605
- e.switchLabel ? (a(), o("button", {
2645
+ }, m(e.unlockLabel), 9, Rn),
2646
+ e.switchLabel ? (t(), l("button", {
1606
2647
  key: 2,
1607
2648
  type: "button",
1608
2649
  class: "dsea-lock-view__switch",
1609
- onClick: n[1] || (n[1] = (u) => t("switchAccount"))
1610
- }, d(e.switchLabel), 1)) : p("", !0)
2650
+ onClick: i[1] || (i[1] = (n) => a("switchAccount"))
2651
+ }, m(e.switchLabel), 1)) : b("", !0)
1611
2652
  ], 32)
1612
2653
  ]));
1613
2654
  }
1614
2655
  });
1615
- const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { class: "dsea-exception-view" }, oa = { class: "dsea-exception-view__content" }, sa = { class: "dsea-exception-view__status" }, ia = {
2656
+ const $o = /* @__PURE__ */ W(Kn, [["__scopeId", "data-v-e70aeaca"]]), Wn = { class: "dsea-exception-view" }, On = { class: "dsea-exception-view__content" }, Vn = { class: "dsea-exception-view__status" }, Un = {
1616
2657
  key: 0,
1617
2658
  class: "dsea-exception-view__description"
1618
- }, ra = /* @__PURE__ */ k({
2659
+ }, qn = /* @__PURE__ */ P({
1619
2660
  __name: "AdminExceptionView",
1620
2661
  props: {
1621
2662
  status: {},
@@ -1624,27 +2665,27 @@ const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { cla
1624
2665
  actionLabel: {}
1625
2666
  },
1626
2667
  emits: ["action"],
1627
- setup(e, { emit: c }) {
1628
- const t = c;
1629
- return (i, l) => (a(), o("main", la, [
1630
- s("div", oa, [
1631
- s("p", sa, d(e.status), 1),
1632
- s("h1", null, d(e.title), 1),
1633
- e.description ? (a(), o("p", ia, d(e.description), 1)) : p("", !0),
1634
- e.actionLabel ? (a(), o("button", {
2668
+ setup(e, { emit: d }) {
2669
+ const a = d;
2670
+ return (o, s) => (t(), l("main", Wn, [
2671
+ r("div", On, [
2672
+ r("p", Vn, m(e.status), 1),
2673
+ r("h1", null, m(e.title), 1),
2674
+ e.description ? (t(), l("p", Un, m(e.description), 1)) : b("", !0),
2675
+ e.actionLabel ? (t(), l("button", {
1635
2676
  key: 1,
1636
2677
  type: "button",
1637
- onClick: l[0] || (l[0] = (r) => t("action"))
1638
- }, d(e.actionLabel), 1)) : p("", !0)
2678
+ onClick: s[0] || (s[0] = (u) => a("action"))
2679
+ }, m(e.actionLabel), 1)) : b("", !0)
1639
2680
  ])
1640
2681
  ]));
1641
2682
  }
1642
2683
  });
1643
- const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { class: "dsea-profile-tabs" }, ca = {
2684
+ const Co = /* @__PURE__ */ W(qn, [["__scopeId", "data-v-b9e53f59"]]), Hn = { class: "dsea-profile-tabs" }, jn = {
1644
2685
  key: 0,
1645
2686
  class: "dsea-profile-tabs__notice",
1646
2687
  role: "status"
1647
- }, ua = { class: "dsea-profile-tabs__body" }, ma = ["aria-label"], ba = ["aria-current", "onClick"], va = ["aria-label"], pa = /* @__PURE__ */ k({
2688
+ }, Qn = { class: "dsea-profile-tabs__body" }, Xn = ["aria-label"], Gn = ["aria-current", "onClick"], Yn = ["aria-label"], Jn = /* @__PURE__ */ P({
1648
2689
  __name: "AdminProfileTabs",
1649
2690
  props: {
1650
2691
  tabs: {},
@@ -1653,38 +2694,38 @@ const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { cla
1653
2694
  notice: {}
1654
2695
  },
1655
2696
  emits: ["update:activeKey"],
1656
- setup(e, { emit: c }) {
1657
- const t = e, i = c, l = I(() => t.tabs.find((r) => r.key === t.activeKey));
1658
- return (r, n) => {
1659
- var u;
1660
- return a(), o("div", da, [
1661
- e.notice ? (a(), o("p", ca, d(e.notice), 1)) : p("", !0),
1662
- s("div", ua, [
1663
- s("nav", { "aria-label": e.label }, [
1664
- (a(!0), o(x, null, M(e.tabs, (b) => (a(), o("button", {
1665
- key: b.key,
2697
+ setup(e, { emit: d }) {
2698
+ const a = e, o = d, s = E(() => a.tabs.find((u) => u.key === a.activeKey));
2699
+ return (u, i) => {
2700
+ var n;
2701
+ return t(), l("div", Hn, [
2702
+ e.notice ? (t(), l("p", jn, m(e.notice), 1)) : b("", !0),
2703
+ r("div", Qn, [
2704
+ r("nav", { "aria-label": e.label }, [
2705
+ (t(!0), l(F, null, K(e.tabs, (c) => (t(), l("button", {
2706
+ key: c.key,
1666
2707
  type: "button",
1667
- "aria-current": b.key === e.activeKey ? "page" : void 0,
1668
- onClick: (g) => i("update:activeKey", b.key)
1669
- }, d(b.label), 9, ba))), 128))
1670
- ], 8, ma),
1671
- s("section", {
1672
- "aria-label": (u = l.value) == null ? void 0 : u.label
2708
+ "aria-current": c.key === e.activeKey ? "page" : void 0,
2709
+ onClick: (y) => o("update:activeKey", c.key)
2710
+ }, m(c.label), 9, Gn))), 128))
2711
+ ], 8, Xn),
2712
+ r("section", {
2713
+ "aria-label": (n = s.value) == null ? void 0 : n.label
1673
2714
  }, [
1674
- l.value ? (a(), P(he(l.value.component), { key: 0 })) : B(r.$slots, "default", {}, void 0, !0, 1)
1675
- ], 8, va)
2715
+ s.value ? (t(), z(Je(s.value.component), { key: 0 })) : T(u.$slots, "default", {}, void 0, !0, 1)
2716
+ ], 8, Yn)
1676
2717
  ])
1677
2718
  ]);
1678
2719
  };
1679
2720
  }
1680
2721
  });
1681
- const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key: 0 }, ha = ["value"], fa = { key: 1 }, ya = {
2722
+ const xo = /* @__PURE__ */ W(Jn, [["__scopeId", "data-v-55c2076e"]]), Zn = { key: 0 }, el = ["value"], tl = { key: 1 }, al = {
1682
2723
  key: 2,
1683
2724
  class: "dsea-profile-form__avatar"
1684
- }, ka = {
2725
+ }, nl = {
1685
2726
  key: 3,
1686
2727
  role: "alert"
1687
- }, _a = ["disabled"], wa = /* @__PURE__ */ k({
2728
+ }, ll = ["disabled"], ol = /* @__PURE__ */ P({
1688
2729
  __name: "AdminProfileForm",
1689
2730
  props: {
1690
2731
  name: {},
@@ -1696,89 +2737,89 @@ const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key
1696
2737
  labels: { default: () => ({ name: "Name", email: "Email", phone: "Phone", currentPassword: "Current password", save: "Save changes", saving: "Saving" }) }
1697
2738
  },
1698
2739
  emits: ["submit"],
1699
- setup(e, { emit: c }) {
1700
- const t = e, i = c, l = oe({ name: t.name, email: t.email, currentPassword: "" });
1701
- U(() => [t.name, t.email], () => {
1702
- l.name = t.name, l.email = t.email;
2740
+ setup(e, { emit: d }) {
2741
+ const a = e, o = d, s = Te({ name: a.name, email: a.email, currentPassword: "" });
2742
+ Z(() => [a.name, a.email], () => {
2743
+ s.name = a.name, s.email = a.email;
1703
2744
  });
1704
- function r() {
1705
- t.saving || (i("submit", {
1706
- name: l.name.trim(),
1707
- email: l.email.trim(),
1708
- ...t.requireCurrentPassword ? { currentPassword: l.currentPassword } : {}
1709
- }), l.currentPassword = "");
1710
- }
1711
- return (n, u) => (a(), o("form", {
2745
+ function u() {
2746
+ a.saving || (o("submit", {
2747
+ name: s.name.trim(),
2748
+ email: s.email.trim(),
2749
+ ...a.requireCurrentPassword ? { currentPassword: s.currentPassword } : {}
2750
+ }), s.currentPassword = "");
2751
+ }
2752
+ return (i, n) => (t(), l("form", {
1712
2753
  class: "dsea-profile-form",
1713
- onSubmit: H(r, ["prevent"])
2754
+ onSubmit: ee(u, ["prevent"])
1714
2755
  }, [
1715
- s("label", null, [
1716
- z(d(e.labels.name), 1),
1717
- K(s("input", {
1718
- "onUpdate:modelValue": u[0] || (u[0] = (b) => l.name = b),
2756
+ r("label", null, [
2757
+ Q(m(e.labels.name), 1),
2758
+ Y(r("input", {
2759
+ "onUpdate:modelValue": n[0] || (n[0] = (c) => s.name = c),
1719
2760
  type: "text",
1720
2761
  required: "",
1721
2762
  maxlength: "100",
1722
2763
  autocomplete: "name"
1723
2764
  }, null, 512), [
1724
2765
  [
1725
- V,
1726
- l.name,
2766
+ J,
2767
+ s.name,
1727
2768
  void 0,
1728
2769
  { trim: !0 }
1729
2770
  ]
1730
2771
  ])
1731
2772
  ]),
1732
- s("label", null, [
1733
- z(d(e.labels.email), 1),
1734
- K(s("input", {
1735
- "onUpdate:modelValue": u[1] || (u[1] = (b) => l.email = b),
2773
+ r("label", null, [
2774
+ Q(m(e.labels.email), 1),
2775
+ Y(r("input", {
2776
+ "onUpdate:modelValue": n[1] || (n[1] = (c) => s.email = c),
1736
2777
  type: "email",
1737
2778
  autocomplete: "email"
1738
2779
  }, null, 512), [
1739
2780
  [
1740
- V,
1741
- l.email,
2781
+ J,
2782
+ s.email,
1742
2783
  void 0,
1743
2784
  { trim: !0 }
1744
2785
  ]
1745
2786
  ])
1746
2787
  ]),
1747
- e.phone !== void 0 ? (a(), o("label", ga, [
1748
- z(d(e.labels.phone), 1),
1749
- s("input", {
2788
+ e.phone !== void 0 ? (t(), l("label", Zn, [
2789
+ Q(m(e.labels.phone), 1),
2790
+ r("input", {
1750
2791
  value: e.phone,
1751
2792
  type: "tel",
1752
2793
  disabled: "",
1753
2794
  autocomplete: "tel"
1754
- }, null, 8, ha)
1755
- ])) : p("", !0),
1756
- e.requireCurrentPassword ? (a(), o("label", fa, [
1757
- z(d(e.labels.currentPassword), 1),
1758
- K(s("input", {
1759
- "onUpdate:modelValue": u[2] || (u[2] = (b) => l.currentPassword = b),
2795
+ }, null, 8, el)
2796
+ ])) : b("", !0),
2797
+ e.requireCurrentPassword ? (t(), l("label", tl, [
2798
+ Q(m(e.labels.currentPassword), 1),
2799
+ Y(r("input", {
2800
+ "onUpdate:modelValue": n[2] || (n[2] = (c) => s.currentPassword = c),
1760
2801
  type: "password",
1761
2802
  required: "",
1762
2803
  autocomplete: "current-password"
1763
2804
  }, null, 512), [
1764
- [V, l.currentPassword]
2805
+ [J, s.currentPassword]
1765
2806
  ])
1766
- ])) : p("", !0),
1767
- n.$slots.avatar ? (a(), o("div", ya, [
1768
- B(n.$slots, "avatar", {}, void 0, !0)
1769
- ])) : p("", !0),
1770
- e.error ? (a(), o("p", ka, d(e.error), 1)) : p("", !0),
1771
- s("button", {
2807
+ ])) : b("", !0),
2808
+ i.$slots.avatar ? (t(), l("div", al, [
2809
+ T(i.$slots, "avatar", {}, void 0, !0)
2810
+ ])) : b("", !0),
2811
+ e.error ? (t(), l("p", nl, m(e.error), 1)) : b("", !0),
2812
+ r("button", {
1772
2813
  type: "submit",
1773
2814
  disabled: e.saving
1774
- }, d(e.saving ? e.labels.saving : e.labels.save), 9, _a)
2815
+ }, m(e.saving ? e.labels.saving : e.labels.save), 9, ll)
1775
2816
  ], 32));
1776
2817
  }
1777
2818
  });
1778
- const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
2819
+ const Lo = /* @__PURE__ */ W(ol, [["__scopeId", "data-v-4dc61808"]]), il = {
1779
2820
  key: 0,
1780
2821
  role: "alert"
1781
- }, La = ["disabled"], Ca = /* @__PURE__ */ k({
2822
+ }, sl = ["disabled"], rl = /* @__PURE__ */ P({
1782
2823
  __name: "AdminPasswordForm",
1783
2824
  props: {
1784
2825
  minBytes: { default: 10 },
@@ -1788,104 +2829,104 @@ const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
1788
2829
  labels: { default: () => ({ current: "Current password", next: "New password", confirm: "Confirm password", save: "Change password", saving: "Saving", mismatch: "Passwords do not match", length: "Password length is invalid" }) }
1789
2830
  },
1790
2831
  emits: ["submit"],
1791
- setup(e, { expose: c, emit: t }) {
1792
- const i = e, l = t, r = S(""), n = S(""), u = S(""), b = S("");
1793
- function g() {
1794
- if (i.saving)
2832
+ setup(e, { expose: d, emit: a }) {
2833
+ const o = e, s = a, u = M(""), i = M(""), n = M(""), c = M("");
2834
+ function y() {
2835
+ if (o.saving)
1795
2836
  return;
1796
- const m = new TextEncoder().encode(n.value).length;
1797
- if (m < i.minBytes || m > i.maxBytes) {
1798
- b.value = i.labels.length;
2837
+ const p = new TextEncoder().encode(i.value).length;
2838
+ if (p < o.minBytes || p > o.maxBytes) {
2839
+ c.value = o.labels.length;
1799
2840
  return;
1800
2841
  }
1801
- if (n.value !== u.value) {
1802
- b.value = i.labels.mismatch;
2842
+ if (i.value !== n.value) {
2843
+ c.value = o.labels.mismatch;
1803
2844
  return;
1804
2845
  }
1805
- b.value = "", l("submit", { currentPassword: r.value, password: n.value });
2846
+ c.value = "", s("submit", { currentPassword: u.value, password: i.value });
1806
2847
  }
1807
- function v() {
1808
- r.value = "", n.value = "", u.value = "", b.value = "";
2848
+ function h() {
2849
+ u.value = "", i.value = "", n.value = "", c.value = "";
1809
2850
  }
1810
- return c({ reset: v }), (m, L) => (a(), o("form", {
2851
+ return d({ reset: h }), (p, N) => (t(), l("form", {
1811
2852
  class: "dsea-password-form",
1812
- onSubmit: H(g, ["prevent"])
2853
+ onSubmit: ee(y, ["prevent"])
1813
2854
  }, [
1814
- s("label", null, [
1815
- z(d(e.labels.current), 1),
1816
- K(s("input", {
1817
- "onUpdate:modelValue": L[0] || (L[0] = (F) => r.value = F),
2855
+ r("label", null, [
2856
+ Q(m(e.labels.current), 1),
2857
+ Y(r("input", {
2858
+ "onUpdate:modelValue": N[0] || (N[0] = (A) => u.value = A),
1818
2859
  type: "password",
1819
2860
  required: "",
1820
2861
  autocomplete: "current-password"
1821
2862
  }, null, 512), [
1822
- [V, r.value]
2863
+ [J, u.value]
1823
2864
  ])
1824
2865
  ]),
1825
- s("label", null, [
1826
- z(d(e.labels.next), 1),
1827
- K(s("input", {
1828
- "onUpdate:modelValue": L[1] || (L[1] = (F) => n.value = F),
2866
+ r("label", null, [
2867
+ Q(m(e.labels.next), 1),
2868
+ Y(r("input", {
2869
+ "onUpdate:modelValue": N[1] || (N[1] = (A) => i.value = A),
1829
2870
  type: "password",
1830
2871
  required: "",
1831
2872
  autocomplete: "new-password"
1832
2873
  }, null, 512), [
1833
- [V, n.value]
2874
+ [J, i.value]
1834
2875
  ])
1835
2876
  ]),
1836
- s("label", null, [
1837
- z(d(e.labels.confirm), 1),
1838
- K(s("input", {
1839
- "onUpdate:modelValue": L[2] || (L[2] = (F) => u.value = F),
2877
+ r("label", null, [
2878
+ Q(m(e.labels.confirm), 1),
2879
+ Y(r("input", {
2880
+ "onUpdate:modelValue": N[2] || (N[2] = (A) => n.value = A),
1840
2881
  type: "password",
1841
2882
  required: "",
1842
2883
  autocomplete: "new-password"
1843
2884
  }, null, 512), [
1844
- [V, u.value]
2885
+ [J, n.value]
1845
2886
  ])
1846
2887
  ]),
1847
- b.value || e.error ? (a(), o("p", $a, d(b.value || e.error), 1)) : p("", !0),
1848
- s("button", {
2888
+ c.value || e.error ? (t(), l("p", il, m(c.value || e.error), 1)) : b("", !0),
2889
+ r("button", {
1849
2890
  type: "submit",
1850
2891
  disabled: e.saving
1851
- }, d(e.saving ? e.labels.saving : e.labels.save), 9, La)
2892
+ }, m(e.saving ? e.labels.saving : e.labels.save), 9, sl)
1852
2893
  ], 32));
1853
2894
  }
1854
2895
  });
1855
- const ml = /* @__PURE__ */ A(Ca, [["__scopeId", "data-v-3eb63418"]]), Sa = ["aria-label"], xa = ["onClick"], Aa = /* @__PURE__ */ k({
2896
+ const Mo = /* @__PURE__ */ W(rl, [["__scopeId", "data-v-3eb63418"]]), ul = ["aria-label"], dl = ["onClick"], cl = /* @__PURE__ */ P({
1856
2897
  __name: "AdminSecuritySettings",
1857
2898
  props: {
1858
2899
  items: {},
1859
2900
  label: { default: "Security settings" }
1860
2901
  },
1861
2902
  emits: ["action"],
1862
- setup(e, { emit: c }) {
1863
- const t = c;
1864
- return (i, l) => (a(), o("section", {
2903
+ setup(e, { emit: d }) {
2904
+ const a = d;
2905
+ return (o, s) => (t(), l("section", {
1865
2906
  class: "dsea-security-settings",
1866
2907
  "aria-label": e.label
1867
2908
  }, [
1868
- (a(!0), o(x, null, M(e.items, (r) => (a(), o("div", {
1869
- key: r.key,
2909
+ (t(!0), l(F, null, K(e.items, (u) => (t(), l("div", {
2910
+ key: u.key,
1870
2911
  class: "dsea-security-settings__row"
1871
2912
  }, [
1872
- s("div", null, [
1873
- s("strong", null, d(r.title), 1),
1874
- s("p", null, d(r.description), 1)
2913
+ r("div", null, [
2914
+ r("strong", null, m(u.title), 1),
2915
+ r("p", null, m(u.description), 1)
1875
2916
  ]),
1876
- r.action ? (a(), o("button", {
2917
+ u.action ? (t(), l("button", {
1877
2918
  key: 0,
1878
2919
  type: "button",
1879
- onClick: (n) => t("action", r.key)
1880
- }, d(r.action), 9, xa)) : p("", !0)
2920
+ onClick: (i) => a("action", u.key)
2921
+ }, m(u.action), 9, dl)) : b("", !0)
1881
2922
  ]))), 128))
1882
- ], 8, Sa));
2923
+ ], 8, ul));
1883
2924
  }
1884
2925
  });
1885
- const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["aria-label"], Ta = ["disabled"], Ba = { class: "dsea-error-log__table-wrap" }, Pa = { scope: "col" }, Ia = { scope: "col" }, Ea = { scope: "col" }, Fa = ["onClick"], Na = { key: 0 }, za = {
2926
+ const Ao = /* @__PURE__ */ W(cl, [["__scopeId", "data-v-9de763c2"]]), ml = ["aria-label"], vl = ["disabled"], gl = { class: "dsea-error-log__table-wrap" }, bl = { scope: "col" }, hl = { scope: "col" }, pl = { scope: "col" }, fl = ["onClick"], yl = { key: 0 }, kl = {
1886
2927
  colspan: "4",
1887
2928
  class: "dsea-error-log__empty"
1888
- }, Da = ["aria-label"], Ka = ["aria-label"], Va = { key: 0 }, Ra = /* @__PURE__ */ k({
2929
+ }, wl = ["aria-label"], Sl = ["aria-label"], _l = { key: 0 }, $l = /* @__PURE__ */ P({
1889
2930
  __name: "AdminErrorLogView",
1890
2931
  props: {
1891
2932
  entries: {},
@@ -1899,97 +2940,97 @@ const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["ari
1899
2940
  emptyLabel: { default: "No errors" }
1900
2941
  },
1901
2942
  emits: ["clear"],
1902
- setup(e, { emit: c }) {
1903
- const t = c, i = S(null), l = S();
1904
- return U(i, async (r) => {
1905
- var n;
1906
- r && (await se(), (n = l.value) == null || n.focus());
1907
- }), (r, n) => (a(), o("section", {
2943
+ setup(e, { emit: d }) {
2944
+ const a = d, o = M(null), s = M();
2945
+ return Z(o, async (u) => {
2946
+ var i;
2947
+ u && (await Be(), (i = s.value) == null || i.focus());
2948
+ }), (u, i) => (t(), l("section", {
1908
2949
  class: "dsea-error-log",
1909
2950
  "aria-label": e.title
1910
2951
  }, [
1911
- s("header", null, [
1912
- s("h1", null, d(e.title), 1),
1913
- s("button", {
2952
+ r("header", null, [
2953
+ r("h1", null, m(e.title), 1),
2954
+ r("button", {
1914
2955
  type: "button",
1915
2956
  disabled: !e.entries.length,
1916
- onClick: n[0] || (n[0] = (u) => t("clear"))
1917
- }, d(e.clearLabel), 9, Ta)
2957
+ onClick: i[0] || (i[0] = (n) => a("clear"))
2958
+ }, m(e.clearLabel), 9, vl)
1918
2959
  ]),
1919
- s("div", Ba, [
1920
- s("table", null, [
1921
- s("thead", null, [
1922
- s("tr", null, [
1923
- s("th", Pa, d(e.timeLabel), 1),
1924
- s("th", Ia, d(e.messageLabel), 1),
1925
- s("th", Ea, d(e.sourceLabel), 1),
1926
- n[4] || (n[4] = s("th", { scope: "col" }, null, -1))
2960
+ r("div", gl, [
2961
+ r("table", null, [
2962
+ r("thead", null, [
2963
+ r("tr", null, [
2964
+ r("th", bl, m(e.timeLabel), 1),
2965
+ r("th", hl, m(e.messageLabel), 1),
2966
+ r("th", pl, m(e.sourceLabel), 1),
2967
+ i[4] || (i[4] = r("th", { scope: "col" }, null, -1))
1927
2968
  ])
1928
2969
  ]),
1929
- s("tbody", null, [
1930
- (a(!0), o(x, null, M(e.entries, (u) => (a(), o("tr", {
1931
- key: u.id
2970
+ r("tbody", null, [
2971
+ (t(!0), l(F, null, K(e.entries, (n) => (t(), l("tr", {
2972
+ key: n.id
1932
2973
  }, [
1933
- s("td", null, d(u.time), 1),
1934
- s("td", null, d(u.message), 1),
1935
- s("td", null, d(u.source), 1),
1936
- s("td", null, [
1937
- s("button", {
2974
+ r("td", null, m(n.time), 1),
2975
+ r("td", null, m(n.message), 1),
2976
+ r("td", null, m(n.source), 1),
2977
+ r("td", null, [
2978
+ r("button", {
1938
2979
  type: "button",
1939
- onClick: (b) => i.value = u
1940
- }, d(e.detailsLabel), 9, Fa)
2980
+ onClick: (c) => o.value = n
2981
+ }, m(e.detailsLabel), 9, fl)
1941
2982
  ])
1942
2983
  ]))), 128)),
1943
- e.entries.length ? p("", !0) : (a(), o("tr", Na, [
1944
- s("td", za, d(e.emptyLabel), 1)
2984
+ e.entries.length ? b("", !0) : (t(), l("tr", yl, [
2985
+ r("td", kl, m(e.emptyLabel), 1)
1945
2986
  ]))
1946
2987
  ])
1947
2988
  ])
1948
2989
  ]),
1949
- i.value ? (a(), o("div", {
2990
+ o.value ? (t(), l("div", {
1950
2991
  key: 0,
1951
2992
  class: "dsea-error-log__backdrop",
1952
- onClick: n[3] || (n[3] = H((u) => i.value = null, ["self"]))
2993
+ onClick: i[3] || (i[3] = ee((n) => o.value = null, ["self"]))
1953
2994
  }, [
1954
- s("section", {
2995
+ r("section", {
1955
2996
  ref_key: "dialog",
1956
- ref: l,
2997
+ ref: s,
1957
2998
  role: "dialog",
1958
2999
  "aria-modal": "true",
1959
3000
  "aria-label": e.detailsLabel,
1960
3001
  tabindex: "-1",
1961
3002
  class: "dsea-error-log__dialog",
1962
- onKeydown: n[2] || (n[2] = J((u) => i.value = null, ["esc"]))
3003
+ onKeydown: i[2] || (i[2] = be((n) => o.value = null, ["esc"]))
1963
3004
  }, [
1964
- s("header", null, [
1965
- s("h2", null, d(i.value.message), 1),
1966
- s("button", {
3005
+ r("header", null, [
3006
+ r("h2", null, m(o.value.message), 1),
3007
+ r("button", {
1967
3008
  type: "button",
1968
3009
  "aria-label": e.closeLabel,
1969
- onClick: n[1] || (n[1] = (u) => i.value = null)
3010
+ onClick: i[1] || (i[1] = (n) => o.value = null)
1970
3011
  }, [
1971
- $(y(w), {
3012
+ x(f(L), {
1972
3013
  icon: "lucide:x",
1973
3014
  size: 18
1974
3015
  })
1975
- ], 8, Ka)
3016
+ ], 8, Sl)
1976
3017
  ]),
1977
- s("dl", null, [
1978
- s("dt", null, d(e.timeLabel), 1),
1979
- s("dd", null, d(i.value.time), 1),
1980
- s("dt", null, d(e.sourceLabel), 1),
1981
- s("dd", null, d(i.value.source), 1)
3018
+ r("dl", null, [
3019
+ r("dt", null, m(e.timeLabel), 1),
3020
+ r("dd", null, m(o.value.time), 1),
3021
+ r("dt", null, m(e.sourceLabel), 1),
3022
+ r("dd", null, m(o.value.source), 1)
1982
3023
  ]),
1983
- i.value.details ? (a(), o("pre", Va, d(i.value.details), 1)) : p("", !0)
1984
- ], 40, Da)
1985
- ])) : p("", !0)
1986
- ], 8, Ma));
3024
+ o.value.details ? (t(), l("pre", _l, m(o.value.details), 1)) : b("", !0)
3025
+ ], 40, wl)
3026
+ ])) : b("", !0)
3027
+ ], 8, ml));
1987
3028
  }
1988
3029
  });
1989
- const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { class: "dsea-about-view" }, qa = { key: 0 }, Wa = { class: "dsea-about-view__info" }, Oa = ["href"], Ha = {
3030
+ const To = /* @__PURE__ */ W($l, [["__scopeId", "data-v-c1b52346"]]), Cl = { class: "dsea-about-view" }, xl = { key: 0 }, Ll = { class: "dsea-about-view__info" }, Ml = ["href"], Al = {
1990
3031
  key: 0,
1991
3032
  class: "dsea-about-view__dependencies"
1992
- }, ja = /* @__PURE__ */ k({
3033
+ }, Tl = /* @__PURE__ */ P({
1993
3034
  __name: "AdminAboutView",
1994
3035
  props: {
1995
3036
  title: {},
@@ -2003,47 +3044,47 @@ const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { cla
2003
3044
  dependenciesLabel: { default: "Dependencies" }
2004
3045
  },
2005
3046
  setup(e) {
2006
- const c = e, t = I(() => c.links.filter((l) => X(l.href))), i = I(() => Object.entries(c.dependencies).sort(([l], [r]) => l.localeCompare(r)));
2007
- return (l, r) => (a(), o("section", Ua, [
2008
- s("header", null, [
2009
- s("h1", null, d(e.title), 1),
2010
- e.description ? (a(), o("p", qa, d(e.description), 1)) : p("", !0)
3047
+ const d = e, a = E(() => d.links.filter((s) => ge(s.href))), o = E(() => Object.entries(d.dependencies).sort(([s], [u]) => s.localeCompare(u)));
3048
+ return (s, u) => (t(), l("section", Cl, [
3049
+ r("header", null, [
3050
+ r("h1", null, m(e.title), 1),
3051
+ e.description ? (t(), l("p", xl, m(e.description), 1)) : b("", !0)
2011
3052
  ]),
2012
- s("dl", Wa, [
2013
- s("dt", null, d(e.versionLabel), 1),
2014
- s("dd", null, d(e.version), 1),
2015
- e.builtAt ? (a(), o(x, { key: 0 }, [
2016
- s("dt", null, d(e.builtAtLabel), 1),
2017
- s("dd", null, d(e.builtAt), 1)
2018
- ], 64)) : p("", !0),
2019
- (a(!0), o(x, null, M(t.value, (n) => (a(), o(x, {
2020
- key: n.label
3053
+ r("dl", Ll, [
3054
+ r("dt", null, m(e.versionLabel), 1),
3055
+ r("dd", null, m(e.version), 1),
3056
+ e.builtAt ? (t(), l(F, { key: 0 }, [
3057
+ r("dt", null, m(e.builtAtLabel), 1),
3058
+ r("dd", null, m(e.builtAt), 1)
3059
+ ], 64)) : b("", !0),
3060
+ (t(!0), l(F, null, K(a.value, (i) => (t(), l(F, {
3061
+ key: i.label
2021
3062
  }, [
2022
- s("dt", null, d(n.label), 1),
2023
- s("dd", null, [
2024
- s("a", {
2025
- href: n.href,
3063
+ r("dt", null, m(i.label), 1),
3064
+ r("dd", null, [
3065
+ r("a", {
3066
+ href: i.href,
2026
3067
  target: "_blank",
2027
3068
  rel: "noopener noreferrer"
2028
- }, d(n.label), 9, Oa)
3069
+ }, m(i.label), 9, Ml)
2029
3070
  ])
2030
3071
  ], 64))), 128))
2031
3072
  ]),
2032
- i.value.length ? (a(), o("section", Ha, [
2033
- s("h2", null, d(e.dependenciesLabel), 1),
2034
- s("dl", null, [
2035
- (a(!0), o(x, null, M(i.value, (n) => (a(), o(x, {
2036
- key: n[0]
3073
+ o.value.length ? (t(), l("section", Al, [
3074
+ r("h2", null, m(e.dependenciesLabel), 1),
3075
+ r("dl", null, [
3076
+ (t(!0), l(F, null, K(o.value, (i) => (t(), l(F, {
3077
+ key: i[0]
2037
3078
  }, [
2038
- s("dt", null, d(n[0]), 1),
2039
- s("dd", null, d(n[1]), 1)
3079
+ r("dt", null, m(i[0]), 1),
3080
+ r("dd", null, m(i[1]), 1)
2040
3081
  ], 64))), 128))
2041
3082
  ])
2042
- ])) : p("", !0)
3083
+ ])) : b("", !0)
2043
3084
  ]));
2044
3085
  }
2045
3086
  });
2046
- const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["aria-label"], Ga = ["title"], Xa = ["aria-label", "onClick"], Ya = /* @__PURE__ */ k({
3087
+ const Po = /* @__PURE__ */ W(Tl, [["__scopeId", "data-v-c800d903"]]), Pl = ["aria-label"], Bl = ["title"], Fl = ["aria-label", "onClick"], El = /* @__PURE__ */ P({
2047
3088
  __name: "AgentAttachmentList",
2048
3089
  props: {
2049
3090
  attachments: {},
@@ -2051,47 +3092,47 @@ const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["ari
2051
3092
  removeLabel: { default: "Remove" }
2052
3093
  },
2053
3094
  emits: ["remove"],
2054
- setup(e, { emit: c }) {
2055
- const t = c;
2056
- function i(l) {
2057
- return l < 1024 ? `${l} B` : l < 1048576 ? `${(l / 1024).toFixed(1)} KB` : `${(l / 1048576).toFixed(1)} MB`;
3095
+ setup(e, { emit: d }) {
3096
+ const a = d;
3097
+ function o(s) {
3098
+ return s < 1024 ? `${s} B` : s < 1048576 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1048576).toFixed(1)} MB`;
2058
3099
  }
2059
- return (l, r) => e.attachments.length ? (a(), o("ul", {
3100
+ return (s, u) => e.attachments.length ? (t(), l("ul", {
2060
3101
  key: 0,
2061
3102
  class: "dsea-agent-attachments",
2062
3103
  "aria-label": e.label
2063
3104
  }, [
2064
- (a(!0), o(x, null, M(e.attachments, (n) => (a(), o("li", {
2065
- key: n.id
3105
+ (t(!0), l(F, null, K(e.attachments, (i) => (t(), l("li", {
3106
+ key: i.id
2066
3107
  }, [
2067
- $(y(w), {
2068
- icon: n.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
3108
+ x(f(L), {
3109
+ icon: i.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
2069
3110
  size: 14
2070
3111
  }, null, 8, ["icon"]),
2071
- s("span", {
3112
+ r("span", {
2072
3113
  class: "dsea-agent-attachments__name",
2073
- title: n.name
2074
- }, d(n.name), 9, Ga),
2075
- s("small", null, d(i(n.size)), 1),
2076
- n.status !== "uploading" ? (a(), o("button", {
3114
+ title: i.name
3115
+ }, m(i.name), 9, Bl),
3116
+ r("small", null, m(o(i.size)), 1),
3117
+ i.status !== "uploading" ? (t(), l("button", {
2077
3118
  key: 0,
2078
3119
  type: "button",
2079
- "aria-label": `${e.removeLabel}: ${n.name}`,
2080
- onClick: (u) => t("remove", n.id)
3120
+ "aria-label": `${e.removeLabel}: ${i.name}`,
3121
+ onClick: (n) => a("remove", i.id)
2081
3122
  }, [
2082
- $(y(w), {
3123
+ x(f(L), {
2083
3124
  icon: "lucide:x",
2084
3125
  size: 14
2085
3126
  })
2086
- ], 8, Xa)) : p("", !0)
3127
+ ], 8, Fl)) : b("", !0)
2087
3128
  ]))), 128))
2088
- ], 8, Qa)) : p("", !0);
3129
+ ], 8, Pl)) : b("", !0);
2089
3130
  }
2090
3131
  });
2091
- const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { class: "dsea-agent-model-select" }, en = { class: "dsea-agent-model-select__label" }, tn = ["value", "disabled"], an = {
3132
+ const Il = /* @__PURE__ */ W(El, [["__scopeId", "data-v-23c5547e"]]), Nl = { class: "dsea-agent-model-select" }, zl = { class: "dsea-agent-model-select__label" }, Dl = ["value", "disabled"], Rl = {
2092
3133
  value: "",
2093
3134
  disabled: ""
2094
- }, nn = ["value"], ln = /* @__PURE__ */ k({
3135
+ }, Kl = ["value"], Wl = /* @__PURE__ */ P({
2095
3136
  __name: "AgentModelSelect",
2096
3137
  props: {
2097
3138
  model: {},
@@ -2103,28 +3144,28 @@ const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { cla
2103
3144
  loadingLabel: { default: "Loading models" }
2104
3145
  },
2105
3146
  emits: ["update:model"],
2106
- setup(e, { emit: c }) {
2107
- const t = c;
2108
- function i(l) {
2109
- t("update:model", l.target.value);
2110
- }
2111
- return (l, r) => (a(), o("label", Za, [
2112
- s("span", en, d(e.label), 1),
2113
- s("select", {
3147
+ setup(e, { emit: d }) {
3148
+ const a = d;
3149
+ function o(s) {
3150
+ a("update:model", s.target.value);
3151
+ }
3152
+ return (s, u) => (t(), l("label", Nl, [
3153
+ r("span", zl, m(e.label), 1),
3154
+ r("select", {
2114
3155
  value: e.model,
2115
3156
  disabled: e.disabled || e.loading,
2116
- onChange: i
3157
+ onChange: o
2117
3158
  }, [
2118
- s("option", an, d(e.loading ? e.loadingLabel : e.placeholder), 1),
2119
- (a(!0), o(x, null, M(e.models, (n) => (a(), o("option", {
2120
- key: n.id,
2121
- value: n.id
2122
- }, d(n.name) + d(n.provider ? ` · ${n.provider}` : ""), 9, nn))), 128))
2123
- ], 40, tn)
3159
+ r("option", Rl, m(e.loading ? e.loadingLabel : e.placeholder), 1),
3160
+ (t(!0), l(F, null, K(e.models, (i) => (t(), l("option", {
3161
+ key: i.id,
3162
+ value: i.id
3163
+ }, m(i.name) + m(i.provider ? ` · ${i.provider}` : ""), 9, Kl))), 128))
3164
+ ], 40, Dl)
2124
3165
  ]));
2125
3166
  }
2126
3167
  });
2127
- const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { class: "dsea-agent-composer" }, rn = ["value", "placeholder", "disabled"], dn = { class: "dsea-agent-composer__toolbar" }, cn = ["disabled", "aria-label", "title"], un = ["value", "aria-label", "disabled"], mn = ["value"], bn = ["disabled", "aria-label", "title"], vn = /* @__PURE__ */ k({
3168
+ const Ol = /* @__PURE__ */ W(Wl, [["__scopeId", "data-v-bd9414ff"]]), Vl = { class: "dsea-agent-composer" }, Ul = ["value", "placeholder", "disabled"], ql = { class: "dsea-agent-composer__toolbar" }, Hl = ["disabled", "aria-label", "title"], jl = ["value", "aria-label", "disabled"], Ql = ["value"], Xl = ["disabled", "aria-label", "title"], Gl = /* @__PURE__ */ P({
2128
3169
  __name: "AgentComposer",
2129
3170
  props: {
2130
3171
  draft: {},
@@ -2147,103 +3188,103 @@ const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { cla
2147
3188
  stopLabel: { default: "Stop" }
2148
3189
  },
2149
3190
  emits: ["update:draft", "update:model", "update:approvalMode", "files", "removeAttachment", "send", "stop"],
2150
- setup(e, { emit: c }) {
2151
- const t = e, i = c, l = S();
2152
- function r(b) {
2153
- i("update:draft", b.target.value);
3191
+ setup(e, { emit: d }) {
3192
+ const a = e, o = d, s = M();
3193
+ function u(c) {
3194
+ o("update:draft", c.target.value);
2154
3195
  }
2155
- function n(b) {
2156
- b.key !== "Enter" || b.shiftKey || b.isComposing || (b.preventDefault(), !t.loading && t.draft.trim() && !t.disabled && !t.waitingApproval && i("send"));
3196
+ function i(c) {
3197
+ c.key !== "Enter" || c.shiftKey || c.isComposing || (c.preventDefault(), !a.loading && a.draft.trim() && !a.disabled && !a.waitingApproval && o("send"));
2157
3198
  }
2158
- function u(b) {
2159
- const g = b.target, v = Array.from(g.files ?? []);
2160
- v.length && i("files", v), g.value = "";
3199
+ function n(c) {
3200
+ const y = c.target, h = Array.from(y.files ?? []);
3201
+ h.length && o("files", h), y.value = "";
2161
3202
  }
2162
- return (b, g) => (a(), o("div", sn, [
2163
- $(Ja, {
3203
+ return (c, y) => (t(), l("div", Vl, [
3204
+ x(Il, {
2164
3205
  attachments: e.attachments,
2165
3206
  label: e.attachmentsLabel,
2166
- onRemove: g[0] || (g[0] = (v) => i("removeAttachment", v))
3207
+ onRemove: y[0] || (y[0] = (h) => o("removeAttachment", h))
2167
3208
  }, null, 8, ["attachments", "label"]),
2168
- s("textarea", {
3209
+ r("textarea", {
2169
3210
  value: e.draft,
2170
3211
  placeholder: e.waitingApproval ? e.waitingLabel : e.placeholder,
2171
3212
  disabled: e.disabled || e.waitingApproval,
2172
3213
  rows: "2",
2173
- onInput: r,
2174
- onKeydown: n
2175
- }, null, 40, rn),
2176
- s("div", dn, [
2177
- s("input", {
3214
+ onInput: u,
3215
+ onKeydown: i
3216
+ }, null, 40, Ul),
3217
+ r("div", ql, [
3218
+ r("input", {
2178
3219
  ref_key: "fileInput",
2179
- ref: l,
3220
+ ref: s,
2180
3221
  type: "file",
2181
3222
  multiple: "",
2182
3223
  class: "dsea-agent-composer__file-input",
2183
- onChange: u
3224
+ onChange: n
2184
3225
  }, null, 544),
2185
- s("button", {
3226
+ r("button", {
2186
3227
  type: "button",
2187
3228
  class: "dsea-agent-composer__icon",
2188
3229
  disabled: e.disabled || e.waitingApproval,
2189
3230
  "aria-label": e.attachLabel,
2190
3231
  title: e.attachLabel,
2191
- onClick: g[1] || (g[1] = (v) => {
2192
- var m;
2193
- return (m = l.value) == null ? void 0 : m.click();
3232
+ onClick: y[1] || (y[1] = (h) => {
3233
+ var p;
3234
+ return (p = s.value) == null ? void 0 : p.click();
2194
3235
  })
2195
3236
  }, [
2196
- $(y(w), {
3237
+ x(f(L), {
2197
3238
  icon: "lucide:paperclip",
2198
3239
  size: 18
2199
3240
  })
2200
- ], 8, cn),
2201
- s("select", {
3241
+ ], 8, Hl),
3242
+ r("select", {
2202
3243
  value: e.approvalMode,
2203
3244
  "aria-label": e.approvalLabel,
2204
3245
  disabled: e.disabled || e.waitingApproval,
2205
- onChange: g[2] || (g[2] = (v) => i("update:approvalMode", v.target.value))
3246
+ onChange: y[2] || (y[2] = (h) => o("update:approvalMode", h.target.value))
2206
3247
  }, [
2207
- (a(!0), o(x, null, M(e.approvalModes, (v) => (a(), o("option", {
2208
- key: v.value,
2209
- value: v.value
2210
- }, d(v.label), 9, mn))), 128))
2211
- ], 40, un),
2212
- $(on, {
3248
+ (t(!0), l(F, null, K(e.approvalModes, (h) => (t(), l("option", {
3249
+ key: h.value,
3250
+ value: h.value
3251
+ }, m(h.label), 9, Ql))), 128))
3252
+ ], 40, jl),
3253
+ x(Ol, {
2213
3254
  model: e.model,
2214
3255
  models: e.models,
2215
3256
  loading: e.modelsLoading,
2216
3257
  disabled: e.disabled || e.loading || e.waitingApproval,
2217
3258
  label: e.modelLabel,
2218
- "onUpdate:model": g[3] || (g[3] = (v) => i("update:model", v))
3259
+ "onUpdate:model": y[3] || (y[3] = (h) => o("update:model", h))
2219
3260
  }, null, 8, ["model", "models", "loading", "disabled", "label"]),
2220
- s("button", {
3261
+ r("button", {
2221
3262
  type: "button",
2222
3263
  class: "dsea-agent-composer__send",
2223
3264
  disabled: !e.loading && (!e.draft.trim() || e.disabled || e.waitingApproval),
2224
3265
  "aria-label": e.loading ? e.stopLabel : e.sendLabel,
2225
3266
  title: e.loading ? e.stopLabel : e.sendLabel,
2226
- onClick: g[4] || (g[4] = (v) => i(e.loading ? "stop" : "send"))
3267
+ onClick: y[4] || (y[4] = (h) => o(e.loading ? "stop" : "send"))
2227
3268
  }, [
2228
- $(y(w), {
3269
+ x(f(L), {
2229
3270
  icon: e.loading ? "lucide:square" : "lucide:send",
2230
3271
  size: 18
2231
3272
  }, null, 8, ["icon"])
2232
- ], 8, bn)
3273
+ ], 8, Xl)
2233
3274
  ])
2234
3275
  ]));
2235
3276
  }
2236
3277
  });
2237
- const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key: 0 }, gn = { class: "dsea-agent-approval__status" }, hn = {
3278
+ const Bo = /* @__PURE__ */ W(Gl, [["__scopeId", "data-v-f5f922c2"]]), Yl = { key: 0 }, Jl = { class: "dsea-agent-approval__status" }, Zl = {
2238
3279
  key: 0,
2239
3280
  class: "dsea-agent-approval__tool"
2240
- }, fn = { key: 1 }, yn = {
3281
+ }, eo = { key: 1 }, to = {
2241
3282
  key: 2,
2242
3283
  class: "dsea-agent-approval__meta"
2243
- }, kn = {
3284
+ }, ao = {
2244
3285
  key: 3,
2245
3286
  class: "dsea-agent-approval__reason"
2246
- }, _n = { key: 4 }, wn = ["disabled"], $n = ["disabled"], Ln = /* @__PURE__ */ k({
3287
+ }, no = { key: 4 }, lo = ["disabled"], oo = ["disabled"], io = /* @__PURE__ */ P({
2247
3288
  __name: "AgentApprovalCard",
2248
3289
  props: {
2249
3290
  approval: {},
@@ -2251,8 +3292,8 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
2251
3292
  labels: {}
2252
3293
  },
2253
3294
  emits: ["resolve"],
2254
- setup(e, { emit: c }) {
2255
- const t = e, i = c, l = {
3295
+ setup(e, { emit: d }) {
3296
+ const a = e, o = d, s = {
2256
3297
  status: {
2257
3298
  pending: "Approval needed",
2258
3299
  approved: "Approved",
@@ -2269,364 +3310,123 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
2269
3310
  expires: "Expires",
2270
3311
  reject: "Reject",
2271
3312
  approve: "Approve"
2272
- }, r = I(() => {
2273
- var n, u;
3313
+ }, u = E(() => {
3314
+ var i, n;
2274
3315
  return {
2275
- ...l,
2276
- ...t.labels,
2277
- status: { ...l.status, ...(n = t.labels) == null ? void 0 : n.status },
2278
- risk: { ...l.risk, ...(u = t.labels) == null ? void 0 : u.risk }
3316
+ ...s,
3317
+ ...a.labels,
3318
+ status: { ...s.status, ...(i = a.labels) == null ? void 0 : i.status },
3319
+ risk: { ...s.risk, ...(n = a.labels) == null ? void 0 : n.risk }
2279
3320
  };
2280
3321
  });
2281
- return (n, u) => (a(), o("article", {
2282
- class: N(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
3322
+ return (i, n) => (t(), l("article", {
3323
+ class: U(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
2283
3324
  }, [
2284
- s("header", null, [
2285
- s("div", null, [
2286
- s("h2", null, d(r.value.status[e.approval.status] || e.approval.status), 1),
2287
- e.approval.summary ? (a(), o("p", pn, d(e.approval.summary), 1)) : p("", !0)
3325
+ r("header", null, [
3326
+ r("div", null, [
3327
+ r("h2", null, m(u.value.status[e.approval.status] || e.approval.status), 1),
3328
+ e.approval.summary ? (t(), l("p", Yl, m(e.approval.summary), 1)) : b("", !0)
2288
3329
  ]),
2289
- s("span", gn, d(r.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
3330
+ r("span", Jl, m(u.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
2290
3331
  ]),
2291
- e.approval.toolName ? (a(), o("p", hn, [
2292
- z(d(r.value.tool) + ": ", 1),
2293
- s("code", null, d(e.approval.toolName), 1)
2294
- ])) : p("", !0),
2295
- e.approval.details ? (a(), o("details", fn, [
2296
- s("summary", null, d(r.value.details), 1),
2297
- s("pre", null, d(e.approval.details), 1)
2298
- ])) : p("", !0),
2299
- e.approval.expiresAt ? (a(), o("p", yn, d(r.value.expires) + ": " + d(e.approval.expiresAt), 1)) : p("", !0),
2300
- e.approval.reason ? (a(), o("p", kn, d(e.approval.reason), 1)) : p("", !0),
2301
- e.approval.status === "pending" ? (a(), o("footer", _n, [
2302
- s("button", {
3332
+ e.approval.toolName ? (t(), l("p", Zl, [
3333
+ Q(m(u.value.tool) + ": ", 1),
3334
+ r("code", null, m(e.approval.toolName), 1)
3335
+ ])) : b("", !0),
3336
+ e.approval.details ? (t(), l("details", eo, [
3337
+ r("summary", null, m(u.value.details), 1),
3338
+ r("pre", null, m(e.approval.details), 1)
3339
+ ])) : b("", !0),
3340
+ e.approval.expiresAt ? (t(), l("p", to, m(u.value.expires) + ": " + m(e.approval.expiresAt), 1)) : b("", !0),
3341
+ e.approval.reason ? (t(), l("p", ao, m(e.approval.reason), 1)) : b("", !0),
3342
+ e.approval.status === "pending" ? (t(), l("footer", no, [
3343
+ r("button", {
2303
3344
  type: "button",
2304
3345
  disabled: e.busy,
2305
- onClick: u[0] || (u[0] = (b) => i("resolve", "reject"))
2306
- }, d(r.value.reject), 9, wn),
2307
- s("button", {
3346
+ onClick: n[0] || (n[0] = (c) => o("resolve", "reject"))
3347
+ }, m(u.value.reject), 9, lo),
3348
+ r("button", {
2308
3349
  type: "button",
2309
3350
  class: "dsea-agent-approval__approve",
2310
3351
  disabled: e.busy,
2311
- onClick: u[1] || (u[1] = (b) => i("resolve", "approve"))
2312
- }, d(r.value.approve), 9, $n)
2313
- ])) : p("", !0)
3352
+ onClick: n[1] || (n[1] = (c) => o("resolve", "approve"))
3353
+ }, m(u.value.approve), 9, oo)
3354
+ ])) : b("", !0)
2314
3355
  ], 2));
2315
3356
  }
2316
3357
  });
2317
- const hl = /* @__PURE__ */ A(Ln, [["__scopeId", "data-v-88695aee"]]), Cn = { class: "dsea-admin-tabs" }, Sn = {
2318
- class: "dsea-admin-tabs__list",
2319
- role: "tablist"
2320
- }, xn = ["aria-selected", "onClick"], An = ["aria-label", "onClick"], Mn = {
2321
- key: 0,
2322
- class: "dsea-admin-tabs__tools"
2323
- }, Tn = ["aria-label"], Bn = ["aria-label"], fl = /* @__PURE__ */ k({
2324
- __name: "AdminTabs",
2325
- props: {
2326
- tabs: {},
2327
- activeKey: {},
2328
- labels: {},
2329
- navigateOnSelect: { type: Boolean, default: !0 }
2330
- },
2331
- emits: ["select", "close", "refresh", "closeAction"],
2332
- setup(e, { emit: c }) {
2333
- const t = e, i = c, { ports: l } = q(), r = I(() => [
2334
- { event: "left", text: t.labels.closeLeft },
2335
- { event: "right", text: t.labels.closeRight },
2336
- { event: "others", text: t.labels.closeOthers },
2337
- { event: "all", text: t.labels.closeAll }
2338
- ]);
2339
- function n(g) {
2340
- i("select", g), t.navigateOnSelect && l.navigation.go(g);
2341
- }
2342
- function u(g) {
2343
- i("close", g);
2344
- }
2345
- function b(g) {
2346
- g && i("closeAction", g.event, t.activeKey);
2347
- }
2348
- return (g, v) => (a(), o("div", Cn, [
2349
- s("div", Sn, [
2350
- (a(!0), o(x, null, M(e.tabs, (m) => (a(), o("div", {
2351
- key: m.key,
2352
- class: N(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": m.key === e.activeKey }])
2353
- }, [
2354
- s("button", {
2355
- type: "button",
2356
- role: "tab",
2357
- "aria-selected": m.key === e.activeKey,
2358
- class: "dsea-admin-tabs__select",
2359
- onClick: (L) => n(m.key)
2360
- }, [
2361
- m.icon ? (a(), P(y(w), {
2362
- key: 0,
2363
- icon: m.icon,
2364
- size: 14
2365
- }, null, 8, ["icon"])) : p("", !0),
2366
- s("span", null, d(m.label), 1)
2367
- ], 8, xn),
2368
- m.affix ? p("", !0) : (a(), o("button", {
2369
- key: 0,
2370
- type: "button",
2371
- class: "dsea-admin-tabs__close",
2372
- "aria-label": `${e.labels.close}: ${m.label}`,
2373
- onClick: (L) => u(m.key)
2374
- }, [
2375
- $(y(w), {
2376
- icon: "lucide:x",
2377
- size: 14
2378
- })
2379
- ], 8, An))
2380
- ], 2))), 128))
2381
- ]),
2382
- e.tabs.length ? (a(), o("div", Mn, [
2383
- s("button", {
2384
- type: "button",
2385
- "aria-label": e.labels.refresh,
2386
- onClick: v[0] || (v[0] = (m) => i("refresh", e.activeKey))
2387
- }, [
2388
- $(y(w), {
2389
- icon: "lucide:refresh-cw",
2390
- size: 16
2391
- })
2392
- ], 8, Tn),
2393
- $(y(re), {
2394
- "drop-menu-list": r.value,
2395
- trigger: ["click"],
2396
- onMenuEvent: b
2397
- }, {
2398
- default: j(() => [
2399
- s("button", {
2400
- type: "button",
2401
- "aria-label": e.labels.actions
2402
- }, [
2403
- $(y(w), {
2404
- icon: "lucide:chevron-down",
2405
- size: 16
2406
- })
2407
- ], 8, Bn)
2408
- ]),
2409
- _: 1
2410
- }, 8, ["drop-menu-list"])
2411
- ])) : p("", !0)
2412
- ]));
2413
- }
2414
- });
2415
- function yl(e, c, t) {
2416
- const i = e.findIndex((l) => l.key === c);
2417
- return i < 0 && t !== "all" ? [...e] : e.filter((l, r) => {
2418
- if (l.affix)
3358
+ const Fo = /* @__PURE__ */ W(io, [["__scopeId", "data-v-88695aee"]]);
3359
+ function Eo(e, d, a) {
3360
+ const o = e.findIndex((s) => s.key === d);
3361
+ return o < 0 && a !== "all" ? [...e] : e.filter((s, u) => {
3362
+ if (s.affix)
2419
3363
  return !0;
2420
- switch (t) {
3364
+ switch (a) {
2421
3365
  case "current":
2422
- return l.key !== c;
3366
+ return s.key !== d;
2423
3367
  case "left":
2424
- return r >= i;
3368
+ return u >= o;
2425
3369
  case "right":
2426
- return r <= i;
3370
+ return u <= o;
2427
3371
  case "others":
2428
- return l.key === c;
3372
+ return s.key === d;
2429
3373
  case "all":
2430
3374
  return !1;
2431
3375
  }
2432
3376
  });
2433
3377
  }
2434
- function kl(e, c) {
2435
- var t;
2436
- return e.some((i) => i.key === c) ? c : (t = e[e.length - 1]) == null ? void 0 : t.key;
3378
+ function Io(e, d) {
3379
+ var a;
3380
+ return e.some((o) => o.key === d) ? d : (a = e[e.length - 1]) == null ? void 0 : a.key;
2437
3381
  }
2438
- const Pn = { class: "dsea-settings-panel" }, In = ["for"], En = { key: 1 }, Fn = ["aria-label"], Nn = ["aria-label", "aria-pressed", "disabled", "onClick"], zn = ["aria-label"], Dn = ["aria-pressed", "disabled", "onClick"], Kn = /* @__PURE__ */ k({
2439
- __name: "SettingsPanel",
2440
- props: {
2441
- sections: {}
2442
- },
2443
- emits: ["change"],
2444
- setup(e, { emit: c }) {
2445
- const t = c;
2446
- function i(u, b) {
2447
- t("change", u, b);
2448
- }
2449
- function l(u, b) {
2450
- typeof b == "boolean" && i(u, b);
2451
- }
2452
- function r(u, b) {
2453
- (typeof b == "string" || typeof b == "number") && i(u, b);
2454
- }
2455
- function n(u, b) {
2456
- typeof b == "number" && Number.isFinite(b) && i(u, b);
2457
- }
2458
- return (u, b) => (a(), o("div", Pn, [
2459
- (a(!0), o(x, null, M(e.sections, (g) => (a(), o("section", {
2460
- key: g.title,
2461
- class: "dsea-settings-panel__section"
2462
- }, [
2463
- s("h3", null, d(g.title), 1),
2464
- (a(!0), o(x, null, M(g.items, (v) => (a(), o("div", {
2465
- key: v.key,
2466
- class: N(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": v.type === "color" || v.type === "mode" }])
2467
- }, [
2468
- v.type === "switch" || v.type === "select" || v.type === "number" ? (a(), o("label", {
2469
- key: 0,
2470
- for: v.key
2471
- }, d(v.label), 9, In)) : (a(), o("span", En, d(v.label), 1)),
2472
- v.type === "switch" ? (a(), P(y(ye), {
2473
- key: 2,
2474
- id: v.key,
2475
- checked: v.value,
2476
- disabled: v.disabled,
2477
- onChange: (m) => l(v.key, m)
2478
- }, null, 8, ["id", "checked", "disabled", "onChange"])) : v.type === "select" ? (a(), P(y(ke), {
2479
- key: 3,
2480
- id: v.key,
2481
- value: v.value,
2482
- options: v.options,
2483
- disabled: v.disabled,
2484
- class: "dsea-settings-panel__select",
2485
- onChange: (m) => r(v.key, m)
2486
- }, null, 8, ["id", "value", "options", "disabled", "onChange"])) : v.type === "number" ? (a(), P(y(_e), {
2487
- key: 4,
2488
- id: v.key,
2489
- value: v.value,
2490
- min: v.min,
2491
- max: v.max,
2492
- step: v.step,
2493
- disabled: v.disabled,
2494
- class: "dsea-settings-panel__number",
2495
- onChange: (m) => n(v.key, m)
2496
- }, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : v.type === "color" ? (a(), o("div", {
2497
- key: 5,
2498
- class: "dsea-settings-panel__colors",
2499
- role: "group",
2500
- "aria-label": v.label
2501
- }, [
2502
- (a(!0), o(x, null, M(v.colors, (m) => (a(), o("button", {
2503
- key: m,
2504
- type: "button",
2505
- class: N(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": v.value === m }]),
2506
- style: ie({ backgroundColor: m }),
2507
- "aria-label": m,
2508
- "aria-pressed": v.value === m,
2509
- disabled: v.disabled,
2510
- onClick: (L) => i(v.key, m)
2511
- }, [
2512
- v.value === m ? (a(), P(y(w), {
2513
- key: 0,
2514
- icon: "lucide:check",
2515
- size: 14
2516
- })) : p("", !0)
2517
- ], 14, Nn))), 128))
2518
- ], 8, Fn)) : v.type === "mode" ? (a(), o("div", {
2519
- key: 6,
2520
- class: "dsea-settings-panel__modes",
2521
- role: "group",
2522
- "aria-label": v.label
2523
- }, [
2524
- (a(!0), o(x, null, M(v.options, (m) => (a(), o("button", {
2525
- key: m.value,
2526
- type: "button",
2527
- class: N({ active: v.value === m.value }),
2528
- "aria-pressed": v.value === m.value,
2529
- disabled: v.disabled,
2530
- onClick: (L) => i(v.key, m.value)
2531
- }, [
2532
- m.icon ? (a(), P(y(w), {
2533
- key: 0,
2534
- icon: m.icon,
2535
- size: 16
2536
- }, null, 8, ["icon"])) : p("", !0),
2537
- z(" " + d(m.label), 1)
2538
- ], 10, Dn))), 128))
2539
- ], 8, zn)) : p("", !0)
2540
- ], 2))), 128))
2541
- ]))), 128))
2542
- ]));
2543
- }
2544
- });
2545
- const _l = /* @__PURE__ */ k({
2546
- __name: "AdminSettingsDrawer",
2547
- props: {
2548
- open: { type: Boolean },
2549
- title: {},
2550
- sections: {},
2551
- width: { default: 340 },
2552
- resetLabel: {}
2553
- },
2554
- emits: ["update:open", "change", "reset"],
2555
- setup(e, { emit: c }) {
2556
- const t = c;
2557
- return (i, l) => (a(), P(y(we), {
2558
- visible: e.open,
2559
- title: e.title,
2560
- placement: "right",
2561
- width: e.width,
2562
- onClose: l[2] || (l[2] = (r) => t("update:open", !1))
2563
- }, fe({
2564
- default: j(() => [
2565
- $(Kn, {
2566
- sections: e.sections,
2567
- onChange: l[0] || (l[0] = (r, n) => t("change", r, n))
2568
- }, null, 8, ["sections"])
2569
- ]),
2570
- _: 2
2571
- }, [
2572
- i.$slots.footer || e.resetLabel ? {
2573
- name: "footer",
2574
- fn: j(() => [
2575
- B(i.$slots, "footer", {}, () => [
2576
- s("button", {
2577
- type: "button",
2578
- class: "dsea-settings-drawer__reset",
2579
- onClick: l[1] || (l[1] = (r) => t("reset"))
2580
- }, d(e.resetLabel), 1)
2581
- ])
2582
- ]),
2583
- key: "0"
2584
- } : void 0
2585
- ]), 1032, ["visible", "title", "width"]));
2586
- }
2587
- });
2588
3382
  export {
2589
- pl as AdminAboutView,
2590
- Jn as AdminAppSwitcher,
2591
- ol as AdminBreadcrumb,
2592
- vl as AdminErrorLogView,
2593
- dl as AdminExceptionView,
2594
- Yn as AdminFullscreenButton,
2595
- sl as AdminIframeView,
2596
- ll as AdminLayout,
2597
- rl as AdminLockView,
2598
- il as AdminLoginView,
2599
- nl as AdminNotificationCenter,
2600
- ml as AdminPasswordForm,
2601
- ul as AdminProfileForm,
2602
- cl as AdminProfileTabs,
2603
- bl as AdminSecuritySettings,
2604
- _l as AdminSettingsDrawer,
2605
- fl as AdminTabs,
2606
- al as AdminUserMenu,
2607
- hl as AgentApprovalCard,
2608
- Ja as AgentAttachmentList,
2609
- gl as AgentComposer,
2610
- on as AgentModelSelect,
2611
- Xn as AppDarkModeToggle,
2612
- Gn as AppLocalePicker,
2613
- Ce as AppLogo,
2614
- el as AppProvider,
2615
- tl as AppSearch,
2616
- te as BasicMenu,
2617
- Kn as SettingsPanel,
2618
- jn as SimpleMenu,
2619
- Qn as SimpleMenuTag,
2620
- de as adminMenuKey,
2621
- ne as adminShellMessages,
2622
- me as appProviderKey,
2623
- yl as closeTabs,
2624
- Hn as createAdminMenuPlugin,
2625
- be as createAppProviderContext,
2626
- Wn as getAdminShellMessage,
2627
- ee as getAllParentPath,
2628
- On as legacyAdminMessages,
2629
- kl as nextActiveTab,
2630
- ce as useAdminMenuPort,
2631
- Zn as useAppProviderContext
3383
+ Po as AdminAboutView,
3384
+ Mt as AdminAppSwitcher,
3385
+ _a as AdminBreadcrumb,
3386
+ To as AdminErrorLogView,
3387
+ Co as AdminExceptionView,
3388
+ vt as AdminFullscreenButton,
3389
+ So as AdminIframeView,
3390
+ ko as AdminLayout,
3391
+ $o as AdminLockView,
3392
+ _o as AdminLoginView,
3393
+ na as AdminNotificationCenter,
3394
+ Mo as AdminPasswordForm,
3395
+ Lo as AdminProfileForm,
3396
+ xo as AdminProfileTabs,
3397
+ Ao as AdminSecuritySettings,
3398
+ Va as AdminSettingsDrawer,
3399
+ Ea as AdminTabs,
3400
+ qt as AdminUserMenu,
3401
+ Fo as AgentApprovalCard,
3402
+ Il as AgentAttachmentList,
3403
+ Bo as AgentComposer,
3404
+ Ol as AgentModelSelect,
3405
+ po as AppDarkModeToggle,
3406
+ rt as AppLocalePicker,
3407
+ ve as AppLogo,
3408
+ yo as AppProvider,
3409
+ zt as AppSearch,
3410
+ oe as BasicMenu,
3411
+ wo as ClassicAdminLayout,
3412
+ Oa as SettingsPanel,
3413
+ bo as SimpleMenu,
3414
+ ho as SimpleMenuTag,
3415
+ Ee as adminMenuKey,
3416
+ Me as adminShellMessages,
3417
+ Ne as appProviderKey,
3418
+ ae as classicLayoutDefaults,
3419
+ Eo as closeTabs,
3420
+ go as createAdminMenuPlugin,
3421
+ ze as createAppProviderContext,
3422
+ qa as createClassicLayoutSettingsController,
3423
+ De as firstClassicPage,
3424
+ mo as getAdminShellMessage,
3425
+ ue as getAllParentPath,
3426
+ vo as legacyAdminMessages,
3427
+ Io as nextActiveTab,
3428
+ ke as normalizeClassicLayoutSettings,
3429
+ Ha as resolveClassicNavigation,
3430
+ Se as useAdminMenuPort,
3431
+ fo as useAppProviderContext
2632
3432
  };