@northern.tech/store 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/actions.js +251 -135
  2. package/dist/actions.js.map +1 -1
  3. package/dist/actions.mjs +13 -13
  4. package/dist/api/general-api.js +102 -51
  5. package/dist/api/general-api.js.map +1 -1
  6. package/dist/api/general-api.mjs +6 -6
  7. package/dist/api/users-api.js +104 -66
  8. package/dist/api/users-api.js.map +1 -1
  9. package/dist/api/users-api.mjs +7 -7
  10. package/dist/appSlice/constants.js +1 -39
  11. package/dist/appSlice/constants.js.map +1 -1
  12. package/dist/appSlice/constants.mjs +2 -2
  13. package/dist/appSlice/index.js +111 -64
  14. package/dist/appSlice/index.js.map +1 -1
  15. package/dist/appSlice/index.mjs +5 -5
  16. package/dist/appSlice/selectors.js +1 -43
  17. package/dist/appSlice/selectors.js.map +1 -1
  18. package/dist/appSlice/selectors.mjs +2 -2
  19. package/dist/appSlice/thunks.js +649 -552
  20. package/dist/appSlice/thunks.js.map +1 -1
  21. package/dist/appSlice/thunks.mjs +28 -28
  22. package/dist/auth.js +99 -51
  23. package/dist/auth.js.map +1 -1
  24. package/dist/auth.mjs +5 -5
  25. package/dist/{chunk-C2YZYTJ6.mjs → chunk-2Z3RFYW4.mjs} +2 -11
  26. package/dist/{chunk-C2YZYTJ6.mjs.map → chunk-2Z3RFYW4.mjs.map} +1 -1
  27. package/dist/{chunk-F37LUTBX.mjs → chunk-3ORTTLIB.mjs} +19 -16
  28. package/dist/{chunk-F37LUTBX.mjs.map → chunk-3ORTTLIB.mjs.map} +1 -1
  29. package/dist/{chunk-7E7KJHY3.mjs → chunk-4SDUITD4.mjs} +6 -12
  30. package/dist/{chunk-7E7KJHY3.mjs.map → chunk-4SDUITD4.mjs.map} +1 -1
  31. package/dist/{chunk-BOSBROA3.mjs → chunk-5VNQCCAQ.mjs} +2 -7
  32. package/dist/{chunk-BOSBROA3.mjs.map → chunk-5VNQCCAQ.mjs.map} +1 -1
  33. package/dist/{chunk-R2GBNXLV.mjs → chunk-65YIOCCD.mjs} +6 -11
  34. package/dist/{chunk-R2GBNXLV.mjs.map → chunk-65YIOCCD.mjs.map} +1 -1
  35. package/dist/{chunk-ZIYGEXSJ.mjs → chunk-6CSGHZ3E.mjs} +9 -21
  36. package/dist/{chunk-ZIYGEXSJ.mjs.map → chunk-6CSGHZ3E.mjs.map} +1 -1
  37. package/dist/{chunk-HRWZJQMH.mjs → chunk-AZRVRNXT.mjs} +40 -30
  38. package/dist/{chunk-HRWZJQMH.mjs.map → chunk-AZRVRNXT.mjs.map} +1 -1
  39. package/dist/{chunk-M4U5R7A4.mjs → chunk-B42NUKMZ.mjs} +2 -6
  40. package/dist/{chunk-M4U5R7A4.mjs.map → chunk-B42NUKMZ.mjs.map} +1 -1
  41. package/dist/{chunk-DZBVTSIX.mjs → chunk-CHUCIHMY.mjs} +3 -4
  42. package/dist/{chunk-DZBVTSIX.mjs.map → chunk-CHUCIHMY.mjs.map} +1 -1
  43. package/dist/{chunk-YNVSU3AA.mjs → chunk-DIZJVB6M.mjs} +307 -292
  44. package/dist/chunk-DIZJVB6M.mjs.map +1 -0
  45. package/dist/chunk-H5UCKQWK.mjs +41 -0
  46. package/dist/{chunk-IPPIKGIB.mjs.map → chunk-H5UCKQWK.mjs.map} +1 -1
  47. package/dist/{chunk-ZNST5R6O.mjs → chunk-IFWKT27G.mjs} +92 -29
  48. package/dist/chunk-IFWKT27G.mjs.map +1 -0
  49. package/dist/{chunk-6667TCAJ.mjs → chunk-JA27QXVB.mjs} +37 -28
  50. package/dist/{chunk-6667TCAJ.mjs.map → chunk-JA27QXVB.mjs.map} +1 -1
  51. package/dist/{chunk-HVHZG2H4.mjs → chunk-K2NZL5V4.mjs} +4 -7
  52. package/dist/chunk-K2NZL5V4.mjs.map +1 -0
  53. package/dist/{chunk-RQOE5OOT.mjs → chunk-KJAZNKV2.mjs} +66 -55
  54. package/dist/chunk-KJAZNKV2.mjs.map +1 -0
  55. package/dist/{chunk-G32LAKW4.mjs → chunk-KPPU6OWF.mjs} +27 -39
  56. package/dist/{chunk-G32LAKW4.mjs.map → chunk-KPPU6OWF.mjs.map} +1 -1
  57. package/dist/{chunk-BJSH2G7W.mjs → chunk-KZSTW27Q.mjs} +30 -18
  58. package/dist/{chunk-BJSH2G7W.mjs.map → chunk-KZSTW27Q.mjs.map} +1 -1
  59. package/dist/chunk-LZOMFHX3.mjs +38 -0
  60. package/dist/{chunk-XYVPYFSM.mjs → chunk-NJNSCJEY.mjs} +22 -26
  61. package/dist/{chunk-XYVPYFSM.mjs.map → chunk-NJNSCJEY.mjs.map} +1 -1
  62. package/dist/{chunk-N7G6QK2E.mjs → chunk-O6TYYKSD.mjs} +62 -60
  63. package/dist/chunk-O6TYYKSD.mjs.map +1 -0
  64. package/dist/{chunk-G3I53JGW.mjs → chunk-QQBUNZHA.mjs} +3 -6
  65. package/dist/{chunk-G3I53JGW.mjs.map → chunk-QQBUNZHA.mjs.map} +1 -1
  66. package/dist/{chunk-TD45YTYK.mjs → chunk-R7LXL3KJ.mjs} +22 -23
  67. package/dist/chunk-R7LXL3KJ.mjs.map +1 -0
  68. package/dist/{chunk-G7LATUT6.mjs → chunk-WCUGLHYM.mjs} +16 -20
  69. package/dist/{chunk-G7LATUT6.mjs.map → chunk-WCUGLHYM.mjs.map} +1 -1
  70. package/dist/chunk-WYHJFSMQ.mjs +25 -0
  71. package/dist/{chunk-IVSYYXTC.mjs.map → chunk-WYHJFSMQ.mjs.map} +1 -1
  72. package/dist/{chunk-O6O3D52B.mjs → chunk-XC5UXEIB.mjs} +4 -11
  73. package/dist/{chunk-O6O3D52B.mjs.map → chunk-XC5UXEIB.mjs.map} +1 -1
  74. package/dist/{chunk-BRHSKNFC.mjs → chunk-XD7INCM4.mjs} +11 -17
  75. package/dist/{chunk-BRHSKNFC.mjs.map → chunk-XD7INCM4.mjs.map} +1 -1
  76. package/dist/{chunk-RH6ONMG7.mjs → chunk-ZE7R2XXE.mjs} +10 -12
  77. package/dist/{chunk-RH6ONMG7.mjs.map → chunk-ZE7R2XXE.mjs.map} +1 -1
  78. package/dist/{chunk-HXPYJ6QN.mjs → chunk-ZK4W5T53.mjs} +7 -11
  79. package/dist/{chunk-HXPYJ6QN.mjs.map → chunk-ZK4W5T53.mjs.map} +1 -1
  80. package/dist/commonConstants.d.mts +18 -19
  81. package/dist/commonConstants.d.ts +18 -19
  82. package/dist/commonConstants.js +2 -35
  83. package/dist/commonConstants.js.map +1 -1
  84. package/dist/commonConstants.mjs +2 -2
  85. package/dist/commonSelectors.d.mts +42 -1
  86. package/dist/commonSelectors.d.ts +42 -1
  87. package/dist/commonSelectors.js +149 -129
  88. package/dist/commonSelectors.js.map +1 -1
  89. package/dist/commonSelectors.mjs +14 -12
  90. package/dist/constants.d.mts +3 -3
  91. package/dist/constants.d.ts +3 -3
  92. package/dist/constants.js +92 -147
  93. package/dist/constants.js.map +1 -1
  94. package/dist/constants.mjs +18 -14
  95. package/dist/deploymentsSlice/constants.js +94 -55
  96. package/dist/deploymentsSlice/constants.js.map +1 -1
  97. package/dist/deploymentsSlice/constants.mjs +4 -4
  98. package/dist/deploymentsSlice/index.js +128 -75
  99. package/dist/deploymentsSlice/index.js.map +1 -1
  100. package/dist/deploymentsSlice/index.mjs +5 -5
  101. package/dist/deploymentsSlice/selectors.js +95 -48
  102. package/dist/deploymentsSlice/selectors.js.map +1 -1
  103. package/dist/deploymentsSlice/selectors.mjs +5 -5
  104. package/dist/deploymentsSlice/thunks.js +649 -561
  105. package/dist/deploymentsSlice/thunks.js.map +1 -1
  106. package/dist/deploymentsSlice/thunks.mjs +28 -28
  107. package/dist/devicesSlice/constants.js +94 -54
  108. package/dist/devicesSlice/constants.js.map +1 -1
  109. package/dist/devicesSlice/constants.mjs +4 -4
  110. package/dist/devicesSlice/index.js +131 -77
  111. package/dist/devicesSlice/index.js.map +1 -1
  112. package/dist/devicesSlice/index.mjs +5 -5
  113. package/dist/devicesSlice/selectors.js +100 -85
  114. package/dist/devicesSlice/selectors.js.map +1 -1
  115. package/dist/devicesSlice/selectors.mjs +5 -5
  116. package/dist/devicesSlice/thunks.js +649 -597
  117. package/dist/devicesSlice/thunks.js.map +1 -1
  118. package/dist/devicesSlice/thunks.mjs +28 -28
  119. package/dist/monitorSlice/constants.js +94 -41
  120. package/dist/monitorSlice/constants.js.map +1 -1
  121. package/dist/monitorSlice/constants.mjs +4 -4
  122. package/dist/monitorSlice/index.js +101 -48
  123. package/dist/monitorSlice/index.js.map +1 -1
  124. package/dist/monitorSlice/index.mjs +5 -5
  125. package/dist/monitorSlice/selectors.js +0 -4
  126. package/dist/monitorSlice/selectors.mjs +1 -1
  127. package/dist/monitorSlice/thunks.js +333 -238
  128. package/dist/monitorSlice/thunks.js.map +1 -1
  129. package/dist/monitorSlice/thunks.mjs +25 -25
  130. package/dist/onboardingSlice/constants.js +0 -5
  131. package/dist/onboardingSlice/constants.mjs +1 -1
  132. package/dist/onboardingSlice/index.js +1 -22
  133. package/dist/onboardingSlice/index.js.map +1 -1
  134. package/dist/onboardingSlice/index.mjs +2 -2
  135. package/dist/onboardingSlice/selectors.js +0 -4
  136. package/dist/onboardingSlice/selectors.mjs +1 -1
  137. package/dist/onboardingSlice/thunks.js +649 -555
  138. package/dist/onboardingSlice/thunks.js.map +1 -1
  139. package/dist/onboardingSlice/thunks.mjs +28 -28
  140. package/dist/organizationSlice/constants.d.mts +6 -1
  141. package/dist/organizationSlice/constants.d.ts +6 -1
  142. package/dist/organizationSlice/constants.js +89 -51
  143. package/dist/organizationSlice/constants.js.map +1 -1
  144. package/dist/organizationSlice/constants.mjs +6 -4
  145. package/dist/organizationSlice/index.d.mts +224 -246
  146. package/dist/organizationSlice/index.d.ts +224 -246
  147. package/dist/organizationSlice/index.js +113 -59
  148. package/dist/organizationSlice/index.js.map +1 -1
  149. package/dist/organizationSlice/index.mjs +5 -5
  150. package/dist/organizationSlice/selectors.js +96 -58
  151. package/dist/organizationSlice/selectors.js.map +1 -1
  152. package/dist/organizationSlice/selectors.mjs +5 -5
  153. package/dist/organizationSlice/thunks.js +649 -580
  154. package/dist/organizationSlice/thunks.js.map +1 -1
  155. package/dist/organizationSlice/thunks.mjs +28 -28
  156. package/dist/releasesSlice/constants.js +0 -7
  157. package/dist/releasesSlice/constants.mjs +1 -1
  158. package/dist/releasesSlice/index.js +98 -60
  159. package/dist/releasesSlice/index.js.map +1 -1
  160. package/dist/releasesSlice/index.mjs +5 -5
  161. package/dist/releasesSlice/selectors.js +97 -53
  162. package/dist/releasesSlice/selectors.js.map +1 -1
  163. package/dist/releasesSlice/selectors.mjs +6 -6
  164. package/dist/releasesSlice/thunks.js +377 -287
  165. package/dist/releasesSlice/thunks.js.map +1 -1
  166. package/dist/releasesSlice/thunks.mjs +25 -25
  167. package/dist/selectors.d.mts +1 -1
  168. package/dist/selectors.d.ts +1 -1
  169. package/dist/selectors.js +150 -202
  170. package/dist/selectors.js.map +1 -1
  171. package/dist/selectors.mjs +45 -43
  172. package/dist/store.d.mts +235 -135
  173. package/dist/store.d.ts +235 -135
  174. package/dist/store.js +262 -157
  175. package/dist/store.js.map +1 -1
  176. package/dist/store.mjs +16 -16
  177. package/dist/storehooks.d.mts +3 -1
  178. package/dist/storehooks.d.ts +3 -1
  179. package/dist/storehooks.js +686 -569
  180. package/dist/storehooks.js.map +1 -1
  181. package/dist/storehooks.mjs +71 -54
  182. package/dist/storehooks.mjs.map +1 -1
  183. package/dist/thunks.js +649 -710
  184. package/dist/thunks.js.map +1 -1
  185. package/dist/thunks.mjs +28 -28
  186. package/dist/usersSlice/constants.d.mts +192 -17
  187. package/dist/usersSlice/constants.d.ts +192 -17
  188. package/dist/usersSlice/constants.js +97 -61
  189. package/dist/usersSlice/constants.js.map +1 -1
  190. package/dist/usersSlice/constants.mjs +6 -4
  191. package/dist/usersSlice/index.d.mts +1628 -704
  192. package/dist/usersSlice/index.d.ts +1628 -704
  193. package/dist/usersSlice/index.js +122 -67
  194. package/dist/usersSlice/index.js.map +1 -1
  195. package/dist/usersSlice/index.mjs +5 -5
  196. package/dist/usersSlice/selectors.js +101 -62
  197. package/dist/usersSlice/selectors.js.map +1 -1
  198. package/dist/usersSlice/selectors.mjs +6 -6
  199. package/dist/usersSlice/thunks.js +649 -584
  200. package/dist/usersSlice/thunks.js.map +1 -1
  201. package/dist/usersSlice/thunks.mjs +28 -28
  202. package/dist/utils.d.mts +6 -5
  203. package/dist/utils.d.ts +6 -5
  204. package/dist/utils.js +117 -89
  205. package/dist/utils.js.map +1 -1
  206. package/dist/utils.mjs +5 -5
  207. package/package.json +66 -1
  208. package/dist/chunk-HVHZG2H4.mjs.map +0 -1
  209. package/dist/chunk-IPPIKGIB.mjs +0 -35
  210. package/dist/chunk-IVSYYXTC.mjs +0 -36
  211. package/dist/chunk-N7G6QK2E.mjs.map +0 -1
  212. package/dist/chunk-RQOE5OOT.mjs.map +0 -1
  213. package/dist/chunk-TD45YTYK.mjs.map +0 -1
  214. package/dist/chunk-XWBD7VOK.mjs +0 -93
  215. package/dist/chunk-YNVSU3AA.mjs.map +0 -1
  216. package/dist/chunk-ZNST5R6O.mjs.map +0 -1
  217. /package/dist/{chunk-XWBD7VOK.mjs.map → chunk-LZOMFHX3.mjs.map} +0 -0
package/dist/thunks.js CHANGED
@@ -1,40 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __restKey = (key) => typeof key === "symbol" ? key : key + "";
26
- var __objRest = (source, exclude) => {
27
- var target = {};
28
- for (var prop in source)
29
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
- target[prop] = source[prop];
31
- if (source != null && __getOwnPropSymbols)
32
- for (var prop of __getOwnPropSymbols(source)) {
33
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
- target[prop] = source[prop];
35
- }
36
- return target;
37
- };
38
8
  var __commonJS = (cb, mod) => function __require() {
39
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
40
10
  };
@@ -59,33 +29,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
59
29
  mod
60
30
  ));
61
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
62
- var __async = (__this, __arguments, generator) => {
63
- return new Promise((resolve, reject) => {
64
- var fulfilled = (value) => {
65
- try {
66
- step(generator.next(value));
67
- } catch (e) {
68
- reject(e);
69
- }
70
- };
71
- var rejected = (value) => {
72
- try {
73
- step(generator.throw(value));
74
- } catch (e) {
75
- reject(e);
76
- }
77
- };
78
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
79
- step((generator = generator.apply(__this, __arguments)).next());
80
- });
81
- };
82
32
 
83
33
  // ../../node_modules/pluralize/pluralize.js
