@feedmepos/mf-hrm-portal 2.2.1-dev.3 → 2.2.1

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 (48) hide show
  1. package/dist/{ApprovalCodeList-rL8dh-6s.js → ApprovalCodeList-BWQBJGCZ.js} +5 -5
  2. package/dist/AuditLogList-CymSyHag.js +1149 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BJgpH-kw.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDOdtKwI.js} +2 -2
  4. package/dist/{EmployeeList-C3VvVY6A.js → EmployeeList-BZ6fxRCN.js} +71 -71
  5. package/dist/{GrantUserList-DjZ4O0VB.js → GrantUserList-CaVpRVzA.js} +6 -6
  6. package/dist/{Main-DVTx58X9.js → Main-CEKiyT80.js} +11 -11
  7. package/dist/{Main-LaAbAOfs.js → Main-CQpEciKH.js} +5 -5
  8. package/dist/{Main-ByWrRV70.js → Main-DrfRLxA5.js} +8 -8
  9. package/dist/{PermissionSetList-DD45SSY3.js → PermissionSetList-BgOSJy4y.js} +78 -77
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-yDPvNHiW.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B2SX3ZoV.js} +1383 -1378
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js} +1 -1
  12. package/dist/RoleList-C2PrTc1f.js +739 -0
  13. package/dist/{TeamMemberList-DrLbMN34.js → TeamMemberList-BXk_pXjc.js} +312 -313
  14. package/dist/{TimesheetList-CdaxlO97.js → TimesheetList-DgaZmgug.js} +7 -7
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-ogjfztLs.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B_Lc8Xmy.js} +3 -3
  16. package/dist/{app-B8eo04d6.js → app-DzagkC6l.js} +513 -805
  17. package/dist/app.js +1 -1
  18. package/dist/{approval-code-jIjkeVEb.js → approval-code-BRClD2HN.js} +1 -1
  19. package/dist/{dayjs.min-DZEHW2QB.js → dayjs.min-CqJsImsm.js} +1 -1
  20. package/dist/{employee-DX0CZF-B.js → employee-CXBuv0Bx.js} +4 -4
  21. package/dist/{grant-user-SNiDV22U.js → grant-user-Dhi3ilC_.js} +1 -1
  22. package/dist/{iteration-yBS4dpFh.js → iteration-BCfwR_XH.js} +1 -1
  23. package/dist/{lodash-344d5Ope.js → lodash-BJl3phr9.js} +1 -1
  24. package/dist/{restaurant-BTpBmfBV.js → restaurant-DiYb0pCm.js} +2 -2
  25. package/dist/{role-BXBuBxs5.js → role-BfCNRnuy.js} +2 -2
  26. package/dist/{rule-DWlFon04.js → rule-B3Eg-J8O.js} +279 -259
  27. package/dist/src/api/audit-log/index.d.ts +0 -6
  28. package/dist/src/api/user/index.d.ts +2 -2
  29. package/dist/src/composables/useReportPermissions.d.ts +1 -0
  30. package/dist/src/helpers/rule.d.ts +2 -0
  31. package/dist/src/types/audit-log.d.ts +1 -1
  32. package/dist/src/types/role.d.ts +1 -0
  33. package/dist/src/views/audit-log/locales/index.d.ts +0 -296
  34. package/dist/src/views/hr/locales/index.d.ts +4 -0
  35. package/dist/style.css +1 -1
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/{useAppStore-DCwd8GWN.js → useAppStore-BGhlB1_1.js} +1 -1
  38. package/dist/useDebounce-CWb5QR9G.js +28 -0
  39. package/dist/{useLoading-CXzTpIVv.js → useLoading-CvgqVDbF.js} +1 -1
  40. package/dist/useReportPermissions-CXXq725N.js +82 -0
  41. package/package.json +1 -1
  42. package/dist/AuditLogList-NvISIfUq.js +0 -1611
  43. package/dist/RoleList-BDxgwmAV.js +0 -725
  44. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  45. package/dist/src/views/audit-log/event-line.d.ts +0 -13
  46. package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
  47. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  48. package/dist/useReportPermissions-C0exkIxU.js +0 -71
@@ -1,7 +1,7 @@
1
1
  var Rn = Object.defineProperty;
2
2
  var Xn = (e, t, s) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var xt = (e, t, s) => Xn(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as zs, defineComponent as it, createBlock as zt, renderSlot as cr, createCommentVNode as Tn, unref as ze, openBlock as ct, createElementBlock as lr, createElementVNode as Ue, toDisplayString as Ws, watch as Sn, nextTick as Nn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as Un, resolveComponent as Fs, withCtx as zn, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
4
+ import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as Us, defineComponent as it, createBlock as Ut, renderSlot as cr, createCommentVNode as Tn, unref as Ue, openBlock as ct, createElementBlock as lr, createElementVNode as ze, toDisplayString as Ws, watch as Nn, nextTick as Sn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as zn, resolveComponent as Fs, withCtx as Un, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
5
5
  import { useBreakpoints as Kn } from "@feedmepos/ui-library";
6
6
  import { useRoute as Jn, useRouter as _n } from "vue-router";
7
7
  import { useCoreStore as Ar, useI18n as dr } from "@feedmepos/mf-common";
@@ -21,7 +21,7 @@ const v = {
21
21
  miniProgram: "Mini Program",
22
22
  media: "Media"
23
23
  }, $n = "access-denied";
24
- var N;
24
+ var S;
25
25
  (function(e) {
26
26
  function t(n) {
27
27
  }
@@ -55,8 +55,8 @@ var N;
55
55
  return n.map((c) => typeof c == "string" ? `'${c}'` : c).join(a);
56
56
  }
57
57
  e.joinValues = r;
58
- })(N || (N = {}));
59
- const x = N.arrayToEnum([
58
+ })(S || (S = {}));
59
+ const x = S.arrayToEnum([
60
60
  "string",
61
61
  "nan",
62
62
  "number",
@@ -96,7 +96,7 @@ const x = N.arrayToEnum([
96
96
  default:
97
97
  return x.unknown;
98
98
  }
99
- }, C = N.arrayToEnum([
99
+ }, C = S.arrayToEnum([
100
100
  "invalid_type",
101
101
  "invalid_literal",
102
102
  "custom",
@@ -169,7 +169,7 @@ class qe extends Error {
169
169
  }
170
170
  }
171
171
  qe.create = (e) => new qe(e);
172
- const wt = (e, t) => {
172
+ const Bt = (e, t) => {
173
173
  let s;
174
174
  switch (e.code) {
175
175
  case C.invalid_type:
@@ -179,16 +179,16 @@ const wt = (e, t) => {
179
179
  s = `Invalid literal value, expected ${JSON.stringify(e.expected, qs)}`;
180
180
  break;
181
181
  case C.unrecognized_keys:
182
- s = `Unrecognized key(s) in object: ${N.joinValues(e.keys, ", ")}`;
182
+ s = `Unrecognized key(s) in object: ${S.joinValues(e.keys, ", ")}`;
183
183
  break;
184
184
  case C.invalid_union:
185
185
  s = "Invalid input";
186
186
  break;
187
187
  case C.invalid_union_discriminator:
188
- s = `Invalid discriminator value. Expected ${N.joinValues(e.options)}`;
188
+ s = `Invalid discriminator value. Expected ${S.joinValues(e.options)}`;
189
189
  break;
190
190
  case C.invalid_enum_value:
191
- s = `Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;
191
+ s = `Invalid enum value. Expected ${S.joinValues(e.options)}, received '${e.received}'`;
192
192
  break;
193
193
  case C.invalid_arguments:
194
194
  s = "Invalid function arguments";
@@ -200,7 +200,7 @@ const wt = (e, t) => {
200
200
  s = "Invalid date";
201
201
  break;
202
202
  case C.invalid_string:
203
- typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : N.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
203
+ typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : S.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
204
204
  break;
205
205
  case C.too_small:
206
206
  e.type === "array" ? s = `Array must contain ${e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? s = `Number must be greater than ${e.inclusive ? "or equal to " : ""}${e.minimum}` : e.type === "date" ? s = `Date must be greater than ${e.inclusive ? "or equal to " : ""}${new Date(e.minimum)}` : s = "Invalid input";
@@ -218,11 +218,11 @@ const wt = (e, t) => {
218
218
  s = `Number must be a multiple of ${e.multipleOf}`;
219
219
  break;
220
220
  default:
221
- s = t.defaultError, N.assertNever(e);
221
+ s = t.defaultError, S.assertNever(e);
222
222
  }
223
223
  return { message: s };
224
224
  };
225
- let gr = wt;
225
+ let gr = Bt;
226
226
  function ta(e) {
227
227
  gr = e;
228
228
  }
@@ -244,7 +244,7 @@ const Ot = (e) => {
244
244
  message: n.message || l
245
245
  };
246
246
  }, sa = [];
247
- function P(e, t) {
247
+ function Y(e, t) {
248
248
  const s = Ot({
249
249
  issueData: t,
250
250
  data: e.data,
@@ -253,7 +253,7 @@ function P(e, t) {
253
253
  e.common.contextualErrorMap,
254
254
  e.schemaErrorMap,
255
255
  Vt(),
256
- wt
256
+ Bt
257
257
  ].filter((r) => !!r)
258
258
  });
259
259
  e.common.issues.push(s);
@@ -299,12 +299,12 @@ class ae {
299
299
  }
300
300
  const H = Object.freeze({
301
301
  status: "aborted"
302
- }), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }), ws = (e) => e.status === "aborted", Bs = (e) => e.status === "dirty", Ft = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
302
+ }), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }), Bs = (e) => e.status === "aborted", ws = (e) => e.status === "dirty", Ft = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
303
303
  var T;
304
304
  (function(e) {
305
305
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
306
306
  })(T || (T = {}));
307
- class Pe {
307
+ class Ye {
308
308
  constructor(t, s, r, n) {
309
309
  this.parent = t, this.data = s, this._path = r, this._key = n;
310
310
  }
@@ -443,13 +443,13 @@ class X {
443
443
  return this.optional().nullable();
444
444
  }
445
445
  array() {
446
- return Ye.create(this);
446
+ return Pe.create(this);
447
447
  }
448
448
  promise() {
449
449
  return ot.create(this);
450
450
  }
451
451
  or(t) {
452
- return Bt.create([this, t]);
452
+ return wt.create([this, t]);
453
453
  }
454
454
  and(t) {
455
455
  return Mt.create(this, t);
@@ -498,7 +498,7 @@ class ke extends X {
498
498
  _parse(t) {
499
499
  if (this._getType(t) !== x.string) {
500
500
  const a = this._getOrReturnCtx(t);
501
- return P(
501
+ return Y(
502
502
  a,
503
503
  {
504
504
  code: C.invalid_type,
@@ -512,7 +512,7 @@ class ke extends X {
512
512
  let n;
513
513
  for (const a of this._def.checks)
514
514
  if (a.kind === "min")
515
- t.data.length < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
515
+ t.data.length < a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
516
516
  code: C.too_small,
517
517
  minimum: a.value,
518
518
  type: "string",
@@ -520,7 +520,7 @@ class ke extends X {
520
520
  message: a.message
521
521
  }), r.dirty());
522
522
  else if (a.kind === "max")
523
- t.data.length > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
523
+ t.data.length > a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
524
524
  code: C.too_big,
525
525
  maximum: a.value,
526
526
  type: "string",
@@ -528,19 +528,19 @@ class ke extends X {
528
528
  message: a.message
529
529
  }), r.dirty());
530
530
  else if (a.kind === "email")
531
- oa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
531
+ oa.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
532
532
  validation: "email",
533
533
  code: C.invalid_string,
534
534
  message: a.message
535
535
  }), r.dirty());
536
536
  else if (a.kind === "uuid")
537
- aa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
537
+ aa.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
538
538
  validation: "uuid",
539
539
  code: C.invalid_string,
540
540
  message: a.message
541
541
  }), r.dirty());
542
542
  else if (a.kind === "cuid")
543
- na.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
543
+ na.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
544
544
  validation: "cuid",
545
545
  code: C.invalid_string,
546
546
  message: a.message
@@ -549,25 +549,25 @@ class ke extends X {
549
549
  try {
550
550
  new URL(t.data);
551
551
  } catch {
552
- n = this._getOrReturnCtx(t, n), P(n, {
552
+ n = this._getOrReturnCtx(t, n), Y(n, {
553
553
  validation: "url",
554
554
  code: C.invalid_string,
555
555
  message: a.message
556
556
  }), r.dirty();
557
557
  }
558
- else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
558
+ else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
559
559
  validation: "regex",
560
560
  code: C.invalid_string,
561
561
  message: a.message
562
- }), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
562
+ }), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), Y(n, {
563
563
  code: C.invalid_string,
564
564
  validation: { startsWith: a.value },
565
565
  message: a.message
566
- }), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
566
+ }), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), Y(n, {
567
567
  code: C.invalid_string,
568
568
  validation: { endsWith: a.value },
569
569
  message: a.message
570
- }), r.dirty()) : N.assertNever(a);
570
+ }), r.dirty()) : S.assertNever(a);
571
571
  return { status: r.value, value: t.data };
572
572
  }
573
573
  _addCheck(t) {
@@ -667,7 +667,7 @@ class We extends X {
667
667
  _parse(t) {
668
668
  if (this._getType(t) !== x.number) {
669
669
  const a = this._getOrReturnCtx(t);
670
- return P(a, {
670
+ return Y(a, {
671
671
  code: C.invalid_type,
672
672
  expected: x.number,
673
673
  received: a.parsedType
@@ -676,28 +676,28 @@ class We extends X {
676
676
  let r;
677
677
  const n = new ae();
678
678
  for (const a of this._def.checks)
679
- a.kind === "int" ? N.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), P(r, {
679
+ a.kind === "int" ? S.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), Y(r, {
680
680
  code: C.invalid_type,
681
681
  expected: "integer",
682
682
  received: "float",
683
683
  message: a.message
684
- }), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
684
+ }), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), Y(r, {
685
685
  code: C.too_small,
686
686
  minimum: a.value,
687
687
  type: "number",
688
688
  inclusive: a.inclusive,
689
689
  message: a.message
690
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
690
+ }), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), Y(r, {
691
691
  code: C.too_big,
692
692
  maximum: a.value,
693
693
  type: "number",
694
694
  inclusive: a.inclusive,
695
695
  message: a.message
696
- }), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), P(r, {
696
+ }), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), Y(r, {
697
697
  code: C.not_multiple_of,
698
698
  multipleOf: a.value,
699
699
  message: a.message
700
- }), n.dirty()) : N.assertNever(a);
700
+ }), n.dirty()) : S.assertNever(a);
701
701
  return { status: n.value, value: t.data };
702
702
  }
