@feedmepos/mf-hrm-portal 2.0.24 → 2.0.25-dev.2

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 (36) hide show
  1. package/dist/AuditLogList-UHJxYRdr.js +1145 -0
  2. package/dist/{EmployeeList-DCjDgFLf.js → EmployeeList-Cpv6Pc4J.js} +78 -78
  3. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
  4. package/dist/{Main-DWXAa4Zw.js → Main-3IwCguRi.js} +6 -6
  5. package/dist/Main-Da2SFU8t.js +94 -0
  6. package/dist/{Main-B-4Hty-_.js → Main-DrquIYbM.js} +1142 -1138
  7. package/dist/{PermissionSetList-DE1vPSOS.js → PermissionSetList-upvouEfb.js} +92 -91
  8. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DWqxG7LZ.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CAjf-JPW.js} +1101 -1101
  9. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-Duq1Ltmf.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-sueNu2MD.js} +1 -1
  10. package/dist/{RoleList-CDZ0CwPn.js → RoleList-CgSg0ydf.js} +7 -7
  11. package/dist/SelectFilter-ATOm0hdn.js +269 -0
  12. package/dist/{TeamMemberList-CGN9PqHo.js → TeamMemberList-jEODaxFX.js} +12 -12
  13. package/dist/{TimesheetList-CENyYssG.js → TimesheetList-CMqKNZOd.js} +10 -10
  14. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-B1bqLX3y.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-ekr2tKEO.js} +2 -2
  15. package/dist/{app-CpPiF3az.js → app-D5h3x9dh.js} +655 -634
  16. package/dist/app.js +1 -1
  17. package/dist/{dayjs.min-DROzhzjn.js → dayjs.min-BLtrWiQ_.js} +1 -1
  18. package/dist/{employee-hCtzhfBQ.js → employee-CpW9HMLY.js} +3 -3
  19. package/dist/{iteration-CHhRGYug.js → iteration-D1WDQ_Kv.js} +3 -3
  20. package/dist/{lodash-BHaHINha.js → lodash-BI_MmDQa.js} +1 -1
  21. package/dist/{rule-CKp_xSn-.js → rule-DG8tt7hf.js} +2 -2
  22. package/dist/src/api/audit-log/index.d.ts +17 -0
  23. package/dist/src/components/form/SelectFilter.vue.d.ts +3 -0
  24. package/dist/src/stores/team.d.ts +4 -1
  25. package/dist/src/views/audit-log/locales/index.d.ts +24 -16
  26. package/dist/src/views/hr/locales/index.d.ts +4 -0
  27. package/dist/src/views/team/locales/index.d.ts +4 -0
  28. package/dist/style.css +1 -1
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/dist/{useAppStore-DT1XvZDd.js → useAppStore-hU1uAhE-.js} +1 -1
  31. package/dist/{useLoading-CPT4hekh.js → useLoading-D0XTdxji.js} +1 -1
  32. package/dist/{useReportPermissions-DeR0m-om.js → useReportPermissions-Drb4irzE.js} +3 -3
  33. package/package.json +1 -1
  34. package/dist/AuditLogList-DiVmHoNT.js +0 -1037
  35. package/dist/Main-D1Pazgt0.js +0 -90
  36. package/dist/SelectFilter-DUj7GBtT.js +0 -251
@@ -1,9 +1,9 @@
1
1
  var _s = Object.defineProperty;
2
2
  var $s = (e, A, m) => A in e ? _s(e, A, { enumerable: !0, configurable: !0, writable: !0, value: m }) : e[A] = m;
3
3
  var Ze = (e, A, m) => $s(e, typeof A != "symbol" ? A + "" : A, m);
4
- import { isRef as en, ref as ve, shallowRef as tn, watchEffect as Wt, computed as jt, h as Qt, defineComponent as xe, createBlock as ke, renderSlot as Tt, createCommentVNode as sn, unref as Me, openBlock as Ve, createElementBlock as St, createElementVNode as we, toDisplayString as It, watch as nn, nextTick as rn, onMounted as kt, onBeforeUnmount as an, normalizeStyle as on, resolveComponent as Gt, withCtx as ln, createVNode as cn, defineAsyncComponent as An, readonly as vt } from "vue";
5
- import { useBreakpoints as un } from "@feedmepos/ui-library";
6
- import { useRoute as mn, useRouter as gn } from "vue-router";
4
+ import { isRef as er, ref as he, shallowRef as tr, watchEffect as Wt, computed as jt, h as Qt, defineComponent as xe, createBlock as ke, renderSlot as St, createCommentVNode as sr, unref as Ce, openBlock as Ve, createElementBlock as Tt, createElementVNode as Me, toDisplayString as It, watch as rr, nextTick as nr, onMounted as kt, onBeforeUnmount as ar, normalizeStyle as or, resolveComponent as Gt, withCtx as ir, createVNode as lr, defineAsyncComponent as cr, readonly as vt } from "vue";
5
+ import { useBreakpoints as Ar } from "@feedmepos/ui-library";
6
+ import { useRoute as ur, useRouter as mr } from "vue-router";
7
7
  import { useCoreStore as Yt, useI18n as Kt } from "@feedmepos/mf-common";
8
8
  const Lt = {
9
9
  predefinedRanges: {
@@ -21,13 +21,16 @@ const Lt = {
21
21
  dateRange: {
22
22
  placeholder: "Select date range"
23
23
  },
24
+ user: {
25
+ feedmeAdmin: "FeedMe Admin"
26
+ },
24
27
  filter: {
25
28
  user_placeholder: "User",
26
29
  selected_user_prefix: "User: ",
27
30
  subject_placeholder: "Subject",
28
31
  selected_subject_prefix: "Subject: ",
29
- action_placeholder: "Action",
30
- selected_action_prefix: "Action: ",
32
+ action_placeholder: "Action Type",
33
+ selected_action_prefix: "Action Type: ",
31
34
  status_placeholder: "Status",
32
35
  selected_status_prefix: "Status: ",
33
36
  outcome_placeholder: "Status",
@@ -48,14 +51,14 @@ const Lt = {
48
51
  payment: "Payment",
49
52
  menu: "Menu",
50
53
  crm: "CRM",
54
+ other: "Other",
51
55
  more: "More"
52
56
  },
53
57
  columns: {
54
58
  timestamp: "Date",
55
59
  user: "User",
56
- role: "Role",
57
60
  subject: "Subject",
58
- action: "Action",
61
+ action: "Action Description",
59
62
  operation: "Operation",
60
63
  outcome: "Status"
61
64
  },
@@ -87,8 +90,8 @@ const Lt = {
87
90
  timestamp: "Date",
88
91
  userName: "User Name",
89
92
  userPhone: "Phone",
90
- subject: "Role",
91
- action: "Action",
93
+ subject: "Subject",
94
+ action: "Action Description",
92
95
  operation: "Operation",
93
96
  outcome: "Status",
94
97
  businessId: "Business ID",
@@ -106,14 +109,13 @@ const Lt = {
106
109
  email: "E-mail",
107
110
  action: "Action",
108
111
  operation: "Operation",
109
- role: "Role",
110
112
  subject: "Subject",
111
113
  field: "Field",
112
114
  outcome: "Outcome",
113
115
  business: "Business",
114
116
  restaurant: "Restaurant",
115
- changeDetails: "Change Details",
116
- eventType: "Event Type",
117
+ eventDetails: "Event Details",
118
+ actionDescription: "Action Description",
117
119
  metadata: "Metadata",
118
120
  reason: "Reason",
119
121
  resolvedFrom: "Resolved From",
@@ -134,14 +136,14 @@ const Lt = {
134
136
  requestPath: "Request Path",
135
137
  requestBody: "Request Body"
136
138
  }
137
- }, dn = {
139
+ }, gr = {
138
140
  date: Lt,
139
141
  auditLog: Jt
140
- }, pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ }, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
141
143
  __proto__: null,
142
144
  auditLog: Jt,
143
145
  date: Lt,
144
- default: dn
146
+ default: gr
145
147
  }, Symbol.toStringTag, { value: "Module" })), _t = {
146
148
  predefinedRanges: {
147
149
  today: "วันนี้",
@@ -158,6 +160,9 @@ const Lt = {
158
160
  dateRange: {
159
161
  placeholder: "เลือกช่วงวันที่"
160
162
  },
163
+ user: {
164
+ feedmeAdmin: "ผู้ดูแล FeedMe"
165
+ },
161
166
  filter: {
162
167
  user_placeholder: "ผู้ใช้",
163
168
  selected_user_prefix: "ผู้ใช้: ",
@@ -185,12 +190,12 @@ const Lt = {
185
190
  payment: "การชำระเงิน",
186
191
  menu: "เมนู",
187
192
  crm: "CRM",
193
+ other: "อื่นๆ",
188
194
  more: "เพิ่มเติม"
189
195
  },
190
196
  columns: {
191
197
  timestamp: "วันที่",
192
198
  user: "ผู้ใช้",
193
- role: "ตำแหน่ง",
194
199
  subject: "หัวข้อ",
195
200
  action: "การดำเนินการ",
196
201
  operation: "รายละเอียดการดำเนินการ",
@@ -243,14 +248,13 @@ const Lt = {
243
248
  email: "อีเมล",
244
249
  action: "การดำเนินการ",
245
250
  operation: "รายละเอียดการดำเนินการ",
246
- role: "ตำแหน่ง",
247
251
  subject: "หัวข้อ",
248
252
  field: "ฟิลด์",
249
253
  outcome: "ผลลัพธ์",
250
254
  business: "ธุรกิจ",
251
255
  restaurant: "ร้านอาหาร",
252
- changeDetails: "รายละเอียดการเปลี่ยนแปลง",
253
- eventType: "การดำเนินการ",
256
+ eventDetails: "รายละเอียดเหตุการณ์",
257
+ actionDescription: "คำอธิบายการกระทำ",
254
258
  metadata: "ข้อมูลเพิ่มเติม",
255
259
  reason: "เหตุผล",
256
260
  resolvedFrom: "แก้ไขจาก",
@@ -272,14 +276,14 @@ const Lt = {
272
276
  requestPath: "URL ที่เข้าถึง",
273
277
  requestBody: "เนื้อหาคำขอ"
274
278
  }
275
- }, bn = {
279
+ }, pr = {
276
280
  date: _t,
277
281
  auditLog: $t
278
- }, fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
282
+ }, br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
279
283
  __proto__: null,
280
284
  auditLog: $t,
281
285
  date: _t,
282
- default: bn
286
+ default: pr
283
287
  }, Symbol.toStringTag, { value: "Module" })), es = {
284
288
  predefinedRanges: {
285
289
  today: "今天",
@@ -296,13 +300,16 @@ const Lt = {
296
300
  dateRange: {
297
301
  placeholder: "选择日期范围"
298
302
  },
303
+ user: {
304
+ feedmeAdmin: "FeedMe 管理员"
305
+ },
299
306
  filter: {
300
307
  user_placeholder: "用户",
301
308
  selected_user_prefix: "用户: ",
302
309
  subject_placeholder: "主题",
303
310
  selected_subject_prefix: "主题: ",
304
- action_placeholder: "操作",
305
- selected_action_prefix: "操作: ",
311
+ action_placeholder: "操作类型",
312
+ selected_action_prefix: "操作类型: ",
306
313
  status_placeholder: "状态",
307
314
  selected_status_prefix: "状态: ",
308
315
  outcome_placeholder: "状态",
@@ -323,14 +330,14 @@ const Lt = {
323
330
  payment: "支付",
324
331
  menu: "菜单",
325
332
  crm: "CRM",
333
+ other: "其他",
326
334
  more: "更多"
327
335
  },
328
336
  columns: {
329
337
  timestamp: "日期",
330
338
  user: "用户",
331
- role: "角色",
332
339
  subject: "主题",
333
- action: "操作",
340
+ action: "操作说明",
334
341
  operation: "操作说明",
335
342
  outcome: "状态"
336
343
  },
@@ -362,8 +369,8 @@ const Lt = {
362
369
  timestamp: "日期",
363
370
  userName: "用户名",
364
371
  userPhone: "手机号",
365
- subject: "角色",
366
- action: "操作",
372
+ subject: "主题",
373
+ action: "操作说明",
367
374
  operation: "操作说明",
368
375
  outcome: "状态",
369
376
  businessId: "商家 ID",
@@ -381,14 +388,13 @@ const Lt = {
381
388
  email: "邮箱",
382
389
  action: "操作",
383
390
  operation: "操作说明",
384
- role: "角色",
385
391
  subject: "主题",
386
392
  field: "字段",
387
393
  outcome: "结果",
388
394
  business: "商家",
389
395
  restaurant: "餐厅",
390
- changeDetails: "变更详情",
391
- eventType: "事件类型",
396
+ eventDetails: "事件详情",
397
+ actionDescription: "操作说明",
392
398
  metadata: "元数据",
393
399
  reason: "原因",
394
400
  resolvedFrom: "解析来源",
@@ -410,14 +416,14 @@ const Lt = {
410
416
  requestPath: "请求路径",
411
417
  requestBody: "请求内容"
412
418
  }
413
- }, yn = {
419
+ }, fr = {
414
420
  date: es,
415
421
  auditLog: ts
416
- }, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
422
+ }, yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
417
423
  __proto__: null,
418
424
  auditLog: ts,
419
425
  date: es,
420
- default: yn
426
+ default: fr
421
427
  }, Symbol.toStringTag, { value: "Module" })), ss = {
422
428
  predefinedRanges: {
423
429
  today: "今天",
@@ -428,19 +434,22 @@ const Lt = {
428
434
  thisMonth: "本月",
429
435
  lastMonth: "上月"
430
436
  }
431
- }, ns = {
437
+ }, rs = {
432
438
  title: "審計日誌",
433
439
  export: "匯出",
434
440
  dateRange: {
435
441
  placeholder: "選擇日期範圍"
436
442
  },
443
+ user: {
444
+ feedmeAdmin: "FeedMe 管理員"
445
+ },
437
446
  filter: {
438
447
  user_placeholder: "用戶",
439
448
  selected_user_prefix: "用戶: ",
440
449
  subject_placeholder: "主題",
441
450
  selected_subject_prefix: "主題: ",
442
- action_placeholder: "操作",
443
- selected_action_prefix: "操作: ",
451
+ action_placeholder: "操作類型",
452
+ selected_action_prefix: "操作類型: ",
444
453
  status_placeholder: "狀態",
445
454
  selected_status_prefix: "狀態: ",
446
455
  outcome_placeholder: "狀態",
@@ -461,14 +470,14 @@ const Lt = {
461
470
  payment: "支付",
462
471
  menu: "菜單",
463
472
  crm: "CRM",
473
+ other: "其他",
464
474
  more: "更多"
465
475
  },
466
476
  columns: {
467
477
  timestamp: "日期",
468
478
  user: "用戶",
469
- role: "角色",
470
479
  subject: "主題",
471
- action: "操作",
480
+ action: "操作說明",
472
481
  operation: "操作說明",
473
482
  outcome: "狀態"
474
483
  },
@@ -500,8 +509,8 @@ const Lt = {
500
509
  timestamp: "日期",
501
510
  userName: "用戶名稱",
502
511
  userPhone: "手機號碼",
503
- subject: "角色",
504
- action: "操作",
512
+ subject: "主題",
513
+ action: "操作說明",
505
514
  operation: "操作說明",
506
515
  outcome: "狀態",
507
516
  businessId: "商家 ID",
@@ -519,14 +528,13 @@ const Lt = {
519
528
  email: "電子郵件",
520
529
  action: "操作",
521
530
  operation: "操作說明",
522
- role: "角色",
523
531
  subject: "主題",
524
532
  field: "字段",
525
533
  outcome: "結果",
526
534
  business: "商家",
527
535
  restaurant: "餐廳",
528
- changeDetails: "變更詳情",
529
- eventType: "事件類型",
536
+ eventDetails: "事件詳情",
537
+ actionDescription: "操作說明",
530
538
  metadata: "元數據",
531
539
  reason: "原因",
532
540
  resolvedFrom: "解析來源",
@@ -548,22 +556,23 @@ const Lt = {
548
556
  requestPath: "請求路徑",
549
557
  requestBody: "請求內容"
550
558
  }
551
- }, hn = {
559
+ }, vr = {
552
560
  date: ss,
553
- auditLog: ns
554
- }, Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
561
+ auditLog: rs
562
+ }, hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
555
563
  __proto__: null,
556
- auditLog: ns,
564
+ auditLog: rs,
557
565
  date: ss,
558
- default: hn
559
- }, Symbol.toStringTag, { value: "Module" })), wn = {
560
- "en-US": pn,
561
- "zh-CN": vn,
562
- "th-TH": fn,
563
- "zh-Hant": Bn
564
- }, rs = {
566
+ default: vr
567
+ }, Symbol.toStringTag, { value: "Module" })), Br = {
568
+ "en-US": dr,
569
+ "zh-CN": yr,
570
+ "th-TH": br,
571
+ "zh-Hant": hr
572
+ }, ns = {
565
573
  employee: {
566
574
  title: "Employee",
575
+ subtitle: "Manage employees with access to the POS at your outlets.",
567
576
  exportButtonLabel: "Export",
568
577
  createButtonLabel: "Create employee",
569
578
  columns: {
@@ -761,15 +770,16 @@ const Lt = {
761
770
  placeholder: "Search restaurant"
762
771
  }
763
772
  }
764
- }, Mn = {
765
- hr: rs
766
- }, Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
773
+ }, wr = {
774
+ hr: ns
775
+ }, Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
767
776
  __proto__: null,
768
- default: Mn,
769
- hr: rs
777
+ default: wr,
778
+ hr: ns
770
779
  }, Symbol.toStringTag, { value: "Module" })), as = {
771
780
  employee: {
772
781
  title: "พนักงาน",
782
+ subtitle: "จัดการพนักงานที่สามารถเข้าถึงระบบ POS ในสาขาของคุณ",
773
783
  exportButtonLabel: "ส่งออก",
774
784
  createButtonLabel: "สร้างพนักงาน",
775
785
  columns: {
@@ -966,15 +976,16 @@ const Lt = {
966
976
  placeholder: "ค้นหาร้านอาหาร"
967
977
  }
968
978
  }
969
- }, Dn = {
979
+ }, Cr = {
970
980
  hr: as
971
- }, jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
981
+ }, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
972
982
  __proto__: null,
973
- default: Dn,
983
+ default: Cr,
974
984
  hr: as
975
985
  }, Symbol.toStringTag, { value: "Module" })), os = {
976
986
  employee: {
977
987
  title: "员工",
988
+ subtitle: "管理可访问您门店 POS 系统的员工。",
978
989
  exportButtonLabel: "导出",
979
990
  createButtonLabel: "添加员工",
980
991
  columns: {
@@ -1172,15 +1183,16 @@ const Lt = {
1172
1183
  placeholder: "搜索餐厅"
1173
1184
  }
1174
1185
  }
1175
- }, Gn = {
1186
+ }, jr = {
1176
1187
  hr: os
1177
- }, Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1188
+ }, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1178
1189
  __proto__: null,
1179
- default: Gn,
1190
+ default: jr,
1180
1191
  hr: os
1181
1192
  }, Symbol.toStringTag, { value: "Module" })), is = {
1182
1193
  employee: {
1183
1194
  title: "員工",
1195
+ subtitle: "管理可存取您門市 POS 系統的員工。",
1184
1196
  exportButtonLabel: "導出",
1185
1197
  createButtonLabel: "添加員工",
1186
1198
  columns: {
@@ -1373,19 +1385,20 @@ const Lt = {
1373
1385
  subtitle: ""
1374
1386
  }
1375
1387
  }
1376
- }, En = {
1388
+ }, Yr = {
1377
1389
  hr: is
1378
- }, xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1390
+ }, Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1379
1391
  __proto__: null,
1380
- default: En,
1392
+ default: Yr,
1381
1393
  hr: is
