@feedmepos/mf-hrm-portal 2.0.3-dev.3 → 2.0.3-dev.5

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.
Files changed (24) hide show
  1. package/dist/{AuditLogList-ssYtQ2J1.js → AuditLogList-CV-y1xix.js} +28 -28
  2. package/dist/{EmployeeList-CNNgH2vX.js → EmployeeList-DDbML16v.js} +5 -5
  3. package/dist/{Main-DAcmCNsi.js → Main-CHG4jcIV.js} +8 -8
  4. package/dist/{Main-DmaUVB5Y.js → Main-CoY-GVfR.js} +5 -5
  5. package/dist/{PermissionSetList-CybAQCrm.js → PermissionSetList-BpbcJwgS.js} +27 -27
  6. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-6Vgf4lIX.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CUqD40tX.js} +361 -361
  7. package/dist/{RoleList-rv6egTFo.js → RoleList-DU6TSPjK.js} +6 -6
  8. package/dist/{TeamMemberList-JjUw7Pdt.js → TeamMemberList-BPhlYPcR.js} +7 -7
  9. package/dist/{TimesheetList-lYmFc7sY.js → TimesheetList-BZX7mz7l.js} +6 -6
  10. package/dist/{app-BF5fWLn5.js → app-CsL8zF1K.js} +703 -789
  11. package/dist/app.js +1 -1
  12. package/dist/{dayjs.min-_VE-J0yP.js → dayjs.min-DEds7FgH.js} +1 -1
  13. package/dist/{employee-BDPrgphI.js → employee-7Dzn6dfg.js} +3 -3
  14. package/dist/{index-CdQ13eT1.js → index-BWPzcUza.js} +1 -1
  15. package/dist/{index-CFGp5zzo.js → index-C5JbANxF.js} +652 -631
  16. package/dist/{lodash-CucjoHYl.js → lodash-OC-U-Tc5.js} +1 -1
  17. package/dist/src/helpers/permission-set.d.ts +1 -1
  18. package/dist/{team-DzG7du5b.js → team-WEakcs7T.js} +1 -1
  19. package/dist/{timesheet-BHNzrve1.js → timesheet-ORUr4kLh.js} +2 -2
  20. package/dist/tsconfig.app.tsbuildinfo +1 -1
  21. package/dist/{useAppStore-D4PCstqq.js → useAppStore-BecgT5CH.js} +1 -1
  22. package/dist/{useLoading-wggM_LZw.js → useLoading-C-sYO9Ah.js} +1 -1
  23. package/dist/{useReportPermissions-C2cFzRyt.js → useReportPermissions-C0YEiS2R.js} +2 -2
  24. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { h as pe, defineComponent as I, ref as S, renderSlot as Ce, createBlock as _, onMounted as oe, openBlock as z, createElementBlock as ve, createElementVNode as P, unref as se, toDisplayString as be, watch as we, nextTick as fe, onBeforeUnmount as nt, computed as ye, normalizeStyle as ot, resolveComponent as ce, withCtx as ct, createVNode as it, defineAsyncComponent as lt, watchEffect as ut } from "vue";
1
+ import { h as be, defineComponent as I, ref as S, renderSlot as Ce, createBlock as _, onMounted as oe, openBlock as z, createElementBlock as ve, createElementVNode as P, unref as se, toDisplayString as pe, watch as we, nextTick as fe, onBeforeUnmount as nt, computed as Ge, normalizeStyle as ot, resolveComponent as ce, withCtx as ct, createVNode as it, defineAsyncComponent as lt, watchEffect as ut } from "vue";
2
2
  import { useBreakpoints as gt } from "@feedmepos/ui-library";
3
3
  import { useRoute as mt, useRouter as dt } from "vue-router";
4
- import { useI18n as Ge, useCoreStore as Bt } from "@feedmepos/mf-common";
5
- const he = {
4
+ import { useI18n as he, useCoreStore as Bt } from "@feedmepos/mf-common";
5
+ const ye = {
6
6
  title: "Audit Log",
7
7
  dateRange: {
8
8
  placeholder: "Select date range"
@@ -71,12 +71,12 @@ const he = {
71
71
  requestPath: "Request Path",
72
72
  requestBody: "Request Body"
73
73
  }
74
- }, pt = {
75
- auditLog: he
76
- }, bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, bt = {
75
+ auditLog: ye
76
+ }, pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
77
77
  __proto__: null,
78
- auditLog: he,
79
- default: pt
78
+ auditLog: ye,
79
+ default: bt
80
80
  }, Symbol.toStringTag, { value: "Module" })), Ve = {
81
81
  title: "บันทึกการตรวจสอบ",
82
82
  dateRange: {
@@ -306,7 +306,7 @@ const he = {
306
306
  auditLog: Ee,
307
307
  default: Yt
308
308
  }, Symbol.toStringTag, { value: "Module" })), vt = {
309
- "en-US": bt,
309
+ "en-US": pt,
310
310
  "zh-CN": Mt,
311
311
  "th-TH": ft,
312
312
  "zh-Hant": Ct
@@ -463,11 +463,11 @@ const he = {
463
463
  placeholder: "Search restaurant"
464
464
  }
465
465
  }
466
- }, yt = {
466
+ }, Gt = {
467
467
  hr: xe
468
- }, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
468
+ }, ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
469
  __proto__: null,
470
- default: yt,
470
+ default: Gt,
471
471
  hr: xe
472
472
  }, Symbol.toStringTag, { value: "Module" })), Qe = {
473
473
  employee: {
@@ -621,11 +621,11 @@ const he = {
621
621
  placeholder: "ค้นหาร้านอาหาร"
622
622
  }
623
623
  }
624
- }, ht = {
624
+ }, yt = {
625
625
  hr: Qe
626
626
  }, Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
627
627
  __proto__: null,
628
- default: ht,
628
+ default: yt,
629
629
  hr: Qe