703
703
  gte(t, s) {
@@ -802,7 +802,7 @@ class qt extends X {
802
802
  _parse(t) {
803
803
  if (this._getType(t) !== x.bigint) {
804
804
  const r = this._getOrReturnCtx(t);
805
- return P(r, {
805
+ return Y(r, {
806
806
  code: C.invalid_type,
807
807
  expected: x.bigint,
808
808
  received: r.parsedType
@@ -819,7 +819,7 @@ class It extends X {
819
819
  _parse(t) {
820
820
  if (this._getType(t) !== x.boolean) {
821
821
  const r = this._getOrReturnCtx(t);
822
- return P(r, {
822
+ return Y(r, {
823
823
  code: C.invalid_type,
824
824
  expected: x.boolean,
825
825
  received: r.parsedType
@@ -836,7 +836,7 @@ class nt extends X {
836
836
  _parse(t) {
837
837
  if (this._getType(t) !== x.date) {
838
838
  const a = this._getOrReturnCtx(t);
839
- return P(a, {
839
+ return Y(a, {
840
840
  code: C.invalid_type,
841
841
  expected: x.date,
842
842
  received: a.parsedType
@@ -844,26 +844,26 @@ class nt extends X {
844
844
  }
845
845
  if (isNaN(t.data.getTime())) {
846
846
  const a = this._getOrReturnCtx(t);
847
- return P(a, {
847
+ return Y(a, {
848
848
  code: C.invalid_date
849
849
  }), H;
850
850
  }
851
851
  const r = new ae();
852
852
  let n;
853
853
  for (const a of this._def.checks)
854
- a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
854
+ a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
855
855
  code: C.too_small,
856
856
  message: a.message,
857
857
  inclusive: !0,
858
858
  minimum: a.value,
859
859
  type: "date"
860
- }), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
860
+ }), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
861
861
  code: C.too_big,
862
862
  message: a.message,
863
863
  inclusive: !0,
864
864
  maximum: a.value,
865
865
  type: "date"
866
- }), r.dirty()) : N.assertNever(a);
866
+ }), r.dirty()) : S.assertNever(a);
867
867
  return {
868
868
  status: r.value,
869
869
  value: new Date(t.data.getTime())
@@ -911,7 +911,7 @@ class Ht extends X {
911
911
  _parse(t) {
912
912
  if (this._getType(t) !== x.undefined) {
913
913
  const r = this._getOrReturnCtx(t);
914
- return P(r, {
914
+ return Y(r, {
915
915
  code: C.invalid_type,
916
916
  expected: x.undefined,
917
917
  received: r.parsedType
@@ -928,7 +928,7 @@ class Rt extends X {
928
928
  _parse(t) {
929
929
  if (this._getType(t) !== x.null) {
930
930
  const r = this._getOrReturnCtx(t);
931
- return P(r, {
931
+ return Y(r, {
932
932
  code: C.invalid_type,
933
933
  expected: x.null,
934
934
  received: r.parsedType
@@ -968,7 +968,7 @@ Xe.create = (e) => new Xe({
968
968
  class Te extends X {
969
969
  _parse(t) {
970
970
  const s = this._getOrReturnCtx(t);
971
- return P(s, {
971
+ return Y(s, {
972
972
  code: C.invalid_type,
973
973
  expected: x.never,
974
974
  received: s.parsedType
@@ -983,7 +983,7 @@ class Xt extends X {
983
983
  _parse(t) {
984
984
  if (this._getType(t) !== x.undefined) {
985
985
  const r = this._getOrReturnCtx(t);
986
- return P(r, {
986
+ return Y(r, {
987
987
  code: C.invalid_type,
988
988
  expected: x.void,
989
989
  received: r.parsedType
@@ -996,43 +996,43 @@ Xt.create = (e) => new Xt({
996
996
  typeName: I.ZodVoid,
997
997
  ...Q(e)
998
998
  });
999
- class Ye extends X {
999
+ class Pe extends X {
1000
1000
  _parse(t) {
1001
1001
  const { ctx: s, status: r } = this._processInputParams(t), n = this._def;
1002
1002
  if (s.parsedType !== x.array)
1003
- return P(s, {
1003
+ return Y(s, {
1004
1004
  code: C.invalid_type,
1005
1005
  expected: x.array,
1006
1006
  received: s.parsedType
1007
1007
  }), H;
1008
- if (n.minLength !== null && s.data.length < n.minLength.value && (P(s, {
1008
+ if (n.minLength !== null && s.data.length < n.minLength.value && (Y(s, {
1009
1009
  code: C.too_small,
1010
1010
  minimum: n.minLength.value,
1011
1011
  type: "array",
1012
1012
  inclusive: !0,
1013
1013
  message: n.minLength.message
1014
- }), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (P(s, {
1014
+ }), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (Y(s, {
1015
1015
  code: C.too_big,
1016
1016
  maximum: n.maxLength.value,
1017
1017
  type: "array",
1018
1018
  inclusive: !0,
1019
1019
  message: n.maxLength.message
1020
1020
  }), r.dirty()), s.common.async)
1021
- return Promise.all(s.data.map((c, l) => n.type._parseAsync(new Pe(s, c, s.path, l)))).then((c) => ae.mergeArray(r, c));
1022
- const a = s.data.map((c, l) => n.type._parseSync(new Pe(s, c, s.path, l)));
1021
+ return Promise.all(s.data.map((c, l) => n.type._parseAsync(new Ye(s, c, s.path, l)))).then((c) => ae.mergeArray(r, c));
1022
+ const a = s.data.map((c, l) => n.type._parseSync(new Ye(s, c, s.path, l)));
1023
1023
  return ae.mergeArray(r, a);
1024
1024
  }
1025
1025
  get element() {
1026
1026
  return this._def.type;
1027
1027
  }
1028
1028
  min(t, s) {
1029
- return new Ye({
1029
+ return new Pe({
1030
1030
  ...this._def,
1031
1031
  minLength: { value: t, message: T.toString(s) }
1032
1032
  });
1033
1033
  }
1034
1034
  max(t, s) {
1035
- return new Ye({
1035
+ return new Pe({
1036
1036
  ...this._def,
1037
1037
  maxLength: { value: t, message: T.toString(s) }
1038
1038
  });
@@ -1044,7 +1044,7 @@ class Ye extends X {
1044
1044
  return this.min(1, t);
1045
1045
  }
1046
1046
  }
1047
- Ye.create = (e, t) => new Ye({
1047
+ Pe.create = (e, t) => new Pe({
1048
1048
  type: e,
1049
1049
  minLength: null,
1050
1050
  maxLength: null,
@@ -1076,7 +1076,7 @@ function rt(e) {
1076
1076
  ...e._def,
1077
1077
  shape: () => t
1078
1078
  });
1079
- } else return e instanceof Ye ? Ye.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Je ? Je.create(rt(e.unwrap())) : e instanceof Ge ? Ge.create(e.items.map((t) => rt(t))) : e;
1079
+ } else return e instanceof Pe ? Pe.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Je ? Je.create(rt(e.unwrap())) : e instanceof Ge ? Ge.create(e.items.map((t) => rt(t))) : e;
1080
1080
  }
1081
1081
  class J extends X {
1082
1082
  constructor() {
@@ -1085,13 +1085,13 @@ class J extends X {
1085
1085
  _getCached() {
1086
1086
  if (this._cached !== null)
1087
1087
  return this._cached;
1088
- const t = this._def.shape(), s = N.objectKeys(t);
1088
+ const t = this._def.shape(), s = S.objectKeys(t);
1089
1089
  return this._cached = { shape: t, keys: s };
1090
1090
  }
1091
1091
  _parse(t) {
1092
1092
  if (this._getType(t) !== x.object) {
1093
1093
  const h = this._getOrReturnCtx(t);
1094
- return P(h, {
1094
+ return Y(h, {
1095
1095
  code: C.invalid_type,
1096
1096
  expected: x.object,
1097
1097
  received: h.parsedType
@@ -1102,49 +1102,49 @@ class J extends X {
1102
1102
  c.includes(h) || l.push(h);
1103
1103
  const y = [];
1104
1104
  for (const h of c) {
1105
- const w = a[h], O = n.data[h];
1105
+ const B = a[h], O = n.data[h];
1106
1106
  y.push({
1107
1107
  key: { status: "valid", value: h },
1108
- value: w._parse(new Pe(n, O, n.path, h)),
1108
+ value: B._parse(new Ye(n, O, n.path, h)),
1109
1109
  alwaysSet: h in n.data
1110
1110
  });
1111
1111
  }
1112
1112
  if (this._def.catchall instanceof Te) {
1113
1113
  const h = this._def.unknownKeys;
1114
1114
  if (h === "passthrough")
1115
- for (const w of l)
1115
+ for (const B of l)
1116
1116
  y.push({
1117
- key: { status: "valid", value: w },
1118
- value: { status: "valid", value: n.data[w] }
1117
+ key: { status: "valid", value: B },
1118
+ value: { status: "valid", value: n.data[B] }
1119
1119
  });
1120
1120
  else if (h === "strict")
1121
- l.length > 0 && (P(n, {
1121
+ l.length > 0 && (Y(n, {
1122
1122
  code: C.unrecognized_keys,
1123
1123
  keys: l
1124
1124
  }), r.dirty());
1125
1125
  else if (h !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1126
1126
  } else {
1127
1127
  const h = this._def.catchall;
1128
- for (const w of l) {
1129
- const O = n.data[w];
1128
+ for (const B of l) {
1129
+ const O = n.data[B];
1130
1130
  y.push({
1131
- key: { status: "valid", value: w },
1131
+ key: { status: "valid", value: B },
1132
1132
  value: h._parse(
1133
- new Pe(n, O, n.path, w)
1133
+ new Ye(n, O, n.path, B)
1134
1134
  //, ctx.child(key), value, getParsedType(value)
1135
1135
  ),
1136
- alwaysSet: w in n.data
1136
+ alwaysSet: B in n.data
1137
1137
  });
1138
1138
  }
1139
1139
  }
1140
1140
  return n.common.async ? Promise.resolve().then(async () => {
1141
1141
  const h = [];
1142
- for (const w of y) {
1143
- const O = await w.key;
1142
+ for (const B of y) {
1143
+ const O = await B.key;
1144
1144
  h.push({
1145
1145
  key: O,
1146
- value: await w.value,
1147
- alwaysSet: w.alwaysSet
1146
+ value: await B.value,
1147
+ alwaysSet: B.alwaysSet
1148
1148
  });
1149
1149
  }
1150
1150
  return h;
@@ -1206,7 +1206,7 @@ class J extends X {
1206
1206
  }
1207
1207
  pick(t) {
1208
1208
  const s = {};
1209
- return N.objectKeys(t).map((r) => {
1209
+ return S.objectKeys(t).map((r) => {
1210
1210
  this.shape[r] && (s[r] = this.shape[r]);
1211
1211
  }), new J({
1212
1212
  ...this._def,
@@ -1215,8 +1215,8 @@ class J extends X {
1215
1215
  }
1216
1216
  omit(t) {
1217
1217
  const s = {};
1218
- return N.objectKeys(this.shape).map((r) => {
1219
- N.objectKeys(t).indexOf(r) === -1 && (s[r] = this.shape[r]);
1218
+ return S.objectKeys(this.shape).map((r) => {
1219
+ S.objectKeys(t).indexOf(r) === -1 && (s[r] = this.shape[r]);
1220
1220
  }), new J({
1221
1221
  ...this._def,
1222
1222
  shape: () => s
@@ -1228,8 +1228,8 @@ class J extends X {
1228
1228
  partial(t) {
1229
1229
  const s = {};
1230
1230
  if (t)
1231
- return N.objectKeys(this.shape).map((r) => {
1232
- N.objectKeys(t).indexOf(r) === -1 ? s[r] = this.shape[r] : s[r] = this.shape[r].optional();
1231
+ return S.objectKeys(this.shape).map((r) => {
1232
+ S.objectKeys(t).indexOf(r) === -1 ? s[r] = this.shape[r] : s[r] = this.shape[r].optional();
1233
1233
  }), new J({
1234
1234
  ...this._def,
1235
1235
  shape: () => s
@@ -1257,7 +1257,7 @@ class J extends X {
1257
1257
  });
1258
1258
  }
1259
1259
  keyof() {
1260
- return pr(N.objectKeys(this.shape));
1260
+ return pr(S.objectKeys(this.shape));
1261
1261
  }
1262
1262
  }
1263
1263
  J.create = (e, t) => new J({
@@ -1281,7 +1281,7 @@ J.lazycreate = (e, t) => new J({
1281
1281
  typeName: I.ZodObject,
1282
1282
  ...Q(t)
1283
1283
  });
1284
- class Bt extends X {
1284
+ class wt extends X {
1285
1285
  _parse(t) {
1286
1286
  const { ctx: s } = this._processInputParams(t), r = this._def.options;
1287
1287
  function n(a) {
@@ -1292,7 +1292,7 @@ class Bt extends X {
1292
1292
  if (l.result.status === "dirty")
1293
1293
  return s.common.issues.push(...l.ctx.common.issues), l.result;
1294
1294
  const c = a.map((l) => new qe(l.ctx.common.issues));
1295
- return P(s, {
1295
+ return Y(s, {
1296
1296
  code: C.invalid_union,
1297
1297
  unionErrors: c
1298
1298
  }), H;
@@ -1327,19 +1327,19 @@ class Bt extends X {
1327
1327
  issues: []
1328
1328
  },
1329
1329
  parent: null
1330
- }, w = y._parseSync({
1330
+ }, B = y._parseSync({
1331
1331
  data: s.data,
1332
1332
  path: s.path,
1333
1333
  parent: h
1334
1334
  });
1335
- if (w.status === "valid")
1336
- return w;
1337
- w.status === "dirty" && !a && (a = { result: w, ctx: h }), h.common.issues.length && c.push(h.common.issues);
1335
+ if (B.status === "valid")
1336
+ return B;
1337
+ B.status === "dirty" && !a && (a = { result: B, ctx: h }), h.common.issues.length && c.push(h.common.issues);
1338
1338
  }
1339
1339
  if (a)
1340
1340
  return s.common.issues.push(...a.ctx.common.issues), a.result;
1341
1341
  const l = c.map((y) => new qe(y));
1342
- return P(s, {
1342
+ return Y(s, {
1343
1343
  code: C.invalid_union,
1344
1344
  unionErrors: l
1345
1345
  }), H;
@@ -1349,7 +1349,7 @@ class Bt extends X {
1349
1349
  return this._def.options;
1350
1350
  }
1351
1351
  }
1352
- Bt.create = (e, t) => new Bt({
1352
+ wt.create = (e, t) => new wt({
1353
1353
  options: e,
1354
1354
  typeName: I.ZodUnion,
1355
1355
  ...Q(t)
@@ -1358,7 +1358,7 @@ class Wt extends X {
1358
1358
  _parse(t) {
1359
1359
  const { ctx: s } = this._processInputParams(t);
1360
1360
  if (s.parsedType !== x.object)
1361
- return P(s, {
1361
+ return Y(s, {
1362
1362
  code: C.invalid_type,
1363
1363
  expected: x.object,
1364
1364
  received: s.parsedType
@@ -1372,7 +1372,7 @@ class Wt extends X {
1372
1372
  data: s.data,
1373
1373
  path: s.path,
1374
1374
  parent: s
1375
- }) : (P(s, {
1375
+ }) : (Y(s, {
1376
1376
  code: C.invalid_union_discriminator,
1377
1377
  options: this.validDiscriminatorValues,
1378
1378
  path: [r]
@@ -1420,7 +1420,7 @@ function Cs(e, t) {
1420
1420
  if (e === t)
1421
1421
  return { valid: !0, data: e };
1422
1422
  if (s === x.object && r === x.object) {
1423
- const n = N.objectKeys(t), a = N.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
1423
+ const n = S.objectKeys(t), a = S.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
1424
1424
  for (const l of a) {
1425
1425
  const y = Cs(e[l], t[l]);
1426
1426
  if (!y.valid)
@@ -1444,10 +1444,10 @@ function Cs(e, t) {
1444
1444
  class Mt extends X {
1445
1445
  _parse(t) {
1446
1446
  const { status: s, ctx: r } = this._processInputParams(t), n = (a, c) => {
1447
- if (ws(a) || ws(c))
1447
+ if (Bs(a) || Bs(c))
1448
1448
  return H;
1449
1449
  const l = Cs(a.value, c.value);
1450
- return l.valid ? ((Bs(a) || Bs(c)) && s.dirty(), { status: s.value, value: l.data }) : (P(r, {
1450
+ return l.valid ? ((ws(a) || ws(c)) && s.dirty(), { status: s.value, value: l.data }) : (Y(r, {
1451
1451
  code: C.invalid_intersection_types
1452
1452
  }), H);
1453
1453
  };
@@ -1483,19 +1483,19 @@ class Ge extends X {
1483
1483
  _parse(t) {
1484
1484
  const { status: s, ctx: r } = this._processInputParams(t);
1485
1485
  if (r.parsedType !== x.array)
1486
- return P(r, {
1486
+ return Y(r, {
1487
1487
  code: C.invalid_type,
1488
1488
  expected: x.array,
1489
1489
  received: r.parsedType
1490
1490
  }), H;
1491
1491
  if (r.data.length < this._def.items.length)
1492
- return P(r, {
1492
+ return Y(r, {
1493
1493
  code: C.too_small,
1494
1494
  minimum: this._def.items.length,
1495
1495
  inclusive: !0,
1496
1496
  type: "array"
1497
1497
  }), H;
1498
- !this._def.rest && r.data.length > this._def.items.length && (P(r, {
1498
+ !this._def.rest && r.data.length > this._def.items.length && (Y(r, {
1499
1499
  code: C.too_big,
1500
1500
  maximum: this._def.items.length,
1501
1501
  inclusive: !0,
@@ -1503,7 +1503,7 @@ class Ge extends X {
1503
1503
  }), s.dirty());
1504
1504
  const a = r.data.map((c, l) => {
1505
1505
  const y = this._def.items[l] || this._def.rest;
1506
- return y ? y._parse(new Pe(r, c, r.path, l)) : null;
1506
+ return y ? y._parse(new Ye(r, c, r.path, l)) : null;
1507
1507
  }).filter((c) => !!c);
1508
1508
  return r.common.async ? Promise.all(a).then((c) => ae.mergeArray(s, c)) : ae.mergeArray(s, a);
1509
1509
  }
@@ -1533,7 +1533,7 @@ class Ct extends X {
1533
1533
  _parse(t) {
1534
1534
  const { status: s, ctx: r } = this._processInputParams(t);
1535
1535
  if (r.parsedType !== x.object)
1536
- return P(r, {
1536
+ return Y(r, {
1537
1537
  code: C.invalid_type,
1538
1538
  expected: x.object,
1539
1539
  received: r.parsedType
@@ -1541,8 +1541,8 @@ class Ct extends X {
1541
1541
  const n = [], a = this._def.keyType, c = this._def.valueType;
1542
1542
  for (const l in r.data)
1543
1543
  n.push({
1544
- key: a._parse(new Pe(r, l, r.path, l)),
1545
- value: c._parse(new Pe(r, r.data[l], r.path, l))
1544
+ key: a._parse(new Ye(r, l, r.path, l)),
1545
+ value: c._parse(new Ye(r, r.data[l], r.path, l))
1546
1546
  });
1547
1547
  return r.common.async ? ae.mergeObjectAsync(s, n) : ae.mergeObjectSync(s, n);
1548
1548
  }
@@ -1567,33 +1567,33 @@ class kt extends X {
1567
1567
  _parse(t) {
1568
1568
  const { status: s, ctx: r } = this._processInputParams(t);
1569
1569
  if (r.parsedType !== x.map)
1570
- return P(r, {
1570
+ return Y(r, {
1571
1571
  code: C.invalid_type,
1572
1572
  expected: x.map,
1573
1573
  received: r.parsedType
1574
1574
  }), H;
1575
1575
  const n = this._def.keyType, a = this._def.valueType, c = [...r.data.entries()].map(([l, y], h) => ({
1576
- key: n._parse(new Pe(r, l, r.path, [h, "key"])),
1577
- value: a._parse(new Pe(r, y, r.path, [h, "value"]))
1576
+ key: n._parse(new Ye(r, l, r.path, [h, "key"])),
1577
+ value: a._parse(new Ye(r, y, r.path, [h, "value"]))
1578
1578
  }));
1579
1579
  if (r.common.async) {
1580
1580
  const l = /* @__PURE__ */ new Map();
1581
1581
  return Promise.resolve().then(async () => {
1582
1582
  for (const y of c) {
1583
- const h = await y.key, w = await y.value;
1584
- if (h.status === "aborted" || w.status === "aborted")
1583
+ const h = await y.key, B = await y.value;
1584
+ if (h.status === "aborted" || B.status === "aborted")
1585
1585
  return H;
1586
- (h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
1586
+ (h.status === "dirty" || B.status === "dirty") && s.dirty(), l.set(h.value, B.value);
1587
1587
  }
1588
1588
  return { status: s.value, value: l };
1589
1589
  });
1590
1590
  } else {
1591
1591
  const l = /* @__PURE__ */ new Map();
1592
1592
  for (const y of c) {
1593
- const h = y.key, w = y.value;
1594
- if (h.status === "aborted" || w.status === "aborted")
1593
+ const h = y.key, B = y.value;
1594
+ if (h.status === "aborted" || B.status === "aborted")
1595
1595
  return H;
1596
- (h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
1596
+ (h.status === "dirty" || B.status === "dirty") && s.dirty(), l.set(h.value, B.value);
1597
1597
  }
1598
1598
  return { status: s.value, value: l };
1599
1599
  }
@@ -1609,19 +1609,19 @@ class Le extends X {
1609
1609
  _parse(t) {
1610
1610
  const { status: s, ctx: r } = this._processInputParams(t);
1611
1611
  if (r.parsedType !== x.set)
1612
- return P(r, {
1612
+ return Y(r, {
1613
1613
  code: C.invalid_type,
1614
1614
  expected: x.set,
1615
1615
  received: r.parsedType
1616
1616
  }), H;
1617
1617
  const n = this._def;
1618
- n.minSize !== null && r.data.size < n.minSize.value && (P(r, {
1618
+ n.minSize !== null && r.data.size < n.minSize.value && (Y(r, {
1619
1619
  code: C.too_small,
1620
1620
  minimum: n.minSize.value,
1621
1621
  type: "set",
1622
1622
  inclusive: !0,
1623
1623
  message: n.minSize.message
1624
- }), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (P(r, {
1624
+ }), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (Y(r, {
1625
1625
  code: C.too_big,
1626
1626
  maximum: n.maxSize.value,
1627
1627
  type: "set",
@@ -1631,14 +1631,14 @@ class Le extends X {
1631
1631
  const a = this._def.valueType;
1632
1632
  function c(y) {
1633
1633
  const h = /* @__PURE__ */ new Set();
1634
- for (const w of y) {
1635
- if (w.status === "aborted")
1634
+ for (const B of y) {
1635
+ if (B.status === "aborted")
1636
1636
  return H;
1637
- w.status === "dirty" && s.dirty(), h.add(w.value);
1637
+ B.status === "dirty" && s.dirty(), h.add(B.value);
1638
1638
  }
1639
1639
  return { status: s.value, value: h };
1640
1640
  }
1641
- const l = [...r.data.values()].map((y, h) => a._parse(new Pe(r, y, r.path, h)));
1641
+ const l = [...r.data.values()].map((y, h) => a._parse(new Ye(r, y, r.path, h)));
1642
1642
  return r.common.async ? Promise.all(l).then((y) => c(y)) : c(l);
1643
1643
  }
1644
1644
  min(t, s) {
@@ -1674,7 +1674,7 @@ class Ke extends X {
1674
1674
  _parse(t) {
1675
1675
  const { ctx: s } = this._processInputParams(t);
1676
1676
  if (s.parsedType !== x.function)
1677
- return P(s, {
1677
+ return Y(s, {
1678
1678
  code: C.invalid_type,
1679
1679
  expected: x.function,
1680
1680
  received: s.parsedType
@@ -1687,7 +1687,7 @@ class Ke extends X {
1687
1687
  s.common.contextualErrorMap,
1688
1688
  s.schemaErrorMap,
1689
1689
  Vt(),
1690
- wt
1690
+ Bt
1691
1691
  ].filter((h) => !!h),
1692
1692
  issueData: {
1693
1693
  code: C.invalid_arguments,
@@ -1703,7 +1703,7 @@ class Ke extends X {
1703
1703
  s.common.contextualErrorMap,
1704
1704
  s.schemaErrorMap,
1705
1705
  Vt(),
1706
- wt
1706
+ Bt
1707
1707
  ].filter((h) => !!h),
1708
1708
  issueData: {
1709
1709
  code: C.invalid_return_type,
@@ -1713,20 +1713,20 @@ class Ke extends X {
1713
1713
  }
1714
1714
  const a = { errorMap: s.common.contextualErrorMap }, c = s.data;
1715
1715
  return this._def.returns instanceof ot ? oe(async (...l) => {
1716
- const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((S) => {
1717
- throw y.addIssue(r(l, S)), y;
1718
- }), w = await c(...h);
1719
- return await this._def.returns._def.type.parseAsync(w, a).catch((S) => {
1720
- throw y.addIssue(n(w, S)), y;
1716
+ const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((N) => {
1717
+ throw y.addIssue(r(l, N)), y;
1718
+ }), B = await c(...h);
1719
+ return await this._def.returns._def.type.parseAsync(B, a).catch((N) => {
1720
+ throw y.addIssue(n(B, N)), y;
1721
1721
  });
1722
1722
  }) : oe((...l) => {
1723
1723
  const y = this._def.args.safeParse(l, a);
1724
1724
  if (!y.success)
1725
1725
  throw new qe([r(l, y.error)]);
1726
- const h = c(...y.data), w = this._def.returns.safeParse(h, a);
1727
- if (!w.success)
1728
- throw new qe([n(h, w.error)]);
1729
- return w.data;
1726
+ const h = c(...y.data), B = this._def.returns.safeParse(h, a);
1727
+ if (!B.success)
1728
+ throw new qe([n(h, B.error)]);
1729
+ return B.data;
1730
1730
  });
1731
1731
  }
1732
1732
  parameters() {
@@ -1774,11 +1774,11 @@ Tt.create = (e, t) => new Tt({
1774
1774
  typeName: I.ZodLazy,
1775
1775
  ...Q(t)
1776
1776
  });
1777
- class St extends X {
1777
+ class Nt extends X {
1778
1778
  _parse(t) {
1779
1779
  if (t.data !== this._def.value) {
1780
1780
  const s = this._getOrReturnCtx(t);
1781
- return P(s, {
1781
+ return Y(s, {
1782
1782
  code: C.invalid_literal,
1783
1783
  expected: this._def.value
1784
1784
  }), H;
@@ -1789,7 +1789,7 @@ class St extends X {
1789
1789
  return this._def.value;
1790
1790
  }
1791
1791
  }
1792
- St.create = (e, t) => new St({
1792
+ Nt.create = (e, t) => new Nt({
1793
1793
  value: e,
1794
1794
  typeName: I.ZodLiteral,
1795
1795
  ...Q(t)
@@ -1805,15 +1805,15 @@ class Lt extends X {
1805
1805
  _parse(t) {
1806
1806
  if (typeof t.data != "string") {
1807
1807
  const s = this._getOrReturnCtx(t), r = this._def.values;
1808
- return P(s, {
1809
- expected: N.joinValues(r),
1808
+ return Y(s, {
1809
+ expected: S.joinValues(r),
1810
1810
  received: s.parsedType,
1811
1811
  code: C.invalid_type
1812
1812
  }), H;
1813
1813
  }
1814
1814
  if (this._def.values.indexOf(t.data) === -1) {
1815
1815
  const s = this._getOrReturnCtx(t), r = this._def.values;
1816
- return P(s, {
1816
+ return Y(s, {
1817
1817
  received: s.data,
1818
1818
  code: C.invalid_enum_value,
1819
1819
  options: r
@@ -1844,20 +1844,20 @@ class Lt extends X {
1844
1844
  }
1845
1845
  }
1846
1846
  Lt.create = pr;
1847
- class Nt extends X {
1847
+ class St extends X {
1848
1848
  _parse(t) {
1849
- const s = N.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
1849
+ const s = S.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
1850
1850
  if (r.parsedType !== x.string && r.parsedType !== x.number) {
1851
- const n = N.objectValues(s);
1852
- return P(r, {
1853
- expected: N.joinValues(n),
1851
+ const n = S.objectValues(s);
1852
+ return Y(r, {
1853
+ expected: S.joinValues(n),
1854
1854
  received: r.parsedType,
1855
1855
  code: C.invalid_type
1856
1856
  }), H;
1857
1857
  }
1858
1858
  if (s.indexOf(t.data) === -1) {
1859
- const n = N.objectValues(s);
1860
- return P(r, {
1859
+ const n = S.objectValues(s);
1860
+ return Y(r, {
1861
1861
  received: r.data,
1862
1862
  code: C.invalid_enum_value,
1863
1863
  options: n
@@ -1869,7 +1869,7 @@ class Nt extends X {
1869
1869
  return this._def.values;
1870
1870
  }
1871
1871
  }
1872
- Nt.create = (e, t) => new Nt({
1872
+ St.create = (e, t) => new St({
1873
1873
  values: e,
1874
1874
  typeName: I.ZodNativeEnum,
1875
1875
  ...Q(t)
@@ -1878,7 +1878,7 @@ class ot extends X {
1878
1878
  _parse(t) {
1879
1879
  const { ctx: s } = this._processInputParams(t);
1880
1880
  if (s.parsedType !== x.promise && s.common.async === !1)
1881
- return P(s, {
1881
+ return Y(s, {
1882
1882
  code: C.invalid_type,
1883
1883
  expected: x.promise,
1884
1884
  received: s.parsedType
@@ -1915,7 +1915,7 @@ class Ve extends X {
1915
1915
  }
1916
1916
  const a = {
1917
1917
  addIssue: (c) => {
1918
- P(r, c), c.fatal ? s.abort() : s.dirty();
1918
+ Y(r, c), c.fatal ? s.abort() : s.dirty();
1919
1919
  },
1920
1920
  get path() {
1921
1921
  return r.path;
@@ -1955,7 +1955,7 @@ class Ve extends X {
1955
1955
  return { status: s.value, value: l };
1956
1956
  } else
1957
1957
  return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((c) => Ft(c) ? Promise.resolve(n.transform(c.value, a)).then((l) => ({ status: s.value, value: l })) : c);
1958
- N.assertNever(n);
1958
+ S.assertNever(n);
1959
1959
  }
1960
1960
  }
1961
1961
  Ve.create = (e, t, s) => new Ve({
@@ -2019,7 +2019,7 @@ class Zt extends X {
2019
2019
  _parse(t) {
2020
2020
  if (this._getType(t) !== x.nan) {
2021
2021
  const r = this._getOrReturnCtx(t);
2022
- return P(r, {
2022
+ return Y(r, {
2023
2023
  code: C.invalid_type,
2024
2024
  expected: x.nan,
2025
2025
  received: r.parsedType
@@ -2046,20 +2046,20 @@ var I;
2046
2046
  })(I || (I = {}));
2047
2047
  const la = (e, t = {
2048
2048
  message: `Input not instance of ${e.name}`
2049
- }) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = We.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Ye.create, va = J.create, wa = J.strictCreate, Ba = Bt.create, Ma = Wt.create, Ca = Mt.create, Da = Ge.create, xa = Ct.create, ja = kt.create, Ea = Le.create, Pa = Ke.create, Ya = Tt.create, Ga = St.create, Va = Lt.create, Oa = Nt.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Je.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
2049
+ }) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = We.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Pe.create, va = J.create, Ba = J.strictCreate, wa = wt.create, Ma = Wt.create, Ca = Mt.create, Da = Ge.create, xa = Ct.create, ja = kt.create, Ea = Le.create, Ya = Ke.create, Pa = Tt.create, Ga = Nt.create, Va = Lt.create, Oa = St.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Je.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
2050
2050
  var ft = /* @__PURE__ */ Object.freeze({
2051
2051
  __proto__: null,
2052
2052
  getParsedType: Re,
2053
2053
  ZodParsedType: x,
2054
2054
  makeIssue: Ot,
2055
2055
  EMPTY_PATH: sa,
2056
- addIssueToContext: P,
2056
+ addIssueToContext: Y,
2057
2057
  ParseStatus: ae,
2058
2058
  INVALID: H,
2059
2059
  DIRTY: ra,
2060
2060
  OK: oe,
2061
- isAborted: ws,
2062
- isDirty: Bs,
2061
+ isAborted: Bs,
2062
+ isDirty: ws,
2063
2063
  isValid: Ft,
2064
2064
  isAsync: Ms,
2065
2065
  jsonStringifyReplacer: qs,
@@ -2075,12 +2075,12 @@ var ft = /* @__PURE__ */ Object.freeze({
2075
2075
  ZodUnknown: Xe,
2076
2076
  ZodNever: Te,
2077
2077
  ZodVoid: Xt,
2078
- ZodArray: Ye,
2078
+ ZodArray: Pe,
2079
2079
  get objectUtil() {
2080
2080
  return Qt;
2081
2081
  },
2082
2082
  ZodObject: J,
2083
- ZodUnion: Bt,
2083
+ ZodUnion: wt,
2084
2084
  ZodDiscriminatedUnion: Wt,
2085
2085
  ZodIntersection: Mt,
2086
2086
  ZodTuple: Ge,
@@ -2089,9 +2089,9 @@ var ft = /* @__PURE__ */ Object.freeze({
2089
2089
  ZodSet: Le,
2090
2090
  ZodFunction: Ke,
2091
2091
  ZodLazy: Tt,
2092
- ZodLiteral: St,
2092
+ ZodLiteral: Nt,
2093
2093
  ZodEnum: Lt,
2094
- ZodNativeEnum: Nt,
2094
+ ZodNativeEnum: St,
2095
2095
  ZodPromise: ot,
2096
2096
  ZodEffects: Ve,
2097
2097
  ZodTransformer: Ve,
@@ -2114,10 +2114,10 @@ var ft = /* @__PURE__ */ Object.freeze({
2114
2114
  discriminatedUnion: Ma,
2115
2115
  effect: Js,
2116
2116
  enum: Va,
2117
- function: Pa,
2117
+ function: Ya,
2118
2118
  instanceof: la,
2119
2119
  intersection: Ca,
2120
- lazy: Ya,
2120
+ lazy: Pa,
2121
2121
  literal: Ga,
2122
2122
  map: ja,
2123
2123
  nan: ua,
@@ -2135,18 +2135,18 @@ var ft = /* @__PURE__ */ Object.freeze({
2135
2135
  promise: Fa,
2136
2136
  record: xa,
2137
2137
  set: Ea,
2138
- strictObject: wa,
2138
+ strictObject: Ba,
2139
2139
  string: hr,
2140
2140
  transformer: Js,
2141
2141
  tuple: Da,
2142
2142
  undefined: ma,
2143
- union: Ba,
2143
+ union: wa,
2144
2144
  unknown: fa,
2145
2145
  void: ya,
2146
2146
  ZodIssueCode: C,
2147
2147
  quotelessJson: ea,
2148
2148
  ZodError: qe,
2149
- defaultErrorMap: wt,
2149
+ defaultErrorMap: Bt,
2150
2150
  setErrorMap: ta,
2151
2151
  getErrorMap: Vt
2152
2152
  });
@@ -2201,7 +2201,7 @@ function Ds(e, t) {
2201
2201
  }
2202
2202
  function xs(e, t, s, r) {
2203
2203
  if (Hs(e))
2204
- return Sa(e.$form, t, s) ? (r[e.$form] = t, !0) : !1;
2204
+ return Na(e.$form, t, s) ? (r[e.$form] = t, !0) : !1;
2205
2205
  if (Array.isArray(e) || Array.isArray(t))
2206
2206
  return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, a) => xs(n, t[a], s, r));
2207
2207
  if (typeof e == "object" && e !== null) {
@@ -2218,11 +2218,11 @@ function xs(e, t, s, r) {
2218
2218
  }
2219
2219
  return e === t;
2220
2220
  }
2221
- function Sa(e, t, s) {
2221
+ function Na(e, t, s) {
2222
2222
  const r = s.fields.find((n) => n.key === e);
2223
2223
  return (r == null ? void 0 : r.kind) === "number" ? typeof t == "number" : (r == null ? void 0 : r.kind) === "switch" ? typeof t == "boolean" : typeof t == "number" || typeof t == "string" || typeof t == "boolean";
2224
2224
  }
2225
- function Na(e) {
2225
+ function Sa(e) {
2226
2226
  return "fields" in e;
2227
2227
  }
2228
2228
  function Za(e, t) {
@@ -2231,17 +2231,17 @@ function Za(e, t) {
2231
2231
  const r = t[s.field];
2232
2232
  return "eq" in s ? r === s.eq : s.in ? s.in.includes(r) : !0;
2233
2233
  }
2234
- function Ua(e, t) {
2234
+ function za(e, t) {
2235
2235
  return e.fields.filter((s) => Za(s, t));
2236
2236
  }
2237
2237
  function El(e, t) {
2238
2238
  const s = { ...t };
2239
- for (const r of Ua(e, s))
2239
+ for (const r of za(e, s))
2240
2240
  (s[r.key] === void 0 || s[r.key] === null) && r.default !== void 0 && (s[r.key] = r.default);
2241
2241
  return s;
2242
2242
  }
2243
- function za(e) {
2244
- if (Na(e.form)) {
2243
+ function Ua(e) {
2244
+ if (Sa(e.form)) {
2245
2245
  const s = new Set(e.form.fields.map((r) => r.key));
2246
2246
  for (const r of e.form.fields)
2247
2247
  if (r.visibleWhen && !s.has(r.visibleWhen.field))
@@ -2267,7 +2267,7 @@ function Wa(e) {
2267
2267
  const t = e == null ? void 0 : e.shape;
2268
2268
  return t ? Object.keys(t) : void 0;
2269
2269
  }
2270
- const wr = /* @__PURE__ */ new Map(), Yt = [], La = /* @__PURE__ */ new Map(), _s = "prefix:";
2270
+ const Br = /* @__PURE__ */ new Map(), Pt = [], La = /* @__PURE__ */ new Map(), _s = "prefix:";
2271
2271
  function Ka(e) {
2272
2272
  for (const [t, s] of Object.entries(e))
2273
2273
  Ja([t], s);
@@ -2278,10 +2278,10 @@ function Ja(e, t) {
2278
2278
  for (const r of s) La.set(r.builderKey, r);
2279
2279
  for (const r of e)
2280
2280
  if (r.startsWith(_s)) {
2281
- const n = r.slice(_s.length), a = Yt.findIndex((c) => c.prefix === n);
2282
- a >= 0 ? Yt[a] = { prefix: n, builders: s } : Yt.push({ prefix: n, builders: s });
2281
+ const n = r.slice(_s.length), a = Pt.findIndex((c) => c.prefix === n);
2282
+ a >= 0 ? Pt[a] = { prefix: n, builders: s } : Pt.push({ prefix: n, builders: s });
2283
2283
  } else
2284
- wr.set(r, s);
2284
+ Br.set(r, s);
2285
2285
  }
2286
2286
  function _a(e, t) {
2287
2287
  const s = /* @__PURE__ */ new Map();
@@ -2300,10 +2300,10 @@ function _a(e, t) {
2300
2300
  }
2301
2301
  }
2302
2302
  function $a(e) {
2303
- const t = wr.get(e);
2303
+ const t = Br.get(e);
2304
2304
  if (t) return t;
2305
2305
  let s;
2306
- for (const r of Yt)
2306
+ for (const r of Pt)
2307
2307
  e.startsWith(r.prefix) && (!s || r.prefix.length > s.prefix.length) && (s = r);
2308
2308
  return (s == null ? void 0 : s.builders) ?? [];
2309
2309
  }
@@ -2438,7 +2438,7 @@ const Ao = {
2438
2438
  }
2439
2439
  }
2440
2440
  ]
2441
- }, mo = za({
2441
+ }, mo = Ua({
2442
2442
  version: 1,
2443
2443
  builderKey: io,
2444
2444
  contextSchema: to,
@@ -2486,7 +2486,7 @@ const Ao = {
2486
2486
  report: Ze
2487
2487
  };
2488
2488
  Ka(go);
2489
- function Pl(e, t) {
2489
+ function Yl(e, t) {
2490
2490
  if (!e) return {};
2491
2491
  const s = new Set(t.ownedFields);
2492
2492
  return Object.fromEntries(Object.entries(e).filter(([r]) => s.has(r)));
@@ -2496,7 +2496,7 @@ function po(e, t) {
2496
2496
  const s = new Set(t.flatMap((r) => r.ownedFields));
2497
2497
  return Object.fromEntries(Object.entries(e).filter(([r]) => !s.has(r)));
2498
2498
  }
2499
- function Yl(e, t) {
2499
+ function Pl(e, t) {
2500
2500
  return Object.assign(
2501
2501
  po(
2502
2502
  e,
@@ -2505,7 +2505,7 @@ function Yl(e, t) {
2505
2505
  ...t.map((s) => s.builder.toCondition(s.formValue))
2506
2506
  );
2507
2507
  }
2508
- const Br = {
2508
+ const wr = {
2509
2509
  mode: "Access window",
2510
2510
  unrestricted: "No restriction",
2511
2511
  since: "Since date",
@@ -2521,11 +2521,11 @@ const Br = {
2521
2521
  inheritedLastMonths: "last {amount} months",
2522
2522
  inheritedLastYears: "last {amount} years"
2523
2523
  }, fo = {
2524
- reportAccessWindow: Br
2524
+ reportAccessWindow: wr
2525
2525
  }, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2526
2526
  __proto__: null,
2527
2527
  default: fo,
2528
- reportAccessWindow: Br
2528
+ reportAccessWindow: wr
2529
2529
  }, Symbol.toStringTag, { value: "Module" })), Mr = {
2530
2530
  mode: "访问期限",
2531
2531
  unrestricted: "无限制",
@@ -2564,7 +2564,7 @@ const Br = {
2564
2564
  inheritedLastYears: "最近 {amount} 年"
2565
2565
  }, vo = {
2566
2566
  reportAccessWindow: Cr
2567
- }, wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2567
+ }, Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2568
2568
  __proto__: null,
2569
2569
  default: vo,
2570
2570
  reportAccessWindow: Cr
@@ -2583,16 +2583,16 @@ const Br = {
2583
2583
  inheritedLastDays: "ล่าสุด {amount} วัน",
2584
2584
  inheritedLastMonths: "ล่าสุด {amount} เดือน",
2585
2585
  inheritedLastYears: "ล่าสุด {amount} ปี"
2586
- }, Bo = {
2586
+ }, wo = {
2587
2587
  reportAccessWindow: Dr
2588
2588
  }, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2589
2589
  __proto__: null,
2590
- default: Bo,
2590
+ default: wo,
2591
2591
  reportAccessWindow: Dr
2592
2592
  }, Symbol.toStringTag, { value: "Module" })), Co = {
2593
2593
  "en-US": { conditionBuilder: { ...ho } },
2594
2594
  "zh-CN": { conditionBuilder: { ...bo } },
2595
- "zh-Hant": { conditionBuilder: { ...wo } },
2595
+ "zh-Hant": { conditionBuilder: { ...Bo } },
2596
2596
  "th-TH": { conditionBuilder: { ...Mo } }
2597
2597
  }, xr = {
2598
2598
  predefinedRanges: {
@@ -2610,9 +2610,6 @@ const Br = {
2610
2610
  dateRange: {
2611
2611
  placeholder: "Select date range"
2612
2612
  },
2613
- search: {
2614
- placeholder: "Search user, event, or record"
2615
- },
2616
2613
  user: {
2617
2614
  feedmeAdmin: "FeedMe Admin"
2618
2615
  },
@@ -2727,77 +2724,6 @@ const Br = {
2727
2724
  requestMethod: "Request Method",
2728
2725
  requestPath: "Request Path",
2729
2726
  requestBody: "Request Body"
2730
- },
2731
- operation: {
2732
- toggle: "Toggle operations",
2733
- rowHint: "Operation",
2734
- unlabeled: "Operation",
2735
- badge: "{count} ops",
2736
- sheetHeader: "Operation Detail",
2737
- entity: "Entity",
2738
- duration: "Duration",
2739
- durationValue: "{ms} ms",
2740
- error: "Error",
2741
- changes: "Changes",
2742
- showData: "Show data",
2743
- added: "Added",
2744
- removed: "Removed",
2745
- updated: "Updated",
2746
- before: "Before",
2747
- after: "After",
2748
- noChanges: "No changes recorded for this operation.",
2749
- wholeValue: "Value"
2750
- },
2751
- event: {
2752
- sentence: {
2753
- "audit-log": {
2754
- view: "Viewed audit logs"
2755
- },
2756
- restaurant: {
2757
- list: "Listed restaurants"
2758
- },
2759
- "permission-assignment": {
2760
- manage: "Managed permission assignments",
2761
- list: "Listed permission assignments",
2762
- view: "Viewed permission assignment {id}"
2763
- },
2764
- "permission-set": {
2765
- manage: "Managed permission sets",
2766
- list: "Listed permission sets",
2767
- view: "Viewed permission set {id}"
2768
- },
2769
- "portal-user": {
2770
- list: "Listed team members",
2771
- "list-page": "Listed team members",
2772
- view: "Viewed team member {id}",
2773
- create: "Added team member {name}",
2774
- update: "Updated team member {name}",
2775
- delete: "Removed team member {name}"
2776
- },
2777
- "pos-user": {
2778
- list: "Listed employees",
2779
- "list-page": "Listed employees",
2780
- create: "Added employee {name}",
2781
- "sync-meta": "Synced employee data",
2782
- update: "Updated employee {id}",
2783
- migrate: "Migrated employee {id}",
2784
- "generate-passcode": "Generated employee passcode"
2785
- },
2786
- "pos-master-user": {
2787
- create: "Added POS master employee {name}",
2788
- update: "Updated POS master employee {name}",
2789
- delete: "Removed POS master employee {name}"
2790
- },
2791
- "pos-role": {
2792
- list: "Listed employee roles",
2793
- create: "Added employee role {name}",
2794
- update: "Updated employee role {name}"
2795
- },
2796
- timesheet: {
2797
- view: "Viewed timesheets",
2798
- update: "Updated timesheet"
2799
- }
2800
- }
2801
2727
  }
2802
2728
  }, Do = {
2803
2729
  date: xr,
@@ -2817,15 +2743,12 @@ const Br = {
2817
2743
  thisMonth: "เดือนนี้",
2818
2744
  lastMonth: "เดือนที่แล้ว"
2819
2745
  }
2820
- }, Pr = {
2746
+ }, Yr = {
2821
2747
  title: "ประวัติการใช้งาน",
2822
2748
  export: "ส่งออก",
2823
2749
  dateRange: {
2824
2750
  placeholder: "เลือกช่วงวันที่"
2825
2751
  },
2826
- search: {
2827
- placeholder: "ค้นหาผู้ใช้ เหตุการณ์ หรือรายการ"
2828
- },
2829
2752
  user: {
2830
2753
  feedmeAdmin: "ผู้ดูแล FeedMe"
2831
2754
  },
@@ -2941,87 +2864,16 @@ const Br = {
2941
2864
  requestMethod: "วิธีการเข้าถึง",
2942
2865
  requestPath: "URL ที่เข้าถึง",
2943
2866
  requestBody: "เนื้อหาคำขอ"
2944
- },
2945
- operation: {
2946
- toggle: "แสดง/ซ่อนการดำเนินการ",
2947
- rowHint: "การดำเนินการ",
2948
- unlabeled: "การดำเนินการ",
2949
- badge: "{count} รายการ",
2950
- sheetHeader: "รายละเอียดการดำเนินการ",
2951
- entity: "ข้อมูลที่เกี่ยวข้อง",
2952
- duration: "ระยะเวลา",
2953
- durationValue: "{ms} มิลลิวินาที",
2954
- error: "ข้อผิดพลาด",
2955
- changes: "การเปลี่ยนแปลง",
2956
- showData: "แสดงข้อมูล",
2957
- added: "เพิ่ม",
2958
- removed: "ลบ",
2959
- updated: "อัปเดต",
2960
- before: "ก่อนหน้า",
2961
- after: "หลังจาก",
2962
- noChanges: "ไม่มีการเปลี่ยนแปลงที่บันทึกไว้สำหรับการดำเนินการนี้",
2963
- wholeValue: "ค่า"
2964
- },
2965
- event: {
2966
- sentence: {
2967
- "audit-log": {
2968
- view: "ดูบันทึกการตรวจสอบ"
2969
- },
2970
- restaurant: {
2971
- list: "ดูรายการร้านอาหาร"
2972
- },
2973
- "permission-assignment": {
2974
- manage: "จัดการการกำหนดสิทธิ์",
2975
- list: "ดูรายการการกำหนดสิทธิ์",
2976
- view: "ดูการกำหนดสิทธิ์ {id}"
2977
- },
2978
- "permission-set": {
2979
- manage: "จัดการกลุ่มสิทธิ์",
2980
- list: "ดูรายการกลุ่มสิทธิ์",
2981
- view: "ดูกลุ่มสิทธิ์ {id}"
2982
- },
2983
- "portal-user": {
2984
- list: "ดูรายการสมาชิกทีม",
2985
- "list-page": "ดูรายการสมาชิกทีม",
2986
- view: "ดูสมาชิกทีม {id}",
2987
- create: "เพิ่มสมาชิกทีม {name}",
2988
- update: "อัปเดตสมาชิกทีม {name}",
2989
- delete: "ลบสมาชิกทีม {name}"
2990
- },
2991
- "pos-user": {
2992
- list: "ดูรายการพนักงาน",
2993
- "list-page": "ดูรายการพนักงาน",
2994
- create: "เพิ่มพนักงาน {name}",
2995
- "sync-meta": "ซิงค์ข้อมูลพนักงาน",
2996
- update: "อัปเดตพนักงาน {id}",
2997
- migrate: "ย้ายพนักงาน {id}",
2998
- "generate-passcode": "สร้างรหัสผ่านพนักงาน"
2999
- },
3000
- "pos-master-user": {
3001
- create: "เพิ่มพนักงานหลัก POS {name}",
3002
- update: "อัปเดตพนักงานหลัก POS {name}",
3003
- delete: "ลบพนักงานหลัก POS {name}"
3004
- },
3005
- "pos-role": {
3006
- list: "ดูรายการบทบาทพนักงาน",
3007
- create: "เพิ่มบทบาทพนักงาน {name}",
3008
- update: "อัปเดตบทบาทพนักงาน {name}"
3009
- },
3010
- timesheet: {
3011
- view: "ดูใบบันทึกเวลา",
3012
- update: "อัปเดตใบบันทึกเวลา"
3013
- }
3014
- }
3015
2867
  }
3016
2868
  }, jo = {
3017
2869
  date: Er,
3018
- auditLog: Pr
2870
+ auditLog: Yr
3019
2871
  }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3020
2872
  __proto__: null,
3021
- auditLog: Pr,
2873
+ auditLog: Yr,
3022
2874
  date: Er,
3023
2875
  default: jo
3024
- }, Symbol.toStringTag, { value: "Module" })), Yr = {
2876
+ }, Symbol.toStringTag, { value: "Module" })), Pr = {
3025
2877
  predefinedRanges: {
3026
2878
  today: "今天",
3027
2879
  yesterday: "昨天",
@@ -3037,9 +2889,6 @@ const Br = {
3037
2889
  dateRange: {
3038
2890
  placeholder: "选择日期范围"
3039
2891
  },
3040
- search: {
3041
- placeholder: "搜索用户、事件或记录"
3042
- },
3043
2892
  user: {
3044
2893
  feedmeAdmin: "FeedMe 管理员"
3045
2894
  },
@@ -3155,86 +3004,15 @@ const Br = {
3155
3004
  requestMethod: "请求方法",
3156
3005
  requestPath: "请求路径",
3157
3006
  requestBody: "请求内容"
3158
- },
3159
- operation: {
3160
- toggle: "展开/收起操作",
3161
- rowHint: "操作",
3162
- unlabeled: "操作",
3163
- badge: "{count} 项操作",
3164
- sheetHeader: "操作详情",
3165
- entity: "对象",
3166
- duration: "耗时",
3167
- durationValue: "{ms} 毫秒",
3168
- error: "错误",
3169
- changes: "变更内容",
3170
- showData: "显示数据",
3171
- added: "已添加",
3172
- removed: "已移除",
3173
- updated: "已更新",
3174
- before: "变更前",
3175
- after: "变更后",
3176
- noChanges: "此操作未记录任何变更。",
3177
- wholeValue: "值"
3178
- },
3179
- event: {
3180
- sentence: {
3181
- "audit-log": {
3182
- view: "查看了审计日志"
3183
- },
3184
- restaurant: {
3185
- list: "查看了餐厅列表"
3186
- },
3187
- "permission-assignment": {
3188
- manage: "管理了权限分配",
3189
- list: "查看了权限分配列表",
3190
- view: "查看了权限分配 {id}"
3191
- },
3192
- "permission-set": {
3193
- manage: "管理了权限集",
3194
- list: "查看了权限集列表",
3195
- view: "查看了权限集 {id}"
3196
- },
3197
- "portal-user": {
3198
- list: "查看了团队成员列表",
3199
- "list-page": "查看了团队成员列表",
3200
- view: "查看了团队成员 {id}",
3201
- create: "添加了团队成员 {name}",
3202
- update: "更新了团队成员 {name}",
3203
- delete: "移除了团队成员 {name}"
3204
- },
3205
- "pos-user": {
3206
- list: "查看了员工列表",
3207
- "list-page": "查看了员工列表",
3208
- create: "添加了员工 {name}",
3209
- "sync-meta": "同步了员工数据",
3210
- update: "更新了员工 {id}",
3211
- migrate: "迁移了员工 {id}",
3212
- "generate-passcode": "生成了员工密码"
3213
- },
3214
- "pos-master-user": {
3215
- create: "添加了 POS 主员工 {name}",
3216
- update: "更新了 POS 主员工 {name}",
3217
- delete: "移除了 POS 主员工 {name}"
3218
- },
3219
- "pos-role": {
3220
- list: "查看了员工角色列表",
3221
- create: "添加了员工角色 {name}",
3222
- update: "更新了员工角色 {name}"
3223
- },
3224
- timesheet: {
3225
- view: "查看了工时表",
3226
- update: "更新了工时表"
3227
- }
3228
- }
3229
3007
  }
3230
- }, Po = {
3231
- date: Yr,
3008
+ }, Yo = {
3009
+ date: Pr,
3232
3010
  auditLog: Gr
3233
- }, Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3011
+ }, Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3234
3012
  __proto__: null,
3235
3013
  auditLog: Gr,
3236
- date: Yr,
3237
- default: Po
3014
+ date: Pr,
3015
+ default: Yo
3238
3016
  }, Symbol.toStringTag, { value: "Module" })), Vr = {
3239
3017
  predefinedRanges: {
3240
3018
  today: "今天",
@@ -3251,9 +3029,6 @@ const Br = {
3251
3029
  dateRange: {
3252
3030
  placeholder: "選擇日期範圍"
3253
3031
  },
3254
- search: {
3255
- placeholder: "搜尋使用者、事件或記錄"
3256
- },
3257
3032
  user: {
3258
3033
  feedmeAdmin: "FeedMe 管理員"
3259
3034
  },
@@ -3369,77 +3144,6 @@ const Br = {
3369
3144
  requestMethod: "請求方法",
3370
3145
  requestPath: "請求路徑",
3371
3146
  requestBody: "請求內容"
3372
- },
3373
- operation: {
3374
- toggle: "展開/收起操作",
3375
- rowHint: "操作",
3376
- unlabeled: "操作",
3377
- badge: "{count} 項操作",
3378
- sheetHeader: "操作詳情",
3379
- entity: "對象",
3380
- duration: "耗時",
3381
- durationValue: "{ms} 毫秒",
3382
- error: "錯誤",
3383
- changes: "變更內容",
3384
- showData: "顯示資料",
3385
- added: "已新增",
3386
- removed: "已移除",
3387
- updated: "已更新",
3388
- before: "變更前",
3389
- after: "變更後",
3390
- noChanges: "此操作未記錄任何變更。",
3391
- wholeValue: "值"
3392
- },
3393
- event: {
3394
- sentence: {
3395
- "audit-log": {
3396
- view: "查看了稽核紀錄"
3397
- },
3398
- restaurant: {
3399
- list: "查看了餐廳列表"
3400
- },
3401
- "permission-assignment": {
3402
- manage: "管理了權限指派",
3403
- list: "查看了權限指派列表",
3404
- view: "查看了權限指派 {id}"
3405
- },
3406
- "permission-set": {
3407
- manage: "管理了權限集",
3408
- list: "查看了權限集列表",
3409
- view: "查看了權限集 {id}"
3410
- },
3411
- "portal-user": {
3412
- list: "查看了團隊成員列表",
3413
- "list-page": "查看了團隊成員列表",
3414
- view: "查看了團隊成員 {id}",
3415
- create: "新增了團隊成員 {name}",
3416
- update: "更新了團隊成員 {name}",
3417
- delete: "移除了團隊成員 {name}"
3418
- },
3419
- "pos-user": {
3420
- list: "查看了員工列表",
3421
- "list-page": "查看了員工列表",
3422
- create: "新增了員工 {name}",
3423
- "sync-meta": "同步了員工資料",
3424
- update: "更新了員工 {id}",
3425
- migrate: "移轉了員工 {id}",
3426
- "generate-passcode": "產生了員工密碼"
3427
- },
3428
- "pos-master-user": {
3429
- create: "新增了 POS 主員工 {name}",
3430
- update: "更新了 POS 主員工 {name}",
3431
- delete: "移除了 POS 主員工 {name}"
3432
- },
3433
- "pos-role": {
3434
- list: "查看了員工角色列表",
3435
- create: "新增了員工角色 {name}",
3436
- update: "更新了員工角色 {name}"
3437
- },
3438
- timesheet: {
3439
- view: "查看了工時表",
3440
- update: "更新了工時表"
3441
- }
3442
- }
3443
3147
  }
3444
3148
  }, Go = {
3445
3149
  date: Vr,
@@ -3451,7 +3155,7 @@ const Br = {
3451
3155
  default: Go
3452
3156
  }, Symbol.toStringTag, { value: "Module" })), Oo = {
3453
3157
  "en-US": xo,
3454
- "zh-CN": Yo,
3158
+ "zh-CN": Po,
3455
3159
  "th-TH": Eo,
3456
3160
  "zh-Hant": Vo
3457
3161
  }, Fr = {
@@ -3565,6 +3269,7 @@ const Br = {
3565
3269
  maxValueIs: "Max value is {max}",
3566
3270
  minValueIs: "Min value is {min}",
3567
3271
  restaurant: "Restaurant",
3272
+ v8OnlyReportTag: "(POS v8 and above)",
3568
3273
  permissionLabels: {
3569
3274
  "order:discount": "Discount",
3570
3275
  "order:changePrice": "Change Price",
@@ -3773,6 +3478,7 @@ const Br = {
3773
3478
  maxValueIs: "ค่าสูงสุดคือ {max}",
3774
3479
  minValueIs: "ค่าต่ำสุดคือ {min}",
3775
3480
  restaurant: "ร้านอาหาร",
3481
+ v8OnlyReportTag: "(POS v8 ขึ้นไป)",
3776
3482
  permissionLabels: {
3777
3483
  "order:discount": "ใช้ส่วนลด",
3778
3484
  "order:changePrice": "เปลี่ยนราคา",
@@ -3980,6 +3686,7 @@ const Br = {
3980
3686
  maxValueIs: "最大值是 {max}",
3981
3687
  minValueIs: "最小值是 {min}",
3982
3688
  restaurant: "餐厅",
3689
+ v8OnlyReportTag: "(POS v8 及以上)",
3983
3690
  permissionLabels: {
3984
3691
  "order:discount": "折扣",
3985
3692
  "order:changePrice": "修改价格",
@@ -4188,6 +3895,7 @@ const Br = {
4188
3895
  maxValueIs: "最大值是 {max}",
4189
3896
  minValueIs: "最小值是 {min}",
4190
3897
  restaurant: "餐廳",
3898
+ v8OnlyReportTag: "(POS v8 及以上)",
4191
3899
  permissionLabels: {
4192
3900
  "order:discount": "折扣",
4193
3901
  "order:changePrice": "修改價格",
@@ -4533,12 +4241,12 @@ const Br = {
4533
4241
  permissions: "Permissions"
4534
4242
  }
4535
4243
  }
4536
- }, So = {
4244
+ }, No = {
4537
4245
  team: Rr,
4538
4246
  permissionSet: Xr
4539
- }, No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4247
+ }, So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4540
4248
  __proto__: null,
4541
- default: So,
4249
+ default: No,
4542
4250
  permissionSet: Xr,
4543
4251
  team: Rr
4544
4252
  }, Symbol.toStringTag, { value: "Module" })), Qr = {
@@ -4792,7 +4500,7 @@ const Br = {
4792
4500
  }, Zo = {
4793
4501
  team: Qr,
4794
4502
  permissionSet: kr
4795
- }, Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4503
+ }, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4796
4504
  __proto__: null,
4797
4505
  default: Zo,
4798
4506
  permissionSet: kr,
@@ -4916,7 +4624,7 @@ const Br = {
4916
4624
  selectPlaceholder: "选择权限角色"
4917
4625
  }
4918
4626
  }
4919
- }, Sr = {
4627
+ }, Nr = {
4920
4628
  title: "角色",
4921
4629
  createButtonLabel: "创建角色",
4922
4630
  search: {
@@ -5045,15 +4753,15 @@ const Br = {
5045
4753
  permissions: "权限"
5046
4754
  }
5047
4755
  }
5048
- }, zo = {
4756
+ }, Uo = {
5049
4757
  team: Tr,
5050
- permissionSet: Sr
4758
+ permissionSet: Nr
5051
4759
  }, Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5052
4760
  __proto__: null,
5053
- default: zo,
5054
- permissionSet: Sr,
4761
+ default: Uo,
4762
+ permissionSet: Nr,
5055
4763
  team: Tr
5056
- }, Symbol.toStringTag, { value: "Module" })), Nr = {
4764
+ }, Symbol.toStringTag, { value: "Module" })), Sr = {
5057
4765
  title: "團隊成員",
5058
4766
  subtitle: "管理可存取 Portal 和 POS 的團隊成員,指派 Portal 權限和 POS 角色。",
5059
4767
  actions: {
@@ -5309,19 +5017,19 @@ const Br = {
5309
5017
  }
5310
5018
  }
5311
5019
  }, Lo = {
5312
- team: Nr,
5020
+ team: Sr,
5313
5021
  permissionSet: Zr
5314
5022
  }, Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5315
5023
  __proto__: null,
5316
5024
  default: Lo,
5317
5025
  permissionSet: Zr,
5318
- team: Nr
5026
+ team: Sr
5319
5027
  }, Symbol.toStringTag, { value: "Module" })), Jo = {
5320
- "en-US": No,
5028
+ "en-US": So,
5321
5029
  "zh-CN": Wo,
5322
- "th-TH": Uo,
5030
+ "th-TH": zo,
5323
5031
  "zh-Hant": Ko
5324
- }, Ur = {
5032
+ }, zr = {
5325
5033
  title: "POS Grant",
5326
5034
  actions: {
5327
5035
  create: "Create Passcode",
@@ -5376,12 +5084,12 @@ const Br = {
5376
5084
  copied: "Passcode copied"
5377
5085
  }
5378
5086
  }, _o = {
5379
- grantUser: Ur
5087
+ grantUser: zr
5380
5088
  }, $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5381
5089
  __proto__: null,
5382
5090
  default: _o,
5383
- grantUser: Ur
5384
- }, Symbol.toStringTag, { value: "Module" })), zr = {
5091
+ grantUser: zr
5092
+ }, Symbol.toStringTag, { value: "Module" })), Ur = {
5385
5093
  title: "POS Grant",
5386
5094
  actions: {
5387
5095
  create: "สร้างรหัสผ่าน",
@@ -5436,11 +5144,11 @@ const Br = {
5436
5144
  copied: "คัดลอกรหัสผ่านแล้ว"
5437
5145
  }
5438
5146
  }, ei = {
5439
- grantUser: zr
5147
+ grantUser: Ur
5440
5148
  }, ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5441
5149
  __proto__: null,
5442
5150
  default: ei,
5443
- grantUser: zr
5151
+ grantUser: Ur
5444
5152
  }, Symbol.toStringTag, { value: "Module" })), Wr = {
5445
5153
  title: "POS 授予",
5446
5154
  actions: {
@@ -5969,7 +5677,7 @@ const Br = {
5969
5677
  }
5970
5678
  }, vi = {
5971
5679
  posAccess: sn
5972
- }, wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5680
+ }, Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5973
5681
  __proto__: null,
5974
5682
  default: vi,
5975
5683
  posAccess: sn
@@ -5981,15 +5689,15 @@ const Br = {
5981
5689
  codes: "授權碼",
5982
5690
  codesDescription: "產生一次性授權碼,用於核准退款、作廢等敏感操作。"
5983
5691
  }
5984
- }, Bi = {
5692
+ }, wi = {
5985
5693
  posAccess: rn
5986
5694
  }, Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5987
5695
  __proto__: null,
5988
- default: Bi,
5696
+ default: wi,
5989
5697
  posAccess: rn
5990
5698
  }, Symbol.toStringTag, { value: "Module" })), Ci = {
5991
5699
  "en-US": hi,
5992
- "zh-CN": wi,
5700
+ "zh-CN": Bi,
5993
5701
  "th-TH": bi,
5994
5702
  "zh-Hant": Mi
5995
5703
  }, yt = {
@@ -6748,14 +6456,14 @@ const L = [
6748
6456
  o.delete
6749
6457
  ]
6750
6458
  }
6751
- ], Pi = [
6459
+ ], Yi = [
6752
6460
  ...L,
6753
6461
  {
6754
6462
  label: "Setting",
6755
6463
  subject: Z.crm_setting,
6756
6464
  actions: [o.read, o.update]
6757
6465
  }
6758
- ], Yi = [
6466
+ ], Pi = [
6759
6467
  ...L,
6760
6468
  {
6761
6469
  label: "Reward",
@@ -6967,10 +6675,10 @@ const L = [
6967
6675
  ), vn = Ae(
6968
6676
  ye,
6969
6677
  Ii
6970
- ), wn = Ae(
6678
+ ), Bn = Ae(
6971
6679
  ye,
6972
6680
  Hi
6973
- ), Bn = Ae(
6681
+ ), wn = Ae(
6974
6682
  ye,
6975
6683
  Ri
6976
6684
  ), Xi = Ae(
@@ -6978,7 +6686,7 @@ const L = [
6978
6686
  cn
6979
6687
  ), Mn = Ae(
6980
6688
  ye,
6981
- Pi
6689
+ Yi
6982
6690
  ), Qi = [
6983
6691
  ...L,
6984
6692
  {
@@ -7011,7 +6719,7 @@ const L = [
7011
6719
  ji,
7012
6720
  Ei,
7013
6721
  Mn,
7014
- Yi,
6722
+ Pi,
7015
6723
  un,
7016
6724
  pn,
7017
6725
  fn,
@@ -7019,20 +6727,20 @@ const L = [
7019
6727
  yn,
7020
6728
  bn,
7021
6729
  vn,
7022
- wn,
7023
6730
  Bn,
6731
+ wn,
7024
6732
  An,
7025
6733
  dn,
7026
6734
  mn,
7027
6735
  gn
7028
- ), Si = Ae(
6736
+ ), Ni = Ae(
7029
6737
  ye,
7030
6738
  cn,
7031
6739
  ln
7032
- ), Ni = Ae(
6740
+ ), Si = Ae(
7033
6741
  ye,
7034
6742
  Qi
7035
- ), Zi = Ae(ki), Ui = {
6743
+ ), Zi = Ae(ki), zi = {
7036
6744
  [`set_${d.crm}`]: {
7037
6745
  key: "sys:crm:access",
7038
6746
  name: "CRM Access",
@@ -7041,12 +6749,12 @@ const L = [
7041
6749
  [`set_${d.crm_promotion}`]: {
7042
6750
  key: "sys:crm:promotion",
7043
6751
  name: "CRM Promotion",
7044
- permissions: Si
6752
+ permissions: Ni
7045
6753
  },
7046
6754
  [`set_${d.crm_voucher}`]: {
7047
6755
  key: "sys:crm:voucher",
7048
6756
  name: "CRM Voucher",
7049
- permissions: Ni
6757
+ permissions: Si
7050
6758
  },
7051
6759
  [`set_${d.crm_membership}`]: {
7052
6760
  key: "sys:crm:membership",
@@ -7091,12 +6799,12 @@ const L = [
7091
6799
  [`set_${d.crm_game}`]: {
7092
6800
  key: "sys:crm:game",
7093
6801
  name: "CRM Game",
7094
- permissions: wn
6802
+ permissions: Bn
7095
6803
  },
7096
6804
  [`set_${d.crm_mission}`]: {
7097
6805
  key: "sys:crm:mission",
7098
6806
  name: "CRM Mission",
7099
- permissions: Bn
6807
+ permissions: wn
7100
6808
  },
7101
6809
  [`set_${d.crm_loyaltyMember}`]: {
7102
6810
  key: "sys:crm:loyaltyMember",
@@ -7173,7 +6881,7 @@ const ie = [
7173
6881
  subject: V.inventory_unitCostHistory,
7174
6882
  actions: [o.read]
7175
6883
  }
7176
- ], zi = [
6884
+ ], Ui = [
7177
6885
  ...ie,
7178
6886
  {
7179
6887
  label: "Stock Adjustment",
@@ -7352,7 +7060,7 @@ const Wi = [
7352
7060
  subject: V.inventory_shipment,
7353
7061
  actions: [o.read, o.update]
7354
7062
  }
7355
- ], Pn = [
7063
+ ], Yn = [
7356
7064
  {
7357
7065
  label: "Purchase Order",
7358
7066
  subject: V.inventory_purchaseOrder,
@@ -7373,7 +7081,7 @@ const Wi = [
7373
7081
  subject: V.inventory_shipment,
7374
7082
  actions: [o.read, o.update]
7375
7083
  }
7376
- ], Yn = [
7084
+ ], Pn = [
7377
7085
  ...ie,
7378
7086
  {
7379
7087
  label: "Surcharge",
@@ -7422,8 +7130,8 @@ const Wi = [
7422
7130
  ];
7423
7131
  [
7424
7132
  ...En,
7425
- ...Pn,
7426
7133
  ...Yn,
7134
+ ...Pn,
7427
7135
  ...Gn
7428
7136
  ];
7429
7137
  const $i = [
@@ -7490,7 +7198,7 @@ const nc = {
7490
7198
  [`set_${d.inventory_stockAdjustment}`]: {
7491
7199
  key: "sys:inventory:stock_adjustment",
7492
7200
  name: "Stock Adjustment",
7493
- permissions: zi
7201
+ permissions: Ui
7494
7202
  },
7495
7203
  [`set_${d.inventory_unitCostHistory}`]: {
7496
7204
  key: "sys:inventory:unit_cost_history",
@@ -7550,12 +7258,12 @@ const nc = {
7550
7258
  [`set_${d.inventory_transferOut}`]: {
7551
7259
  key: "sys:inventory:transfer_out",
7552
7260
  name: "Transfer Out",
7553
- permissions: Pn
7261
+ permissions: Yn
7554
7262
  },
7555
7263
  [`set_${d.inventory_surcharge}`]: {
7556
7264
  key: "sys:inventory:surcharge",
7557
7265
  name: "Surcharge",
7558
- permissions: Yn
7266
+ permissions: Pn
7559
7267
  },
7560
7268
  [`set_${d.inventory_orderTemplate}`]: {
7561
7269
  key: "sys:inventory:order_template",
@@ -7703,7 +7411,7 @@ const sr = [
7703
7411
  permissions: sr
7704
7412
  }
7705
7413
  }, ic = {
7706
- ...Ui,
7414
+ ...zi,
7707
7415
  ...nc,
7708
7416
  ...ac,
7709
7417
  ...oc
@@ -7773,8 +7481,8 @@ var On = { exports: {} };
7773
7481
  }
7774
7482
  function c(m) {
7775
7483
  var p = "[object " + m + "]";
7776
- return function(B) {
7777
- return Object.prototype.toString.call(B) === p;
7484
+ return function(w) {
7485
+ return Object.prototype.toString.call(w) === p;
7778
7486
  };
7779
7487
  }
7780
7488
  n.r(r), n.d(r, "default", function() {
@@ -7785,33 +7493,33 @@ var On = { exports: {} };
7785
7493
  return At;
7786
7494
  });
7787
7495
  var l = c("Array"), y = c("Object"), h = c("Function");
7788
- function w(m, p) {
7496
+ function B(m, p) {
7789
7497
  return h(m.get) ? m.get(p) : m[p];
7790
7498
  }
7791
7499
  function O(m) {
7792
- return function(p, B) {
7793
- if (!l(B) || !B.length) return m(p, B);
7794
- for (var D = 0, E = B.length; D < E; D++)
7795
- if (m(p, w(B, D))) return !0;
7500
+ return function(p, w) {
7501
+ if (!l(w) || !w.length) return m(p, w);
7502
+ for (var D = 0, E = w.length; D < E; D++)
7503
+ if (m(p, B(w, D))) return !0;
7796
7504
  return !1;
7797
7505
  };
7798
7506
  }
7799
- function S(m) {
7800
- return function(p, B) {
7801
- if (!l(B) || !B.length) return m(p, B);
7802
- for (var D = 0, E = B.length; D < E; D++)
7803
- if (!m(p, w(B, D))) return !1;
7507
+ function N(m) {
7508
+ return function(p, w) {
7509
+ if (!l(w) || !w.length) return m(p, w);
7510
+ for (var D = 0, E = w.length; D < E; D++)
7511
+ if (!m(p, B(w, D))) return !1;
7804
7512
  return !0;
7805
7513
  };
7806
7514
  }
7807
- function U(m, p, B, D) {
7808
- return m.validate(m.options, p, B, D);
7515
+ function z(m, p, w, D) {
7516
+ return m.validate(m.options, p, w, D);
7809
7517
  }
7810
7518
  var $ = {
7811
7519
  $eq: O(function(m, p) {
7812
7520
  return m(p);
7813
7521
  }),
7814
- $ne: S(function(m, p) {
7522
+ $ne: N(function(m, p) {
7815
7523
  return m(p);
7816
7524
  }),
7817
7525
  $gt: O(function(m, p) {
@@ -7835,115 +7543,115 @@ var On = { exports: {} };
7835
7543
  $nin: function(m, p) {
7836
7544
  return m(p);
7837
7545
  },
7838
- $not: function(m, p, B, D) {
7839
- return m(p, B, D);
7546
+ $not: function(m, p, w, D) {
7547
+ return m(p, w, D);
7840
7548
  },
7841
7549
  $type: function(m, p) {
7842
7550
  return m(p);
7843
7551
  },
7844
- $all: function(m, p, B, D) {
7845
- return $.$and(m, p, B, D);
7552
+ $all: function(m, p, w, D) {
7553
+ return $.$and(m, p, w, D);
7846
7554
  },
7847
7555
  $size: function(m, p) {
7848
7556
  return !!p && m === p.length;
7849
7557
  },
7850
- $or: function(m, p, B, D) {
7851
- for (var E = 0, Y = m.length; E < Y; E++)
7852
- if (U(w(m, E), p, B, D)) return !0;
7558
+ $or: function(m, p, w, D) {
7559
+ for (var E = 0, P = m.length; E < P; E++)
7560
+ if (z(B(m, E), p, w, D)) return !0;
7853
7561
  return !1;
7854
7562
  },
7855
- $nor: function(m, p, B, D) {
7856
- return !$.$or(m, p, B, D);
7563
+ $nor: function(m, p, w, D) {
7564
+ return !$.$or(m, p, w, D);
7857
7565
  },
7858
- $and: function(m, p, B, D) {
7859
- for (var E = 0, Y = m.length; E < Y; E++)
7860
- if (!U(w(m, E), p, B, D)) return !1;
7566
+ $and: function(m, p, w, D) {
7567
+ for (var E = 0, P = m.length; E < P; E++)
7568
+ if (!z(B(m, E), p, w, D)) return !1;
7861
7569
  return !0;
7862
7570
  },
7863
7571
  $regex: O(function(m, p) {
7864
7572
  return typeof p == "string" && m.test(p);
7865
7573
  }),
7866
- $where: function(m, p, B, D) {
7867
- return m.call(p, p, B, D);
7574
+ $where: function(m, p, w, D) {
7575
+ return m.call(p, p, w, D);
7868
7576
  },
7869
- $elemMatch: function(m, p, B, D) {
7870
- return l(p) ? !!~function(E, Y) {
7577
+ $elemMatch: function(m, p, w, D) {
7578
+ return l(p) ? !!~function(E, P) {
7871
7579
  for (var q = 0; q < E.length; q++)
7872
- if (w(E, q), U(Y, w(E, q))) return q;
7580
+ if (B(E, q), z(P, B(E, q))) return q;
7873
7581
  return -1;
7874
- }(p, m) : U(m, p, B, D);
7582
+ }(p, m) : z(m, p, w, D);
7875
7583
  },
7876
- $exists: function(m, p, B, D) {
7877
- return D.hasOwnProperty(B) === m;
7584
+ $exists: function(m, p, w, D) {
7585
+ return D.hasOwnProperty(w) === m;
7878
7586
  }
7879
7587
  }, re = {
7880
- $eq: function(m, p, B) {
7881
- var D = B.comparable, E = B.compare;
7882
- return m instanceof RegExp ? O(function(Y) {
7883
- return typeof Y == "string" && m.test(Y);
7884
- }) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(Y) {
7885
- return l(Y) && !Y.length;
7588
+ $eq: function(m, p, w) {
7589
+ var D = w.comparable, E = w.compare;
7590
+ return m instanceof RegExp ? O(function(P) {
7591
+ return typeof P == "string" && m.test(P);
7592
+ }) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(P) {
7593
+ return l(P) && !P.length;
7886
7594
  }) : O(
7887
- m === null ? function(Y) {
7888
- return Y == null;
7889
- } : function(Y) {
7890
- return E(D(Y), D(m)) === 0;
7595
+ m === null ? function(P) {
7596
+ return P == null;
7597
+ } : function(P) {
7598
+ return E(D(P), D(m)) === 0;
7891
7599
  }
7892
7600
  );
7893
7601
  },
7894
- $gt: function(m, p, B) {
7895
- var D = B.comparable, E = B.compare;
7896
- return function(Y) {
7897
- return E(D(Y), D(m)) > 0;
7602
+ $gt: function(m, p, w) {
7603
+ var D = w.comparable, E = w.compare;
7604
+ return function(P) {
7605
+ return E(D(P), D(m)) > 0;
7898
7606
  };
7899
7607
  },
7900
- $gte: function(m, p, B) {
7901
- var D = B.comparable, E = B.compare;
7902
- return function(Y) {
7903
- return E(D(Y), D(m)) >= 0;
7608
+ $gte: function(m, p, w) {
7609
+ var D = w.comparable, E = w.compare;
7610
+ return function(P) {
7611
+ return E(D(P), D(m)) >= 0;
7904
7612
  };
7905
7613
  },
7906
- $lt: function(m, p, B) {
7907
- var D = B.comparable, E = B.compare;
7908
- return function(Y) {
7909
- return E(D(Y), D(m)) < 0;
7614
+ $lt: function(m, p, w) {
7615
+ var D = w.comparable, E = w.compare;
7616
+ return function(P) {
7617
+ return E(D(P), D(m)) < 0;
7910
7618
  };
7911
7619
  },
7912
- $lte: function(m, p, B) {
7913
- var D = B.comparable, E = B.compare;
7914
- return function(Y) {
7915
- return E(D(Y), D(m)) <= 0;
7620
+ $lte: function(m, p, w) {
7621
+ var D = w.comparable, E = w.compare;
7622
+ return function(P) {
7623
+ return E(D(P), D(m)) <= 0;
7916
7624
  };
7917
7625
  },
7918
- $in: function(m, p, B) {
7919
- var D = B.comparable;
7626
+ $in: function(m, p, w) {
7627
+ var D = w.comparable;
7920
7628
  return function(E) {
7921
7629
  if (!(E instanceof Array)) {
7922
- var Y = D(E);
7923
- if (Y === E && a(E) === "object") {
7630
+ var P = D(E);
7631
+ if (P === E && a(E) === "object") {
7924
7632
  for (R = m.length; R--; )
7925
7633
  if (String(m[R]) === String(E) && String(E) !== "[object Object]")
7926
7634
  return !0;
7927
7635
  }
7928
- if (Y === void 0) {
7636
+ if (P === void 0) {
7929
7637
  for (R = m.length; R--; ) if (m[R] == null) return !0;
7930
7638
  }
7931
7639
  for (R = m.length; R--; ) {
7932
- var q = U(lt(w(m, R), B), Y, R, m);
7933
- if (q && String(q) !== "[object Object]" && String(Y) !== "[object Object]")
7640
+ var q = z(lt(B(m, R), w), P, R, m);
7641
+ if (q && String(q) !== "[object Object]" && String(P) !== "[object Object]")
7934
7642
  return !0;
7935
7643
  }
7936
- return !!~m.indexOf(Y);
7644
+ return !!~m.indexOf(P);
7937
7645
  }
7938
7646
  for (var R = E.length; R--; )
7939
- if (~m.indexOf(D(w(E, R)))) return !0;
7647
+ if (~m.indexOf(D(B(E, R)))) return !0;
7940
7648
  return !1;
7941
7649
  };
7942
7650
  },
7943
- $nin: function(m, p, B) {
7944
- var D = re.$in(m, p, B);
7945
- return function(E, Y, q, R) {
7946
- return !D(E, Y, q, R);
7651
+ $nin: function(m, p, w) {
7652
+ var D = re.$in(m, p, w);
7653
+ return function(E, P, q, R) {
7654
+ return !D(E, P, q, R);
7947
7655
  };
7948
7656
  },
7949
7657
  $mod: function(m) {
@@ -7951,32 +7659,32 @@ var On = { exports: {} };
7951
7659
  return p % m[0] == m[1];
7952
7660
  };
7953
7661
  },
7954
- $ne: function(m, p, B) {
7955
- var D = re.$eq(m, p, B);
7956
- return S(function(E, Y, q, R) {
7957
- return !D(E, Y, q, R);
7662
+ $ne: function(m, p, w) {
7663
+ var D = re.$eq(m, p, w);
7664
+ return N(function(E, P, q, R) {
7665
+ return !D(E, P, q, R);
7958
7666
  });
7959
7667
  },
7960
- $and: function(m, p, B) {
7961
- return m.map(be(B));
7668
+ $and: function(m, p, w) {
7669
+ return m.map(be(w));
7962
7670
  },
7963
- $all: function(m, p, B) {
7964
- return re.$and(m, p, B);
7671
+ $all: function(m, p, w) {
7672
+ return re.$and(m, p, w);
7965
7673
  },
7966
- $or: function(m, p, B) {
7967
- return m.map(be(B));
7674
+ $or: function(m, p, w) {
7675
+ return m.map(be(w));
7968
7676
  },
7969
- $nor: function(m, p, B) {
7970
- return m.map(be(B));
7677
+ $nor: function(m, p, w) {
7678
+ return m.map(be(w));
7971
7679
  },
7972
- $not: function(m, p, B) {
7973
- var D = be(B)(m);
7974
- return function(E, Y, q) {
7975
- return !U(D, E, Y, q);
7680
+ $not: function(m, p, w) {
7681
+ var D = be(w)(m);
7682
+ return function(E, P, q) {
7683
+ return !z(D, E, P, q);
7976
7684
  };
7977
7685
  },
7978
7686
  $type: function(m) {
7979
- return function(p, B, D) {
7687
+ return function(p, w, D) {
7980
7688
  return p != null && (p instanceof m || p.constructor == m);
7981
7689
  };
7982
7690
  },
@@ -7989,8 +7697,8 @@ var On = { exports: {} };
7989
7697
  'In CSP mode, sift does not support strings in "$where" condition'
7990
7698
  );
7991
7699
  },
7992
- $elemMatch: function(m, p, B) {
7993
- return be(B)(m);
7700
+ $elemMatch: function(m, p, w) {
7701
+ return be(w)(m);
7994
7702
  },
7995
7703
  $exists: function(m) {
7996
7704
  return !!m;
@@ -8000,29 +7708,29 @@ var On = { exports: {} };
8000
7708
  return { options: m, validate: p };
8001
7709
  }
8002
7710
  function ne(m, p) {
8003
- var B = m.keyPath, D = m.child, E = m.query, Y = [];
7711
+ var w = m.keyPath, D = m.child, E = m.query, P = [];
8004
7712
  if (function i(g, A, b, M, G) {
8005
7713
  if (b === A.length || g == null)
8006
7714
  return void G.push([g, A[b - 1], M]);
8007
- var F = w(A, b);
7715
+ var F = B(A, b);
8008
7716
  if (l(g) && isNaN(Number(F)))
8009
- for (var k = 0, j = g.length; k < j; k++) i(w(g, k), A, b, g, G);
8010
- else i(w(g, F), A, b + 1, g, G);
8011
- }(p, B, 0, p, Y), Y.length === 1) {
8012
- var q = Y[0];
8013
- return U(D, q[0], q[1], q[2]);
7717
+ for (var k = 0, j = g.length; k < j; k++) i(B(g, k), A, b, g, G);
7718
+ else i(B(g, F), A, b + 1, g, G);
7719
+ }(p, w, 0, p, P), P.length === 1) {
7720
+ var q = P[0];
7721
+ return z(D, q[0], q[1], q[2]);
8014
7722
  }
8015
- for (var R = E && E.$ne !== void 0, _ = R, se = 0; se < Y.length; se++) {
8016
- var f = Y[se], u = U(D, f[0], f[1], f[2]);
7723
+ for (var R = E && E.$ne !== void 0, _ = R, se = 0; se < P.length; se++) {
7724
+ var f = P[se], u = z(D, f[0], f[1], f[2]);
8017
7725
  R ? _ &= u : _ |= u;
8018
7726
  }
8019
7727
  return _;
8020
7728
  }
8021
- function Jt(m, p, B) {
8022
- return me({ keyPath: m, child: p, query: B }, ne);
7729
+ function Jt(m, p, w) {
7730
+ return me({ keyPath: m, child: p, query: w }, ne);
8023
7731
  }
8024
7732
  function be(m) {
8025
- var p = m.comparable, B = m.expressions, D = function(q) {
7733
+ var p = m.comparable, w = m.expressions, D = function(q) {
8026
7734
  var R;
8027
7735
  return (!q || !(R = q) || R.constructor !== Object && R.constructor !== Array && R.constructor.toString() !== "function Object() { [native code] }" && R.constructor.toString() !== "function Array() { [native code] }" || R.toJSON) && (q = { $eq: q }), q;
8028
7736
  }, E = function(q) {
@@ -8031,61 +7739,61 @@ var On = { exports: {} };
8031
7739
  for (var _ in q) {
8032
7740
  var se = q[_];
8033
7741
  if (_ !== "$options") {
8034
- var f = $[_] || m && B && B[_];
7742
+ var f = $[_] || m && w && w[_];
8035
7743
  if (f) re[_] && (se = re[_](se, q, m)), R.push(me(p(se), f));
8036
7744
  else {
8037
7745
  if (_.charCodeAt(0) === 36)
8038
7746
  throw new Error("Unknown operation " + _);
8039
7747
  var u = _.split(".");
8040
- R.push(Jt(u, Y(se), se));
7748
+ R.push(Jt(u, P(se), se));
8041
7749
  }
8042
7750
  }
8043
7751
  }
8044
7752
  return R.length === 1 ? R[0] : me(R, $.$and);
8045
- }, Y = function(q) {
7753
+ }, P = function(q) {
8046
7754
  return q = D(q), function R(_, se) {
8047
7755
  if (!y(_)) return se;
8048
7756
  for (var f in _) se.push(f), R(_[f], se);
8049
7757
  return se;
8050
- }(q, []).join(",").search(/[$.]/) === -1 ? me(q, Se) : E(q);
7758
+ }(q, []).join(",").search(/[$.]/) === -1 ? me(q, Ne) : E(q);
8051
7759
  };
8052
7760
  return function(q) {
8053
7761
  return E(D(q));
8054
7762
  };
8055
7763
  }
8056
- function Se(m, p) {
7764
+ function Ne(m, p) {
8057
7765
  if (Object.prototype.toString.call(m) !== Object.prototype.toString.call(p))
8058
7766
  return !1;
8059
7767
  if (y(m)) {
8060
7768
  if (Object.keys(m).length !== Object.keys(p).length) return !1;
8061
- for (var B in m) if (!Se(m[B], p[B])) return !1;
7769
+ for (var w in m) if (!Ne(m[w], p[w])) return !1;
8062
7770
  return !0;
8063
7771
  }
8064
7772
  if (l(m)) {
8065
7773
  if (m.length !== p.length) return !1;
8066
7774
  for (var D = 0, E = m.length; D < E; D++)
8067
- if (!Se(m[D], p[D])) return !1;
7775
+ if (!Ne(m[D], p[D])) return !1;
8068
7776
  return !0;
8069
7777
  }
8070
7778
  return m === p;
8071
7779
  }
8072
7780
  function lt(m, p) {
8073
- var B = be(p)(m);
8074
- return p && p.select && (B = {
8075
- options: B,
8076
- validate: function(D, E, Y, q) {
8077
- return U(D, E && p.select(E), Y, q);
7781
+ var w = be(p)(m);
7782
+ return p && p.select && (w = {
7783
+ options: w,
7784
+ validate: function(D, E, P, q) {
7785
+ return z(D, E && p.select(E), P, q);
8078
7786
  }
8079
- }), B;
7787
+ }), w;
8080
7788
  }
8081
7789
  function Dt(m, p) {
8082
- var B = lt(m, p = Object.assign({ compare: ut, comparable: At }, p));
8083
- return function(D, E, Y) {
8084
- return U(B, D, E, Y);
7790
+ var w = lt(m, p = Object.assign({ compare: ut, comparable: At }, p));
7791
+ return function(D, E, P) {
7792
+ return z(w, D, E, P);
8085
7793
  };
8086
7794
  }
8087
7795
  function ut(m, p) {
8088
- if (Se(m, p)) return 0;
7796
+ if (Ne(m, p)) return 0;
8089
7797
  if (a(m) === a(p)) {
8090
7798
  if (m > p) return 1;
8091
7799
  if (m < p) return -1;
@@ -8117,10 +7825,10 @@ function js(e) {
8117
7825
  return s.__proto__ || Object.getPrototypeOf(s);
8118
7826
  }, js(e);
8119
7827
  }
8120
- function Ut(e, t) {
8121
- return Ut = Object.setPrototypeOf || function(r, n) {
7828
+ function zt(e, t) {
7829
+ return zt = Object.setPrototypeOf || function(r, n) {
8122
7830
  return r.__proto__ = n, r;
8123
- }, Ut(e, t);
7831
+ }, zt(e, t);
8124
7832
  }
8125
7833
  function gc() {
8126
7834
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
@@ -8137,7 +7845,7 @@ function Gt(e, t, s) {
8137
7845
  var l = [null];
8138
7846
  l.push.apply(l, a);
8139
7847
  var y = Function.bind.apply(n, l), h = new y();
8140
- return c && Ut(h, c.prototype), h;
7848
+ return c && zt(h, c.prototype), h;
8141
7849
  }, Gt.apply(null, arguments);
8142
7850
  }
8143
7851
  function pc(e) {
@@ -8163,7 +7871,7 @@ function Es(e) {
8163
7871
  writable: !0,
8164
7872
  configurable: !0
8165
7873
  }
8166
- }), Ut(n, r);
7874
+ }), zt(n, r);
8167
7875
  }, Es(e);
8168
7876
  }
8169
7877
  function rr(e) {
@@ -8209,7 +7917,7 @@ var Fn = function(t) {
8209
7917
  this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
8210
7918
  }, t;
8211
7919
  }(Es(Error));
8212
- function Ps(e) {
7920
+ function Ys(e) {
8213
7921
  return Array.isArray(e) ? e : [e];
8214
7922
  }
8215
7923
  function hc(e) {
@@ -8221,9 +7929,9 @@ function hc(e) {
8221
7929
  function yc(e) {
8222
7930
  return JSON.parse(JSON.stringify(e));
8223
7931
  }
8224
- var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g, wc = /\*+/, Bc = /\./g;
7932
+ var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g, Bc = /\*+/, wc = /\./g;
8225
7933
  function Mc(e, t, s) {
8226
- var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(Bc, "\\$&").replace(wc, n + r);
7934
+ var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(wc, "\\$&").replace(Bc, n + r);
8227
7935
  return t + e.length === s.length ? "(?:" + a + ")?" : a;
8228
7936
  }
8229
7937
  function Cc(e, t, s) {
@@ -8237,7 +7945,7 @@ function Dc(e) {
8237
7945
  }
8238
7946
  var xc = /* @__PURE__ */ function() {
8239
7947
  function e(s) {
8240
- this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 : Ps(s.fields), Object.defineProperty(this, "_fieldsPattern", {
7948
+ this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 : Ys(s.fields), Object.defineProperty(this, "_fieldsPattern", {
8241
7949
  writable: !0
8242
7950
  }), this.inverted = !!s.inverted, this.conditions = s.conditions, Object.defineProperty(this, "_matches", {
8243
7951
  writable: !0,
@@ -8292,14 +8000,14 @@ var jc = /* @__PURE__ */ function() {
8292
8000
  return this[de].indexedRules = a.rules, this[de].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", n), this;
8293
8001
  }, t.buildIndexFor = function(r) {
8294
8002
  for (var n = /* @__PURE__ */ Object.create(null), a = this[de].RuleType, c = !0, l = !1, y = 0; y < r.length; y++) {
8295
- var h = new a(r[y]), w = this.expandActions(h.actions), O = Ps(h.subject), S = r.length - y - 1;
8003
+ var h = new a(r[y]), B = this.expandActions(h.actions), O = Ys(h.subject), N = r.length - y - 1;
8296
8004
  c = !!(c && h.inverted), !l && h.fields && (l = !0);
8297
- for (var U = 0; U < O.length; U++) {
8298
- var $ = O[U];
8005
+ for (var z = 0; z < O.length; z++) {
8006
+ var $ = O[z];
8299
8007
  n[$] = n[$] || /* @__PURE__ */ Object.create(null);
8300
- for (var re = 0; re < w.length; re++) {
8301
- var me = w[re];
8302
- n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][S] = h;
8008
+ for (var re = 0; re < B.length; re++) {
8009
+ var me = B[re];
8010
+ n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][N] = h;
8303
8011
  }
8304
8012
  }
8305
8013
  }
@@ -8309,7 +8017,7 @@ var jc = /* @__PURE__ */ function() {
8309
8017
  rules: n
8310
8018
  };
8311
8019
  }, t.expandActions = function(r) {
8312
- for (var n = this[de].aliases, a = Ps(r), c = 0; c < a.length; ) {
8020
+ for (var n = this[de].aliases, a = Ys(r), c = 0; c < a.length; ) {
8313
8021
  var l = a[c++];
8314
8022
  n.hasOwnProperty(l) && (a = a.concat(n[l]));
8315
8023
  }
@@ -8373,7 +8081,7 @@ function Ol(e) {
8373
8081
  const t = Object.entries(nn).find(([, s]) => s === e);
8374
8082
  return t ? t[0] : e;
8375
8083
  }
8376
- function Pc(e) {
8084
+ function Yc(e) {
8377
8085
  return e.map((t) => ({
8378
8086
  ...t,
8379
8087
  subject: Ec(t.subject),
@@ -8381,15 +8089,15 @@ function Pc(e) {
8381
8089
  }));
8382
8090
  }
8383
8091
  function qn(e) {
8384
- return new jc(Pc(e));
8092
+ return new jc(Yc(e));
8385
8093
  }
8386
- function Yc(e, t) {
8094
+ function Pc(e, t) {
8387
8095
  return e.rulesFor(t.action, t.subject, t.field).some((s) => !s.inverted);
8388
8096
  }
8389
8097
  function In(e, t) {
8390
- return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Yc(e, t);
8098
+ return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Pc(e, t);
8391
8099
  }
8392
- function Ys(e, t) {
8100
+ function Ps(e, t) {
8393
8101
  const s = qn(t), r = (l) => s.can(l.action, l.subject, l.field) ? !0 : In(s, l) ? s.can(l.action, l.coverSubject, l.field) : !1, n = e.find((l) => !r(l));
8394
8102
  if (n) {
8395
8103
  const l = s.relevantRuleFor(
@@ -8407,7 +8115,7 @@ function Ys(e, t) {
8407
8115
  return { granted: !0, decisivePermission: a, decisiveRule: c ?? null };
8408
8116
  }
8409
8117
  function Gc(e, t) {
8410
- const s = Ys([e], t);
8118
+ const s = Ps([e], t);
8411
8119
  if (!s.granted)
8412
8120
  return { ...s, conditionEvaluation: "not_enforced" };
8413
8121
  const r = qn(t), n = In(r, e) ? e.coverSubject : void 0, a = [e.subject, n].filter(
@@ -8428,7 +8136,7 @@ function Gc(e, t) {
8428
8136
  }
8429
8137
  function Vc(e, t, s) {
8430
8138
  const r = arguments.length >= 3;
8431
- return Array.isArray(e) ? Ys(e, t) : r ? Gc(e, t) : Ys([e], t);
8139
+ return Array.isArray(e) ? Ps(e, t) : r ? Gc(e, t) : Ps([e], t);
8432
8140
  }
8433
8141
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8434
8142
  const Oc = () => {
@@ -8444,27 +8152,27 @@ function Fc(e, t, s) {
8444
8152
  shallow: c = !0,
8445
8153
  onError: l = Oc
8446
8154
  } = r, y = Qe(!n), h = c ? kn(t) : Qe(t);
8447
- let w = 0;
8155
+ let B = 0;
8448
8156
  return ir(async (O) => {
8449
8157
  if (!y.value)
8450
8158
  return;
8451
- w++;
8452
- const S = w;
8453
- let U = !1;
8159
+ B++;
8160
+ const N = B;
8161
+ let z = !1;
8454
8162
  a && Promise.resolve().then(() => {
8455
8163
  a.value = !0;
8456
8164
  });
8457
8165
  try {
8458
8166
  const $ = await e((re) => {
8459
8167
  O(() => {
8460
- a && (a.value = !1), U || re();
8168
+ a && (a.value = !1), z || re();
8461
8169
  });
8462
8170
  });
8463
- S === w && (h.value = $);
8171
+ N === B && (h.value = $);
8464
8172
  } catch ($) {
8465
8173
  l($);
8466
8174
  } finally {
8467
- a && S === w && (a.value = !1), U = !0;
8175
+ a && N === B && (a.value = !1), z = !0;
8468
8176
  }
8469
8177
  }), n ? Os(() => (y.value = !0, h.value)) : h;
8470
8178
  }
@@ -8541,38 +8249,38 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
8541
8249
  subtitle: "哎呀!您没有权限访问此页面。"
8542
8250
  }, Tc = {
8543
8251
  noPermission: kc
8544
- }, Sc = {
8252
+ }, Nc = {
8545
8253
  title: "存取被拒絕",
8546
8254
  subtitle: "哎呀!您沒有權限存取此頁面。"
8547
- }, Nc = {
8548
- noPermission: Sc
8255
+ }, Sc = {
8256
+ noPermission: Nc
8549
8257
  }, Zc = {
8550
8258
  title: "การเข้าถึงถูกปฏิเสธ",
8551
8259
  subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
8552
- }, Uc = {
8260
+ }, zc = {
8553
8261
  noPermission: Zc
8554
- }, zc = { class: "w-full h-full flex justify-center items-center" }, Wc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Lc = { class: "w-[300px] h-[300px]" }, Kc = ["src"], Jc = { class: "text-2xl" }, _c = { class: "text-xl" }, $c = /* @__PURE__ */ it({
8262
+ }, Uc = { class: "w-full h-full flex justify-center items-center" }, Wc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Lc = { class: "w-[300px] h-[300px]" }, Kc = ["src"], Jc = { class: "text-2xl" }, _c = { class: "text-xl" }, $c = /* @__PURE__ */ it({
8555
8263
  __name: "NoPermission",
8556
8264
  setup(e) {
8557
8265
  const { t } = dr({
8558
8266
  messages: {
8559
8267
  "en-US": Qc,
8560
8268
  "zh-CN": Tc,
8561
- "zh-Hant": Nc,
8562
- "th-TH": Uc
8269
+ "zh-Hant": Sc,
8270
+ "th-TH": zc
8563
8271
  }
8564
8272
  });
8565
- return (s, r) => (ct(), lr("div", zc, [
8566
- Ue("div", Wc, [
8567
- Ue("div", Lc, [
8568
- Ue("img", {
8569
- src: ze(Rc),
8273
+ return (s, r) => (ct(), lr("div", Uc, [
8274
+ ze("div", Wc, [
8275
+ ze("div", Lc, [
8276
+ ze("img", {
8277
+ src: Ue(Rc),
8570
8278
  class: "w-full h-full"
8571
8279
  }, null, 8, Kc)
8572
8280
  ]),
8573
- Ue("div", null, [
8574
- Ue("h1", Jc, Ws(ze(t)("noPermission.title")), 1),
8575
- Ue("h2", _c, Ws(ze(t)("noPermission.subtitle")), 1)
8281
+ ze("div", null, [
8282
+ ze("h1", Jc, Ws(Ue(t)("noPermission.title")), 1),
8283
+ ze("h2", _c, Ws(Ue(t)("noPermission.subtitle")), 1)
8576
8284
  ])
8577
8285
  ])
8578
8286
  ]));
@@ -8581,14 +8289,14 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
8581
8289
  __name: "PermissionWrapper",
8582
8290
  setup(e) {
8583
8291
  const t = Hc();
8584
- return (s, r) => ze(t) === ze(Gs).Denied ? (ct(), zt($c, { key: 0 })) : ze(t) === ze(Gs).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
8292
+ return (s, r) => Ue(t) === Ue(Gs).Denied ? (ct(), Ut($c, { key: 0 })) : Ue(t) === Ue(Gs).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
8585
8293
  }
8586
8294
  });
8587
8295
  function Kt(e) {
8588
8296
  return {
8589
8297
  inheritAttrs: !1,
8590
8298
  setup(t, { attrs: s }) {
8591
- return () => zs(el, {}, { default: () => zs(e, s) });
8299
+ return () => Us(el, {}, { default: () => Us(e, s) });
8592
8300
  }
8593
8301
  };
8594
8302
  }
@@ -8606,8 +8314,8 @@ function tl(e, t) {
8606
8314
  }
8607
8315
  }
8608
8316
  let n = null;
8609
- return Sn(e, async (a) => {
8610
- a && (await Nn(), r());
8317
+ return Nn(e, async (a) => {
8318
+ a && (await Sn(), r());
8611
8319
  }), ur(() => {
8612
8320
  window.addEventListener("resize", r), n = new ResizeObserver(r), n.observe(document.body);
8613
8321
  }), Zn(() => {
@@ -8627,7 +8335,7 @@ const sl = /* @__PURE__ */ it({
8627
8335
  return (a, c) => (ct(), lr("div", {
8628
8336
  ref_key: "wrapper",
8629
8337
  ref: s,
8630
- style: Un(n.value)
8338
+ style: zn(n.value)
8631
8339
  }, [
8632
8340
  cr(a.$slots, "default")
8633
8341
  ], 4));
@@ -8637,9 +8345,9 @@ const sl = /* @__PURE__ */ it({
8637
8345
  setup(e) {
8638
8346
  return (t, s) => {
8639
8347
  const r = Fs("FmCircularProgress");
8640
- return ct(), zt(sl, null, {
8641
- default: zn(() => [
8642
- Ue("div", rl, [
8348
+ return ct(), Ut(sl, null, {
8349
+ default: Un(() => [
8350
+ ze("div", rl, [
8643
8351
  Wn(r, { size: "xl" })
8644
8352
  ])
8645
8353
  ]),
@@ -8647,7 +8355,7 @@ const sl = /* @__PURE__ */ it({
8647
8355
  });
8648
8356
  };
8649
8357
  }
8650
- }), Be = (e) => Ln({
8358
+ }), we = (e) => Ln({
8651
8359
  loader: e,
8652
8360
  loadingComponent: nl
8653
8361
  });
@@ -8661,10 +8369,10 @@ const Et = (e) => ({
8661
8369
  }
8662
8370
  ]
8663
8371
  }
8664
- }), al = Kt(Be(() => import("./Main-DVTx58X9.js"))), ol = Kt(Be(() => import("./Main-ByWrRV70.js"))), il = Kt(
8665
- Be(() => import("./AuditLogList-NvISIfUq.js"))
8666
- ), cl = Kt(Be(() => import("./Main-LaAbAOfs.js"))), ll = Be(() => import("./ApprovalCodeList-rL8dh-6s.js")), ul = Be(() => import("./GrantUserList-DjZ4O0VB.js")), Al = Be(() => import("./EmployeeList-C3VvVY6A.js")), dl = Be(() => import("./RoleList-BDxgwmAV.js")), ml = Be(() => import("./TimesheetList-CdaxlO97.js")), gl = Be(() => import("./TeamMemberList-DrLbMN34.js")), pl = Be(
8667
- () => import("./PermissionSetList-DD45SSY3.js")
8372
+ }), al = Kt(we(() => import("./Main-CEKiyT80.js"))), ol = Kt(we(() => import("./Main-DrfRLxA5.js"))), il = Kt(
8373
+ we(() => import("./AuditLogList-CymSyHag.js"))
8374
+ ), cl = Kt(we(() => import("./Main-CQpEciKH.js"))), ll = we(() => import("./ApprovalCodeList-BWQBJGCZ.js")), ul = we(() => import("./GrantUserList-CaVpRVzA.js")), Al = we(() => import("./EmployeeList-BZ6fxRCN.js")), dl = we(() => import("./RoleList-C2PrTc1f.js")), ml = we(() => import("./TimesheetList-DgaZmgug.js")), gl = we(() => import("./TeamMemberList-BXk_pXjc.js")), pl = we(
8375
+ () => import("./PermissionSetList-BgOSJy4y.js")
8668
8376
  ), Fl = [
8669
8377
  {
8670
8378
  path: "/",
@@ -8822,9 +8530,9 @@ const Et = (e) => ({
8822
8530
  c.value !== l && (c.value = l);
8823
8531
  }), (l, y) => {
8824
8532
  const h = Fs("FmCollapsibleTabs");
8825
- return ct(), zt(h, {
8533
+ return ct(), Ut(h, {
8826
8534
  modelValue: c.value,
8827
- "onUpdate:modelValue": y[0] || (y[0] = (w) => c.value = w),
8535
+ "onUpdate:modelValue": y[0] || (y[0] = (B) => c.value = B),
8828
8536
  items: a.value,
8829
8537
  class: "py-16"
8830
8538
  }, null, 8, ["modelValue", "items"]);
@@ -8884,8 +8592,8 @@ var Vs = { exports: {} };
8884
8592
  }
8885
8593
  function F(k) {
8886
8594
  var j;
8887
- k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(z) {
8888
- z(j);
8595
+ k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(U) {
8596
+ U(j);
8889
8597
  })).then(M, G);
8890
8598
  }
8891
8599
  F((g = g.apply(f, [])).next());
@@ -8939,8 +8647,8 @@ var Vs = { exports: {} };
8939
8647
  continue;
8940
8648
  }
8941
8649
  j = u.call(f, M);
8942
- } catch (z) {
8943
- j = [6, z], g = 0;
8650
+ } catch (U) {
8651
+ j = [6, U], g = 0;
8944
8652
  } finally {
8945
8653
  i = A = 0;
8946
8654
  }
@@ -8986,18 +8694,18 @@ var Vs = { exports: {} };
8986
8694
  Object.keys(u || {}).includes(g) || i.push(g);
8987
8695
  }), Object.keys(i).length ? i : null;
8988
8696
  }
8989
- var w, O;
8990
- function S(f, u, i) {
8697
+ var B, O;
8698
+ function N(f, u, i) {
8991
8699
  var g = "shortString", A = !0;
8992
8700
  typeof i == "number" && (g = "javaDouble", A = !1), f[g] = f[g] || {}, f[g][u] = A ? i + "" : i;
8993
8701
  }
8994
- function U(f) {
8702
+ function z(f) {
8995
8703
  return !!f && typeof f == "object" && f.value !== void 0;
8996
8704
  }
8997
8705
  function $(f) {
8998
8706
  return Object.fromEntries(Object.entries(f).map(function(u) {
8999
8707
  var i = u[0], g = u[1];
9000
- return [i, U(g) ? g : { value: g }];
8708
+ return [i, z(g) ? g : { value: g }];
9001
8709
  }));
9002
8710
  }
9003
8711
  function re(f) {
@@ -9005,15 +8713,15 @@ var Vs = { exports: {} };
9005
8713
  }
9006
8714
  (function(f) {
9007
8715
  f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
9008
- })(w || (w = {}));
9009
- var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Se = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
8716
+ })(B || (B = {}));
8717
+ var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Ne = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
9010
8718
  function f(u) {
9011
8719
  var i = this;
9012
8720
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
9013
8721
  var g = i, A = g.api, b = g.evaluationContext;
9014
8722
  i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(n(n({}, i.loadingState), { isFetching: !0 }));
9015
8723
  var M = "".concat(i.getContext().identity), G = function(F) {
9016
- var k, j, z, ce;
8724
+ var k, j, U, ce;
9017
8725
  if (F && M === "".concat(i.getContext().identity)) {
9018
8726
  var Me = F.flags, ge = F.traits, ve = F.identifier;
9019
8727
  i.isLoading = !1;
@@ -9024,13 +8732,13 @@ var Vs = { exports: {} };
9024
8732
  fe[W.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: W.transient, value: W.trait_value };
9025
8733
  }), i.oldFlags = n({}, i.flags);
9026
8734
  var Ce = h(i.oldFlags, pe), dt = h((k = i.evaluationContext.identity) === null || k === void 0 ? void 0 : k.traits, fe);
9027
- if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
8735
+ if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null, B.SERVER)), i.datadogRum) try {
9028
8736
  if (i.datadogRum.trackTraits) {
9029
8737
  var mt = {};
9030
8738
  Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(W) {
9031
8739
  mt[ut + W] = i.getTrait(W);
9032
8740
  });
9033
- var _e = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((z = i.evaluationContext.identity) === null || z === void 0 ? void 0 : z.identifier) }), mt);
8741
+ var _e = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((U = i.evaluationContext.identity) === null || U === void 0 ? void 0 : U.identifier) }), mt);
9034
8742
  i.log("Setting Datadog user", _e), i.datadogRum.client.setUser(_e);
9035
8743
  }
9036
8744
  } catch (W) {
@@ -9039,9 +8747,9 @@ var Vs = { exports: {} };
9039
8747
  if (i.dtrum) try {
9040
8748
  var le = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
9041
8749
  Object.keys(i.flags).map(function(W) {
9042
- S(le, lt + W, i.getValue(W, { skipAnalytics: !0 })), S(le, Dt + W, i.hasFeature(W, { skipAnalytics: !0 }));
8750
+ N(le, lt + W, i.getValue(W, { skipAnalytics: !0 })), N(le, Dt + W, i.hasFeature(W, { skipAnalytics: !0 }));
9043
8751
  }), Object.keys(((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.traits) || {}).map(function(W) {
9044
- S(le, ut + W, i.getTrait(W));
8752
+ N(le, ut + W, i.getTrait(W));
9045
8753
  }), i.log("Sending javaLongOrObject traits to dynatrace", le.javaLongOrObject), i.log("Sending date traits to dynatrace", le.date), i.log("Sending shortString traits to dynatrace", le.shortString), i.log("Sending javaDouble to dynatrace", le.javaDouble), i.dtrum.sendSessionProperties(le.javaLongOrObject, le.date, le.shortString, le.javaDouble);
9046
8754
  } catch (W) {
9047
8755
  console.error(W);
@@ -9071,7 +8779,7 @@ var Vs = { exports: {} };
9071
8779
  }).catch(function(A) {
9072
8780
  i.log("Exception fetching evaluationEvent", A);
9073
8781
  }) : void 0;
9074
- }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
8782
+ }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: B.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
9075
8783
  var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
9076
8784
  if (M && (G = M.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
9077
8785
  if (A != null && A.json) try {
@@ -9103,7 +8811,7 @@ var Vs = { exports: {} };
9103
8811
  var A;
9104
8812
  if (i.api) return i.setContext(n(n({}, i.evaluationContext), { identity: n(n({}, i.evaluationContext.identity), { traits: n(n({}, (A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits), Object.fromEntries(Object.entries(g).map(function(b) {
9105
8813
  var M = b[0], G = b[1];
9106
- return [M, U(G) ? G : { value: G }];
8814
+ return [M, z(G) ? G : { value: G }];
9107
8815
  }))) }) }));
9108
8816
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
9109
8817
  }, this.hasFeature = function(g, A) {
@@ -9118,10 +8826,10 @@ var Vs = { exports: {} };
9118
8826
  var F = G.headers, k = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
9119
8827
  i.evaluationContext.environment && (k.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), A && A !== "GET" && (k.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(k.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
9120
8828
  var j = "".concat((M = i.evaluationContext.identity) === null || M === void 0 ? void 0 : M.identifier);
9121
- return O(g, k).then(function(z) {
8829
+ return O(g, k).then(function(U) {
9122
8830
  var ce, Me, ge = "".concat((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.identifier);
9123
8831
  if (j === ge) {
9124
- var ve = (Me = z.headers) === null || Me === void 0 ? void 0 : Me.get("x-flagsmith-document-updated-at");
8832
+ var ve = (Me = U.headers) === null || Me === void 0 ? void 0 : Me.get("x-flagsmith-document-updated-at");
9125
8833
  if (ve) try {
9126
8834
  var pe = parseFloat(ve);
9127
8835
  if (isNaN(pe)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
@@ -9129,13 +8837,13 @@ var Vs = { exports: {} };
9129
8837
  } catch (fe) {
9130
8838
  i.log(fe, "Failed to parse x-flagsmith-document-updated-at", ve);
9131
8839
  }
9132
- return i.log("Fetch response: " + z.status + " " + (A || "GET") + 0 + g), z.text().then(function(fe) {
8840
+ return i.log("Fetch response: " + U.status + " " + (A || "GET") + 0 + g), U.text().then(function(fe) {
9133
8841
  var Ce = fe;
9134
8842
  try {
9135
8843
  Ce = JSON.parse(fe);
9136
8844
  } catch {
9137
8845
  }
9138
- return !Ce && z.status && (Ce = "API Response: ".concat(z.status)), z.status && z.status >= 200 && z.status < 300 ? Ce : Promise.reject(new Error(Ce));
8846
+ return !Ce && U.status && (Ce = "API Response: ".concat(U.status)), U.status && U.status >= 200 && U.status < 300 ? Ce : Promise.reject(new Error(Ce));
9139
8847
  });
9140
8848
  }
9141
8849
  i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ge));
@@ -9154,32 +8862,32 @@ var Vs = { exports: {} };
9154
8862
  return f.prototype.init = function(u) {
9155
8863
  var i, g, A;
9156
8864
  return a(this, void 0, void 0, function() {
9157
- var b, M, G, F, k, j, z, ce, Me, ge, ve, pe, fe, Ce, dt, mt, _e, le, W, _t, gt, Qs, $e, $t, ks, Ts, es, Ss, ts, pt, et, Ns, ue = this;
9158
- return c(this, function(we) {
9159
- switch (we.label) {
8865
+ var b, M, G, F, k, j, U, ce, Me, ge, ve, pe, fe, Ce, dt, mt, _e, le, W, _t, gt, Qs, $e, $t, ks, Ts, es, Ns, ts, pt, et, Ss, ue = this;
8866
+ return c(this, function(Be) {
8867
+ switch (Be.label) {
9160
8868
  case 0:
9161
- b = re(u.evaluationContext || this.evaluationContext), we.label = 1;
8869
+ b = re(u.evaluationContext || this.evaluationContext), Be.label = 1;
9162
8870
  case 1:
9163
- if (we.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Se : G, k = u.headers, j = u.onChange, z = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, _e = u.eventSourceUrl, le = _e === void 0 ? "https://realtime.flagsmith.com/" : _e, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, $e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
8871
+ if (Be.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Ne : G, k = u.headers, j = u.onChange, U = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, _e = u.eventSourceUrl, le = _e === void 0 ? "https://realtime.flagsmith.com/" : _e, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, $e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
9164
8872
  if (b.identity = _t || gt ? { identifier: _t, traits: gt ? Object.fromEntries(Object.entries(gt).map(function(he) {
9165
8873
  return [he[0], { value: he[1] }];
9166
8874
  })) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = k, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, es = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = ks || this._trigger, this._triggerLoadingState = Ts || this._triggerLoadingState, this.onError = function(he) {
9167
8875
  ue.setLoadingState(n(n({}, ue.loadingState), { isFetching: !1, isLoading: !1, error: he })), Me == null || Me(he);
9168
- }, this.enableLogs = fe || !1, this.cacheOptions = $e ? { skipAPI: !!$e.skipAPI, ttl: $e.ttl || 0, storageKey: $e.storageKey, loadStale: !!$e.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!z, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), $t && (O = /* @__PURE__ */ function(he) {
8876
+ }, this.enableLogs = fe || !1, this.cacheOptions = $e ? { skipAPI: !!$e.skipAPI, ttl: $e.ttl || 0, storageKey: $e.storageKey, loadStale: !!$e.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!U, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: B.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), $t && (O = /* @__PURE__ */ function(he) {
9169
8877
  return function(De, xe) {
9170
8878
  var Ie = xe.headers, K = xe.method, tt = xe.body;
9171
- return new Promise(function(Ne) {
8879
+ return new Promise(function(Se) {
9172
8880
  switch (K) {
9173
8881
  case "GET":
9174
8882
  return he.get(De, { headers: Ie }).subscribe(function(Oe) {
9175
- Ne({ ok: !0, text: function() {
8883
+ Se({ ok: !0, text: function() {
9176
8884
  return Promise.resolve(Oe);
9177
8885
  } });
9178
8886
  });
9179
8887
  case "POST":
9180
8888
  case "PUT":
9181
8889
  return he.post(De, tt, { headers: Ie }).subscribe(function(Oe) {
9182
- Ne({ ok: !0, text: function() {
8890
+ Se({ ok: !0, text: function() {
9183
8891
  return Promise.resolve(Oe);
9184
8892
  } });
9185
8893
  });
@@ -9201,20 +8909,20 @@ var Vs = { exports: {} };
9201
8909
  ue.log("Retrieved events from cache", De), ue.setState(n(n({}, Ie), { evaluationEvent: xe[ue.evaluationContext.environment.apiKey] }));
9202
8910
  }
9203
8911
  }
9204
- })), !z) return [3, 9];
8912
+ })), !U) return [3, 9];
9205
8913
  if (!ne || !this.canUseStorage) return [3, 8];
9206
- Ss = function(he, De) {
8914
+ Ns = function(he, De) {
9207
8915
  return a(ue, void 0, void 0, function() {
9208
- var xe, Ie, K, tt, Ne, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, Us = this;
8916
+ var xe, Ie, K, tt, Se, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, zs = this;
9209
8917
  return c(this, function(He) {
9210
8918
  switch (He.label) {
9211
8919
  case 0:
9212
8920
  if (!De) return [3, 7];
9213
8921
  xe = null, Ie = null, He.label = 1;
9214
8922
  case 1:
9215
- return He.trys.push([1, 5, , 6]), K = JSON.parse(De), tt = !1, Ne = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Ne = !0, Oe = !0)), Oe && (tt = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), tt ? (ss = !pe && (!this.cacheOptions.skipAPI || Ne), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, w.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && tt && !Ne && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
8923
+ return He.trys.push([1, 5, , 6]), K = JSON.parse(De), tt = !1, Se = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Se = !0, Oe = !0)), Oe && (tt = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), tt ? (ss = !pe && (!this.cacheOptions.skipAPI || Se), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, B.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && tt && !Se && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
9216
8924
  var bs;
9217
- (bs = Us.onError) === null || bs === void 0 || bs.call(Us, Hn);
8925
+ (bs = zs.onError) === null || bs === void 0 || bs.call(zs, Hn);
9218
8926
  }), [3, 4]) : [3, 2];
9219
8927
  case 2:
9220
8928
  return pe ? [3, 4] : [4, this.getFlags()];
@@ -9231,10 +8939,10 @@ var Vs = { exports: {} };
9231
8939
  case 8:
9232
8940
  return He.sent(), [3, 10];
9233
8941
  case 9:
9234
- if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
8942
+ if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
9235
8943
  else {
9236
8944
  if (!this.flags) throw new Error(es);
9237
- this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
8945
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
9238
8946
  }
9239
8947
  He.label = 10;
9240
8948
  case 10:
@@ -9242,32 +8950,32 @@ var Vs = { exports: {} };
9242
8950
  }
9243
8951
  });
9244
8952
  });
9245
- }, we.label = 2;
8953
+ }, Be.label = 2;
9246
8954
  case 2:
9247
- return we.trys.push([2, 7, , 8]), ne.getItemSync ? (ts = ne.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
8955
+ return Be.trys.push([2, 7, , 8]), ne.getItemSync ? (ts = ne.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
9248
8956
  case 3:
9249
8957
  return [4, ne.getItem(this.getStorageKey())];
9250
8958
  case 4:
9251
- ts = we.sent(), we.label = 5;
8959
+ ts = Be.sent(), Be.label = 5;
9252
8960
  case 5:
9253
- return [4, Ss(null, ts)];
8961
+ return [4, Ns(null, ts)];
9254
8962
  case 6:
9255
8963
  case 7:
9256
- return we.sent(), [3, 8];
8964
+ return Be.sent(), [3, 8];
9257
8965
  case 8:
9258
8966
  return [3, 12];
9259
8967
  case 9:
9260
8968
  return pe ? [3, 11] : [4, this.getFlags()];
9261
8969
  case 10:
9262
- return we.sent(), [3, 12];
8970
+ return Be.sent(), [3, 12];
9263
8971
  case 11:
9264
- if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
9265
- else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt, w.DEFAULT_FLAGS)), pt)) throw new Error(pt);
9266
- we.label = 12;
8972
+ if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
8973
+ else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt, B.DEFAULT_FLAGS)), pt)) throw new Error(pt);
8974
+ Be.label = 12;
9267
8975
  case 12:
9268
8976
  return [3, 14];
9269
8977
  case 13:
9270
- throw et = we.sent(), this.log("Error during initialisation ", et), Ns = et instanceof Error ? et : new Error("".concat(et)), (A = this.onError) === null || A === void 0 || A.call(this, Ns), et;
8978
+ throw et = Be.sent(), this.log("Error during initialisation ", et), Ss = et instanceof Error ? et : new Error("".concat(et)), (A = this.onError) === null || A === void 0 || A.call(this, Ss), et;
9271
8979
  case 14:
9272
8980
  return [2];
9273
8981
  }
@@ -9278,12 +8986,12 @@ var Vs = { exports: {} };
9278
8986
  }, f.prototype.identify = function(u, i, g) {
9279
8987
  return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(A) {
9280
8988
  var b = A[0], M = A[1];
9281
- return [b, U(M) ? M : { value: M }];
8989
+ return [b, z(M) ? M : { value: M }];
9282
8990
  }))), this.initialised ? this.getFlags() : Promise.resolve();
9283
8991
  }, f.prototype.getState = function() {
9284
8992
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
9285
8993
  }, f.prototype.setState = function(u) {
9286
- u && (this.initialised = !0, this.api = u.api || this.api || Se, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
8994
+ u && (this.initialised = !0, this.api = u.api || this.api || Ne, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
9287
8995
  }, f.prototype.logout = function() {
9288
8996
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
9289
8997
  }, f.prototype.startListening = function(u) {
@@ -9328,7 +9036,7 @@ var Vs = { exports: {} };
9328
9036
  var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
9329
9037
  return new At({ fetch: u, AsyncStorage: i, eventSource: g });
9330
9038
  }
9331
- var p, B = (p = function(f, u) {
9039
+ var p, w = (p = function(f, u) {
9332
9040
  return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
9333
9041
  i.__proto__ = g;
9334
9042
  } || function(i, g) {
@@ -9363,7 +9071,7 @@ var Vs = { exports: {} };
9363
9071
  }
9364
9072
  }
9365
9073
  return M;
9366
- }, Y = function(f, u, i) {
9074
+ }, P = function(f, u, i) {
9367
9075
  if (arguments.length === 2) for (var g, A = 0, b = u.length; A < b; A++) !g && A in u || (g || (g = Array.prototype.slice.call(u, 0, A)), g[A] = u[A]);
9368
9076
  return f.concat(g || Array.prototype.slice.call(u));
9369
9077
  }, q = function(f) {
@@ -9371,7 +9079,7 @@ var Vs = { exports: {} };
9371
9079
  return f.call(this, `EventSource not available.
9372
9080
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
9373
9081
  }
9374
- return B(u, f), u;
9082
+ return w(u, f), u;
9375
9083
  }(Error), R = function() {
9376
9084
  function f(u, i) {
9377
9085
  var g = this;
@@ -9421,7 +9129,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9421
9129
  u && u.lastEventId && (this._lastEventId = u.lastEventId);
9422
9130
  var A = this._listeners[u.type];
9423
9131
  if (A != null) try {
9424
- for (var b = D(Y([], E(A), !1)), M = b.next(); !M.done; M = b.next())
9132
+ for (var b = D(P([], E(A), !1)), M = b.next(); !M.done; M = b.next())
9425
9133
  M.value.call(this, u);
9426
9134
  } catch (G) {
9427
9135
  i = { error: G };
@@ -9441,7 +9149,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9441
9149
  }, f.prototype.addEventListener = function(u, i, g) {
9442
9150
  this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
9443
9151
  var A = this._listeners[u];
9444
- A.includes(i) || (this._listeners[u] = Y(Y([], E(A), !1), [i], !1));
9152
+ A.includes(i) || (this._listeners[u] = P(P([], E(A), !1), [i], !1));
9445
9153
  }, f.prototype.removeEventListener = function(u, i, g) {
9446
9154
  var A = this._listeners[u];
9447
9155
  this._listeners[u] = A.filter(function(b) {
@@ -9470,8 +9178,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9470
9178
  } } };
9471
9179
  };
9472
9180
  for (var k in A.open(u.method || "get", f, !0), A.onload = function() {
9473
- A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, z, ce) {
9474
- b.push(z = z.toLowerCase()), M.push([z, ce]), G[z] = G[z] ? G[z] + "," + ce : ce;
9181
+ A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, U, ce) {
9182
+ b.push(U = U.toLowerCase()), M.push([U, ce]), G[U] = G[U] ? G[U] + "," + ce : ce;
9475
9183
  }), i(F());
9476
9184
  }, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(k, u.headers[k]);
9477
9185
  A.send(u.body || null);
@@ -9586,57 +9294,57 @@ var hl = Vs.exports, yl = {
9586
9294
  reset() {
9587
9295
  this.flagsmithClient = null, this.userContext = null;
9588
9296
  }
9589
- }, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1), Pt = Qe([]), st = Qe(null);
9590
- function wl(e = vl) {
9591
- const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, O = []) => {
9297
+ }, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1), Yt = Qe([]), st = Qe(null);
9298
+ function Bl(e = vl) {
9299
+ const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (B, O = []) => {
9592
9300
  if (ht.value) {
9593
9301
  console.warn("FeatureFlag is already initialized.");
9594
9302
  return;
9595
9303
  }
9596
9304
  try {
9597
- await e.init(w, O), Pt.value = await e.getFlags(), ht.value = !0, st.value = null;
9598
- } catch (S) {
9599
- console.error("Failed to initialize feature flags:", S), st.value = S;
9305
+ await e.init(B, O), Yt.value = await e.getFlags(), ht.value = !0, st.value = null;
9306
+ } catch (N) {
9307
+ console.error("Failed to initialize feature flags:", N), st.value = N;
9600
9308
  }
9601
- }, r = async (w) => {
9309
+ }, r = async (B) => {
9602
9310
  if (t())
9603
9311
  try {
9604
- await e.setUser(w), Pt.value = await e.getFlags(), st.value = null;
9312
+ await e.setUser(B), Yt.value = await e.getFlags(), st.value = null;
9605
9313
  } catch (O) {
9606
9314
  console.error("Failed to set user:", O), st.value = O;
9607
9315
  }
9608
- }, n = async (w) => r(`${or}-${w}`), a = (w, O, S = null) => {
9609
- if (!t()) return S;
9316
+ }, n = async (B) => r(`${or}-${B}`), a = (B, O, N = null) => {
9317
+ if (!t()) return N;
9610
9318
  try {
9611
- return e.getFlagValue(w, O) ?? S;
9612
- } catch (U) {
9613
- return console.error(`Error getting flag value for ${w}:`, U), S;
9319
+ return e.getFlagValue(B, O) ?? N;
9320
+ } catch (z) {
9321
+ return console.error(`Error getting flag value for ${B}:`, z), N;
9614
9322
  }
9615
- }, c = (w, O) => {
9323
+ }, c = (B, O) => {
9616
9324
  if (!t()) return O ?? null;
9617
9325
  try {
9618
- return e.getFlag(w) ?? O ?? null;
9619
- } catch (S) {
9620
- return console.error(`Error getting flag for ${w}:`, S), O ?? null;
9326
+ return e.getFlag(B) ?? O ?? null;
9327
+ } catch (N) {
9328
+ return console.error(`Error getting flag for ${B}:`, N), O ?? null;
9621
9329
  }
9622
- }, l = async (w, O, S = null, U) => {
9623
- if (!t()) return S;
9330
+ }, l = async (B, O, N = null, z) => {
9331
+ if (!t()) return N;
9624
9332
  try {
9625
- return await e.getUserFlagValue(w, O, S, U);
9333
+ return await e.getUserFlagValue(B, O, N, z);
9626
9334
  } catch ($) {
9627
- return console.error(`Error getting user flag value for ${O}:`, $), S;
9335
+ return console.error(`Error getting user flag value for ${O}:`, $), N;
9628
9336
  }
9629
- }, y = async (w, O, S = null, U) => l(`${or}-${w}`, O, S, U), h = () => {
9337
+ }, y = async (B, O, N = null, z) => l(`${or}-${B}`, O, N, z), h = () => {
9630
9338
  try {
9631
9339
  e.reset();
9632
- } catch (w) {
9633
- console.error("Error resetting feature flags:", w);
9340
+ } catch (B) {
9341
+ console.error("Error resetting feature flags:", B);
9634
9342
  } finally {
9635
- Pt.value = [], ht.value = !1, st.value = null;
9343
+ Yt.value = [], ht.value = !1, st.value = null;
9636
9344
  }
9637
9345
  };
9638
9346
  return {
9639
- flags: vs(Pt),
9347
+ flags: vs(Yt),
9640
9348
  isInitialized: vs(ht),
9641
9349
  error: vs(st),
9642
9350
  init: s,
@@ -9649,18 +9357,18 @@ function wl(e = vl) {
9649
9357
  reset: h
9650
9358
  };
9651
9359
  }
9652
- var Bl = () => wl();
9360
+ var wl = () => Bl();
9653
9361
  const ql = /* @__PURE__ */ it({
9654
9362
  __name: "App",
9655
9363
  setup(e) {
9656
- const t = Ar(), { init: s } = Bl();
9364
+ const t = Ar(), { init: s } = wl();
9657
9365
  return ur(async () => {
9658
9366
  t.registerSidebarComponent(fl), await s({
9659
9367
  apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
9660
9368
  });
9661
9369
  }), (r, n) => {
9662
9370
  const a = Fs("RouterView");
9663
- return ct(), zt(a);
9371
+ return ct(), Ut(a);
9664
9372
  };
9665
9373
  }
9666
9374
  }), Il = () => {
@@ -9685,13 +9393,13 @@ const ql = /* @__PURE__ */ it({
9685
9393
  );
9686
9394
  };
9687
9395
  export {
9688
- Pl as A,
9396
+ Yl as A,
9689
9397
  Vl as G,
9690
- Ua as O,
9398
+ za as O,
9691
9399
  ic as P,
9692
9400
  te as R,
9693
- Yl as S,
9694
- Na as U,
9401
+ Pl as S,
9402
+ Sa as U,
9695
9403
  sl as _,
9696
9404
  nl as a,
9697
9405
  v as b,
@@ -9707,5 +9415,5 @@ export {
9707
9415
  Ol as m,
9708
9416
  o as n,
9709
9417
  Fl as r,
9710
- Bl as u
9418
+ wl as u
9711
9419
  };