84
34
  var require_pluralize = __commonJS({
85
- "../../node_modules/pluralize/pluralize.js"(exports2, module2) {
35
+ "../../node_modules/pluralize/pluralize.js"(exports, module2) {
86
36
  "use strict";
87
37
  (function(root, pluralize2) {
88
- if (typeof require === "function" && typeof exports2 === "object" && typeof module2 === "object") {
38
+ if (typeof require === "function" && typeof exports === "object" && typeof module2 === "object") {
89
39
  module2.exports = pluralize2();
90
40
  } else if (typeof define === "function" && define.amd) {
91
41
  define(function() {
@@ -94,7 +44,7 @@ var require_pluralize = __commonJS({
94
44
  } else {
95
45
  root.pluralize = pluralize2();
96
46
  }
97
- })(exports2, function() {
47
+ })(exports, function() {
98
48
  var pluralRules = [];
99
49
  var singularRules = [];
100
50
  var uncountables = {};
@@ -628,7 +578,7 @@ var chartTypes = {
628
578
  };
629
579
  var emptyChartSelection = { software: "", group: "", chartType: chartTypes.bar.key, attribute: "artifact_name" };
630
580
  var defaultReportType = "distribution";
631
- var defaultReports = [__spreadProps(__spreadValues({}, emptyChartSelection), { group: null, attribute: "artifact_name", type: defaultReportType })];
581
+ var defaultReports = [{ ...emptyChartSelection, group: null, attribute: "artifact_name", type: defaultReportType }];
632
582
  var locations = {};
633
583
  var PLANS = {
634
584
  os: {
@@ -954,13 +904,14 @@ var emptyUiPermissions = Object.freeze({
954
904
  deployments: [],
955
905
  groups: Object.freeze({}),
956
906
  releases: Object.freeze({}),
907
+ tenantManagement: [],
957
908
  userManagement: []
958
909
  });
959
910
  var emptyRole = Object.freeze({
960
911
  name: void 0,
961
912
  description: "",
962
913
  permissions: [],
963
- uiPermissions: Object.freeze(__spreadValues({}, emptyUiPermissions))
914
+ uiPermissions: Object.freeze({ ...emptyUiPermissions })
964
915
  });
965
916
 
966
917
  // src/deploymentsSlice/constants.ts
@@ -989,11 +940,12 @@ var deploymentStatesToSubstates = {
989
940
  pending: [deploymentSubstates.pending],
990
941
  successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact]
991
942
  };
992
- var deploymentStatesToSubstatesWithSkipped = __spreadProps(__spreadValues({}, deploymentStatesToSubstates), {
943
+ var deploymentStatesToSubstatesWithSkipped = {
944
+ ...deploymentStatesToSubstates,
993
945
  failures: [deploymentSubstates.failure],
994
946
  skipped: [deploymentSubstates.aborted, deploymentSubstates.noartifact, deploymentSubstates.alreadyInstalled, deploymentSubstates.decommissioned],
995
947
  successes: [deploymentSubstates.success]
996
- });
948
+ };
997
949
  var installationSubstatesMap = {
998
950
  download: {
999
951
  title: "download",
@@ -1038,8 +990,8 @@ var DEPLOYMENT_STATES = {
1038
990
  var listDefaultsByState = {
1039
991
  [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
1040
992
  [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
1041
- [DEPLOYMENT_STATES.scheduled]: __spreadValues({}, DEVICE_LIST_DEFAULTS),
1042
- [DEPLOYMENT_STATES.finished]: __spreadValues({}, DEVICE_LIST_DEFAULTS),
993
+ [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
994
+ [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
1043
995
  sort: { direction: SORTING_OPTIONS.desc }
1044
996
  };
1045
997
  var DEFAULT_PENDING_INPROGRESS_COUNT = 10;
@@ -1201,6 +1153,13 @@ var SSO_TYPES = {
1201
1153
  configDetails: [{ key: "startURL", label: "Start Url", getValue: getOidcStartUrl }]
1202
1154
  }
1203
1155
  };
1156
+ var AUDIT_LOGS_TYPES = [
1157
+ { title: "Artifact", queryParameter: "object_type", value: "artifact" },
1158
+ { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
1159
+ { title: "Device", queryParameter: "object_id", value: "device" },
1160
+ { title: "User", queryParameter: "object_id", value: "user" }
1161
+ ];
1162
+ var SP_AUDIT_LOGS_TYPES = [AUDIT_LOGS_TYPES[3], { title: "Tenant", queryParameter: "object_id", value: "tenant" }];
1204
1163
  var emptyWebhook = {
1205
1164
  description: "",
1206
1165
  enabled: true,
@@ -1249,10 +1208,12 @@ var permissionSetIds = {
1249
1208
  DeployToDevices: "DeployToDevices",
1250
1209
  ManageDevices: "ManageDevices",
1251
1210
  ManageReleases: "ManageReleases",
1211
+ ManageTenants: "ManageTenants",
1252
1212
  ManageUsers: "ManageUsers",
1253
1213
  ReadAuditLogs: "ReadAuditLogs",
1254
1214
  ReadDevices: "ReadDevices",
1255
1215
  ReadReleases: "ReadReleases",
1216
+ ReadTenants: "ReadTenants",
1256
1217
  ReadUsers: "ReadUsers",
1257
1218
  SuperUser: "SuperUser",
1258
1219
  UploadArtifacts: "UploadArtifacts"
@@ -1291,6 +1252,7 @@ var uiPermissionsById = {
1291
1252
  permissionSets: {
1292
1253
  groups: permissionSetIds.ManageDevices,
1293
1254
  releases: permissionSetIds.ManageReleases,
1255
+ tenantManagement: permissionSetIds.ManageTenants,
1294
1256
  userManagement: permissionSetIds.ManageUsers
1295
1257
  },
1296
1258
  title: "Manage",
@@ -1304,6 +1266,7 @@ var uiPermissionsById = {
1304
1266
  auditlog: permissionSetIds.ReadAuditLogs,
1305
1267
  groups: permissionSetIds.ReadDevices,
1306
1268
  releases: permissionSetIds.ReadReleases,
1269
+ tenantManagement: permissionSetIds.ReadTenants,
1307
1270
  userManagement: permissionSetIds.ReadUsers
1308
1271
  },
1309
1272
  title: "Read",
@@ -1328,6 +1291,7 @@ var uiPermissionsByArea = {
1328
1291
  auditlog: {
1329
1292
  endpoints: [{ path: /\/(auditlog)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] }],
1330
1293
  explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
1294
+ key: "auditlog",
1331
1295
  uiPermissions: [uiPermissionsById.read],
1332
1296
  title: "System audit log"
1333
1297
  },
@@ -1338,6 +1302,7 @@ var uiPermissionsByArea = {
1338
1302
  { path: /\/(deployments\/config)/i, types: [PermissionTypes.Get, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] }
1339
1303
  ],
1340
1304
  explanation: "Providing deploy permissions will allow deployments to be created using the releases and devices a user has access to.",
1305
+ key: "deployments",
1341
1306
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.deploy],
1342
1307
  title: "Deployments"
1343
1308
  },
@@ -1353,6 +1318,7 @@ var uiPermissionsByArea = {
1353
1318
  { path: /\/(deviceconnect\/devices)/i, types: [PermissionTypes.Get, PermissionTypes.Post], uiPermissions: [uiPermissionsById.connect] }
1354
1319
  ],
1355
1320
  explanation: "Device group management permissions control the degree to which devices in a group can be accessed and moved to other groups.",
1321
+ key: "groups",
1356
1322
  scope: scopedPermissionAreas.groups.scopeType,
1357
1323
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.deploy, uiPermissionsById.configure, uiPermissionsById.connect],
1358
1324
  title: "Group Management"
@@ -1372,22 +1338,35 @@ var uiPermissionsByArea = {
1372
1338
  }
1373
1339
  ],
1374
1340
  explanation: "Release permissions can be granted to allow artifact & release modifications, as well as the creation of new releases.",
1341
+ key: "releases",
1375
1342
  scope: "ReleaseTags",
1376
1343
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.upload],
1377
1344
  title: "Release Management"
1378
1345
  },
1346
+ tenantManagement: {
1347
+ endpoints: [
1348
+ { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
1349
+ { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] },
1350
+ { path: /\/(users\/exists)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.manage] }
1351
+ ],
1352
+ explanation: "Tenant management permissions allow listing, creating and modifying child tenants",
1353
+ key: "tenantManagement",
1354
+ uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
1355
+ title: "Tenant Management"
1356
+ },
1379
1357
  userManagement: {
1380
1358
  endpoints: [
1381
1359
  { path: /\/(useradm)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
1382
1360
  { path: /\/(useradm)/i, types: [PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] }
1383
1361
  ],
1384
1362
  explanation: "User management permissions should be granted carefully, as these allow privilege increases for any users managed by a user with user management permissions",
1363
+ key: "userManagement",
1385
1364
  uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
1386
1365
  title: "User Management"
1387
1366
  }
1388
1367
  };
1389
1368
  var permissionMapper = (permission) => permission.value;
1390
- var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? __spreadProps(__spreadValues({}, accu), { [item]: uiPermissions }) : accu;
1369
+ var itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? { ...accu, [item]: uiPermissions } : accu;
1391
1370
  var rolesById = Object.freeze({
1392
1371
  [staticRolesByName.admin]: {
1393
1372
  name: "Admin",
@@ -1395,56 +1374,87 @@ var rolesById = Object.freeze({
1395
1374
  description: "Full access",
1396
1375
  permissions: [],
1397
1376
  // permissions refers to the values returned from the backend
1398
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1377
+ uiPermissions: {
1378
+ ...emptyUiPermissions,
1399
1379
  auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
1400
1380
  deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
1401
1381
  groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },
1402
1382
  releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },
1403
1383
  userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)
1404
- })
1384
+ }
1405
1385
  },
1406
1386
  [staticRolesByName.readOnly]: {
1407
1387
  name: "Read Access",
1408
1388
  value: staticRolesByName.readOnly,
1409
1389
  description: "",
1410
1390
  permissions: [],
1411
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1391
+ uiPermissions: {
1392
+ ...emptyUiPermissions,
1412
1393
  deployments: [uiPermissionsById.read.value],
1413
1394
  groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },
1414
1395
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },
1415
1396
  userManagement: [uiPermissionsById.read.value]
1416
- })
1397
+ }
1417
1398
  },
1418
1399
  [staticRolesByName.ci]: {
1419
1400
  name: "Releases Manager",
1420
1401
  value: staticRolesByName.ci,
1421
1402
  description: "",
1422
1403
  permissions: [],
1423
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1404
+ uiPermissions: {
1405
+ ...emptyUiPermissions,
1424
1406
  releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }
1425
- })
1407
+ }
1426
1408
  },
1427
1409
  [staticRolesByName.deploymentsManager]: {
1428
1410
  name: "Deployments Manager",
1429
1411
  value: staticRolesByName.deploymentsManager,
1430
1412
  description: "",
1431
1413
  permissions: [],
1432
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1414
+ uiPermissions: {
1415
+ ...emptyUiPermissions,
1433
1416
  deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
1434
1417
  groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },
1435
1418
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
1436
- })
1419
+ }
1437
1420
  },
1438
1421
  [staticRolesByName.terminalAccess]: {
1439
1422
  name: "Troubleshooting",
1440
1423
  value: staticRolesByName.terminalAccess,
1441
1424
  description: "Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding",
1442
1425
  permissions: [],
1443
- uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), {
1426
+ uiPermissions: {
1427
+ ...emptyUiPermissions,
1444
1428
  groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }
1445
- })
1429
+ }
1446
1430
  }
1447
1431
  });
