@lokalise/harmony 1.40.0 → 1.40.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 (216) hide show
  1. package/dist/harmony100.cjs +12 -9
  2. package/dist/harmony100.cjs.map +1 -1
  3. package/dist/harmony100.mjs +11 -8
  4. package/dist/harmony100.mjs.map +1 -1
  5. package/dist/harmony101.cjs +12 -57
  6. package/dist/harmony101.cjs.map +1 -1
  7. package/dist/harmony101.mjs +11 -56
  8. package/dist/harmony101.mjs.map +1 -1
  9. package/dist/harmony102.cjs +6 -42
  10. package/dist/harmony102.cjs.map +1 -1
  11. package/dist/harmony102.mjs +5 -41
  12. package/dist/harmony102.mjs.map +1 -1
  13. package/dist/harmony103.cjs +10 -6
  14. package/dist/harmony103.cjs.map +1 -1
  15. package/dist/harmony103.mjs +9 -5
  16. package/dist/harmony103.mjs.map +1 -1
  17. package/dist/harmony104.cjs +6 -6
  18. package/dist/harmony104.mjs +6 -6
  19. package/dist/harmony105.cjs +57 -24
  20. package/dist/harmony105.cjs.map +1 -1
  21. package/dist/harmony105.mjs +56 -23
  22. package/dist/harmony105.mjs.map +1 -1
  23. package/dist/harmony106.cjs +42 -6
  24. package/dist/harmony106.cjs.map +1 -1
  25. package/dist/harmony106.mjs +41 -5
  26. package/dist/harmony106.mjs.map +1 -1
  27. package/dist/harmony107.cjs +5 -21
  28. package/dist/harmony107.cjs.map +1 -1
  29. package/dist/harmony107.mjs +5 -21
  30. package/dist/harmony107.mjs.map +1 -1
  31. package/dist/harmony108.cjs +4 -7
  32. package/dist/harmony108.cjs.map +1 -1
  33. package/dist/harmony108.mjs +4 -7
  34. package/dist/harmony108.mjs.map +1 -1
  35. package/dist/harmony109.cjs +25 -12
  36. package/dist/harmony109.cjs.map +1 -1
  37. package/dist/harmony109.mjs +24 -11
  38. package/dist/harmony109.mjs.map +1 -1
  39. package/dist/harmony110.cjs +5 -20
  40. package/dist/harmony110.cjs.map +1 -1
  41. package/dist/harmony110.mjs +5 -20
  42. package/dist/harmony110.mjs.map +1 -1
  43. package/dist/harmony111.cjs +19 -164
  44. package/dist/harmony111.cjs.map +1 -1
  45. package/dist/harmony111.mjs +19 -164
  46. package/dist/harmony111.mjs.map +1 -1
  47. package/dist/harmony112.cjs +12 -44
  48. package/dist/harmony112.cjs.map +1 -1
  49. package/dist/harmony112.mjs +11 -43
  50. package/dist/harmony112.mjs.map +1 -1
  51. package/dist/harmony113.cjs +11 -96
  52. package/dist/harmony113.cjs.map +1 -1
  53. package/dist/harmony113.mjs +11 -79
  54. package/dist/harmony113.mjs.map +1 -1
  55. package/dist/harmony114.cjs +18 -14
  56. package/dist/harmony114.cjs.map +1 -1
  57. package/dist/harmony114.mjs +18 -14
  58. package/dist/harmony114.mjs.map +1 -1
  59. package/dist/harmony115.cjs +99 -18
  60. package/dist/harmony115.cjs.map +1 -1
  61. package/dist/harmony115.mjs +82 -18
  62. package/dist/harmony115.mjs.map +1 -1
  63. package/dist/harmony116.cjs +87 -21
  64. package/dist/harmony116.cjs.map +1 -1
  65. package/dist/harmony116.mjs +86 -20
  66. package/dist/harmony116.mjs.map +1 -1
  67. package/dist/harmony117.cjs +30 -6
  68. package/dist/harmony117.cjs.map +1 -1
  69. package/dist/harmony117.mjs +30 -6
  70. package/dist/harmony117.mjs.map +1 -1
  71. package/dist/harmony118.cjs +21 -132
  72. package/dist/harmony118.cjs.map +1 -1
  73. package/dist/harmony118.mjs +20 -131
  74. package/dist/harmony118.mjs.map +1 -1
  75. package/dist/harmony119.cjs +6 -12
  76. package/dist/harmony119.cjs.map +1 -1
  77. package/dist/harmony119.mjs +5 -11
  78. package/dist/harmony119.mjs.map +1 -1
  79. package/dist/harmony120.cjs +132 -5
  80. package/dist/harmony120.cjs.map +1 -1
  81. package/dist/harmony120.mjs +132 -5
  82. package/dist/harmony120.mjs.map +1 -1
  83. package/dist/harmony121.cjs +12 -40
  84. package/dist/harmony121.cjs.map +1 -1
  85. package/dist/harmony121.mjs +11 -39
  86. package/dist/harmony121.mjs.map +1 -1
  87. package/dist/harmony122.cjs +4 -59
  88. package/dist/harmony122.cjs.map +1 -1
  89. package/dist/harmony122.mjs +5 -60
  90. package/dist/harmony122.mjs.map +1 -1
  91. package/dist/harmony123.cjs +39 -6
  92. package/dist/harmony123.cjs.map +1 -1
  93. package/dist/harmony123.mjs +39 -6
  94. package/dist/harmony123.mjs.map +1 -1
  95. package/dist/harmony124.cjs +60 -6
  96. package/dist/harmony124.cjs.map +1 -1
  97. package/dist/harmony124.mjs +59 -5
  98. package/dist/harmony124.mjs.map +1 -1
  99. package/dist/harmony125.cjs +8 -6
  100. package/dist/harmony125.cjs.map +1 -1
  101. package/dist/harmony125.mjs +7 -5
  102. package/dist/harmony125.mjs.map +1 -1
  103. package/dist/harmony126.cjs +6 -5
  104. package/dist/harmony126.cjs.map +1 -1
  105. package/dist/harmony126.mjs +6 -5
  106. package/dist/harmony127.cjs +6 -88
  107. package/dist/harmony127.cjs.map +1 -1
  108. package/dist/harmony127.mjs +5 -87
  109. package/dist/harmony127.mjs.map +1 -1
  110. package/dist/harmony128.cjs +6 -31
  111. package/dist/harmony128.cjs.map +1 -1
  112. package/dist/harmony128.mjs +5 -30
  113. package/dist/harmony128.mjs.map +1 -1
  114. package/dist/harmony129.cjs +10 -96
  115. package/dist/harmony129.cjs.map +1 -1
  116. package/dist/harmony129.mjs +10 -96
  117. package/dist/harmony129.mjs.map +1 -1
  118. package/dist/harmony130.cjs +62 -13
  119. package/dist/harmony130.cjs.map +1 -1
  120. package/dist/harmony130.mjs +61 -12
  121. package/dist/harmony130.mjs.map +1 -1
  122. package/dist/harmony131.cjs +87 -13
  123. package/dist/harmony131.cjs.map +1 -1
  124. package/dist/harmony131.mjs +87 -13
  125. package/dist/harmony131.mjs.map +1 -1
  126. package/dist/harmony132.cjs +19 -37
  127. package/dist/harmony132.cjs.map +1 -1
  128. package/dist/harmony132.mjs +18 -36
  129. package/dist/harmony132.mjs.map +1 -1
  130. package/dist/harmony133.cjs +87 -19
  131. package/dist/harmony133.cjs.map +1 -1
  132. package/dist/harmony133.mjs +87 -19
  133. package/dist/harmony133.mjs.map +1 -1
  134. package/dist/harmony134.cjs +13 -62
  135. package/dist/harmony134.cjs.map +1 -1
  136. package/dist/harmony134.mjs +12 -61
  137. package/dist/harmony134.mjs.map +1 -1
  138. package/dist/harmony135.cjs +13 -87
  139. package/dist/harmony135.cjs.map +1 -1
  140. package/dist/harmony135.mjs +13 -87
  141. package/dist/harmony135.mjs.map +1 -1
  142. package/dist/harmony136.cjs +37 -19
  143. package/dist/harmony136.cjs.map +1 -1
  144. package/dist/harmony136.mjs +36 -18
  145. package/dist/harmony136.mjs.map +1 -1
  146. package/dist/harmony137.cjs +28 -10
  147. package/dist/harmony137.cjs.map +1 -1
  148. package/dist/harmony137.mjs +28 -10
  149. package/dist/harmony137.mjs.map +1 -1
  150. package/dist/harmony14.cjs +1 -1
  151. package/dist/harmony14.mjs +1 -1
  152. package/dist/harmony142.cjs +1 -1
  153. package/dist/harmony142.mjs +1 -1
  154. package/dist/harmony153.cjs +1 -1
  155. package/dist/harmony153.mjs +1 -1
  156. package/dist/harmony17.cjs +1 -1
  157. package/dist/harmony17.mjs +1 -1
  158. package/dist/harmony25.cjs +1 -1
  159. package/dist/harmony25.mjs +1 -1
  160. package/dist/harmony26.cjs +1 -1
  161. package/dist/harmony26.mjs +1 -1
  162. package/dist/harmony66.cjs +1 -0
  163. package/dist/harmony66.cjs.map +1 -1
  164. package/dist/harmony66.mjs +1 -0
  165. package/dist/harmony66.mjs.map +1 -1
  166. package/dist/harmony75.cjs +1 -1
  167. package/dist/harmony75.mjs +1 -1
  168. package/dist/harmony77.cjs +1 -1
  169. package/dist/harmony77.mjs +1 -1
  170. package/dist/harmony78.cjs +1 -1
  171. package/dist/harmony78.mjs +1 -1
  172. package/dist/harmony79.cjs +1 -1
  173. package/dist/harmony79.mjs +1 -1
  174. package/dist/harmony80.cjs +2 -2
  175. package/dist/harmony80.mjs +2 -2
  176. package/dist/harmony81.cjs +2 -2
  177. package/dist/harmony81.mjs +2 -2
  178. package/dist/harmony82.cjs +2 -2
  179. package/dist/harmony82.mjs +2 -2
  180. package/dist/harmony83.cjs +2 -2
  181. package/dist/harmony83.mjs +2 -2
  182. package/dist/harmony84.cjs +3 -3
  183. package/dist/harmony84.mjs +3 -3
  184. package/dist/harmony85.cjs +6 -6
  185. package/dist/harmony85.mjs +6 -6
  186. package/dist/harmony88.cjs +2 -2
  187. package/dist/harmony88.mjs +2 -2
  188. package/dist/harmony90.cjs +2 -2
  189. package/dist/harmony90.mjs +2 -2
  190. package/dist/harmony92.cjs +2 -2
  191. package/dist/harmony92.mjs +2 -2
  192. package/dist/harmony96.cjs +9 -10
  193. package/dist/harmony96.cjs.map +1 -1
  194. package/dist/harmony96.mjs +11 -12
  195. package/dist/harmony96.mjs.map +1 -1
  196. package/dist/harmony97.cjs +20 -11
  197. package/dist/harmony97.cjs.map +1 -1
  198. package/dist/harmony97.mjs +20 -11
  199. package/dist/harmony97.mjs.map +1 -1
  200. package/dist/harmony98.cjs +166 -6
  201. package/dist/harmony98.cjs.map +1 -1
  202. package/dist/harmony98.mjs +165 -5
  203. package/dist/harmony98.mjs.map +1 -1
  204. package/dist/harmony99.cjs +44 -9
  205. package/dist/harmony99.cjs.map +1 -1
  206. package/dist/harmony99.mjs +43 -8
  207. package/dist/harmony99.mjs.map +1 -1
  208. package/dist/types/src/features/navigation/hooks/useNavigation.d.ts +1 -1
  209. package/dist/types/src/features/navigation/hooks/useNavigationQueries.d.ts +3 -3
  210. package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +2 -2
  211. package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +2 -2
  212. package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +1 -1
  213. package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +1 -1
  214. package/dist/types/src/features/publicApi/projects.d.ts +20 -20
  215. package/dist/types/src/features/publicApi/types/projectTypes.d.ts +15 -15
  216. package/package.json +1 -1
