@feedmepos/mf-hrm-portal 1.1.0-dev → 1.1.1-dev

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 (96) hide show
  1. package/dist/AuditLogList-D62QRWN-.js +232 -0
  2. package/dist/{EmployeeList-tmUqs5a6.js → EmployeeList-CMUbRS7j.js} +156 -150
  3. package/dist/Main-BbZ-t-pu.js +85 -0
  4. package/dist/{main-DOtgCRZe.js → Main-un3v_g6p.js} +1500 -1532
  5. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CZKBfM_R.js +3119 -0
  7. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  8. package/dist/{RoleList-C5xG7LHg.js → RoleList-mlTepnhN.js} +52 -50
  9. package/dist/RolePermissionList-tR-Kmlu7.js +285 -0
  10. package/dist/TeamMemberList-BkRQl6x8.js +948 -0
  11. package/dist/{TimesheetList-CZfo4Dua.js → TimesheetList-i5yaAzhB.js} +21 -21
  12. package/dist/api/audit-log/index.d.ts +10 -0
  13. package/dist/api/index.d.ts +1 -3
  14. package/dist/api/permission-assignment/index.d.ts +10 -0
  15. package/dist/api/permission-set/index.d.ts +8 -0
  16. package/dist/api/team/index.d.ts +2 -1
  17. package/dist/app-4LaGLcWC.js +2305 -0
  18. package/dist/app.js +1 -1
  19. package/dist/components/AppForm.vue.d.ts +3 -2
  20. package/dist/components/CheckboxInput.vue.d.ts +10 -4
  21. package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
  22. package/dist/components/form/SelectFilter.vue.d.ts +3 -2
  23. package/dist/components/layout/FormColumn.vue.d.ts +6 -3
  24. package/dist/components/layout/FormItem.vue.d.ts +2 -1
  25. package/dist/components/layout/FormSection.vue.d.ts +2 -1
  26. package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
  27. package/dist/components/layout/PageLayout.vue.d.ts +2 -1
  28. package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
  29. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
  30. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
  31. package/dist/composables/useAppStore.d.ts +6 -6
  32. package/dist/composables/useDateRange.d.ts +1 -1
  33. package/dist/composables/useRestaurantMap.d.ts +4 -8
  34. package/dist/composables/useSheet.d.ts +1 -1
  35. package/dist/{employee-BQc7Wgpu.js → employee-BZTntAR0.js} +9 -9
  36. package/dist/helpers/permission-set.d.ts +32 -0
  37. package/dist/helpers/portal-user.d.ts +8 -0
  38. package/dist/helpers/rule.d.ts +4 -3
  39. package/dist/index-BsEM84j5.js +8440 -0
  40. package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
  41. package/dist/{lodash-DNzKT_gG.js → lodash-DYaYvsmp.js} +326 -343
  42. package/dist/router/shared.d.ts +3 -1
  43. package/dist/stores/employee.d.ts +4 -4
  44. package/dist/stores/permission-assignment.d.ts +277 -0
  45. package/dist/stores/permission-set.d.ts +250 -0
  46. package/dist/stores/role.d.ts +4 -4
  47. package/dist/stores/team.d.ts +288 -0
  48. package/dist/stores/timesheet.d.ts +19 -19
  49. package/dist/team-eo_yQh1g.js +26 -0
  50. package/dist/{timesheet-B4M1nCIm.js → timesheet-CfPIK52Q.js} +14 -15
  51. package/dist/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/types/audit-log.d.ts +18 -0
  53. package/dist/types/permission-assignment.d.ts +20 -0
  54. package/dist/types/permission-set.d.ts +20 -0
  55. package/dist/types/permission.d.ts +4 -3
  56. package/dist/types/team.d.ts +13 -3
  57. package/dist/useAppStore-D0F-tWJO.js +180 -0
  58. package/dist/useLoading-DpbOtToC.js +99 -0
  59. package/dist/useRestaurantMap-D5BNPLKh.js +107 -0
  60. package/dist/{useSearch-C25VELOk.js → useSearch-C6gRA62e.js} +8 -8
  61. package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
  62. package/dist/views/hr/locales/index.d.ts +0 -214
  63. package/dist/views/team/components/BasePermission.vue.d.ts +76 -0
  64. package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
  65. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
  66. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
  67. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
  68. package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
  69. package/dist/views/team/locales/index.d.ts +176 -4
  70. package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
  71. package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
  72. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
  73. package/dist/views/team/role/RolePermissionForm.vue.d.ts +19 -0
  74. package/dist/views/{hr/grant-user/GrantUserList.vue.d.ts → team/role/RolePermissionList.vue.d.ts} +0 -12
  75. package/package.json +14 -9
  76. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BY9VGOoM.js +0 -71
  77. package/dist/HorizontalSplitter-B9DVYJIM.js +0 -12
  78. package/dist/Main-ebQsujY3.js +0 -600
  79. package/dist/TeamMemberList-09_3YTHe.js +0 -1509
  80. package/dist/api/grant-user/index.d.ts +0 -8
  81. package/dist/app-B4KDGOw1.js +0 -1432
  82. package/dist/index-CSG8t9Dl.js +0 -58
  83. package/dist/role-DGAu9X1X.js +0 -9728
  84. package/dist/rule-CSj0p2P3.js +0 -450
  85. package/dist/stores/grant-user.d.ts +0 -86
  86. package/dist/types/grant-user.d.ts +0 -17
  87. package/dist/useAppStore-CKmMR-gI.js +0 -93
  88. package/dist/useLoading-v4m-6mEy.js +0 -141
  89. package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
  90. package/dist/views/hr/grant-user/components/GrantUserForm.vue.d.ts +0 -14
  91. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
  92. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
  93. /package/dist/views/hr/{grant-user/Main.vue.d.ts → Main.vue.d.ts} +0 -0
  94. /package/dist/views/hr/{main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
  95. /package/dist/views/team/{TeamMemberList.vue.d.ts → Main.vue.d.ts} +0 -0
  96. /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
@@ -1,450 +0,0 @@
1
- import { c as u, e as a } from "./role-DGAu9X1X.js";
2
- import { Permission as i } from "@feedmepos/mf-common";
3
- const p = [
4
- i.Subject.Business.wastageTemplate,
5
- i.Subject.Business.closingTemplate,
6
- i.Subject.Business.orderTemplate,
7
- i.Subject.Business.ingredient,
8
- i.Subject.Business.recipe,
9
- i.Subject.Business.unit,
10
- i.Subject.Business.supplier,
11
- i.Subject.Business.warehouse,
12
- i.Subject.Business.publish,
13
- i.Subject.Business.integration,
14
- i.Subject.Business.orderDraft
15
- ], r = [
16
- {
17
- label: "",
18
- subject: "order",
19
- actions: ["update"],
20
- conditions: {
21
- operation: "discount",
22
- adjustment: {
23
- $lte: 1
24
- }
25
- },
26
- inverted: !1,
27
- reason: null
28
- },
29
- {
30
- label: "",
31
- subject: "order",
32
- actions: ["update"],
33
- conditions: { operation: "changePrice" },
34
- inverted: !1,
35
- reason: null
36
- },
37
- {
38
- label: "",
39
- subject: "order",
40
- actions: ["update"],
41
- conditions: { operation: "void" },
42
- inverted: !1,
43
- reason: null
44
- },
45
- {
46
- label: "",
47
- subject: "order",
48
- actions: ["update"],
49
- conditions: { operation: "payment" },
50
- inverted: !1,
51
- reason: null
52
- },
53
- {
54
- label: "",
55
- subject: "order",
56
- actions: ["update"],
57
- conditions: { operation: "claimDeposit" },
58
- inverted: !1,
59
- reason: null
60
- },
61
- {
62
- label: "",
63
- subject: "order",
64
- actions: ["update"],
65
- conditions: { operation: "resend" },
66
- inverted: !1,
67
- reason: null
68
- },
69
- {
70
- label: "",
71
- subject: "order",
72
- actions: ["update"],
73
- conditions: { operation: "changePaymentType" },
74
- inverted: !1,
75
- reason: null
76
- },
77
- {
78
- label: "",
79
- subject: "refund",
80
- actions: ["create"],
81
- conditions: null,
82
- inverted: !1,
83
- reason: null
84
- },
85
- {
86
- label: "",
87
- subject: "counter",
88
- actions: ["manage"],
89
- conditions: null,
90
- inverted: !1,
91
- reason: null
92
- },
93
- {
94
- label: "",
95
- subject: "mallIntegration",
96
- actions: ["manage"],
97
- conditions: null,
98
- inverted: !1,
99
- reason: null
100
- },
101
- {
102
- label: "",
103
- subject: "drawer",
104
- actions: ["manage"],
105
- conditions: null,
106
- inverted: !1,
107
- reason: null
108
- },
109
- {
110
- label: "",
111
- subject: "menu",
112
- actions: ["manage"],
113
- conditions: null,
114
- inverted: !1,
115
- reason: null
116
- },
117
- {
118
- label: "",
119
- subject: "inventory",
120
- actions: ["manage"],
121
- conditions: null,
122
- inverted: !1,
123
- reason: null
124
- },
125
- {
126
- label: "",
127
- subject: "deposit",
128
- actions: ["manage"],
129
- conditions: null,
130
- inverted: !1,
131
- reason: null
132
- },
133
- {
134
- label: "",
135
- subject: "delivery",
136
- actions: ["manage"],
137
- conditions: null,
138
- inverted: !1,
139
- reason: null
140
- },
141
- {
142
- label: "",
143
- subject: "counterRecord",
144
- actions: ["manage"],
145
- conditions: null,
146
- inverted: !1,
147
- reason: null
148
- },
149
- {
150
- label: "",
151
- subject: "restaurantSetting",
152
- actions: ["manage"],
153
- conditions: null,
154
- inverted: !1,
155
- reason: null
156
- },
157
- {
158
- label: "",
159
- subject: "display",
160
- actions: ["manage"],
161
- conditions: null,
162
- inverted: !1,
163
- reason: null
164
- },
165
- {
166
- label: "",
167
- subject: "printer",
168
- actions: ["manage"],
169
- conditions: null,
170
- inverted: !1,
171
- reason: null
172
- },
173
- {
174
- label: "",
175
- subject: "table",
176
- actions: ["manage"],
177
- conditions: null,
178
- inverted: !1,
179
- reason: null
180
- },
181
- {
182
- label: "",
183
- subject: "employee",
184
- actions: ["manage"],
185
- conditions: null,
186
- inverted: !1,
187
- reason: null
188
- },
189
- {
190
- label: "",
191
- subject: "system",
192
- actions: ["manage"],
193
- conditions: null,
194
- inverted: !1,
195
- reason: null
196
- },
197
- {
198
- label: "",
199
- subject: "tax",
200
- actions: ["manage"],
201
- conditions: null,
202
- inverted: !1,
203
- reason: null
204
- },
205
- {
206
- label: "",
207
- subject: "paymentType",
208
- actions: ["manage"],
209
- conditions: null,
210
- inverted: !1,
211
- reason: null
212
- },
213
- {
214
- label: "",
215
- subject: "faceId",
216
- actions: ["manage"],
217
- conditions: null,
218
- inverted: !1,
219
- reason: null
220
- },
221
- {
222
- label: "",
223
- subject: "report",
224
- actions: ["read"],
225
- conditions: { name: "closeup" },
226
- inverted: !1,
227
- reason: ""
228
- },
229
- {
230
- label: "",
231
- subject: "report",
232
- actions: ["read"],
233
- conditions: { name: "counter" },
234
- inverted: !1,
235
- reason: ""
236
- },
237
- {
238
- label: "",
239
- subject: "report",
240
- actions: ["read"],
241
- conditions: { name: "hourlySales" },
242
- inverted: !1,
243
- reason: ""
244
- },
245
- {
246
- label: "",
247
- subject: "report",
248
- actions: ["read"],
249
- conditions: { name: "dailySales" },
250
- inverted: !1,
251
- reason: ""
252
- },
253
- {
254
- label: "",
255
- subject: "report",
256
- actions: ["read"],
257
- conditions: { name: "productSales" },
258
- inverted: !1,
259
- reason: ""
260
- },
261
- {
262
- label: "",
263
- subject: "report",
264
- actions: ["read"],
265
- conditions: { name: "sourceProductSales" },
266
- inverted: !1,
267
- reason: ""
268
- },
269
- {
270
- label: "",
271
- subject: "report",
272
- actions: ["read"],
273
- conditions: { name: "userProductSales" },
274
- inverted: !1,
275
- reason: ""
276
- },
277
- {
278
- label: "",
279
- subject: "report",
280
- actions: ["read"],
281
- conditions: { name: "categorySales" },
282
- inverted: !1,
283
- reason: ""
284
- },
285
- {
286
- label: "",
287
- subject: "report",
288
- actions: ["read"],
289
- conditions: { name: "addonSales" },
290
- inverted: !1,
291
- reason: ""
292
- },
293
- {
294
- label: "",
295
- subject: "report",
296
- actions: ["read"],
297
- conditions: { name: "slotSales" },
298
- inverted: !1,
299
- reason: ""
300
- },
301
- {
302
- label: "",
303
- subject: "report",
304
- actions: ["read"],
305
- conditions: { name: "drawer" },
306
- inverted: !1,
307
- reason: ""
308
- },
309
- {
310
- label: "",
311
- subject: "report",
312
- actions: ["read"],
313
- conditions: { name: "discount" },
314
- inverted: !1,
315
- reason: ""
316
- },
317
- {
318
- label: "",
319
- subject: "report",
320
- actions: ["read"],
321
- conditions: { name: "refund" },
322
- inverted: !1,
323
- reason: ""
324
- },
325
- {
326
- label: "",
327
- subject: "report",
328
- actions: ["read"],
329
- conditions: { name: "void" },
330
- inverted: !1,
331
- reason: ""
332
- },
333
- {
334
- label: "",
335
- subject: "report",
336
- actions: ["read"],
337
- conditions: { name: "timesheet" },
338
- inverted: !1,
339
- reason: ""
340
- },
341
- {
342
- label: "",
343
- subject: "report",
344
- actions: ["read"],
345
- conditions: { name: "counterPayment" },
346
- inverted: !1,
347
- reason: ""
348
- }
349
- ];
350
- function j(n) {
351
- let e = n.substring(n.indexOf("_") + 1);
352
- return e.includes("_") && (e = e.substring(0, e.lastIndexOf("_"))), Number.isNaN(Date.parse(e)) ? null : new Date(e).toISOString();
353
- }
354
- function g(n) {
355
- const e = Math.floor(n / 60), t = n % 60;
356
- return `${e}h ${t.toString().padStart(2, "0")}m`;
357
- }
358
- function d(n) {
359
- const e = n.replace(/([A-Z])/g, " $1");
360
- return e.charAt(0).toUpperCase() + e.slice(1);
361
- }
362
- function v(n, e) {
363
- if (n.some((s) => s.subject === "all")) return "All";
364
- const t = r.filter((s) => s.subject === e), o = n.filter(
365
- (s) => s.subject === e && t.some((c) => c.subject === s.subject)
366
- );
367
- return o.length === t.length ? "All" : o.length === 0 ? "-" : `${o.length} permission allow`;
368
- }
369
- function l(n) {
370
- const e = u(n), t = e.subject;
371
- return {
372
- ...e,
373
- get conditions() {
374
- return typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
375
- },
376
- get isDiscountOperation() {
377
- var o;
378
- return t === a.F_RULE_SUBJECT.enum.order && ((o = this.conditions) == null ? void 0 : o.operation) === a.F_RULE_ORDER_OPERATION.enum.discount;
379
- },
380
- get isOrderOperation() {
381
- return t === a.F_RULE_SUBJECT.enum.order;
382
- },
383
- get isReportPermission() {
384
- return t === a.F_RULE_SUBJECT.enum.report;
385
- },
386
- get formatted() {
387
- const o = (s) => s.endsWith("_") ? s.slice(0, s.length - 1) : s;
388
- return this.isOrderOperation ? o(this.conditions.operation) : this.isReportPermission ? o(this.conditions.name) : t.toString();
389
- },
390
- get label() {
391
- return d(this.formatted);
392
- },
393
- get value() {
394
- return this.isOrderOperation ? `${t}:${this.conditions.operation}` : this.isReportPermission ? `${t}:${this.conditions.name}` : t.toString();
395
- }
396
- };
397
- }
398
- function S(n) {
399
- const e = n.map((t) => l(t)).find((t) => t.isDiscountOperation);
400
- return e ? parseInt((e.conditions.adjustment.$lte * 100).toFixed(0)) : 100;
401
- }
402
- function h(n) {
403
- const e = n.find(
404
- (t) => t.subject === i.Subject.Restaurant.restaurant
405
- );
406
- return e ? e.conditions ? JSON.parse(e.conditions).restaurantId.$in : null : [];
407
- }
408
- function O(n) {
409
- return (n == null ? void 0 : n.some((e) => e.subject === "all")) ?? !1;
410
- }
411
- function y(n) {
412
- const e = n.find((t) => t.subject === i.Subject.Business.role);
413
- return e ? e.conditions ? JSON.parse(e.conditions).roleId.$in : null : [];
414
- }
415
- function R(n, e) {
416
- return n.map((t) => {
417
- const o = b(t);
418
- return {
419
- subject: o.subject,
420
- actions: o.actions,
421
- conditions: {
422
- ...o.conditions,
423
- adjustment: o.isDiscountOperation ? { $lte: parseFloat((e / 100).toFixed(2)) } : void 0
424
- }
425
- };
426
- });
427
- }
428
- function b(n) {
429
- const [e, t] = n.split(":");
430
- let o;
431
- return t ? o = r.find(
432
- (s) => s.subject === e && [
433
- (typeof s.conditions == "object" ? s.conditions : JSON.parse(s.conditions)).operation,
434
- s.conditions.name
435
- ].includes(t)
436
- ) : o = r.find((s) => s.subject === e), l(o || { subject: a.F_RULE_SUBJECT.enum.order, actions: [], label: "" });
437
- }
438
- export {
439
- R as a,
440
- S as b,
441
- v as c,
442
- g as d,
443
- j as e,
444
- r as f,
445
- h as g,
446
- O as h,
447
- p as i,
448
- l as r,
449
- y as u
450
- };
@@ -1,86 +0,0 @@
1
- import type { IFdtoGrantUser, IFdtoCreateGrantUserReq } from '@/types/grant-user';
2
- export declare const useGrantUserStore: import("pinia").StoreDefinition<"grantUser", Pick<{
3
- grantUsers: import("vue").Ref<{
4
- _id: string;
5
- passcode: string;
6
- name: string;
7
- restaurantId: string;
8
- roleId: string;
9
- status: "active" | "used" | "revoked";
10
- grantById: string;
11
- grantByName: string;
12
- createdAt: string;
13
- updatedAt: string;
14
- }[], IFdtoGrantUser[] | {
15
- _id: string;
16
- passcode: string;
17
- name: string;
18
- restaurantId: string;
19
- roleId: string;
20
- status: "active" | "used" | "revoked";
21
- grantById: string;
22
- grantByName: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- }[]>;
26
- isLoading: import("vue").Ref<boolean, boolean>;
27
- readGrantUsers: () => Promise<void>;
28
- createGrantUser: (dto: IFdtoCreateGrantUserReq) => Promise<IFdtoGrantUser>;
29
- revokeGrantUser: (id: string, restaurantId: string) => Promise<void>;
30
- }, "isLoading" | "grantUsers">, Pick<{
31
- grantUsers: import("vue").Ref<{
32
- _id: string;
33
- passcode: string;
34
- name: string;
35
- restaurantId: string;
36
- roleId: string;
37
- status: "active" | "used" | "revoked";
38
- grantById: string;
39
- grantByName: string;
40
- createdAt: string;
41
- updatedAt: string;
42
- }[], IFdtoGrantUser[] | {
43
- _id: string;
44
- passcode: string;
45
- name: string;
46
- restaurantId: string;
47
- roleId: string;
48
- status: "active" | "used" | "revoked";
49
- grantById: string;
50
- grantByName: string;
51
- createdAt: string;
52
- updatedAt: string;
53
- }[]>;
54
- isLoading: import("vue").Ref<boolean, boolean>;
55
- readGrantUsers: () => Promise<void>;
56
- createGrantUser: (dto: IFdtoCreateGrantUserReq) => Promise<IFdtoGrantUser>;
57
- revokeGrantUser: (id: string, restaurantId: string) => Promise<void>;
58
- }, never>, Pick<{
59
- grantUsers: import("vue").Ref<{
60
- _id: string;
61
- passcode: string;
62
- name: string;
63
- restaurantId: string;
64
- roleId: string;
65
- status: "active" | "used" | "revoked";
66
- grantById: string;
67
- grantByName: string;
68
- createdAt: string;
69
- updatedAt: string;
70
- }[], IFdtoGrantUser[] | {
71
- _id: string;
72
- passcode: string;
73
- name: string;
74
- restaurantId: string;
75
- roleId: string;
76
- status: "active" | "used" | "revoked";
77
- grantById: string;
78
- grantByName: string;
79
- createdAt: string;
80
- updatedAt: string;
81
- }[]>;
82
- isLoading: import("vue").Ref<boolean, boolean>;
83
- readGrantUsers: () => Promise<void>;
84
- createGrantUser: (dto: IFdtoCreateGrantUserReq) => Promise<IFdtoGrantUser>;
85
- revokeGrantUser: (id: string, restaurantId: string) => Promise<void>;
86
- }, "readGrantUsers" | "createGrantUser" | "revokeGrantUser">>;
@@ -1,17 +0,0 @@
1
- export interface IFdtoGrantUser {
2
- _id: string;
3
- passcode: string;
4
- name: string;
5
- restaurantId: string;
6
- roleId: string;
7
- status: 'active' | 'used' | 'revoked';
8
- grantById: string;
9
- grantByName: string;
10
- createdAt: string;
11
- updatedAt: string;
12
- }
13
- export interface IFdtoCreateGrantUserReq {
14
- name: string;
15
- restaurantId: string;
16
- roleId: string;
17
- }
@@ -1,93 +0,0 @@
1
- import { defineStore as p } from "pinia";
2
- import { g as s } from "./role-DGAu9X1X.js";
3
- import { baseClientInstance as d } from "@feedmepos/mf-common";
4
- var n = [];
5
- for (var r = 0; r < 256; ++r)
6
- n.push((r + 256).toString(16).slice(1));
7
- function l(e, t = 0) {
8
- return (n[e[t + 0]] + n[e[t + 1]] + n[e[t + 2]] + n[e[t + 3]] + "-" + n[e[t + 4]] + n[e[t + 5]] + "-" + n[e[t + 6]] + n[e[t + 7]] + "-" + n[e[t + 8]] + n[e[t + 9]] + "-" + n[e[t + 10]] + n[e[t + 11]] + n[e[t + 12]] + n[e[t + 13]] + n[e[t + 14]] + n[e[t + 15]]).toLowerCase();
9
- }
10
- var u, g = new Uint8Array(16);
11
- function y() {
12
- if (!u && (u = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !u))
13
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
14
- return u(g);
15
- }
16
- var m = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
17
- const o = {
18
- randomUUID: m
19
- };
20
- function b(e, t, a) {
21
- if (o.randomUUID && !e)
22
- return o.randomUUID();
23
- e = e || {};
24
- var i = e.random || (e.rng || y)();
25
- return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, l(i);
26
- }
27
- const c = {
28
- async read() {
29
- return s(await d("/").get("/public-setting"));
30
- },
31
- async update(e) {
32
- return s(await d("/").put("/public-setting", e));
33
- }
34
- };
35
- function h() {
36
- return {
37
- loadingQueue: [],
38
- publicSetting: {
39
- delivery: {
40
- feedMe: {
41
- areas: [],
42
- enable: !1,
43
- maxDistance: 0
44
- }
45
- },
46
- sms: {
47
- firebase: !1
48
- },
49
- assets: {
50
- groups: []
51
- },
52
- aiSettings: {
53
- remy: { enable: !1 }
54
- }
55
- }
56
- };
57
- }
58
- const U = p("portal-app-store", {
59
- state: () => h(),
60
- actions: {
61
- addLoadingQueues(e) {
62
- this.loadingQueue = [...this.loadingQueue, ...e];
63
- },
64
- clearLoadingQueue() {
65
- this.loadingQueue = [];
66
- },
67
- resolveQueues(e) {
68
- this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
69
- },
70
- async promise(e, t = !0) {
71
- const a = b();
72
- try {
73
- const i = [{ id: a, isGlobal: t }];
74
- return this.addLoadingQueues(i), await e();
75
- } finally {
76
- this.resolveQueues([a]);
77
- }
78
- },
79
- async getPublicSetting() {
80
- return this.publicSetting = await c.read(), this.publicSetting;
81
- },
82
- async updatePublicSetting(e) {
83
- return this.publicSetting = await c.update({
84
- ...this.publicSetting,
85
- ...e
86
- }), this.publicSetting;
87
- }
88
- }
89
- });
90
- export {
91
- U as u,
92
- b as v
93
- };