1382
- }, Symbol.toStringTag, { value: "Module" })), Vn = {
1383
- "en-US": Cn,
1384
- "zh-CN": Yn,
1385
- "th-TH": jn,
1386
- "zh-Hant": xn
1394
+ }, Symbol.toStringTag, { value: "Module" })), xr = {
1395
+ "en-US": Mr,
1396
+ "zh-CN": Gr,
1397
+ "th-TH": Dr,
1398
+ "zh-Hant": Er
1387
1399
  }, ls = {
1388
1400
  title: "Team members",
1401
+ subtitle: "Manage team members with access to the Portal and POS. Assign Portal permissions and POS roles.",
1389
1402
  actions: {
1390
1403
  addMember: "Add member",
1391
1404
  updateMember: "Update member",
@@ -1489,36 +1502,36 @@ const Lt = {
1489
1502
  }
1490
1503
  }
1491
1504
  }, cs = {
1492
- title: "Permission Set",
1493
- createButtonLabel: "Create permission set",
1505
+ title: "Roles",
1506
+ createButtonLabel: "Create role",
1494
1507
  search: {
1495
- placeholder: "Search permission set"
1508
+ placeholder: "Search role"
1496
1509
  },
1497
1510
  noData: {
1498
- title: "No permission set found",
1499
- subtitle: "You don't have any permission set to show at the current moment."
1511
+ title: "No role found",
1512
+ subtitle: "You don't have any role to show at the current moment."
1500
1513
  },
1501
1514
  form: {
1502
1515
  create: {
1503
- title: "Create permission set",
1504
- confirmButtonLabel: "create"
1516
+ title: "Create role",
1517
+ confirmButtonLabel: "Create"
1505
1518
  },
1506
1519
  update: {
1507
- title: "Update permission set",
1508
- confirmButtonLabel: "update"
1520
+ title: "Update role",
1521
+ confirmButtonLabel: "Update"
1509
1522
  },
1510
1523
  delete: {
1511
- title: "Delete permission set",
1512
- confirmationMessage: "Do you really want to delete permission set {permissionSetName}?",
1513
- successMessage: "Permission set {permissionSetName} deleted.",
1514
- conflictError: 'Cannot delete permission set "{permissionSetName}" because it is still assigned to users. Please unassign all users first.',
1515
- setReferencedConflictError: 'Cannot delete permission set "{permissionSetName}" because it is included in other permission sets. Remove those references first.'
1524
+ title: "Delete role",
1525
+ confirmationMessage: "Do you really want to delete role {permissionSetName}?",
1526
+ successMessage: "Role {permissionSetName} deleted.",
1527
+ conflictError: 'Cannot delete role "{permissionSetName}" because it is still assigned to users. Please unassign all users first.',
1528
+ setReferencedConflictError: 'Cannot delete role "{permissionSetName}" because it is included in other roles. Remove those references first.'
1516
1529
  },
1517
- name: "Permission set name",
1518
- namePlaceholder: "Enter permission set name",
1519
- nameRequired: "Permission set name is required",
1520
- includedSets: "Included role sets",
1521
- includedSetsPlaceholder: "Select role sets to include"
1530
+ name: "Role name",
1531
+ namePlaceholder: "Enter role name",
1532
+ nameRequired: "Role name is required",
1533
+ includedSets: "Include permissions from other roles",
1534
+ includedSetsPlaceholder: "Select one or more roles to inherit permissions from"
1522
1535
  },
1523
1536
  categoryLabels: {
1524
1537
  General: "General",
@@ -1610,16 +1623,17 @@ const Lt = {
1610
1623
  permissions: "Permissions"
1611
1624
  }
1612
1625
  }
1613
- }, Pn = {
1626
+ }, Vr = {
1614
1627
  team: ls,
1615
1628
  permissionSet: cs
1616
- }, Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1629
+ }, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1617
1630
  __proto__: null,
1618
- default: Pn,
1631
+ default: Vr,
1619
1632
  permissionSet: cs,
1620
1633
  team: ls
1621
1634
  }, Symbol.toStringTag, { value: "Module" })), As = {
1622
1635
  title: "ผู้ดูแลระบบ",
1636
+ subtitle: "จัดการผู้ดูแลระบบที่สามารถเข้าถึง Portal และ POS กำหนดสิทธิ์ Portal และบทบาท POS",
1623
1637
  actions: {
1624
1638
  addMember: "เพิ่มผู้ดูแลระบบ",
1625
1639
  updateMember: "อัปเดตผู้ดูแลระบบ",
@@ -1723,36 +1737,36 @@ const Lt = {
1723
1737
  }
1724
1738
  }
1725
1739
  }, us = {
1726
- title: "กลุ่มสิทธิ์",
1727
- createButtonLabel: "สร้างกลุ่มสิทธิ์",
1740
+ title: "บทบาท",
1741
+ createButtonLabel: "สร้างบทบาท",
1728
1742
  search: {
1729
- placeholder: "ค้นหากลุ่มสิทธิ์"
1743
+ placeholder: "ค้นหาบทบาท"
1730
1744
  },
1731
1745
  noData: {
1732
- title: "ไม่พบกลุ่มสิทธิ์",
1733
- subtitle: "คุณไม่มีกลุ่มสิทธิ์ที่จะแสดงในขณะนี้"
1746
+ title: "ไม่พบบทบาท",
1747
+ subtitle: "คุณไม่มีบทบาทที่จะแสดงในขณะนี้"
1734
1748
  },
1735
1749
  form: {
1736
1750
  create: {
1737
- title: "สร้างกลุ่มสิทธิ์",
1751
+ title: "สร้างบทบาท",
1738
1752
  confirmButtonLabel: "สร้าง"
1739
1753
  },
1740
1754
  update: {
1741
- title: "อัปเดตกลุ่มสิทธิ์",
1755
+ title: "อัปเดตบทบาท",
1742
1756
  confirmButtonLabel: "อัปเดต"
1743
1757
  },
1744
1758
  delete: {
1745
- title: "ลบกลุ่มสิทธิ์",
1746
- confirmationMessage: "คุณต้องการลบกลุ่มสิทธิ์ {permissionSetName} จริงหรือไม่?",
1747
- successMessage: "ลบกลุ่มสิทธิ์ {permissionSetName} แล้ว",
1748
- conflictError: 'ไม่สามารถลบกลุ่มสิทธิ์ "{permissionSetName}" ได้ เนื่องจากยังมีผู้ใช้งานที่ได้รับการกำหนดกลุ่มสิทธิ์นี้อยู่ กรุณายกเลิกการกำหนดทั้งหมดก่อน',
1749
- setReferencedConflictError: 'ไม่สามารถลบกลุ่มสิทธิ์ "{permissionSetName}" ได้ เนื่องจากถูกอ้างอิงโดยกลุ่มสิทธิ์อื่น กรุณาลบการอ้างอิงเหล่านั้นก่อน'
1759
+ title: "ลบบทบาท",
1760
+ confirmationMessage: "คุณต้องการลบบทบาท {permissionSetName} จริงหรือไม่?",
1761
+ successMessage: "ลบบทบาท {permissionSetName} แล้ว",
1762
+ conflictError: 'ไม่สามารถลบบทบาท "{permissionSetName}" ได้ เนื่องจากยังมีผู้ใช้งานที่ได้รับการกำหนดบทบาทนี้อยู่ กรุณายกเลิกการกำหนดทั้งหมดก่อน',
1763
+ setReferencedConflictError: 'ไม่สามารถลบบทบาท "{permissionSetName}" ได้ เนื่องจากถูกรวมอยู่ในบทบาทอื่น กรุณาลบการอ้างอิงเหล่านั้นก่อน'
1750
1764
  },
1751
- name: "ชื่อกลุ่มสิทธิ์",
1752
- namePlaceholder: "ป้อนชื่อกลุ่มสิทธิ์",
1753
- nameRequired: "โปรดระบุชื่อกลุ่มสิทธิ์",
1754
- includedSets: "กลุ่มสิทธิ์ที่รวมอยู่",
1755
- includedSetsPlaceholder: "เลือกกลุ่มสิทธิ์ที่จะรวม"
1765
+ name: "ชื่อบทบาท",
1766
+ namePlaceholder: "ป้อนชื่อบทบาท",
1767
+ nameRequired: "โปรดระบุชื่อบทบาท",
1768
+ includedSets: "รวมสิทธิ์จากบทบาทอื่น",
1769
+ includedSetsPlaceholder: "เลือกบทบาทหนึ่งรายการขึ้นไปเพื่อรับสิทธิ์ที่สืบทอดมา"
1756
1770
  },
1757
1771
  categoryLabels: {
1758
1772
  General: "ทั่วไป",
@@ -1844,16 +1858,17 @@ const Lt = {
1844
1858
  permissions: "สิทธิ์"
1845
1859
  }
1846
1860
  }
1847
- }, On = {
1861
+ }, Fr = {
1848
1862
  team: As,
1849
1863
  permissionSet: us
1850
- }, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1864
+ }, Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1851
1865
  __proto__: null,
1852
- default: On,
1866
+ default: Fr,
1853
1867
  permissionSet: us,
1854
1868
  team: As
1855
1869
  }, Symbol.toStringTag, { value: "Module" })), ms = {
1856
1870
  title: "团队成员",
1871
+ subtitle: "管理可访问 Portal 和 POS 的团队成员,分配 Portal 权限和 POS 角色。",
1857
1872
  actions: {
1858
1873
  addMember: "添加成员",
1859
1874
  updateMember: "更新成员",
@@ -1957,36 +1972,36 @@ const Lt = {
1957
1972
  }
1958
1973
  }
1959
1974
  }, gs = {
1960
- title: "权限集",
1961
- createButtonLabel: "创建权限集",
1975
+ title: "角色",
1976
+ createButtonLabel: "创建角色",
1962
1977
  search: {
1963
- placeholder: "搜索权限集"
1978
+ placeholder: "搜索角色"
1964
1979
  },
1965
1980
  noData: {
1966
- title: "未找到权限集",
1967
- subtitle: "当前没有权限集可显示"
1981
+ title: "未找到角色",
1982
+ subtitle: "当前没有角色可显示"
1968
1983
  },
1969
1984
  form: {
1970
1985
  create: {
1971
- title: "创建权限集",
1986
+ title: "创建角色",
1972
1987
  confirmButtonLabel: "创建"
1973
1988
  },
1974
1989
  update: {
1975
- title: "更新权限集",
1990
+ title: "更新角色",
1976
1991
  confirmButtonLabel: "更新"
1977
1992
  },
1978
1993
  delete: {
1979
- title: "删除权限集",
1980
- confirmationMessage: "确定要删除权限集 {permissionSetName} 吗?",
1981
- successMessage: "权限集 {permissionSetName} 已删除",
1982
- conflictError: '无法删除权限集 "{permissionSetName}",因为仍有用户被分配到此权限集,请先取消所有分配。',
1983
- setReferencedConflictError: '无法删除权限集 "{permissionSetName}",因为其他权限集正在引用此权限集,请先移除这些引用。'
1994
+ title: "删除角色",
1995
+ confirmationMessage: "确定要删除角色 {permissionSetName} 吗?",
1996
+ successMessage: "角色 {permissionSetName} 已删除",
1997
+ conflictError: '无法删除角色 "{permissionSetName}",因为仍有用户被分配到此角色,请先取消所有分配。',
1998
+ setReferencedConflictError: '无法删除角色 "{permissionSetName}",因为其他角色正在引用此角色,请先移除这些引用。'
1984
1999
  },
1985
- name: "权限集名称",
1986
- namePlaceholder: "输入权限集名称",
1987
- nameRequired: "请输入权限集名称",
1988
- includedSets: "包含的角色集",
1989
- includedSetsPlaceholder: "选择要包含的角色集"
2000
+ name: "角色名称",
2001
+ namePlaceholder: "输入角色名称",
2002
+ nameRequired: "请输入角色名称",
2003
+ includedSets: "包含其他角色的权限",
2004
+ includedSetsPlaceholder: "选择一个或多个角色以继承其权限"
1990
2005
  },
1991
2006
  categoryLabels: {
1992
2007
  General: "通用",
@@ -2078,16 +2093,17 @@ const Lt = {
2078
2093
  permissions: "权限"
2079
2094
  }
2080
2095
  }
2081
- }, Hn = {
2096
+ }, qr = {
2082
2097
  team: ms,
2083
2098
  permissionSet: gs
2084
- }, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2099
+ }, Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2085
2100
  __proto__: null,
2086
- default: Hn,
2101
+ default: qr,
2087
2102
  permissionSet: gs,
2088
2103
  team: ms
2089
2104
  }, Symbol.toStringTag, { value: "Module" })), ds = {
2090
2105
  title: "團隊成員",
2106
+ subtitle: "管理可存取 Portal 和 POS 的團隊成員,指派 Portal 權限和 POS 角色。",
2091
2107
  actions: {
2092
2108
  addMember: "添加成員",
2093
2109
  updateMember: "更新成員",
@@ -2198,36 +2214,36 @@ const Lt = {
2198
2214
  }
2199
2215
  }
2200
2216
  }, ps = {
2201
- title: "權限集",
2202
- createButtonLabel: "創建權限集",
2217
+ title: "角色",
2218
+ createButtonLabel: "創建角色",
2203
2219
  search: {
2204
- placeholder: "搜索權限集"
2220
+ placeholder: "搜索角色"
2205
2221
  },
2206
2222
  noData: {
2207
- title: "未找到權限集",
2208
- subtitle: "當前沒有權限集可顯示"
2223
+ title: "未找到角色",
2224
+ subtitle: "當前沒有角色可顯示"
2209
2225
  },
2210
2226
  form: {
2211
2227
  create: {
2212
- title: "創建權限集",
2228
+ title: "創建角色",
2213
2229
  confirmButtonLabel: "創建"
2214
2230
  },
2215
2231
  update: {
2216
- title: "更新權限集",
2232
+ title: "更新角色",
2217
2233
  confirmButtonLabel: "更新"
2218
2234
  },
2219
2235
  delete: {
2220
- title: "刪除權限集",
2221
- confirmationMessage: "確定要刪除權限集 {permissionSetName} 嗎?",
2222
- successMessage: "權限集 {permissionSetName} 已刪除",
2223
- conflictError: '無法刪除權限集 "{permissionSetName}",因為仍有使用者被指派到此權限集,請先取消所有指派。',
2224
- setReferencedConflictError: '無法刪除權限集 "{permissionSetName}",因為其他權限集正在引用此權限集,請先移除這些引用。'
2236
+ title: "刪除角色",
2237
+ confirmationMessage: "確定要刪除角色 {permissionSetName} 嗎?",
2238
+ successMessage: "角色 {permissionSetName} 已刪除",
2239
+ conflictError: '無法刪除角色 "{permissionSetName}",因為仍有使用者被指派到此角色,請先取消所有指派。',
2240
+ setReferencedConflictError: '無法刪除角色 "{permissionSetName}",因為其他角色正在引用此角色,請先移除這些引用。'
2225
2241
  },
2226
- name: "權限集名稱",
2227
- namePlaceholder: "輸入權限集名稱",
2228
- nameRequired: "請輸入權限集名稱",
2229
- includedSets: "包含的角色集",
2230
- includedSetsPlaceholder: "選擇要包含的角色集"
2242
+ name: "角色名稱",
2243
+ namePlaceholder: "輸入角色名稱",
2244
+ nameRequired: "請輸入角色名稱",
2245
+ includedSets: "包含其他角色的權限",
2246
+ includedSetsPlaceholder: "選擇一個或多個角色以繼承其權限"
2231
2247
  },
2232
2248
  categoryLabels: {
2233
2249
  General: "通用",
@@ -2319,19 +2335,19 @@ const Lt = {
2319
2335
  permissions: "權限"
2320
2336
  }
2321
2337
  }
2322
- }, Qn = {
2338
+ }, Xr = {
2323
2339
  team: ds,
2324
2340
  permissionSet: ps
2325
- }, In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2341
+ }, Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2326
2342
  __proto__: null,
2327
- default: Qn,
2343
+ default: Xr,
2328
2344
  permissionSet: ps,
2329
2345
  team: ds
2330
- }, Symbol.toStringTag, { value: "Module" })), Rn = {
2331
- "en-US": Fn,
2332
- "zh-CN": Xn,
2333
- "th-TH": qn,
2334
- "zh-Hant": In
2346
+ }, Symbol.toStringTag, { value: "Module" })), Ir = {
2347
+ "en-US": Pr,
2348
+ "zh-CN": Hr,
2349
+ "th-TH": Or,
2350
+ "zh-Hant": Qr
2335
2351
  }, bs = {
2336
2352
  title: "POS Grant",
2337
2353
  actions: {
@@ -2386,11 +2402,11 @@ const Lt = {
2386
2402
  passcode: {
2387
2403
  copied: "Passcode copied"
2388
2404
  }
2389
- }, Nn = {
2405
+ }, Rr = {
2390
2406
  grantUser: bs
2391
- }, Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2407
+ }, Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2392
2408
  __proto__: null,
2393
- default: Nn,
2409
+ default: Rr,
2394
2410
  grantUser: bs
2395
2411
  }, Symbol.toStringTag, { value: "Module" })), fs = {
2396
2412
  title: "POS Grant",
@@ -2446,11 +2462,11 @@ const Lt = {
2446
2462
  passcode: {
2447
2463
  copied: "คัดลอกรหัสผ่านแล้ว"
2448
2464
  }
2449
- }, zn = {
2465
+ }, Zr = {
2450
2466
  grantUser: fs
2451
- }, Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2467
+ }, zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2452
2468
  __proto__: null,
2453
- default: zn,
2469
+ default: Zr,
2454
2470
  grantUser: fs
2455
2471
  }, Symbol.toStringTag, { value: "Module" })), ys = {
2456
2472
  title: "POS 授予",
@@ -2506,11 +2522,11 @@ const Lt = {
2506
2522
  passcode: {
2507
2523
  copied: "密码已复制"
2508
2524
  }
2509
- }, Wn = {
2525
+ }, Ur = {
2510
2526
  grantUser: ys
2511
- }, Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2527
+ }, Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2512
2528
  __proto__: null,
2513
- default: Wn,
2529
+ default: Ur,
2514
2530
  grantUser: ys
2515
2531
  }, Symbol.toStringTag, { value: "Module" })), vs = {
2516
2532
  title: "POS 授予",
@@ -2566,17 +2582,17 @@ const Lt = {
2566
2582
  passcode: {
2567
2583
  copied: "密碼已複製"
2568
2584
  }
2569
- }, Sn = {
2585
+ }, Sr = {
2570
2586
  grantUser: vs
2571
- }, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2587
+ }, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2572
2588
  __proto__: null,
2573
- default: Sn,
2589
+ default: Sr,
2574
2590
  grantUser: vs
2575
- }, Symbol.toStringTag, { value: "Module" })), Kn = {
2576
- "en-US": Zn,
2577
- "zh-CN": Tn,
2578
- "th-TH": Un,
2579
- "zh-Hant": kn
2591
+ }, Symbol.toStringTag, { value: "Module" })), kr = {
2592
+ "en-US": Nr,
2593
+ "zh-CN": Wr,
2594
+ "th-TH": zr,
2595
+ "zh-Hant": Tr
2580
2596
  };
2581
2597
  var t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), o = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.crm_marketingMaterial = "business::crm::marketingMaterial", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e.operation_orderSetting = "business::operation::orderSetting", e))(o || {}), U = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(U || {}), hs = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(hs || {});