@@ -1,90 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const permissions = require("./harmony137.cjs");
4
- const getProjectNavigationVisibilityMap = (project, adminRights, isFeatureEnabled) => {
5
- var _a, _b;
6
- return {
7
- upload: {
8
- visible: permissions.hasAdminRight(adminRights, "upload"),
9
- disabled: false
10
- },
11
- download: {
12
- visible: permissions.hasAdminRight(adminRights, "download"),
13
- disabled: false
14
- },
15
- // TODO: HOME-1009, Clean up after permission management
16
- // -- There is a plan for "Install apps" permission. Right..?
17
- apps: {
18
- visible: true,
19
- disabled: false
20
- },
21
- // TODO: HOME-1009, Clean up after permission management
22
- // -- There is a plan for "Install apps" permission. Right..?
23
- contentManagement: {
24
- visible: project.project_type === "content_integration" && permissions.hasAdminRight(adminRights, "keys"),
25
- disabled: false
26
- },
27
- editor: {
28
- visible: true,
29
- disabled: false
30
- },
31
- files: {
32
- visible: isFeatureEnabled("lionLfcFilesManagement") && project.project_type === "paged_documents" && permissions.hasAnyAdminRight(adminRights, ["upload", "download"]),
33
- disabled: false
34
- },
35
- tasks: {
36
- visible: permissions.hasAdminRight(adminRights, "tasks"),
37
- disabled: false
38
- },
39
- contributors: {
40
- visible: permissions.hasAdminRight(adminRights, "contributors"),
41
- disabled: false
42
- },
43
- workflows: {
44
- visible: permissions.hasAdminRight(adminRights, "settings"),
45
- disabled: false
46
- },
47
- screenshots: {
48
- visible: permissions.hasAdminRight(adminRights, "screenshots"),
49
- disabled: false
50
- },
51
- glossary: {
52
- visible: permissions.hasAdminRight(adminRights, "glossary"),
53
- disabled: false
54
- },
55
- more: {
56
- visible: true,
57
- disabled: false
58
- },
59
- settings: {
60
- visible: permissions.hasAdminRight(adminRights, "settings"),
61
- disabled: false
62
- },
63
- branches: {
64
- visible: !!((_a = project.settings) == null ? void 0 : _a.branching) && permissions.hasAnyAdminRight(adminRights, ["branches_create", "create_branches", "branches_merge"]),
65
- disabled: false
66
- },
67
- otaBundles: {
68
- visible: permissions.hasAnyAdminRight(adminRights, ["download", "settings", "keys"]) && project.project_type === "localization_files",
69
- disabled: false
70
- },
71
- automations: {
72
- visible: permissions.hasAdminRight(adminRights, "settings"),
73
- disabled: false
74
- },
75
- duplicateFinder: {
76
- visible: permissions.hasAdminRight(adminRights, "keys") && project.project_type === "localization_files",
77
- disabled: false
78
- },
79
- activity: {
80
- visible: !!((_b = project.settings) == null ? void 0 : _b.offline_translation) || permissions.hasAdminRight(adminRights, "activity"),
81
- disabled: false
82
- },
83
- statistics: {
84
- visible: permissions.hasAdminRight(adminRights, "statistics"),
85
- disabled: false
86
- }
87
- };
88
- };
89
- exports.getProjectNavigationVisibilityMap = getProjectNavigationVisibilityMap;
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const _commonjsHelpers = require("./harmony149.cjs");
4
+ const debounce$1 = require("./harmony133.cjs");
5
+ var debounceExports = debounce$1.__require();
6
+ const debounce = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(debounceExports);
7
+ exports.default = debounce;
90
8
  //# sourceMappingURL=harmony127.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony127.cjs","sources":["../src/features/navigation/utils/toolbarVisibility.ts"],"sourcesContent":["import { hasAdminRight, hasAnyAdminRight } from '@features/auth/utils/permissions'\nimport type { Project } from '@features/node'\n\ntype ToolbarVisibility = {\n\tdisabled: boolean\n\tvisible: boolean\n}\n\nexport type ToolbarVisibilityMap = {\n\tupload: ToolbarVisibility\n\tdownload: ToolbarVisibility\n\tapps: ToolbarVisibility\n\tcontentManagement: ToolbarVisibility\n\teditor: ToolbarVisibility\n\tfiles: ToolbarVisibility\n\ttasks: ToolbarVisibility\n\tworkflows: ToolbarVisibility\n\tcontributors: ToolbarVisibility\n\tscreenshots: ToolbarVisibility\n\tglossary: ToolbarVisibility\n\tmore: ToolbarVisibility\n\tsettings: ToolbarVisibility\n\tbranches: ToolbarVisibility\n\totaBundles: ToolbarVisibility\n\tautomations: ToolbarVisibility\n\tduplicateFinder: ToolbarVisibility\n\tactivity: ToolbarVisibility\n\tstatistics: ToolbarVisibility\n}\n\nexport const getProjectNavigationVisibilityMap = (\n\tproject: Project,\n\tadminRights: string[],\n\tisFeatureEnabled: (key: string) => boolean,\n): ToolbarVisibilityMap => ({\n\tupload: {\n\t\tvisible: hasAdminRight(adminRights, 'upload'),\n\t\tdisabled: false,\n\t},\n\tdownload: {\n\t\tvisible: hasAdminRight(adminRights, 'download'),\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tapps: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tcontentManagement: {\n\t\tvisible: project.project_type === 'content_integration' && hasAdminRight(adminRights, 'keys'),\n\t\tdisabled: false,\n\t},\n\teditor: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tfiles: {\n\t\tvisible:\n\t\t\tisFeatureEnabled('lionLfcFilesManagement') &&\n\t\t\tproject.project_type === 'paged_documents' &&\n\t\t\thasAnyAdminRight(adminRights, ['upload', 'download']),\n\t\tdisabled: false,\n\t},\n\ttasks: {\n\t\tvisible: hasAdminRight(adminRights, 'tasks'),\n\t\tdisabled: false,\n\t},\n\tcontributors: {\n\t\tvisible: hasAdminRight(adminRights, 'contributors'),\n\t\tdisabled: false,\n\t},\n\tworkflows: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tscreenshots: {\n\t\tvisible: hasAdminRight(adminRights, 'screenshots'),\n\t\tdisabled: false,\n\t},\n\tglossary: {\n\t\tvisible: hasAdminRight(adminRights, 'glossary'),\n\t\tdisabled: false,\n\t},\n\tmore: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tsettings: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tbranches: {\n\t\tvisible:\n\t\t\t!!project.settings?.branching &&\n\t\t\thasAnyAdminRight(adminRights, ['branches_create', 'create_branches', 'branches_merge']),\n\t\tdisabled: false,\n\t},\n\totaBundles: {\n\t\tvisible:\n\t\t\thasAnyAdminRight(adminRights, ['download', 'settings', 'keys']) &&\n\t\t\tproject.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tautomations: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tduplicateFinder: {\n\t\tvisible: hasAdminRight(adminRights, 'keys') && project.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tactivity: {\n\t\tvisible: !!project.settings?.offline_translation || hasAdminRight(adminRights, 'activity'),\n\t\tdisabled: false,\n\t},\n\tstatistics: {\n\t\tvisible: hasAdminRight(adminRights, 'statistics'),\n\t\tdisabled: false,\n\t},\n})\n"],"names":["hasAdminRight","hasAnyAdminRight"],"mappings":";;;AA8BO,MAAM,oCAAoC,CAChD,SACA,aACA,qBAC2B;;AAAA;AAAA,IAC3B,QAAQ;AAAA,MACP,SAASA,YAAAA,cAAc,aAAa,QAAQ;AAAA,MAC5C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAASA,YAAAA,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,mBAAmB;AAAA,MAClB,SAAS,QAAQ,iBAAiB,yBAAyBA,YAAA,cAAc,aAAa,MAAM;AAAA,MAC5F,UAAU;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SACC,iBAAiB,wBAAwB,KACzC,QAAQ,iBAAiB,qBACzBC,YAAAA,iBAAiB,aAAa,CAAC,UAAU,UAAU,CAAC;AAAA,MACrD,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SAASD,YAAAA,cAAc,aAAa,OAAO;AAAA,MAC3C,UAAU;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACb,SAASA,YAAAA,cAAc,aAAa,cAAc;AAAA,MAClD,UAAU;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACV,SAASA,YAAAA,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAASA,YAAAA,cAAc,aAAa,aAAa;AAAA,MACjD,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAASA,YAAAA,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAASA,YAAAA,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SACC,CAAC,GAAC,aAAQ,aAAR,mBAAkB,cACpBC,6BAAiB,aAAa,CAAC,mBAAmB,mBAAmB,gBAAgB,CAAC;AAAA,MACvF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SACCA,YAAAA,iBAAiB,aAAa,CAAC,YAAY,YAAY,MAAM,CAAC,KAC9D,QAAQ,iBAAiB;AAAA,MAC1B,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAASD,YAAAA,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MAChB,SAASA,YAAc,cAAA,aAAa,MAAM,KAAK,QAAQ,iBAAiB;AAAA,MACxE,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,CAAC,GAAC,aAAQ,aAAR,mBAAkB,wBAAuBA,YAAA,cAAc,aAAa,UAAU;AAAA,MACzF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SAASA,YAAAA,cAAc,aAAa,YAAY;AAAA,MAChD,UAAU;AAAA,IAAA;AAAA,EAEZ;AAAA;;"}