630
630
  }, Symbol.toStringTag, { value: "Module" })), Xe = {
631
631
  employee: {
@@ -941,7 +941,7 @@ const he = {
941
941
  default: xt,
942
942
  hr: qe
943
943
  }, Symbol.toStringTag, { value: "Module" })), Xt = {
944
- "en-US": Gt,
944
+ "en-US": ht,
945
945
  "zh-CN": Et,
946
946
  "th-TH": Vt,
947
947
  "zh-Hant": Qt
@@ -1525,26 +1525,26 @@ function Ut(e) {
1525
1525
  }
1526
1526
  var We = { exports: {} };
1527
1527
  (function(e, o) {
1528
- (function(i, r) {
1529
- e.exports = r();
1528
+ (function(c, A) {
1529
+ e.exports = A();
1530
1530
  })(Wt, function() {
1531
- return function(i) {
1532
- var r = {};
1533
- function A(n) {
1534
- if (r[n]) return r[n].exports;
1535
- var u = r[n] = { i: n, l: !1, exports: {} };
1536
- return i[n].call(u.exports, u, u.exports, A), u.l = !0, u.exports;
1531
+ return function(c) {
1532
+ var A = {};
1533
+ function r(n) {
1534
+ if (A[n]) return A[n].exports;
1535
+ var u = A[n] = { i: n, l: !1, exports: {} };
1536
+ return c[n].call(u.exports, u, u.exports, r), u.l = !0, u.exports;
1537
1537
  }
1538
- return A.m = i, A.c = r, A.d = function(n, u, g) {
1539
- A.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: g });
1540
- }, A.r = function(n) {
1538
+ return r.m = c, r.c = A, r.d = function(n, u, g) {
1539
+ r.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: g });
1540
+ }, r.r = function(n) {
1541
1541
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
1542
- }, A.t = function(n, u) {
1543
- if (1 & u && (n = A(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
1542
+ }, r.t = function(n, u) {
1543
+ if (1 & u && (n = r(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
1544
1544
  var g = /* @__PURE__ */ Object.create(null);
1545
- if (A.r(g), Object.defineProperty(g, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
1545
+ if (r.r(g), Object.defineProperty(g, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
1546
1546
  for (var M in n)
1547
- A.d(
1547
+ r.d(
1548
1548
  g,
1549
1549
  M,
1550
1550
  (function(Y) {
@@ -1552,350 +1552,350 @@ var We = { exports: {} };
1552
1552
  }).bind(null, M)
1553
1553
  );
1554
1554
  return g;
1555
- }, A.n = function(n) {
1555
+ }, r.n = function(n) {
1556
1556
  var u = n && n.__esModule ? function() {
1557
1557
  return n.default;
1558
1558
  } : function() {
1559
1559
  return n;
1560
1560
  };
1561
- return A.d(u, "a", u), u;
1562
- }, A.o = function(n, u) {
1561
+ return r.d(u, "a", u), u;
1562
+ }, r.o = function(n, u) {
1563
1563
  return Object.prototype.hasOwnProperty.call(n, u);
1564
- }, A.p = "", A(A.s = 0);
1564
+ }, r.p = "", r(r.s = 0);
1565
1565
  }([
1566
- function(i, r, A) {
1567
- i.exports = A(1);
1566
+ function(c, A, r) {
1567
+ c.exports = r(1);
1568
1568
  },
1569
- function(i, r, A) {
1570
- function n(s) {
1569
+ function(c, A, r) {
1570
+ function n(t) {
1571
1571
  return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
1572
1572
  return typeof a;
1573
1573
  } : function(a) {
1574
1574
  return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
1575
- })(s);
1575
+ })(t);
1576
1576
  }
1577
- function u(s) {
1578
- var a = "[object " + s + "]";
1579
- return function(l) {
1580
- return Object.prototype.toString.call(l) === a;
1577
+ function u(t) {
1578
+ var a = "[object " + t + "]";
1579
+ return function(i) {
1580
+ return Object.prototype.toString.call(i) === a;
1581
1581
  };
1582
1582
  }
1583
- A.r(r), A.d(r, "default", function() {
1584
- return rt;
1585
- }), A.d(r, "compare", function() {
1583
+ r.r(A), r.d(A, "default", function() {
1584
+ return At;
1585
+ }), r.d(A, "compare", function() {
1586
1586
  return me;
1587
- }), A.d(r, "comparable", function() {
1587
+ }), r.d(A, "comparable", function() {
1588
1588
  return $;
1589
1589
  });
1590
1590
  var g = u("Array"), M = u("Object"), Y = u("Function");
1591
- function D(s, a) {
1592
- return Y(s.get) ? s.get(a) : s[a];
1591
+ function D(t, a) {
1592
+ return Y(t.get) ? t.get(a) : t[a];
1593
1593
  }
1594
- function G(s) {
1595
- return function(a, l) {
1596
- if (!g(l) || !l.length) return s(a, l);
1597
- for (var m = 0, d = l.length; m < d; m++)
1598
- if (s(a, D(l, m))) return !0;
1594
+ function h(t) {
1595
+ return function(a, i) {
1596
+ if (!g(i) || !i.length) return t(a, i);
1597
+ for (var m = 0, d = i.length; m < d; m++)
1598
+ if (t(a, D(i, m))) return !0;
1599
1599
  return !1;
1600
1600
  };
1601
1601
  }
1602
- function U(s) {
1603
- return function(a, l) {
1604
- if (!g(l) || !l.length) return s(a, l);
1605
- for (var m = 0, d = l.length; m < d; m++)
1606
- if (!s(a, D(l, m))) return !1;
1602
+ function U(t) {
1603
+ return function(a, i) {
1604
+ if (!g(i) || !i.length) return t(a, i);
1605
+ for (var m = 0, d = i.length; m < d; m++)
1606
+ if (!t(a, D(i, m))) return !1;
1607
1607
  return !0;
1608
1608
  };
1609
1609
  }
1610
- function h(s, a, l, m) {
1611
- return s.validate(s.options, a, l, m);
1610
+ function y(t, a, i, m) {
1611
+ return t.validate(t.options, a, i, m);
1612
1612
  }
1613
1613
  var x = {
1614
- $eq: G(function(s, a) {
1615
- return s(a);
1614
+ $eq: h(function(t, a) {
1615
+ return t(a);
1616
1616
  }),
1617
- $ne: U(function(s, a) {
1618
- return s(a);
1617
+ $ne: U(function(t, a) {
1618
+ return t(a);
1619
1619
  }),
1620
- $gt: G(function(s, a) {
1621
- return s(a);
1620
+ $gt: h(function(t, a) {
1621
+ return t(a);
1622
1622
  }),
1623
- $gte: G(function(s, a) {
1624
- return s(a);
1623
+ $gte: h(function(t, a) {
1624
+ return t(a);
1625
1625
  }),
1626
- $lt: G(function(s, a) {
1627
- return s(a);
1626
+ $lt: h(function(t, a) {
1627
+ return t(a);
1628
1628
  }),
1629
- $lte: G(function(s, a) {
1630
- return s(a);
1629
+ $lte: h(function(t, a) {
1630
+ return t(a);
1631
1631
  }),
1632
- $mod: G(function(s, a) {
1633
- return s(a);
1632
+ $mod: h(function(t, a) {
1633
+ return t(a);
1634
1634
  }),
1635
- $in: function(s, a) {
1636
- return s(a);
1635
+ $in: function(t, a) {
1636
+ return t(a);
1637
1637
  },
1638
- $nin: function(s, a) {
1639
- return s(a);
1638
+ $nin: function(t, a) {
1639
+ return t(a);
1640
1640
  },
1641
- $not: function(s, a, l, m) {
1642
- return s(a, l, m);
1641
+ $not: function(t, a, i, m) {
1642
+ return t(a, i, m);
1643
1643
  },
1644
- $type: function(s, a) {
1645
- return s(a);
1644
+ $type: function(t, a) {
1645
+ return t(a);
1646
1646
  },
1647
- $all: function(s, a, l, m) {
1648
- return x.$and(s, a, l, m);
1647
+ $all: function(t, a, i, m) {
1648
+ return x.$and(t, a, i, m);
1649
1649
  },
1650
- $size: function(s, a) {
1651
- return !!a && s === a.length;
1650
+ $size: function(t, a) {
1651
+ return !!a && t === a.length;
1652
1652
  },
1653
- $or: function(s, a, l, m) {
1654
- for (var d = 0, p = s.length; d < p; d++)
1655
- if (h(D(s, d), a, l, m)) return !0;
1653
+ $or: function(t, a, i, m) {
1654
+ for (var d = 0, b = t.length; d < b; d++)
1655
+ if (y(D(t, d), a, i, m)) return !0;
1656
1656
  return !1;
1657
1657
  },
1658
- $nor: function(s, a, l, m) {
1659
- return !x.$or(s, a, l, m);
1658
+ $nor: function(t, a, i, m) {
1659
+ return !x.$or(t, a, i, m);
1660
1660
  },
1661
- $and: function(s, a, l, m) {
1662
- for (var d = 0, p = s.length; d < p; d++)
1663
- if (!h(D(s, d), a, l, m)) return !1;
1661
+ $and: function(t, a, i, m) {
1662
+ for (var d = 0, b = t.length; d < b; d++)
1663
+ if (!y(D(t, d), a, i, m)) return !1;
1664
1664
  return !0;
1665
1665
  },
1666
- $regex: G(function(s, a) {
1667
- return typeof a == "string" && s.test(a);
1666
+ $regex: h(function(t, a) {
1667
+ return typeof a == "string" && t.test(a);
1668
1668
  }),
1669
- $where: function(s, a, l, m) {
1670
- return s.call(a, a, l, m);
1669
+ $where: function(t, a, i, m) {
1670
+ return t.call(a, a, i, m);
1671
1671
  },
1672
- $elemMatch: function(s, a, l, m) {
1673
- return g(a) ? !!~function(d, p) {
1674
- for (var w = 0; w < d.length; w++)
1675
- if (D(d, w), h(p, D(d, w))) return w;
1672
+ $elemMatch: function(t, a, i, m) {
1673
+ return g(a) ? !!~function(d, b) {
1674
+ for (var p = 0; p < d.length; p++)
1675
+ if (D(d, p), y(b, D(d, p))) return p;
1676
1676
  return -1;
1677
- }(a, s) : h(s, a, l, m);
1677
+ }(a, t) : y(t, a, i, m);
1678
1678
  },
1679
- $exists: function(s, a, l, m) {
1680
- return m.hasOwnProperty(l) === s;
1679
+ $exists: function(t, a, i, m) {
1680
+ return m.hasOwnProperty(i) === t;
1681
1681
  }
1682
1682
  }, Q = {
1683
- $eq: function(s, a, l) {
1684
- var m = l.comparable, d = l.compare;
1685
- return s instanceof RegExp ? G(function(p) {
1686
- return typeof p == "string" && s.test(p);
1687
- }) : s instanceof Function ? G(s) : g(s) && !s.length ? G(function(p) {
1688
- return g(p) && !p.length;
1689
- }) : G(
1690
- s === null ? function(p) {
1691
- return p == null;
1692
- } : function(p) {
1693
- return d(m(p), m(s)) === 0;
1683
+ $eq: function(t, a, i) {
1684
+ var m = i.comparable, d = i.compare;
1685
+ return t instanceof RegExp ? h(function(b) {
1686
+ return typeof b == "string" && t.test(b);
1687
+ }) : t instanceof Function ? h(t) : g(t) && !t.length ? h(function(b) {
1688
+ return g(b) && !b.length;
1689
+ }) : h(
1690
+ t === null ? function(b) {
1691
+ return b == null;
1692
+ } : function(b) {
1693
+ return d(m(b), m(t)) === 0;
1694
1694
  }
1695
1695
  );
1696
1696
  },
1697
- $gt: function(s, a, l) {
1698
- var m = l.comparable, d = l.compare;
1699
- return function(p) {
1700
- return d(m(p), m(s)) > 0;
1697
+ $gt: function(t, a, i) {
1698
+ var m = i.comparable, d = i.compare;
1699
+ return function(b) {
1700
+ return d(m(b), m(t)) > 0;
1701
1701
  };
1702
1702
  },
1703
- $gte: function(s, a, l) {
1704
- var m = l.comparable, d = l.compare;
1705
- return function(p) {
1706
- return d(m(p), m(s)) >= 0;
1703
+ $gte: function(t, a, i) {
1704
+ var m = i.comparable, d = i.compare;
1705
+ return function(b) {
1706
+ return d(m(b), m(t)) >= 0;
1707
1707
  };
1708
1708
  },
1709
- $lt: function(s, a, l) {
1710
- var m = l.comparable, d = l.compare;
1711
- return function(p) {
1712
- return d(m(p), m(s)) < 0;
1709
+ $lt: function(t, a, i) {
1710
+ var m = i.comparable, d = i.compare;
1711
+ return function(b) {
1712
+ return d(m(b), m(t)) < 0;
1713
1713
  };
1714
1714
  },
1715
- $lte: function(s, a, l) {
1716
- var m = l.comparable, d = l.compare;
1717
- return function(p) {
1718
- return d(m(p), m(s)) <= 0;
1715
+ $lte: function(t, a, i) {
1716
+ var m = i.comparable, d = i.compare;
1717
+ return function(b) {
1718
+ return d(m(b), m(t)) <= 0;
1719
1719
  };
1720
1720
  },
1721
- $in: function(s, a, l) {
1722
- var m = l.comparable;
1721
+ $in: function(t, a, i) {
1722
+ var m = i.comparable;
1723
1723
  return function(d) {
1724
1724
  if (!(d instanceof Array)) {
1725
- var p = m(d);
1726
- if (p === d && n(d) === "object") {
1727
- for (f = s.length; f--; )
1728
- if (String(s[f]) === String(d) && String(d) !== "[object Object]")
1725
+ var b = m(d);
1726
+ if (b === d && n(d) === "object") {
1727
+ for (f = t.length; f--; )
1728
+ if (String(t[f]) === String(d) && String(d) !== "[object Object]")
1729
1729
  return !0;
1730
1730
  }
1731
- if (p === void 0) {
1732
- for (f = s.length; f--; ) if (s[f] == null) return !0;
1731
+ if (b === void 0) {
1732
+ for (f = t.length; f--; ) if (t[f] == null) return !0;
1733
1733
  }
1734
- for (f = s.length; f--; ) {
1735
- var w = h(ge(D(s, f), l), p, f, s);
1736
- if (w && String(w) !== "[object Object]" && String(p) !== "[object Object]")
1734
+ for (f = t.length; f--; ) {
1735
+ var p = y(ge(D(t, f), i), b, f, t);
1736
+ if (p && String(p) !== "[object Object]" && String(b) !== "[object Object]")
1737
1737
  return !0;
1738
1738
  }
1739
- return !!~s.indexOf(p);
1739
+ return !!~t.indexOf(b);
1740
1740
  }
1741
1741
  for (var f = d.length; f--; )
1742
- if (~s.indexOf(m(D(d, f)))) return !0;
1742
+ if (~t.indexOf(m(D(d, f)))) return !0;
1743
1743
  return !1;
1744
1744
  };
1745
1745
  },
1746
- $nin: function(s, a, l) {
1747
- var m = Q.$in(s, a, l);
1748
- return function(d, p, w, f) {
1749
- return !m(d, p, w, f);
1746
+ $nin: function(t, a, i) {
1747
+ var m = Q.$in(t, a, i);
1748
+ return function(d, b, p, f) {
1749
+ return !m(d, b, p, f);
1750
1750
  };
1751
1751
  },
1752
- $mod: function(s) {
1752
+ $mod: function(t) {
1753
1753
  return function(a) {
1754
- return a % s[0] == s[1];
1754
+ return a % t[0] == t[1];
1755
1755
  };
1756
1756
  },
1757
- $ne: function(s, a, l) {
1758
- var m = Q.$eq(s, a, l);
1759
- return U(function(d, p, w, f) {
1760
- return !m(d, p, w, f);
1757
+ $ne: function(t, a, i) {
1758
+ var m = Q.$eq(t, a, i);
1759
+ return U(function(d, b, p, f) {
1760
+ return !m(d, b, p, f);
1761
1761
  });
1762
1762
  },
1763
- $and: function(s, a, l) {
1764
- return s.map(O(l));
1763
+ $and: function(t, a, i) {
1764
+ return t.map(O(i));
1765
1765
  },
1766
- $all: function(s, a, l) {
1767
- return Q.$and(s, a, l);
1766
+ $all: function(t, a, i) {
1767
+ return Q.$and(t, a, i);
1768
1768
  },
1769
- $or: function(s, a, l) {
1770
- return s.map(O(l));
1769
+ $or: function(t, a, i) {
1770
+ return t.map(O(i));
1771
1771
  },
1772
- $nor: function(s, a, l) {
1773
- return s.map(O(l));
1772
+ $nor: function(t, a, i) {
1773
+ return t.map(O(i));
1774
1774
  },
1775
- $not: function(s, a, l) {
1776
- var m = O(l)(s);
1777
- return function(d, p, w) {
1778
- return !h(m, d, p, w);
1775
+ $not: function(t, a, i) {
1776
+ var m = O(i)(t);
1777
+ return function(d, b, p) {
1778
+ return !y(m, d, b, p);
1779
1779
  };
1780
1780
  },
1781
- $type: function(s) {
1782
- return function(a, l, m) {
1783
- return a != null && (a instanceof s || a.constructor == s);
1781
+ $type: function(t) {
1782
+ return function(a, i, m) {
1783
+ return a != null && (a instanceof t || a.constructor == t);
1784
1784
  };
1785
1785
  },
1786
- $regex: function(s, a) {
1787
- return new RegExp(s, a.$options);
1786
+ $regex: function(t, a) {
1787
+ return new RegExp(t, a.$options);
1788
1788
  },
1789
- $where: function(s) {
1790
- if (typeof s == "function") return s;
1789
+ $where: function(t) {
1790
+ if (typeof t == "function") return t;
1791
1791
  throw new Error(
1792
1792
  'In CSP mode, sift does not support strings in "$where" condition'
1793
1793
  );
1794
1794
  },
1795
- $elemMatch: function(s, a, l) {
1796
- return O(l)(s);
1795
+ $elemMatch: function(t, a, i) {
1796
+ return O(i)(t);
1797
1797
  },
1798
- $exists: function(s) {
1799
- return !!s;
1798
+ $exists: function(t) {
1799
+ return !!t;
1800
1800
  }
1801
1801
  };
1802
- function q(s, a) {
1803
- return { options: s, validate: a };
1802
+ function q(t, a) {
1803
+ return { options: t, validate: a };
1804
1804
  }
1805
- function tt(s, a) {
1806
- var l = s.keyPath, m = s.child, d = s.query, p = [];
1807
- if (function de(H, N, W, At, ee) {
1805
+ function tt(t, a) {
1806
+ var i = t.keyPath, m = t.child, d = t.query, b = [];
1807
+ if (function de(H, N, W, rt, ee) {
1808
1808
  if (W === N.length || H == null)
1809
- return void ee.push([H, N[W - 1], At]);
1809
+ return void ee.push([H, N[W - 1], rt]);
1810
1810
  var Be = D(N, W);
1811
1811
  if (g(H) && isNaN(Number(Be)))
1812
1812
  for (var te = 0, at = H.length; te < at; te++) de(D(H, te), N, W, H, ee);
1813
1813
  else de(D(H, Be), N, W + 1, H, ee);
1814
- }(a, l, 0, a, p), p.length === 1) {
1815
- var w = p[0];
1816
- return h(m, w[0], w[1], w[2]);
1814
+ }(a, i, 0, a, b), b.length === 1) {
1815
+ var p = b[0];
1816
+ return y(m, p[0], p[1], p[2]);
1817
1817
  }
1818
- for (var f = d && d.$ne !== void 0, v = f, V = 0; V < p.length; V++) {
1819
- var X = p[V], T = h(m, X[0], X[1], X[2]);
1818
+ for (var f = d && d.$ne !== void 0, v = f, V = 0; V < b.length; V++) {
1819
+ var X = b[V], T = y(m, X[0], X[1], X[2]);
1820
1820
  f ? v &= T : v |= T;
1821
1821
  }
1822
1822
  return v;
1823
1823
  }
1824
- function st(s, a, l) {
1825
- return q({ keyPath: s, child: a, query: l }, tt);
1824
+ function st(t, a, i) {
1825
+ return q({ keyPath: t, child: a, query: i }, tt);
1826
1826
  }
1827
- function O(s) {
1828
- var a = s.comparable, l = s.expressions, m = function(w) {
1827
+ function O(t) {
1828
+ var a = t.comparable, i = t.expressions, m = function(p) {
1829
1829
  var f;
1830
- return (!w || !(f = w) || f.constructor !== Object && f.constructor !== Array && f.constructor.toString() !== "function Object() { [native code] }" && f.constructor.toString() !== "function Array() { [native code] }" || f.toJSON) && (w = { $eq: w }), w;
1831
- }, d = function(w) {
1832
- w = a(w);
1830
+ return (!p || !(f = p) || f.constructor !== Object && f.constructor !== Array && f.constructor.toString() !== "function Object() { [native code] }" && f.constructor.toString() !== "function Array() { [native code] }" || f.toJSON) && (p = { $eq: p }), p;
1831
+ }, d = function(p) {
1832
+ p = a(p);
1833
1833
  var f = [];
1834
- for (var v in w) {
1835
- var V = w[v];
1834
+ for (var v in p) {
1835
+ var V = p[v];
1836
1836
  if (v !== "$options") {
1837
- var X = x[v] || s && l && l[v];
1838
- if (X) Q[v] && (V = Q[v](V, w, s)), f.push(q(a(V), X));
1837
+ var X = x[v] || t && i && i[v];
1838
+ if (X) Q[v] && (V = Q[v](V, p, t)), f.push(q(a(V), X));
1839
1839
  else {
1840
1840
  if (v.charCodeAt(0) === 36)
1841
1841
  throw new Error("Unknown operation " + v);
1842
1842
  var T = v.split(".");
1843
- f.push(st(T, p(V), V));
1843
+ f.push(st(T, b(V), V));
1844
1844
  }
1845
1845
  }
1846
1846
  }
1847
1847
  return f.length === 1 ? f[0] : q(f, x.$and);
1848
- }, p = function(w) {
1849
- return w = m(w), function f(v, V) {
1848
+ }, b = function(p) {
1849
+ return p = m(p), function f(v, V) {
1850
1850
  if (!M(v)) return V;
1851
1851
  for (var X in v) V.push(X), f(v[X], V);
1852
1852
  return V;
1853
- }(w, []).join(",").search(/[$.]/) === -1 ? q(w, R) : d(w);
1853
+ }(p, []).join(",").search(/[$.]/) === -1 ? q(p, R) : d(p);
1854
1854
  };
1855
- return function(w) {
1856
- return d(m(w));
1855
+ return function(p) {
1856
+ return d(m(p));
1857
1857
  };
1858
1858
  }
1859
- function R(s, a) {
1860
- if (Object.prototype.toString.call(s) !== Object.prototype.toString.call(a))
1859
+ function R(t, a) {
1860
+ if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(a))
1861
1861
  return !1;
1862
- if (M(s)) {
1863
- if (Object.keys(s).length !== Object.keys(a).length) return !1;
1864
- for (var l in s) if (!R(s[l], a[l])) return !1;
1862
+ if (M(t)) {
1863
+ if (Object.keys(t).length !== Object.keys(a).length) return !1;
1864
+ for (var i in t) if (!R(t[i], a[i])) return !1;
1865
1865
  return !0;
1866
1866
  }
1867
- if (g(s)) {
1868
- if (s.length !== a.length) return !1;
1869
- for (var m = 0, d = s.length; m < d; m++)
1870
- if (!R(s[m], a[m])) return !1;
1867
+ if (g(t)) {
1868
+ if (t.length !== a.length) return !1;
1869
+ for (var m = 0, d = t.length; m < d; m++)
1870
+ if (!R(t[m], a[m])) return !1;
1871
1871
  return !0;
1872
1872
  }
1873
- return s === a;
1873
+ return t === a;
1874
1874
  }
1875
- function ge(s, a) {
1876
- var l = O(a)(s);
1877
- return a && a.select && (l = {
1878
- options: l,
1879
- validate: function(m, d, p, w) {
1880
- return h(m, d && a.select(d), p, w);
1875
+ function ge(t, a) {
1876
+ var i = O(a)(t);
1877
+ return a && a.select && (i = {
1878
+ options: i,
1879
+ validate: function(m, d, b, p) {
1880
+ return y(m, d && a.select(d), b, p);
1881
1881
  }
1882
- }), l;
1882
+ }), i;
1883
1883
  }
1884
- function rt(s, a) {
1885
- var l = ge(s, a = Object.assign({ compare: me, comparable: $ }, a));
1886
- return function(m, d, p) {
1887
- return h(l, m, d, p);
1884
+ function At(t, a) {
1885
+ var i = ge(t, a = Object.assign({ compare: me, comparable: $ }, a));
1886
+ return function(m, d, b) {
1887
+ return y(i, m, d, b);
1888
1888
  };
1889
1889
  }
1890
- function me(s, a) {
1891
- if (R(s, a)) return 0;
1892
- if (n(s) === n(a)) {
1893
- if (s > a) return 1;
1894
- if (s < a) return -1;
1890
+ function me(t, a) {
1891
+ if (R(t, a)) return 0;
1892
+ if (n(t) === n(a)) {
1893
+ if (t > a) return 1;
1894
+ if (t < a) return -1;
1895
1895
  }
1896
1896
  }
1897
- function $(s) {
1898
- return s instanceof Date ? s.getTime() : g(s) ? s.map($) : s && typeof s.toJSON == "function" ? s.toJSON() : s;
1897
+ function $(t) {
1898
+ return t instanceof Date ? t.getTime() : g(t) ? t.map($) : t && typeof t.toJSON == "function" ? t.toJSON() : t;
1899
1899
  }
1900
1900
  }
1901
1901
  ]);
@@ -1904,25 +1904,25 @@ var We = { exports: {} };
1904
1904
  var Rt = We.exports;
1905
1905
  const Tt = /* @__PURE__ */ Ut(Rt);
1906
1906
  function Kt(e, o) {
1907
- for (var i = 0; i < o.length; i++) {
1908
- var r = o[i];
1909
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1907
+ for (var c = 0; c < o.length; c++) {
1908
+ var A = o[c];
1909
+ A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(e, A.key, A);
1910
1910
  }
1911
1911
  }
1912
- function Jt(e, o, i) {
1912
+ function Jt(e, o, c) {
1913
1913
  return o && Kt(e.prototype, o), e;
1914
1914
  }
1915
1915
  function kt(e, o) {
1916
1916
  e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
1917
1917
  }
1918
- function Ae(e) {
1919
- return Ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(i) {
1920
- return i.__proto__ || Object.getPrototypeOf(i);
1921
- }, Ae(e);
1918
+ function re(e) {
1919
+ return re = Object.setPrototypeOf ? Object.getPrototypeOf : function(c) {
1920
+ return c.__proto__ || Object.getPrototypeOf(c);
1921
+ }, re(e);
1922
1922
  }
1923
1923
  function L(e, o) {
1924
- return L = Object.setPrototypeOf || function(r, A) {
1925
- return r.__proto__ = A, r;
1924
+ return L = Object.setPrototypeOf || function(A, r) {
1925
+ return A.__proto__ = r, A;
1926
1926
  }, L(e, o);
1927
1927
  }
1928
1928
  function Lt() {
@@ -1935,11 +1935,11 @@ function Lt() {
1935
1935
  return !1;
1936
1936
  }
1937
1937
  }
1938
- function J(e, o, i) {
1939
- return Lt() ? J = Reflect.construct : J = function(A, n, u) {
1938
+ function J(e, o, c) {
1939
+ return Lt() ? J = Reflect.construct : J = function(r, n, u) {
1940
1940
  var g = [null];
1941
1941
  g.push.apply(g, n);
1942
- var M = Function.bind.apply(A, g), Y = new M();
1942
+ var M = Function.bind.apply(r, g), Y = new M();
1943
1943
  return u && L(Y, u.prototype), Y;
1944
1944
  }, J.apply(null, arguments);
1945
1945
  }
@@ -1948,25 +1948,25 @@ function St(e) {
1948
1948
  }
1949
1949
  function ae(e) {
1950
1950
  var o = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
1951
- return ae = function(r) {
1952
- if (r === null || !St(r)) return r;
1953
- if (typeof r != "function")
1951
+ return ae = function(A) {
1952
+ if (A === null || !St(A)) return A;
1953
+ if (typeof A != "function")
1954
1954
  throw new TypeError("Super expression must either be null or a function");
1955
1955
  if (typeof o < "u") {
1956
- if (o.has(r)) return o.get(r);
1957
- o.set(r, A);
1956
+ if (o.has(A)) return o.get(A);
1957
+ o.set(A, r);
1958
1958
  }
1959
- function A() {
1960
- return J(r, arguments, Ae(this).constructor);
1959
+ function r() {
1960
+ return J(A, arguments, re(this).constructor);
1961
1961
  }
1962
- return A.prototype = Object.create(r.prototype, {
1962
+ return r.prototype = Object.create(A.prototype, {
1963
1963
  constructor: {
1964
- value: A,
1964
+ value: r,
1965
1965
  enumerable: !1,
1966
1966
  writable: !0,
1967
1967
  configurable: !0
1968
1968
  }
1969
- }), L(A, r);
1969
+ }), L(r, A);
1970
1970
  }, ae(e);
1971
1971
  }
1972
1972
  function De(e) {
@@ -1977,30 +1977,30 @@ function De(e) {
1977
1977
  var Ue = function(o) {
1978
1978
  return 'Cannot execute "' + o.action + '" on "' + o.subjectName + '"';
1979
1979
  }, K = Ue, _t = /* @__PURE__ */ function(e) {
1980
- kt(o, e), o.setDefaultMessage = function(A) {
1981
- A === null ? K = Ue : K = typeof A == "string" ? function() {
1982
- return A;
1983
- } : A;
1984
- }, o.from = function(A) {
1980
+ kt(o, e), o.setDefaultMessage = function(r) {
1981
+ r === null ? K = Ue : K = typeof r == "string" ? function() {
1982
+ return r;
1983
+ } : r;
1984
+ }, o.from = function(r) {
1985
1985
  var n = new this("");
1986
1986
  return Object.defineProperty(n, "ability", {
1987
- value: A
1987
+ value: r
1988
1988
  }), n;
1989
1989
  };
1990
- function o(r, A) {
1990
+ function o(A, r) {
1991
1991
  var n;
1992
- return A === void 0 && (A = {}), n = e.call(this, r) || this, n._setMetadata(A), n.message = r || K(De(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(De(n), n.constructor)), n;
1992
+ return r === void 0 && (r = {}), n = e.call(this, A) || this, n._setMetadata(r), n.message = A || K(De(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(De(n), n.constructor)), n;
1993
1993
  }
1994
- var i = o.prototype;
1995
- return i.setMessage = function(A) {
1996
- return this._customMessage = A, this;
1997
- }, i.throwUnlessCan = function(A, n, u) {
1994
+ var c = o.prototype;
1995
+ return c.setMessage = function(r) {
1996
+ return this._customMessage = r, this;
1997
+ }, c.throwUnlessCan = function(r, n, u) {
1998
1998
  if (!this.ability)
1999
1999
  throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
2000
- var g = this.ability.relevantRuleFor(A, n, u);
2000
+ var g = this.ability.relevantRuleFor(r, n, u);
2001
2001
  if (!(g && !g.inverted)) {
2002
2002
  this._setMetadata({
2003
- action: A,
2003
+ action: r,
2004
2004
  subject: n,
2005
2005
  field: u,
2006
2006
  subjectName: this.ability.subjectName(n)
@@ -2008,8 +2008,8 @@ var Ue = function(o) {
2008
2008
  var M = g ? g.reason : "";
2009
2009
  throw this.message = this._customMessage || M || K(this), this;
2010
2010
  }
2011
- }, i._setMetadata = function(A) {
2012
- this.subject = A.subject, this.subjectName = A.subjectName, this.action = A.action, this.field = A.field;
2011
+ }, c._setMetadata = function(r) {
2012
+ this.subject = r.subject, this.subjectName = r.subjectName, this.action = r.action, this.field = r.field;
2013
2013
  }, o;
2014
2014
  }(ae(Error));
2015
2015
  function ne(e) {
@@ -2024,36 +2024,36 @@ function $t(e) {
2024
2024
  function es(e) {
2025
2025
  return JSON.parse(JSON.stringify(e));
2026
2026
  }
2027
- var ts = /[-/\\^$+?.()|[\]{}]/g, ss = /\.?\*+\.?/g, rs = /\*+/, As = /\./g;
2028
- function as(e, o, i) {
2029
- var r = i[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", A = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(As, "\\$&").replace(rs, A + r);
2030
- return o + e.length === i.length ? "(?:" + n + ")?" : n;
2027
+ var ts = /[-/\\^$+?.()|[\]{}]/g, ss = /\.?\*+\.?/g, As = /\*+/, rs = /\./g;
2028
+ function as(e, o, c) {
2029
+ var A = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", r = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(rs, "\\$&").replace(As, r + A);
2030
+ return o + e.length === c.length ? "(?:" + n + ")?" : n;
2031
2031
  }
2032
- function ns(e, o, i) {
2033
- return e === "." && (i[o - 1] === "*" || i[o + 1] === "*") ? e : "\\" + e;
2032
+ function ns(e, o, c) {
2033
+ return e === "." && (c[o - 1] === "*" || c[o + 1] === "*") ? e : "\\" + e;
2034
2034
  }
2035
2035
  function os(e) {
2036
- var o = e.map(function(r) {
2037
- return r.replace(ts, ns).replace(ss, as);
2038
- }), i = o.length > 1 ? "(?:" + o.join("|") + ")" : o[0];
2039
- return new RegExp("^" + i + "$");
2036
+ var o = e.map(function(A) {
2037
+ return A.replace(ts, ns).replace(ss, as);
2038
+ }), c = o.length > 1 ? "(?:" + o.join("|") + ")" : o[0];
2039
+ return new RegExp("^" + c + "$");
2040
2040
  }
2041
2041
  var cs = /* @__PURE__ */ function() {
2042
- function e(i) {
2043
- this.actions = i.actions || i.action, this.subject = i.subject, this.fields = !i.fields || i.fields.length === 0 ? void 0 : ne(i.fields), Object.defineProperty(this, "_fieldsPattern", {
2042
+ function e(c) {
2043
+ this.actions = c.actions || c.action, this.subject = c.subject, this.fields = !c.fields || c.fields.length === 0 ? void 0 : ne(c.fields), Object.defineProperty(this, "_fieldsPattern", {
2044
2044
  writable: !0
2045
- }), this.inverted = !!i.inverted, this.conditions = i.conditions, Object.defineProperty(this, "_matches", {
2045
+ }), this.inverted = !!c.inverted, this.conditions = c.conditions, Object.defineProperty(this, "_matches", {
2046
2046
  writable: !0,
2047
2047
  value: this.conditions ? Tt(this.conditions) : void 0
2048
- }), this.reason = i.reason;
2048
+ }), this.reason = c.reason;
2049
2049
  }
2050
2050
  var o = e.prototype;
2051
- return o.matches = function(r) {
2052
- return this._matches ? typeof r == "string" ? !this.inverted : this._matches(r) : !0;
2053
- }, o.isRelevantFor = function(r, A) {
2054
- return this.fields ? A ? this.matchesField(A) : !this.inverted : !0;
2055
- }, o.matchesField = function(r) {
2056
- return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : os(this.fields)), this._fieldsPattern === null || r.indexOf("*") !== -1 ? this.fields.indexOf(r) !== -1 : this._fieldsPattern.test(r);
2051
+ return o.matches = function(A) {
2052
+ return this._matches ? typeof A == "string" ? !this.inverted : this._matches(A) : !0;
2053
+ }, o.isRelevantFor = function(A, r) {
2054
+ return this.fields ? r ? this.matchesField(r) : !this.inverted : !0;
2055
+ }, o.matchesField = function(A) {
2056
+ return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : os(this.fields)), this._fieldsPattern === null || A.indexOf("*") !== -1 ? this.fields.indexOf(A) !== -1 : this._fieldsPattern.test(A);
2057
2057
  }, e;
2058
2058
  }(), E = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Me = {
2059
2059
  crud: ["create", "read", "update", "delete"]
@@ -2062,105 +2062,105 @@ function Ye(e, o) {
2062
2062
  return e === o || Array.isArray(o) && o.indexOf(e) !== -1;
2063
2063
  }
2064
2064
  var is = /* @__PURE__ */ function() {
2065
- e.addAlias = function(r, A) {
2066
- if (r === "manage" || Ye("manage", A))
2065
+ e.addAlias = function(A, r) {
2066
+ if (A === "manage" || Ye("manage", r))
2067
2067
  throw new Error('Cannot add alias for "manage" action because it represents any action');
2068
- if (Ye(r, A))
2069
- throw new Error("Attempt to alias action to itself: " + r + " -> " + A.toString());
2070
- return Me[r] = A, this;
2068
+ if (Ye(A, r))
2069
+ throw new Error("Attempt to alias action to itself: " + A + " -> " + r.toString());
2070
+ return Me[A] = r, this;
2071
2071
  };
2072
- function e(i, r) {
2073
- r === void 0 && (r = {}), Object.defineProperty(this, "subjectName", {
2074
- value: r.subjectName || $t
2072
+ function e(c, A) {
2073
+ A === void 0 && (A = {}), Object.defineProperty(this, "subjectName", {
2074
+ value: A.subjectName || $t
2075
2075
  }), this[E] = {
2076
- RuleType: r.RuleType || cs,
2077
- originalRules: i || [],
2076
+ RuleType: A.RuleType || cs,
2077
+ originalRules: c || [],
2078
2078
  hasPerFieldRules: !1,
2079
2079
  indexedRules: /* @__PURE__ */ Object.create(null),
2080
2080
  mergedRules: /* @__PURE__ */ Object.create(null),
2081
2081
  events: {},
2082
2082
  aliases: es(Me)
2083
- }, this.update(i);
2083
+ }, this.update(c);
2084
2084
  }
2085
2085
  var o = e.prototype;
2086
- return o.update = function(r) {
2087
- if (!Array.isArray(r))
2086
+ return o.update = function(A) {
2087
+ if (!Array.isArray(A))
2088
2088
  return this;
2089
- var A = {
2090
- rules: r,
2089
+ var r = {
2090
+ rules: A,
2091
2091
  ability: this
2092
2092
  };
2093
- this.emit("update", A), this[E].originalRules = r.slice(0), this[E].mergedRules = /* @__PURE__ */ Object.create(null);
2094
- var n = this.buildIndexFor(r);
2095
- return this[E].indexedRules = n.rules, this[E].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", A), this;
2096
- }, o.buildIndexFor = function(r) {
2097
- for (var A = /* @__PURE__ */ Object.create(null), n = this[E].RuleType, u = !0, g = !1, M = 0; M < r.length; M++) {
2098
- var Y = new n(r[M]), D = this.expandActions(Y.actions), G = ne(Y.subject), U = r.length - M - 1;
2093
+ this.emit("update", r), this[E].originalRules = A.slice(0), this[E].mergedRules = /* @__PURE__ */ Object.create(null);
2094
+ var n = this.buildIndexFor(A);
2095
+ return this[E].indexedRules = n.rules, this[E].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", r), this;
2096
+ }, o.buildIndexFor = function(A) {
2097
+ for (var r = /* @__PURE__ */ Object.create(null), n = this[E].RuleType, u = !0, g = !1, M = 0; M < A.length; M++) {
2098
+ var Y = new n(A[M]), D = this.expandActions(Y.actions), h = ne(Y.subject), U = A.length - M - 1;
2099
2099
  u = !!(u && Y.inverted), !g && Y.fields && (g = !0);
2100
- for (var h = 0; h < G.length; h++) {
2101
- var x = G[h];
2102
- A[x] = A[x] || /* @__PURE__ */ Object.create(null);
2100
+ for (var y = 0; y < h.length; y++) {
2101
+ var x = h[y];
2102
+ r[x] = r[x] || /* @__PURE__ */ Object.create(null);
2103
2103
  for (var Q = 0; Q < D.length; Q++) {
2104
2104
  var q = D[Q];
2105
- A[x][q] = A[x][q] || /* @__PURE__ */ Object.create(null), A[x][q][U] = Y;
2105
+ r[x][q] = r[x][q] || /* @__PURE__ */ Object.create(null), r[x][q][U] = Y;
2106
2106
  }
2107
2107
  }
2108
2108
  }
2109
2109
  return {
2110
2110
  isAllInverted: u,
2111
2111
  hasPerFieldRules: g,
2112
- rules: A
2112
+ rules: r
2113
2113
  };
2114
- }, o.expandActions = function(r) {
2115
- for (var A = this[E].aliases, n = ne(r), u = 0; u < n.length; ) {
2114
+ }, o.expandActions = function(A) {
2115
+ for (var r = this[E].aliases, n = ne(A), u = 0; u < n.length; ) {
2116
2116
  var g = n[u++];
2117
- A.hasOwnProperty(g) && (n = n.concat(A[g]));
2117
+ r.hasOwnProperty(g) && (n = n.concat(r[g]));
2118
2118
  }
2119
2119
  return n;
2120
- }, o.can = function(r, A, n) {
2120
+ }, o.can = function(A, r, n) {
2121
2121
  if (n && typeof n != "string")
2122
2122
  throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
2123
- var u = this.relevantRuleFor(r, A, n);
2123
+ var u = this.relevantRuleFor(A, r, n);
2124
2124
  return !!u && !u.inverted;
2125
- }, o.relevantRuleFor = function(r, A, n) {
2126
- for (var u = this.rulesFor(r, A, n), g = 0; g < u.length; g++)
2127
- if (u[g].matches(A))
2125
+ }, o.relevantRuleFor = function(A, r, n) {
2126
+ for (var u = this.rulesFor(A, r, n), g = 0; g < u.length; g++)
2127
+ if (u[g].matches(r))
2128
2128
  return u[g];
2129
2129
  return null;
2130
- }, o.possibleRulesFor = function(r, A) {
2131
- var n = this.subjectName(A), u = this[E].mergedRules, g = n + "_" + r;
2132
- return u[g] || (u[g] = this.mergeRulesFor(r, n)), u[g];
2133
- }, o.mergeRulesFor = function(r, A) {
2134
- var n = this[E].indexedRules, u = [A, "all"].reduce(function(g, M) {
2130
+ }, o.possibleRulesFor = function(A, r) {
2131
+ var n = this.subjectName(r), u = this[E].mergedRules, g = n + "_" + A;
2132
+ return u[g] || (u[g] = this.mergeRulesFor(A, n)), u[g];
2133
+ }, o.mergeRulesFor = function(A, r) {
2134
+ var n = this[E].indexedRules, u = [r, "all"].reduce(function(g, M) {
2135
2135
  var Y = n[M];
2136
- return Y ? Object.assign(g, Y[r], Y.manage) : g;
2136
+ return Y ? Object.assign(g, Y[A], Y.manage) : g;
2137
2137
  }, []);
2138
2138
  return u.filter(Boolean);
2139
- }, o.rulesFor = function(r, A, n) {
2140
- var u = this.possibleRulesFor(r, A);
2139
+ }, o.rulesFor = function(A, r, n) {
2140
+ var u = this.possibleRulesFor(A, r);
2141
2141
  return this[E].hasPerFieldRules ? u.filter(function(g) {
2142
- return g.isRelevantFor(A, n);
2142
+ return g.isRelevantFor(r, n);
2143
2143
  }) : u;
2144
2144
  }, o.cannot = function() {
2145
2145
  return !this.can.apply(this, arguments);
2146
2146
  }, o.throwUnlessCan = function() {
2147
- var r;
2147
+ var A;
2148
2148
  console.warn(`
2149
2149
  Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
2150
2150
  Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
2151
- `.trim()), (r = _t.from(this)).throwUnlessCan.apply(r, arguments);
2152
- }, o.on = function(r, A) {
2151
+ `.trim()), (A = _t.from(this)).throwUnlessCan.apply(A, arguments);
2152
+ }, o.on = function(A, r) {
2153
2153
  var n = this[E].events, u = !0;
2154
- return n[r] || (n[r] = []), n[r].push(A), function() {
2154
+ return n[A] || (n[A] = []), n[A].push(r), function() {
2155
2155
  if (u) {
2156
- var g = n[r].indexOf(A);
2157
- n[r].splice(g, 1), u = !1;
2156
+ var g = n[A].indexOf(r);
2157
+ n[A].splice(g, 1), u = !1;
2158
2158
  }
2159
2159
  };
2160
- }, o.emit = function(r, A) {
2161
- var n = this[E].events[r];
2160
+ }, o.emit = function(A, r) {
2161
+ var n = this[E].events[A];
2162
2162
  n && n.slice(0).forEach(function(u) {
2163
- return u(A);
2163
+ return u(r);
2164
2164
  });
2165
2165
  }, Jt(e, [{
2166
2166
  key: "rules",
@@ -2168,8 +2168,8 @@ var is = /* @__PURE__ */ function() {
2168
2168
  return this[E].originalRules;
2169
2169
  }
2170
2170
  }]), e;
2171
- }(), t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), c = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.report_reports_closeup = "business::report::reports::closeup", e.report_reports_dailySales = "business::report::reports::dailySales", e.report_reports_hourlySales = "business::report::reports::hourlySales", e.report_reports_drawer = "business::report::reports::drawer", e.report_reports_userProductSales = "business::report::reports::userProductSales", e.report_reports_counter = "business::report::reports::counter", e.report_reports_discount = "business::report::reports::discount", e.report_reports_timesheet = "business::report::reports::timesheet", e.report_reports_productSales = "business::report::reports::productSales", e.report_reports_addonSales = "business::report::reports::addonSales", e.report_reports_void = "business::report::reports::void", e.report_reports_refund = "business::report::reports::refund", e))(c || {}), C = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(C || {}), Re = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(Re || {});
2172
- const b = {
2171
+ }(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}), l = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(l || {}), C = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(C || {}), Re = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(Re || {});
2172
+ const w = {
2173
2173
  general: "General",
2174
2174
  inventory: "Inventory",
2175
2175
  hrm: "HRM",
@@ -2178,407 +2178,322 @@ const b = {
2178
2178
  reports: "Default Report",
2179
2179
  customReports: "Custom Report"
2180
2180
  }, ls = "access-denied", k = {
2181
- Action: t,
2181
+ Action: s,
2182
2182
  Subject: {
2183
- Business: c,
2183
+ Business: l,
2184
2184
  Restaurant: Re
2185
2185
  }
2186
2186
  }, Te = {
2187
- [C.permission]: c.hrm_teamMember,
2188
- [C.promotion]: c.crm_promotion,
2189
- [C.voucher]: c.crm_voucher,
2190
- [C.membership]: c.crm_membership,
2191
- [C.stock]: c.inventory_stock,
2192
- [C.wastageTemplate]: c.inventory_wastageTemplate,
2193
- [C.closingTemplate]: c.inventory_closingTemplate,
2194
- [C.orderTemplate]: c.inventory_orderTemplate,
2195
- [C.ingredient]: c.inventory_ingredient,
2196
- [C.recipe]: c.inventory_recipe,
2197
- [C.unit]: c.inventory_unit,
2198
- [C.supplier]: c.inventory_supplier,
2199
- [C.warehouse]: c.inventory_warehouse,
2200
- [C.publish]: c.inventory_publish,
2201
- [C.integration]: c.inventory_integration,
2202
- [C.orderDraft]: c.inventory_orderDraftApproval,
2203
- [C.unitCostHistory]: c.inventory_unitCostHistory
2187
+ [C.permission]: l.hrm_teamMember,
2188
+ [C.promotion]: l.crm_promotion,
2189
+ [C.voucher]: l.crm_voucher,
2190
+ [C.membership]: l.crm_membership,
2191
+ [C.stock]: l.inventory_stock,
2192
+ [C.wastageTemplate]: l.inventory_wastageTemplate,
2193
+ [C.closingTemplate]: l.inventory_closingTemplate,
2194
+ [C.orderTemplate]: l.inventory_orderTemplate,
2195
+ [C.ingredient]: l.inventory_ingredient,
2196
+ [C.recipe]: l.inventory_recipe,
2197
+ [C.unit]: l.inventory_unit,
2198
+ [C.supplier]: l.inventory_supplier,
2199
+ [C.warehouse]: l.inventory_warehouse,
2200
+ [C.publish]: l.inventory_publish,
2201
+ [C.integration]: l.inventory_integration,
2202
+ [C.orderDraft]: l.inventory_orderDraftApproval,
2203
+ [C.unitCostHistory]: l.inventory_unitCostHistory
2204
2204
  };
2205
2205
  function us(e) {
2206
2206
  return Te[e] ?? e;
2207
2207
  }
2208
- function ur(e) {
2209
- const o = Object.entries(Te).find(([, i]) => i === e);
2208
+ function uA(e) {
2209
+ const o = Object.entries(Te).find(([, c]) => c === e);
2210
2210
  return o ? o[0] : e;
2211
2211
  }
2212
- const gr = /* @__PURE__ */ new Set([
2213
- "closeup",
2214
- "dailySales",
2215
- "hourlySales",
2216
- "drawer",
2217
- "userProductSales",
2218
- "counter",
2219
- "discount",
2220
- "timesheet",
2221
- "productSales",
2222
- "addonSales",
2223
- "void",
2224
- "refund"
2225
- ]), mr = {
2212
+ const gA = {
2226
2213
  // General
2227
2214
  restaurant: {
2228
2215
  label: "Restaurant Owner",
2229
- subject: c.restaurant,
2230
- actions: [t.manage],
2231
- category: b.general
2216
+ subject: l.restaurant,
2217
+ actions: [s.manage],
2218
+ category: w.general
2232
2219
  },
2233
2220
  menu: {
2234
2221
  label: "Menu Management",
2235
- subject: c.menu,
2236
- actions: [t.manage],
2237
- category: b.general
2222
+ subject: l.menu,
2223
+ actions: [s.manage],
2224
+ category: w.general
2238
2225
  },
2239
2226
  // inventory
2240
2227
  stockBalance: {
2241
2228
  label: "Stock Balance Management",
2242
- subject: c.inventory_stockBalance,
2243
- actions: [t.manage],
2244
- category: b.inventory
2229
+ subject: l.inventory_stockBalance,
2230
+ actions: [s.manage],
2231
+ category: w.inventory
2245
2232
  },
2246
2233
  stockAdjustment: {
2247
2234
  label: "Stock Adjustment Management",
2248
- subject: c.inventory_stockAdjustment,
2249
- actions: [t.manage],
2250
- category: b.inventory
2235
+ subject: l.inventory_stockAdjustment,
2236
+ actions: [s.manage],
2237
+ category: w.inventory
2251
2238
  },
2252
2239
  unitCostHistory: {
2253
2240
  label: "Unit Cost History Management",
2254
- subject: c.inventory_unitCostHistory,
2255
- actions: [t.manage],
2256
- category: b.inventory
2241
+ subject: l.inventory_unitCostHistory,
2242
+ actions: [s.manage],
2243
+ category: w.inventory
2257
2244
  },
2258
2245
  wastageTemplate: {
2259
2246
  label: "Wastage Template Management",
2260
- subject: c.inventory_wastageTemplate,
2261
- actions: [t.manage],
2262
- category: b.inventory,
2247
+ subject: l.inventory_wastageTemplate,
2248
+ actions: [s.manage],
2249
+ category: w.inventory,
2263
2250
  showByFeatureFlag: "inventory_pos_adjust_v2_wastage"
2264
2251
  },
2265
2252
  closingHistory: {
2266
2253
  label: "Closing History Management",
2267
- subject: c.inventory_closingHistory,
2268
- actions: [t.manage],
2269
- category: b.inventory
2254
+ subject: l.inventory_closingHistory,
2255
+ actions: [s.manage],
2256
+ category: w.inventory
2270
2257
  },
2271
2258
  closingTemplate: {
2272
2259
  label: "Closing Template Management",
2273
- subject: c.inventory_closingTemplate,
2274
- actions: [t.manage],
2275
- category: b.inventory,
2260
+ subject: l.inventory_closingTemplate,
2261
+ actions: [s.manage],
2262
+ category: w.inventory,
2276
2263
  showByFeatureFlag: "inventory_pos_closing_v2"
2277
2264
  },
2278
2265
  closingDraft: {
2279
2266
  label: "Closing Draft Management",
2280
- subject: c.inventory_closingDraft,
2281
- actions: [t.manage],
2282
- category: b.inventory,
2267
+ subject: l.inventory_closingDraft,
2268
+ actions: [s.manage],
2269
+ category: w.inventory,
2283
2270
  showByFeatureFlag: "inventory_pos_closing_v2"
2284
2271
  },
2285
2272
  ingredient: {
2286
2273
  label: "Ingredient Management",
2287
- subject: c.inventory_ingredient,
2288
- actions: [t.manage],
2289
- category: b.inventory
2274
+ subject: l.inventory_ingredient,
2275
+ actions: [s.manage],
2276
+ category: w.inventory
2290
2277
  },
2291
2278
  ingredientGroup: {
2292
2279
  label: "Ingredient Group Management",
2293
- subject: c.inventory_ingredientGroup,
2294
- actions: [t.manage],
2280
+ subject: l.inventory_ingredientGroup,
2281
+ actions: [s.manage],
2295
2282
  showByFeatureFlag: "inventory_ingredient_group",
2296
- category: b.inventory
2283
+ category: w.inventory
2297
2284
  },
2298
2285
  recipe: {
2299
2286
  label: "Recipe Management",
2300
- subject: c.inventory_recipe,
2301
- actions: [t.manage],
2302
- category: b.inventory
2287
+ subject: l.inventory_recipe,
2288
+ actions: [s.manage],
2289
+ category: w.inventory
2303
2290
  },
2304
2291
  unit: {
2305
2292
  label: "Unit Management",
2306
- subject: c.inventory_unit,
2307
- actions: [t.manage],
2308
- category: b.inventory
2293
+ subject: l.inventory_unit,
2294
+ actions: [s.manage],
2295
+ category: w.inventory
2309
2296
  },
2310
2297
  purchaseTransfer: {
2311
2298
  label: "Purchase / Transfer Management",
2312
- subject: c.inventory_purchaseTransfer,
2313
- actions: [t.manage],
2314
- category: b.inventory
2299
+ subject: l.inventory_purchaseTransfer,
2300
+ actions: [s.manage],
2301
+ category: w.inventory
2315
2302
  },
2316
2303
  orderDraftApproval: {
2317
2304
  label: "Order Draft Approval",
2318
- subject: c.inventory_orderDraftApproval,
2319
- actions: [t.manage],
2320
- category: b.inventory
2305
+ subject: l.inventory_orderDraftApproval,
2306
+ actions: [s.manage],
2307
+ category: w.inventory
2321
2308
  },
2322
2309
  transferOut: {
2323
2310
  label: "Transfer Out Management",
2324
- subject: c.inventory_transferOut,
2325
- actions: [t.manage],
2326
- category: b.inventory
2311
+ subject: l.inventory_transferOut,
2312
+ actions: [s.manage],
2313
+ category: w.inventory
2327
2314
  },
2328
2315
  surcharge: {
2329
2316
  label: "Surcharge Management",
2330
- subject: c.inventory_surcharge,
2331
- actions: [t.manage],
2317
+ subject: l.inventory_surcharge,
2318
+ actions: [s.manage],
2332
2319
  showByFeatureFlag: "inventory_portal_surcharge",
2333
- category: b.inventory
2320
+ category: w.inventory
2334
2321
  },
2335
2322
  orderTemplate: {
2336
2323
  label: "Order Template Management",
2337
- subject: c.inventory_orderTemplate,
2338
- actions: [t.manage],
2324
+ subject: l.inventory_orderTemplate,
2325
+ actions: [s.manage],
2339
2326
  showByFeatureFlag: "inventory_portal_must_use_transfer_template",
2340
- category: b.inventory
2327
+ category: w.inventory
2341
2328
  },
2342
2329
  supplier: {
2343
2330
  label: "Supplier Management",
2344
- subject: c.inventory_supplier,
2345
- actions: [t.manage],
2346
- category: b.inventory
2331
+ subject: l.inventory_supplier,
2332
+ actions: [s.manage],
2333
+ category: w.inventory
2347
2334
  },
2348
2335
  warehouse: {
2349
2336
  label: "Warehouse Management",
2350
- subject: c.inventory_warehouse,
2351
- actions: [t.manage],
2352
- category: b.inventory
2337
+ subject: l.inventory_warehouse,
2338
+ actions: [s.manage],
2339
+ category: w.inventory
2353
2340
  },
2354
2341
  publish: {
2355
2342
  label: "Publish Management",
2356
- subject: c.inventory_publish,
2357
- actions: [t.manage],
2358
- category: b.inventory
2343
+ subject: l.inventory_publish,
2344
+ actions: [s.manage],
2345
+ category: w.inventory
2359
2346
  },
2360
2347
  import: {
2361
2348
  label: "Import Management",
2362
- subject: c.inventory_import,
2363
- actions: [t.manage],
2349
+ subject: l.inventory_import,
2350
+ actions: [s.manage],
2364
2351
  showByFeatureFlag: "inventory_bulk_import",
2365
- category: b.inventory
2352
+ category: w.inventory
2366
2353
  },
2367
2354
  integration: {
2368
2355
  label: "Integration Management",
2369
- subject: c.inventory_integration,
2370
- actions: [t.manage],
2371
- category: b.inventory
2356
+ subject: l.inventory_integration,
2357
+ actions: [s.manage],
2358
+ category: w.inventory
2372
2359
  },
2373
2360
  // CRM
2374
2361
  promotion: {
2375
2362
  label: "Promotion Management",
2376
- subject: c.crm_promotion,
2377
- actions: [t.manage],
2378
- category: b.crm
2363
+ subject: l.crm_promotion,
2364
+ actions: [s.manage],
2365
+ category: w.crm
2379
2366
  },
2380
2367
  voucher: {
2381
2368
  label: "Voucher Management",
2382
- subject: c.crm_voucher,
2383
- actions: [t.manage],
2384
- category: b.crm
2369
+ subject: l.crm_voucher,
2370
+ actions: [s.manage],
2371
+ category: w.crm
2385
2372
  },
2386
2373
  membership: {
2387
2374
  label: "Membership Management",
2388
- subject: c.crm_membership,
2389
- actions: [t.manage],
2390
- category: b.crm
2375
+ subject: l.crm_membership,
2376
+ actions: [s.manage],
2377
+ category: w.crm
2391
2378
  },
2392
2379
  // HRM
2393
2380
  teamMember: {
2394
2381
  label: "Team Member Management",
2395
- subject: c.hrm_teamMember,
2396
- actions: [t.manage],
2397
- category: b.hrm
2382
+ subject: l.hrm_teamMember,
2383
+ actions: [s.manage],
2384
+ category: w.hrm
2398
2385
  },
2399
2386
  employee: {
2400
2387
  label: "Employee Management",
2401
- subject: c.hrm_employee,
2402
- actions: [t.manage],
2403
- category: b.hrm
2388
+ subject: l.hrm_employee,
2389
+ actions: [s.manage],
2390
+ category: w.hrm
2404
2391
  },
2405
2392
  auditLog: {
2406
2393
  label: "Audit Log Management",
2407
- subject: c.hrm_auditLog,
2408
- actions: [t.manage],
2409
- category: b.hrm
2394
+ subject: l.hrm_auditLog,
2395
+ actions: [s.manage],
2396
+ category: w.hrm
2410
2397
  },
2411
2398
  // Report
2412
2399
  report_reports: {
2413
2400
  label: "Create Report",
2414
- subject: c.report_createReport,
2415
- actions: [t.manage],
2416
- category: b.report
2401
+ subject: l.report_createReport,
2402
+ actions: [s.manage],
2403
+ category: w.report
2417
2404
  },
2418
2405
  report_accessInsight: {
2419
2406
  label: "Access Insight",
2420
- subject: c.report_accessInsight,
2421
- actions: [t.manage],
2422
- category: b.report
2407
+ subject: l.report_accessInsight,
2408
+ actions: [s.manage],
2409
+ category: w.report
2423
2410
  },
2424
2411
  report_accessSetting: {
2425
2412
  label: "Access Report Setting",
2426
- subject: c.report_accessSetting,
2427
- actions: [t.manage],
2428
- category: b.report
2413
+ subject: l.report_accessSetting,
2414
+ actions: [s.manage],
2415
+ category: w.report
2429
2416
  },
2430
2417
  report_accessIntegration: {
2431
2418
  label: "Access Report Integration",
2432
- subject: c.report_accessIntegration,
2433
- actions: [t.manage],
2434
- category: b.report
2419
+ subject: l.report_accessIntegration,
2420
+ actions: [s.manage],
2421
+ category: w.report
2435
2422
  },
2436
2423
  report_reports_allDefaultReports: {
2437
2424
  label: "Include future Default Reports",
2438
- subject: c.report_reports_allDefaultReports,
2439
- actions: [t.manage, t.read, t.create],
2440
- category: b.reports,
2425
+ subject: l.report_reports_allDefaultReports,
2426
+ actions: [s.manage, s.read, s.create],
2427
+ category: w.reports,
2441
2428
  isCategoryCover: !0
2442
2429
  },
2443
- closeup: {
2444
- label: "Closeup",
2445
- subject: c.report_reports_closeup,
2446
- actions: [t.manage, t.read, t.create],
2447
- category: b.reports
2448
- },
2449
- dailySales: {
2450
- label: "Daily Sales",
2451
- subject: c.report_reports_dailySales,
2452
- actions: [t.manage, t.read, t.create],
2453
- category: b.reports
2454
- },
2455
- hourlySales: {
2456
- label: "Hourly Sales",
2457
- subject: c.report_reports_hourlySales,
2458
- actions: [t.manage, t.read, t.create],
2459
- category: b.reports
2460
- },
2461
- drawer: {
2462
- label: "Drawer",
2463
- subject: c.report_reports_drawer,
2464
- actions: [t.manage, t.read, t.create],
2465
- category: b.reports
2466
- },
2467
- userProductSales: {
2468
- label: "User Product Sales",
2469
- subject: c.report_reports_userProductSales,
2470
- actions: [t.manage, t.read, t.create],
2471
- category: b.reports
2472
- },
2473
- counter: {
2474
- label: "Counter",
2475
- subject: c.report_reports_counter,
2476
- actions: [t.manage, t.read, t.create],
2477
- category: b.reports
2478
- },
2479
- discount: {
2480
- label: "Discount",
2481
- subject: c.report_reports_discount,
2482
- actions: [t.manage, t.read, t.create],
2483
- category: b.reports
2484
- },
2485
- timesheet: {
2486
- label: "Timesheet",
2487
- subject: c.report_reports_timesheet,
2488
- actions: [t.manage, t.read, t.create],
2489
- category: b.reports
2490
- },
2491
- productSales: {
2492
- label: "Product Sales",
2493
- subject: c.report_reports_productSales,
2494
- actions: [t.manage, t.read, t.create],
2495
- category: b.reports
2496
- },
2497
- addonSales: {
2498
- label: "Addon Sales",
2499
- subject: c.report_reports_addonSales,
2500
- actions: [t.manage, t.read, t.create],
2501
- category: b.reports
2502
- },
2503
- void: {
2504
- label: "Void",
2505
- subject: c.report_reports_void,
2506
- actions: [t.manage, t.read, t.create],
2507
- category: b.reports
2508
- },
2509
- refund: {
2510
- label: "Refund",
2511
- subject: c.report_reports_refund,
2512
- actions: [t.manage, t.read, t.create],
2513
- category: b.reports
2514
- },
2515
2430
  report_reports_allCustomReports: {
2516
2431
  label: "Include future Custom Reports",
2517
- subject: c.report_reports_allCustomReports,
2432
+ subject: l.report_reports_allCustomReports,
2518
2433
  actions: [
2519
- t.manage,
2520
- t.read,
2521
- t.create,
2522
- t.update,
2523
- t.delete
2434
+ s.manage,
2435
+ s.read,
2436
+ s.create,
2437
+ s.update,
2438
+ s.delete
2524
2439
  ],
2525
- category: b.customReports,
2440
+ category: w.customReports,
2526
2441
  isCategoryCover: !0
2527
2442
  }
2528
2443
  };
2529
2444
  var B = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(B || {});
2530
- const y = [
2445
+ const G = [
2531
2446
  {
2532
2447
  label: "Inventory",
2533
2448
  subject: B.inventory,
2534
- actions: [t.read]
2449
+ actions: [s.read]
2535
2450
  }
2536
2451
  ], ie = [
2537
- ...y,
2452
+ ...G,
2538
2453
  {
2539
2454
  label: "Stock",
2540
2455
  subject: B.inventory_stock,
2541
- actions: [t.read, t.create, t.update]
2456
+ actions: [s.read, s.create, s.update]
2542
2457
  },
2543
2458
  {
2544
2459
  label: "Stock Adjustment",
2545
2460
  subject: B.inventory_stockAdjustment,
2546
- actions: [t.read, t.update]
2461
+ actions: [s.read, s.update]
2547
2462
  },
2548
2463
  {
2549
2464
  label: "Stock Recalculation",
2550
2465
  subject: B.inventory_stockRecalculation,
2551
- actions: [t.update]
2466
+ actions: [s.update]
2552
2467
  },
2553
2468
  {
2554
2469
  label: "Unit Cost History",
2555
2470
  subject: B.inventory_unitCostHistory,
2556
- actions: [t.read]
2471
+ actions: [s.read]
2557
2472
  }
2558
2473
  ], gs = [
2559
- ...y,
2474
+ ...G,
2560
2475
  {
2561
2476
  label: "Stock Adjustment",
2562
2477
  subject: B.inventory_stockAdjustment,
2563
- actions: [t.update]
2478
+ actions: [s.update]
2564
2479
  }
2565
2480
  ], Ke = [
2566
- ...y,
2481
+ ...G,
2567
2482
  {
2568
2483
  label: "Unit Cost History",
2569
2484
  subject: B.inventory_unitCostHistory,
2570
- actions: [t.read, t.update]
2485
+ actions: [s.read, s.update]
2571
2486
  }
2572
2487
  ], Je = [
2573
- ...y,
2488
+ ...G,
2574
2489
  {
2575
2490
  label: "Wastage Template",
2576
2491
  subject: B.inventory_wastageTemplate,
2577
2492
  actions: [
2578
- t.read,
2579
- t.create,
2580
- t.update,
2581
- t.delete
2493
+ s.read,
2494
+ s.create,
2495
+ s.update,
2496
+ s.delete
2582
2497
  ]
2583
2498
  }
2584
2499
  ];
@@ -2588,65 +2503,65 @@ const y = [
2588
2503
  ...Je
2589
2504
  ];
2590
2505
  const le = [
2591
- ...y,
2506
+ ...G,
2592
2507
  {
2593
2508
  label: "Closing",
2594
2509
  subject: B.inventory_closing,
2595
- actions: [t.read, t.create]
2510
+ actions: [s.read, s.create]
2596
2511
  },
2597
2512
  {
2598
2513
  label: "Stock Recalculation",
2599
2514
  subject: B.inventory_stockRecalculation,
2600
- actions: [t.read, t.update]
2515
+ actions: [s.read, s.update]
2601
2516
  },
2602
2517
  {
2603
2518
  label: "Closing Draft",
2604
2519
  subject: B.inventory_closingDraft,
2605
- actions: [t.read]
2520
+ actions: [s.read]
2606
2521
  }
2607
2522
  ], ke = [
2608
- ...y,
2523
+ ...G,
2609
2524
  {
2610
2525
  label: "Closing Draft",
2611
2526
  subject: B.inventory_closingDraft,
2612
- actions: [t.read, t.create, t.update]
2527
+ actions: [s.read, s.create, s.update]
2613
2528
  },
2614
2529
  {
2615
2530
  label: "Closing",
2616
2531
  subject: B.inventory_closing,
2617
- actions: [t.read]
2532
+ actions: [s.read]
2618
2533
  },
2619
2534
  {
2620
2535
  label: "Stock Recalculation",
2621
2536
  subject: B.inventory_stockRecalculation,
2622
- actions: [t.read, t.update]
2537
+ actions: [s.read, s.update]
2623
2538
  },
2624
2539
  {
2625
2540
  label: "Stock",
2626
2541
  subject: B.inventory_stock,
2627
- actions: [t.read]
2542
+ actions: [s.read]
2628
2543
  },
2629
2544
  {
2630
2545
  label: "Stock Adjustment",
2631
2546
  subject: B.inventory_stockAdjustment,
2632
- actions: [t.read]
2547
+ actions: [s.read]
2633
2548
  }
2634
2549
  ], Le = [
2635
- ...y,
2550
+ ...G,
2636
2551
  {
2637
2552
  label: "Closing Template",
2638
2553
  subject: B.inventory_closingTemplate,
2639
2554
  actions: [
2640
- t.read,
2641
- t.create,
2642
- t.update,
2643
- t.delete
2555
+ s.read,
2556
+ s.create,
2557
+ s.update,
2558
+ s.delete
2644
2559
  ]
2645
2560
  },
2646
2561
  {
2647
2562
  label: "Closing",
2648
2563
  subject: B.inventory_closing,
2649
- actions: [t.read]
2564
+ actions: [s.read]
2650
2565
  }
2651
2566
  ];
2652
2567
  [
@@ -2658,148 +2573,148 @@ const ms = [
2658
2573
  {
2659
2574
  label: "Inventory",
2660
2575
  subject: B.inventory,
2661
- actions: [t.read, t.update]
2576
+ actions: [s.read, s.update]
2662
2577
  },
2663
2578
  {
2664
2579
  label: "Order Template",
2665
2580
  subject: B.inventory_orderTemplate,
2666
- actions: [t.read, t.update]
2581
+ actions: [s.read, s.update]
2667
2582
  },
2668
2583
  {
2669
2584
  label: "Wastage Template",
2670
2585
  subject: B.inventory_wastageTemplate,
2671
- actions: [t.read, t.update]
2586
+ actions: [s.read, s.update]
2672
2587
  },
2673
2588
  {
2674
2589
  label: "Closing Template",
2675
2590
  subject: B.inventory_closingTemplate,
2676
- actions: [t.read, t.update]
2591
+ actions: [s.read, s.update]
2677
2592
  }
2678
2593
  ], ds = [
2679
2594
  {
2680
2595
  label: "Inventory",
2681
2596
  subject: B.inventory,
2682
- actions: [t.read, t.update]
2597
+ actions: [s.read, s.update]
2683
2598
  }
2684
2599
  ], Bs = [
2685
2600
  {
2686
2601
  label: "Inventory",
2687
2602
  subject: B.inventory,
2688
- actions: [t.read, t.update]
2603
+ actions: [s.read, s.update]
2689
2604
  }
2690
- ], ps = [
2605
+ ], bs = [
2691
2606
  {
2692
2607
  label: "Inventory",
2693
2608
  subject: B.inventory,
2694
- actions: [t.read, t.update]
2609
+ actions: [s.read, s.update]
2695
2610
  }
2696
2611
  ], Se = [
2697
2612
  {
2698
2613
  label: "Purchase Order",
2699
2614
  subject: B.inventory_purchaseOrder,
2700
- actions: [t.read, t.create, t.update]
2615
+ actions: [s.read, s.create, s.update]
2701
2616
  },
2702
2617
  {
2703
2618
  label: "Inventory",
2704
2619
  subject: B.inventory,
2705
- actions: [t.read, t.create, t.update]
2620
+ actions: [s.read, s.create, s.update]
2706
2621
  },
2707
2622
  {
2708
2623
  label: "Closing",
2709
2624
  subject: B.inventory_closing,
2710
- actions: [t.read]
2625
+ actions: [s.read]
2711
2626
  },
2712
2627
  {
2713
2628
  label: "Order Template",
2714
2629
  subject: B.inventory_orderTemplate,
2715
- actions: [t.read]
2630
+ actions: [s.read]
2716
2631
  },
2717
2632
  {
2718
2633
  label: "Supplier",
2719
2634
  subject: B.inventory_supplier,
2720
- actions: [t.read]
2635
+ actions: [s.read]
2721
2636
  },
2722
2637
  {
2723
2638
  label: "Surcharge",
2724
2639
  subject: B.inventory_surcharge,
2725
- actions: [t.read]
2640
+ actions: [s.read]
2726
2641
  },
2727
2642
  {
2728
2643
  label: "Delivery Order",
2729
2644
  subject: B.inventory_deliveryOrder,
2730
- actions: [t.read, t.create, t.update]
2645
+ actions: [s.read, s.create, s.update]
2731
2646
  },
2732
2647
  {
2733
2648
  label: "Shipment",
2734
2649
  subject: B.inventory_shipment,
2735
- actions: [t.read, t.update]
2650
+ actions: [s.read, s.update]
2736
2651
  }
2737
2652
  ], _e = [
2738
2653
  {
2739
2654
  label: "Purchase Order",
2740
2655
  subject: B.inventory_purchaseOrder,
2741
- actions: [t.read, t.update]
2656
+ actions: [s.read, s.update]
2742
2657
  },
2743
2658
  {
2744
2659
  label: "Inventory",
2745
2660
  subject: B.inventory,
2746
- actions: [t.read, t.create, t.update]
2661
+ actions: [s.read, s.create, s.update]
2747
2662
  },
2748
2663
  {
2749
2664
  label: "Delivery Order",
2750
2665
  subject: B.inventory_deliveryOrder,
2751
- actions: [t.read, t.create, t.update]
2666
+ actions: [s.read, s.create, s.update]
2752
2667
  },
2753
2668
  {
2754
2669
  label: "Shipment",
2755
2670
  subject: B.inventory_shipment,
2756
- actions: [t.read, t.update]
2671
+ actions: [s.read, s.update]
2757
2672
  }
2758
2673
  ], $e = [
2759
- ...y,
2674
+ ...G,
2760
2675
  {
2761
2676
  label: "Surcharge",
2762
2677
  subject: B.inventory_surcharge,
2763
2678
  actions: [
2764
- t.read,
2765
- t.create,
2766
- t.update,
2767
- t.delete
2679
+ s.read,
2680
+ s.create,
2681
+ s.update,
2682
+ s.delete
2768
2683
  ]
2769
2684
  },
2770
2685
  {
2771
2686
  label: "Supplier",
2772
2687
  subject: B.inventory_supplier,
2773
- actions: [t.read]
2688
+ actions: [s.read]
2774
2689
  }
2775
2690
  ], et = [
2776
- ...y,
2691
+ ...G,
2777
2692
  {
2778
2693
  label: "Order Template",
2779
2694
  subject: B.inventory_orderTemplate,
2780
2695
  actions: [
2781
- t.read,
2782
- t.create,
2783
- t.update,
2784
- t.delete
2696
+ s.read,
2697
+ s.create,
2698
+ s.update,
2699
+ s.delete
2785
2700
  ]
2786
2701
  },
2787
2702
  {
2788
2703
  label: "Supplier",
2789
2704
  subject: B.inventory_supplier,
2790
- actions: [t.read]
2705
+ actions: [s.read]
2791
2706
  },
2792
2707
  {
2793
2708
  label: "Shipment",
2794
2709
  subject: B.inventory_shipment,
2795
- actions: [t.read, t.update]
2710
+ actions: [s.read, s.update]
2796
2711
  }
2797
- ], bs = [
2798
- ...y,
2712
+ ], ps = [
2713
+ ...G,
2799
2714
  {
2800
2715
  label: "Order Draft Approval",
2801
2716
  subject: B.inventory_orderDraftApproval,
2802
- actions: [t.update]
2717
+ actions: [s.update]
2803
2718
  }
2804
2719
  ];
2805
2720
  [
@@ -2809,162 +2724,162 @@ const ms = [
2809
2724
  ...et
2810
2725
  ];
2811
2726
  const ws = [
2812
- ...y,
2727
+ ...G,
2813
2728
  {
2814
2729
  label: "Supplier",
2815
2730
  subject: B.inventory_supplier,
2816
2731
  actions: [
2817
- t.read,
2818
- t.create,
2819
- t.update,
2820
- t.delete
2732
+ s.read,
2733
+ s.create,
2734
+ s.update,
2735
+ s.delete
2821
2736
  ]
2822
2737
  },
2823
2738
  {
2824
2739
  label: "Order Template",
2825
2740
  subject: B.inventory_orderTemplate,
2826
- actions: [t.read, t.update]
2741
+ actions: [s.read, s.update]
2827
2742
  }
2828
2743
  ], fs = [
2829
- ...y,
2744
+ ...G,
2830
2745
  {
2831
2746
  label: "Warehouse",
2832
2747
  subject: B.inventory_warehouse,
2833
2748
  actions: [
2834
- t.read,
2835
- t.create,
2836
- t.update,
2837
- t.delete
2749
+ s.read,
2750
+ s.create,
2751
+ s.update,
2752
+ s.delete
2838
2753
  ]
2839
2754
  }
2840
2755
  ], Ds = [
2841
2756
  {
2842
2757
  label: "Inventory",
2843
2758
  subject: B.inventory,
2844
- actions: [t.read, t.update]
2759
+ actions: [s.read, s.update]
2845
2760
  }
2846
2761
  ], Ms = [
2847
- ...y,
2762
+ ...G,
2848
2763
  {
2849
2764
  label: "Inventory",
2850
2765
  subject: B.inventory,
2851
- actions: [t.update]
2766
+ actions: [s.update]
2852
2767
  }
2853
2768
  ], Ys = [
2854
- ...y,
2769
+ ...G,
2855
2770
  {
2856
2771
  label: "Integration",
2857
2772
  subject: B.inventory_integration,
2858
- actions: [t.read, t.create, t.update]
2773
+ actions: [s.read, s.create, s.update]
2859
2774
  }
2860
2775
  ];
2861
2776
  [
2862
- ...y,
2777
+ ...G,
2863
2778
  ...ie,
2864
2779
  ...le
2865
2780
  ];
2866
2781
  const Cs = {
2867
- [`set_${c.inventory_stockBalance}`]: {
2782
+ [`set_${l.inventory_stockBalance}`]: {
2868
2783
  key: "sys:inventory:stock_balance",
2869
2784
  name: "Stock Balance",
2870
2785
  permissions: ie
2871
2786
  },
2872
- [`set_${c.inventory_stockAdjustment}`]: {
2787
+ [`set_${l.inventory_stockAdjustment}`]: {
2873
2788
  key: "sys:inventory:stock_adjustment",
2874
2789
  name: "Stock Adjustment",
2875
2790
  permissions: gs
2876
2791
  },
2877
- [`set_${c.inventory_unitCostHistory}`]: {
2792
+ [`set_${l.inventory_unitCostHistory}`]: {
2878
2793
  key: "sys:inventory:unit_cost_history",
2879
2794
  name: "Unit Cost History",
2880
2795
  permissions: Ke
2881
2796
  },
2882
- [`set_${c.inventory_wastageTemplate}`]: {
2797
+ [`set_${l.inventory_wastageTemplate}`]: {
2883
2798
  key: "sys:inventory:wastage_template",
2884
2799
  name: "Wastage Template",
2885
2800
  permissions: Je
2886
2801
  },
2887
- [`set_${c.inventory_closingHistory}`]: {
2802
+ [`set_${l.inventory_closingHistory}`]: {
2888
2803
  key: "sys:inventory:closing_history",
2889
2804
  name: "Closing History",
2890
2805
  permissions: le
2891
2806
  },
2892
- [`set_${c.inventory_closingTemplate}`]: {
2807
+ [`set_${l.inventory_closingTemplate}`]: {
2893
2808
  key: "sys:inventory:closing_template",
2894
2809
  name: "Closing Template",
2895
2810
  permissions: Le
2896
2811
  },
2897
- [`set_${c.inventory_closingDraft}`]: {
2812
+ [`set_${l.inventory_closingDraft}`]: {
2898
2813
  key: "sys:inventory:closing_draft",
2899
2814
  name: "Closing Draft",
2900
2815
  permissions: ke
2901
2816
  },
2902
- [`set_${c.inventory_ingredient}`]: {
2817
+ [`set_${l.inventory_ingredient}`]: {
2903
2818
  key: "sys:inventory:ingredient",
2904
2819
  name: "Ingredient",
2905
2820
  permissions: ms
2906
2821
  },
2907
- [`set_${c.inventory_ingredientGroup}`]: {
2822
+ [`set_${l.inventory_ingredientGroup}`]: {
2908
2823
  key: "sys:inventory:ingredient_group",
2909
2824
  name: "Ingredient Group",
2910
2825
  permissions: ds
2911
2826
  },
2912
- [`set_${c.inventory_recipe}`]: {
2827
+ [`set_${l.inventory_recipe}`]: {
2913
2828
  key: "sys:inventory:recipe",
2914
2829
  name: "Recipe",
2915
2830
  permissions: Bs
2916
2831
  },
2917
- [`set_${c.inventory_unit}`]: {
2832
+ [`set_${l.inventory_unit}`]: {
2918
2833
  key: "sys:inventory:unit",
2919
2834
  name: "Unit",
2920
- permissions: ps
2835
+ permissions: bs
2921
2836
  },
2922
- [`set_${c.inventory_purchaseTransfer}`]: {
2837
+ [`set_${l.inventory_purchaseTransfer}`]: {
2923
2838
  key: "sys:inventory:purchase_transfer",
2924
2839
  name: "Purchase Transfer",
2925
2840
  permissions: Se
2926
2841
  },
2927
- [`set_${c.inventory_orderDraftApproval}`]: {
2842
+ [`set_${l.inventory_orderDraftApproval}`]: {
2928
2843
  key: "sys:inventory:order_draft_approval",
2929
2844
  name: "Order Draft Approval",
2930
- permissions: bs
2845
+ permissions: ps
2931
2846
  },
2932
- [`set_${c.inventory_transferOut}`]: {
2847
+ [`set_${l.inventory_transferOut}`]: {
2933
2848
  key: "sys:inventory:transfer_out",
2934
2849
  name: "Transfer Out",
2935
2850
  permissions: _e
2936
2851
  },
2937
- [`set_${c.inventory_surcharge}`]: {
2852
+ [`set_${l.inventory_surcharge}`]: {
2938
2853
  key: "sys:inventory:surcharge",
2939
2854
  name: "Surcharge",
2940
2855
  permissions: $e
2941
2856
  },
2942
- [`set_${c.inventory_orderTemplate}`]: {
2857
+ [`set_${l.inventory_orderTemplate}`]: {
2943
2858
  key: "sys:inventory:order_template",
2944
2859
  name: "Order Template",
2945
2860
  permissions: et
2946
2861
  },
2947
- [`set_${c.inventory_supplier}`]: {
2862
+ [`set_${l.inventory_supplier}`]: {
2948
2863
  key: "sys:inventory:supplier",
2949
2864
  name: "Supplier",
2950
2865
  permissions: ws
2951
2866
  },
2952
- [`set_${c.inventory_warehouse}`]: {
2867
+ [`set_${l.inventory_warehouse}`]: {
2953
2868
  key: "sys:inventory:warehouse",
2954
2869
  name: "Warehouse",
2955
2870
  permissions: fs
2956
2871
  },
2957
- [`set_${c.inventory_publish}`]: {
2872
+ [`set_${l.inventory_publish}`]: {
2958
2873
  key: "sys:inventory:publish",
2959
2874
  name: "Publish",
2960
2875
  permissions: Ds
2961
2876
  },
2962
- [`set_${c.inventory_import}`]: {
2877
+ [`set_${l.inventory_import}`]: {
2963
2878
  key: "sys:inventory:import",
2964
2879
  name: "Import",
2965
2880
  permissions: Ms
2966
2881
  },
2967
- [`set_${c.inventory_integration}`]: {
2882
+ [`set_${l.inventory_integration}`]: {
2968
2883
  key: "sys:inventory:integration",
2969
2884
  name: "Integration",
2970
2885
  permissions: Ys
@@ -2977,24 +2892,24 @@ const vs = {
2977
2892
  * Injects: team member list read + pos role read
2978
2893
  * Users who can manage team members need to see the team member list and assign POS roles.
2979
2894
  */
2980
- [`set_${c.hrm_teamMember}`]: {
2895
+ [`set_${l.hrm_teamMember}`]: {
2981
2896
  key: "sys:team_member_access",
2982
2897
  name: "Team Member Access",
2983
2898
  permissions: [
2984
2899
  {
2985
2900
  label: "Portal Users",
2986
2901
  subject: Z.hrm_portalUsers,
2987
- actions: [t.manage]
2902
+ actions: [s.manage]
2988
2903
  },
2989
2904
  {
2990
2905
  label: "Role resource",
2991
- subject: c.role,
2992
- actions: [t.read, t.update]
2906
+ subject: l.role,
2907
+ actions: [s.read, s.update]
2993
2908
  },
2994
2909
  {
2995
2910
  label: "Pos Role",
2996
2911
  subject: Z.hrm_posRole,
2997
- actions: [t.read]
2912
+ actions: [s.read]
2998
2913
  }
2999
2914
  ]
3000
2915
  },
@@ -3002,24 +2917,24 @@ const vs = {
3002
2917
  * Triggered by: hrm_employee:manage (portal toggle)
3003
2918
  * Injects: pos role read + restaurant manage (cross-level: needed for employee–restaurant linking)
3004
2919
  */
3005
- [`set_${c.hrm_employee}`]: {
2920
+ [`set_${l.hrm_employee}`]: {
3006
2921
  key: "sys:employee_access",
3007
2922
  name: "Employee Access",
3008
2923
  permissions: [
3009
2924
  {
3010
2925
  label: "Portal Users",
3011
2926
  subject: Z.hrm_portalUsers,
3012
- actions: [t.read]
2927
+ actions: [s.read]
3013
2928
  },
3014
2929
  {
3015
2930
  label: "Restaurant resource",
3016
- subject: c.restaurant,
3017
- actions: [t.read]
2931
+ subject: l.restaurant,
2932
+ actions: [s.read]
3018
2933
  },
3019
2934
  {
3020
2935
  label: "Pos Role",
3021
2936
  subject: Z.hrm_posRole,
3022
- actions: [t.manage]
2937
+ actions: [s.manage]
3023
2938
  }
3024
2939
  ]
3025
2940
  },
@@ -3029,43 +2944,43 @@ const vs = {
3029
2944
  * Uses HrmResource.hrm_portalUsers (not the module subject hrm_teamMember) to avoid
3030
2945
  * conflating the audit-log read dependency with the full team-management module grant.
3031
2946
  */
3032
- [`set_${c.hrm_auditLog}`]: {
2947
+ [`set_${l.hrm_auditLog}`]: {
3033
2948
  key: "sys:audit_log_access",
3034
2949
  name: "Audit Log Access",
3035
2950
  permissions: [
3036
2951
  {
3037
2952
  label: "Portal Users",
3038
2953
  subject: Z.hrm_portalUsers,
3039
- actions: [t.read]
2954
+ actions: [s.read]
3040
2955
  }
3041
2956
  ]
3042
2957
  }
3043
- }, ys = {
2958
+ }, Gs = {
3044
2959
  ...Cs,
3045
2960
  ...vs
3046
- }, dr = Object.values(
3047
- ys
2961
+ }, mA = Object.values(
2962
+ Gs
3048
2963
  ).flatMap((e) => e.permissions ?? []).reduce(
3049
2964
  (e, o) => {
3050
- var i;
3051
- return e[i = o.subject] ?? (e[i] = o.label), e;
2965
+ var c;
2966
+ return e[c = o.subject] ?? (e[c] = o.label), e;
3052
2967
  },
3053
2968
  {}
3054
2969
  );
3055
- function Gs(e) {
2970
+ function hs(e) {
3056
2971
  return e.map((o) => ({
3057
2972
  ...o,
3058
2973
  subject: us(o.subject),
3059
2974
  reason: o.source !== void 0 ? JSON.stringify(o.source) : o.reason
3060
2975
  }));
3061
2976
  }
3062
- function hs(e) {
3063
- return new is(Gs(e));
2977
+ function ys(e) {
2978
+ return new is(hs(e));
3064
2979
  }
3065
- function Vs(e, o, i) {
3066
- const r = Array.isArray(e) ? e : [e], A = hs(o), n = (D) => D.subject, u = (D) => A.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? A.can(D.action, D.coverSubject, D.field) : !1, g = r.find((D) => !u(D));
2980
+ function Vs(e, o, c) {
2981
+ const A = Array.isArray(e) ? e : [e], r = ys(o), n = (D) => D.subject, u = (D) => r.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? r.can(D.action, D.coverSubject, D.field) : !1, g = A.find((D) => !u(D));
3067
2982
  if (g) {
3068
- const D = A.relevantRuleFor(
2983
+ const D = r.relevantRuleFor(
3069
2984
  g.action,
3070
2985
  n(g),
3071
2986
  g.field
@@ -3076,20 +2991,20 @@ function Vs(e, o, i) {
3076
2991
  decisiveRule: D ?? null
3077
2992
  };
3078
2993
  }
3079
- const M = r[0], Y = A.relevantRuleFor(M.action, n(M), M.field);
2994
+ const M = A[0], Y = r.relevantRuleFor(M.action, n(M), M.field);
3080
2995
  return { granted: !0, decisivePermission: M, decisiveRule: Y ?? null };
3081
2996
  }
3082
2997
  async function js(e) {
3083
- const { sessionUser: o, validationManifest: i } = e, { requiredRoles: r, requiredCaslPermissions: A, customValidationFunction: n } = i;
2998
+ const { sessionUser: o, validationManifest: c } = e, { requiredRoles: A, requiredCaslPermissions: r, customValidationFunction: n } = c;
3084
2999
  if (!o)
3085
3000
  return { canAccess: !1 };
3086
- if (r && r.length > 0 && !r.includes(o._role || ""))
3001
+ if (A && A.length > 0 && !A.includes(o._role || ""))
3087
3002
  return Promise.resolve({
3088
3003
  canAccess: !1,
3089
3004
  message: "User does not have permission to access"
3090
3005
  });
3091
- if (A && A.length > 0) {
3092
- const { granted: u } = Vs(A, o.permissions);
3006
+ if (r && r.length > 0) {
3007
+ const { granted: u } = Vs(r, o.permissions);
3093
3008
  if (!u)
3094
3009
  return Promise.resolve({
3095
3010
  canAccess: !1,
@@ -3105,16 +3020,16 @@ async function js(e) {
3105
3020
  }
3106
3021
  async function Es(e) {
3107
3022
  const { useCoreStore: o } = await import("@feedmepos/mf-common");
3108
- for (const i of e.matched)
3109
- if (i.meta.validationManifest) {
3110
- const r = await js({
3023
+ for (const c of e.matched)
3024
+ if (c.meta.validationManifest) {
3025
+ const A = await js({
3111
3026
  sessionUser: o().sessionUser.value,
3112
- validationManifest: i.meta.validationManifest
3027
+ validationManifest: c.meta.validationManifest
3113
3028
  });
3114
- if (!r.canAccess)
3029
+ if (!A.canAccess)
3115
3030
  return {
3116
3031
  canAccess: !1,
3117
- message: r.message,
3032
+ message: A.message,
3118
3033
  redirectTo: ls
3119
3034
  };
3120
3035
  }
@@ -3145,7 +3060,7 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3145
3060
  }, Is = { class: "w-full h-full flex justify-center items-center" }, zs = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Ns = { class: "w-[300px] h-[300px]" }, Ws = ["src"], Us = { class: "text-2xl" }, Rs = { class: "text-xl" }, Ts = /* @__PURE__ */ I({
3146
3061
  __name: "NoPermission",
3147
3062
  setup(e) {
3148
- const { t: o } = Ge({
3063
+ const { t: o } = he({
3149
3064
  messages: {
3150
3065
  "en-US": Xs,
3151
3066
  "zh-CN": Hs,
@@ -3153,7 +3068,7 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3153
3068
  "th-TH": Zs
3154
3069
  }
3155
3070
  });
3156
- return (i, r) => (z(), ve("div", Is, [
3071
+ return (c, A) => (z(), ve("div", Is, [
3157
3072
  P("div", zs, [
3158
3073
  P("div", Ns, [
3159
3074
  P("img", {
@@ -3162,8 +3077,8 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3162
3077
  }, null, 8, Ws)
3163
3078
  ]),
3164
3079
  P("div", null, [
3165
- P("h1", Us, be(se(o)("noPermission.title")), 1),
3166
- P("h2", Rs, be(se(o)("noPermission.subtitle")), 1)
3080
+ P("h1", Us, pe(se(o)("noPermission.title")), 1),
3081
+ P("h2", Rs, pe(se(o)("noPermission.subtitle")), 1)
3167
3082
  ])
3168
3083
  ])
3169
3084
  ]));
@@ -3171,55 +3086,55 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3171
3086
  }), Ks = /* @__PURE__ */ I({
3172
3087
  __name: "PermissionWrapper",
3173
3088
  setup(e) {
3174
- const o = S(!1), i = mt();
3089
+ const o = S(!1), c = mt();
3175
3090
  return oe(async () => {
3176
- const r = await Es(i);
3177
- o.value = r.canAccess;
3178
- }), (r, A) => o.value ? Ce(r.$slots, "default", { key: 1 }) : (z(), _(Ts, { key: 0 }));
3091
+ const A = await Es(c);
3092
+ o.value = A.canAccess;
3093
+ }), (A, r) => o.value ? Ce(A.$slots, "default", { key: 1 }) : (z(), _(Ts, { key: 0 }));
3179
3094
  }
3180
3095
  });
3181
3096
  function ue(e) {
3182
3097
  return {
3183
- render: () => pe(Ks, {}, { default: () => pe(e) })
3098
+ render: () => be(Ks, {}, { default: () => be(e) })
3184
3099
  };
3185
3100
  }
3186
3101
  function Js(e, o) {
3187
- const i = S({ top: 0, bottom: 0, left: 0, right: 0 });
3188
- function r() {
3102
+ const c = S({ top: 0, bottom: 0, left: 0, right: 0 });
3103
+ function A() {
3189
3104
  if (e.value) {
3190
- const A = e.value.getBoundingClientRect();
3191
- i.value = {
3192
- top: A.top,
3193
- bottom: A.bottom,
3194
- left: A.left,
3195
- right: A.right
3105
+ const r = e.value.getBoundingClientRect();
3106
+ c.value = {
3107
+ top: r.top,
3108
+ bottom: r.bottom,
3109
+ left: r.left,
3110
+ right: r.right
3196
3111
  };
3197
3112
  }
3198
3113
  }
3199
3114
  return we(o, async () => {
3200
- await fe(), r();
3201
- }), we(e, async (A) => {
3202
- A && (await fe(), r());
3115
+ await fe(), A();
3116
+ }), we(e, async (r) => {
3117
+ r && (await fe(), A());
3203
3118
  }), oe(() => {
3204
- window.addEventListener("resize", r);
3119
+ window.addEventListener("resize", A);
3205
3120
  }), nt(() => {
3206
- window.removeEventListener("resize", r);
3207
- }), i;
3121
+ window.removeEventListener("resize", A);
3122
+ }), c;
3208
3123
  }
3209
3124
  const ks = /* @__PURE__ */ I({
3210
3125
  __name: "FullWrapper",
3211
3126
  setup(e) {
3212
- const o = gt(), i = S(null), r = Js(i), A = ye(() => {
3127
+ const o = gt(), c = S(null), A = Js(c), r = Ge(() => {
3213
3128
  var g;
3214
3129
  const u = o.isAtMost("sm") ? 56 : 0;
3215
3130
  return {
3216
- height: `calc(100dvh - ${((g = r.value) == null ? void 0 : g.top) + 24 + u}px)`
3131
+ height: `calc(100dvh - ${((g = A.value) == null ? void 0 : g.top) + 24 + u}px)`
3217
3132
  };
3218
3133
  });
3219
3134
  return (n, u) => (z(), ve("div", {
3220
3135
  ref_key: "wrapper",
3221
- ref: i,
3222
- style: ot(A.value)
3136
+ ref: c,
3137
+ style: ot(r.value)
3223
3138
  }, [
3224
3139
  Ce(n.$slots, "default")
3225
3140
  ], 4));
@@ -3227,12 +3142,12 @@ const ks = /* @__PURE__ */ I({
3227
3142
  }), Ls = { class: "flex justify-center items-center h-full w-full" }, Ss = /* @__PURE__ */ I({
3228
3143
  __name: "PageLoading",
3229
3144
  setup(e) {
3230
- return (o, i) => {
3231
- const r = ce("FmCircularProgress");
3145
+ return (o, c) => {
3146
+ const A = ce("FmCircularProgress");
3232
3147
  return z(), _(ks, null, {
3233
3148
  default: ct(() => [
3234
3149
  P("div", Ls, [
3235
- it(r, { size: "xl" })
3150
+ it(A, { size: "xl" })
3236
3151
  ])
3237
3152
  ]),
3238
3153
  _: 1
@@ -3244,7 +3159,7 @@ const ks = /* @__PURE__ */ I({
3244
3159
  loadingComponent: Ss
3245
3160
  });
3246
3161
  var j = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e))(j || {});
3247
- const re = (e) => ({
3162
+ const Ae = (e) => ({
3248
3163
  validationManifest: {
3249
3164
  requiredCaslPermissions: [
3250
3165
  {
@@ -3253,16 +3168,16 @@ const re = (e) => ({
3253
3168
  }
3254
3169
  ]
3255
3170
  }
3256
- }), _s = ue(F(() => import("./Main-DAcmCNsi.js"))), $s = ue(F(() => import("./Main-DmaUVB5Y.js"))), er = ue(
3257
- F(() => import("./AuditLogList-ssYtQ2J1.js"))
3258
- ), tr = F(() => import("./EmployeeList-CNNgH2vX.js")), sr = F(() => import("./RoleList-rv6egTFo.js")), rr = F(() => import("./TimesheetList-lYmFc7sY.js")), Ar = F(() => import("./TeamMemberList-JjUw7Pdt.js")), ar = F(
3259
- () => import("./PermissionSetList-CybAQCrm.js")
3260
- ), Br = [
3171
+ }), _s = ue(F(() => import("./Main-CHG4jcIV.js"))), $s = ue(F(() => import("./Main-CoY-GVfR.js"))), eA = ue(
3172
+ F(() => import("./AuditLogList-CV-y1xix.js"))
3173
+ ), tA = F(() => import("./EmployeeList-DDbML16v.js")), sA = F(() => import("./RoleList-DU6TSPjK.js")), AA = F(() => import("./TimesheetList-BZX7mz7l.js")), rA = F(() => import("./TeamMemberList-BPhlYPcR.js")), aA = F(
3174
+ () => import("./PermissionSetList-BpbcJwgS.js")
3175
+ ), dA = [
3261
3176
  {
3262
3177
  path: "/",
3263
3178
  name: "home",
3264
3179
  component: _s,
3265
- meta: re(k.Subject.Business.hrm_employee),
3180
+ meta: Ae(k.Subject.Business.hrm_employee),
3266
3181
  redirect: {
3267
3182
  name: "employee"
3268
3183
  /* EMPLOYEE */
@@ -3271,31 +3186,31 @@ const re = (e) => ({
3271
3186
  {
3272
3187
  path: "employee",
3273
3188
  name: "employee",
3274
- component: tr
3189
+ component: tA
3275
3190
  },
3276
3191
  {
3277
3192
  path: "role",
3278
3193
  name: "role",
3279
- component: sr
3194
+ component: sA
3280
3195
  },
3281
3196
  {
3282
3197
  path: "timesheet",
3283
3198
  name: "timesheet",
3284
- component: rr
3199
+ component: AA
3285
3200
  }
3286
3201
  ]
3287
3202
  },
3288
3203
  {
3289
3204
  path: "/audit-log",
3290
3205
  name: "audit-log",
3291
- component: er,
3292
- meta: re(k.Subject.Business.hrm_auditLog)
3206
+ component: eA,
3207
+ meta: Ae(k.Subject.Business.hrm_auditLog)
3293
3208
  },
3294
3209
  {
3295
3210
  path: "/team",
3296
3211
  name: "team",
3297
3212
  component: $s,
3298
- meta: re(k.Subject.Business.hrm_teamMember),
3213
+ meta: Ae(k.Subject.Business.hrm_teamMember),
3299
3214
  redirect: {
3300
3215
  name: "team-member"
3301
3216
  /* TEAM_MEMBER */
@@ -3304,53 +3219,53 @@ const re = (e) => ({
3304
3219
  {
3305
3220
  path: "member",
3306
3221
  name: "team-member",
3307
- component: Ar
3222
+ component: rA
3308
3223
  },
3309
3224
  {
3310
3225
  path: "role",
3311
3226
  name: "team-role",
3312
- component: ar
3227
+ component: aA
3313
3228
  }
3314
3229
  ]
3315
3230
  }
3316
- ], nr = /* @__PURE__ */ I({
3231
+ ], nA = /* @__PURE__ */ I({
3317
3232
  __name: "Navigator",
3318
3233
  emits: ["close-navigation"],
3319
3234
  setup(e, { emit: o }) {
3320
- const i = o, { t: r } = Ge(), A = dt(), n = ye(() => {
3235
+ const c = o, { t: A } = he(), r = dt(), n = Ge(() => {
3321
3236
  const g = [];
3322
3237
  return g.push({
3323
- label: r("hr.employee.title"),
3238
+ label: A("hr.employee.title"),
3324
3239
  value: "employee",
3325
3240
  action: () => {
3326
- A.push({
3241
+ r.push({
3327
3242
  name: j.EMPLOYEE,
3328
- query: A.currentRoute.value.query
3329
- }), i("close-navigation");
3243
+ query: r.currentRoute.value.query
3244
+ }), c("close-navigation");
3330
3245
  }
3331
3246
  }), g.push({
3332
- label: r("team.title"),
3247
+ label: A("team.title"),
3333
3248
  value: "team-member",
3334
3249
  action: () => {
3335
- A.push({
3250
+ r.push({
3336
3251
  name: j.TEAM,
3337
- query: A.currentRoute.value.query
3338
- }), i("close-navigation");
3252
+ query: r.currentRoute.value.query
3253
+ }), c("close-navigation");
3339
3254
  }
3340
3255
  }), g.push({
3341
3256
  label: "Audit Log",
3342
3257
  value: "audit-log",
3343
3258
  action: () => {
3344
- A.push({
3259
+ r.push({
3345
3260
  name: j.AUDIT_LOG,
3346
- query: A.currentRoute.value.query
3347
- }), i("close-navigation");
3261
+ query: r.currentRoute.value.query
3262
+ }), c("close-navigation");
3348
3263
  }
3349
3264
  }), g;
3350
3265
  }), u = S();
3351
3266
  return ut(() => {
3352
3267
  var M;
3353
- let g = (M = A.currentRoute.value) == null ? void 0 : M.name;
3268
+ let g = (M = r.currentRoute.value) == null ? void 0 : M.name;
3354
3269
  switch (g) {
3355
3270
  case j.EMPLOYEE:
3356
3271
  case j.ROLE:
@@ -3378,45 +3293,44 @@ const re = (e) => ({
3378
3293
  }, null, 8, ["modelValue", "items"]);
3379
3294
  };
3380
3295
  }
3381
- }), pr = /* @__PURE__ */ I({
3296
+ }), BA = /* @__PURE__ */ I({
3382
3297
  __name: "App",
3383
3298
  setup(e) {
3384
3299
  const o = Bt();
3385
3300
  return oe(() => {
3386
- o.registerSidebarComponent(nr);
3387
- }), (i, r) => {
3388
- const A = ce("RouterView");
3389
- return z(), _(A);
3301
+ o.registerSidebarComponent(nA);
3302
+ }), (c, A) => {
3303
+ const r = ce("RouterView");
3304
+ return z(), _(r);
3390
3305
  };
3391
3306
  }
3392
- }), br = () => {
3393
- const e = [Nt, Xt, vt], o = new Set(e.flatMap((i) => Object.keys(i)));
3307
+ }), bA = () => {
3308
+ const e = [Nt, Xt, vt], o = new Set(e.flatMap((c) => Object.keys(c)));
3394
3309
  return Array.from(o).reduce(
3395
- (i, r) => {
3396
- const A = r;
3397
- return i[r] = e.reduce((n, u) => ({
3310
+ (c, A) => {
3311
+ const r = A;
3312
+ return c[A] = e.reduce((n, u) => ({
3398
3313
  ...n,
3399
- ...u[A] || {}
3400
- }), {}), i;
3314
+ ...u[r] || {}
3315
+ }), {}), c;
3401
3316
  },
3402
3317
  {}
3403
3318
  );
3404
3319
  };
3405
3320
  export {
3406
- dr as G,
3407
- gr as N,
3321
+ mA as F,
3408
3322
  j as R,
3409
- mr as U,
3323
+ gA as U,
3410
3324
  ks as _,
3411
- b as a,
3412
- ys as b,
3325
+ Gs as a,
3326
+ s as b,
3413
3327
  Wt as c,
3414
- br as d,
3415
- pr as e,
3416
- ur as f,
3328
+ k as d,
3329
+ bA as e,
3330
+ uA as f,
3417
3331
  Ut as g,
3418
- us as i,
3419
- t as p,
3420
- Br as r,
3421
- k as u
3332
+ BA as h,
3333
+ w as i,
3334
+ dA as r,
3335
+ us as u
3422
3336
  };