2582
2598
  const b = {
@@ -2592,7 +2608,7 @@ const b = {
2592
2608
  reports: "Default Report",
2593
2609
  customReports: "Custom Report",
2594
2610
  miniProgram: "Mini Program"
2595
- }, Ln = "access-denied", We = {
2611
+ }, Kr = "access-denied", We = {
2596
2612
  Action: t,
2597
2613
  Subject: {
2598
2614
  Business: o,
@@ -3256,7 +3272,7 @@ const R = [
3256
3272
  subject: q.crm,
3257
3273
  actions: [t.read]
3258
3274
  }
3259
- ], $ = (...e) => e.flat(), Jn = [
3275
+ ], $ = (...e) => e.flat(), Lr = [
3260
3276
  ...R,
3261
3277
  {
3262
3278
  label: "User",
@@ -3268,7 +3284,7 @@ const R = [
3268
3284
  t.delete
3269
3285
  ]
3270
3286
  }
3271
- ], _n = [
3287
+ ], Jr = [
3272
3288
  ...R,
3273
3289
  {
3274
3290
  label: "Segmentation",
@@ -3304,7 +3320,7 @@ const R = [
3304
3320
  t.delete
3305
3321
  ]
3306
3322
  }
3307
- ], $n = [
3323
+ ], _r = [
3308
3324
  ...R,
3309
3325
  {
3310
3326
  label: "Location",
@@ -3316,7 +3332,7 @@ const R = [
3316
3332
  t.delete
3317
3333
  ]
3318
3334
  }
3319
- ], er = [
3335
+ ], $r = [
3320
3336
  ...R,
3321
3337
  {
3322
3338
  label: "Effect",
@@ -3328,14 +3344,14 @@ const R = [
3328
3344
  t.delete
3329
3345
  ]
3330
3346
  }
3331
- ], tr = [
3347
+ ], en = [
3332
3348
  ...R,
3333
3349
  {
3334
3350
  label: "Setting",
3335
3351
  subject: q.crm_setting,
3336
3352
  actions: [t.read, t.update]
3337
3353
  }
3338
- ], sr = [
3354
+ ], tn = [
3339
3355
  ...R,
3340
3356
  {
3341
3357
  label: "Reward",
@@ -3390,7 +3406,7 @@ const R = [
3390
3406
  subject: q.crm_analytic,
3391
3407
  actions: [t.read]
3392
3408
  }
3393
- ], nr = [
3409
+ ], sn = [
3394
3410
  ...R,
3395
3411
  {
3396
3412
  label: "Tier",
@@ -3402,7 +3418,7 @@ const R = [
3402
3418
  t.delete
3403
3419
  ]
3404
3420
  }
3405
- ], rr = [
3421
+ ], rn = [
3406
3422
  ...R,
3407
3423
  {
3408
3424
  label: "Title",
@@ -3414,7 +3430,7 @@ const R = [
3414
3430
  t.delete
3415
3431
  ]
3416
3432
  }
3417
- ], ar = [
3433
+ ], nn = [
3418
3434
  ...R,
3419
3435
  {
3420
3436
  label: "Broadcast",
@@ -3426,7 +3442,7 @@ const R = [
3426
3442
  t.delete
3427
3443
  ]
3428
3444
  }
3429
- ], or = [
3445
+ ], an = [
3430
3446
  ...R,
3431
3447
  {
3432
3448
  label: "Point",
@@ -3438,7 +3454,7 @@ const R = [
3438
3454
  t.delete
3439
3455
  ]
3440
3456
  }
3441
- ], ir = [
3457
+ ], on = [
3442
3458
  ...R,
3443
3459
  {
3444
3460
  label: "Credit",
@@ -3450,7 +3466,7 @@ const R = [
3450
3466
  t.delete
3451
3467
  ]
3452
3468
  }
3453
- ], lr = [
3469
+ ], ln = [
3454
3470
  ...R,
3455
3471
  {
3456
3472
  label: "Experience",
@@ -3462,7 +3478,7 @@ const R = [
3462
3478
  t.delete
3463
3479
  ]
3464
3480
  }
3465
- ], cr = [
3481
+ ], cn = [
3466
3482
  ...R,
3467
3483
  {
3468
3484
  label: "Game",
@@ -3474,7 +3490,7 @@ const R = [
3474
3490
  t.delete
3475
3491
  ]
3476
3492
  }
3477
- ], Ar = [
3493
+ ], An = [
3478
3494
  ...R,
3479
3495
  {
3480
3496
  label: "Mission",
@@ -3531,35 +3547,35 @@ const R = [
3531
3547
  }
3532
3548
  ], Vs = $(
3533
3549
  oe,
3534
- nr
3550
+ sn
3535
3551
  ), Ps = $(
3536
3552
  oe,
3537
- rr
3553
+ rn
3538
3554
  ), Fs = $(
3539
3555
  oe,
3540
- ar
3556
+ nn
3541
3557
  ), Os = $(
3542
3558
  oe,
3543
- or
3559
+ an
3544
3560
  ), qs = $(
3545
3561
  oe,
3546
- ir
3562
+ on
3547
3563
  ), Hs = $(
3548
3564
  oe,
3549
- lr
3565
+ ln
3550
3566
  ), Xs = $(
3551
3567
  oe,
3552
- cr
3568
+ cn
3553
3569
  ), Qs = $(
3554
3570
  oe,
3555
- Ar
3556
- ), ur = $(
3571
+ An
3572
+ ), un = $(
3557
3573
  oe,
3558
3574
  Cs
3559
3575
  ), Is = $(
3560
3576
  oe,
3561
- tr
3562
- ), mr = [
3577
+ en
3578
+ ), mn = [
3563
3579
  ...R,
3564
3580
  {
3565
3581
  label: "Voucher",
@@ -3571,7 +3587,7 @@ const R = [
3571
3587
  t.delete
3572
3588
  ]
3573
3589
  }
3574
- ], gr = [
3590
+ ], gn = [
3575
3591
  ...R,
3576
3592
  {
3577
3593
  label: "Membership",
@@ -3583,15 +3599,15 @@ const R = [
3583
3599
  t.delete
3584
3600
  ]
3585
3601
  }
3586
- ], dr = $(
3587
- Jn,
3588
- _n,
3602
+ ], dn = $(
3603
+ Lr,
3604
+ Jr,
3589
3605
  ws,
3590
3606
  Ms,
3591
- $n,
3592
- er,
3607
+ _r,
3608
+ $r,
3593
3609
  Is,
3594
- sr,
3610
+ tn,
3595
3611
  js,
3596
3612
  Vs,
3597
3613
  Ps,
@@ -3605,33 +3621,33 @@ const R = [
3605
3621
  Ys,
3606
3622
  Es,
3607
3623
  xs
3608
- ), pr = $(
3624
+ ), pn = $(
3609
3625
  oe,
3610
3626
  Cs,
3611
3627
  Ds
3612
- ), br = $(
3628
+ ), bn = $(
3613
3629
  oe,
3614
- mr
3615
- ), fr = $(gr), yr = {
3630
+ mn
3631
+ ), fn = $(gn), yn = {
3616
3632
  [`set_${o.crm}`]: {
3617
3633
  key: "sys:crm:access",
3618
3634
  name: "CRM Access",
3619
- permissions: dr
3635
+ permissions: dn
3620
3636
  },
3621
3637
  [`set_${o.crm_promotion}`]: {
3622
3638
  key: "sys:crm:promotion",
3623
3639
  name: "CRM Promotion",
3624
- permissions: pr
3640
+ permissions: pn
3625
3641
  },
3626
3642
  [`set_${o.crm_voucher}`]: {
3627
3643
  key: "sys:crm:voucher",
3628
3644
  name: "CRM Voucher",
3629
- permissions: br
3645
+ permissions: bn
3630
3646
  },
3631
3647
  [`set_${o.crm_membership}`]: {
3632
3648
  key: "sys:crm:membership",
3633
3649
  name: "CRM Membership",
3634
- permissions: fr
3650
+ permissions: fn
3635
3651
  },
3636
3652
  [`set_${o.crm_analytic}`]: {
3637
3653
  key: "sys:crm:analytic",
@@ -3696,7 +3712,7 @@ const R = [
3696
3712
  [`set_${o.crm_referral}`]: {
3697
3713
  key: "sys:crm:referral",
3698
3714
  name: "CRM Referral",
3699
- permissions: ur
3715
+ permissions: un
3700
3716
  },
3701
3717
  [`set_${o.crm_store}`]: {
3702
3718
  key: "sys:crm:store",
@@ -3753,7 +3769,7 @@ const K = [
3753
3769
  subject: G.inventory_unitCostHistory,
3754
3770
  actions: [t.read]
3755
3771
  }
3756
- ], vr = [
3772
+ ], vn = [
3757
3773
  ...K,
3758
3774
  {
3759
3775
  label: "Stock Adjustment",
@@ -3852,7 +3868,7 @@ const xt = [
3852
3868
  ...Zs,
3853
3869
  ...zs
3854
3870
  ];
3855
- const hr = [
3871
+ const hn = [
3856
3872
  {
3857
3873
  label: "Inventory",
3858
3874
  subject: G.inventory,
@@ -3873,19 +3889,19 @@ const hr = [
3873
3889
  subject: G.inventory_closingTemplate,
3874
3890
  actions: [t.read, t.update]
3875
3891
  }
3876
- ], Br = [
3892
+ ], Bn = [
3877
3893
  {
3878
3894
  label: "Inventory",
3879
3895
  subject: G.inventory,
3880
3896
  actions: [t.read, t.update]
3881
3897
  }
3882
- ], wr = [
3898
+ ], wn = [
3883
3899
  {
3884
3900
  label: "Inventory",
3885
3901
  subject: G.inventory,
3886
3902
  actions: [t.read, t.update]
3887
3903
  }
3888
- ], Mr = [
3904
+ ], Mn = [
3889
3905
  {
3890
3906
  label: "Inventory",
3891
3907
  subject: G.inventory,
@@ -3953,7 +3969,7 @@ const hr = [
3953
3969
  subject: G.inventory_shipment,
3954
3970
  actions: [t.read, t.update]
3955
3971
  }
3956
- ], Ts = [
3972
+ ], Ss = [
3957
3973
  ...K,
3958
3974
  {
3959
3975
  label: "Surcharge",
@@ -3970,7 +3986,7 @@ const hr = [
3970
3986
  subject: G.inventory_supplier,
3971
3987
  actions: [t.read]
3972
3988
  }
3973
- ], Ss = [
3989
+ ], Ts = [
3974
3990
  ...K,
3975
3991
  {
3976
3992
  label: "Order Template",
@@ -3992,7 +4008,7 @@ const hr = [
3992
4008
  subject: G.inventory_shipment,
3993
4009
  actions: [t.read, t.update]
3994
4010
  }
3995
- ], Cr = [
4011
+ ], Cn = [
3996
4012
  ...K,
3997
4013
  {
3998
4014
  label: "Order Draft Approval",
@@ -4003,10 +4019,10 @@ const hr = [
4003
4019
  [
4004
4020
  ...Us,
4005
4021
  ...Ws,
4006
- ...Ts,
4007
- ...Ss
4022
+ ...Ss,
4023
+ ...Ts
4008
4024
  ];
4009
- const Dr = [
4025
+ const Dn = [
4010
4026
  ...K,
4011
4027
  {
4012
4028
  label: "Supplier",
@@ -4023,7 +4039,7 @@ const Dr = [
4023
4039
  subject: G.inventory_orderTemplate,
4024
4040
  actions: [t.read, t.update]
4025
4041
  }
4026
- ], jr = [
4042
+ ], jn = [
4027
4043
  ...K,
4028
4044
  {
4029
4045
  label: "Warehouse",
@@ -4035,20 +4051,20 @@ const Dr = [
4035
4051
  t.delete
4036
4052
  ]
4037
4053
  }
4038
- ], Gr = [
4054
+ ], Gn = [
4039
4055
  {
4040
4056
  label: "Inventory",
4041
4057
  subject: G.inventory,
4042
4058
  actions: [t.read, t.update]
4043
4059
  }
4044
- ], Yr = [
4060
+ ], Yn = [
4045
4061
  ...K,
4046
4062
  {
4047
4063
  label: "Inventory",
4048
4064
  subject: G.inventory,
4049
4065
  actions: [t.update]
4050
4066
  }
4051
- ], Er = [
4067
+ ], En = [
4052
4068
  ...K,
4053
4069
  {
4054
4070
  label: "Integration",
@@ -4061,7 +4077,7 @@ const Dr = [
4061
4077
  ...Et,
4062
4078
  ...xt
4063
4079
  ];
4064
- const xr = {
4080
+ const xn = {
4065
4081
  [`set_${o.inventory_stockBalance}`]: {
4066
4082
  key: "sys:inventory:stock_balance",
4067
4083
  name: "Stock Balance",
@@ -4070,7 +4086,7 @@ const xr = {
4070
4086
  [`set_${o.inventory_stockAdjustment}`]: {
4071
4087
  key: "sys:inventory:stock_adjustment",
4072
4088
  name: "Stock Adjustment",
4073
- permissions: vr
4089
+ permissions: vn
4074
4090
  },
4075
4091
  [`set_${o.inventory_unitCostHistory}`]: {
4076
4092
  key: "sys:inventory:unit_cost_history",
@@ -4100,22 +4116,22 @@ const xr = {
4100
4116
  [`set_${o.inventory_ingredient}`]: {
4101
4117
  key: "sys:inventory:ingredient",
4102
4118
  name: "Ingredient",
4103
- permissions: hr
4119
+ permissions: hn
4104
4120
  },
4105
4121
  [`set_${o.inventory_ingredientGroup}`]: {
4106
4122
  key: "sys:inventory:ingredient_group",
4107
4123
  name: "Ingredient Group",
4108
- permissions: Br
4124
+ permissions: Bn
4109
4125
  },
4110
4126
  [`set_${o.inventory_recipe}`]: {
4111
4127
  key: "sys:inventory:recipe",
4112
4128
  name: "Recipe",
4113
- permissions: wr
4129
+ permissions: wn
4114
4130
  },
4115
4131
  [`set_${o.inventory_unit}`]: {
4116
4132
  key: "sys:inventory:unit",
4117
4133
  name: "Unit",
4118
- permissions: Mr
4134
+ permissions: Mn
4119
4135
  },
4120
4136
  [`set_${o.inventory_purchaseTransfer}`]: {
4121
4137
  key: "sys:inventory:purchase_transfer",
@@ -4125,7 +4141,7 @@ const xr = {
4125
4141
  [`set_${o.inventory_orderDraftApproval}`]: {
4126
4142
  key: "sys:inventory:order_draft_approval",
4127
4143
  name: "Order Draft Approval",
4128
- permissions: Cr
4144
+ permissions: Cn
4129
4145
  },
4130
4146
  [`set_${o.inventory_transferOut}`]: {
4131
4147
  key: "sys:inventory:transfer_out",
@@ -4135,41 +4151,41 @@ const xr = {
4135
4151
  [`set_${o.inventory_surcharge}`]: {
4136
4152
  key: "sys:inventory:surcharge",
4137
4153
  name: "Surcharge",
4138
- permissions: Ts
4154
+ permissions: Ss
4139
4155
  },
4140
4156
  [`set_${o.inventory_orderTemplate}`]: {
4141
4157
  key: "sys:inventory:order_template",
4142
4158
  name: "Order Template",
4143
- permissions: Ss
4159
+ permissions: Ts
4144
4160
  },
4145
4161
  [`set_${o.inventory_supplier}`]: {
4146
4162
  key: "sys:inventory:supplier",
4147
4163
  name: "Supplier",
4148
- permissions: Dr
4164
+ permissions: Dn
4149
4165
  },
4150
4166
  [`set_${o.inventory_warehouse}`]: {
4151
4167
  key: "sys:inventory:warehouse",
4152
4168
  name: "Warehouse",
4153
- permissions: jr
4169
+ permissions: jn
4154
4170
  },
4155
4171
  [`set_${o.inventory_publish}`]: {
4156
4172
  key: "sys:inventory:publish",
4157
4173
  name: "Publish",
4158
- permissions: Gr
4174
+ permissions: Gn
4159
4175
  },
4160
4176
  [`set_${o.inventory_import}`]: {
4161
4177
  key: "sys:inventory:import",
4162
4178
  name: "Import",
4163
- permissions: Yr
4179
+ permissions: Yn
4164
4180
  },
4165
4181
  [`set_${o.inventory_integration}`]: {
4166
4182
  key: "sys:inventory:integration",
4167
4183
  name: "Integration",
4168
- permissions: Er
4184
+ permissions: En
4169
4185
  }
4170
4186
  };
4171
- var Ee = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(Ee || {});
4172
- const Vr = {
4187
+ var ve = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(ve || {});
4188
+ const Vn = {
4173
4189
  /**
4174
4190
  * Triggered by: hrm_teamMember:manage (portal toggle)
4175
4191
  * Injects: team member list read + pos role read
@@ -4181,7 +4197,7 @@ const Vr = {
4181
4197
  permissions: [
4182
4198
  {
4183
4199
  label: "Portal Users",
4184
- subject: Ee.hrm_portalUsers,
4200
+ subject: ve.hrm_portalUsers,
4185
4201
  actions: [t.manage]
4186
4202
  },
4187
4203
  {
@@ -4191,7 +4207,12 @@ const Vr = {
4191
4207
  },
4192
4208
  {
4193
4209
  label: "Pos Role",
4194
- subject: Ee.hrm_posRole,
4210
+ subject: ve.hrm_posRole,
4211
+ actions: [t.read]
4212
+ },
4213
+ {
4214
+ label: "Restaurant resource",
4215
+ subject: ve.hrm_restaurant,
4195
4216
  actions: [t.read]
4196
4217
  }
4197
4218
  ]
@@ -4206,17 +4227,17 @@ const Vr = {
4206
4227
  permissions: [
4207
4228
  {
4208
4229
  label: "Portal Users",
4209
- subject: Ee.hrm_portalUsers,
4230
+ subject: ve.hrm_portalUsers,
4210
4231
  actions: [t.read]
4211
4232
  },
4212
4233
  {
4213
4234
  label: "Restaurant resource",
4214
- subject: o.restaurant,
4235
+ subject: ve.hrm_restaurant,
4215
4236
  actions: [t.read]
4216
4237
  },
4217
4238
  {
4218
4239
  label: "Pos Role",
4219
- subject: Ee.hrm_posRole,
4240
+ subject: ve.hrm_posRole,
4220
4241
  actions: [t.manage]
4221
4242
  }
4222
4243
  ]
@@ -4233,7 +4254,7 @@ const Vr = {
4233
4254
  permissions: [
4234
4255
  {
4235
4256
  label: "Portal Users",
4236
- subject: Ee.hrm_portalUsers,
4257
+ subject: ve.hrm_portalUsers,
4237
4258
  actions: [t.read]
4238
4259
  }
4239
4260
  ]
@@ -4251,7 +4272,7 @@ const Rt = [
4251
4272
  subject: ks.payment_terminals,
4252
4273
  actions: [t.read]
4253
4274
  }
4254
- ], Pr = {
4275
+ ], Pn = {
4255
4276
  [`set_${o.payment_transactions}`]: {
4256
4277
  key: "sys:payment:transactions",
4257
4278
  name: "Payment Transactions Access",
@@ -4262,13 +4283,13 @@ const Rt = [
4262
4283
  name: "Payment Settlements Access",
4263
4284
  permissions: Rt
4264
4285
  }
4265
- }, Fr = {
4266
- ...yr,
4267
- ...xr,
4268
- ...Vr,
4269
- ...Pr
4286
+ }, Fn = {
4287
+ ...yn,
4288
+ ...xn,
4289
+ ...Vn,
4290
+ ...Pn
4270
4291
  }, _a = Object.values(
4271
- Fr
4292
+ Fn
4272
4293
  ).flatMap((e) => e.permissions ?? []).reduce(
4273
4294
  (e, A) => {
4274
4295
  var m;
@@ -4277,7 +4298,7 @@ const Rt = [
4277
4298
  {}
4278
4299
  );
4279
4300
  var Re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4280
- function Or(e) {
4301
+ function On(e) {
4281
4302
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4282
4303
  }
4283
4304
  var Ks = { exports: {} };
@@ -4287,21 +4308,21 @@ var Ks = { exports: {} };
4287
4308
  })(Re, function() {
4288
4309
  return function(m) {
4289
4310
  var c = {};
4290
- function n(u) {
4311
+ function r(u) {
4291
4312
  if (c[u]) return c[u].exports;
4292
4313
  var y = c[u] = { i: u, l: !1, exports: {} };
4293
- return m[u].call(y.exports, y, y.exports, n), y.l = !0, y.exports;
4314
+ return m[u].call(y.exports, y, y.exports, r), y.l = !0, y.exports;
4294
4315
  }
4295
- return n.m = m, n.c = c, n.d = function(u, y, h) {
4296
- n.o(u, y) || Object.defineProperty(u, y, { enumerable: !0, get: h });
4297
- }, n.r = function(u) {
4316
+ return r.m = m, r.c = c, r.d = function(u, y, h) {
4317
+ r.o(u, y) || Object.defineProperty(u, y, { enumerable: !0, get: h });
4318
+ }, r.r = function(u) {
4298
4319
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(u, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(u, "__esModule", { value: !0 });
4299
- }, n.t = function(u, y) {
4300
- if (1 & y && (u = n(u)), 8 & y || 4 & y && typeof u == "object" && u && u.__esModule) return u;
4320
+ }, r.t = function(u, y) {
4321
+ if (1 & y && (u = r(u)), 8 & y || 4 & y && typeof u == "object" && u && u.__esModule) return u;
4301
4322
  var h = /* @__PURE__ */ Object.create(null);
4302
- if (n.r(h), Object.defineProperty(h, "default", { enumerable: !0, value: u }), 2 & y && typeof u != "string")
4323
+ if (r.r(h), Object.defineProperty(h, "default", { enumerable: !0, value: u }), 2 & y && typeof u != "string")
4303
4324
  for (var E in u)
4304
- n.d(
4325
+ r.d(
4305
4326
  h,
4306
4327
  E,
4307
4328
  (function(Y) {
@@ -4309,21 +4330,21 @@ var Ks = { exports: {} };
4309
4330
  }).bind(null, E)
4310
4331
  );
4311
4332
  return h;
4312
- }, n.n = function(u) {
4333
+ }, r.n = function(u) {
4313
4334
  var y = u && u.__esModule ? function() {
4314
4335
  return u.default;
4315
4336
  } : function() {
4316
4337
  return u;
4317
4338
  };
4318
- return n.d(y, "a", y), y;
4319
- }, n.o = function(u, y) {
4339
+ return r.d(y, "a", y), y;
4340
+ }, r.o = function(u, y) {
4320
4341
  return Object.prototype.hasOwnProperty.call(u, y);
4321
- }, n.p = "", n(n.s = 0);
4342
+ }, r.p = "", r(r.s = 0);
4322
4343
  }([
4323
- function(m, c, n) {
4324
- m.exports = n(1);
4344
+ function(m, c, r) {
4345
+ m.exports = r(1);
4325
4346
  },
4326
- function(m, c, n) {
4347
+ function(m, c, r) {
4327
4348
  function u(i) {
4328
4349
  return (u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(g) {
4329
4350
  return typeof g;
@@ -4337,11 +4358,11 @@ var Ks = { exports: {} };
4337
4358
  return Object.prototype.toString.call(f) === g;
4338
4359
  };
4339
4360
  }
4340
- n.r(c), n.d(c, "default", function() {
4361
+ r.r(c), r.d(c, "default", function() {
4341
4362
  return Ne;
4342
- }), n.d(c, "compare", function() {
4363
+ }), r.d(c, "compare", function() {
4343
4364
  return Fe;
4344
- }), n.d(c, "comparable", function() {
4365
+ }), r.d(c, "comparable", function() {
4345
4366
  return Oe;
4346
4367
  });
4347
4368
  var h = y("Array"), E = y("Object"), Y = y("Function");
@@ -4436,7 +4457,7 @@ var Ks = { exports: {} };
4436
4457
  $exists: function(i, g, f, B) {
4437
4458
  return B.hasOwnProperty(f) === i;
4438
4459
  }
4439
- }, S = {
4460
+ }, T = {
4440
4461
  $eq: function(i, g, f) {
4441
4462
  var B = f.comparable, C = f.compare;
4442
4463
  return i instanceof RegExp ? P(function(D) {
@@ -4501,7 +4522,7 @@ var Ks = { exports: {} };
4501
4522
  };
4502
4523
  },
4503
4524
  $nin: function(i, g, f) {
4504
- var B = S.$in(i, g, f);
4525
+ var B = T.$in(i, g, f);
4505
4526
  return function(C, D, V, F) {
4506
4527
  return !B(C, D, V, F);
4507
4528
  };
@@ -4512,7 +4533,7 @@ var Ks = { exports: {} };
4512
4533
  };
4513
4534
  },
4514
4535
  $ne: function(i, g, f) {
4515
- var B = S.$eq(i, g, f);
4536
+ var B = T.$eq(i, g, f);
4516
4537
  return I(function(C, D, V, F) {
4517
4538
  return !B(C, D, V, F);
4518
4539
  });
@@ -4521,7 +4542,7 @@ var Ks = { exports: {} };
4521
4542
  return i.map(ie(f));
4522
4543
  },
4523
4544
  $all: function(i, g, f) {
4524
- return S.$and(i, g, f);
4545
+ return T.$and(i, g, f);
4525
4546
  },
4526
4547
  $or: function(i, g, f) {
4527
4548
  return i.map(ie(f));
@@ -4573,8 +4594,8 @@ var Ks = { exports: {} };
4573
4594
  return H(B, V[0], V[1], V[2]);
4574
4595
  }
4575
4596
  for (var F = C && C.$ne !== void 0, Z = F, W = 0; W < D.length; W++) {
4576
- var d = D[W], r = H(B, d[0], d[1], d[2]);
4577
- F ? Z &= r : Z |= r;
4597
+ var d = D[W], n = H(B, d[0], d[1], d[2]);
4598
+ F ? Z &= n : Z |= n;
4578
4599
  }
4579
4600
  return Z;
4580
4601
  }
@@ -4592,12 +4613,12 @@ var Ks = { exports: {} };
4592
4613
  var W = V[Z];
4593
4614
  if (Z !== "$options") {
4594
4615
  var d = z[Z] || i && f && f[Z];
4595
- if (d) S[Z] && (W = S[Z](W, V, i)), F.push(te(g(W), d));
4616
+ if (d) T[Z] && (W = T[Z](W, V, i)), F.push(te(g(W), d));
4596
4617
  else {
4597
4618
  if (Z.charCodeAt(0) === 36)
4598
4619
  throw new Error("Unknown operation " + Z);
4599
- var r = Z.split(".");
4600
- F.push(Le(r, D(W), W));
4620
+ var n = Z.split(".");
4621
+ F.push(Le(n, D(W), W));
4601
4622
  }
4602
4623
  }
4603
4624
  }
@@ -4607,24 +4628,24 @@ var Ks = { exports: {} };
4607
4628
  if (!E(Z)) return W;
4608
4629
  for (var d in Z) W.push(d), F(Z[d], W);
4609
4630
  return W;
4610
- }(V, []).join(",").search(/[$.]/) === -1 ? te(V, he) : C(V);
4631
+ }(V, []).join(",").search(/[$.]/) === -1 ? te(V, Be) : C(V);
4611
4632
  };
4612
4633
  return function(V) {
4613
4634
  return C(B(V));
4614
4635
  };
4615
4636
  }
4616
- function he(i, g) {
4637
+ function Be(i, g) {
4617
4638
  if (Object.prototype.toString.call(i) !== Object.prototype.toString.call(g))
4618
4639
  return !1;
4619
4640
  if (E(i)) {
4620
4641
  if (Object.keys(i).length !== Object.keys(g).length) return !1;
4621
- for (var f in i) if (!he(i[f], g[f])) return !1;
4642
+ for (var f in i) if (!Be(i[f], g[f])) return !1;
4622
4643
  return !0;
4623
4644
  }
4624
4645
  if (h(i)) {
4625
4646
  if (i.length !== g.length) return !1;
4626
4647
  for (var B = 0, C = i.length; B < C; B++)
4627
- if (!he(i[B], g[B])) return !1;
4648
+ if (!Be(i[B], g[B])) return !1;
4628
4649
  return !0;
4629
4650
  }
4630
4651
  return i === g;
@@ -4645,7 +4666,7 @@ var Ks = { exports: {} };
4645
4666
  };
4646
4667
  }
4647
4668
  function Fe(i, g) {
4648
- if (he(i, g)) return 0;
4669
+ if (Be(i, g)) return 0;
4649
4670
  if (u(i) === u(g)) {
4650
4671
  if (i > g) return 1;
4651
4672
  if (i < g) return -1;
@@ -4658,18 +4679,18 @@ var Ks = { exports: {} };
4658
4679
  ]);
4659
4680
  });
4660
4681
  })(Ks);
4661
- var qr = Ks.exports;
4662
- const Hr = /* @__PURE__ */ Or(qr);
4663
- function Xr(e, A) {
4682
+ var qn = Ks.exports;
4683
+ const Hn = /* @__PURE__ */ On(qn);
4684
+ function Xn(e, A) {
4664
4685
  for (var m = 0; m < A.length; m++) {
4665
4686
  var c = A[m];
4666
4687
  c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(e, c.key, c);
4667
4688
  }
4668
4689
  }
4669
- function Qr(e, A, m) {
4670
- return A && Xr(e.prototype, A), e;
4690
+ function Qn(e, A, m) {
4691
+ return A && Xn(e.prototype, A), e;
4671
4692
  }
4672
- function Ir(e, A) {
4693
+ function In(e, A) {
4673
4694
  e.prototype = Object.create(A.prototype), e.prototype.constructor = e, e.__proto__ = A;
4674
4695
  }
4675
4696
  function Bt(e) {
@@ -4677,12 +4698,12 @@ function Bt(e) {
4677
4698
  return m.__proto__ || Object.getPrototypeOf(m);
4678
4699
  }, Bt(e);
4679
4700
  }
4680
- function Se(e, A) {
4681
- return Se = Object.setPrototypeOf || function(c, n) {
4682
- return c.__proto__ = n, c;
4683
- }, Se(e, A);
4701
+ function Te(e, A) {
4702
+ return Te = Object.setPrototypeOf || function(c, r) {
4703
+ return c.__proto__ = r, c;
4704
+ }, Te(e, A);
4684
4705
  }
4685
- function Rr() {
4706
+ function Rn() {
4686
4707
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
4687
4708
  if (typeof Proxy == "function") return !0;
4688
4709
  try {
@@ -4692,38 +4713,38 @@ function Rr() {
4692
4713
  return !1;
4693
4714
  }
4694
4715
  }
4695
- function Te(e, A, m) {
4696
- return Rr() ? Te = Reflect.construct : Te = function(n, u, y) {
4716
+ function Se(e, A, m) {
4717
+ return Rn() ? Se = Reflect.construct : Se = function(r, u, y) {
4697
4718
  var h = [null];
4698
4719
  h.push.apply(h, u);
4699
- var E = Function.bind.apply(n, h), Y = new E();
4700
- return y && Se(Y, y.prototype), Y;
4701
- }, Te.apply(null, arguments);
4720
+ var E = Function.bind.apply(r, h), Y = new E();
4721
+ return y && Te(Y, y.prototype), Y;
4722
+ }, Se.apply(null, arguments);
4702
4723
  }
4703
- function Nr(e) {
4724
+ function Nn(e) {
4704
4725
  return Function.toString.call(e).indexOf("[native code]") !== -1;
4705
4726
  }
4706
4727
  function wt(e) {
4707
4728
  var A = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
4708
4729
  return wt = function(c) {
4709
- if (c === null || !Nr(c)) return c;
4730
+ if (c === null || !Nn(c)) return c;
4710
4731
  if (typeof c != "function")
4711
4732
  throw new TypeError("Super expression must either be null or a function");
4712
4733
  if (typeof A < "u") {
4713
4734
  if (A.has(c)) return A.get(c);
4714
- A.set(c, n);
4735
+ A.set(c, r);
4715
4736
  }
4716
- function n() {
4717
- return Te(c, arguments, Bt(this).constructor);
4737
+ function r() {
4738
+ return Se(c, arguments, Bt(this).constructor);
4718
4739
  }
4719
- return n.prototype = Object.create(c.prototype, {
4740
+ return r.prototype = Object.create(c.prototype, {
4720
4741
  constructor: {
4721
- value: n,
4742
+ value: r,
4722
4743
  enumerable: !1,
4723
4744
  writable: !0,
4724
4745
  configurable: !0
4725
4746
  }
4726
- }), Se(n, c);
4747
+ }), Te(r, c);
4727
4748
  }, wt(e);
4728
4749
  }
4729
4750
  function Nt(e) {
@@ -4733,31 +4754,31 @@ function Nt(e) {
4733
4754
  }
4734
4755
  var Ls = function(A) {
4735
4756
  return 'Cannot execute "' + A.action + '" on "' + A.subjectName + '"';
4736
- }, ze = Ls, Zr = /* @__PURE__ */ function(e) {
4737
- Ir(A, e), A.setDefaultMessage = function(n) {
4738
- n === null ? ze = Ls : ze = typeof n == "string" ? function() {
4739
- return n;
4740
- } : n;
4741
- }, A.from = function(n) {
4757
+ }, ze = Ls, Zn = /* @__PURE__ */ function(e) {
4758
+ In(A, e), A.setDefaultMessage = function(r) {
4759
+ r === null ? ze = Ls : ze = typeof r == "string" ? function() {
4760
+ return r;
4761
+ } : r;
4762
+ }, A.from = function(r) {
4742
4763
  var u = new this("");
4743
4764
  return Object.defineProperty(u, "ability", {
4744
- value: n
4765
+ value: r
4745
4766
  }), u;
4746
4767
  };
4747
- function A(c, n) {
4768
+ function A(c, r) {
4748
4769
  var u;
4749
- return n === void 0 && (n = {}), u = e.call(this, c) || this, u._setMetadata(n), u.message = c || ze(Nt(u)), u._customMessage = null, typeof Error.captureStackTrace == "function" && (u.name = u.constructor.name, Error.captureStackTrace(Nt(u), u.constructor)), u;
4770
+ return r === void 0 && (r = {}), u = e.call(this, c) || this, u._setMetadata(r), u.message = c || ze(Nt(u)), u._customMessage = null, typeof Error.captureStackTrace == "function" && (u.name = u.constructor.name, Error.captureStackTrace(Nt(u), u.constructor)), u;
4750
4771
  }
4751
4772
  var m = A.prototype;
4752
- return m.setMessage = function(n) {
4753
- return this._customMessage = n, this;
4754
- }, m.throwUnlessCan = function(n, u, y) {
4773
+ return m.setMessage = function(r) {
4774
+ return this._customMessage = r, this;
4775
+ }, m.throwUnlessCan = function(r, u, y) {
4755
4776
  if (!this.ability)
4756
4777
  throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
4757
- var h = this.ability.relevantRuleFor(n, u, y);
4778
+ var h = this.ability.relevantRuleFor(r, u, y);
4758
4779
  if (!(h && !h.inverted)) {
4759
4780
  this._setMetadata({
4760
- action: n,
4781
+ action: r,
4761
4782
  subject: u,
4762
4783
  field: y,
4763
4784
  subjectName: this.ability.subjectName(u)
@@ -4765,52 +4786,52 @@ var Ls = function(A) {
4765
4786
  var E = h ? h.reason : "";
4766
4787
  throw this.message = this._customMessage || E || ze(this), this;
4767
4788
  }
4768
- }, m._setMetadata = function(n) {
4769
- this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
4789
+ }, m._setMetadata = function(r) {
4790
+ this.subject = r.subject, this.subjectName = r.subjectName, this.action = r.action, this.field = r.field;
4770
4791
  }, A;
4771
4792
  }(wt(Error));
4772
4793
  function Mt(e) {
4773
4794
  return Array.isArray(e) ? e : [e];
4774
4795
  }
4775
- function zr(e) {
4796
+ function zn(e) {
4776
4797
  if (!e || typeof e == "string")
4777
4798
  return e;
4778
4799
  var A = typeof e == "object" ? e.constructor : e;
4779
4800
  return A.modelName || A.name;
4780
4801
  }
4781
- function Ur(e) {
4802
+ function Un(e) {
4782
4803
  return JSON.parse(JSON.stringify(e));
4783
4804
  }
4784
- var Wr = /[-/\\^$+?.()|[\]{}]/g, Tr = /\.?\*+\.?/g, Sr = /\*+/, kr = /\./g;
4785
- function Kr(e, A, m) {
4786
- var c = m[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", u = e.replace(kr, "\\$&").replace(Sr, n + c);
4805
+ var Wn = /[-/\\^$+?.()|[\]{}]/g, Sn = /\.?\*+\.?/g, Tn = /\*+/, kn = /\./g;
4806
+ function Kn(e, A, m) {
4807
+ var c = m[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", r = e.indexOf("**") === -1 ? "[^.]" : ".", u = e.replace(kn, "\\$&").replace(Tn, r + c);
4787
4808
  return A + e.length === m.length ? "(?:" + u + ")?" : u;
4788
4809
  }
4789
- function Lr(e, A, m) {
4810
+ function Ln(e, A, m) {
4790
4811
  return e === "." && (m[A - 1] === "*" || m[A + 1] === "*") ? e : "\\" + e;
4791
4812
  }
4792
- function Jr(e) {
4813
+ function Jn(e) {
4793
4814
  var A = e.map(function(c) {
4794
- return c.replace(Wr, Lr).replace(Tr, Kr);
4815
+ return c.replace(Wn, Ln).replace(Sn, Kn);
4795
4816
  }), m = A.length > 1 ? "(?:" + A.join("|") + ")" : A[0];
4796
4817
  return new RegExp("^" + m + "$");
4797
4818
  }
4798
- var _r = /* @__PURE__ */ function() {
4819
+ var _n = /* @__PURE__ */ function() {
4799
4820
  function e(m) {
4800
4821
  this.actions = m.actions || m.action, this.subject = m.subject, this.fields = !m.fields || m.fields.length === 0 ? void 0 : Mt(m.fields), Object.defineProperty(this, "_fieldsPattern", {
4801
4822
  writable: !0
4802
4823
  }), this.inverted = !!m.inverted, this.conditions = m.conditions, Object.defineProperty(this, "_matches", {
4803
4824
  writable: !0,
4804
- value: this.conditions ? Hr(this.conditions) : void 0
4825
+ value: this.conditions ? Hn(this.conditions) : void 0
4805
4826
  }), this.reason = m.reason;
4806
4827
  }
4807
4828
  var A = e.prototype;
4808
4829
  return A.matches = function(c) {
4809
4830
  return this._matches ? typeof c == "string" ? !this.inverted : this._matches(c) : !0;
4810
- }, A.isRelevantFor = function(c, n) {
4811
- return this.fields ? n ? this.matchesField(n) : !this.inverted : !0;
4831
+ }, A.isRelevantFor = function(c, r) {
4832
+ return this.fields ? r ? this.matchesField(r) : !this.inverted : !0;
4812
4833
  }, A.matchesField = function(c) {
4813
- return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Jr(this.fields)), this._fieldsPattern === null || c.indexOf("*") !== -1 ? this.fields.indexOf(c) !== -1 : this._fieldsPattern.test(c);
4834
+ return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Jn(this.fields)), this._fieldsPattern === null || c.indexOf("*") !== -1 ? this.fields.indexOf(c) !== -1 : this._fieldsPattern.test(c);
4814
4835
  }, e;
4815
4836
  }(), ee = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Zt = {
4816
4837
  crud: ["create", "read", "update", "delete"]
@@ -4818,85 +4839,85 @@ var _r = /* @__PURE__ */ function() {
4818
4839
  function zt(e, A) {
4819
4840
  return e === A || Array.isArray(A) && A.indexOf(e) !== -1;
4820
4841
  }
4821
- var $r = /* @__PURE__ */ function() {
4822
- e.addAlias = function(c, n) {
4823
- if (c === "manage" || zt("manage", n))
4842
+ var $n = /* @__PURE__ */ function() {
4843
+ e.addAlias = function(c, r) {
4844
+ if (c === "manage" || zt("manage", r))
4824
4845
  throw new Error('Cannot add alias for "manage" action because it represents any action');
4825
- if (zt(c, n))
4826
- throw new Error("Attempt to alias action to itself: " + c + " -> " + n.toString());
4827
- return Zt[c] = n, this;
4846
+ if (zt(c, r))
4847
+ throw new Error("Attempt to alias action to itself: " + c + " -> " + r.toString());
4848
+ return Zt[c] = r, this;
4828
4849
  };
4829
4850
  function e(m, c) {
4830
4851
  c === void 0 && (c = {}), Object.defineProperty(this, "subjectName", {
4831
- value: c.subjectName || zr
4852
+ value: c.subjectName || zn
4832
4853
  }), this[ee] = {
4833
- RuleType: c.RuleType || _r,
4854
+ RuleType: c.RuleType || _n,
4834
4855
  originalRules: m || [],
4835
4856
  hasPerFieldRules: !1,
4836
4857
  indexedRules: /* @__PURE__ */ Object.create(null),
4837
4858
  mergedRules: /* @__PURE__ */ Object.create(null),
4838
4859
  events: {},
4839
- aliases: Ur(Zt)
4860
+ aliases: Un(Zt)
4840
4861
  }, this.update(m);
4841
4862
  }
4842
4863
  var A = e.prototype;
4843
4864
  return A.update = function(c) {
4844
4865
  if (!Array.isArray(c))
4845
4866
  return this;
4846
- var n = {
4867
+ var r = {
4847
4868
  rules: c,
4848
4869
  ability: this
4849
4870
  };
4850
- this.emit("update", n), this[ee].originalRules = c.slice(0), this[ee].mergedRules = /* @__PURE__ */ Object.create(null);
4871
+ this.emit("update", r), this[ee].originalRules = c.slice(0), this[ee].mergedRules = /* @__PURE__ */ Object.create(null);
4851
4872
  var u = this.buildIndexFor(c);
4852
- return this[ee].indexedRules = u.rules, this[ee].hasPerFieldRules = u.hasPerFieldRules, this.emit("updated", n), this;
4873
+ return this[ee].indexedRules = u.rules, this[ee].hasPerFieldRules = u.hasPerFieldRules, this.emit("updated", r), this;
4853
4874
  }, A.buildIndexFor = function(c) {
4854
- for (var n = /* @__PURE__ */ Object.create(null), u = this[ee].RuleType, y = !0, h = !1, E = 0; E < c.length; E++) {
4875
+ for (var r = /* @__PURE__ */ Object.create(null), u = this[ee].RuleType, y = !0, h = !1, E = 0; E < c.length; E++) {
4855
4876
  var Y = new u(c[E]), w = this.expandActions(Y.actions), P = Mt(Y.subject), I = c.length - E - 1;
4856
4877
  y = !!(y && Y.inverted), !h && Y.fields && (h = !0);
4857
4878
  for (var H = 0; H < P.length; H++) {
4858
4879
  var z = P[H];
4859
- n[z] = n[z] || /* @__PURE__ */ Object.create(null);
4860
- for (var S = 0; S < w.length; S++) {
4861
- var te = w[S];
4862
- n[z][te] = n[z][te] || /* @__PURE__ */ Object.create(null), n[z][te][I] = Y;
4880
+ r[z] = r[z] || /* @__PURE__ */ Object.create(null);
4881
+ for (var T = 0; T < w.length; T++) {
4882
+ var te = w[T];
4883
+ r[z][te] = r[z][te] || /* @__PURE__ */ Object.create(null), r[z][te][I] = Y;
4863
4884
  }
4864
4885
  }
4865
4886
  }
4866
4887
  return {
4867
4888
  isAllInverted: y,
4868
4889
  hasPerFieldRules: h,
4869
- rules: n
4890
+ rules: r
4870
4891
  };
4871
4892
  }, A.expandActions = function(c) {
4872
- for (var n = this[ee].aliases, u = Mt(c), y = 0; y < u.length; ) {
4893
+ for (var r = this[ee].aliases, u = Mt(c), y = 0; y < u.length; ) {
4873
4894
  var h = u[y++];
4874
- n.hasOwnProperty(h) && (u = u.concat(n[h]));
4895
+ r.hasOwnProperty(h) && (u = u.concat(r[h]));
4875
4896
  }
4876
4897
  return u;
4877
- }, A.can = function(c, n, u) {
4898
+ }, A.can = function(c, r, u) {
4878
4899
  if (u && typeof u != "string")
4879
4900
  throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
4880
- var y = this.relevantRuleFor(c, n, u);
4901
+ var y = this.relevantRuleFor(c, r, u);
4881
4902
  return !!y && !y.inverted;
4882
- }, A.relevantRuleFor = function(c, n, u) {
4883
- for (var y = this.rulesFor(c, n, u), h = 0; h < y.length; h++)
4884
- if (y[h].matches(n))
4903
+ }, A.relevantRuleFor = function(c, r, u) {
4904
+ for (var y = this.rulesFor(c, r, u), h = 0; h < y.length; h++)
4905
+ if (y[h].matches(r))
4885
4906
  return y[h];
4886
4907
  return null;
4887
- }, A.possibleRulesFor = function(c, n) {
4888
- var u = this.subjectName(n), y = this[ee].mergedRules, h = u + "_" + c;
4908
+ }, A.possibleRulesFor = function(c, r) {
4909
+ var u = this.subjectName(r), y = this[ee].mergedRules, h = u + "_" + c;
4889
4910
  return y[h] || (y[h] = this.mergeRulesFor(c, u)), y[h];
4890
- }, A.mergeRulesFor = function(c, n) {
4891
- var u = this[ee].indexedRules, y = [n, "all"].reduce(function(h, E) {
4911
+ }, A.mergeRulesFor = function(c, r) {
4912
+ var u = this[ee].indexedRules, y = [r, "all"].reduce(function(h, E) {
4892
4913
  var Y = u[E];
4893
4914
  return Y ? Object.assign(h, Y[c], Y.manage) : h;
4894
4915
  }, []);
4895
4916
  return y.filter(Boolean);
4896
- }, A.rulesFor = function(c, n, u) {
4897
- var y = this.possibleRulesFor(c, n);
4917
+ }, A.rulesFor = function(c, r, u) {
4918
+ var y = this.possibleRulesFor(c, r);
4898
4919
  return this[ee].hasPerFieldRules ? y.filter(function(h) {
4899
- return h.isRelevantFor(n, u);
4920
+ return h.isRelevantFor(r, u);
4900
4921
  }) : y;
4901
4922
  }, A.cannot = function() {
4902
4923
  return !this.can.apply(this, arguments);
@@ -4905,21 +4926,21 @@ var $r = /* @__PURE__ */ function() {
4905
4926
  console.warn(`
4906
4927
  Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
4907
4928
  Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
4908
- `.trim()), (c = Zr.from(this)).throwUnlessCan.apply(c, arguments);
4909
- }, A.on = function(c, n) {
4929
+ `.trim()), (c = Zn.from(this)).throwUnlessCan.apply(c, arguments);
4930
+ }, A.on = function(c, r) {
4910
4931
  var u = this[ee].events, y = !0;
4911
- return u[c] || (u[c] = []), u[c].push(n), function() {
4932
+ return u[c] || (u[c] = []), u[c].push(r), function() {
4912
4933
  if (y) {
4913
- var h = u[c].indexOf(n);
4934
+ var h = u[c].indexOf(r);
4914
4935
  u[c].splice(h, 1), y = !1;
4915
4936
  }
4916
4937
  };
4917
- }, A.emit = function(c, n) {
4938
+ }, A.emit = function(c, r) {
4918
4939
  var u = this[ee].events[c];
4919
4940
  u && u.slice(0).forEach(function(y) {
4920
- return y(n);
4941
+ return y(r);
4921
4942
  });
4922
- }, Qr(e, [{
4943
+ }, Qn(e, [{
4923
4944
  key: "rules",
4924
4945
  get: function() {
4925
4946
  return this[ee].originalRules;
@@ -4941,12 +4962,12 @@ function ta(e) {
4941
4962
  }));
4942
4963
  }
4943
4964
  function sa(e) {
4944
- return new $r(ta(e));
4965
+ return new $n(ta(e));
4945
4966
  }
4946
- function na(e, A, m) {
4947
- const c = Array.isArray(e) ? e : [e], n = sa(A), u = (w) => w.subject, y = (w) => n.can(w.action, u(w), w.field) ? !0 : w.coverSubject !== void 0 ? n.can(w.action, w.coverSubject, w.field) : !1, h = c.find((w) => !y(w));
4967
+ function ra(e, A, m) {
4968
+ const c = Array.isArray(e) ? e : [e], r = sa(A), u = (w) => w.subject, y = (w) => r.can(w.action, u(w), w.field) ? !0 : w.coverSubject !== void 0 ? r.can(w.action, w.coverSubject, w.field) : !1, h = c.find((w) => !y(w));
4948
4969
  if (h) {
4949
- const w = n.relevantRuleFor(
4970
+ const w = r.relevantRuleFor(
4950
4971
  h.action,
4951
4972
  u(h),
4952
4973
  h.field
@@ -4957,23 +4978,23 @@ function na(e, A, m) {
4957
4978
  decisiveRule: w ?? null
4958
4979
  };
4959
4980
  }
4960
- const E = c[0], Y = n.relevantRuleFor(E.action, u(E), E.field);
4981
+ const E = c[0], Y = r.relevantRuleFor(E.action, u(E), E.field);
4961
4982
  return { granted: !0, decisivePermission: E, decisiveRule: Y ?? null };
4962
4983
  }
4963
4984
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
4964
- const ra = () => {
4985
+ const na = () => {
4965
4986
  };
4966
4987
  function aa(e, A, m) {
4967
4988
  let c;
4968
- en(m) ? c = {
4989
+ er(m) ? c = {
4969
4990
  evaluating: m
4970
4991
  } : c = {};
4971
4992
  const {
4972
- lazy: n = !1,
4993
+ lazy: r = !1,
4973
4994
  evaluating: u = void 0,
4974
4995
  shallow: y = !0,
4975
- onError: h = ra
4976
- } = c, E = ve(!n), Y = y ? tn(A) : ve(A);
4996
+ onError: h = na
4997
+ } = c, E = he(!r), Y = y ? tr(A) : he(A);
4977
4998
  let w = 0;
4978
4999
  return Wt(async (P) => {
4979
5000
  if (!E.value)
@@ -4985,9 +5006,9 @@ function aa(e, A, m) {
4985
5006
  u.value = !0;
4986
5007
  });
4987
5008
  try {
4988
- const z = await e((S) => {
5009
+ const z = await e((T) => {
4989
5010
  P(() => {
4990
- u && (u.value = !1), H || S();
5011
+ u && (u.value = !1), H || T();
4991
5012
  });
4992
5013
  });
4993
5014
  I === w && (Y.value = z);
@@ -4996,10 +5017,10 @@ function aa(e, A, m) {
4996
5017
  } finally {
4997
5018
  u && I === w && (u.value = !1), H = !0;
4998
5019
  }
4999
- }), n ? jt(() => (E.value = !0, Y.value)) : Y;
5020
+ }), r ? jt(() => (E.value = !0, Y.value)) : Y;
5000
5021
  }
5001
5022
  async function oa(e) {
5002
- const { sessionUser: A, validationManifest: m } = e, { requiredRoles: c, requiredCaslPermissions: n, customValidationFunction: u } = m;
5023
+ const { sessionUser: A, validationManifest: m } = e, { requiredRoles: c, requiredCaslPermissions: r, customValidationFunction: u } = m;
5003
5024
  if (!A)
5004
5025
  return { canAccess: !1 };
5005
5026
  if (c && c.length > 0 && !c.includes(A._role || ""))
@@ -5007,8 +5028,8 @@ async function oa(e) {
5007
5028
  canAccess: !1,
5008
5029
  message: "User does not have permission to access"
5009
5030
  });
5010
- if (n && n.length > 0) {
5011
- const { granted: y } = na(n, A.permissions);
5031
+ if (r && r.length > 0) {
5032
+ const { granted: y } = ra(r, A.permissions);
5012
5033
  if (!y)
5013
5034
  return Promise.resolve({
5014
5035
  canAccess: !1,
@@ -5033,7 +5054,7 @@ async function ia(e, A) {
5033
5054
  return {
5034
5055
  canAccess: !1,
5035
5056
  message: c.message,
5036
- redirectTo: Ln
5057
+ redirectTo: Kr
5037
5058
  };
5038
5059
  }
5039
5060
  return {
@@ -5042,7 +5063,7 @@ async function ia(e, A) {
5042
5063
  }
5043
5064
  var Ct = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Ct || {});
5044
5065
  function la() {
5045
- const e = mn(), { sessionUser: A } = Yt();
5066
+ const e = ur(), { sessionUser: A } = Yt();
5046
5067
  return aa(
5047
5068
  async () => {
5048
5069
  e.matched;
@@ -5092,17 +5113,17 @@ const ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
5092
5113
  "th-TH": fa
5093
5114
  }
5094
5115
  });
5095
- return (m, c) => (Ve(), St("div", ya, [
5096
- we("div", va, [
5097
- we("div", ha, [
5098
- we("img", {
5099
- src: Me(ca),
5116
+ return (m, c) => (Ve(), Tt("div", ya, [
5117
+ Me("div", va, [
5118
+ Me("div", ha, [
5119
+ Me("img", {
5120
+ src: Ce(ca),
5100
5121
  class: "w-full h-full"
5101
5122
  }, null, 8, Ba)
5102
5123
  ]),
5103
- we("div", null, [
5104
- we("h1", wa, It(Me(A)("noPermission.title")), 1),
5105
- we("h2", Ma, It(Me(A)("noPermission.subtitle")), 1)
5124
+ Me("div", null, [
5125
+ Me("h1", wa, It(Ce(A)("noPermission.title")), 1),
5126
+ Me("h2", Ma, It(Ce(A)("noPermission.subtitle")), 1)
5106
5127
  ])
5107
5128
  ])
5108
5129
  ]));
@@ -5111,7 +5132,7 @@ const ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
5111
5132
  __name: "PermissionWrapper",
5112
5133
  setup(e) {
5113
5134
  const A = la();
5114
- return (m, c) => Me(A) === Me(Ct).Denied ? (Ve(), ke(Ca, { key: 0 })) : Me(A) === Me(Ct).Allowed ? Tt(m.$slots, "default", { key: 1 }) : sn("", !0);
5135
+ return (m, c) => Ce(A) === Ce(Ct).Denied ? (Ve(), ke(Ca, { key: 0 })) : Ce(A) === Ce(Ct).Allowed ? St(m.$slots, "default", { key: 1 }) : sr("", !0);
5115
5136
  }
5116
5137
  });
5117
5138
  function Ke(e) {
@@ -5123,7 +5144,7 @@ function Ke(e) {
5123
5144
  };
5124
5145
  }
5125
5146
  function ja(e, A) {
5126
- const m = ve({ top: 0, bottom: 0, left: 0, right: 0 });
5147
+ const m = he({ top: 0, bottom: 0, left: 0, right: 0 });
5127
5148
  function c() {
5128
5149
  if (e.value) {
5129
5150
  const u = e.value.getBoundingClientRect();
@@ -5135,31 +5156,31 @@ function ja(e, A) {
5135
5156
  };
5136
5157
  }
5137
5158
  }
5138
- let n = null;
5139
- return nn(e, async (u) => {
5140
- u && (await rn(), c());
5159
+ let r = null;
5160
+ return rr(e, async (u) => {
5161
+ u && (await nr(), c());
5141
5162
  }), kt(() => {
5142
- window.addEventListener("resize", c), n = new ResizeObserver(c), n.observe(document.body);
5143
- }), an(() => {
5144
- window.removeEventListener("resize", c), n == null || n.disconnect(), n = null;
5163
+ window.addEventListener("resize", c), r = new ResizeObserver(c), r.observe(document.body);
5164
+ }), ar(() => {
5165
+ window.removeEventListener("resize", c), r == null || r.disconnect(), r = null;
5145
5166
  }), m;
5146
5167
  }
5147
5168
  const Ga = /* @__PURE__ */ xe({
5148
5169
  __name: "FullWrapper",
5149
5170
  setup(e) {
5150
- const A = un(), m = ve(null), c = ja(m), n = jt(() => {
5171
+ const A = Ar(), m = he(null), c = ja(m), r = jt(() => {
5151
5172
  var h;
5152
5173
  const y = A.isAtMost("sm") ? 56 : 0;
5153
5174
  return {
5154
5175
  height: `calc(100dvh - ${((h = c.value) == null ? void 0 : h.top) + 24 + y}px)`
5155
5176
  };
5156
5177
  });
5157
- return (u, y) => (Ve(), St("div", {
5178
+ return (u, y) => (Ve(), Tt("div", {
5158
5179
  ref_key: "wrapper",
5159
5180
  ref: m,
5160
- style: on(n.value)
5181
+ style: or(r.value)
5161
5182
  }, [
5162
- Tt(u.$slots, "default")
5183
+ St(u.$slots, "default")
5163
5184
  ], 4));
5164
5185
  }
5165
5186
  }), Ya = { class: "flex justify-center items-center h-full w-full" }, Ea = /* @__PURE__ */ xe({
@@ -5168,20 +5189,20 @@ const Ga = /* @__PURE__ */ xe({
5168
5189
  return (A, m) => {
5169
5190
  const c = Gt("FmCircularProgress");
5170
5191
  return Ve(), ke(Ga, null, {
5171
- default: ln(() => [
5172
- we("div", Ya, [
5173
- cn(c, { size: "xl" })
5192
+ default: ir(() => [
5193
+ Me("div", Ya, [
5194
+ lr(c, { size: "xl" })
5174
5195
  ])
5175
5196
  ]),
5176
5197
  _: 1
5177
5198
  });
5178
5199
  };
5179
5200
  }
5180
- }), be = (e) => An({
5201
+ }), be = (e) => cr({
5181
5202
  loader: e,
5182
5203
  loadingComponent: Ea
5183
5204
  });
5184
- var T = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e.POS_GRANT = "pos-grant", e))(T || {});
5205
+ var S = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e.POS_GRANT = "pos-grant", e))(S || {});
5185
5206
  const ht = (e) => ({
5186
5207
  validationManifest: {
5187
5208
  requiredCaslPermissions: [
@@ -5191,10 +5212,10 @@ const ht = (e) => ({
5191
5212
  }
5192
5213
  ]
5193
5214
  }
5194
- }), xa = Ke(be(() => import("./Main-B-4Hty-_.js"))), Va = Ke(be(() => import("./Main-D1Pazgt0.js"))), Pa = Ke(
5195
- be(() => import("./AuditLogList-DiVmHoNT.js"))
5196
- ), Fa = Ke(be(() => import("./Main-DWXAa4Zw.js"))), Oa = be(() => import("./EmployeeList-DCjDgFLf.js")), qa = be(() => import("./RoleList-CDZ0CwPn.js")), Ha = be(() => import("./TimesheetList-CENyYssG.js")), Xa = be(() => import("./TeamMemberList-CGN9PqHo.js")), Qa = be(
5197
- () => import("./PermissionSetList-DE1vPSOS.js")
5215
+ }), xa = Ke(be(() => import("./Main-DrquIYbM.js"))), Va = Ke(be(() => import("./Main-Da2SFU8t.js"))), Pa = Ke(
5216
+ be(() => import("./AuditLogList-UHJxYRdr.js"))
5217
+ ), Fa = Ke(be(() => import("./Main-3IwCguRi.js"))), Oa = be(() => import("./EmployeeList-Cpv6Pc4J.js")), qa = be(() => import("./RoleList-CgSg0ydf.js")), Ha = be(() => import("./TimesheetList-CMqKNZOd.js")), Xa = be(() => import("./TeamMemberList-jEODaxFX.js")), Qa = be(
5218
+ () => import("./PermissionSetList-upvouEfb.js")
5198
5219
  ), eo = [
5199
5220
  {
5200
5221
  path: "/",
@@ -5260,67 +5281,67 @@ const ht = (e) => ({
5260
5281
  __name: "Navigator",
5261
5282
  emits: ["close-navigation"],
5262
5283
  setup(e, { emit: A }) {
5263
- const m = A, { t: c } = Kt(), n = gn(), { sessionUser: u } = Yt(), y = jt(() => {
5284
+ const m = A, { t: c } = Kt(), r = mr(), { sessionUser: u } = Yt(), y = jt(() => {
5264
5285
  var Y;
5265
5286
  const E = [];
5266
5287
  return E.push({
5267
5288
  label: c("hr.employee.title"),
5268
5289
  value: "employee",
5269
5290
  action: () => {
5270
- n.push({
5271
- name: T.EMPLOYEE,
5272
- query: n.currentRoute.value.query
5291
+ r.push({
5292
+ name: S.EMPLOYEE,
5293
+ query: r.currentRoute.value.query
5273
5294
  }), m("close-navigation");
5274
5295
  }
5275
5296
  }), E.push({
5276
5297
  label: c("team.title"),
5277
5298
  value: "team-member",
5278
5299
  action: () => {
5279
- n.push({
5280
- name: T.TEAM,
5281
- query: n.currentRoute.value.query
5300
+ r.push({
5301
+ name: S.TEAM,
5302
+ query: r.currentRoute.value.query
5282
5303
  }), m("close-navigation");
5283
5304
  }
5284
5305
  }), E.push({
5285
5306
  label: c("auditLog.title"),
5286
5307
  value: "audit-log",
5287
5308
  action: () => {
5288
- n.push({
5289
- name: T.AUDIT_LOG
5309
+ r.push({
5310
+ name: S.AUDIT_LOG
5290
5311
  }), m("close-navigation");
5291
5312
  }
5292
5313
  }), (Y = u.value) != null && Y.role.isAdmin && E.push({
5293
5314
  label: c("grantUser.title"),
5294
5315
  value: "pos-grant",
5295
5316
  action: () => {
5296
- n.push({
5297
- name: T.POS_GRANT,
5298
- query: n.currentRoute.value.query
5317
+ r.push({
5318
+ name: S.POS_GRANT,
5319
+ query: r.currentRoute.value.query
5299
5320
  }), m("close-navigation");
5300
5321
  }
5301
5322
  }), E;
5302
- }), h = ve();
5323
+ }), h = he();
5303
5324
  return Wt(() => {
5304
5325
  var Y;
5305
- let E = (Y = n.currentRoute.value) == null ? void 0 : Y.name;
5326
+ let E = (Y = r.currentRoute.value) == null ? void 0 : Y.name;
5306
5327
  switch (E) {
5307
- case T.EMPLOYEE:
5308
- case T.ROLE:
5309
- case T.TIMESHEET:
5310
- E = T.EMPLOYEE;
5328
+ case S.EMPLOYEE:
5329
+ case S.ROLE:
5330
+ case S.TIMESHEET:
5331
+ E = S.EMPLOYEE;
5311
5332
  break;
5312
- case T.TEAM_MEMBER:
5313
- case T.TEAM_ROLE:
5314
- E = T.TEAM_MEMBER;
5333
+ case S.TEAM_MEMBER:
5334
+ case S.TEAM_ROLE:
5335
+ E = S.TEAM_MEMBER;
5315
5336
  break;
5316
- case T.AUDIT_LOG:
5317
- E = T.AUDIT_LOG;
5337
+ case S.AUDIT_LOG:
5338
+ E = S.AUDIT_LOG;
5318
5339
  break;
5319
- case T.POS_GRANT:
5340
+ case S.POS_GRANT:
5320
5341
  E = "pos-grant";
5321
5342
  break;
5322
5343
  default:
5323
- E = T.EMPLOYEE;
5344
+ E = S.EMPLOYEE;
5324
5345
  }
5325
5346
  h.value !== E && (h.value = E);
5326
5347
  }), (E, Y) => {
@@ -5345,31 +5366,31 @@ var Dt = { exports: {} };
5345
5366
  } catch {
5346
5367
  return null;
5347
5368
  }
5348
- }, getItem: function(d, r) {
5369
+ }, getItem: function(d, n) {
5349
5370
  var s = this;
5350
5371
  return new Promise(function(l, a) {
5351
5372
  try {
5352
5373
  var p = s.getItemSync(d);
5353
- r == null || r(null, p), l(p);
5374
+ n == null || n(null, p), l(p);
5354
5375
  } catch (v) {
5355
- r && r(v, null), a(v);
5376
+ n && n(v, null), a(v);
5356
5377
  }
5357
5378
  });
5358
- }, setItem: function(d, r, s) {
5379
+ }, setItem: function(d, n, s) {
5359
5380
  return new Promise(function(l, a) {
5360
5381
  try {
5361
- localStorage.setItem(d, r), s && s(null, r), l(r);
5382
+ localStorage.setItem(d, n), s && s(null, n), l(n);
5362
5383
  } catch (p) {
5363
5384
  s && s(p, null), a(p);
5364
5385
  }
5365
5386
  });
5366
- } }, n = function() {
5367
- return n = Object.assign || function(d) {
5368
- for (var r, s = 1, l = arguments.length; s < l; s++) for (var a in r = arguments[s]) Object.prototype.hasOwnProperty.call(r, a) && (d[a] = r[a]);
5387
+ } }, r = function() {
5388
+ return r = Object.assign || function(d) {
5389
+ for (var n, s = 1, l = arguments.length; s < l; s++) for (var a in n = arguments[s]) Object.prototype.hasOwnProperty.call(n, a) && (d[a] = n[a]);
5369
5390
  return d;
5370
- }, n.apply(this, arguments);
5391
+ }, r.apply(this, arguments);
5371
5392
  };
5372
- function u(d, r, s, l) {
5393
+ function u(d, n, s, l) {
5373
5394
  return new (s || (s = Promise))(function(a, p) {
5374
5395
  function v(O) {
5375
5396
  try {
@@ -5394,7 +5415,7 @@ var Dt = { exports: {} };
5394
5415
  x((l = l.apply(d, [])).next());
5395
5416
  });
5396
5417
  }
5397
- function y(d, r) {
5418
+ function y(d, n) {
5398
5419
  var s, l, a, p, v = { label: 0, sent: function() {
5399
5420
  if (1 & a[0]) throw a[1];
5400
5421
  return a[1];
@@ -5441,7 +5462,7 @@ var Dt = { exports: {} };
5441
5462
  a[2] && v.ops.pop(), v.trys.pop();
5442
5463
  continue;
5443
5464
  }
5444
- M = r.call(d, v);
5465
+ M = n.call(d, v);
5445
5466
  } catch (X) {
5446
5467
  M = [6, X], l = 0;
5447
5468
  } finally {
@@ -5453,88 +5474,88 @@ var Dt = { exports: {} };
5453
5474
  };
5454
5475
  }
5455
5476
  }
5456
- function h(d, r, s) {
5457
- for (var l, a = 0, p = r.length; a < p; a++) !l && a in r || (l || (l = Array.prototype.slice.call(r, 0, a)), l[a] = r[a]);
5458
- return d.concat(l || Array.prototype.slice.call(r));
5477
+ function h(d, n, s) {
5478
+ for (var l, a = 0, p = n.length; a < p; a++) !l && a in n || (l || (l = Array.prototype.slice.call(n, 0, a)), l[a] = n[a]);
5479
+ return d.concat(l || Array.prototype.slice.call(n));
5459
5480
  }
5460
- var E = function d(r, s) {
5461
- if (r === s) return !0;
5462
- if (r && s && typeof r == "object" && typeof s == "object") {
5463
- if (r.constructor !== s.constructor) return !1;
5481
+ var E = function d(n, s) {
5482
+ if (n === s) return !0;
5483
+ if (n && s && typeof n == "object" && typeof s == "object") {
5484
+ if (n.constructor !== s.constructor) return !1;
5464
5485
  var l, a, p;
5465
- if (Array.isArray(r)) {
5466
- if ((l = r.length) != s.length) return !1;
5467
- for (a = l; a-- != 0; ) if (!d(r[a], s[a])) return !1;
5486
+ if (Array.isArray(n)) {
5487
+ if ((l = n.length) != s.length) return !1;
5488
+ for (a = l; a-- != 0; ) if (!d(n[a], s[a])) return !1;
5468
5489
  return !0;
5469
5490
  }
5470
- if (r.constructor === RegExp) return r.source === s.source && r.flags === s.flags;
5471
- if (r.valueOf !== Object.prototype.valueOf) return r.valueOf() === s.valueOf();
5472
- if (r.toString !== Object.prototype.toString) return r.toString() === s.toString();
5473
- if ((l = (p = Object.keys(r)).length) !== Object.keys(s).length) return !1;
5491
+ if (n.constructor === RegExp) return n.source === s.source && n.flags === s.flags;
5492
+ if (n.valueOf !== Object.prototype.valueOf) return n.valueOf() === s.valueOf();
5493
+ if (n.toString !== Object.prototype.toString) return n.toString() === s.toString();
5494
+ if ((l = (p = Object.keys(n)).length) !== Object.keys(s).length) return !1;
5474
5495
  for (a = l; a-- != 0; ) if (!Object.prototype.hasOwnProperty.call(s, p[a])) return !1;
5475
5496
  for (a = l; a-- != 0; ) {
5476
5497
  var v = p[a];
5477
- if (!d(r[v], s[v])) return !1;
5498
+ if (!d(n[v], s[v])) return !1;
5478
5499
  }
5479
5500
  return !0;
5480
5501
  }
5481
- return r != r && s != s;
5502
+ return n != n && s != s;
5482
5503
  };
5483
- function Y(d, r) {
5484
- var s = Object.keys(r || {}).filter(function(l) {
5485
- var a = d == null ? void 0 : d[l], p = r == null ? void 0 : r[l];
5504
+ function Y(d, n) {
5505
+ var s = Object.keys(n || {}).filter(function(l) {
5506
+ var a = d == null ? void 0 : d[l], p = n == null ? void 0 : n[l];
5486
5507
  return !E(a, p);
5487
5508
  });
5488
5509
  return Object.keys(d || {}).filter(function(l) {
5489
- Object.keys(r || {}).includes(l) || s.push(l);
5510
+ Object.keys(n || {}).includes(l) || s.push(l);
5490
5511
  }), Object.keys(s).length ? s : null;
5491
5512
  }
5492
5513
  var w, P;
5493
- function I(d, r, s) {
5514
+ function I(d, n, s) {
5494
5515
  var l = "shortString", a = !0;
5495
- typeof s == "number" && (l = "javaDouble", a = !1), d[l] = d[l] || {}, d[l][r] = a ? s + "" : s;
5516
+ typeof s == "number" && (l = "javaDouble", a = !1), d[l] = d[l] || {}, d[l][n] = a ? s + "" : s;
5496
5517
  }
5497
5518
  function H(d) {
5498
5519
  return !!d && typeof d == "object" && d.value !== void 0;
5499
5520
  }
5500
5521
  function z(d) {
5501
- return Object.fromEntries(Object.entries(d).map(function(r) {
5502
- var s = r[0], l = r[1];
5522
+ return Object.fromEntries(Object.entries(d).map(function(n) {
5523
+ var s = n[0], l = n[1];
5503
5524
  return [s, H(l) ? l : { value: l }];
5504
5525
  }));
5505
5526
  }
5506
- function S(d) {
5507
- return n(n({}, d), { identity: d.identity ? n(n({}, d.identity), { traits: z(d.identity.traits || {}) }) : void 0 });
5527
+ function T(d) {
5528
+ return r(r({}, d), { identity: d.identity ? r(r({}, d.identity), { traits: z(d.identity.traits || {}) }) : void 0 });
5508
5529
  }
5509
5530
  (function(d) {
5510
5531
  d.NONE = "NONE", d.DEFAULT_FLAGS = "DEFAULT_FLAGS", d.CACHE = "CACHE", d.SERVER = "SERVER";
5511
5532
  })(w || (w = {}));
5512
- var te, k = null, Le = "FLAGSMITH_EVENT", ie = Le, he = "https://edge.api.flagsmith.com/api/v1/", Pe = "flagsmith_value_", Ne = "flagsmith_enabled_", Fe = "flagsmith_trait_", Oe = function() {
5513
- function d(r) {
5533
+ var te, k = null, Le = "FLAGSMITH_EVENT", ie = Le, Be = "https://edge.api.flagsmith.com/api/v1/", Pe = "flagsmith_value_", Ne = "flagsmith_enabled_", Fe = "flagsmith_trait_", Oe = function() {
5534
+ function d(n) {
5514
5535
  var s = this;
5515
5536
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
5516
5537
  var l = s, a = l.api, p = l.evaluationContext;
5517
- s.log("Get Flags"), s.isLoading = !0, s.loadingState.isFetching || s.setLoadingState(n(n({}, s.loadingState), { isFetching: !0 }));
5538
+ s.log("Get Flags"), s.isLoading = !0, s.loadingState.isFetching || s.setLoadingState(r(r({}, s.loadingState), { isFetching: !0 }));
5518
5539
  var v = "".concat(s.getContext().identity), j = function(x) {
5519
5540
  var O, M, X, L;
5520
5541
  if (x && v === "".concat(s.getContext().identity)) {
5521
5542
  var Ae = x.flags, se = x.traits, le = x.identifier;
5522
5543
  s.isLoading = !1;
5523
- var ne = {}, re = {};
5544
+ var re = {}, ne = {};
5524
5545
  se = se || [], (Ae = Ae || []).forEach(function(Q) {
5525
- ne[Q.feature.name.toLowerCase().replace(/ /g, "_")] = { id: Q.feature.id, enabled: Q.enabled, value: Q.feature_state_value };
5546
+ re[Q.feature.name.toLowerCase().replace(/ /g, "_")] = { id: Q.feature.id, enabled: Q.enabled, value: Q.feature_state_value };
5526
5547
  }), se.forEach(function(Q) {
5527
- re[Q.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: Q.transient, value: Q.trait_value };
5528
- }), s.oldFlags = n({}, s.flags);
5529
- var ue = Y(s.oldFlags, ne), qe = Y((O = s.evaluationContext.identity) === null || O === void 0 ? void 0 : O.traits, re);
5530
- if ((le || Object.keys(re).length) && (s.evaluationContext.identity = n(n({}, s.evaluationContext.identity), { traits: re }), le && (s.evaluationContext.identity.identifier = le)), s.flags = ne, s.updateStorage(), s._onChange(s.oldFlags, { isFromServer: !0, flagsChanged: ue, traitsChanged: qe }, s._loadedState(null, w.SERVER)), s.datadogRum) try {
5548
+ ne[Q.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: Q.transient, value: Q.trait_value };
5549
+ }), s.oldFlags = r({}, s.flags);
5550
+ var ue = Y(s.oldFlags, re), qe = Y((O = s.evaluationContext.identity) === null || O === void 0 ? void 0 : O.traits, ne);
5551
+ if ((le || Object.keys(ne).length) && (s.evaluationContext.identity = r(r({}, s.evaluationContext.identity), { traits: ne }), le && (s.evaluationContext.identity.identifier = le)), s.flags = re, s.updateStorage(), s._onChange(s.oldFlags, { isFromServer: !0, flagsChanged: ue, traitsChanged: qe }, s._loadedState(null, w.SERVER)), s.datadogRum) try {
5531
5552
  if (s.datadogRum.trackTraits) {
5532
5553
  var He = {};
5533
5554
  Object.keys(((M = s.evaluationContext.identity) === null || M === void 0 ? void 0 : M.traits) || {}).map(function(Q) {
5534
5555
  He[Fe + Q] = s.getTrait(Q);
5535
5556
  });
5536
- var Ce = n(n(n({}, s.datadogRum.client.getUser()), { id: s.datadogRum.client.getUser().id || ((X = s.evaluationContext.identity) === null || X === void 0 ? void 0 : X.identifier) }), He);
5537
- s.log("Setting Datadog user", Ce), s.datadogRum.client.setUser(Ce);
5557
+ var De = r(r(r({}, s.datadogRum.client.getUser()), { id: s.datadogRum.client.getUser().id || ((X = s.evaluationContext.identity) === null || X === void 0 ? void 0 : X.identifier) }), He);
5558
+ s.log("Setting Datadog user", De), s.datadogRum.client.setUser(De);
5538
5559
  }
5539
5560
  } catch (Q) {
5540
5561
  console.error(Q);
@@ -5557,7 +5578,7 @@ var Dt = { exports: {} };
5557
5578
  }).filter(function(x) {
5558
5579
  return x.trait_value !== void 0 || (s.log("Warning - attempted to set an undefined trait value for key", x.trait_key), !1);
5559
5580
  }) })) : s.getJSON(a + "identities/?identifier=" + encodeURIComponent(p.identity.identifier) + (p.identity.transient ? "&transient=true" : ""))]).then(function(x) {
5560
- return s.evaluationContext.identity = n(n({}, s.evaluationContext.identity), { traits: {} }), j(x == null ? void 0 : x[0]);
5581
+ return s.evaluationContext.identity = r(r({}, s.evaluationContext.identity), { traits: {} }), j(x == null ? void 0 : x[0]);
5561
5582
  }).catch(function(x) {
5562
5583
  var O = x.message, M = new Error(O);
5563
5584
  return Promise.reject(M);
@@ -5569,7 +5590,7 @@ var Dt = { exports: {} };
5569
5590
  if (s.evaluationEvent && s.evaluationContext.environment && s.evaluationEvent[s.evaluationContext.environment.apiKey]) return s.evaluationEvent && Object.getOwnPropertyNames(s.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(s.evaluationEvent[s.evaluationContext.environment.apiKey]).length !== 0 ? s.getJSON(l + "analytics/flags/", "POST", JSON.stringify(s.evaluationEvent[s.evaluationContext.environment.apiKey])).then(function(a) {
5570
5591
  if (s.evaluationContext.environment) {
5571
5592
  var p = s.getState();
5572
- s.evaluationEvent || (s.evaluationEvent = {}), s.evaluationEvent[s.evaluationContext.environment.apiKey] = {}, s.setState(n(n({}, p), { evaluationEvent: s.evaluationEvent })), s.updateEventStorage();
5593
+ s.evaluationEvent || (s.evaluationEvent = {}), s.evaluationEvent[s.evaluationContext.environment.apiKey] = {}, s.setState(r(r({}, p), { evaluationEvent: s.evaluationEvent })), s.updateEventStorage();
5573
5594
  }
5574
5595
  }).catch(function(a) {
5575
5596
  s.log("Exception fetching evaluationEvent", a);
@@ -5593,18 +5614,18 @@ var Dt = { exports: {} };
5593
5614
  return [p, v == null ? void 0 : v.value];
5594
5615
  }));
5595
5616
  }, this.setContext = function(l) {
5596
- var a = S(l);
5597
- return s.evaluationContext = n(n({}, a), { environment: a.environment || s.evaluationContext.environment }), s.initialised ? s.getFlags() : Promise.resolve();
5617
+ var a = T(l);
5618
+ return s.evaluationContext = r(r({}, a), { environment: a.environment || s.evaluationContext.environment }), s.initialised ? s.getFlags() : Promise.resolve();
5598
5619
  }, this.getContext = function() {
5599
5620
  return s.evaluationContext;
5600
5621
  }, this.updateContext = function(l) {
5601
- return s.setContext(n(n({}, s.getContext()), l));
5622
+ return s.setContext(r(r({}, s.getContext()), l));
5602
5623
  }, this.setTrait = function(l, a) {
5603
5624
  var p;
5604
- if (s.api) return s.setContext(n(n({}, s.evaluationContext), { identity: n(n({}, s.evaluationContext.identity), { traits: n(n({}, (p = s.evaluationContext.identity) === null || p === void 0 ? void 0 : p.traits), z(Object.fromEntries([[l, a]]))) }) }));
5625
+ if (s.api) return s.setContext(r(r({}, s.evaluationContext), { identity: r(r({}, s.evaluationContext.identity), { traits: r(r({}, (p = s.evaluationContext.identity) === null || p === void 0 ? void 0 : p.traits), z(Object.fromEntries([[l, a]]))) }) }));
5605
5626
  }, this.setTraits = function(l) {
5606
5627
  var a;
5607
- if (s.api) return s.setContext(n(n({}, s.evaluationContext), { identity: n(n({}, s.evaluationContext.identity), { traits: n(n({}, (a = s.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), Object.fromEntries(Object.entries(l).map(function(p) {
5628
+ if (s.api) return s.setContext(r(r({}, s.evaluationContext), { identity: r(r({}, s.evaluationContext.identity), { traits: r(r({}, (a = s.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), Object.fromEntries(Object.entries(l).map(function(p) {
5608
5629
  var v = p[0], j = p[1];
5609
5630
  return [v, H(j) ? j : { value: j }];
5610
5631
  }))) }) }));
@@ -5626,16 +5647,16 @@ var Dt = { exports: {} };
5626
5647
  if (M === se) {
5627
5648
  var le = (Ae = X.headers) === null || Ae === void 0 ? void 0 : Ae.get("x-flagsmith-document-updated-at");
5628
5649
  if (le) try {
5629
- var ne = parseFloat(le);
5630
- if (isNaN(ne)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
5631
- s.timestamp = ne;
5632
- } catch (re) {
5633
- s.log(re, "Failed to parse x-flagsmith-document-updated-at", le);
5650
+ var re = parseFloat(le);
5651
+ if (isNaN(re)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
5652
+ s.timestamp = re;
5653
+ } catch (ne) {
5654
+ s.log(ne, "Failed to parse x-flagsmith-document-updated-at", le);
5634
5655
  }
5635
- return s.log("Fetch response: " + X.status + " " + (a || "GET") + 0 + l), X.text().then(function(re) {
5636
- var ue = re;
5656
+ return s.log("Fetch response: " + X.status + " " + (a || "GET") + 0 + l), X.text().then(function(ne) {
5657
+ var ue = ne;
5637
5658
  try {
5638
- ue = JSON.parse(re);
5659
+ ue = JSON.parse(ne);
5639
5660
  } catch {
5640
5661
  }
5641
5662
  return !ue && X.status && (ue = "API Response: ".concat(X.status)), X.status && X.status >= 200 && X.status < 300 ? ue : Promise.reject(new Error(ue));
@@ -5652,37 +5673,37 @@ var Dt = { exports: {} };
5652
5673
  }, this._onChange = function(l, a, p) {
5653
5674
  var v, j;
5654
5675
  s.setLoadingState(p), (v = s.onChange) === null || v === void 0 || v.call(s, l, a, s.loadingState), (j = s._trigger) === null || j === void 0 || j.call(s);
5655
- }, P = r.fetch ? r.fetch : typeof fetch < "u" ? fetch : Re == null ? void 0 : Re.fetch, this.canUseStorage = typeof window < "u" || !!r.browserlessStorage, this.log("Constructing flagsmith instance " + r), r.eventSource && (te = r.eventSource), r.AsyncStorage && (k = r.AsyncStorage);
5676
+ }, P = n.fetch ? n.fetch : typeof fetch < "u" ? fetch : Re == null ? void 0 : Re.fetch, this.canUseStorage = typeof window < "u" || !!n.browserlessStorage, this.log("Constructing flagsmith instance " + n), n.eventSource && (te = n.eventSource), n.AsyncStorage && (k = n.AsyncStorage);
5656
5677
  }
5657
- return d.prototype.init = function(r) {
5678
+ return d.prototype.init = function(n) {
5658
5679
  var s, l, a;
5659
5680
  return u(this, void 0, void 0, function() {
5660
- var p, v, j, x, O, M, X, L, Ae, se, le, ne, re, ue, qe, He, Ce, J, Q, Je, Xe, Vt, De, _e, Pt, Ft, $e, Ot, et, Qe, je, qt, _ = this;
5681
+ var p, v, j, x, O, M, X, L, Ae, se, le, re, ne, ue, qe, He, De, J, Q, Je, Xe, Vt, je, _e, Pt, Ft, $e, Ot, et, Qe, Ge, qt, _ = this;
5661
5682
  return y(this, function(ce) {
5662
5683
  switch (ce.label) {
5663
5684
  case 0:
5664
- p = S(r.evaluationContext || this.evaluationContext), ce.label = 1;
5685
+ p = T(n.evaluationContext || this.evaluationContext), ce.label = 1;
5665
5686
  case 1:
5666
- if (ce.trys.push([1, 13, , 14]), v = r.environmentID, j = r.api, x = j === void 0 ? he : j, O = r.headers, M = r.onChange, X = r.cacheFlags, L = r.datadogRum, Ae = r.onError, se = r.defaultFlags, le = r.fetch, ne = r.preventFetch, re = r.enableLogs, ue = r.enableDynatrace, qe = r.enableAnalytics, He = r.realtime, Ce = r.eventSourceUrl, J = Ce === void 0 ? "https://realtime.flagsmith.com/" : Ce, Q = r.AsyncStorage, Je = r.identity, Xe = r.traits, Vt = r.state, De = r.cacheOptions, _e = r.angularHttpClient, Pt = r._trigger, Ft = r._triggerLoadingState, p.environment = v ? { apiKey: v } : p.environment, !p.environment || !p.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
5687
+ if (ce.trys.push([1, 13, , 14]), v = n.environmentID, j = n.api, x = j === void 0 ? Be : j, O = n.headers, M = n.onChange, X = n.cacheFlags, L = n.datadogRum, Ae = n.onError, se = n.defaultFlags, le = n.fetch, re = n.preventFetch, ne = n.enableLogs, ue = n.enableDynatrace, qe = n.enableAnalytics, He = n.realtime, De = n.eventSourceUrl, J = De === void 0 ? "https://realtime.flagsmith.com/" : De, Q = n.AsyncStorage, Je = n.identity, Xe = n.traits, Vt = n.state, je = n.cacheOptions, _e = n.angularHttpClient, Pt = n._trigger, Ft = n._triggerLoadingState, p.environment = v ? { apiKey: v } : p.environment, !p.environment || !p.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
5667
5688
  if (p.identity = Je || Xe ? { identifier: Je, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(ae) {
5668
5689
  return [ae[0], { value: ae[1] }];
5669
5690
  })) : {} } : p.identity, this.evaluationContext = p, this.api = x, this.headers = O, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = M, $e = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Pt || this._trigger, this._triggerLoadingState = Ft || this._triggerLoadingState, this.onError = function(ae) {
5670
- _.setLoadingState(n(n({}, _.loadingState), { isFetching: !1, isLoading: !1, error: ae })), Ae == null || Ae(ae);
5671
- }, this.enableLogs = re || !1, this.cacheOptions = De ? { skipAPI: !!De.skipAPI, ttl: De.ttl || 0, storageKey: De.storageKey, loadStale: !!De.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."), le && (P = le), this.enableAnalytics = qe || !1, this.flags = Object.assign({}, se) || {}, this.datadogRum = L || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = k !== void 0 && !!X, ie = "FLAGSMITH_EVENT_" + p.environment.apiKey, Q && (k = Q), He && typeof window < "u" && this.setupRealtime(J, p.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Vt), this.log("Initialising with properties", r, this), ue && (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), _e && (P = /* @__PURE__ */ function(ae) {
5691
+ _.setLoadingState(r(r({}, _.loadingState), { isFetching: !1, isLoading: !1, error: ae })), Ae == null || Ae(ae);
5692
+ }, this.enableLogs = ne || !1, this.cacheOptions = je ? { skipAPI: !!je.skipAPI, ttl: je.ttl || 0, storageKey: je.storageKey, loadStale: !!je.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."), le && (P = le), this.enableAnalytics = qe || !1, this.flags = Object.assign({}, se) || {}, this.datadogRum = L || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = k !== void 0 && !!X, ie = "FLAGSMITH_EVENT_" + p.environment.apiKey, Q && (k = Q), He && typeof window < "u" && this.setupRealtime(J, p.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = r(r({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Vt), this.log("Initialising with properties", n, this), ue && (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), _e && (P = /* @__PURE__ */ function(ae) {
5672
5693
  return function(me, ge) {
5673
- var fe = ge.headers, N = ge.method, Ge = ge.body;
5674
- return new Promise(function(Be) {
5694
+ var fe = ge.headers, N = ge.method, Ye = ge.body;
5695
+ return new Promise(function(we) {
5675
5696
  switch (N) {
5676
5697
  case "GET":
5677
5698
  return ae.get(me, { headers: fe }).subscribe(function(pe) {
5678
- Be({ ok: !0, text: function() {
5699
+ we({ ok: !0, text: function() {
5679
5700
  return Promise.resolve(pe);
5680
5701
  } });
5681
5702
  });
5682
5703
  case "POST":
5683
5704
  case "PUT":
5684
- return ae.post(me, Ge, { headers: fe }).subscribe(function(pe) {
5685
- Be({ ok: !0, text: function() {
5705
+ return ae.post(me, Ye, { headers: fe }).subscribe(function(pe) {
5706
+ we({ ok: !0, text: function() {
5686
5707
  return Promise.resolve(pe);
5687
5708
  } });
5688
5709
  });
@@ -5701,26 +5722,26 @@ var Dt = { exports: {} };
5701
5722
  var ge = JSON.parse(me);
5702
5723
  if (ge[_.evaluationContext.environment.apiKey]) {
5703
5724
  var fe = _.getState();
5704
- _.log("Retrieved events from cache", me), _.setState(n(n({}, fe), { evaluationEvent: ge[_.evaluationContext.environment.apiKey] }));
5725
+ _.log("Retrieved events from cache", me), _.setState(r(r({}, fe), { evaluationEvent: ge[_.evaluationContext.environment.apiKey] }));
5705
5726
  }
5706
5727
  }
5707
5728
  })), !X) return [3, 9];
5708
5729
  if (!k || !this.canUseStorage) return [3, 8];
5709
5730
  Ot = function(ae, me) {
5710
5731
  return u(_, void 0, void 0, function() {
5711
- var ge, fe, N, Ge, Be, pe, tt, Ht, st, nt, rt, at, ot, it, lt, ct, At, ut, mt, gt, dt, pt, bt, ft, Xt = this;
5732
+ var ge, fe, N, Ye, we, pe, tt, Ht, st, rt, nt, at, ot, it, lt, ct, At, ut, mt, gt, dt, pt, bt, ft, Xt = this;
5712
5733
  return y(this, function(ye) {
5713
5734
  switch (ye.label) {
5714
5735
  case 0:
5715
5736
  if (!me) return [3, 7];
5716
5737
  ge = null, fe = null, ye.label = 1;
5717
5738
  case 1:
5718
- return ye.trys.push([1, 5, , 6]), N = JSON.parse(me), Ge = !1, Be = !1, N && N.api === this.api && ((nt = (st = N.evaluationContext) === null || st === void 0 ? void 0 : st.environment) === null || nt === void 0 ? void 0 : nt.apiKey) === ((rt = this.evaluationContext.environment) === null || rt === void 0 ? void 0 : rt.apiKey) && (pe = !0, this.evaluationContext.identity && ((ot = (at = N.evaluationContext) === null || at === void 0 ? void 0 : at.identity) === null || ot === void 0 ? void 0 : ot.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((lt = (it = N.evaluationContext) === null || it === void 0 ? void 0 : it.identity) === null || lt === void 0 ? void 0 : lt.identifier) + " to " + this.evaluationContext.identity.identifier), pe = !1), this.cacheOptions.ttl && (!N.ts || (/* @__PURE__ */ new Date()).valueOf() - N.ts > this.cacheOptions.ttl) && (N.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), pe = !1) : N.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), Be = !0, pe = !0)), pe && (Ge = !0, fe = Y((ct = this.evaluationContext.identity) === null || ct === void 0 ? void 0 : ct.traits, (ut = (At = N.evaluationContext) === null || At === void 0 ? void 0 : At.identity) === null || ut === void 0 ? void 0 : ut.traits), ge = Y(this.flags, N.flags), this.setState(n(n({}, N), { evaluationContext: S(n(n({}, N.evaluationContext), { identity: !((mt = N.evaluationContext) === null || mt === void 0) && mt.identity ? n(n({}, (gt = N.evaluationContext) === null || gt === void 0 ? void 0 : gt.identity), { traits: n(n({}, ((pt = (dt = N.evaluationContext) === null || dt === void 0 ? void 0 : dt.identity) === null || pt === void 0 ? void 0 : pt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", N))), Ge ? (tt = !ne && (!this.cacheOptions.skipAPI || Be), this._onChange(null, { isFromServer: !1, flagsChanged: ge, traitsChanged: fe }, this._loadedState(null, w.CACHE, tt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Ge && !Be && this.log("Skipping API, using cache"), tt && this.getFlags().catch(function(Js) {
5739
+ return ye.trys.push([1, 5, , 6]), N = JSON.parse(me), Ye = !1, we = !1, N && N.api === this.api && ((rt = (st = N.evaluationContext) === null || st === void 0 ? void 0 : st.environment) === null || rt === void 0 ? void 0 : rt.apiKey) === ((nt = this.evaluationContext.environment) === null || nt === void 0 ? void 0 : nt.apiKey) && (pe = !0, this.evaluationContext.identity && ((ot = (at = N.evaluationContext) === null || at === void 0 ? void 0 : at.identity) === null || ot === void 0 ? void 0 : ot.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((lt = (it = N.evaluationContext) === null || it === void 0 ? void 0 : it.identity) === null || lt === void 0 ? void 0 : lt.identifier) + " to " + this.evaluationContext.identity.identifier), pe = !1), this.cacheOptions.ttl && (!N.ts || (/* @__PURE__ */ new Date()).valueOf() - N.ts > this.cacheOptions.ttl) && (N.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), pe = !1) : N.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), we = !0, pe = !0)), pe && (Ye = !0, fe = Y((ct = this.evaluationContext.identity) === null || ct === void 0 ? void 0 : ct.traits, (ut = (At = N.evaluationContext) === null || At === void 0 ? void 0 : At.identity) === null || ut === void 0 ? void 0 : ut.traits), ge = Y(this.flags, N.flags), this.setState(r(r({}, N), { evaluationContext: T(r(r({}, N.evaluationContext), { identity: !((mt = N.evaluationContext) === null || mt === void 0) && mt.identity ? r(r({}, (gt = N.evaluationContext) === null || gt === void 0 ? void 0 : gt.identity), { traits: r(r({}, ((pt = (dt = N.evaluationContext) === null || dt === void 0 ? void 0 : dt.identity) === null || pt === void 0 ? void 0 : pt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", N))), Ye ? (tt = !re && (!this.cacheOptions.skipAPI || we), this._onChange(null, { isFromServer: !1, flagsChanged: ge, traitsChanged: fe }, this._loadedState(null, w.CACHE, tt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Ye && !we && this.log("Skipping API, using cache"), tt && this.getFlags().catch(function(Js) {
5719
5740
  var yt;
5720
5741
  (yt = Xt.onError) === null || yt === void 0 || yt.call(Xt, Js);
5721
5742
  }), [3, 4]) : [3, 2];
5722
5743
  case 2:
5723
- return ne ? [3, 4] : [4, this.getFlags()];
5744
+ return re ? [3, 4] : [4, this.getFlags()];
5724
5745
  case 3:
5725
5746
  ye.sent(), ye.label = 4;
5726
5747
  case 4:
@@ -5730,7 +5751,7 @@ var Dt = { exports: {} };
5730
5751
  case 6:
5731
5752
  return [3, 10];
5732
5753
  case 7:
5733
- return ne ? [3, 9] : [4, this.getFlags()];
5754
+ return re ? [3, 9] : [4, this.getFlags()];
5734
5755
  case 8:
5735
5756
  return ye.sent(), [3, 10];
5736
5757
  case 9:
@@ -5760,7 +5781,7 @@ var Dt = { exports: {} };
5760
5781
  case 8:
5761
5782
  return [3, 12];
5762
5783
  case 9:
5763
- return ne ? [3, 11] : [4, this.getFlags()];
5784
+ return re ? [3, 11] : [4, this.getFlags()];
5764
5785
  case 10:
5765
5786
  return ce.sent(), [3, 12];
5766
5787
  case 11:
@@ -5770,7 +5791,7 @@ var Dt = { exports: {} };
5770
5791
  case 12:
5771
5792
  return [3, 14];
5772
5793
  case 13:
5773
- throw je = ce.sent(), this.log("Error during initialisation ", je), qt = je instanceof Error ? je : new Error("".concat(je)), (a = this.onError) === null || a === void 0 || a.call(this, qt), je;
5794
+ throw Ge = ce.sent(), this.log("Error during initialisation ", Ge), qt = Ge instanceof Error ? Ge : new Error("".concat(Ge)), (a = this.onError) === null || a === void 0 || a.call(this, qt), Ge;
5774
5795
  case 14:
5775
5796
  return [2];
5776
5797
  }
@@ -5778,44 +5799,44 @@ var Dt = { exports: {} };
5778
5799
  });
5779
5800
  }, d.prototype.getAllFlags = function() {
5780
5801
  return this.flags;
5781
- }, d.prototype.identify = function(r, s, l) {
5782
- return this.evaluationContext.identity = { identifier: r, transient: l, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == r ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = r, this.log("Identify: " + this.evaluationContext.identity.identifier), s && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(s).map(function(a) {
5802
+ }, d.prototype.identify = function(n, s, l) {
5803
+ return this.evaluationContext.identity = { identifier: n, transient: l, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == n ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = n, this.log("Identify: " + this.evaluationContext.identity.identifier), s && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(s).map(function(a) {
5783
5804
  var p = a[0], v = a[1];
5784
5805
  return [p, H(v) ? v : { value: v }];
5785
5806
  }))), this.initialised ? this.getFlags() : Promise.resolve();
5786
5807
  }, d.prototype.getState = function() {
5787
5808
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
5788
- }, d.prototype.setState = function(r) {
5789
- r && (this.initialised = !0, this.api = r.api || this.api || he, this.flags = r.flags || this.flags, this.evaluationContext = r.evaluationContext || this.evaluationContext, this.evaluationEvent = r.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
5809
+ }, d.prototype.setState = function(n) {
5810
+ n && (this.initialised = !0, this.api = n.api || this.api || Be, this.flags = n.flags || this.flags, this.evaluationContext = n.evaluationContext || this.evaluationContext, this.evaluationEvent = n.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
5790
5811
  }, d.prototype.logout = function() {
5791
5812
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
5792
- }, d.prototype.startListening = function(r) {
5793
- r === void 0 && (r = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, r);
5813
+ }, d.prototype.startListening = function(n) {
5814
+ n === void 0 && (n = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, n);
5794
5815
  }, d.prototype.stopListening = function() {
5795
5816
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
5796
- }, d.prototype._loadedState = function(r, s, l) {
5797
- return r === void 0 && (r = null), l === void 0 && (l = !1), { error: r, isFetching: l, isLoading: !1, source: s };
5817
+ }, d.prototype._loadedState = function(n, s, l) {
5818
+ return n === void 0 && (n = null), l === void 0 && (l = !1), { error: n, isFetching: l, isLoading: !1, source: s };
5798
5819
  }, d.prototype.log = function() {
5799
- for (var r = [], s = 0; s < arguments.length; s++) r[s] = arguments[s];
5800
- this.enableLogs && console.log.apply(this, h(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], r));
5820
+ for (var n = [], s = 0; s < arguments.length; s++) n[s] = arguments[s];
5821
+ this.enableLogs && console.log.apply(this, h(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], n));
5801
5822
  }, d.prototype.updateStorage = function() {
5802
5823
  if (this.cacheFlags) {
5803
5824
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
5804
- var r = JSON.stringify(this.getState());
5805
- this.log("Setting storage", r), k.setItem(this.getStorageKey(), r);
5825
+ var n = JSON.stringify(this.getState());
5826
+ this.log("Setting storage", n), k.setItem(this.getStorageKey(), n);
5806
5827
  }
5807
5828
  }, d.prototype.updateEventStorage = function() {
5808
5829
  if (this.enableAnalytics) {
5809
- var r = JSON.stringify(this.getState().evaluationEvent);
5810
- k.setItem(ie, r).catch(function(s) {
5830
+ var n = JSON.stringify(this.getState().evaluationEvent);
5831
+ k.setItem(ie, n).catch(function(s) {
5811
5832
  return console.error("Flagsmith: Error setting item in async storage", s);
5812
5833
  });
5813
5834
  }
5814
- }, d.prototype.setLoadingState = function(r) {
5835
+ }, d.prototype.setLoadingState = function(n) {
5815
5836
  var s;
5816
- E(r, this.loadingState) || (this.loadingState = n({}, r), this.log("Loading state changed", r), (s = this._triggerLoadingState) === null || s === void 0 || s.call(this));
5817
- }, d.prototype.setupRealtime = function(r, s) {
5818
- var l = this, a = r + "sse/environments/" + s + "/stream";
5837
+ E(n, this.loadingState) || (this.loadingState = r({}, n), this.log("Loading state changed", n), (s = this._triggerLoadingState) === null || s === void 0 || s.call(this));
5838
+ }, d.prototype.setupRealtime = function(n, s) {
5839
+ var l = this, a = n + "sse/environments/" + s + "/stream";
5819
5840
  te ? this.eventSource || (this.log("Creating event source with url " + a), this.eventSource = new te(a), this.eventSource.addEventListener("environment_updated", function(p) {
5820
5841
  var v;
5821
5842
  try {
@@ -5828,34 +5849,34 @@ var Dt = { exports: {} };
5828
5849
  }, d;
5829
5850
  }();
5830
5851
  function i(d) {
5831
- var r = d.fetch, s = d.AsyncStorage, l = d.eventSource;
5832
- return new Oe({ fetch: r, AsyncStorage: s, eventSource: l });
5852
+ var n = d.fetch, s = d.AsyncStorage, l = d.eventSource;
5853
+ return new Oe({ fetch: n, AsyncStorage: s, eventSource: l });
5833
5854
  }
5834
- var g, f = (g = function(d, r) {
5855
+ var g, f = (g = function(d, n) {
5835
5856
  return g = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, l) {
5836
5857
  s.__proto__ = l;
5837
5858
  } || function(s, l) {
5838
5859
  for (var a in l) Object.prototype.hasOwnProperty.call(l, a) && (s[a] = l[a]);
5839
- }, g(d, r);
5840
- }, function(d, r) {
5841
- if (typeof r != "function" && r !== null) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
5860
+ }, g(d, n);
5861
+ }, function(d, n) {
5862
+ if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
5842
5863
  function s() {
5843
5864
  this.constructor = d;
5844
5865
  }
5845
- g(d, r), d.prototype = r === null ? Object.create(r) : (s.prototype = r.prototype, new s());
5866
+ g(d, n), d.prototype = n === null ? Object.create(n) : (s.prototype = n.prototype, new s());
5846
5867
  }), B = function(d) {
5847
- var r = typeof Symbol == "function" && Symbol.iterator, s = r && d[r], l = 0;
5868
+ var n = typeof Symbol == "function" && Symbol.iterator, s = n && d[n], l = 0;
5848
5869
  if (s) return s.call(d);
5849
5870
  if (d && typeof d.length == "number") return { next: function() {
5850
5871
  return d && l >= d.length && (d = void 0), { value: d && d[l++], done: !d };
5851
5872
  } };
5852
- throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
5853
- }, C = function(d, r) {
5873
+ throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
5874
+ }, C = function(d, n) {
5854
5875
  var s = typeof Symbol == "function" && d[Symbol.iterator];
5855
5876
  if (!s) return d;
5856
5877
  var l, a, p = s.call(d), v = [];
5857
5878
  try {
5858
- for (; (r === void 0 || r-- > 0) && !(l = p.next()).done; ) v.push(l.value);
5879
+ for (; (n === void 0 || n-- > 0) && !(l = p.next()).done; ) v.push(l.value);
5859
5880
  } catch (j) {
5860
5881
  a = { error: j };
5861
5882
  } finally {
@@ -5866,27 +5887,27 @@ var Dt = { exports: {} };
5866
5887
  }
5867
5888
  }
5868
5889
  return v;
5869
- }, D = function(d, r, s) {
5870
- if (arguments.length === 2) for (var l, a = 0, p = r.length; a < p; a++) !l && a in r || (l || (l = Array.prototype.slice.call(r, 0, a)), l[a] = r[a]);
5871
- return d.concat(l || Array.prototype.slice.call(r));
5890
+ }, D = function(d, n, s) {
5891
+ if (arguments.length === 2) for (var l, a = 0, p = n.length; a < p; a++) !l && a in n || (l || (l = Array.prototype.slice.call(n, 0, a)), l[a] = n[a]);
5892
+ return d.concat(l || Array.prototype.slice.call(n));
5872
5893
  }, V = function(d) {
5873
- function r() {
5894
+ function n() {
5874
5895
  return d.call(this, `EventSource not available.
5875
5896
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
5876
5897
  }
5877
- return f(r, d), r;
5898
+ return f(n, d), n;
5878
5899
  }(Error), F = function() {
5879
- function d(r, s) {
5900
+ function d(n, s) {
5880
5901
  var l = this;
5881
- if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = s != null ? Object.assign({}, s) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = r.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new V();
5902
+ if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = s != null ? Object.assign({}, s) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = n.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new V();
5882
5903
  this._onevent_wrapped = function(a) {
5883
5904
  l._onevent(a);
5884
5905
  }, this._start();
5885
5906
  }
5886
- return d.prototype.dispatchEvent = function(r) {
5907
+ return d.prototype.dispatchEvent = function(n) {
5887
5908
  throw new Error("Method not implemented.");
5888
5909
  }, d.prototype._start = function() {
5889
- var r, s, l = this, a = this.url;
5910
+ var n, s, l = this, a = this.url;
5890
5911
  this._lastEventId && (a.indexOf("?") === -1 ? a += "?" : a += "&", a += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(a, this._configuration), this._eventSource.onopen = function(x) {
5891
5912
  l._onopen(x);
5892
5913
  }, this._eventSource.onerror = function(x) {
@@ -5900,32 +5921,32 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5900
5921
  this._eventSource.addEventListener(j, this._onevent_wrapped);
5901
5922
  }
5902
5923
  } catch (x) {
5903
- r = { error: x };
5924
+ n = { error: x };
5904
5925
  } finally {
5905
5926
  try {
5906
5927
  v && !v.done && (s = p.return) && s.call(p);
5907
5928
  } finally {
5908
- if (r) throw r.error;
5929
+ if (n) throw n.error;
5909
5930
  }
5910
5931
  }
5911
- }, d.prototype._onopen = function(r) {
5912
- this.readyState === 0 && (this.readyState = 1, this.onopen(r));
5913
- }, d.prototype._onerror = function(r) {
5932
+ }, d.prototype._onopen = function(n) {
5933
+ this.readyState === 0 && (this.readyState = 1, this.onopen(n));
5934
+ }, d.prototype._onerror = function(n) {
5914
5935
  var s = this;
5915
- if (this.readyState === 1 && (this.readyState = 0, this.onerror(r)), this._eventSource) {
5936
+ if (this.readyState === 1 && (this.readyState = 0, this.onerror(n)), this._eventSource) {
5916
5937
  this._eventSource.close(), this._eventSource = null;
5917
5938
  var l = Math.round(this.max_retry_time * Math.random());
5918
5939
  this._timer = setTimeout(function() {
5919
5940
  return s._start();
5920
5941
  }, l);
5921
5942
  }
5922
- }, d.prototype._onevent = function(r) {
5943
+ }, d.prototype._onevent = function(n) {
5923
5944
  var s, l;
5924
- r && r.lastEventId && (this._lastEventId = r.lastEventId);
5925
- var a = this._listeners[r.type];
5945
+ n && n.lastEventId && (this._lastEventId = n.lastEventId);
5946
+ var a = this._listeners[n.type];
5926
5947
  if (a != null) try {
5927
5948
  for (var p = B(D([], C(a), !1)), v = p.next(); !v.done; v = p.next())
5928
- v.value.call(this, r);
5949
+ v.value.call(this, n);
5929
5950
  } catch (j) {
5930
5951
  s = { error: j };
5931
5952
  } finally {
@@ -5935,26 +5956,26 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5935
5956
  if (s) throw s.error;
5936
5957
  }
5937
5958
  }
5938
- r.type === "message" && this.onmessage(r);
5939
- }, d.prototype.onopen = function(r) {
5940
- }, d.prototype.onerror = function(r) {
5941
- }, d.prototype.onmessage = function(r) {
5959
+ n.type === "message" && this.onmessage(n);
5960
+ }, d.prototype.onopen = function(n) {
5961
+ }, d.prototype.onerror = function(n) {
5962
+ }, d.prototype.onmessage = function(n) {
5942
5963
  }, d.prototype.close = function() {
5943
5964
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
5944
- }, d.prototype.addEventListener = function(r, s, l) {
5945
- this._listeners[r] == null && (this._listeners[r] = [], this._eventSource != null && this._eventSource.addEventListener(r, this._onevent_wrapped));
5946
- var a = this._listeners[r];
5947
- a.includes(s) || (this._listeners[r] = D(D([], C(a), !1), [s], !1));
5948
- }, d.prototype.removeEventListener = function(r, s, l) {
5949
- var a = this._listeners[r];
5950
- this._listeners[r] = a.filter(function(p) {
5965
+ }, d.prototype.addEventListener = function(n, s, l) {
5966
+ this._listeners[n] == null && (this._listeners[n] = [], this._eventSource != null && this._eventSource.addEventListener(n, this._onevent_wrapped));
5967
+ var a = this._listeners[n];
5968
+ a.includes(s) || (this._listeners[n] = D(D([], C(a), !1), [s], !1));
5969
+ }, d.prototype.removeEventListener = function(n, s, l) {
5970
+ var a = this._listeners[n];
5971
+ this._listeners[n] = a.filter(function(p) {
5951
5972
  return p !== s;
5952
5973
  });
5953
5974
  }, d;
5954
5975
  }();
5955
5976
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
5956
- var Z = function(d, r) {
5957
- return r = r || {}, new Promise(function(s, l) {
5977
+ var Z = function(d, n) {
5978
+ return n = n || {}, new Promise(function(s, l) {
5958
5979
  var a = new XMLHttpRequest(), p = [], v = [], j = {}, x = function() {
5959
5980
  return { ok: (a.status / 100 | 0) == 2, statusText: a.statusText, status: a.status, url: a.responseURL, text: function() {
5960
5981
  return Promise.resolve(a.responseText);
@@ -5972,12 +5993,12 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5972
5993
  return M.toLowerCase() in j;
5973
5994
  } } };
5974
5995
  };
5975
- for (var O in a.open(r.method || "get", d, !0), a.onload = function() {
5996
+ for (var O in a.open(n.method || "get", d, !0), a.onload = function() {
5976
5997
  a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(M, X, L) {
5977
5998
  p.push(X = X.toLowerCase()), v.push([X, L]), j[X] = j[X] ? j[X] + "," + L : L;
5978
5999
  }), s(x());
5979
- }, a.onerror = l, a.withCredentials = r.credentials == "include", r.headers) a.setRequestHeader(O, r.headers[O]);
5980
- a.send(r.body || null);
6000
+ }, a.onerror = l, a.withCredentials = n.credentials == "include", n.headers) a.setRequestHeader(O, n.headers[O]);
6001
+ a.send(n.body || null);
5981
6002
  });
5982
6003
  }, W = i({ AsyncStorage: c, fetch: Z, eventSource: F });
5983
6004
  typeof window < "u" && (window.flagsmith = W), m.createFlagsmithInstance = function() {
@@ -6003,7 +6024,7 @@ var Ra = Dt.exports, Na = {
6003
6024
  if (!this.flagsmithClient)
6004
6025
  try {
6005
6026
  this.flagsmithClient = Ra.createFlagsmithInstance();
6006
- const c = m.reduce((n, u) => (n[u.feature.name] = u, n), {});
6027
+ const c = m.reduce((r, u) => (r[u.feature.name] = u, r), {});
6007
6028
  await this.flagsmithClient.init({
6008
6029
  environmentID: A.apiKey,
6009
6030
  api: (A == null ? void 0 : A.url) ?? "https://feature-flag-proxy.feedme.farm/api/v1/",
@@ -6034,14 +6055,14 @@ var Ra = Dt.exports, Na = {
6034
6055
  this.ensureInitialized();
6035
6056
  const A = this.flagsmithClient.getAllFlags();
6036
6057
  return Object.entries(A).map(([m, c]) => {
6037
- var n;
6058
+ var r;
6038
6059
  return {
6039
6060
  feature: {
6040
6061
  name: m,
6041
6062
  id: (c == null ? void 0 : c.id) ?? 0
6042
6063
  },
6043
6064
  enabled: c.enabled,
6044
- value: ((n = c.value) == null ? void 0 : n.toString()) ?? null
6065
+ value: ((r = c.value) == null ? void 0 : r.toString()) ?? null
6045
6066
  };
6046
6067
  });
6047
6068
  }
@@ -6051,10 +6072,10 @@ var Ra = Dt.exports, Na = {
6051
6072
  if (c == null)
6052
6073
  return null;
6053
6074
  try {
6054
- const n = c.toString();
6055
- return m ? m(n) : typeof {} == "number" ? isNaN(Number(n)) ? null : Number(n) : typeof {} == "boolean" ? n.toLowerCase() === "true" : n;
6056
- } catch (n) {
6057
- return console.error("Error transforming flag value:", n), null;
6075
+ const r = c.toString();
6076
+ return m ? m(r) : typeof {} == "number" ? isNaN(Number(r)) ? null : Number(r) : typeof {} == "boolean" ? r.toLowerCase() === "true" : r;
6077
+ } catch (r) {
6078
+ return console.error("Error transforming flag value:", r), null;
6058
6079
  }
6059
6080
  }
6060
6081
  getFlag(A) {
@@ -6071,11 +6092,11 @@ var Ra = Dt.exports, Na = {
6071
6092
  value: m.toString()
6072
6093
  };
6073
6094
  }
6074
- async getUserFlagValue(A, m, c = null, n) {
6095
+ async getUserFlagValue(A, m, c = null, r) {
6075
6096
  var y;
6076
6097
  const u = this.userContext;
6077
6098
  try {
6078
- return await this.setUser(A), this.getFlagValue(m, n) ?? c;
6099
+ return await this.setUser(A), this.getFlagValue(m, r) ?? c;
6079
6100
  } catch (h) {
6080
6101
  return console.error(`Error getting user flag value for ${m}:`, h), c;
6081
6102
  } finally {
@@ -6089,7 +6110,7 @@ var Ra = Dt.exports, Na = {
6089
6110
  reset() {
6090
6111
  this.flagsmithClient = null, this.userContext = null;
6091
6112
  }
6092
- }, Ze(de, "instance"), de), za = Za.getInstance(), Ie = ve(!1), Ue = ve([]), Ye = ve(null);
6113
+ }, Ze(de, "instance"), de), za = Za.getInstance(), Ie = he(!1), Ue = he([]), Ee = he(null);
6093
6114
  function Ua(e = za) {
6094
6115
  const A = () => Ie.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), m = async (w, P = []) => {
6095
6116
  if (Ie.value) {
@@ -6097,18 +6118,18 @@ function Ua(e = za) {
6097
6118
  return;
6098
6119
  }
6099
6120
  try {
6100
- await e.init(w, P), Ue.value = await e.getFlags(), Ie.value = !0, Ye.value = null;
6121
+ await e.init(w, P), Ue.value = await e.getFlags(), Ie.value = !0, Ee.value = null;
6101
6122
  } catch (I) {
6102
- console.error("Failed to initialize feature flags:", I), Ye.value = I;
6123
+ console.error("Failed to initialize feature flags:", I), Ee.value = I;
6103
6124
  }
6104
6125
  }, c = async (w) => {
6105
6126
  if (A())
6106
6127
  try {
6107
- await e.setUser(w), Ue.value = await e.getFlags(), Ye.value = null;
6128
+ await e.setUser(w), Ue.value = await e.getFlags(), Ee.value = null;
6108
6129
  } catch (P) {
6109
- console.error("Failed to set user:", P), Ye.value = P;
6130
+ console.error("Failed to set user:", P), Ee.value = P;
6110
6131
  }
6111
- }, n = async (w) => c(`${Ut}-${w}`), u = (w, P, I = null) => {
6132
+ }, r = async (w) => c(`${Ut}-${w}`), u = (w, P, I = null) => {
6112
6133
  if (!A()) return I;
6113
6134
  try {
6114
6135
  return e.getFlagValue(w, P) ?? I;
@@ -6135,16 +6156,16 @@ function Ua(e = za) {
6135
6156
  } catch (w) {
6136
6157
  console.error("Error resetting feature flags:", w);
6137
6158
  } finally {
6138
- Ue.value = [], Ie.value = !1, Ye.value = null;
6159
+ Ue.value = [], Ie.value = !1, Ee.value = null;
6139
6160
  }
6140
6161
  };
6141
6162
  return {
6142
6163
  flags: vt(Ue),
6143
6164
  isInitialized: vt(Ie),
6144
- error: vt(Ye),
6165
+ error: vt(Ee),
6145
6166
  init: m,
6146
6167
  setUser: c,
6147
- setBusiness: n,
6168
+ setBusiness: r,
6148
6169
  getFlagValue: u,
6149
6170
  getFlag: y,
6150
6171
  getUserFlagValue: h,
@@ -6161,19 +6182,19 @@ const to = /* @__PURE__ */ xe({
6161
6182
  A.registerSidebarComponent(Ia), await m({
6162
6183
  apiKey: A.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
6163
6184
  });
6164
- }), (c, n) => {
6185
+ }), (c, r) => {
6165
6186
  const u = Gt("RouterView");
6166
6187
  return Ve(), ke(u);
6167
6188
  };
6168
6189
  }
6169
6190
  }), so = () => {
6170
- const e = [Rn, Vn, wn, Kn], A = new Set(e.flatMap((m) => Object.keys(m)));
6191
+ const e = [Ir, xr, Br, kr], A = new Set(e.flatMap((m) => Object.keys(m)));
6171
6192
  return Array.from(A).reduce(
6172
6193
  (m, c) => {
6173
- const n = c;
6194
+ const r = c;
6174
6195
  return m[c] = e.reduce((u, y) => ({
6175
6196
  ...u,
6176
- ...y[n] || {}
6197
+ ...y[r] || {}
6177
6198
  }), {}), m;
6178
6199
  },
6179
6200
  {}
@@ -6181,8 +6202,8 @@ const to = /* @__PURE__ */ xe({
6181
6202
  };
6182
6203
  export {
6183
6204
  _a as G,
6184
- Fr as P,
6185
- T as R,
6205
+ Fn as P,
6206
+ S as R,
6186
6207
  Ga as _,
6187
6208
  Ea as a,
6188
6209
  b,
@@ -6190,7 +6211,7 @@ export {
6190
6211
  We as d,
6191
6212
  ea as e,
6192
6213
  to as f,
6193
- Or as g,
6214
+ On as g,
6194
6215
  so as i,
6195
6216
  Ja as k,
6196
6217
  t as l,