1
+ {"version":3,"file":"harmony127.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,90 +1,8 @@
1
- import { hasAdminRight, hasAnyAdminRight } from "./harmony137.mjs";
2
- const getProjectNavigationVisibilityMap = (project, adminRights, isFeatureEnabled) => {
3
- var _a, _b;
4
- return {
5
- upload: {
6
- visible: hasAdminRight(adminRights, "upload"),
7
- disabled: false
8
- },
9
- download: {
10
- visible: hasAdminRight(adminRights, "download"),
11
- disabled: false
12
- },
13
- // TODO: HOME-1009, Clean up after permission management
14
- // -- There is a plan for "Install apps" permission. Right..?
15
- apps: {
16
- visible: true,
17
- disabled: false
18
- },
19
- // TODO: HOME-1009, Clean up after permission management
20
- // -- There is a plan for "Install apps" permission. Right..?
21
- contentManagement: {
22
- visible: project.project_type === "content_integration" && hasAdminRight(adminRights, "keys"),
23
- disabled: false
24
- },
25
- editor: {
26
- visible: true,
27
- disabled: false
28
- },
29
- files: {
30
- visible: isFeatureEnabled("lionLfcFilesManagement") && project.project_type === "paged_documents" && hasAnyAdminRight(adminRights, ["upload", "download"]),
31
- disabled: false
32
- },
33
- tasks: {
34
- visible: hasAdminRight(adminRights, "tasks"),
35
- disabled: false
36
- },
37
- contributors: {
38
- visible: hasAdminRight(adminRights, "contributors"),
39
- disabled: false
40
- },
41
- workflows: {
42
- visible: hasAdminRight(adminRights, "settings"),
43
- disabled: false
44
- },
45
- screenshots: {
46
- visible: hasAdminRight(adminRights, "screenshots"),
47
- disabled: false
48
- },
49
- glossary: {
50
- visible: hasAdminRight(adminRights, "glossary"),
51
- disabled: false
52
- },
53
- more: {
54
- visible: true,
55
- disabled: false
56
- },
57
- settings: {
58
- visible: hasAdminRight(adminRights, "settings"),
59
- disabled: false
60
- },
61
- branches: {
62
- visible: !!((_a = project.settings) == null ? void 0 : _a.branching) && hasAnyAdminRight(adminRights, ["branches_create", "create_branches", "branches_merge"]),
63
- disabled: false
64
- },
65
- otaBundles: {
66
- visible: hasAnyAdminRight(adminRights, ["download", "settings", "keys"]) && project.project_type === "localization_files",
67
- disabled: false
68
- },
69
- automations: {
70
- visible: hasAdminRight(adminRights, "settings"),
71
- disabled: false
72
- },
73
- duplicateFinder: {
74
- visible: hasAdminRight(adminRights, "keys") && project.project_type === "localization_files",
75
- disabled: false
76
- },
77
- activity: {
78
- visible: !!((_b = project.settings) == null ? void 0 : _b.offline_translation) || hasAdminRight(adminRights, "activity"),
79
- disabled: false
80
- },
81
- statistics: {
82
- visible: hasAdminRight(adminRights, "statistics"),
83
- disabled: false
84
- }
85
- };
86
- };
1
+ import { getDefaultExportFromCjs } from "./harmony149.mjs";
2
+ import { __require as requireDebounce } from "./harmony133.mjs";
3
+ var debounceExports = requireDebounce();
4
+ const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
87
5
  export {
88
- getProjectNavigationVisibilityMap
6
+ debounce as default
89
7
  };
90
8
  //# sourceMappingURL=harmony127.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony127.mjs","sources":["../src/features/navigation/utils/toolbarVisibility.ts"],"sourcesContent":["import { hasAdminRight, hasAnyAdminRight } from '@features/auth/utils/permissions'\nimport type { Project } from '@features/node'\n\ntype ToolbarVisibility = {\n\tdisabled: boolean\n\tvisible: boolean\n}\n\nexport type ToolbarVisibilityMap = {\n\tupload: ToolbarVisibility\n\tdownload: ToolbarVisibility\n\tapps: ToolbarVisibility\n\tcontentManagement: ToolbarVisibility\n\teditor: ToolbarVisibility\n\tfiles: ToolbarVisibility\n\ttasks: ToolbarVisibility\n\tworkflows: ToolbarVisibility\n\tcontributors: ToolbarVisibility\n\tscreenshots: ToolbarVisibility\n\tglossary: ToolbarVisibility\n\tmore: ToolbarVisibility\n\tsettings: ToolbarVisibility\n\tbranches: ToolbarVisibility\n\totaBundles: ToolbarVisibility\n\tautomations: ToolbarVisibility\n\tduplicateFinder: ToolbarVisibility\n\tactivity: ToolbarVisibility\n\tstatistics: ToolbarVisibility\n}\n\nexport const getProjectNavigationVisibilityMap = (\n\tproject: Project,\n\tadminRights: string[],\n\tisFeatureEnabled: (key: string) => boolean,\n): ToolbarVisibilityMap => ({\n\tupload: {\n\t\tvisible: hasAdminRight(adminRights, 'upload'),\n\t\tdisabled: false,\n\t},\n\tdownload: {\n\t\tvisible: hasAdminRight(adminRights, 'download'),\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tapps: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\t// TODO: HOME-1009, Clean up after permission management\n\t// -- There is a plan for \"Install apps\" permission. Right..?\n\tcontentManagement: {\n\t\tvisible: project.project_type === 'content_integration' && hasAdminRight(adminRights, 'keys'),\n\t\tdisabled: false,\n\t},\n\teditor: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tfiles: {\n\t\tvisible:\n\t\t\tisFeatureEnabled('lionLfcFilesManagement') &&\n\t\t\tproject.project_type === 'paged_documents' &&\n\t\t\thasAnyAdminRight(adminRights, ['upload', 'download']),\n\t\tdisabled: false,\n\t},\n\ttasks: {\n\t\tvisible: hasAdminRight(adminRights, 'tasks'),\n\t\tdisabled: false,\n\t},\n\tcontributors: {\n\t\tvisible: hasAdminRight(adminRights, 'contributors'),\n\t\tdisabled: false,\n\t},\n\tworkflows: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tscreenshots: {\n\t\tvisible: hasAdminRight(adminRights, 'screenshots'),\n\t\tdisabled: false,\n\t},\n\tglossary: {\n\t\tvisible: hasAdminRight(adminRights, 'glossary'),\n\t\tdisabled: false,\n\t},\n\tmore: {\n\t\tvisible: true,\n\t\tdisabled: false,\n\t},\n\tsettings: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tbranches: {\n\t\tvisible:\n\t\t\t!!project.settings?.branching &&\n\t\t\thasAnyAdminRight(adminRights, ['branches_create', 'create_branches', 'branches_merge']),\n\t\tdisabled: false,\n\t},\n\totaBundles: {\n\t\tvisible:\n\t\t\thasAnyAdminRight(adminRights, ['download', 'settings', 'keys']) &&\n\t\t\tproject.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tautomations: {\n\t\tvisible: hasAdminRight(adminRights, 'settings'),\n\t\tdisabled: false,\n\t},\n\tduplicateFinder: {\n\t\tvisible: hasAdminRight(adminRights, 'keys') && project.project_type === 'localization_files',\n\t\tdisabled: false,\n\t},\n\tactivity: {\n\t\tvisible: !!project.settings?.offline_translation || hasAdminRight(adminRights, 'activity'),\n\t\tdisabled: false,\n\t},\n\tstatistics: {\n\t\tvisible: hasAdminRight(adminRights, 'statistics'),\n\t\tdisabled: false,\n\t},\n})\n"],"names":[],"mappings":";AA8BO,MAAM,oCAAoC,CAChD,SACA,aACA,qBAC2B;;AAAA;AAAA,IAC3B,QAAQ;AAAA,MACP,SAAS,cAAc,aAAa,QAAQ;AAAA,MAC5C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA;AAAA;AAAA,IAGA,mBAAmB;AAAA,MAClB,SAAS,QAAQ,iBAAiB,yBAAyB,cAAc,aAAa,MAAM;AAAA,MAC5F,UAAU;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SACC,iBAAiB,wBAAwB,KACzC,QAAQ,iBAAiB,qBACzB,iBAAiB,aAAa,CAAC,UAAU,UAAU,CAAC;AAAA,MACrD,UAAU;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACN,SAAS,cAAc,aAAa,OAAO;AAAA,MAC3C,UAAU;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACb,SAAS,cAAc,aAAa,cAAc;AAAA,MAClD,UAAU;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACV,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAAS,cAAc,aAAa,aAAa;AAAA,MACjD,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SACC,CAAC,GAAC,aAAQ,aAAR,mBAAkB,cACpB,iBAAiB,aAAa,CAAC,mBAAmB,mBAAmB,gBAAgB,CAAC;AAAA,MACvF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SACC,iBAAiB,aAAa,CAAC,YAAY,YAAY,MAAM,CAAC,KAC9D,QAAQ,iBAAiB;AAAA,MAC1B,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,SAAS,cAAc,aAAa,UAAU;AAAA,MAC9C,UAAU;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MAChB,SAAS,cAAc,aAAa,MAAM,KAAK,QAAQ,iBAAiB;AAAA,MACxE,UAAU;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACT,SAAS,CAAC,GAAC,aAAQ,aAAR,mBAAkB,wBAAuB,cAAc,aAAa,UAAU;AAAA,MACzF,UAAU;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACX,SAAS,cAAc,aAAa,YAAY;AAAA,MAChD,UAAU;AAAA,IAAA;AAAA,EAEZ;AAAA;"}
1
+ {"version":3,"file":"harmony127.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,33 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const navigationItems = [
4
- {
5
- key: "editor",
6
- labelKey: "Editor",
7
- path: ({ projectId }) => `/project/${projectId}/editor`
8
- },
9
- {
10
- key: "dashboard",
11
- labelKey: "Download",
12
- path: ({ projectId }) => `/project/${projectId}/dashboard`
13
- },
14
- {
15
- key: "contributors",
16
- labelKey: "Contributors",
17
- path: ({ projectId }) => `/project/${projectId}/contributors`
18
- },
19
- {
20
- key: "orders",
21
- labelKey: "Human proofreading",
22
- path: ({ projectId }) => `/project/${projectId}/orders`,
23
- shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
24
- },
25
- {
26
- key: "billing",
27
- labelKey: "Billing",
28
- path: ({ projectId }) => `/project/${projectId}/billing`,
29
- shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
30
- }
31
- ];
32
- exports.navigationItems = navigationItems;
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const _commonjsHelpers = require("./harmony149.cjs");
4
+ const throttle$1 = require("./harmony137.cjs");
5
+ var throttleExports = throttle$1.__require();
6
+ const throttle = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(throttleExports);
7
+ exports.default = throttle;
33
8
  //# sourceMappingURL=harmony128.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony128.cjs","sources":["../src/features/navigation/schemas/navigationSchema.ts"],"sourcesContent":["import type { DropdownItem, NavItemIcon } from '@features/navigation/types/navigation'\n\nexport type NavKey = 'editor' | 'contributors' | 'orders' | 'billing' | 'settings' | 'dashboard'\n\nexport interface NavigationItem {\n\tkey: NavKey\n\tlabelKey: string // TODO: i18n key inside this package\n\tpath: ({ projectId }: { projectId: string }) => string\n\n\ticon?: NavItemIcon\n\tdropdown?: DropdownItem[][]\n\tbadge?: number | ((ctx: NavCtx) => number)\n\n\tshouldShow?: (ctx: NavCtx) => boolean\n\tdisabled?: boolean | ((ctx: NavCtx) => boolean)\n\tisActive?: (pathname: string) => boolean // custom match, else fallback\n}\n\n/** What the gate functions receive */\nexport interface NavCtx {\n\tflags: Record<string, string>\n\tpathname: string\n\tpermissions?: Array<string> // e.g. contributor admin_rights //TODO: Provide type for permissions\n}\n\n// TODO: Handle Translations on harmony side.\nexport const navigationItems: NavigationItem[] = [\n\t{\n\t\tkey: 'editor',\n\t\tlabelKey: 'Editor',\n\t\tpath: ({ projectId }) => `/project/${projectId}/editor`,\n\t},\n\t{\n\t\tkey: 'dashboard',\n\t\tlabelKey: 'Download',\n\t\tpath: ({ projectId }) => `/project/${projectId}/dashboard`,\n\t},\n\t{\n\t\tkey: 'contributors',\n\t\tlabelKey: 'Contributors',\n\t\tpath: ({ projectId }) => `/project/${projectId}/contributors`,\n\t},\n\n\t{\n\t\tkey: 'orders',\n\t\tlabelKey: 'Human proofreading',\n\t\tpath: ({ projectId }) => `/project/${projectId}/orders`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_hraas === 'on',\n\t},\n\t{\n\t\tkey: 'billing',\n\t\tlabelKey: 'Billing',\n\t\tpath: ({ projectId }) => `/project/${projectId}/billing`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_billing === 'on',\n\t},\n]\n"],"names":[],"mappings":";;AA0BO,MAAM,kBAAoC;AAAA,EAChD;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EAEA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,qBAAqB;AAAA,EACvD;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,uBAAuB;AAAA,EAAA;AAE1D;;"}
1
+ {"version":3,"file":"harmony128.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,33 +1,8 @@
1
- const navigationItems = [
2
- {
3
- key: "editor",
4
- labelKey: "Editor",
5
- path: ({ projectId }) => `/project/${projectId}/editor`
6
- },
7
- {
8
- key: "dashboard",
9
- labelKey: "Download",
10
- path: ({ projectId }) => `/project/${projectId}/dashboard`
11
- },
12
- {
13
- key: "contributors",
14
- labelKey: "Contributors",
15
- path: ({ projectId }) => `/project/${projectId}/contributors`
16
- },
17
- {
18
- key: "orders",
19
- labelKey: "Human proofreading",
20
- path: ({ projectId }) => `/project/${projectId}/orders`,
21
- shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
22
- },
23
- {
24
- key: "billing",
25
- labelKey: "Billing",
26
- path: ({ projectId }) => `/project/${projectId}/billing`,
27
- shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
28
- }
29
- ];
1
+ import { getDefaultExportFromCjs } from "./harmony149.mjs";
2
+ import { __require as requireThrottle } from "./harmony137.mjs";
3
+ var throttleExports = requireThrottle();
4
+ const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports);
30
5
  export {
31
- navigationItems
6
+ throttle as default
32
7
  };
33
8
  //# sourceMappingURL=harmony128.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony128.mjs","sources":["../src/features/navigation/schemas/navigationSchema.ts"],"sourcesContent":["import type { DropdownItem, NavItemIcon } from '@features/navigation/types/navigation'\n\nexport type NavKey = 'editor' | 'contributors' | 'orders' | 'billing' | 'settings' | 'dashboard'\n\nexport interface NavigationItem {\n\tkey: NavKey\n\tlabelKey: string // TODO: i18n key inside this package\n\tpath: ({ projectId }: { projectId: string }) => string\n\n\ticon?: NavItemIcon\n\tdropdown?: DropdownItem[][]\n\tbadge?: number | ((ctx: NavCtx) => number)\n\n\tshouldShow?: (ctx: NavCtx) => boolean\n\tdisabled?: boolean | ((ctx: NavCtx) => boolean)\n\tisActive?: (pathname: string) => boolean // custom match, else fallback\n}\n\n/** What the gate functions receive */\nexport interface NavCtx {\n\tflags: Record<string, string>\n\tpathname: string\n\tpermissions?: Array<string> // e.g. contributor admin_rights //TODO: Provide type for permissions\n}\n\n// TODO: Handle Translations on harmony side.\nexport const navigationItems: NavigationItem[] = [\n\t{\n\t\tkey: 'editor',\n\t\tlabelKey: 'Editor',\n\t\tpath: ({ projectId }) => `/project/${projectId}/editor`,\n\t},\n\t{\n\t\tkey: 'dashboard',\n\t\tlabelKey: 'Download',\n\t\tpath: ({ projectId }) => `/project/${projectId}/dashboard`,\n\t},\n\t{\n\t\tkey: 'contributors',\n\t\tlabelKey: 'Contributors',\n\t\tpath: ({ projectId }) => `/project/${projectId}/contributors`,\n\t},\n\n\t{\n\t\tkey: 'orders',\n\t\tlabelKey: 'Human proofreading',\n\t\tpath: ({ projectId }) => `/project/${projectId}/orders`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_hraas === 'on',\n\t},\n\t{\n\t\tkey: 'billing',\n\t\tlabelKey: 'Billing',\n\t\tpath: ({ projectId }) => `/project/${projectId}/billing`,\n\t\tshouldShow: ({ flags }) => flags.ap_feature_billing === 'on',\n\t},\n]\n"],"names":[],"mappings":"AA0BO,MAAM,kBAAoC;AAAA,EAChD;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,EAC/C;AAAA,EAEA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,qBAAqB;AAAA,EACvD;AAAA,EACA;AAAA,IACC,KAAK;AAAA,IACL,UAAU;AAAA,IACV,MAAM,CAAC,EAAE,UAAU,MAAM,YAAY,SAAS;AAAA,IAC9C,YAAY,CAAC,EAAE,YAAY,MAAM,uBAAuB;AAAA,EAAA;AAE1D;"}
1
+ {"version":3,"file":"harmony128.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,99 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const isObject = require("./harmony130.cjs");
4
- const now = require("./harmony131.cjs");
5
- const toNumber = require("./harmony132.cjs");
6
- var debounce_1;
7
- var hasRequiredDebounce;
8
- function requireDebounce() {
9
- if (hasRequiredDebounce) return debounce_1;
10
- hasRequiredDebounce = 1;
11
- var isObject$1 = isObject.__require(), now$1 = now.__require(), toNumber$1 = toNumber.__require();
12
- var FUNC_ERROR_TEXT = "Expected a function";
13
- var nativeMax = Math.max, nativeMin = Math.min;
14
- function debounce(func, wait, options) {
15
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
16
- if (typeof func != "function") {
17
- throw new TypeError(FUNC_ERROR_TEXT);
18
- }
19
- wait = toNumber$1(wait) || 0;
20
- if (isObject$1(options)) {
21
- leading = !!options.leading;
22
- maxing = "maxWait" in options;
23
- maxWait = maxing ? nativeMax(toNumber$1(options.maxWait) || 0, wait) : maxWait;
24
- trailing = "trailing" in options ? !!options.trailing : trailing;
25
- }
26
- function invokeFunc(time) {
27
- var args = lastArgs, thisArg = lastThis;
28
- lastArgs = lastThis = void 0;
29
- lastInvokeTime = time;
30
- result = func.apply(thisArg, args);
31
- return result;
32
- }
33
- function leadingEdge(time) {
34
- lastInvokeTime = time;
35
- timerId = setTimeout(timerExpired, wait);
36
- return leading ? invokeFunc(time) : result;
37
- }
38
- function remainingWait(time) {
39
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
40
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
41
- }
42
- function shouldInvoke(time) {
43
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
44
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
45
- }
46
- function timerExpired() {
47
- var time = now$1();
48
- if (shouldInvoke(time)) {
49
- return trailingEdge(time);
50
- }
51
- timerId = setTimeout(timerExpired, remainingWait(time));
52
- }
53
- function trailingEdge(time) {
54
- timerId = void 0;
55
- if (trailing && lastArgs) {
56
- return invokeFunc(time);
57
- }
58
- lastArgs = lastThis = void 0;
59
- return result;
60
- }
61
- function cancel() {
62
- if (timerId !== void 0) {
63
- clearTimeout(timerId);
64
- }
65
- lastInvokeTime = 0;
66
- lastArgs = lastCallTime = lastThis = timerId = void 0;
67
- }
68
- function flush() {
69
- return timerId === void 0 ? result : trailingEdge(now$1());
70
- }
71
- function debounced() {
72
- var time = now$1(), isInvoking = shouldInvoke(time);
73
- lastArgs = arguments;
74
- lastThis = this;
75
- lastCallTime = time;
76
- if (isInvoking) {
77
- if (timerId === void 0) {
78
- return leadingEdge(lastCallTime);
79
- }
80
- if (maxing) {
81
- clearTimeout(timerId);
82
- timerId = setTimeout(timerExpired, wait);
83
- return invokeFunc(lastCallTime);
84
- }
85
- }
86
- if (timerId === void 0) {
87
- timerId = setTimeout(timerExpired, wait);
88
- }
89
- return result;
90
- }
91
- debounced.cancel = cancel;
92
- debounced.flush = flush;
93
- return debounced;
94
- }
95
- debounce_1 = debounce;
96
- return debounce_1;
97
- }
98
- exports.__require = requireDebounce;
3
+ const hasAdminRight = (adminRights, right) => {
4
+ if (!Array.isArray(adminRights)) return false;
5
+ return adminRights.includes(right);
6
+ };
7
+ const hasAnyAdminRight = (adminRights, rights) => {
8
+ if (!Array.isArray(adminRights)) return false;
9
+ return rights.some((right) => adminRights.includes(right));
10
+ };
11
+ exports.hasAdminRight = hasAdminRight;
12
+ exports.hasAnyAdminRight = hasAnyAdminRight;
99
13
  //# sourceMappingURL=harmony129.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony129.cjs","sources":["../node_modules/lodash/debounce.js"],"sourcesContent":["var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n"],"names":["isObject","require$$0","now","require$$1","toNumber","require$$2"],"mappings":";;;;;;;;;;AAAA,MAAIA,aAAWC,SAAAA,UAAqB,GAChCC,QAAMC,IAAAA,UAAgB,GACtBC,aAAWC,SAAAA,UAAqB;AAGpC,MAAI,kBAAkB;AAGtB,MAAI,YAAY,KAAK,KACjB,YAAY,KAAK;AAwDrB,WAAS,SAAS,MAAM,MAAM,SAAS;AACrC,QAAI,UACA,UACA,SACA,QACA,SACA,cACA,iBAAiB,GACjB,UAAU,OACV,SAAS,OACT,WAAW;AAEf,QAAI,OAAO,QAAQ,YAAY;AAC7B,YAAM,IAAI,UAAU,eAAe;AAAA,IACvC;AACE,WAAOD,WAAS,IAAI,KAAK;AACzB,QAAIJ,WAAS,OAAO,GAAG;AACrB,gBAAU,CAAC,CAAC,QAAQ;AACpB,eAAS,aAAa;AACtB,gBAAU,SAAS,UAAUI,WAAS,QAAQ,OAAO,KAAK,GAAG,IAAI,IAAI;AACrE,iBAAW,cAAc,UAAU,CAAC,CAAC,QAAQ,WAAW;AAAA,IAC5D;AAEE,aAAS,WAAW,MAAM;AACxB,UAAI,OAAO,UACP,UAAU;AAEd,iBAAW,WAAW;AACtB,uBAAiB;AACjB,eAAS,KAAK,MAAM,SAAS,IAAI;AACjC,aAAO;AAAA,IACX;AAEE,aAAS,YAAY,MAAM;AAEzB,uBAAiB;AAEjB,gBAAU,WAAW,cAAc,IAAI;AAEvC,aAAO,UAAU,WAAW,IAAI,IAAI;AAAA,IACxC;AAEE,aAAS,cAAc,MAAM;AAC3B,UAAI,oBAAoB,OAAO,cAC3B,sBAAsB,OAAO,gBAC7B,cAAc,OAAO;AAEzB,aAAO,SACH,UAAU,aAAa,UAAU,mBAAmB,IACpD;AAAA,IACR;AAEE,aAAS,aAAa,MAAM;AAC1B,UAAI,oBAAoB,OAAO,cAC3B,sBAAsB,OAAO;AAKjC,aAAQ,iBAAiB,UAAc,qBAAqB,QACzD,oBAAoB,KAAO,UAAU,uBAAuB;AAAA,IACnE;AAEE,aAAS,eAAe;AACtB,UAAI,OAAOF,MAAK;AAChB,UAAI,aAAa,IAAI,GAAG;AACtB,eAAO,aAAa,IAAI;AAAA,MAC9B;AAEI,gBAAU,WAAW,cAAc,cAAc,IAAI,CAAC;AAAA,IAC1D;AAEE,aAAS,aAAa,MAAM;AAC1B,gBAAU;AAIV,UAAI,YAAY,UAAU;AACxB,eAAO,WAAW,IAAI;AAAA,MAC5B;AACI,iBAAW,WAAW;AACtB,aAAO;AAAA,IACX;AAEE,aAAS,SAAS;AAChB,UAAI,YAAY,QAAW;AACzB,qBAAa,OAAO;AAAA,MAC1B;AACI,uBAAiB;AACjB,iBAAW,eAAe,WAAW,UAAU;AAAA,IACnD;AAEE,aAAS,QAAQ;AACf,aAAO,YAAY,SAAY,SAAS,aAAaA,MAAG,CAAE;AAAA,IAC9D;AAEE,aAAS,YAAY;AACnB,UAAI,OAAOA,MAAK,GACZ,aAAa,aAAa,IAAI;AAElC,iBAAW;AACX,iBAAW;AACX,qBAAe;AAEf,UAAI,YAAY;AACd,YAAI,YAAY,QAAW;AACzB,iBAAO,YAAY,YAAY;AAAA,QACvC;AACM,YAAI,QAAQ;AAEV,uBAAa,OAAO;AACpB,oBAAU,WAAW,cAAc,IAAI;AACvC,iBAAO,WAAW,YAAY;AAAA,QACtC;AAAA,MACA;AACI,UAAI,YAAY,QAAW;AACzB,kBAAU,WAAW,cAAc,IAAI;AAAA,MAC7C;AACI,aAAO;AAAA,IACX;AACE,cAAU,SAAS;AACnB,cAAU,QAAQ;AAClB,WAAO;AAAA,EACT;AAEA,eAAiB;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"harmony129.cjs","sources":["../src/features/auth/utils/permissions.ts"],"sourcesContent":["// Helper function to check if user has a specific admin right\nexport const hasAdminRight = (adminRights: string[], right: string): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn adminRights.includes(right)\n}\n\n// Helper function to check if user has any of the specified admin rights\nexport const hasAnyAdminRight = (adminRights: string[], rights: string[]): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn rights.some((right) => adminRights.includes(right))\n}\n"],"names":[],"mappings":";;AACa,MAAA,gBAAgB,CAAC,aAAuB,UAA2B;AAC/E,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACjC,SAAA,YAAY,SAAS,KAAK;AAClC;AAGa,MAAA,mBAAmB,CAAC,aAAuB,WAA8B;AACrF,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACxC,SAAO,OAAO,KAAK,CAAC,UAAU,YAAY,SAAS,KAAK,CAAC;AAC1D;;;"}
@@ -1,99 +1,13 @@
1
- import { __require as requireIsObject } from "./harmony130.mjs";
2
- import { __require as requireNow } from "./harmony131.mjs";
3
- import { __require as requireToNumber } from "./harmony132.mjs";
4
- var debounce_1;
5
- var hasRequiredDebounce;
6
- function requireDebounce() {
7
- if (hasRequiredDebounce) return debounce_1;
8
- hasRequiredDebounce = 1;
9
- var isObject = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
10
- var FUNC_ERROR_TEXT = "Expected a function";
11
- var nativeMax = Math.max, nativeMin = Math.min;
12
- function debounce(func, wait, options) {
13
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
14
- if (typeof func != "function") {
15
- throw new TypeError(FUNC_ERROR_TEXT);
16
- }
17
- wait = toNumber(wait) || 0;
18
- if (isObject(options)) {
19
- leading = !!options.leading;
20
- maxing = "maxWait" in options;
21
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
22
- trailing = "trailing" in options ? !!options.trailing : trailing;
23
- }
24
- function invokeFunc(time) {
25
- var args = lastArgs, thisArg = lastThis;
26
- lastArgs = lastThis = void 0;
27
- lastInvokeTime = time;
28
- result = func.apply(thisArg, args);
29
- return result;
30
- }
31
- function leadingEdge(time) {
32
- lastInvokeTime = time;
33
- timerId = setTimeout(timerExpired, wait);
34
- return leading ? invokeFunc(time) : result;
35
- }
36
- function remainingWait(time) {
37
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
38
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
39
- }
40
- function shouldInvoke(time) {
41
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
42
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
43
- }
44
- function timerExpired() {
45
- var time = now();
46
- if (shouldInvoke(time)) {
47
- return trailingEdge(time);
48
- }
49
- timerId = setTimeout(timerExpired, remainingWait(time));
50
- }
51
- function trailingEdge(time) {
52
- timerId = void 0;
53
- if (trailing && lastArgs) {
54
- return invokeFunc(time);
55
- }
56
- lastArgs = lastThis = void 0;
57
- return result;
58
- }
59
- function cancel() {
60
- if (timerId !== void 0) {
61
- clearTimeout(timerId);
62
- }
63
- lastInvokeTime = 0;
64
- lastArgs = lastCallTime = lastThis = timerId = void 0;
65
- }
66
- function flush() {
67
- return timerId === void 0 ? result : trailingEdge(now());
68
- }
69
- function debounced() {
70
- var time = now(), isInvoking = shouldInvoke(time);
71
- lastArgs = arguments;
72
- lastThis = this;
73
- lastCallTime = time;
74
- if (isInvoking) {
75
- if (timerId === void 0) {
76
- return leadingEdge(lastCallTime);
77
- }
78
- if (maxing) {
79
- clearTimeout(timerId);
80
- timerId = setTimeout(timerExpired, wait);
81
- return invokeFunc(lastCallTime);
82
- }
83
- }
84
- if (timerId === void 0) {
85
- timerId = setTimeout(timerExpired, wait);
86
- }
87
- return result;
88
- }
89
- debounced.cancel = cancel;
90
- debounced.flush = flush;
91
- return debounced;
92
- }
93
- debounce_1 = debounce;
94
- return debounce_1;
95
- }
1
+ const hasAdminRight = (adminRights, right) => {
2
+ if (!Array.isArray(adminRights)) return false;
3
+ return adminRights.includes(right);
4
+ };
5
+ const hasAnyAdminRight = (adminRights, rights) => {
6
+ if (!Array.isArray(adminRights)) return false;
7
+ return rights.some((right) => adminRights.includes(right));
8
+ };
96
9
  export {
97
- requireDebounce as __require
10
+ hasAdminRight,
11
+ hasAnyAdminRight
98
12
  };
99
13
  //# sourceMappingURL=harmony129.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony129.mjs","sources":["../node_modules/lodash/debounce.js"],"sourcesContent":["var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;AAAA,MAAI,WAAWA,gBAAqB,GAChC,MAAMC,WAAgB,GACtB,WAAWC,gBAAqB;AAGpC,MAAI,kBAAkB;AAGtB,MAAI,YAAY,KAAK,KACjB,YAAY,KAAK;AAwDrB,WAAS,SAAS,MAAM,MAAM,SAAS;AACrC,QAAI,UACA,UACA,SACA,QACA,SACA,cACA,iBAAiB,GACjB,UAAU,OACV,SAAS,OACT,WAAW;AAEf,QAAI,OAAO,QAAQ,YAAY;AAC7B,YAAM,IAAI,UAAU,eAAe;AAAA,IACvC;AACE,WAAO,SAAS,IAAI,KAAK;AACzB,QAAI,SAAS,OAAO,GAAG;AACrB,gBAAU,CAAC,CAAC,QAAQ;AACpB,eAAS,aAAa;AACtB,gBAAU,SAAS,UAAU,SAAS,QAAQ,OAAO,KAAK,GAAG,IAAI,IAAI;AACrE,iBAAW,cAAc,UAAU,CAAC,CAAC,QAAQ,WAAW;AAAA,IAC5D;AAEE,aAAS,WAAW,MAAM;AACxB,UAAI,OAAO,UACP,UAAU;AAEd,iBAAW,WAAW;AACtB,uBAAiB;AACjB,eAAS,KAAK,MAAM,SAAS,IAAI;AACjC,aAAO;AAAA,IACX;AAEE,aAAS,YAAY,MAAM;AAEzB,uBAAiB;AAEjB,gBAAU,WAAW,cAAc,IAAI;AAEvC,aAAO,UAAU,WAAW,IAAI,IAAI;AAAA,IACxC;AAEE,aAAS,cAAc,MAAM;AAC3B,UAAI,oBAAoB,OAAO,cAC3B,sBAAsB,OAAO,gBAC7B,cAAc,OAAO;AAEzB,aAAO,SACH,UAAU,aAAa,UAAU,mBAAmB,IACpD;AAAA,IACR;AAEE,aAAS,aAAa,MAAM;AAC1B,UAAI,oBAAoB,OAAO,cAC3B,sBAAsB,OAAO;AAKjC,aAAQ,iBAAiB,UAAc,qBAAqB,QACzD,oBAAoB,KAAO,UAAU,uBAAuB;AAAA,IACnE;AAEE,aAAS,eAAe;AACtB,UAAI,OAAO,IAAK;AAChB,UAAI,aAAa,IAAI,GAAG;AACtB,eAAO,aAAa,IAAI;AAAA,MAC9B;AAEI,gBAAU,WAAW,cAAc,cAAc,IAAI,CAAC;AAAA,IAC1D;AAEE,aAAS,aAAa,MAAM;AAC1B,gBAAU;AAIV,UAAI,YAAY,UAAU;AACxB,eAAO,WAAW,IAAI;AAAA,MAC5B;AACI,iBAAW,WAAW;AACtB,aAAO;AAAA,IACX;AAEE,aAAS,SAAS;AAChB,UAAI,YAAY,QAAW;AACzB,qBAAa,OAAO;AAAA,MAC1B;AACI,uBAAiB;AACjB,iBAAW,eAAe,WAAW,UAAU;AAAA,IACnD;AAEE,aAAS,QAAQ;AACf,aAAO,YAAY,SAAY,SAAS,aAAa,IAAG,CAAE;AAAA,IAC9D;AAEE,aAAS,YAAY;AACnB,UAAI,OAAO,IAAK,GACZ,aAAa,aAAa,IAAI;AAElC,iBAAW;AACX,iBAAW;AACX,qBAAe;AAEf,UAAI,YAAY;AACd,YAAI,YAAY,QAAW;AACzB,iBAAO,YAAY,YAAY;AAAA,QACvC;AACM,YAAI,QAAQ;AAEV,uBAAa,OAAO;AACpB,oBAAU,WAAW,cAAc,IAAI;AACvC,iBAAO,WAAW,YAAY;AAAA,QACtC;AAAA,MACA;AACI,UAAI,YAAY,QAAW;AACzB,kBAAU,WAAW,cAAc,IAAI;AAAA,MAC7C;AACI,aAAO;AAAA,IACX;AACE,cAAU,SAAS;AACnB,cAAU,QAAQ;AAClB,WAAO;AAAA,EACT;AAEA,eAAiB;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"harmony129.mjs","sources":["../src/features/auth/utils/permissions.ts"],"sourcesContent":["// Helper function to check if user has a specific admin right\nexport const hasAdminRight = (adminRights: string[], right: string): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn adminRights.includes(right)\n}\n\n// Helper function to check if user has any of the specified admin rights\nexport const hasAnyAdminRight = (adminRights: string[], rights: string[]): boolean => {\n\tif (!Array.isArray(adminRights)) return false\n\treturn rights.some((right) => adminRights.includes(right))\n}\n"],"names":[],"mappings":"AACa,MAAA,gBAAgB,CAAC,aAAuB,UAA2B;AAC/E,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACjC,SAAA,YAAY,SAAS,KAAK;AAClC;AAGa,MAAA,mBAAmB,CAAC,aAAuB,WAA8B;AACrF,MAAI,CAAC,MAAM,QAAQ,WAAW,EAAU,QAAA;AACxC,SAAO,OAAO,KAAK,CAAC,UAAU,YAAY,SAAS,KAAK,CAAC;AAC1D;"}