1432
+ var serviceProviderRolesById = {
1433
+ admin: {
1434
+ name: "Admin",
1435
+ value: staticRolesByName.admin,
1436
+ description: "Full access",
1437
+ permissions: [],
1438
+ uiPermissions: {
1439
+ ...emptyUiPermissions,
1440
+ auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
1441
+ userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),
1442
+ tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)
1443
+ }
1444
+ },
1445
+ readOnly: {
1446
+ name: "Read access",
1447
+ value: staticRolesByName.admin,
1448
+ description: "This role can see all linked organizations but cannot make any changes",
1449
+ permissions: [],
1450
+ uiPermissions: {
1451
+ ...emptyUiPermissions,
1452
+ auditlog: [uiPermissionsById.read.value],
1453
+ userManagement: [uiPermissionsById.read.value],
1454
+ tenantManagement: [uiPermissionsById.read.value]
1455
+ }
1456
+ }
1457
+ };
1448
1458
  var defaultPermissionSets = {
1449
1459
  [permissionSetIds.Basic]: {
1450
1460
  name: permissionSetIds.Basic,
@@ -1455,7 +1465,9 @@ var defaultPermissionSets = {
1455
1465
  },
1456
1466
  [permissionSetIds.SuperUser]: {
1457
1467
  name: permissionSetIds.SuperUser,
1458
- result: __spreadValues({}, rolesById[staticRolesByName.admin].uiPermissions)
1468
+ result: {
1469
+ ...rolesById[staticRolesByName.admin].uiPermissions
1470
+ }
1459
1471
  },
1460
1472
  [permissionSetIds.ManageUsers]: {
1461
1473
  name: permissionSetIds.ManageUsers,
@@ -1475,6 +1487,18 @@ var defaultPermissionSets = {
1475
1487
  releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
1476
1488
  }
1477
1489
  },
1490
+ [permissionSetIds.ReadTenants]: {
1491
+ name: permissionSetIds.ReadTenants,
1492
+ result: {
1493
+ tenantManagement: [uiPermissionsById.read.value]
1494
+ }
1495
+ },
1496
+ [permissionSetIds.ManageTenants]: {
1497
+ name: permissionSetIds.ManageTenants,
1498
+ result: {
1499
+ tenantManagement: [uiPermissionsById.manage.value]
1500
+ }
1501
+ },
1478
1502
  [permissionSetIds.ReadUsers]: {
1479
1503
  name: permissionSetIds.ReadUsers,
1480
1504
  result: {
@@ -1528,11 +1552,12 @@ var defaultPermissionSets = {
1528
1552
  };
1529
1553
  var USER_LOGOUT = "USER_LOGOUT";
1530
1554
  var OWN_USER_ID = "me";
1531
- var rolesByName = __spreadProps(__spreadValues({}, staticRolesByName), {
1555
+ var rolesByName = {
1556
+ ...staticRolesByName,
1532
1557
  deploymentCreation: { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: void 0 } },
1533
1558
  groupAccess: { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: void 0 } },
1534
1559
  userManagement: { action: "http", object: { type: "any", value: `${useradmApiUrlv1}/.*` } }
1535
- });
1560
+ };
1536
1561
  var twoFAStates = {
1537
1562
  enabled: "enabled",
1538
1563
  disabled: "disabled",
@@ -1550,18 +1575,17 @@ var cookies = new import_universal_cookie.default();
1550
1575
  var emptySession = Object.freeze({ token: "", exiresAt: void 0 });
1551
1576
  var tokenCache = "";
1552
1577
  var getSessionInfo = () => {
1553
- var _a, _b2;
1554
- let sessionInfo = __spreadValues({}, emptySession);
1578
+ let sessionInfo = { ...emptySession };
1555
1579
  try {
1556
- sessionInfo = JSON.parse((_a = window.localStorage.getItem("JWT")) != null ? _a : "");
1557
- } catch (e) {
1580
+ sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
1581
+ } catch {
1558
1582
  }
1559
1583
  if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
1560
1584
  cleanUp();
1561
- return __spreadValues({}, emptySession);
1585
+ return { ...emptySession };
1562
1586
  }
1563
1587
  if (!sessionInfo.token) {
1564
- let jwtTokenFromCookie = (_b2 = cookies.get("JWT", { doNotParse: true })) != null ? _b2 : "";
1588
+ let jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
1565
1589
  if (jwtTokenFromCookie) {
1566
1590
  setSessionInfo({ token: jwtTokenFromCookie, undefined: void 0 });
1567
1591
  sessionInfo.token = jwtTokenFromCookie;
@@ -1589,8 +1613,7 @@ var maxSessionAge = 900;
1589
1613
 
1590
1614
  // src/api/general-api.ts
1591
1615
  var unauthorizedRedirect = (error) => {
1592
- var _a;
1593
- if (!(0, import_axios.isCancel)(error) && ((_a = error.response) == null ? void 0 : _a.status) === 401 && getToken()) {
1616
+ if (!(0, import_axios.isCancel)(error) && error.response?.status === 401 && getToken()) {
1594
1617
  cleanUp();
1595
1618
  window.location.replace("/ui/");
1596
1619
  }
@@ -1600,7 +1623,7 @@ var commonRequestConfig = { timeout: TIMEOUTS.refreshDefault, headers: { "Conten
1600
1623
  var authenticatedRequest = import_axios.default.create(commonRequestConfig);
1601
1624
  authenticatedRequest.interceptors.response.use((res) => res, unauthorizedRedirect);
1602
1625
  authenticatedRequest.interceptors.request.use(
1603
- (config) => __spreadProps(__spreadValues({}, config), { headers: __spreadProps(__spreadValues({}, config.headers), { Authorization: `Bearer ${getToken()}` }) }),
1626
+ (config) => ({ ...config, headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } }),
1604
1627
  (error) => Promise.reject(error)
1605
1628
  );
1606
1629
  var Api = {
@@ -1608,7 +1631,7 @@ var Api = {
1608
1631
  delete: (url, data) => authenticatedRequest.request({ method: "delete", url, data }),
1609
1632
  patch: authenticatedRequest.patch,
1610
1633
  post: authenticatedRequest.post,
1611
- postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data, __spreadValues(__spreadValues({}, commonRequestConfig), config)),
1634
+ postUnauthorized: (url, data, config = {}) => import_axios.default.post(url, data, { ...commonRequestConfig, ...config }),
1612
1635
  put: authenticatedRequest.put,
1613
1636
  upload: (url, formData, progress2, cancelSignal) => authenticatedRequest.post(url, formData, {
1614
1637
  headers: { "Content-Type": "multipart/form-data" },
@@ -1639,10 +1662,7 @@ var getSearchState = (state) => state.app.searchState;
1639
1662
  var getSearchedDevices = (0, import_toolkit.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
1640
1663
  var getVersionInformation = (0, import_toolkit.createSelector)(
1641
1664
  [getFullVersionInformation, getFeatures],
1642
- (_a, { isHosted }) => {
1643
- var _b2 = _a, { Integration } = _b2, remainder = __objRest(_b2, ["Integration"]);
1644
- return isHosted && Integration !== "next" ? remainder : __spreadProps(__spreadValues({}, remainder), { Integration });
1645
- }
1665
+ ({ Integration, ...remainder }, { isHosted }) => isHosted && Integration !== "next" ? remainder : { ...remainder, Integration }
1646
1666
  );
1647
1667
  var getIsPreview = (0, import_toolkit.createSelector)([getFullVersionInformation], ({ Integration }) => (0, import_helpers.versionCompare)(Integration, "next") > -1);
1648
1668
 
@@ -1659,8 +1679,7 @@ var getDeploymentsSelectionState = (state) => state.deployments.selectionState;
1659
1679
  var getMappedDeploymentSelection = (0, import_toolkit2.createSelector)(
1660
1680
  [getDeploymentsSelectionState, (_, deploymentsState) => deploymentsState, getDeploymentsById],
1661
1681
  (selectionState, deploymentsState, deploymentsById) => {
1662
- var _a;
1663
- const { selection = [] } = (_a = selectionState[deploymentsState]) != null ? _a : {};
1682
+ const { selection = [] } = selectionState[deploymentsState] ?? {};
1664
1683
  return selection.reduce((accu, id) => {
1665
1684
  if (deploymentsById[id]) {
1666
1685
  accu.push(deploymentsById[id]);
@@ -1704,7 +1723,8 @@ var getListedDevices = (state) => state.devices.deviceList.deviceIds;
1704
1723
  var getFilteringAttributes = (state) => state.devices.filteringAttributes;
1705
1724
  var getDeviceFilters = (state) => state.devices.filters || [];
1706
1725
  var getFilteringAttributesFromConfig = (state) => state.devices.filteringAttributesConfig.attributes;
1707
- var getSortedFilteringAttributes = (0, import_toolkit3.createSelector)([getFilteringAttributes], (filteringAttributes) => __spreadProps(__spreadValues({}, filteringAttributes), {
1726
+ var getSortedFilteringAttributes = (0, import_toolkit3.createSelector)([getFilteringAttributes], (filteringAttributes) => ({
1727
+ ...filteringAttributes,
1708
1728
  identityAttributes: [...filteringAttributes.identityAttributes, "id"]
1709
1729
  }));
1710
1730
  var getDeviceLimit = (state) => state.devices.limit;
@@ -1732,10 +1752,7 @@ var getDeviceCountsByStatus = (0, import_toolkit3.createSelector)(
1732
1752
  return accu;
1733
1753
  }, {})
1734
1754
  );
1735
- var getDeviceById = (0, import_toolkit3.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => {
1736
- var _a;
1737
- return (_a = devicesById[deviceId]) != null ? _a : {};
1738
- });
1755
+ var getDeviceById = (0, import_toolkit3.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => devicesById[deviceId] ?? {});
1739
1756
  var getSelectedGroupInfo = (0, import_toolkit3.createSelector)(
1740
1757
  [getAcceptedDevices, getGroupsById, getSelectedGroup],
1741
1758
  ({ total: acceptedDeviceTotal }, groupsById, selectedGroup) => {
@@ -1752,17 +1769,13 @@ var getLimitMaxed = (0, import_toolkit3.createSelector)(
1752
1769
  [getAcceptedDevices, getDeviceLimit],
1753
1770
  ({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
1754
1771
  );
1755
- var _b;
1756
- var getGroupsByIdWithoutUngrouped = (0, import_toolkit3.createSelector)([getGroupsById], (_a) => {
1757
- var _c = _a, { [_b = UNGROUPED_GROUP.id]: ungrouped } = _c, groups = __objRest(_c, [__restKey(_b)]);
1758
- return groups;
1759
- });
1772
+ var getGroupsByIdWithoutUngrouped = (0, import_toolkit3.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
1760
1773
  var getGroups = (0, import_toolkit3.createSelector)([getGroupsById], (groupsById) => {
1761
1774
  const groupNames = Object.keys(groupsById).sort();
1762
1775
  const groupedGroups = Object.entries(groupsById).sort((a, b) => a[0].localeCompare(b[0])).reduce(
1763
1776
  (accu, [groupname, group]) => {
1764
1777
  const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
1765
- const groupItem = __spreadProps(__spreadValues({}, group), { groupId: name, name: groupname });
1778
+ const groupItem = { ...group, groupId: name, name: groupname };
1766
1779
  if (group.filters.length > 0) {
1767
1780
  if (groupname !== UNGROUPED_GROUP.id) {
1768
1781
  accu.dynamic.push(groupItem);
@@ -1776,7 +1789,7 @@ var getGroups = (0, import_toolkit3.createSelector)([getGroupsById], (groupsById
1776
1789
  },
1777
1790
  { dynamic: [], static: [], ungrouped: [] }
1778
1791
  );
1779
- return __spreadValues({ groupNames }, groupedGroups);
1792
+ return { groupNames, ...groupedGroups };
1780
1793
  });
1781
1794
  var getAttributesList = (0, import_toolkit3.createSelector)(
1782
1795
  [getFilteringAttributes, getFilteringAttributesFromConfig],
@@ -1811,15 +1824,12 @@ var getExternalIntegrations = (state) => state.organization.externalDeviceIntegr
1811
1824
  var getAuditlogState = (state) => state.organization.auditlog.selectionState;
1812
1825
  var getAuditLog = (state) => state.organization.auditlog.events;
1813
1826
  var getAuditLogSelectionState = (state) => state.organization.auditlog.selectionState;
1814
- var getTenantsList = (state) => state.organization.organization.tenantList;
1827
+ var getTenantsList = (state) => state.organization.tenantList;
1815
1828
  var getWebhookEvents = (state) => state.organization.webhooks.events;
1816
1829
  var getWebhookEventTotal = (state) => state.organization.webhooks.eventTotal;
1817
1830
  var getDeviceTwinIntegrations = (0, import_toolkit4.createSelector)(
1818
1831
  [getExternalIntegrations],
1819
- (integrations) => integrations.filter((integration) => {
1820
- var _a;
1821
- return integration.id && ((_a = EXTERNAL_PROVIDER[integration.provider]) == null ? void 0 : _a.deviceTwin);
1822
- })
1832
+ (integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)
1823
1833
  );
1824
1834
  var getIsServiceProvider = (state) => state.organization.organization.service_provider;
1825
1835
  var getWebhooks = (0, import_toolkit4.createSelector)(
@@ -1853,15 +1863,12 @@ var filterProcessors = {
1853
1863
  var filterAliases = {
1854
1864
  $nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
1855
1865
  };
1856
- var mapFiltersToTerms = (filters) => filters.map((filter) => {
1857
- var _a;
1858
- return {
1859
- scope: filter.scope,
1860
- attribute: filter.key,
1861
- type: ((_a = filterAliases[filter.operator]) == null ? void 0 : _a.alias) || filter.operator,
1862
- value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
1863
- };
1864
- });
1866
+ var mapFiltersToTerms = (filters) => filters.map((filter) => ({
1867
+ scope: filter.scope,
1868
+ attribute: filter.key,
1869
+ type: filterAliases[filter.operator]?.alias || filter.operator,
1870
+ value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
1871
+ }));
1865
1872
  var mapTermsToFilters = (terms) => terms.map((term) => {
1866
1873
  const aliasedFilter = Object.entries(filterAliases).find(
1867
1874
  (aliasDefinition) => aliasDefinition[1].alias === term.type && aliasDefinition[1].value === term.value
@@ -1871,14 +1878,13 @@ var mapTermsToFilters = (terms) => terms.map((term) => {
1871
1878
  });
1872
1879
  var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
1873
1880
  if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
1874
- return __spreadProps(__spreadValues({}, DEVICE_ISSUE_OPTIONS[item].filterRule), { value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) });
1881
+ return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
1875
1882
  }
1876
1883
  return DEVICE_ISSUE_OPTIONS[item].filterRule;
1877
1884
  });
1878
1885
  var convertDeviceListStateToFilters = ({ filters = [], group, groups = { byId: {} }, offlineThreshold, selectedIssues = [], status }) => {
1879
- var _a;
1880
1886
  let applicableFilters = [...filters];
1881
- if (typeof group === "string" && !(((_a = groups.byId[group]) == null ? void 0 : _a.filters) || applicableFilters).length) {
1887
+ if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
1882
1888
  applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
1883
1889
  }
1884
1890
  const nonMonitorFilters = applicableFilters.filter(
@@ -1899,12 +1905,12 @@ var filtersFilter = (item, index, array) => {
1899
1905
  var listItemMapper = (byId, ids, { defaultObject = {}, cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH }) => {
1900
1906
  return ids.slice(0, cutOffSize).reduce((accu, id) => {
1901
1907
  if (id && byId[id]) {
1902
- accu.push(__spreadValues(__spreadValues({}, defaultObject), byId[id]));
1908
+ accu.push({ ...defaultObject, ...byId[id] });
1903
1909
  }
1904
1910
  return accu;
1905
1911
  }, []);
1906
1912
  };
1907
- var mergePermissions = (existingPermissions = __spreadValues({}, emptyUiPermissions), addedPermissions) => Object.entries(existingPermissions).reduce(
1913
+ var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
1908
1914
  (accu, [key, value]) => {
1909
1915
  let values;
1910
1916
  if (!accu[key]) {
@@ -1914,12 +1920,12 @@ var mergePermissions = (existingPermissions = __spreadValues({}, emptyUiPermissi
1914
1920
  if (Array.isArray(value)) {
1915
1921
  values = [...value, ...accu[key]].filter(import_helpers3.duplicateFilter);
1916
1922
  } else {
1917
- values = mergePermissions(accu[key], __spreadValues({}, value));
1923
+ values = mergePermissions(accu[key], { ...value });
1918
1924
  }
1919
1925
  accu[key] = values;
1920
1926
  return accu;
1921
1927
  },
1922
- __spreadValues({}, addedPermissions)
1928
+ { ...addedPermissions }
1923
1929
  );
1924
1930
  var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
1925
1931
  (accu, roleId) => {
@@ -1928,20 +1934,17 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
1928
1934
  }
1929
1935
  return mergePermissions(accu, roles[roleId].uiPermissions);
1930
1936
  },
1931
- __spreadValues({}, emptyUiPermissions)
1937
+ { ...emptyUiPermissions }
1932
1938
  );
1933
1939
  var progress = ({ loaded, total }) => {
1934
1940
  let uploadProgress4 = loaded / total * 100;
1935
1941
  return uploadProgress4 = uploadProgress4 < 50 ? Math.ceil(uploadProgress4) : Math.round(uploadProgress4);
1936
1942
  };
1937
- var extractErrorMessage = (err, fallback = "") => {
1938
- var _a, _b2, _c, _d, _e;
1939
- return ((_c = (_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error) == null ? void 0 : _c.message) || ((_e = (_d = err.response) == null ? void 0 : _d.data) == null ? void 0 : _e.error) || err.error || err.message || fallback;
1940
- };
1943
+ var extractErrorMessage = (err, fallback = "") => err.response?.data?.error?.message || err.response?.data?.error || err.error || err.message || fallback;
1941
1944
  var preformatWithRequestID = (res, failMsg) => {
1942
1945
  if (failMsg.length > 100) failMsg = `${failMsg.substring(0, 220)}...`;
1943
1946
  try {
1944
- if ((res == null ? void 0 : res.data) && Object.keys(res.data).includes("request_id")) {
1947
+ if (res?.data && Object.keys(res.data).includes("request_id")) {
1945
1948
  let shortRequestUUID = res.data["request_id"].substring(0, 8);
1946
1949
  return `${failMsg} [Request ID: ${shortRequestUUID}]`;
1947
1950
  }
@@ -1956,9 +1959,10 @@ var mapDeviceAttributes = (attributes = []) => attributes.reduce(
1956
1959
  if (!(attribute.value && attribute.name) && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
1957
1960
  return accu;
1958
1961
  }
1959
- accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = __spreadProps(__spreadValues({}, accu[attribute.scope || ATTRIBUTE_SCOPES.inventory]), {
1962
+ accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = {
1963
+ ...accu[attribute.scope || ATTRIBUTE_SCOPES.inventory],
1960
1964
  [attribute.name]: attribute.value
1961
- });
1965
+ };
1962
1966
  if (attribute.name === "device_type" && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
1963
1967
  accu.inventory.device_type = [].concat(attribute.value);
1964
1968
  }
@@ -1977,15 +1981,12 @@ var getReleaseListState = (state) => state.releases.releasesList;
1977
1981
  var getListedReleases = (state) => state.releases.releasesList.releaseIds;
1978
1982
  var getReleaseMappingDefaults = () => ({});
1979
1983
  var getReleasesList = (0, import_toolkit5.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
1980
- var getReleaseTagsById = (0, import_toolkit5.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => __spreadProps(__spreadValues({}, accu), { [key]: key }), {}));
1984
+ var getReleaseTagsById = (0, import_toolkit5.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
1981
1985
  var getHasReleases = (0, import_toolkit5.createSelector)(
1982
1986
  [getReleaseListState, getReleasesById],
1983
1987
  ({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
1984
1988
  );
1985
- var getSelectedRelease = (0, import_toolkit5.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => {
1986
- var _a;
1987
- return (_a = byId[id]) != null ? _a : {};
1988
- });
1989
+ var getSelectedRelease = (0, import_toolkit5.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
1989
1990
 
1990
1991
  // src/usersSlice/selectors.ts
1991
1992
  var import_toolkit6 = require("@reduxjs/toolkit");
@@ -1994,10 +1995,7 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
1994
1995
  var getGlobalSettings = (state) => state.users.globalSettings;
1995
1996
  var getCurrentUserId = (state) => state.users.currentUser;
1996
1997
  var getUsersById = (state) => state.users.byId;
1997
- var getCurrentUser = (0, import_toolkit6.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => {
1998
- var _a;
1999
- return (_a = usersById[userId]) != null ? _a : {};
2000
- });
1998
+ var getCurrentUser = (0, import_toolkit6.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
2001
1999
  var getUserSettings = (state) => state.users.userSettings;
2002
2000
  var getIsDarkMode = (0, import_toolkit6.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
2003
2001
  var getShowHelptips = (0, import_toolkit6.createSelector)(
@@ -2008,22 +2006,22 @@ var getTooltipsState = (0, import_toolkit6.createSelector)(
2008
2006
  [getTooltipsById, getUserSettings],
2009
2007
  (byId, { tooltips = {} }) => Object.entries(byId).reduce(
2010
2008
  (accu, [id, value]) => {
2011
- accu[id] = __spreadValues(__spreadValues({}, accu[id]), value);
2009
+ accu[id] = { ...accu[id], ...value };
2012
2010
  return accu;
2013
2011
  },
2014
- __spreadValues({}, tooltips)
2012
+ { ...tooltips }
2015
2013
  )
2016
2014
  );
2017
2015
  var getHas2FA = (0, import_toolkit6.createSelector)(
2018
2016
  [getCurrentUser],
2019
2017
  (currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
2020
2018
  );
2021
- var getIdAttribute = (0, import_toolkit6.createSelector)([getGlobalSettings], ({ id_attribute = __spreadValues({}, defaultIdAttribute) }) => id_attribute);
2019
+ var getIdAttribute = (0, import_toolkit6.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
2022
2020
  var getOfflineThresholdSettings = (0, import_toolkit6.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
2023
- interval: (offlineThreshold == null ? void 0 : offlineThreshold.interval) || DEVICE_ONLINE_CUTOFF.interval,
2024
- intervalUnit: (offlineThreshold == null ? void 0 : offlineThreshold.intervalUnit) || DEVICE_ONLINE_CUTOFF.intervalName
2021
+ interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
2022
+ intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
2025
2023
  }));
2026
- var getRolesList = (0, import_toolkit6.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => __spreadValues({ id }, role)));
2024
+ var getRolesList = (0, import_toolkit6.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => ({ id, ...role })));
2027
2025
  var getCurrentSession = (state) => state.users.currentSession;
2028
2026
 
2029
2027
  // src/commonSelectors.ts
@@ -2042,8 +2040,7 @@ var getSearchEndpoint = (0, import_toolkit7.createSelector)(
2042
2040
  var getUserRoles = (0, import_toolkit7.createSelector)(
2043
2041
  [getCurrentUser, getRolesById, getIsEnterprise, getFeatures, getOrganization],
2044
2042
  (currentUser, rolesById2, isEnterprise, { isHosted, hasMultitenancy }, { plan = PLANS.os.id }) => {
2045
- var _a;
2046
- const isAdmin = ((_a = currentUser.roles) == null ? void 0 : _a.length) ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
2043
+ const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
2047
2044
  const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
2048
2045
  return { isAdmin, uiPermissions };
2049
2046
  }
@@ -2112,10 +2109,11 @@ var getFilterAttributes = (0, import_toolkit7.createSelector)(
2112
2109
  const deviceNameAttribute = { key: "name", value: "Name", scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 1 };
2113
2110
  const deviceIdAttribute = { key: "id", value: "Device ID", scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 };
2114
2111
  const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2115
- const updateAttribute = __spreadProps(__spreadValues({}, checkInAttribute), { key: "updated_ts", value: "Last inventory update" });
2112
+ const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
2116
2113
  const firstRequestAttribute = { key: "created_ts", value: "First request", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2117
2114
  const attributes = [
2118
- ...previousFilters.map((item) => __spreadProps(__spreadValues({}, item), {
2115
+ ...previousFilters.map((item) => ({
2116
+ ...item,
2119
2117
  value: deviceIdAttribute.key === item.key ? deviceIdAttribute.value : item.key,
2120
2118
  category: "recently used",
2121
2119
  priority: 0
@@ -2133,14 +2131,13 @@ var getFilterAttributes = (0, import_toolkit7.createSelector)(
2133
2131
  return (0, import_helpers4.attributeDuplicateFilter)(attributes, "key");
2134
2132
  }
2135
2133
  );
2136
- var getOnboardingState = (0, import_toolkit7.createSelector)([getOnboarding, getUserSettings], (_a, { onboarding = {} }) => {
2137
- var _b2 = _a, { complete, progress: progress2, showTips } = _b2, remainder = __objRest(_b2, ["complete", "progress", "showTips"]);
2138
- return __spreadProps(__spreadValues(__spreadValues({}, remainder), onboarding), {
2139
- complete: onboarding.complete || complete,
2140
- progress: Object.keys(onboardingSteps).findIndex((step) => step === progress2) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress2 : onboarding.progress,
2141
- showTips: !onboarding.showTips ? onboarding.showTips : showTips
2142
- });
2143
- });
2134
+ var getOnboardingState = (0, import_toolkit7.createSelector)([getOnboarding, getUserSettings], ({ complete, progress: progress2, showTips, ...remainder }, { onboarding = {} }) => ({
2135
+ ...remainder,
2136
+ ...onboarding,
2137
+ complete: onboarding.complete || complete,
2138
+ progress: Object.keys(onboardingSteps).findIndex((step) => step === progress2) > Object.keys(onboardingSteps).findIndex((step) => step === onboarding.progress) ? progress2 : onboarding.progress,
2139
+ showTips: !onboarding.showTips ? onboarding.showTips : showTips
2140
+ }));
2144
2141
  var getDemoDeviceAddress = (0, import_toolkit7.createSelector)([getDevicesById, getOnboarding], (devicesById, { approach, demoArtifactPort }) => {
2145
2142
  const demoDeviceAddress = `http://${(0, import_helpers4.getDemoDeviceAddress)(Object.values(devicesById), approach)}`;
2146
2143
  return demoArtifactPort ? `${demoDeviceAddress}:${demoArtifactPort}` : demoDeviceAddress;
@@ -2161,12 +2158,11 @@ var getDeploymentRelease = (0, import_toolkit7.createSelector)(
2161
2158
  var getSelectedDeploymentData = (0, import_toolkit7.createSelector)(
2162
2159
  [getDeploymentsById, getDeploymentsSelectionState, getDevicesById, getSelectedDeploymentDeviceIds],
2163
2160
  (deploymentsById, { selectedId }, devicesById, selectedDeviceIds) => {
2164
- var _a;
2165
- const deployment = (_a = deploymentsById[selectedId]) != null ? _a : {};
2161
+ const deployment = deploymentsById[selectedId] ?? {};
2166
2162
  const { devices = {} } = deployment;
2167
2163
  return {
2168
2164
  deployment,
2169
- selectedDevices: selectedDeviceIds.map((deviceId) => __spreadValues(__spreadValues({}, devicesById[deviceId]), devices[deviceId]))
2165
+ selectedDevices: selectedDeviceIds.map((deviceId) => ({ ...devicesById[deviceId], ...devices[deviceId] }))
2170
2166
  };
2171
2167
  }
2172
2168
  );
@@ -2181,8 +2177,7 @@ var getAvailableIssueOptionsByType = (0, import_toolkit7.createSelector)(
2181
2177
  }, {})
2182
2178
  );
2183
2179
  var getGroupNames = (0, import_toolkit7.createSelector)([getGroupsById, getUserRoles, (_, options = {}) => options], (groupsById, { uiPermissions }, { staticOnly }) => {
2184
- var _a;
2185
- const _b2 = groupsById, { [_a = UNGROUPED_GROUP.id]: ungrouped } = _b2, groups = __objRest(_b2, [__restKey(_a)]);
2180
+ const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
2186
2181
  if (staticOnly) {
2187
2182
  return Object.keys(uiPermissions.groups).sort();
2188
2183
  }
@@ -2216,9 +2211,25 @@ var getAuditlogDevice = (0, import_toolkit7.createSelector)([getAuditLogEntry, g
2216
2211
  if (auditlogEvent) {
2217
2212
  const { object = {} } = auditlogEvent;
2218
2213
  const { device = {}, id, type } = object;
2219
- auditlogDevice = type === "device" ? __spreadValues({ id }, device) : auditlogDevice;
2214
+ auditlogDevice = type === "device" ? { id, ...device } : auditlogDevice;
2220
2215
  }
2221
- return __spreadValues(__spreadValues({}, auditlogDevice), devicesById[auditlogDevice.id]);
2216
+ return { ...auditlogDevice, ...devicesById[auditlogDevice.id] };
2217
+ });
2218
+ var getRelevantRoles = (0, import_toolkit7.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
2219
+ if (service_provider) {
2220
+ return roles.reduce((accu, role) => {
2221
+ if (rolesById[role.id]) {
2222
+ return accu;
2223
+ }
2224
+ accu.push(role);
2225
+ return accu;
2226
+ }, Object.values(serviceProviderRolesById));
2227
+ }
2228
+ return Object.keys(rolesById).reverse().reduce((accu, key) => {
2229
+ const index = accu.findIndex(({ id }) => id === key);
2230
+ accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
2231
+ return accu;
2232
+ }, roles);
2222
2233
  });
2223
2234
 
2224
2235
  // src/appSlice/thunks.ts
@@ -2301,7 +2312,10 @@ var appSlice = (0, import_toolkit8.createSlice)({
2301
2312
  initialState,
2302
2313
  reducers: {
2303
2314
  setFeatures: (state, action) => {
2304
- state.features = __spreadValues(__spreadValues({}, state.features), action.payload);
2315
+ state.features = {
2316
+ ...state.features,
2317
+ ...action.payload
2318
+ };
2305
2319
  },
2306
2320
  setSnackbar: (state, { payload }) => {
2307
2321
  let { message, autoHideDuration, action, children, onClick, onClose } = payload;
@@ -2326,7 +2340,10 @@ var appSlice = (0, import_toolkit8.createSlice)({
2326
2340
  state.hostedAnnouncement = action.payload;
2327
2341
  },
2328
2342
  setSearchState: (state, action) => {
2329
- state.searchState = __spreadValues(__spreadValues({}, state.searchState), action.payload);
2343
+ state.searchState = {
2344
+ ...state.searchState,
2345
+ ...action.payload
2346
+ };
2330
2347
  },
2331
2348
  setOfflineThreshold: (state, action) => {
2332
2349
  state.offlineThreshold = action.payload;
@@ -2337,20 +2354,23 @@ var appSlice = (0, import_toolkit8.createSlice)({
2337
2354
  },
2338
2355
  uploadProgress: (state, action) => {
2339
2356
  const { id, progress: progress2 } = action.payload;
2340
- state.uploadsById[id] = __spreadProps(__spreadValues({}, state.uploadsById[id]), {
2357
+ state.uploadsById[id] = {
2358
+ ...state.uploadsById[id],
2341
2359
  progress: progress2
2342
- });
2360
+ };
2343
2361
  },
2344
2362
  cleanUpUpload: (state, action) => {
2345
- var _a;
2346
- const _b2 = state.uploadsById, { [_a = action.payload]: current } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
2363
+ const { [action.payload]: current, ...remainder } = state.uploadsById;
2347
2364
  state.uploadsById = remainder;
2348
2365
  },
2349
2366
  setVersionInformation: (state, action) => {
2350
- state.versionInformation = __spreadValues(__spreadValues({}, state.versionInformation), action.payload);
2367
+ state.versionInformation = {
2368
+ ...state.versionInformation,
2369
+ ...action.payload
2370
+ };
2351
2371
  },
2352
2372
  setEnvironmentData: (state, action) => {
2353
- return __spreadValues(__spreadValues({}, state), action.payload);
2373
+ return { ...state, ...action.payload };
2354
2374
  }
2355
2375
  }
2356
2376
  });
@@ -2368,17 +2388,16 @@ var dateFunctionMap = {
2368
2388
  setDays: "setDate"
2369
2389
  };
2370
2390
  var setOfflineThreshold = (0, import_toolkit9.createAsyncThunk)(`${sliceName}/setOfflineThreshold`, (_, { dispatch, getState }) => {
2371
- var _a, _b2;
2372
2391
  const { interval, intervalUnit } = getOfflineThresholdSettings(getState());
2373
2392
  const today = /* @__PURE__ */ new Date();
2374
2393
  const intervalName = `${intervalUnit.charAt(0).toUpperCase()}${intervalUnit.substring(1)}`;
2375
- const setter = (_a = dateFunctionMap[`set${intervalName}`]) != null ? _a : `set${intervalName}`;
2376
- const getter = (_b2 = dateFunctionMap[`get${intervalName}`]) != null ? _b2 : `get${intervalName}`;
2394
+ const setter = dateFunctionMap[`set${intervalName}`] ?? `set${intervalName}`;
2395
+ const getter = dateFunctionMap[`get${intervalName}`] ?? `get${intervalName}`;
2377
2396
  today[setter](today[getter]() - interval);
2378
2397
  let value;
2379
2398
  try {
2380
2399
  value = today.toISOString();
2381
- } catch (e) {
2400
+ } catch {
2382
2401
  return Promise.resolve(dispatch(actions.setSnackbar("There was an error saving the offline threshold, please check your settings.")));
2383
2402
  }
2384
2403
  return Promise.resolve(dispatch(actions.setOfflineThreshold(value)));
@@ -2419,37 +2438,43 @@ var getLatestReleaseInfo = (0, import_toolkit9.createAsyncThunk)(`${sliceName}/g
2419
2438
  accu.latestRepos[item.name] = getComparisonCompatibleVersion(item.version);
2420
2439
  return accu;
2421
2440
  },
2422
- { latestVersions: __spreadValues({}, getState().app.versionInformation), latestRepos: {} }
2441
+ { latestVersions: { ...getState().app.versionInformation }, latestRepos: {} }
2423
2442
  );
2424
2443
  const info = deductSaasState(latestRelease, guiTags, saas);
2425
2444
  return Promise.resolve(
2426
2445
  dispatch(
2427
- actions.setVersionInformation(__spreadProps(__spreadValues({}, latestVersions), {
2446
+ actions.setVersionInformation({
2447
+ ...latestVersions,
2428
2448
  backend: info,
2429
2449
  GUI: info,
2430
2450
  latestRelease: {
2431
2451
  releaseDate: latestRelease.release_date,
2432
2452
  repos: latestRepos
2433
2453
  }
2434
- }))
2454
+ })
2435
2455
  )
2436
2456
  );
2437
2457
  });
2438
2458
  });
2439
2459
  var setSearchState = (0, import_toolkit9.createAsyncThunk)(`${sliceName}/setSearchState`, (searchState, { dispatch, getState }) => {
2440
2460
  const currentState = getSearchState(getState());
2441
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), searchState), {
2442
- sort: __spreadValues(__spreadValues({}, currentState.sort), searchState.sort)
2443
- });
2461
+ let nextState = {
2462
+ ...currentState,
2463
+ ...searchState,
2464
+ sort: {
2465
+ ...currentState.sort,
2466
+ ...searchState.sort
2467
+ }
2468
+ };
2444
2469
  let tasks = [];
2445
- const _a = currentState, { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal } = _a, currentRequestState = __objRest(_a, ["isSearching", "deviceIds", "searchTotal"]);
2446
- const _b2 = nextState, { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal } = _b2, nextRequestState = __objRest(_b2, ["isSearching", "deviceIds", "searchTotal"]);
2470
+ const { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal, ...currentRequestState } = currentState;
2471
+ const { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal, ...nextRequestState } = nextState;
2447
2472
  if (nextRequestState.searchTerm && !(0, import_helpers5.deepCompare)(currentRequestState, nextRequestState)) {
2448
2473
  nextState.isSearching = true;
2449
2474
  tasks.push(
2450
2475
  dispatch(searchDevices(nextState)).unwrap().then((results) => {
2451
2476
  const searchResult = results[results.length - 1];
2452
- return dispatch(actions.setSearchState(__spreadProps(__spreadValues({}, searchResult), { isSearching: false })));
2477
+ return dispatch(actions.setSearchState({ ...searchResult, isSearching: false }));
2453
2478
  }).catch(() => dispatch(actions.setSearchState({ isSearching: false, searchTotal: 0 })))
2454
2479
  );
2455
2480
  }
@@ -2482,7 +2507,7 @@ var initialState2 = {
2482
2507
  sourceWindow: -1
2483
2508
  },
2484
2509
  binaryDeltaLimits: {
2485
- timeout: __spreadProps(__spreadValues({}, limitDefault), { default: 60, max: 3600, min: 60 }),
2510
+ timeout: { ...limitDefault, default: 60, max: 3600, min: 60 },
2486
2511
  sourceWindow: limitDefault,
2487
2512
  inputWindow: limitDefault,
2488
2513
  duplicatesWindow: limitDefault,
@@ -2492,10 +2517,10 @@ var initialState2 = {
2492
2517
  deploymentDeviceLimit: 5e3,
2493
2518
  selectedDeviceIds: [],
2494
2519
  selectionState: {
2495
- finished: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" }),
2496
- inprogress: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] }),
2497
- pending: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] }),
2498
- scheduled: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { selection: [] }),
2520
+ finished: { ...DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
2521
+ inprogress: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
2522
+ pending: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
2523
+ scheduled: { ...DEVICE_LIST_DEFAULTS, selection: [] },
2499
2524
  general: {
2500
2525
  state: DEPLOYMENT_ROUTES.active.key,
2501
2526
  showCreationDialog: false,
@@ -2511,40 +2536,55 @@ var deploymentsSlice = (0, import_toolkit10.createSlice)({
2511
2536
  initialState: initialState2,
2512
2537
  reducers: {
2513
2538
  createdDeployment: (state, action) => {
2514
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, deploymentPrototype), action.payload);
2539
+ state.byId[action.payload.id] = {
2540
+ ...deploymentPrototype,
2541
+ ...action.payload
2542
+ };
2515
2543
  state.byStatus[DEPLOYMENT_STATES.pending].total = state.byStatus[DEPLOYMENT_STATES.pending].total + 1;
2516
2544
  state.byStatus[DEPLOYMENT_STATES.pending].deploymentIds = [...state.byStatus.pending.deploymentIds, action.payload.id];
2517
2545
  state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection], state.selectionState[DEPLOYMENT_STATES.pending].total = state.selectionState[DEPLOYMENT_STATES.pending].total + 1;
2518
2546
  },
2519
2547
  removedDeployment: (state, action) => {
2520
- var _a;
2521
- const _b2 = state.byId, { [_a = action.payload]: removedDeployment } = _b2, remainder = __objRest(_b2, [__restKey(_a)]);
2548
+ const { [action.payload]: removedDeployment, ...remainder } = state.byId;
2522
2549
  state.byId = remainder;
2523
2550
  },
2524
2551
  receivedDeployment: (state, action) => {
2525
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id] || {}), action.payload);
2552
+ state.byId[action.payload.id] = {
2553
+ ...state.byId[action.payload.id] || {},
2554
+ ...action.payload
2555
+ };
2526
2556
  },
2527
2557
  receivedDeploymentDeviceLog: (state, action) => {
2528
2558
  const { id, deviceId, log } = action.payload;
2529
- const deployment = __spreadValues(__spreadValues({}, deploymentPrototype), state.byId[id]);
2530
- state.byId[id] = __spreadProps(__spreadValues({}, deployment), {
2531
- devices: __spreadProps(__spreadValues({}, deployment.devices), {
2532
- [deviceId]: __spreadProps(__spreadValues({}, deployment.devices[deviceId]), {
2559
+ const deployment = {
2560
+ ...deploymentPrototype,
2561
+ ...state.byId[id]
2562
+ };
2563
+ state.byId[id] = {
2564
+ ...deployment,
2565
+ devices: {
2566
+ ...deployment.devices,
2567
+ [deviceId]: {
2568
+ ...deployment.devices[deviceId],
2533
2569
  log
2534
- })
2535
- })
2536
- });
2570
+ }
2571
+ }
2572
+ };
2537
2573
  },
2538
2574
  receivedDeploymentDevices: (state, action) => {
2539
2575
  const { id, devices, selectedDeviceIds, totalDeviceCount } = action.payload;
2540
- state.byId[id] = __spreadProps(__spreadValues({}, state.byId[id]), {
2576
+ state.byId[id] = {
2577
+ ...state.byId[id],
2541
2578
  devices,
2542
2579
  totalDeviceCount
2543
- });
2580
+ };
2544
2581
  state.selectedDeviceIds = selectedDeviceIds;
2545
2582
  },
2546
2583
  receivedDeployments: (state, action) => {
2547
- state.byId = __spreadValues(__spreadValues({}, state.byId), action.payload);
2584
+ state.byId = {
2585
+ ...state.byId,
2586
+ ...action.payload
2587
+ };
2548
2588
  },
2549
2589
  receivedDeploymentsForStatus: (state, action) => {
2550
2590
  const { status, deploymentIds, total } = action.payload;
@@ -2586,9 +2626,9 @@ var initialState3 = {
2586
2626
  [DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
2587
2627
  [DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
2588
2628
  },
2589
- deviceList: __spreadProps(__spreadValues({
2590
- deviceIds: []
2591
- }, DEVICE_LIST_DEFAULTS), {
2629
+ deviceList: {
2630
+ deviceIds: [],
2631
+ ...DEVICE_LIST_DEFAULTS,
2592
2632
  selectedAttributes: [],
2593
2633
  selectedIssues: [],
2594
2634
  selection: [],
@@ -2599,7 +2639,7 @@ var initialState3 = {
2599
2639
  },
2600
2640
  state: DEVICE_STATES.accepted,
2601
2641
  total: 0
2602
- }),
2642
+ },
2603
2643
  filters: [
2604
2644
  // { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }
2605
2645
  ],
@@ -2634,49 +2674,59 @@ var devicesSlice = (0, import_toolkit11.createSlice)({
2634
2674
  },
2635
2675
  addToGroup: (state, action) => {
2636
2676
  const { group, deviceIds } = action.payload;
2637
- const maybeExistingGroup = __spreadValues({
2677
+ const maybeExistingGroup = {
2638
2678
  filters: [],
2639
- deviceIds: []
2640
- }, state.groups.byId[group]);
2641
- state.groups.byId[group] = __spreadProps(__spreadValues({}, maybeExistingGroup), {
2679
+ deviceIds: [],
2680
+ ...state.groups.byId[group]
2681
+ };
2682
+ state.groups.byId[group] = {
2683
+ ...maybeExistingGroup,
2642
2684
  deviceIds: [...maybeExistingGroup.deviceIds, ...deviceIds].filter(import_helpers6.duplicateFilter),
2643
2685
  total: (maybeExistingGroup.total || 0) + 1
2644
- });
2686
+ };
2645
2687
  },
2646
2688
  removeFromGroup: (state, action) => {
2647
2689
  const { group, deviceIds: removedIds } = action.payload;
2648
- const _a = state.groups.byId[group] || {}, { deviceIds = [], total = 0 } = _a, maybeExistingGroup = __objRest(_a, ["deviceIds", "total"]);
2649
- const changedGroup = __spreadProps(__spreadValues({}, maybeExistingGroup), {
2690
+ const { deviceIds = [], total = 0, ...maybeExistingGroup } = state.groups.byId[group] || {};
2691
+ const changedGroup = {
2692
+ ...maybeExistingGroup,
2650
2693
  deviceIds: deviceIds.filter((id) => !removedIds.includes(id)),
2651
2694
  total: Math.max(total - removedIds.length, 0)
2652
- });
2695
+ };
2653
2696
  if (changedGroup.total || changedGroup.deviceIds.length) {
2654
2697
  state.groups.byId[group] = changedGroup;
2655
2698
  return;
2656
2699
  } else if (state.groups.selectedGroup === group) {
2657
2700
  state.groups.selectedGroup = void 0;
2658
2701
  }
2659
- const _b2 = state.groups.byId, { [group]: removal } = _b2, remainingById = __objRest(_b2, [__restKey(group)]);
2702
+ const { [group]: removal, ...remainingById } = state.groups.byId;
2660
2703
  state.groups.byId = remainingById;
2661
2704
  },
2662
2705
  addGroup: (state, action) => {
2663
2706
  const { groupName, group } = action.payload;
2664
- state.groups.byId[groupName] = __spreadValues(__spreadValues({}, state.groups.byId[groupName]), group);
2707
+ state.groups.byId[groupName] = {
2708
+ ...state.groups.byId[groupName],
2709
+ ...group
2710
+ };
2665
2711
  },
2666
2712
  selectGroup: (state, { payload: group }) => {
2667
2713
  state.deviceList.deviceIds = state.groups.byId[group] && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
2668
2714
  state.groups.selectedGroup = group;
2669
2715
  },
2670
2716
  removeGroup: (state, action) => {
2671
- var _a;
2672
- const _b2 = state.groups.byId, { [_a = action.payload]: removal } = _b2, remainingById = __objRest(_b2, [__restKey(_a)]);
2717
+ const { [action.payload]: removal, ...remainingById } = state.groups.byId;
2673
2718
  state.groups.byId = remainingById;
2674
2719
  state.groups.selectedGroup = state.groups.selectedGroup === action.payload ? void 0 : state.groups.selectedGroup;
2675
2720
  },
2676
2721
  setDeviceListState: (state, action) => {
2677
- state.deviceList = __spreadProps(__spreadValues(__spreadValues({}, state.deviceList), action.payload), {
2678
- sort: __spreadValues(__spreadValues({}, state.deviceList.sort), action.payload.sort)
2679
- });
2722
+ state.deviceList = {
2723
+ ...state.deviceList,
2724
+ ...action.payload,
2725
+ sort: {
2726
+ ...state.deviceList.sort,
2727
+ ...action.payload.sort
2728
+ }
2729
+ };
2680
2730
  },
2681
2731
  setFilterAttributes: (state, action) => {
2682
2732
  state.filteringAttributes = action.payload;
@@ -2685,7 +2735,10 @@ var devicesSlice = (0, import_toolkit11.createSlice)({
2685
2735
  state.filteringAttributesConfig = action.payload;
2686
2736
  },
2687
2737
  receivedDevices: (state, action) => {
2688
- state.byId = __spreadValues(__spreadValues({}, state.byId), action.payload);
2738
+ state.byId = {
2739
+ ...state.byId,
2740
+ ...action.payload
2741
+ };
2689
2742
  },
2690
2743
  setDeviceFilters: (state, action) => {
2691
2744
  if ((0, import_helpers6.deepCompare)(action.payload, state.filters)) {
@@ -2716,7 +2769,10 @@ var devicesSlice = (0, import_toolkit11.createSlice)({
2716
2769
  state.limit = action.payload;
2717
2770
  },
2718
2771
  receivedDevice: (state, action) => {
2719
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id]), action.payload);
2772
+ state.byId[action.payload.id] = {
2773
+ ...state.byId[action.payload.id],
2774
+ ...action.payload
2775
+ };
2720
2776
  },
2721
2777
  maybeUpdateDevicesByStatus: (state, action) => {
2722
2778
  const { deviceId, authId } = action.payload;
@@ -2737,15 +2793,17 @@ var import_toolkit12 = require("@reduxjs/toolkit");
2737
2793
  var sliceName4 = "monitor";
2738
2794
  var initialState4 = {
2739
2795
  alerts: {
2740
- alertList: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), { total: 0 }),
2796
+ alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
2741
2797
  byDeviceId: {}
2742
2798
  },
2743
2799
  issueCounts: {
2744
- byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => __spreadProps(__spreadValues({}, accu), { [key]: { filtered: 0, total: 0 } }), {})
2800
+ byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
2745
2801
  },
2746
2802
  settings: {
2747
2803
  global: {
2748
- channels: __spreadValues({}, Object.keys(alertChannels).reduce((accu, item) => __spreadProps(__spreadValues({}, accu), { [item]: { enabled: true } }), {}))
2804
+ channels: {
2805
+ ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
2806
+ }
2749
2807
  }
2750
2808
  }
2751
2809
  };
@@ -2763,14 +2821,14 @@ var monitorSlice = (0, import_toolkit12.createSlice)({
2763
2821
  },
2764
2822
  receiveLatestDeviceAlerts: (state, action) => {
2765
2823
  const { deviceId, alerts } = action.payload;
2766
- state.alerts.byDeviceId[deviceId] = __spreadProps(__spreadValues({}, state.alerts.byDeviceId[deviceId]), { latest: alerts });
2824
+ state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
2767
2825
  },
2768
2826
  receiveDeviceIssueCounts: (state, action) => {
2769
2827
  const { issueType, counts } = action.payload;
2770
2828
  state.issueCounts.byType[issueType] = counts;
2771
2829
  },
2772
2830
  setAlertListState: (state, action) => {
2773
- state.alerts.alertList = __spreadValues(__spreadValues({}, state.alerts.alertList), action.payload);
2831
+ state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
2774
2832
  }
2775
2833
  }
2776
2834
  });
@@ -2794,7 +2852,7 @@ var onboardingSlice = (0, import_toolkit13.createSlice)({
2794
2852
  initialState: initialState5,
2795
2853
  reducers: {
2796
2854
  setOnboardingState: (state, action) => {
2797
- return __spreadValues(__spreadValues({}, state), action.payload);
2855
+ return { ...state, ...action.payload };
2798
2856
  },
2799
2857
  setDemoArtifactPort: (state, action) => {
2800
2858
  state.demoArtifactPort = action.payload;
@@ -2832,21 +2890,23 @@ var initialState6 = {
2832
2890
  brand: ""
2833
2891
  },
2834
2892
  intentId: null,
2893
+ tenantList: {
2894
+ ...TENANT_LIST_DEFAULT,
2895
+ total: 0,
2896
+ tenants: [],
2897
+ selectedTenant: null,
2898
+ sort: {
2899
+ direction: SORTING_OPTIONS.desc,
2900
+ key: "name"
2901
+ }
2902
+ },
2835
2903
  organization: {
2836
- tenantList: __spreadProps(__spreadValues({}, TENANT_LIST_DEFAULT), {
2837
- total: 0,
2838
- tenants: [],
2839
- selectedTenant: null,
2840
- sort: {
2841
- direction: SORTING_OPTIONS.desc,
2842
- key: "name"
2843
- }
2844
- })
2845
2904
  // id, name, status, tenant_token, plan
2846
2905
  },
2847
2906
  auditlog: {
2848
2907
  events: [],
2849
- selectionState: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), {
2908
+ selectionState: {
2909
+ ...DEVICE_LIST_DEFAULTS,
2850
2910
  detail: void 0,
2851
2911
  endDate: void 0,
2852
2912
  selectedIssue: void 0,
@@ -2855,7 +2915,7 @@ var initialState6 = {
2855
2915
  total: 0,
2856
2916
  type: void 0,
2857
2917
  user: void 0
2858
- })
2918
+ }
2859
2919
  },
2860
2920
  externalDeviceIntegrations: [
2861
2921
  // { <connection_string|x509|...>, id, provider }
@@ -2878,7 +2938,10 @@ var organizationSlice = (0, import_toolkit14.createSlice)({
2878
2938
  state.auditlog.selectionState.total = total;
2879
2939
  },
2880
2940
  setAuditLogState: (state, action) => {
2881
- state.auditlog.selectionState = __spreadValues(__spreadValues({}, state.auditlog.selectionState), action.payload);
2941
+ state.auditlog.selectionState = {
2942
+ ...state.auditlog.selectionState,
2943
+ ...action.payload
2944
+ };
2882
2945
  },
2883
2946
  receiveCurrentCard: (state, action) => {
2884
2947
  state.card = action.payload;
@@ -2887,12 +2950,10 @@ var organizationSlice = (0, import_toolkit14.createSlice)({
2887
2950
  state.intentId = action.payload;
2888
2951
  },
2889
2952
  setOrganization: (state, action) => {
2890
- state.organization = __spreadProps(__spreadValues(__spreadValues({}, state.organization), action.payload), {
2891
- tenantList: __spreadValues(__spreadValues({}, state.organization.tenantList), action.payload.tenantList)
2892
- });
2953
+ state.organization = { ...state.organization, ...action.payload };
2893
2954
  },
2894
2955
  setTenantListState: (state, action) => {
2895
- state.organization.tenantList = action.payload;
2956
+ state.tenantList = action.payload;
2896
2957
  },
2897
2958
  receiveExternalDeviceIntegrations: (state, action) => {
2898
2959
  state.externalDeviceIntegrations = action.payload;
@@ -2952,7 +3013,8 @@ var initialState7 = {
2952
3013
  }
2953
3014
  */
2954
3015
  },
2955
- releasesList: __spreadProps(__spreadValues({}, DEVICE_LIST_DEFAULTS), {
3016
+ releasesList: {
3017
+ ...DEVICE_LIST_DEFAULTS,
2956
3018
  searchedIds: [],
2957
3019
  releaseIds: [],
2958
3020
  selection: [],
@@ -2966,7 +3028,7 @@ var initialState7 = {
2966
3028
  selectedTags: [],
2967
3029
  total: 0,
2968
3030
  type: ""
2969
- }),
3031
+ },
2970
3032
  tags: [],
2971
3033
  updateTypes: [],
2972
3034
  /*
@@ -2992,8 +3054,7 @@ var releaseSlice = (0, import_toolkit15.createSlice)({
2992
3054
  state.updateTypes = action.payload;
2993
3055
  },
2994
3056
  removeRelease: (state, action) => {
2995
- var _a;
2996
- const _b2 = state.byId, { [_a = action.payload]: toBeRemoved } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
3057
+ const { [action.payload]: toBeRemoved, ...byId } = state.byId;
2997
3058
  state.byId = byId;
2998
3059
  state.selectedRelease = action.payload === state.selectedRelease ? null : state.selectedRelease;
2999
3060
  },
@@ -3026,8 +3087,12 @@ var initialState8 = {
3026
3087
  previousPhases: [],
3027
3088
  retries: 0
3028
3089
  },
3029
- permissionSetsById: __spreadValues({}, defaultPermissionSets),
3030
- rolesById: __spreadValues({}, rolesById),
3090
+ permissionSetsById: {
3091
+ ...defaultPermissionSets
3092
+ },
3093
+ rolesById: {
3094
+ ...rolesById
3095
+ },
3031
3096
  settingsInitialized: false,
3032
3097
  showConnectDeviceDialog: false,
3033
3098
  showFeedbackDialog: false,
@@ -3067,13 +3132,15 @@ var usersSlice = (0, import_toolkit16.createSlice)({
3067
3132
  state.byId[0] = action.payload;
3068
3133
  },
3069
3134
  removedUser: (state, action) => {
3070
- var _a;
3071
- const _b2 = state.byId, { [_a = action.payload]: removedUser } = _b2, byId = __objRest(_b2, [__restKey(_a)]);
3135
+ const { [action.payload]: removedUser, ...byId } = state.byId;
3072
3136
  state.byId = byId;
3073
3137
  state.currentUser = state.currentUser === action.payload ? null : state.currentUser;
3074
3138
  },
3075
3139
  updatedUser: (state, action) => {
3076
- state.byId[action.payload.id] = __spreadValues(__spreadValues({}, state.byId[action.payload.id]), action.payload);
3140
+ state.byId[action.payload.id] = {
3141
+ ...state.byId[action.payload.id],
3142
+ ...action.payload
3143
+ };
3077
3144
  },
3078
3145
  receivedPermissionSets: (state, action) => {
3079
3146
  state.permissionSetsById = action.payload;
@@ -3082,11 +3149,13 @@ var usersSlice = (0, import_toolkit16.createSlice)({
3082
3149
  state.rolesById = action.payload;
3083
3150
  },
3084
3151
  createdRole: (state, action) => {
3085
- state.rolesById[action.payload.name] = __spreadValues(__spreadValues({}, state.rolesById[action.payload.name]), action.payload);
3152
+ state.rolesById[action.payload.name] = {
3153
+ ...state.rolesById[action.payload.name],
3154
+ ...action.payload
3155
+ };
3086
3156
  },
3087
3157
  removedRole: (state, action) => {
3088
- var _a;
3089
- const _b2 = state.rolesById, { [_a = action.payload]: toBeRemoved } = _b2, rolesById2 = __objRest(_b2, [__restKey(_a)]);
3158
+ const { [action.payload]: toBeRemoved, ...rolesById2 } = state.rolesById;
3090
3159
  state.rolesById = rolesById2;
3091
3160
  },
3092
3161
  setCustomColumns: (state, action) => {
@@ -3094,18 +3163,27 @@ var usersSlice = (0, import_toolkit16.createSlice)({
3094
3163
  },
3095
3164
  setGlobalSettings: (state, action) => {
3096
3165
  state.settingsInitialized = true;
3097
- state.globalSettings = __spreadValues(__spreadValues({}, state.globalSettings), action.payload);
3166
+ state.globalSettings = {
3167
+ ...state.globalSettings,
3168
+ ...action.payload
3169
+ };
3098
3170
  },
3099
3171
  setUserSettings: (state, action) => {
3100
3172
  state.userSettingsInitialized = true;
3101
- state.userSettings = __spreadValues(__spreadValues({}, state.userSettings), action.payload);
3173
+ state.userSettings = {
3174
+ ...state.userSettings,
3175
+ ...action.payload
3176
+ };
3102
3177
  },
3103
3178
  setTooltipState: (state, action) => {
3104
3179
  const { id, readState = READ_STATES.read } = action.payload;
3105
3180
  state.tooltips.byId[id].readState = readState;
3106
3181
  },
3107
3182
  setTooltipsState: (state, action) => {
3108
- state.tooltips.byId = __spreadValues(__spreadValues({}, state.tooltips.byId), action.payload);
3183
+ state.tooltips.byId = {
3184
+ ...state.tooltips.byId,
3185
+ ...action.payload
3186
+ };
3109
3187
  },
3110
3188
  setShowFeedbackDialog: (state, action) => {
3111
3189
  state.showFeedbackDialog = action.payload;
@@ -3122,7 +3200,16 @@ var actions8 = usersSlice.actions;
3122
3200
  var usersSlice_default = usersSlice.reducer;
3123
3201
 
3124
3202
  // src/actions.ts
3125
- var actions_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, actions), actions2), actions3), actions4), actions5), actions6), actions7), actions8);
3203
+ var actions_default = {
3204
+ ...actions,
3205
+ ...actions2,
3206
+ ...actions3,
3207
+ ...actions4,
3208
+ ...actions5,
3209
+ ...actions6,
3210
+ ...actions7,
3211
+ ...actions8
3212
+ };
3126
3213
 
3127
3214
  // src/store.ts
3128
3215
  var import_toolkit17 = require("@reduxjs/toolkit");
@@ -3157,8 +3244,9 @@ var sessionReducer = (state, action) => {
3157
3244
  return rootReducer(state, action);
3158
3245
  };
3159
3246
  var getConfiguredStore = (options = {}) => {
3160
- const _a = options, { preloadedState = {} } = _a, config = __objRest(_a, ["preloadedState"]);
3161
- return (0, import_toolkit17.configureStore)(__spreadProps(__spreadValues({}, config), {
3247
+ const { preloadedState = {}, ...config } = options;
3248
+ return (0, import_toolkit17.configureStore)({
3249
+ ...config,
3162
3250
  preloadedState,
3163
3251
  reducer: sessionReducer,
3164
3252
  middleware: (getDefaultMiddleware) => getDefaultMiddleware({
@@ -3171,7 +3259,7 @@ var getConfiguredStore = (options = {}) => {
3171
3259
  ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
3172
3260
  }
3173
3261
  })
3174
- }));
3262
+ });
3175
3263
  };
3176
3264
  var store = getConfiguredStore({
3177
3265
  preloadedState: {}
@@ -3186,13 +3274,15 @@ var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
3186
3274
  var deriveDeploymentGroup = ({ filter = {}, group, groups = [], name }) => group || groups.length === 1 && !(0, import_isUUID.default)(name) ? groups[0] : filter.name;
3187
3275
  var transformDeployments = (deployments, deploymentsById) => deployments.sort(import_helpers7.startTimeSort).reduce(
3188
3276
  (accu, item) => {
3189
- var _a, _b2;
3190
- const filter = (_a = item.filter) != null ? _a : {};
3191
- let deployment = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, deploymentPrototype), deploymentsById[item.id]), item), {
3192
- filter: item.filter ? __spreadProps(__spreadValues({}, filter), { name: (_b2 = filter.name) != null ? _b2 : filter.id, filters: mapTermsToFilters(filter.terms) }) : void 0,
3277
+ const filter = item.filter ?? {};
3278
+ let deployment = {
3279
+ ...deploymentPrototype,
3280
+ ...deploymentsById[item.id],
3281
+ ...item,
3282
+ filter: item.filter ? { ...filter, name: filter.name ?? filter.id, filters: mapTermsToFilters(filter.terms) } : void 0,
3193
3283
  name: decodeURIComponent(item.name)
3194
- });
3195
- deployment = __spreadProps(__spreadValues({}, deployment), { group: deriveDeploymentGroup(deployment) });
3284
+ };
3285
+ deployment = { ...deployment, group: deriveDeploymentGroup(deployment) };
3196
3286
  accu.deployments[item.id] = deployment;
3197
3287
  accu.deploymentIds.push(item.id);
3198
3288
  return accu;
@@ -3246,11 +3336,12 @@ var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/cre
3246
3336
  return request.catch((err) => commonErrorHandler(err, "Error creating deployment.", dispatch)).then((data) => {
3247
3337
  const lastslashindex = data.headers.location.lastIndexOf("/");
3248
3338
  const deploymentId = data.headers.location.substring(lastslashindex + 1);
3249
- const deployment = __spreadProps(__spreadValues({}, newDeployment), {
3339
+ const deployment = {
3340
+ ...newDeployment,
3250
3341
  id: deploymentId,
3251
3342
  devices: newDeployment.devices ? newDeployment.devices.map((id) => ({ id, status: "pending" })) : [],
3252
3343
  statistics: { status: {} }
3253
- });
3344
+ };
3254
3345
  let tasks = [
3255
3346
  dispatch(actions2.createdDeployment(deployment)),
3256
3347
  dispatch(getSingleDeployment(deploymentId)),
@@ -3393,14 +3484,23 @@ var updateDeploymentControlMap = (0, import_toolkit18.createAsyncThunk)(
3393
3484
  ({ deploymentId, updateControlMap }, { dispatch }) => general_api_default.patch(`${deploymentsApiUrl}/deployments/${deploymentId}`, { update_control_map: updateControlMap }).catch((err) => commonErrorHandler(err, "There was an error while updating the deployment status:", dispatch)).then(() => Promise.resolve(dispatch(getSingleDeployment(deploymentId))))
3394
3485
  );
3395
3486
  var setDeploymentsState = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/setDeploymentsState`, (selection, { dispatch, getState }) => {
3396
- const _a = selection, { page, perPage } = _a, selectionState = __objRest(_a, ["page", "perPage"]);
3487
+ const { page, perPage, ...selectionState } = selection;
3397
3488
  const currentState = getState().deployments.selectionState;
3398
- let nextState = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, currentState), selectionState), Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
3399
- accu[item] = __spreadValues(__spreadValues({}, currentState[item]), selectionState[item]);
3400
- return accu;
3401
- }, {})), {
3402
- general: __spreadValues(__spreadValues({}, currentState.general), selectionState.general)
3403
- });
3489
+ let nextState = {
3490
+ ...currentState,
3491
+ ...selectionState,
3492
+ ...Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
3493
+ accu[item] = {
3494
+ ...currentState[item],
3495
+ ...selectionState[item]
3496
+ };
3497
+ return accu;
3498
+ }, {}),
3499
+ general: {
3500
+ ...currentState.general,
3501
+ ...selectionState.general
3502
+ }
3503
+ };
3404
3504
  let tasks = [dispatch(actions2.setDeploymentsState(nextState))];
3405
3505
  if (nextState.selectedId && currentState.selectedId !== nextState.selectedId) {
3406
3506
  tasks.push(dispatch(getSingleDeployment(nextState.selectedId)));
@@ -3430,15 +3530,20 @@ var getDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(
3430
3530
  const { binary_delta = {}, binary_delta_limits = {} } = delta;
3431
3531
  const { xdelta_args = {}, timeout: timeoutConfig = oldConfig.binaryDelta.timeout } = binary_delta;
3432
3532
  const { xdelta_args_limits = {}, timeout: timeoutLimit = oldConfig.binaryDeltaLimits.timeout } = binary_delta_limits;
3433
- const config = __spreadProps(__spreadValues({}, oldConfig), {
3533
+ const config = {
3534
+ ...oldConfig,
3434
3535
  hasDelta: Boolean(delta.enabled),
3435
- binaryDelta: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDelta), {
3436
- timeout: timeoutConfig
3437
- }), mapExternalDeltaConfig(xdelta_args)),
3438
- binaryDeltaLimits: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDeltaLimits), {
3439
- timeout: timeoutLimit
3440
- }), mapExternalDeltaConfig(xdelta_args_limits))
3441
- });
3536
+ binaryDelta: {
3537
+ ...oldConfig.binaryDelta,
3538
+ timeout: timeoutConfig,
3539
+ ...mapExternalDeltaConfig(xdelta_args)
3540
+ },
3541
+ binaryDeltaLimits: {
3542
+ ...oldConfig.binaryDeltaLimits,
3543
+ timeout: timeoutLimit,
3544
+ ...mapExternalDeltaConfig(xdelta_args_limits)
3545
+ }
3546
+ };
3442
3547
  return Promise.resolve(dispatch(actions2.setDeploymentsConfig(config)));
3443
3548
  })
3444
3549
  );
@@ -3448,7 +3553,7 @@ var deepClean = (source) => Object.entries(source).reduce((accu, [key, value]) =
3448
3553
  if (cleanedValue === void 0 || typeof cleanedValue === "object" && (0, import_helpers7.isEmpty)(cleanedValue)) {
3449
3554
  return accu;
3450
3555
  }
3451
- accu = __spreadProps(__spreadValues({}, accu != null ? accu : {}), { [key]: cleanedValue });
3556
+ accu = { ...accu ?? {}, [key]: cleanedValue };
3452
3557
  }
3453
3558
  return accu;
3454
3559
  }, void 0);
@@ -3468,9 +3573,13 @@ var saveDeltaDeploymentsConfig = (0, import_toolkit18.createAsyncThunk)(`${slice
3468
3573
  }
3469
3574
  return general_api_default.put(`${deploymentsApiUrl}/config/binary_delta`, result).catch((err) => commonErrorHandler(err, "There was a problem storing your delta artifact generation configuration.", dispatch)).then(() => {
3470
3575
  const oldConfig = getState().deployments.config;
3471
- const newConfig = __spreadProps(__spreadValues({}, oldConfig), {
3472
- binaryDelta: __spreadValues(__spreadValues({}, oldConfig.binaryDelta), config)
3473
- });
3576
+ const newConfig = {
3577
+ ...oldConfig,
3578
+ binaryDelta: {
3579
+ ...oldConfig.binaryDelta,
3580
+ ...config
3581
+ }
3582
+ };
3474
3583
  return Promise.all([dispatch(actions2.setDeploymentsConfig(newConfig)), dispatch(setSnackbar2("Settings saved successfully"))]);
3475
3584
  });
3476
3585
  });
@@ -3483,19 +3592,20 @@ var import_toolkit19 = require("@reduxjs/toolkit");
3483
3592
  var import_axios2 = require("axios");
3484
3593
  var import_pluralize = __toESM(require_pluralize());
3485
3594
 
3486
- // ../../node_modules/uuid/dist/esm-node/rng.js
3487
- var import_crypto = __toESM(require("crypto"));
3488
- var rnds8Pool = new Uint8Array(256);
3489
- var poolPtr = rnds8Pool.length;
3595
+ // ../../node_modules/uuid/dist/esm-browser/rng.js
3596
+ var getRandomValues;
3597
+ var rnds8 = new Uint8Array(16);
3490
3598
  function rng() {
3491
- if (poolPtr > rnds8Pool.length - 16) {
3492
- import_crypto.default.randomFillSync(rnds8Pool);
3493
- poolPtr = 0;
3599
+ if (!getRandomValues) {
3600
+ getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
3601
+ if (!getRandomValues) {
3602
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3603
+ }
3494
3604
  }
3495
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
3605
+ return getRandomValues(rnds8);
3496
3606
  }
3497
3607
 
3498
- // ../../node_modules/uuid/dist/esm-node/stringify.js
3608
+ // ../../node_modules/uuid/dist/esm-browser/stringify.js
3499
3609
  var byteToHex = [];
3500
3610
  for (let i = 0; i < 256; ++i) {
3501
3611
  byteToHex.push((i + 256).toString(16).slice(1));
@@ -3504,13 +3614,13 @@ function unsafeStringify(arr, offset = 0) {
3504
3614
  return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
3505
3615
  }
3506
3616
 
3507
- // ../../node_modules/uuid/dist/esm-node/native.js
3508
- var import_crypto2 = __toESM(require("crypto"));
3617
+ // ../../node_modules/uuid/dist/esm-browser/native.js
3618
+ var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3509
3619
  var native_default = {
3510
- randomUUID: import_crypto2.default.randomUUID
3620
+ randomUUID
3511
3621
  };
3512
3622
 
3513
- // ../../node_modules/uuid/dist/esm-node/v4.js
3623
+ // ../../node_modules/uuid/dist/esm-browser/v4.js
3514
3624
  function v4(options, buf, offset) {
3515
3625
  if (native_default.randomUUID && !buf && !options) {
3516
3626
  return native_default.randomUUID();
@@ -3552,14 +3662,13 @@ var getGroups2 = (0, import_toolkit19.createAsyncThunk)(
3552
3662
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrl}/groups`).then((res) => {
3553
3663
  const state = getGroupsById(getState());
3554
3664
  const dynamicGroups = Object.entries(state).reduce((accu, [id, group]) => {
3555
- var _a;
3556
- if (group.id || ((_a = group.filters) == null ? void 0 : _a.length) && id !== UNGROUPED_GROUP.id) {
3665
+ if (group.id || group.filters?.length && id !== UNGROUPED_GROUP.id) {
3557
3666
  accu[id] = group;
3558
3667
  }
3559
3668
  return accu;
3560
3669
  }, {});
3561
3670
  const groups = res.data.reduce((accu, group) => {
3562
- accu[group] = __spreadValues({ deviceIds: [], filters: [], total: 0 }, state[group]);
3671
+ accu[group] = { deviceIds: [], filters: [], total: 0, ...state[group] };
3563
3672
  return accu;
3564
3673
  }, dynamicGroups);
3565
3674
  const filters = [{ key: "group", value: res.data, operator: DEVICE_FILTERING_OPTIONS.$nin.key, scope: "system" }];
@@ -3617,7 +3726,7 @@ var addStaticGroup = (0, import_toolkit19.createAsyncThunk)(
3617
3726
  () => Promise.resolve(
3618
3727
  dispatch(
3619
3728
  actions3.addGroup({
3620
- group: __spreadValues({ deviceIds: [], total: 0, filters: [] }, getState().devices.groups.byId[group]),
3729
+ group: { deviceIds: [], total: 0, filters: [], ...getState().devices.groups.byId[group] },
3621
3730
  groupName: group
3622
3731
  })
3623
3732
  )
@@ -3645,20 +3754,19 @@ var getDynamicGroups = (0, import_toolkit19.createAsyncThunk)(
3645
3754
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
3646
3755
  const state = getGroupsById(getState());
3647
3756
  const staticGroups = Object.entries(state).reduce((accu, [id, group]) => {
3648
- var _a;
3649
- if (!(group.id || ((_a = group.filters) == null ? void 0 : _a.length))) {
3757
+ if (!(group.id || group.filters?.length)) {
3650
3758
  accu[id] = group;
3651
3759
  }
3652
3760
  return accu;
3653
3761
  }, {});
3654
3762
  const groups = (filters || []).reduce((accu, filter) => {
3655
- accu[filter.name] = __spreadProps(__spreadValues({
3763
+ accu[filter.name] = {
3656
3764
  deviceIds: [],
3657
- total: 0
3658
- }, state[filter.name]), {
3765
+ total: 0,
3766
+ ...state[filter.name],
3659
3767
  id: filter.id,
3660
3768
  filters: mapTermsToFilters(filter.terms)
3661
- });
3769
+ };
3662
3770
  return accu;
3663
3771
  }, staticGroups);
3664
3772
  return Promise.resolve(dispatch(actions3.receivedGroups(groups)));
@@ -3698,10 +3806,9 @@ var removeDynamicGroup = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/r
3698
3806
  );
3699
3807
  });
3700
3808
  var getGroupFilters = (group, groupsState, filters = []) => {
3701
- var _a;
3702
3809
  const groupName = group === UNGROUPED_GROUP.id || group === UNGROUPED_GROUP.name ? UNGROUPED_GROUP.id : group;
3703
3810
  const selectedGroup = groupsState.byId[groupName];
3704
- const groupFilterLength = ((_a = selectedGroup == null ? void 0 : selectedGroup.filters) == null ? void 0 : _a.length) || 0;
3811
+ const groupFilterLength = selectedGroup?.filters?.length || 0;
3705
3812
  const cleanedFilters = groupFilterLength ? [...filters, ...selectedGroup.filters].filter(filtersFilter) : filters;
3706
3813
  return { cleanedFilters, groupName, selectedGroup, groupFilterLength };
3707
3814
  };
@@ -3724,7 +3831,6 @@ var selectGroup = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/selectGr
3724
3831
  var getEarliestTs = (dateA = "", dateB = "") => !dateA || !dateB ? dateA || dateB : dateA < dateB ? dateA : dateB;
3725
3832
  var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
3726
3833
  (accu, device) => {
3727
- var _a, _b2, _c;
3728
3834
  const stateDevice = getDeviceById(state, device.id);
3729
3835
  const {
3730
3836
  attributes: storedAttributes = {},
@@ -3734,29 +3840,29 @@ var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
3734
3840
  group: storedGroup
3735
3841
  } = stateDevice;
3736
3842
  const { identity, inventory, monitor, system = {}, tags } = mapDeviceAttributes(device.attributes);
3737
- device.tags = __spreadValues(__spreadValues({}, storedTags), tags);
3738
- device.group = (_a = system.group) != null ? _a : storedGroup;
3739
- device.monitor = __spreadValues(__spreadValues({}, storedMonitor), monitor);
3740
- device.identity_data = __spreadValues(__spreadValues(__spreadValues({}, storedIdentity), identity), device.identity_data ? device.identity_data : {});
3843
+ device.tags = { ...storedTags, ...tags };
3844
+ device.group = system.group ?? storedGroup;
3845
+ device.monitor = { ...storedMonitor, ...monitor };
3846
+ device.identity_data = { ...storedIdentity, ...identity, ...device.identity_data ? device.identity_data : {} };
3741
3847
  device.status = status ? status : device.status || identity.status;
3742
- device.check_in_time_rounded = (_b2 = system.check_in_time) != null ? _b2 : stateDevice.check_in_time_rounded;
3743
- device.check_in_time_exact = (_c = device.check_in_time) != null ? _c : stateDevice.check_in_time_exact;
3848
+ device.check_in_time_rounded = system.check_in_time ?? stateDevice.check_in_time_rounded;
3849
+ device.check_in_time_exact = device.check_in_time ?? stateDevice.check_in_time_exact;
3744
3850
  device.created_ts = getEarliestTs(getEarliestTs(system.created_ts, device.created_ts), stateDevice.created_ts);
3745
3851
  device.updated_ts = device.attributes ? device.updated_ts : stateDevice.updated_ts;
3746
3852
  device.isNew = new Date(device.created_ts) > new Date(state.app.newThreshold);
3747
3853
  device.isOffline = new Date(device.check_in_time_rounded) < new Date(state.app.offlineThreshold) || device.check_in_time_rounded === void 0;
3748
- device.attributes = device.attributes ? __spreadValues(__spreadValues({}, storedAttributes), inventory) : storedAttributes;
3749
- accu.devicesById[device.id] = __spreadValues(__spreadValues({}, stateDevice), device);
3854
+ device.attributes = device.attributes ? { ...storedAttributes, ...inventory } : storedAttributes;
3855
+ accu.devicesById[device.id] = { ...stateDevice, ...device };
3750
3856
  accu.ids.push(device.id);
3751
3857
  return accu;
3752
3858
  },
3753
3859
  { ids, devicesById: {} }
3754
3860
  );
3755
3861
  var getGroupDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/getGroupDevices`, (options, { dispatch, getState }) => {
3756
- const _a = options, { group, shouldIncludeAllStates } = _a, remainder = __objRest(_a, ["group", "shouldIncludeAllStates"]);
3862
+ const { group, shouldIncludeAllStates, ...remainder } = options;
3757
3863
  const { cleanedFilters: filterSelection } = getGroupFilters(group, getState().devices.groups);
3758
3864
  return Promise.resolve(
3759
- dispatch(getDevicesByStatus2(__spreadProps(__spreadValues({}, remainder), { filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted })))
3865
+ dispatch(getDevicesByStatus2({ ...remainder, filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted }))
3760
3866
  ).unwrap().then((results) => {
3761
3867
  if (!group) {
3762
3868
  return Promise.resolve();
@@ -3770,7 +3876,7 @@ var getGroupDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/getG
3770
3876
  dispatch(
3771
3877
  actions3.addGroup({
3772
3878
  group: {
3773
- deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > (stateGroup == null ? void 0 : stateGroup.deviceIds) ? deviceAccu.ids : stateGroup.deviceIds,
3879
+ deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > stateGroup?.deviceIds ? deviceAccu.ids : stateGroup.deviceIds,
3774
3880
  total
3775
3881
  },
3776
3882
  groupName: group
@@ -3919,27 +4025,26 @@ var getDeviceLimit2 = (0, import_toolkit19.createAsyncThunk)(
3919
4025
  );
3920
4026
  var setDeviceListState = (0, import_toolkit19.createAsyncThunk)(
3921
4027
  `${sliceName3}/setDeviceListState`,
3922
- (_a, { dispatch, getState }) => {
3923
- var _b2 = _a, { shouldSelectDevices = true, forceRefresh, fetchAuth = true } = _b2, selectionState = __objRest(_b2, ["shouldSelectDevices", "forceRefresh", "fetchAuth"]);
3924
- var _c;
4028
+ ({ shouldSelectDevices = true, forceRefresh, fetchAuth = true, ...selectionState }, { dispatch, getState }) => {
3925
4029
  const currentState = getDeviceListState(getState());
3926
4030
  const refreshTrigger = forceRefresh ? !currentState.refreshTrigger : selectionState.refreshTrigger;
3927
- let nextState = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, currentState), {
4031
+ let nextState = {
4032
+ ...currentState,
3928
4033
  setOnly: false,
3929
- refreshTrigger
3930
- }), selectionState), {
3931
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
3932
- });
4034
+ refreshTrigger,
4035
+ ...selectionState,
4036
+ sort: { ...currentState.sort, ...selectionState.sort }
4037
+ };
3933
4038
  let tasks = [];
3934
- const _a2 = currentState, { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection } = _a2, currentRequestState = __objRest(_a2, ["isLoading", "deviceIds", "selection"]);
3935
- const _b3 = nextState, { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection } = _b3, nextRequestState = __objRest(_b3, ["isLoading", "deviceIds", "selection"]);
4039
+ const { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection, ...currentRequestState } = currentState;
4040
+ const { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection, ...nextRequestState } = nextState;
3936
4041
  if (!nextState.setOnly && !(0, import_helpers8.deepCompare)(currentRequestState, nextRequestState)) {
3937
- const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = (_c = nextState.sort) != null ? _c : {};
4042
+ const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = nextState.sort ?? {};
3938
4043
  const sortBy = sortCol ? [{ attribute: sortCol, order: sortDown, scope: sortScope }] : void 0;
3939
4044
  const applicableSelectedState = nextState.state === ALL_DEVICE_STATES ? void 0 : nextState.state;
3940
4045
  nextState.isLoading = true;
3941
4046
  tasks.push(
3942
- dispatch(getDevicesByStatus2(__spreadProps(__spreadValues({}, nextState), { status: applicableSelectedState, sortOptions: sortBy, fetchAuth }))).unwrap().then((results) => {
4047
+ dispatch(getDevicesByStatus2({ ...nextState, status: applicableSelectedState, sortOptions: sortBy, fetchAuth })).unwrap().then((results) => {
3943
4048
  const { deviceAccu, total } = results[results.length - 1];
3944
4049
  const devicesState = shouldSelectDevices ? { deviceIds: deviceAccu.ids, total, isLoading: false } : { isLoading: false };
3945
4050
  return Promise.resolve(dispatch(actions3.setDeviceListState(devicesState)));
@@ -3964,8 +4069,8 @@ var getDevicesByStatus2 = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/
3964
4069
  } = options;
3965
4070
  const state = getState();
3966
4071
  const { applicableFilters, filterTerms } = convertDeviceListStateToFilters({
3967
- filters: filterSelection != null ? filterSelection : getDeviceFilters(state),
3968
- group: group != null ? group : getSelectedGroup(state),
4072
+ filters: filterSelection ?? getDeviceFilters(state),
4073
+ group: group ?? getSelectedGroup(state),
3969
4074
  groups: state.devices.groups,
3970
4075
  offlineThreshold: state.app.offlineThreshold,
3971
4076
  selectedIssues,
@@ -4026,7 +4131,7 @@ var getAllDevicesByStatus = (0, import_toolkit19.createAsyncThunk)(`${sliceName3
4026
4131
  });
4027
4132
  var searchDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/searchDevices`, (passedOptions = {}, { dispatch, getState }) => {
4028
4133
  const state = getState();
4029
- let options = __spreadValues(__spreadValues({}, state.app.searchState), passedOptions);
4134
+ let options = { ...state.app.searchState, ...passedOptions };
4030
4135
  const { page = defaultPage2, searchTerm, sortOptions = [] } = options;
4031
4136
  const { columnSelection = [] } = getUserSettings(state);
4032
4137
  const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
@@ -4161,8 +4266,7 @@ var getSessionDetails = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/ge
4161
4266
  ({ data: auditLogEntries }) => {
4162
4267
  const { start, end } = auditLogEntries.reduce(
4163
4268
  (accu, item) => {
4164
- var _a, _b2;
4165
- if ((_b2 = (_a = item.meta) == null ? void 0 : _a.session_id) == null ? void 0 : _b2.includes(sessionId)) {
4269
+ if (item.meta?.session_id?.includes(sessionId)) {
4166
4270
  accu.start = new Date(item.action.startsWith("open") ? item.time : accu.start);
4167
4271
  accu.end = new Date(item.action.startsWith("close") ? item.time : accu.end);
4168
4272
  }
@@ -4269,8 +4373,7 @@ var decommissionDevice = (0, import_toolkit19.createAsyncThunk)(
4269
4373
  var getDeviceConfig = (0, import_toolkit19.createAsyncThunk)(
4270
4374
  `${sliceName3}/getDeviceConfig`,
4271
4375
  (deviceId, { dispatch }) => general_api_default.get(`${deviceConfig}/${deviceId}`).then(({ data }) => Promise.all([dispatch(actions3.receivedDevice({ id: deviceId, config: data })), Promise.resolve(data)])).catch((err) => {
4272
- var _a, _b2;
4273
- if (((_b2 = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b2.error.status_code) !== 404) {
4376
+ if (err.response?.data?.error.status_code !== 404) {
4274
4377
  return commonErrorHandler(err, `There was an error retrieving the configuration for device ${deviceId}.`, dispatch, commonErrorFallback);
4275
4378
  }
4276
4379
  })
@@ -4282,15 +4385,14 @@ var setDeviceConfig = (0, import_toolkit19.createAsyncThunk)(
4282
4385
  var applyDeviceConfig = (0, import_toolkit19.createAsyncThunk)(
4283
4386
  `${sliceName3}/applyDeviceConfig`,
4284
4387
  ({ deviceId, configDeploymentConfiguration, isDefault, config }, { dispatch, getState }) => general_api_default.post(`${deviceConfig}/${deviceId}/deploy`, configDeploymentConfiguration).catch((err) => commonErrorHandler(err, `There was an error deploying the configuration to device ${deviceId}.`, dispatch, commonErrorFallback)).then(({ data }) => {
4285
- var _a;
4286
4388
  const device = getDeviceById(getState(), deviceId);
4287
4389
  const { canManageUsers } = getUserCapabilities(getState());
4288
4390
  let tasks = [
4289
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { config: __spreadProps(__spreadValues({}, device.config), { deployment_id: data.deployment_id }) }))),
4391
+ dispatch(actions3.receivedDevice({ ...device, config: { ...device.config, deployment_id: data.deployment_id } })),
4290
4392
  new Promise((resolve) => setTimeout(() => resolve(dispatch(getSingleDeployment(data.deployment_id))), TIMEOUTS.oneSecond))
4291
4393
  ];
4292
4394
  if (isDefault && canManageUsers) {
4293
- const { previous } = (_a = getGlobalSettings(getState()).defaultDeviceConfig) != null ? _a : {};
4395
+ const { previous } = getGlobalSettings(getState()).defaultDeviceConfig ?? {};
4294
4396
  tasks.push(dispatch(saveGlobalSettings({ defaultDeviceConfig: { current: config, previous } })));
4295
4397
  }
4296
4398
  return Promise.all(tasks);
@@ -4306,21 +4408,21 @@ var setDeviceTags = (0, import_toolkit19.createAsyncThunk)(
4306
4408
  `${inventoryApiUrl}/devices/${deviceId}/tags`,
4307
4409
  Object.entries(tags).map(([name, value]) => ({ name, value })),
4308
4410
  { headers }
4309
- ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { id: deviceId, tags }))), dispatch(setSnackbar3("Device name changed"))]));
4411
+ ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice({ ...device, id: deviceId, tags })), dispatch(setSnackbar3("Device name changed"))]));
4310
4412
  })
4311
4413
  )
4312
4414
  );
4313
4415
  var getDeviceTwin = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/getDeviceTwin`, ({ deviceId, integration }, { dispatch, getState }) => {
4314
4416
  let providerResult = {};
4315
4417
  return general_api_default.get(`${iotManagerBaseURL}/devices/${deviceId}/state`).then(({ data }) => {
4316
- providerResult = __spreadProps(__spreadValues({}, data), { twinError: "" });
4418
+ providerResult = { ...data, twinError: "" };
4317
4419
  }).catch((err) => {
4318
4420
  providerResult = {
4319
4421
  twinError: `There was an error getting the ${EXTERNAL_PROVIDER[integration.provider].twinTitle.toLowerCase()} for device ${deviceId}. ${err}`
4320
4422
  };
4321
4423
  }).finally(() => {
4322
4424
  const device = getDeviceById(getState(), deviceId);
4323
- Promise.resolve(dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadValues(__spreadValues({}, device.twinsByIntegration), providerResult) }))));
4425
+ Promise.resolve(dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...device.twinsByIntegration, ...providerResult } })));
4324
4426
  });
4325
4427
  });
4326
4428
  var setDeviceTwin = (0, import_toolkit19.createAsyncThunk)(
@@ -4336,7 +4438,7 @@ var setDeviceTwin = (0, import_toolkit19.createAsyncThunk)(
4336
4438
  const { twinsByIntegration = {} } = device;
4337
4439
  const { [integration.id]: currentState = {} } = twinsByIntegration;
4338
4440
  return Promise.resolve(
4339
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadProps(__spreadValues({}, twinsByIntegration), { [integration.id]: __spreadProps(__spreadValues({}, currentState), { desired: settings }) }) })))
4441
+ dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...twinsByIntegration, [integration.id]: { ...currentState, desired: settings } } }))
4340
4442
  );
4341
4443
  })
4342
4444
  );
@@ -4357,8 +4459,8 @@ var getSystemDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/get
4357
4459
  const { attributes: deviceAttributes = {} } = getDeviceById(state, id);
4358
4460
  const { mender_gateway_system_id = "" } = deviceAttributes;
4359
4461
  const filters = [
4360
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" }),
4361
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
4462
+ { ...emptyFilter, key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" },
4463
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
4362
4464
  ];
4363
4465
  const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
4364
4466
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -4370,11 +4472,12 @@ var getSystemDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/get
4370
4472
  }).catch((err) => commonErrorHandler(err, `There was an error getting system devices device ${id}.`, dispatch, "Please check your connection.")).then(({ data, headers }) => {
4371
4473
  const state2 = getState();
4372
4474
  const { devicesById, ids } = reduceReceivedDevices(data, [], state2);
4373
- const device = __spreadProps(__spreadValues({}, getDeviceById(state2, id)), {
4475
+ const device = {
4476
+ ...getDeviceById(state2, id),
4374
4477
  systemDeviceIds: ids,
4375
4478
  systemDeviceTotal: Number(headers[headerNames.total])
4376
- });
4377
- return Promise.resolve(dispatch(actions3.receivedDevices(__spreadProps(__spreadValues({}, devicesById), { [id]: device }))));
4479
+ };
4480
+ return Promise.resolve(dispatch(actions3.receivedDevices({ ...devicesById, [id]: device })));
4378
4481
  });
4379
4482
  });
4380
4483
  var getGatewayDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/getGatewayDevices`, (deviceId, { dispatch, getState }) => {
@@ -4382,9 +4485,9 @@ var getGatewayDevices = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/ge
4382
4485
  const { attributes = {} } = getDeviceById(state, deviceId);
4383
4486
  const { mender_gateway_system_id = "" } = attributes;
4384
4487
  const filters = [
4385
- __spreadProps(__spreadValues({}, emptyFilter), { key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" }),
4386
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", value: "true", scope: "inventory" }),
4387
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
4488
+ { ...emptyFilter, key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" },
4489
+ { ...emptyFilter, key: "mender_is_gateway", value: "true", scope: "inventory" },
4490
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
4388
4491
  ];
4389
4492
  const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
4390
4493
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -4431,7 +4534,7 @@ var { page: defaultPage3, perPage: defaultPerPage3 } = DEVICE_LIST_DEFAULTS;
4431
4534
  var cutoffLength = 75;
4432
4535
  var ellipsis = "...";
4433
4536
  var longTextTrimmer = (text) => text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text;
4434
- var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => __spreadProps(__spreadValues({}, alert), { fullName: alert.name, name: longTextTrimmer(alert.name) }));
4537
+ var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));
4435
4538
  var getDeviceAlerts = (0, import_toolkit20.createAsyncThunk)(`${sliceName4}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
4436
4539
  const { page = defaultPage3, perPage = defaultPerPage3, issuedBefore, issuedAfter, sortAscending = false } = config;
4437
4540
  const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : "";
@@ -4449,14 +4552,15 @@ var getLatestDeviceAlerts = (0, import_toolkit20.createAsyncThunk)(`${sliceName4
4449
4552
  });
4450
4553
  var getIssueCountsByType2 = (0, import_toolkit20.createAsyncThunk)(`${sliceName4}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {
4451
4554
  const state = getState();
4452
- const _a = options, { filters = getDeviceFilters(state), group, status } = _a, remainder = __objRest(_a, ["filters", "group", "status"]);
4453
- const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters(__spreadProps(__spreadValues({}, remainder), {
4555
+ const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
4556
+ const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
4557
+ ...remainder,
4454
4558
  filters,
4455
4559
  group,
4456
4560
  offlineThreshold: state.app.offlineThreshold,
4457
4561
  selectedIssues: [type],
4458
4562
  status
4459
- }));
4563
+ });
4460
4564
  return general_api_default.post(getSearchEndpoint(getState()), {
4461
4565
  page: 1,
4462
4566
  per_page: 1,
@@ -4508,21 +4612,21 @@ var determineProgress = (acceptedDevices, pendingDevices, releases, pastDeployme
4508
4612
  return steps[progress2];
4509
4613
  };
4510
4614
  var deductOnboardingState = ({ devicesById, devicesByStatus, onboardingState, pastDeployments, releases, userCapabilities, userId }) => {
4511
- var _a;
4512
4615
  const { canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases } = userCapabilities;
4513
4616
  const userCookie = cookies3.get(`${userId}-onboarded`);
4514
4617
  const acceptedDevices = devicesByStatus[DEVICE_STATES.accepted].deviceIds;
4515
4618
  const pendingDevices = devicesByStatus[DEVICE_STATES.pending].deviceIds;
4516
- let deviceType = (_a = onboardingState.deviceType) != null ? _a : [];
4619
+ let deviceType = onboardingState.deviceType ?? [];
4517
4620
  deviceType = !deviceType.length && acceptedDevices.length && devicesById[acceptedDevices[0]].hasOwnProperty("attributes") ? devicesById[acceptedDevices[0]].attributes.device_type : deviceType;
4518
4621
  const progress2 = applyOnboardingFallbacks(onboardingState.progress || determineProgress(acceptedDevices, pendingDevices, releases, pastDeployments));
4519
- return __spreadProps(__spreadValues({}, onboardingState), {
4622
+ return {
4623
+ ...onboardingState,
4520
4624
  complete: !!(Boolean(userCookie) || onboardingState.complete || acceptedDevices.length > 1 && pendingDevices.length > 0 && releases.length > 1 && pastDeployments.length > 1 || acceptedDevices.length >= 1 && releases.length >= 2 && pastDeployments.length > 2 || acceptedDevices.length >= 1 && pendingDevices.length > 0 && releases.length >= 2 && pastDeployments.length >= 2 || orderedOnboardingSteps.findIndex((step) => step === progress2) >= orderedOnboardingSteps.length - 1 || onboardingState.disable || ![canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases].every((i) => i)),
4521
4625
  showTips: onboardingState.showTips != null ? onboardingState.showTips : true,
4522
4626
  deviceType,
4523
4627
  approach: onboardingState.approach || (deviceType.some((type) => type.startsWith("qemu")) ? "virtual" : "physical"),
4524
4628
  progress: progress2
4525
- });
4629
+ };
4526
4630
  };
4527
4631
  var getOnboardingState2 = (0, import_toolkit21.createAsyncThunk)(`${sliceName5}/getOnboardingState`, (_, { dispatch, getState }) => {
4528
4632
  const state = getState();
@@ -4580,7 +4684,7 @@ var advanceOnboarding = (0, import_toolkit21.createAsyncThunk)(`${sliceName5}/ad
4580
4684
  return;
4581
4685
  }
4582
4686
  const madeProgress = steps[stepIndex + 1];
4583
- const state = __spreadProps(__spreadValues({}, getOnboardingState(getState())), { progress: madeProgress });
4687
+ const state = { ...getOnboardingState(getState()), progress: madeProgress };
4584
4688
  state.complete = stepIndex + 1 >= steps.findIndex((step) => step === onboardingSteps.DEPLOYMENTS_PAST_COMPLETED_FAILURE) ? true : state.complete;
4585
4689
  return Promise.all([dispatch(actions5.setOnboardingProgress(madeProgress)), dispatch(saveUserSettings({ onboarding: state }))]);
4586
4690
  });
@@ -4663,8 +4767,8 @@ var completeUpgrade = (0, import_toolkit22.createAsyncThunk)(
4663
4767
  ({ tenantId, plan }, { dispatch }) => general_api_default.post(`${tenantadmApiUrlv2}/tenants/${tenantId}/upgrade/complete`, { plan }).catch((err) => commonErrorHandler(err, `There was an error upgrading your account:`, dispatch)).then(() => Promise.resolve(dispatch(getUserOrganization())))
4664
4768
  );
4665
4769
  var prepareAuditlogQuery = ({ startDate, endDate, user: userFilter, type, detail: detailFilter, sort = {} }) => {
4666
- const userId = (userFilter == null ? void 0 : userFilter.id) || userFilter;
4667
- const detail = (detailFilter == null ? void 0 : detailFilter.id) || detailFilter;
4770
+ const userId = userFilter?.id || userFilter;
4771
+ const detail = detailFilter?.id || detailFilter;
4668
4772
  const createdAfter = startDate ? `&created_after=${Math.round(Date.parse(startDate) / 1e3)}` : "";
4669
4773
  const createdBefore = endDate ? `&created_before=${Math.round(Date.parse(endDate) / 1e3)}` : "";
4670
4774
  const typeSearch = type ? `&object_type=${type.value}`.toLowerCase() : "";
@@ -4691,12 +4795,14 @@ var getAuditLogsCsvLink = (0, import_toolkit22.createAsyncThunk)(
4691
4795
  );
4692
4796
  var setAuditlogsState = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/setAuditlogsState`, (selectionState, { dispatch, getState }) => {
4693
4797
  const currentState = getAuditlogState(getState());
4694
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), selectionState), {
4695
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
4696
- });
4798
+ let nextState = {
4799
+ ...currentState,
4800
+ ...selectionState,
4801
+ sort: { ...currentState.sort, ...selectionState.sort }
4802
+ };
4697
4803
  let tasks = [];
4698
- const _a = currentState, { isLoading: currentLoading, selectedIssue: currentIssue } = _a, currentRequestState = __objRest(_a, ["isLoading", "selectedIssue"]);
4699
- const _b2 = nextState, { isLoading: selectionLoading, selectedIssue: selectionIssue } = _b2, selectionRequestState = __objRest(_b2, ["isLoading", "selectedIssue"]);
4804
+ const { isLoading: currentLoading, selectedIssue: currentIssue, ...currentRequestState } = currentState;
4805
+ const { isLoading: selectionLoading, selectedIssue: selectionIssue, ...selectionRequestState } = nextState;
4700
4806
  if (!(0, import_helpers10.deepCompare)(currentRequestState, selectionRequestState)) {
4701
4807
  nextState.isLoading = true;
4702
4808
  tasks.push(dispatch(getAuditLogs(nextState)).finally(() => dispatch(actions6.setAuditLogState({ isLoading: false }))));
@@ -4708,27 +4814,30 @@ var tenantDataDivergedMessage = "The system detected there is a change in your p
4708
4814
  var addTenant = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/createTenant`, (selectionState, { dispatch }) => {
4709
4815
  return general_api_default.post(`${tenantadmApiUrlv2}/tenants`, selectionState).then(() => Promise.all([dispatch(getTenants()), dispatch(setSnackbar4("Tenant was created successfully."))])).catch((err) => commonErrorHandler(err, "There was an error creating tenant", dispatch, commonErrorFallback));
4710
4816
  });
4711
- var tenantListRetrieval = (config) => __async(void 0, null, function* () {
4817
+ var tenantListRetrieval = async (config) => {
4712
4818
  const { page, perPage } = config;
4713
4819
  const params = new URLSearchParams({ page, per_page: perPage }).toString();
4714
- const tenantList = yield general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
4820
+ const tenantList = await general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
4715
4821
  const totalCount = tenantList.headers[headerNames.total] || TENANT_LIST_DEFAULT.perPage;
4716
- return [tenantList.data, totalCount];
4717
- });
4718
- var getTenants = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/getTenants`, (_0, _1) => __async(void 0, [_0, _1], function* (_, { dispatch, getState }) {
4822
+ return [tenantList.data, Number(totalCount)];
4823
+ };
4824
+ var getTenants = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/getTenants`, async (_, { dispatch, getState }) => {
4719
4825
  const currentState = getTenantsList(getState());
4720
- const [tenants, pageCount] = yield tenantListRetrieval(currentState);
4721
- dispatch(actions6.setTenantListState(__spreadProps(__spreadValues({}, currentState), { total: pageCount, tenants })));
4722
- }));
4723
- var setTenantsListState = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/setTenantsListState`, (_0, _1) => __async(void 0, [_0, _1], function* (selectionState, { dispatch, getState }) {
4826
+ const [tenants, pageCount] = await tenantListRetrieval(currentState);
4827
+ dispatch(actions6.setTenantListState({ ...currentState, total: pageCount, tenants }));
4828
+ });
4829
+ var setTenantsListState = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/setTenantsListState`, async (selectionState, { dispatch, getState }) => {
4724
4830
  const currentState = getTenantsList(getState());
4725
- const nextState = __spreadValues(__spreadValues({}, currentState), selectionState);
4831
+ const nextState = {
4832
+ ...currentState,
4833
+ ...selectionState
4834
+ };
4726
4835
  if (!(0, import_helpers10.deepCompare)(currentState, selectionState)) {
4727
- const [tenants, pageCount] = yield tenantListRetrieval(nextState);
4728
- return dispatch(actions6.setTenantListState(__spreadProps(__spreadValues({}, nextState), { tenants, total: pageCount })));
4836
+ const [tenants, pageCount] = await tenantListRetrieval(nextState);
4837
+ return dispatch(actions6.setTenantListState({ ...nextState, tenants, total: pageCount }));
4729
4838
  }
4730
- return dispatch(actions6.setTenantListState(__spreadValues({}, nextState)));
4731
- }));
4839
+ return dispatch(actions6.setTenantListState({ ...nextState }));
4840
+ });
4732
4841
  var editTenantDeviceLimit = (0, import_toolkit22.createAsyncThunk)(`${sliceName6}/editDeviceLimit`, ({ newLimit, id, name }, { dispatch }) => {
4733
4842
  return general_api_default.put(`${tenantadmApiUrlv2}/tenants/${id}/child`, { device_limit: newLimit, name }).catch((err) => commonErrorHandler(err, `Device Limit cannot be changed`, dispatch)).then(() => {
4734
4843
  const tasks = [Promise.resolve(dispatch(setSnackbar4("Device Limit was changed successfully")))];
@@ -4771,10 +4880,7 @@ var downloadLicenseReport = (0, import_toolkit22.createAsyncThunk)(
4771
4880
  );
4772
4881
  var createIntegration = (0, import_toolkit22.createAsyncThunk)(
4773
4882
  `${sliceName6}/createIntegration`,
4774
- (_a, { dispatch }) => {
4775
- var _b2 = _a, { id } = _b2, integration = __objRest(_b2, ["id"]);
4776
- return general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar4("The integration was set up successfully")), dispatch(getIntegrations())]));
4777
- }
4883
+ ({ id, ...integration }, { dispatch }) => general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar4("The integration was set up successfully")), dispatch(getIntegrations())]))
4778
4884
  );
4779
4885
  var changeIntegration = (0, import_toolkit22.createAsyncThunk)(
4780
4886
  `${sliceName6}/changeIntegration`,
@@ -4795,9 +4901,8 @@ var getIntegrations = (0, import_toolkit22.createAsyncThunk)(
4795
4901
  (_, { dispatch, getState }) => general_api_default.get(`${iotManagerBaseURL}/integrations`).catch((err) => commonErrorHandler(err, "There was an error retrieving the integration", dispatch, commonErrorFallback)).then(({ data }) => {
4796
4902
  const existingIntegrations = getState().organization.externalDeviceIntegrations;
4797
4903
  const integrations = data.reduce((accu, item) => {
4798
- var _a;
4799
- const existingIntegration = (_a = existingIntegrations.find((integration2) => item.id === integration2.id)) != null ? _a : {};
4800
- const integration = __spreadValues(__spreadValues({}, existingIntegration), item);
4904
+ const existingIntegration = existingIntegrations.find((integration2) => item.id === integration2.id) ?? {};
4905
+ const integration = { ...existingIntegration, ...item };
4801
4906
  accu.push(integration);
4802
4907
  return accu;
4803
4908
  }, []);
@@ -4849,7 +4954,7 @@ var getSsoConfigById = (0, import_toolkit22.createAsyncThunk)(
4849
4954
  `${sliceName6}/getSsoConfigById`,
4850
4955
  (config, { dispatch }) => general_api_default.get(`${ssoIdpApiUrlv1}/${config.id}`).catch((err) => dispatch(ssoConfigActionErrorHandler(err, "read"))).then(({ data, headers }) => {
4851
4956
  const sso = Object.values(SSO_TYPES).find(({ contentType }) => contentType === headers["content-type"]);
4852
- return sso ? Promise.resolve(__spreadProps(__spreadValues({}, config), { config: data, type: sso.id })) : Promise.reject("Unsupported SSO config content type.");
4957
+ return sso ? Promise.resolve({ ...config, config: data, type: sso.id }) : Promise.reject("Unsupported SSO config content type.");
4853
4958
  })
4854
4959
  );
4855
4960
  var getSsoConfigs = (0, import_toolkit22.createAsyncThunk)(
@@ -4868,20 +4973,21 @@ var { setSnackbar: setSnackbar5, initUpload: initUpload2, uploadProgress: upload
4868
4973
  var { page: defaultPage5, perPage: defaultPerPage5 } = DEVICE_LIST_DEFAULTS;
4869
4974
  var sortingDefaults = { direction: SORTING_OPTIONS.desc, key: "modified" };
4870
4975
  var flattenRelease = (release, stateRelease) => {
4871
- var _a;
4872
- const updatedArtifacts = ((_a = release.artifacts) == null ? void 0 : _a.sort((0, import_helpers11.customSort)(1, "modified"))) || [];
4976
+ const updatedArtifacts = release.artifacts?.sort((0, import_helpers11.customSort)(1, "modified")) || [];
4873
4977
  const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce(
4874
4978
  (accu, item) => {
4875
- var _a2;
4876
4979
  accu.deviceTypes.push(...item.device_types_compatible);
4877
- const stateArtifact = ((_a2 = stateRelease.artifacts) == null ? void 0 : _a2.find((releaseArtifact) => releaseArtifact.id === item.id)) || {};
4980
+ const stateArtifact = stateRelease.artifacts?.find((releaseArtifact) => releaseArtifact.id === item.id) || {};
4878
4981
  accu.modified = accu.modified ? accu.modified : item.modified;
4879
- accu.artifacts.push(__spreadValues(__spreadValues({}, stateArtifact), item));
4982
+ accu.artifacts.push({
4983
+ ...stateArtifact,
4984
+ ...item
4985
+ });
4880
4986
  return accu;
4881
4987
  },
4882
4988
  { artifacts: [], deviceTypes: [], modified: void 0 }
4883
4989
  );
4884
- return __spreadProps(__spreadValues(__spreadValues({}, stateRelease), release), { artifacts, device_types_compatible: deviceTypes.filter(import_helpers11.duplicateFilter), modified });
4990
+ return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(import_helpers11.duplicateFilter), modified };
4885
4991
  };
4886
4992
  var reduceReceivedReleases = (releases, stateReleasesById) => releases.reduce((accu, release) => {
4887
4993
  const stateRelease = stateReleasesById[release.name] || {};
@@ -4899,17 +5005,16 @@ var findArtifactIndexInRelease = (releases, id) => Object.values(releases).reduc
4899
5005
  { release: null, index: -1 }
4900
5006
  );
4901
5007
  var getArtifactInstallCount = (0, import_toolkit23.createAsyncThunk)(`${sliceName7}/getArtifactInstallCount`, (id, { dispatch, getState }) => {
4902
- var _a;
4903
5008
  let { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);
4904
5009
  if (!release || index === -1) {
4905
5010
  return;
4906
5011
  }
4907
5012
  const releaseArtifacts = [...release.artifacts];
4908
5013
  const artifact = releaseArtifacts[index];
4909
- const { key, name, version } = (_a = (0, import_helpers11.extractSoftwareItem)(artifact.artifact_provides)) != null ? _a : {};
5014
+ const { key, name, version } = (0, import_helpers11.extractSoftwareItem)(artifact.artifact_provides) ?? {};
4910
5015
  const attribute = `${key}${name ? `.${name}` : ""}.version`;
4911
5016
  const { filterTerms } = convertDeviceListStateToFilters({
4912
- filters: [__spreadProps(__spreadValues({}, emptyFilter), { key: attribute, value: version, scope: "inventory" })]
5017
+ filters: [{ ...emptyFilter, key: attribute, value: version, scope: "inventory" }]
4913
5018
  });
4914
5019
  return general_api_default.post(getSearchEndpoint(getState()), {
4915
5020
  page: 1,
@@ -4923,10 +5028,11 @@ var getArtifactInstallCount = (0, import_toolkit23.createAsyncThunk)(`${sliceNam
4923
5028
  }
4924
5029
  const installCount = Number(headers[headerNames.total]);
4925
5030
  const releaseArtifacts2 = [...release2.artifacts];
4926
- releaseArtifacts2[index2] = __spreadProps(__spreadValues({}, releaseArtifacts2[index2]), { installCount });
4927
- release2 = __spreadProps(__spreadValues({}, release2), {
5031
+ releaseArtifacts2[index2] = { ...releaseArtifacts2[index2], installCount };
5032
+ release2 = {
5033
+ ...release2,
4928
5034
  artifacts: releaseArtifacts2
4929
- });
5035
+ };
4930
5036
  return dispatch(actions7.receiveRelease(release2));
4931
5037
  });
4932
5038
  });
@@ -4938,12 +5044,14 @@ var getArtifactUrl = (0, import_toolkit23.createAsyncThunk)(
4938
5044
  return dispatch(getReleases());
4939
5045
  }
4940
5046
  const releaseArtifacts = [...release.artifacts];
4941
- releaseArtifacts[index] = __spreadProps(__spreadValues({}, releaseArtifacts[index]), {
5047
+ releaseArtifacts[index] = {
5048
+ ...releaseArtifacts[index],
4942
5049
  url: response.data.uri
4943
- });
4944
- release = __spreadProps(__spreadValues({}, release), {
5050
+ };
5051
+ release = {
5052
+ ...release,
4945
5053
  artifacts: releaseArtifacts
4946
- });
5054
+ };
4947
5055
  return dispatch(actions7.receiveRelease(release));
4948
5056
  })
4949
5057
  );
@@ -5068,12 +5176,14 @@ var selectRelease = (0, import_toolkit23.createAsyncThunk)(`${sliceName7}/select
5068
5176
  });
5069
5177
  var setReleasesListState = (0, import_toolkit23.createAsyncThunk)(`${sliceName7}/setReleasesListState`, (selectionState, { dispatch, getState }) => {
5070
5178
  const currentState = getState().releases.releasesList;
5071
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), selectionState), {
5072
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
5073
- });
5179
+ let nextState = {
5180
+ ...currentState,
5181
+ ...selectionState,
5182
+ sort: { ...currentState.sort, ...selectionState.sort }
5183
+ };
5074
5184
  let tasks = [];
5075
- const _a = currentState, { isLoading: currentLoading } = _a, currentRequestState = __objRest(_a, ["isLoading"]);
5076
- const _b2 = nextState, { isLoading: selectionLoading } = _b2, selectionRequestState = __objRest(_b2, ["isLoading"]);
5185
+ const { isLoading: currentLoading, ...currentRequestState } = currentState;
5186
+ const { isLoading: selectionLoading, ...selectionRequestState } = nextState;
5077
5187
  if (!(0, import_helpers11.deepCompare)(currentRequestState, selectionRequestState)) {
5078
5188
  nextState.isLoading = true;
5079
5189
  tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));
@@ -5092,29 +5202,30 @@ var releaseListRetrieval = (config) => {
5092
5202
  );
5093
5203
  };
5094
5204
  var deductSearchState = (receivedReleases, config, total, state) => {
5095
- let releaseListState = __spreadValues({}, state.releasesList);
5205
+ let releaseListState = { ...state.releasesList };
5096
5206
  const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;
5097
5207
  const flattenedReleases = Object.values(receivedReleases).sort((0, import_helpers11.customSort)(sort.direction === SORTING_OPTIONS.desc, sort.key));
5098
5208
  const releaseIds = flattenedReleases.map((item) => item.name);
5099
5209
  const isFiltering = !!(selectedTags.length || type || searchTerm);
5100
5210
  if (searchOnly) {
5101
- releaseListState = __spreadProps(__spreadValues({}, releaseListState), { searchedIds: releaseIds });
5211
+ releaseListState = { ...releaseListState, searchedIds: releaseIds };
5102
5212
  } else {
5103
- releaseListState = __spreadProps(__spreadValues({}, releaseListState), {
5213
+ releaseListState = {
5214
+ ...releaseListState,
5104
5215
  releaseIds,
5105
5216
  searchTotal: isFiltering ? total : state.releasesList.searchTotal,
5106
5217
  total: !isFiltering ? total : state.releasesList.total
5107
- });
5218
+ };
5108
5219
  }
5109
5220
  return releaseListState;
5110
5221
  };
5111
5222
  var getReleases = (0, import_toolkit23.createAsyncThunk)(`${sliceName7}/getReleases`, (passedConfig = {}, { dispatch, getState }) => {
5112
- const config = __spreadValues(__spreadValues({}, getState().releases.releasesList), passedConfig);
5223
+ const config = { ...getState().releases.releasesList, ...passedConfig };
5113
5224
  return releaseListRetrieval(config).then(({ data: receivedReleases = [], headers = {} }) => {
5114
5225
  const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;
5115
5226
  const state = getState().releases;
5116
5227
  const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);
5117
- const combinedReleases = __spreadValues(__spreadValues({}, state.byId), flatReleases);
5228
+ const combinedReleases = { ...state.byId, ...flatReleases };
5118
5229
  let tasks = [dispatch(actions7.receiveReleases(combinedReleases))];
5119
5230
  const releaseListState = deductSearchState(receivedReleases, config, total, state);
5120
5231
  tasks.push(dispatch(actions7.setReleaseListState(releaseListState)));
@@ -5135,7 +5246,7 @@ var updateReleaseInfo = (0, import_toolkit23.createAsyncThunk)(
5135
5246
  `${sliceName7}/updateReleaseInfo`,
5136
5247
  ({ name, info }, { dispatch, getState }) => general_api_default.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info).catch((err) => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch)).then(() => {
5137
5248
  return Promise.all([
5138
- dispatch(actions7.receiveRelease(__spreadProps(__spreadValues(__spreadValues({}, getReleasesById(getState())[name]), info), { name }))),
5249
+ dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),
5139
5250
  dispatch(setSnackbar5("Release details were updated successfully.", TIMEOUTS.fiveSeconds, ""))
5140
5251
  ]);
5141
5252
  })
@@ -5144,7 +5255,7 @@ var setReleaseTags = (0, import_toolkit23.createAsyncThunk)(
5144
5255
  `${sliceName7}/setReleaseTags`,
5145
5256
  ({ name, tags = [] }, { dispatch, getState }) => general_api_default.put(`${deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).catch((err) => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch)).then(() => {
5146
5257
  return Promise.all([
5147
- dispatch(actions7.receiveRelease(__spreadProps(__spreadValues({}, getReleasesById(getState())[name]), { name, tags }))),
5258
+ dispatch(actions7.receiveRelease({ ...getReleasesById(getState())[name], name, tags })),
5148
5259
  dispatch(setSnackbar5("Release tags were set successfully.", TIMEOUTS.fiveSeconds, ""))
5149
5260
  ]);
5150
5261
  })
@@ -5161,19 +5272,13 @@ var getUpdateTypes = (0, import_toolkit23.createAsyncThunk)(
5161
5272
  // src/api/users-api.ts
5162
5273
  var import_axios4 = __toESM(require("axios"));
5163
5274
  var Api2 = {
5164
- postLogin: (url, _a) => {
5165
- var _b2 = _a, { email: username, password } = _b2, body = __objRest(_b2, ["email", "password"]);
5166
- return import_axios4.default.post(url, body, __spreadProps(__spreadValues({}, commonRequestConfig), { auth: { username, password } })).then((res) => {
5167
- var _a2;
5168
- return { text: res.data, code: res.status, contentType: (_a2 = res.headers) == null ? void 0 : _a2["content-type"] };
5169
- });
5170
- },
5275
+ postLogin: (url, { email: username, password, ...body }) => import_axios4.default.post(url, body, { ...commonRequestConfig, auth: { username, password } }).then((res) => ({ text: res.data, code: res.status, contentType: res.headers?.["content-type"] })),
5171
5276
  putVerifyTFA: (url, userData) => {
5172
5277
  let body = {};
5173
5278
  if (userData.hasOwnProperty("token2fa")) {
5174
5279
  body = { token2fa: userData.token2fa };
5175
5280
  }
5176
- return import_axios4.default.put(url, body, __spreadProps(__spreadValues({}, commonRequestConfig), { headers: __spreadProps(__spreadValues({}, commonRequestConfig.headers), { Authorization: `Bearer ${getToken()}` }) }));
5281
+ return import_axios4.default.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
5177
5282
  }
5178
5283
  };
5179
5284
  var users_api_default = Api2;
@@ -5201,43 +5306,40 @@ var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) =>
5201
5306
  };
5202
5307
  var loginUser = (0, import_toolkit24.createAsyncThunk)(
5203
5308
  `${sliceName8}/loginUser`,
5204
- (_a, { dispatch, rejectWithValue }) => {
5205
- var _b2 = _a, { stayLoggedIn } = _b2, userData = __objRest(_b2, ["stayLoggedIn"]);
5206
- return users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, __spreadProps(__spreadValues({}, userData), { no_expiry: stayLoggedIn })).catch((err) => {
5207
- cleanUp();
5208
- return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
5209
- }).then(({ text: response, contentType }) => {
5210
- if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
5211
- const { id, kind } = response;
5212
- const type = kind.split("/")[1];
5213
- const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
5214
- window.location.replace(ssoLoginUrl);
5215
- return;
5216
- }
5217
- const token = response;
5218
- if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
5219
- return;
5220
- }
5221
- let now = /* @__PURE__ */ new Date();
5222
- now.setSeconds(now.getSeconds() + maxSessionAge);
5223
- const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
5224
- setSessionInfo({ token, expiresAt });
5225
- cookies5.remove("JWT", { path: "/" });
5226
- return (
5227
- // @ts-ignore
5228
- Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
5229
- cleanUp();
5230
- return Promise.reject(dispatch(setSnackbar6(extractErrorMessage(e))));
5231
- }).then(() => {
5232
- window.sessionStorage.removeItem("pendings-redirect");
5233
- if (window.location.pathname !== "/ui/") {
5234
- window.location.replace("/ui/");
5235
- }
5236
- return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
5237
- })
5238
- );
5239
- });
5240
- }
5309
+ ({ stayLoggedIn, ...userData }, { dispatch, rejectWithValue }) => users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, { ...userData, no_expiry: stayLoggedIn }).catch((err) => {
5310
+ cleanUp();
5311
+ return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
5312
+ }).then(({ text: response, contentType }) => {
5313
+ if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
5314
+ const { id, kind } = response;
5315
+ const type = kind.split("/")[1];
5316
+ const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
5317
+ window.location.replace(ssoLoginUrl);
5318
+ return;
5319
+ }
5320
+ const token = response;
5321
+ if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
5322
+ return;
5323
+ }
5324
+ let now = /* @__PURE__ */ new Date();
5325
+ now.setSeconds(now.getSeconds() + maxSessionAge);
5326
+ const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
5327
+ setSessionInfo({ token, expiresAt });
5328
+ cookies5.remove("JWT", { path: "/" });
5329
+ return (
5330
+ // @ts-ignore
5331
+ Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
5332
+ cleanUp();
5333
+ return Promise.reject(dispatch(setSnackbar6(extractErrorMessage(e))));
5334
+ }).then(() => {
5335
+ window.sessionStorage.removeItem("pendings-redirect");
5336
+ if (window.location.pathname !== "/ui/") {
5337
+ window.location.replace("/ui/");
5338
+ }
5339
+ return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
5340
+ })
5341
+ );
5342
+ })
5241
5343
  );
5242
5344
  var logoutUser = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/logoutUser`, (_, { dispatch, getState }) => {
5243
5345
  if (Object.keys(getState().app.uploadsById).length) {
@@ -5254,7 +5356,7 @@ var switchUserOrganization = (0, import_toolkit24.createAsyncThunk)(`${sliceName
5254
5356
  return Promise.reject();
5255
5357
  }
5256
5358
  return general_api_default.get(`${useradmApiUrlv1}/users/tenants/${tenantId}/token`).then(({ data: token }) => {
5257
- setSessionInfo(__spreadProps(__spreadValues({}, getSessionInfo()), { token }));
5359
+ setSessionInfo({ ...getSessionInfo(), token });
5258
5360
  window.location.reload();
5259
5361
  });
5260
5362
  });
@@ -5317,13 +5419,13 @@ var getUser = (0, import_toolkit24.createAsyncThunk)(
5317
5419
  );
5318
5420
  var initializeSelf = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/initializeSelf`, (_, { dispatch }) => dispatch(getUser(OWN_USER_ID)));
5319
5421
  var updateUserColumnSettings = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/updateUserColumnSettings`, ({ columns, currentUserId }, { dispatch, getState }) => {
5320
- const userId = currentUserId != null ? currentUserId : getCurrentUser(getState()).id;
5422
+ const userId = currentUserId ?? getCurrentUser(getState()).id;
5321
5423
  const storageKey = `${userId}-column-widths`;
5322
5424
  let customColumns = [];
5323
5425
  if (!columns) {
5324
5426
  try {
5325
5427
  customColumns = JSON.parse(window.localStorage.getItem(storageKey)) || customColumns;
5326
- } catch (e) {
5428
+ } catch {
5327
5429
  }
5328
5430
  } else {
5329
5431
  customColumns = columns;
@@ -5352,10 +5454,7 @@ var userActions = {
5352
5454
  var userActionErrorHandler = (err, type, dispatch) => commonErrorHandler(err, `There was an error ${userActions[type].errorMessage} the user.`, dispatch);
5353
5455
  var createUser = (0, import_toolkit24.createAsyncThunk)(
5354
5456
  `${sliceName8}/createUser`,
5355
- (_a, { dispatch }) => {
5356
- var _b2 = _a, { shouldResetPassword } = _b2, userData = __objRest(_b2, ["shouldResetPassword"]);
5357
- return general_api_default.post(`${useradmApiUrlv1}/users`, __spreadProps(__spreadValues({}, userData), { send_reset_password: shouldResetPassword })).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar6(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch));
5358
- }
5457
+ ({ shouldResetPassword, ...userData }, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users`, { ...userData, send_reset_password: shouldResetPassword }).then(() => Promise.all([dispatch(actions8.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar6(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch))
5359
5458
  );
5360
5459
  var removeUser = (0, import_toolkit24.createAsyncThunk)(
5361
5460
  `${sliceName8}/removeUser`,
@@ -5366,15 +5465,12 @@ var removeUser = (0, import_toolkit24.createAsyncThunk)(
5366
5465
  );
5367
5466
  var editUser = (0, import_toolkit24.createAsyncThunk)(
5368
5467
  `${sliceName8}/editUser`,
5369
- (_a, { dispatch, getState }) => {
5370
- var _b2 = _a, { id } = _b2, userData = __objRest(_b2, ["id"]);
5371
- return general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
5372
- () => Promise.all([
5373
- dispatch(actions8.updatedUser(__spreadProps(__spreadValues({}, userData), { id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id }))),
5374
- dispatch(setSnackbar6(userActions.edit.successMessage))
5375
- ])
5376
- );
5377
- }
5468
+ ({ id, ...userData }, { dispatch, getState }) => general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
5469
+ () => Promise.all([
5470
+ dispatch(actions8.updatedUser({ ...userData, id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id })),
5471
+ dispatch(setSnackbar6(userActions.edit.successMessage))
5472
+ ])
5473
+ )
5378
5474
  );
5379
5475
  var addUserToCurrentTenant = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/addUserToTenant`, (userId, { dispatch, getState }) => {
5380
5476
  const { id } = getOrganization(getState());
@@ -5409,7 +5505,7 @@ var mapHttpPermission = (permission) => Object.entries(uiPermissionsByArea).redu
5409
5505
  }
5410
5506
  return accu;
5411
5507
  },
5412
- __spreadValues({}, emptyUiPermissions)
5508
+ { ...emptyUiPermissions }
5413
5509
  );
5414
5510
  var permissionActionTypes = {
5415
5511
  any: mapHttpPermission,
@@ -5432,20 +5528,21 @@ var combinePermissions = (existingPermissions, additionalPermissions = {}) => Ob
5432
5528
  }, existingPermissions);
5433
5529
  var tryParseCustomPermission = (permission) => {
5434
5530
  const uiPermissions = permissionActionTypes[permission.action](permission.object);
5435
- const result = mergePermissions(__spreadValues({}, emptyUiPermissions), uiPermissions);
5531
+ const result = mergePermissions({ ...emptyUiPermissions }, uiPermissions);
5436
5532
  return { isCustom: true, permission, result };
5437
5533
  };
5438
5534
  var customPermissionHandler = (accu, permission) => {
5439
5535
  let processor = tryParseCustomPermission(permission);
5440
- return __spreadProps(__spreadValues({}, accu), {
5536
+ return {
5537
+ ...accu,
5441
5538
  isCustom: accu.isCustom || processor.isCustom,
5442
5539
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
5443
- });
5540
+ };
5444
5541
  };
5445
5542
  var mapPermissionSet = (permissionSetName, names, scope, existingGroupsPermissions = {}) => {
5446
5543
  const permission = Object.values(uiPermissionsById).find((permission2) => permission2.permissionSets[scope] === permissionSetName).value;
5447
5544
  const scopedPermissions = names.reduce((accu, name) => combinePermissions(accu, { [name]: [permission] }), existingGroupsPermissions);
5448
- return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => __spreadProps(__spreadValues({}, accu), { [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
5545
+ return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => ({ ...accu, [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
5449
5546
  };
5450
5547
  var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).reduce((accu, permissions) => {
5451
5548
  if (Array.isArray(permissions)) {
@@ -5460,60 +5557,59 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
5460
5557
  if (!processor) {
5461
5558
  return accu;
5462
5559
  }
5463
- const scope = Object.keys(scopedPermissionAreas).find((scope2) => {
5464
- var _a;
5465
- return uiPermissionsByArea[scope2].scope === ((_a = permissionSet.scope) == null ? void 0 : _a.type);
5466
- });
5560
+ const scope = Object.keys(scopedPermissionAreas).find((scope2) => uiPermissionsByArea[scope2].scope === permissionSet.scope?.type);
5467
5561
  if (scope) {
5468
5562
  const result = mapPermissionSet(permissionSet.name, permissionSet.scope.value, scope, accu.uiPermissions[scope]);
5469
- return __spreadProps(__spreadValues({}, accu), { uiPermissions: __spreadProps(__spreadValues({}, accu.uiPermissions), { [scope]: result }) });
5563
+ return { ...accu, uiPermissions: { ...accu.uiPermissions, [scope]: result } };
5470
5564
  } else if (isEmptyPermissionSet(processor.result)) {
5471
5565
  return processor.permissions.reduce(customPermissionHandler, accu);
5472
5566
  }
5473
- return __spreadProps(__spreadValues({}, accu), {
5567
+ return {
5568
+ ...accu,
5474
5569
  isCustom: accu.isCustom || processor.isCustom,
5475
5570
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
5476
- });
5571
+ };
5477
5572
  },
5478
- { isCustom: false, uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), { groups: {}, releases: {} }) }
5573
+ { isCustom: false, uiPermissions: { ...emptyUiPermissions, groups: {}, releases: {} } }
5479
5574
  );
5480
5575
  return permissions.reduce(customPermissionHandler, preliminaryResult);
5481
5576
  };
5482
5577
  var normalizeRbacRoles = (roles, rolesById2, permissionSets) => roles.reduce(
5483
5578
  (accu, role) => {
5484
- var _a;
5485
5579
  let normalizedPermissions;
5486
5580
  let isCustom = false;
5487
5581
  if (rolesById2[role.name]) {
5488
- normalizedPermissions = __spreadProps(__spreadValues({}, rolesById2[role.name].uiPermissions), {
5489
- groups: __spreadValues({}, rolesById2[role.name].uiPermissions.groups),
5490
- releases: __spreadValues({}, rolesById2[role.name].uiPermissions.releases)
5491
- });
5582
+ normalizedPermissions = {
5583
+ ...rolesById2[role.name].uiPermissions,
5584
+ groups: { ...rolesById2[role.name].uiPermissions.groups },
5585
+ releases: { ...rolesById2[role.name].uiPermissions.releases }
5586
+ };
5492
5587
  } else {
5493
5588
  const result = parseRolePermissions(role, permissionSets);
5494
5589
  normalizedPermissions = result.uiPermissions;
5495
5590
  isCustom = result.isCustom;
5496
5591
  }
5497
- const roleState = (_a = accu[role.name]) != null ? _a : __spreadValues({}, emptyRole);
5498
- accu[role.name] = __spreadProps(__spreadValues(__spreadValues({}, roleState), role), {
5592
+ const roleState = accu[role.name] ?? { ...emptyRole };
5593
+ accu[role.name] = {
5594
+ ...roleState,
5595
+ ...role,
5499
5596
  description: roleState.description ? roleState.description : role.description,
5500
5597
  editable: !rolesById[role.name] && !isCustom && (typeof roleState.editable !== "undefined" ? roleState.editable : true),
5501
5598
  isCustom,
5502
5599
  name: roleState.name ? roleState.name : role.name,
5503
5600
  uiPermissions: normalizedPermissions
5504
- });
5601
+ };
5505
5602
  return accu;
5506
5603
  },
5507
- __spreadValues({}, rolesById2)
5604
+ { ...rolesById2 }
5508
5605
  );
5509
5606
  var getPermissionSets = (0, import_toolkit24.createAsyncThunk)(
5510
5607
  `${sliceName8}/getPermissionSets`,
5511
5608
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv2}/permission_sets?per_page=500`).then(({ data }) => {
5512
5609
  const permissionSets = data.reduce(
5513
5610
  (accu, permissionSet) => {
5514
- var _a, _b2;
5515
- const permissionSetState = (_a = accu[permissionSet.name]) != null ? _a : {};
5516
- let permissionSetObject = __spreadValues(__spreadValues({}, permissionSetState), permissionSet);
5611
+ const permissionSetState = accu[permissionSet.name] ?? {};
5612
+ let permissionSetObject = { ...permissionSetState, ...permissionSet };
5517
5613
  permissionSetObject.result = Object.values(uiPermissionsById).reduce(
5518
5614
  (accu2, item) => Object.entries(item.permissionSets).reduce((collector, [area, permissionSet2]) => {
5519
5615
  if (scopedPermissionAreas[area]) {
@@ -5524,11 +5620,10 @@ var getPermissionSets = (0, import_toolkit24.createAsyncThunk)(
5524
5620
  }
5525
5621
  return collector;
5526
5622
  }, accu2),
5527
- __spreadValues(__spreadValues({}, emptyUiPermissions), (_b2 = permissionSetObject.result) != null ? _b2 : {})
5623
+ { ...emptyUiPermissions, ...permissionSetObject.result ?? {} }
5528
5624
  );
5529
5625
  const scopes = Object.values(scopedPermissionAreas).reduce((accu2, { key, scopeType }) => {
5530
- var _a2, _b3;
5531
- if (((_a2 = permissionSetObject.supported_scope_types) == null ? void 0 : _a2.includes(key)) || ((_b3 = permissionSetObject.supported_scope_types) == null ? void 0 : _b3.includes(scopeType))) {
5626
+ if (permissionSetObject.supported_scope_types?.includes(key) || permissionSetObject.supported_scope_types?.includes(scopeType)) {
5532
5627
  accu2.push(key);
5533
5628
  }
5534
5629
  return accu2;
@@ -5541,7 +5636,7 @@ var getPermissionSets = (0, import_toolkit24.createAsyncThunk)(
5541
5636
  return accu;
5542
5637
  },
5543
5638
  // @ts-ignore
5544
- __spreadValues({}, getState().users.permissionSetsById)
5639
+ { ...getState().users.permissionSetsById }
5545
5640
  );
5546
5641
  return Promise.all([dispatch(actions8.receivedPermissionSets(permissionSets)), permissionSets]);
5547
5642
  }).catch(() => console.log("Permission set retrieval failed - likely accessing a non-RBAC backend"))
@@ -5574,28 +5669,27 @@ var transformAreaRoleDataToScopedPermissionsSets = (area, areaPermissions, exces
5574
5669
  const skipPermissions = scopedPermissionAreas.releases.key === area && item !== ALL_RELEASES ? [uiPermissionsById.upload.value] : [];
5575
5670
  const impliedPermissions = deriveImpliedAreaPermissions(area, uiPermissions, skipPermissions);
5576
5671
  accu = impliedPermissions.reduce((itemPermissionAccu, impliedPermission) => {
5577
- var _a;
5578
- const permissionSetState = (_a = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]]) != null ? _a : {
5672
+ const permissionSetState = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] ?? {
5579
5673
  type: uiPermissionsByArea[area].scope,
5580
5674
  value: []
5581
5675
  };
5582
- itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = __spreadProps(__spreadValues({}, permissionSetState), {
5676
+ itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = {
5677
+ ...permissionSetState,
5583
5678
  value: [...permissionSetState.value, item]
5584
- });
5679
+ };
5585
5680
  return itemPermissionAccu;
5586
5681
  }, accu);
5587
5682
  return accu;
5588
5683
  }, {});
5589
- return Object.entries(permissionSetObject).map((_a) => {
5590
- var [name, _b2] = _a, _c = _b2, { value } = _c, scope = __objRest(_c, ["value"]);
5684
+ return Object.entries(permissionSetObject).map(([name, { value, ...scope }]) => {
5591
5685
  if (value.includes(excessiveAccessSelector)) {
5592
5686
  return { name };
5593
5687
  }
5594
- return { name, scope: __spreadProps(__spreadValues({}, scope), { value: value.filter(import_helpers12.duplicateFilter) }) };
5688
+ return { name, scope: { ...scope, value: value.filter(import_helpers12.duplicateFilter) } };
5595
5689
  });
5596
5690
  };
5597
5691
  var transformRoleDataToRole = (roleData, roleState = {}) => {
5598
- const role = __spreadValues(__spreadValues({}, roleState), roleData);
5692
+ const role = { ...roleState, ...roleData };
5599
5693
  const { description = "", name, uiPermissions = emptyUiPermissions } = role;
5600
5694
  const { maybeUiPermissions, remainderKeys } = Object.entries(emptyUiPermissions).reduce(
5601
5695
  (accu, [key, emptyPermissions]) => {
@@ -5631,12 +5725,17 @@ var transformRoleDataToRole = (roleData, roleState = {}) => {
5631
5725
  }, []);
5632
5726
  return {
5633
5727
  permissionSetsWithScope: [...permissionSetsWithScope, ...scopedPermissionSets],
5634
- role: __spreadProps(__spreadValues({}, emptyRole), {
5728
+ role: {
5729
+ ...emptyRole,
5635
5730
  name,
5636
5731
  // @ts-ignore
5637
5732
  description: description ? description : roleState.description,
5638
- uiPermissions: __spreadValues(__spreadValues(__spreadValues({}, emptyUiPermissions), roleUiPermissions), maybeUiPermissions)
5639
- })
5733
+ uiPermissions: {
5734
+ ...emptyUiPermissions,
5735
+ ...roleUiPermissions,
5736
+ ...maybeUiPermissions
5737
+ }
5738
+ }
5640
5739
  };
5641
5740
  };
5642
5741
  var roleActions = {
@@ -5687,13 +5786,12 @@ var getGlobalSettings2 = (0, import_toolkit24.createAsyncThunk)(
5687
5786
  var saveGlobalSettings = (0, import_toolkit24.createAsyncThunk)(
5688
5787
  `${sliceName8}/saveGlobalSettings`,
5689
5788
  // @ts-ignore
5690
- (_a, { dispatch, getState }) => {
5691
- var _b2 = _a, { beOptimistic = false, notify = false } = _b2, settings = __objRest(_b2, ["beOptimistic", "notify"]);
5789
+ ({ beOptimistic = false, notify = false, ...settings }, { dispatch, getState }) => {
5692
5790
  if (!window.sessionStorage.getItem(settingsKeys.initialized) && !beOptimistic) {
5693
5791
  return;
5694
5792
  }
5695
5793
  return dispatch(getGlobalSettings2()).unwrap().then((result) => {
5696
- let updatedSettings = __spreadValues(__spreadValues({}, getState().users.globalSettings), settings);
5794
+ let updatedSettings = { ...getState().users.globalSettings, ...settings };
5697
5795
  if (getCurrentUser(getState()).verified) {
5698
5796
  updatedSettings["2fa"] = twoFAStates.enabled;
5699
5797
  } else {
@@ -5731,10 +5829,17 @@ var saveUserSettings = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/sav
5731
5829
  const userSettings = getUserSettings(getState());
5732
5830
  const onboardingState = getOnboardingState(getState());
5733
5831
  const tooltipState = getTooltipsState(getState());
5734
- const updatedSettings = __spreadProps(__spreadValues(__spreadValues({}, userSettings), settings), {
5735
- onboarding: __spreadValues(__spreadValues({}, onboardingState), settings.onboarding),
5832
+ const updatedSettings = {
5833
+ ...userSettings,
5834
+ // @ts-ignore
5835
+ ...settings,
5836
+ onboarding: {
5837
+ ...onboardingState,
5838
+ // @ts-ignore
5839
+ ...settings.onboarding
5840
+ },
5736
5841
  tooltips: tooltipState
5737
- });
5842
+ };
5738
5843
  const headers = result[result.length - 1] ? { "If-Match": result[result.length - 1] } : {};
5739
5844
  return Promise.all([
5740
5845
  Promise.resolve(dispatch(actions8.setUserSettings(updatedSettings))),
@@ -5760,9 +5865,10 @@ var getTokens = (0, import_toolkit24.createAsyncThunk)(
5760
5865
  `${sliceName8}/getTokens`,
5761
5866
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv1}/settings/tokens`).then(({ data: tokens }) => {
5762
5867
  const user = getCurrentUser(getState());
5763
- const updatedUser = __spreadProps(__spreadValues({}, user), {
5868
+ const updatedUser = {
5869
+ ...user,
5764
5870
  tokens
5765
- });
5871
+ };
5766
5872
  return Promise.resolve(dispatch(actions8.updatedUser(updatedUser)));
5767
5873
  })
5768
5874
  );
@@ -5778,8 +5884,7 @@ var revokeToken = (0, import_toolkit24.createAsyncThunk)(
5778
5884
  general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
5779
5885
  )
5780
5886
  );
5781
- var setTooltipReadState = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, (_a, { dispatch }) => {
5782
- var _b2 = _a, { persist } = _b2, remainder = __objRest(_b2, ["persist"]);
5887
+ var setTooltipReadState = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, ({ persist, ...remainder }, { dispatch }) => {
5783
5888
  let tasks = [dispatch(actions8.setTooltipState(remainder))];
5784
5889
  if (persist) {
5785
5890
  tasks.push(dispatch(saveUserSettings()));
@@ -5787,14 +5892,13 @@ var setTooltipReadState = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/
5787
5892
  return Promise.all(tasks);
5788
5893
  });
5789
5894
  var setAllTooltipsReadState = (0, import_toolkit24.createAsyncThunk)(`${sliceName8}/toggleHelptips`, ({ readState = READ_STATES.read, tooltips }, { dispatch }) => {
5790
- const updatedTips = tooltips.reduce((accu, id) => __spreadProps(__spreadValues({}, accu), { [id]: { readState } }), {});
5895
+ const updatedTips = tooltips.reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
5791
5896
  return Promise.resolve(dispatch(actions8.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
5792
5897
  });
5793
5898
  var submitFeedback = (0, import_toolkit24.createAsyncThunk)(
5794
5899
  `${sliceName8}/submitFeedback`,
5795
5900
  // @ts-ignore
5796
- (_a, { dispatch }) => {
5797
- var _b2 = _a, { satisfaction, feedback } = _b2, meta = __objRest(_b2, ["satisfaction", "feedback"]);
5901
+ ({ satisfaction, feedback, ...meta }, { dispatch }) => {
5798
5902
  return general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
5799
5903
  subject: "feedback submission",
5800
5904
  body: JSON.stringify({ feedback, satisfaction, meta })
@@ -5805,169 +5909,4 @@ var submitFeedback = (0, import_toolkit24.createAsyncThunk)(
5805
5909
  });
5806
5910
  }
5807
5911
  );
5808
- // Annotate the CommonJS export names for ESM import in node:
5809
- 0 && (module.exports = {
5810
- abortDeployment,
5811
- addDevicesToGroup,
5812
- addDynamicGroup,
5813
- addStaticGroup,
5814
- addTenant,
5815
- addUserToCurrentTenant,
5816
- advanceOnboarding,
5817
- applyDeviceConfig,
5818
- applyOnboardingFallbacks,
5819
- cancelFileUpload,
5820
- cancelRequest,
5821
- cancelUpgrade,
5822
- changeIntegration,
5823
- changeNotificationSetting,
5824
- changeSsoConfig,
5825
- completeUpgrade,
5826
- confirmCardUpdate,
5827
- createArtifact,
5828
- createDeployment,
5829
- createIntegration,
5830
- createOrganizationTrial,
5831
- createRole,
5832
- createUser,
5833
- decommissionDevice,
5834
- deleteAuthset,
5835
- deleteIntegration,
5836
- deleteSsoConfig,
5837
- deriveDeploymentGroup,
5838
- deriveInactiveDevices,
5839
- deriveReportsData,
5840
- deviceFileUpload,
5841
- disableUser2fa,
5842
- downloadLicenseReport,
5843
- editArtifact,
5844
- editRole,
5845
- editTenantDeviceLimit,
5846
- editUser,
5847
- enableUser2fa,
5848
- ensureVersionString,
5849
- generateToken,
5850
- get2FAQRCode,
5851
- getAllDeviceCounts,
5852
- getAllDevicesByStatus,
5853
- getAllDynamicGroupDevices,
5854
- getAllGroupDevices,
5855
- getArtifactInstallCount,
5856
- getArtifactUrl,
5857
- getAuditLogs,
5858
- getAuditLogsCsvLink,
5859
- getCurrentCard,
5860
- getDeploymentDevices,
5861
- getDeploymentsByStatus,
5862
- getDeploymentsConfig,
5863
- getDeviceAlerts,
5864
- getDeviceAttributes,
5865
- getDeviceAuth,
5866
- getDeviceById,
5867
- getDeviceConfig,
5868
- getDeviceConnect,
5869
- getDeviceCount,
5870
- getDeviceDeployments,
5871
- getDeviceFileDownloadLink,
5872
- getDeviceInfo,
5873
- getDeviceLimit,
5874
- getDeviceLog,
5875
- getDeviceMonitorConfig,
5876
- getDeviceTwin,
5877
- getDevicesByStatus,
5878
- getDevicesInBounds,
5879
- getDevicesWithAuth,
5880
- getDynamicGroups,
5881
- getExistingReleaseTags,
5882
- getGatewayDevices,
5883
- getGlobalSettings,
5884
- getGroupDevices,
5885
- getGroups,
5886
- getIntegrations,
5887
- getIssueCountsByType,
5888
- getLatestDeviceAlerts,
5889
- getLatestReleaseInfo,
5890
- getOnboardingState,
5891
- getPermissionSets,
5892
- getRelease,
5893
- getReleases,
5894
- getReportingLimits,
5895
- getReportsData,
5896
- getReportsDataWithoutBackendSupport,
5897
- getRoles,
5898
- getSessionDetails,
5899
- getSingleDeployment,
5900
- getSsoConfigById,
5901
- getSsoConfigs,
5902
- getSystemDevices,
5903
- getTargetLocation,
5904
- getTenants,
5905
- getTokens,
5906
- getUpdateTypes,
5907
- getUser,
5908
- getUserList,
5909
- getUserOrganization,
5910
- getUserSettings,
5911
- getWebhookEvents,
5912
- initializeSelf,
5913
- loginUser,
5914
- logoutUser,
5915
- normalizeRbacRoles,
5916
- passwordResetComplete,
5917
- passwordResetStart,
5918
- preauthDevice,
5919
- removeArtifact,
5920
- removeDevicesFromGroup,
5921
- removeDynamicGroup,
5922
- removeRelease,
5923
- removeRole,
5924
- removeStaticGroup,
5925
- removeTenant,
5926
- removeUser,
5927
- requestPlanChange,
5928
- resetDeviceDeployments,
5929
- revokeToken,
5930
- saveDeltaDeploymentsConfig,
5931
- saveGlobalSettings,
5932
- saveUserSettings,
5933
- searchDevices,
5934
- selectGroup,
5935
- selectRelease,
5936
- sendSupportMessage,
5937
- setAllTooltipsReadState,
5938
- setAuditlogsState,
5939
- setDeploymentsState,
5940
- setDeviceConfig,
5941
- setDeviceListState,
5942
- setDeviceTags,
5943
- setDeviceTwin,
5944
- setFirstLoginAfterSignup,
5945
- setHideAnnouncement,
5946
- setOfflineThreshold,
5947
- setOnboardingApproach,
5948
- setOnboardingCanceled,
5949
- setOnboardingComplete,
5950
- setOnboardingDeviceType,
5951
- setReleaseTags,
5952
- setReleasesListState,
5953
- setSearchState,
5954
- setTenantsListState,
5955
- setTooltipReadState,
5956
- startCardUpdate,
5957
- startUpgrade,
5958
- storeSsoConfig,
5959
- submitFeedback,
5960
- switchUserOrganization,
5961
- tenantDataDivergedMessage,
5962
- updateDeploymentControlMap,
5963
- updateDeviceAuth,
5964
- updateDevicesAuth,
5965
- updateDynamicGroup,
5966
- updateReleaseInfo,
5967
- updateUserColumnSettings,
5968
- uploadArtifact,
5969
- verify2FA,
5970
- verifyEmailComplete,
5971
- verifyEmailStart
5972
- });
5973
5912
  //# sourceMappingURL=thunks.js.map