@mindline/sync 1.0.109 → 1.0.111

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.
package/dist/sync.es.js CHANGED
@@ -1,14 +1,13 @@
1
- var Pe = Object.defineProperty;
2
- var Ie = (n) => {
1
+ var Oe = Object.defineProperty;
2
+ var De = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
- var ve = (n, s, r) => s in n ? Pe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[s] = r;
6
- var c = (n, s, r) => ve(n, typeof s != "symbol" ? s + "" : s, r), Re = (n, s, r) => s.has(n) || Ie("Cannot " + r);
7
- var J = (n, s, r) => s.has(n) ? Ie("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(n) : s.set(n, r);
8
- var N = (n, s, r) => (Re(n, s, "access private method"), r);
9
- import * as V from "@microsoft/signalr";
5
+ var Ne = (n, s, r) => s in n ? Oe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[s] = r;
6
+ var c = (n, s, r) => Ne(n, typeof s != "symbol" ? s + "" : s, r), Be = (n, s, r) => s.has(n) || De("Cannot " + r);
7
+ var Q = (n, s, r) => s.has(n) ? De("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(n) : s.set(n, r);
8
+ var x = (n, s, r) => (Be(n, s, "access private method"), r);
10
9
  import { deserializeArray as U } from "class-transformer";
11
- const Ge = [
10
+ const We = [
12
11
  {
13
12
  oid: "1",
14
13
  name: "",
@@ -20,7 +19,7 @@ const Ge = [
20
19
  session: "Sign In",
21
20
  sel: !0
22
21
  }
23
- ], xe = [
22
+ ], Fe = [
24
23
  {
25
24
  tid: "1",
26
25
  name: "",
@@ -30,7 +29,7 @@ const Ge = [
30
29
  sel: !0,
31
30
  graphSP: ""
32
31
  }
33
- ], Ce = [], Oe = [
32
+ ], Ue = [], Le = [
34
33
  {
35
34
  id: "1",
36
35
  name: "",
@@ -43,7 +42,7 @@ const Ge = [
43
42
  associatedConfigs: [],
44
43
  sel: !0
45
44
  }
46
- ], Ne = [
45
+ ], ze = [
47
46
  {
48
47
  Run: "3",
49
48
  Start: "2023-09-17T12:00:00.000-07:00",
@@ -65,7 +64,7 @@ const Ge = [
65
64
  Read: "2023-09-17T12:00:15.500-07:00",
66
65
  Write: "2023-09-17T12:01:30.000-07:00"
67
66
  }
68
- ], We = [
67
+ ], _e = [
69
68
  {
70
69
  type: "mg",
71
70
  resource: "Tenant Root Group",
@@ -120,7 +119,7 @@ const Ge = [
120
119
  }
121
120
  ]
122
121
  }
123
- ], Fe = [
122
+ ], Me = [
124
123
  {
125
124
  type: "user",
126
125
  actor: "arvind@mindline.site",
@@ -139,15 +138,15 @@ const Ge = [
139
138
  updatedon: "2023-09-06T15:36:45.7760714Z",
140
139
  resources: []
141
140
  }
142
- ], B = "workspaceIDs";
143
- function Gt(n, s) {
141
+ ], F = "workspaceIDs";
142
+ function Ft(n, s) {
144
143
  return n + s;
145
144
  }
146
- function xt() {
145
+ function Ut() {
147
146
  return "hello NPM";
148
147
  }
149
- function _() {
150
- return "1.0.109";
148
+ function L() {
149
+ return "1.0.111";
151
150
  }
152
151
  class m {
153
152
  constructor() {
@@ -156,86 +155,86 @@ class m {
156
155
  c(this, "error");
157
156
  c(this, "version");
158
157
  c(this, "array");
159
- this.result = !0, this.status = 200, this.error = "", this.version = _(), this.array = null;
158
+ this.result = !0, this.status = 200, this.error = "", this.version = L(), this.array = null;
160
159
  }
161
160
  }
162
161
  class j {
163
162
  }
164
163
  // azure graph REST API endpoints
165
164
  c(j, "azureElevateAccess", "https://management.azure.com/providers/Microsoft.Authorization/elevateAccess?api-version=2016-07-01"), c(j, "azureListRootAssignments", "https://management.azure.com/providers/Microsoft.Authorization/roleAssignments?api-version=2022-04-01&$filter=principalId+eq+");
166
- const k = class k {
165
+ const $ = class $ {
167
166
  // config API endpoints
168
167
  static adminEndpoint() {
169
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/admin`;
168
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/admin`;
170
169
  }
171
170
  static adminIncompleteEndpoint() {
172
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/incomplete-admin`;
171
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/incomplete-admin`;
173
172
  }
174
173
  static adminsEndpoint() {
175
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/admins`;
174
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/admins`;
176
175
  }
177
176
  static auditConfigEndpoint() {
178
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-configuration`;
177
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-configuration`;
179
178
  }
180
179
  static auditEventsEndpoint() {
181
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-events`;
180
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-events`;
182
181
  }
183
182
  static configConsentEndpoint() {
184
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/consent`;
183
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/consent`;
185
184
  }
186
185
  static configEnabledEndpoint() {
187
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/status`;
186
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/status`;
188
187
  }
189
188
  static configEndpoint() {
190
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration`;
189
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration`;
191
190
  }
192
191
  static configsEndpoint() {
193
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configurations`;
192
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configurations`;
194
193
  }
195
194
  static initEndpoint() {
196
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/init`;
195
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/init`;
197
196
  }
198
197
  static readerStartSyncEndpoint() {
199
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/startSync`;
198
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/startSync`;
200
199
  }
201
200
  static tenantEndpoint() {
202
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/tenant`;
201
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/tenant`;
203
202
  }
204
203
  static tenantsEndpoint() {
205
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/tenants`;
204
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/tenants`;
206
205
  }
207
206
  static workspaceEndpoint() {
208
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspace`;
207
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspace`;
209
208
  }
210
209
  static workspacesEndpoint() {
211
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspaces`;
210
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspaces`;
212
211
  }
213
212
  static workspaceConfigsEndpoint() {
214
- return `https://${k.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspace-configurations`;
213
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/workspace-configurations`;
215
214
  }
216
215
  // SignalR endpoint
217
216
  static signalREndpoint() {
218
- return `https://${k.environmentTag}-signalrdispatcher-westus.azurewebsites.net/statsHub`;
217
+ return `https://${$.environmentTag}-signalrdispatcher-westus.azurewebsites.net/statsHub`;
219
218
  }
220
219
  static statsEndpoint() {
221
- return `https://${k.environmentTag}-signalrdispatcher-westus.azurewebsites.net/api/stats`;
220
+ return `https://${$.environmentTag}-signalrdispatcher-westus.azurewebsites.net/api/stats`;
222
221
  }
223
222
  };
224
- c(k, "environmentTag", "dev");
225
- let w = k;
223
+ c($, "environmentTag", "dev");
224
+ let S = $;
226
225
  class p {
227
226
  }
228
227
  // graph API predicates
229
228
  c(p, "graphGroupsPredicate", "v1.0/groups"), c(p, "graphMailPredicate", "v1.0/me/messages"), c(p, "graphMePredicate", "v1.0/me"), c(p, "graphOauth2PermissionGrantsPredicate", "v1.0/oauth2PermissionGrants"), c(p, "graphServicePrincipalsPredicate", "v1.0/servicePrincipals"), c(p, "graphUsersPredicate", "v1.0/users"), c(p, "graphTenantByDomainPredicate", "beta/tenantRelationships/findTenantInformationByDomainName"), c(p, "graphTenantByIdPredicate", "beta/tenantRelationships/findTenantInformationByTenantId"), // authority values are based on the well-known OIDC auth endpoints
230
229
  c(p, "authorityWW", "https://login.microsoftonline.com/"), c(p, "authorityWWRegex", /^(https:\/\/login\.microsoftonline\.com\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/), c(p, "authorityUS", "https://login.microsoftonline.us/"), c(p, "authorityUSRegex", /^(https:\/\/login\.microsoftonline\.us\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/), c(p, "authorityCN", "https://login.partner.microsoftonline.cn/"), c(p, "authorityCNRegex", /^(https:\/\/login\.partner\.microsoftonline\.cn\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/);
231
- class Ct {
230
+ class Lt {
232
231
  constructor() {
233
232
  c(this, "id", "");
234
233
  c(this, "displayName", "");
235
234
  c(this, "description", "");
236
235
  }
237
236
  }
238
- class Ot {
237
+ class zt {
239
238
  constructor() {
240
239
  c(this, "group", "");
241
240
  c(this, "value", "");
@@ -250,7 +249,7 @@ class Ot {
250
249
  return s.group.localeCompare(r.group);
251
250
  }
252
251
  }
253
- class re {
252
+ class de {
254
253
  // set when the user is logging in to support spinner visibility
255
254
  constructor() {
256
255
  c(this, "oid");
@@ -283,7 +282,7 @@ class re {
283
282
  this.oid = "", this.name = "", this.mail = "", this.authority = "", this.tid = "", this.companyName = "", this.companyDomain = "", this.workspaceIDs = "", this.session = "Sign In", this.spacode = "", this.graphAccessToken = "", this.mindlineAccessToken = "", this.azureAccessToken = "", this.loginHint = "", this.scopes = new Array(), this.authTS = /* @__PURE__ */ new Date(0), this.sel = !1, this.loggingIn = !1;
284
283
  }
285
284
  }
286
- var Be = /* @__PURE__ */ ((n) => (n[n.invalid = 0] = "invalid", n[n.aad = 1] = "aad", n[n.ad = 2] = "ad", n[n.googleworkspace = 3] = "googleworkspace", n))(Be || {}), Ue = /* @__PURE__ */ ((n) => (n[n.read = 1] = "read", n[n.write = 2] = "write", n[n.notassigned = 3] = "notassigned", n))(Ue || {});
285
+ var je = /* @__PURE__ */ ((n) => (n[n.invalid = 0] = "invalid", n[n.aad = 1] = "aad", n[n.ad = 2] = "ad", n[n.googleworkspace = 3] = "googleworkspace", n))(je || {}), He = /* @__PURE__ */ ((n) => (n[n.read = 1] = "read", n[n.write = 2] = "write", n[n.notassigned = 3] = "notassigned", n))(He || {});
287
286
  class H {
288
287
  // are we validating by TID or by domain? "Domain" | "Tenant ID"
289
288
  constructor() {
@@ -301,7 +300,7 @@ class H {
301
300
  this.tid = "", this.name = "", this.domain = "", this.tenantType = "aad", this.authority = "", this.workspaceIDs = "", this.sel = !1, this.graphSP = "", this.lookupfield = "Domain";
302
301
  }
303
302
  }
304
- function _e(n, s) {
303
+ function qe(n, s) {
305
304
  switch (n) {
306
305
  case p.authorityWW:
307
306
  return s === 1 ? "85d35da2-4118-4b03-aa05-605cedd7f2f8" : "63100afe-506e-4bb2-8ff7-d8d5ab373129";
@@ -314,7 +313,7 @@ function _e(n, s) {
314
313
  return "";
315
314
  }
316
315
  }
317
- function F(n) {
316
+ function W(n) {
318
317
  switch (n) {
319
318
  case p.authorityWW:
320
319
  return "https://graph.microsoft.com/";
@@ -327,7 +326,7 @@ function F(n) {
327
326
  return "";
328
327
  }
329
328
  }
330
- function Le(n) {
329
+ function Ke(n) {
331
330
  switch (n) {
332
331
  case p.authorityWW:
333
332
  return "https://login.microsoftonline.com/";
@@ -340,8 +339,8 @@ function Le(n) {
340
339
  return "";
341
340
  }
342
341
  }
343
- var ze = /* @__PURE__ */ ((n) => (n[n.source = 1] = "source", n[n.target = 2] = "target", n[n.sourcetarget = 3] = "sourcetarget", n))(ze || {});
344
- class Me {
342
+ var Je = /* @__PURE__ */ ((n) => (n[n.source = 1] = "source", n[n.target = 2] = "target", n[n.sourcetarget = 3] = "sourcetarget", n))(Je || {});
343
+ class Ve {
345
344
  constructor() {
346
345
  c(this, "tid");
347
346
  c(this, "sourceGroupId");
@@ -358,7 +357,7 @@ class Me {
358
357
  this.tid = "", this.sourceGroupId = "", this.sourceGroupName = "", this.targetGroupId = "", this.targetGroupName = "", this.configurationTenantType = "source", this.deltaToken = "", this.usersWritten = 0, this.configId = "", this.batchId = "", this.isReadPermissionConsented = !1, this.isWritePermissionConsented = !1;
359
358
  }
360
359
  }
361
- class ae {
360
+ class ue {
362
361
  // selection state
363
362
  constructor() {
364
363
  c(this, "id");
@@ -372,7 +371,7 @@ class ae {
372
371
  this.id = "", this.name = "", this.workspaceId = "", this.description = "", this.tenants = new Array(), this.isEnabled = !1, this.workspaceIDs = "", this.sel = !1;
373
372
  }
374
373
  }
375
- class Nt {
374
+ class _t {
376
375
  // selection state
377
376
  constructor() {
378
377
  c(this, "id");
@@ -387,7 +386,7 @@ class Nt {
387
386
  this.id = "", this.name = "", this.workspaceId = "", this.description = "", this.isEnabled = !1, this.isReadPermissionConsented = !1, this.email = "", this.tenantId = "", this.sel = !1;
388
387
  }
389
388
  }
390
- class ne {
389
+ class fe {
391
390
  // selection state
392
391
  constructor() {
393
392
  c(this, "id");
@@ -400,7 +399,7 @@ class ne {
400
399
  this.id = "", this.name = "", this.ownerid = "", this.associatedUsers = new Array(), this.associatedTenants = new Array(), this.associatedConfigs = new Array(), this.sel = !1;
401
400
  }
402
401
  }
403
- function G() {
402
+ function P() {
404
403
  let n;
405
404
  try {
406
405
  n = window.localStorage;
@@ -416,11 +415,11 @@ function G() {
416
415
  n && n.length !== 0;
417
416
  }
418
417
  }
419
- var Z, Ae;
420
- class Wt {
418
+ var X, Pe;
419
+ class Mt {
421
420
  constructor(s = !1) {
422
- J(this, Z);
423
- c(this, "version", _());
421
+ Q(this, X);
422
+ c(this, "version", L());
424
423
  c(this, "tab", 0);
425
424
  c(this, "us", []);
426
425
  c(this, "ts", []);
@@ -433,7 +432,7 @@ class Wt {
433
432
  }
434
433
  // get initial data from localStorage or file
435
434
  init(s) {
436
- if (console.log(`Calling InitInfo::init(bClearLocalStorage: ${s ? "true" : "false"})`), G()) {
435
+ if (console.log(`Calling InitInfo::init(bClearLocalStorage: ${s ? "true" : "false"})`), P()) {
437
436
  let o = localStorage.getItem("InitInfo");
438
437
  if (o != null && typeof o == "string" && o !== "") {
439
438
  let i = JSON.parse(o);
@@ -441,15 +440,15 @@ class Wt {
441
440
  if (s)
442
441
  localStorage.removeItem("InitInfo");
443
442
  else {
444
- N(this, Z, Ae).call(this, i);
443
+ x(this, X, Pe).call(this, i);
445
444
  return;
446
445
  }
447
446
  }
448
447
  }
449
- this.tab = 0, this.version = _(), this.configlevelconsent_configid = "", this.configlevelconsent_access = 3;
450
- var r = JSON.stringify(Ge), t = JSON.stringify(xe), e = JSON.stringify(Ce), a = JSON.stringify(Oe);
448
+ this.tab = 0, this.version = L(), this.configlevelconsent_configid = "", this.configlevelconsent_access = 3;
449
+ var r = JSON.stringify(We), t = JSON.stringify(Fe), e = JSON.stringify(Ue), a = JSON.stringify(Le);
451
450
  try {
452
- this.us = U(re, r), this.ts = U(H, t), this.cs = U(ae, e), this.ws = U(ne, a), this.tagWithWorkspaces();
451
+ this.us = U(de, r), this.ts = U(H, t), this.cs = U(ue, e), this.ws = U(fe, a), this.tagWithWorkspaces();
453
452
  } catch {
454
453
  debugger;
455
454
  }
@@ -464,21 +463,21 @@ class Wt {
464
463
  for (let r of s.associatedUsers) {
465
464
  let t = this.us.find((e) => e.oid === r);
466
465
  if (t !== void 0)
467
- t[B] += s.id, t[B] += " ";
466
+ t[F] += s.id, t[F] += " ";
468
467
  else
469
468
  debugger;
470
469
  }
471
470
  for (let r of s.associatedTenants) {
472
471
  let t = this.ts.find((e) => e.tid === r);
473
472
  if (t !== void 0)
474
- t[B] += s.id, t[B] += " ";
473
+ t[F] += s.id, t[F] += " ";
475
474
  else
476
475
  debugger;
477
476
  }
478
477
  for (let r of s.associatedConfigs) {
479
478
  let t = this.cs.find((e) => e.id === r);
480
479
  if (t !== void 0)
481
- t[B] += s.id, t[B] += " ";
480
+ t[F] += s.id, t[F] += " ";
482
481
  else
483
482
  debugger;
484
483
  }
@@ -486,22 +485,22 @@ class Wt {
486
485
  return !0;
487
486
  }
488
487
  }
489
- Z = new WeakSet(), Ae = function(s) {
490
- this.tab = s.tab, this.version = _(), this.configlevelconsent_configid = s.configlevelconsent_configid, this.configlevelconsent_access = s.configlevelconsent_access, typeof s.us > "u" ? this.us = new Array() : this.us = s.us.map((r) => {
491
- let t = new re();
488
+ X = new WeakSet(), Pe = function(s) {
489
+ this.tab = s.tab, this.version = L(), this.configlevelconsent_configid = s.configlevelconsent_configid, this.configlevelconsent_access = s.configlevelconsent_access, typeof s.us > "u" ? this.us = new Array() : this.us = s.us.map((r) => {
490
+ let t = new de();
492
491
  return t.oid = r.oid, t.name = r.name, t.mail = r.mail, t.authority = r.authority, t.tid = r.tid, t.companyName = r.companyName, t.companyDomain = r.companyDomain, t.workspaceIDs = r.workspaceIDs, t.session = r.session, t.spacode = r.spacode, t.graphAccessToken = r.graphAccessToken, t.mindlineAccessToken = r.mindlineAccessToken, t.azureAccessToken = r.azureAccessToken, t.loginHint = r.loginHint, t.scopes = r.scopes, t.authTS = new Date(r.authTS), t.sel = r.sel, t.loggingIn = r.loggingIn, t;
493
492
  }), typeof s.ts > "u" ? this.ts = new Array() : this.ts = s.ts.map((r) => {
494
493
  let t = new H();
495
494
  return t.tid = r.tid, t.name = r.name, t.domain = r.domain, t.tenantType = r.tenantType, t.authority = r.authority, t.workspaceIDs = r.workspaceIDs, t.sel = r.sel, t.lookupfield = r.lookupfield, t;
496
495
  }), typeof s.cs > "u" ? this.cs = new Array() : this.cs = s.cs.map((r) => {
497
- let t = new ae();
496
+ let t = new ue();
498
497
  return t.id = r.id, t.workspaceId = r.workspaceId, t.name = r.name, t.description = r.description, t.tenants = r.tenants, t.isEnabled = r.isEnabled, t.workspaceIDs = r.workspaceIDs, t.sel = r.sel, t;
499
498
  }), typeof s.ws > "u" ? this.ws = new Array() : this.ws = s.ws.map((r) => {
500
- let t = new ne();
499
+ let t = new fe();
501
500
  return t.id = r.id, t.name = r.name, t.ownerid = r.ownerid, t.associatedUsers = r.associatedUsers, t.associatedTenants = r.associatedTenants, t.associatedConfigs = r.associatedConfigs, t.sel = r.sel, t;
502
501
  });
503
502
  };
504
- const je = [
503
+ const Ze = [
505
504
  {
506
505
  id: 1,
507
506
  task: "initialization",
@@ -554,45 +553,45 @@ const je = [
554
553
  ]
555
554
  }
556
555
  ];
557
- var x, oe, ie, le;
558
- class Ft {
556
+ var G, pe, he, ge;
557
+ class jt {
559
558
  constructor(s) {
560
- J(this, x);
559
+ Q(this, G);
561
560
  c(this, "tasks");
562
- this.tasks = [new se()], this.init(s);
561
+ this.tasks = [new ce()], this.init(s);
563
562
  }
564
563
  // get initial data from localStorage or file
565
564
  init(s) {
566
- if (console.log(`Calling TaskArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), this.tasks.length = 0, s && G() && localStorage.removeItem("Tasks"), G()) {
565
+ if (console.log(`Calling TaskArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), this.tasks.length = 0, s && P() && localStorage.removeItem("Tasks"), P()) {
567
566
  let r = localStorage.getItem("Tasks");
568
567
  if (r != null && typeof r == "string" && r !== "") {
569
568
  let e = JSON.parse(r);
570
- if (this.tasks = N(this, x, ie).call(this, e.tasks), this.tasks.length !== 0) return;
569
+ if (this.tasks = x(this, G, he).call(this, e.tasks), this.tasks.length !== 0) return;
571
570
  }
572
571
  }
573
- this.tasks = N(this, x, ie).call(this, je);
572
+ this.tasks = x(this, G, he).call(this, Ze);
574
573
  }
575
574
  // set start time for a task
576
575
  setTaskStart(s, r) {
577
- let t = N(this, x, oe).call(this, s);
576
+ let t = x(this, G, pe).call(this, s);
578
577
  if (t != null && t != null)
579
- t.setStart(r), t.status = "in progress", N(this, x, le).call(this);
578
+ t.setStart(r), t.status = "in progress", x(this, G, ge).call(this);
580
579
  else
581
580
  debugger;
582
581
  }
583
582
  // set end time for a task
584
583
  setTaskEnd(s, r, t) {
585
- let e = N(this, x, oe).call(this, s);
584
+ let e = x(this, G, pe).call(this, s);
586
585
  if (e != null && e != null)
587
- e.setEnd(r), e.status = t, N(this, x, le).call(this);
586
+ e.setEnd(r), e.status = t, x(this, G, ge).call(this);
588
587
  else
589
588
  debugger;
590
589
  }
591
590
  }
592
- x = new WeakSet(), //
591
+ G = new WeakSet(), //
593
592
  // private
594
593
  //
595
- oe = function(s) {
594
+ pe = function(s) {
596
595
  let r = this.tasks.find((t) => t.task == s);
597
596
  if (r == null || r == null) {
598
597
  for (r of this.tasks)
@@ -600,19 +599,19 @@ oe = function(s) {
600
599
  break;
601
600
  }
602
601
  return r;
603
- }, ie = function(s) {
602
+ }, he = function(s) {
604
603
  return s.map((r) => {
605
- let t = new se();
604
+ let t = new ce();
606
605
  return t.id = r.id, t.task = r.task, t.setStart(new Date(r.start)), t.setEnd(new Date(r.end)), t.expected = r.expected, t.status = r.status, t.expanded = r.expanded, typeof r.subtasks < "u" && r.subtasks != null && (t.subtasks = r.subtasks.map((e) => {
607
- let a = new se();
606
+ let a = new ce();
608
607
  return a.id = e.id, a.task = e.task, a.setStart(new Date(e.start)), a.setEnd(new Date(e.end)), a.expected = e.expected, a.status = e.status, a.expanded = e.expanded, a;
609
608
  })), t;
610
609
  });
611
- }, le = function() {
610
+ }, ge = function() {
612
611
  let s = JSON.stringify(this);
613
- G() && localStorage.setItem("Tasks", s);
612
+ P() && localStorage.setItem("Tasks", s);
614
613
  };
615
- class se {
614
+ class ce {
616
615
  constructor() {
617
616
  c(this, "id", 0);
618
617
  c(this, "task", "");
@@ -665,15 +664,15 @@ class M {
665
664
  s == "" ? this.Write = /* @__PURE__ */ new Date() : this.Write = new Date(s), this.writeDisplay = `${this.Write.getMinutes().toString().padStart(2, "0")}:${this.Write.getSeconds().toString().padStart(2, "0")}`, this.Duration = new Date(this.Write.getTime() - this.Start.getTime()), this.durationDisplay = `${this.Duration.getMinutes().toString().padStart(2, "0")}:${this.Duration.getSeconds().toString().padStart(2, "0")}`;
666
665
  }
667
666
  }
668
- var q, ce;
669
- class He {
667
+ var q, me;
668
+ class Qe {
670
669
  constructor(s) {
671
- J(this, q);
670
+ Q(this, q);
672
671
  c(this, "milestones", []);
673
672
  this.init(s);
674
673
  }
675
674
  init(s) {
676
- if (G()) {
675
+ if (P()) {
677
676
  let r = localStorage.getItem("syncmilestones");
678
677
  if (r != null && typeof r == "string" && r !== "") {
679
678
  let e = JSON.parse(r);
@@ -681,16 +680,16 @@ class He {
681
680
  if (s)
682
681
  localStorage.removeItem("syncmilestones");
683
682
  else {
684
- N(this, q, ce).call(this, e);
683
+ x(this, q, me).call(this, e);
685
684
  return;
686
685
  }
687
686
  }
688
687
  }
689
- N(this, q, ce).call(this, Ne);
688
+ x(this, q, me).call(this, ze);
690
689
  }
691
690
  save() {
692
691
  let s = JSON.stringify(this.milestones);
693
- G() && localStorage.setItem("syncmilestones", s);
692
+ P() && localStorage.setItem("syncmilestones", s);
694
693
  }
695
694
  // milestone tracking during a sync
696
695
  start(s) {
@@ -744,39 +743,48 @@ class He {
744
743
  }), s(this.milestones);
745
744
  }
746
745
  }
747
- q = new WeakSet(), ce = function(s) {
746
+ q = new WeakSet(), me = function(s) {
748
747
  s == null ? this.milestones = new Array() : this.milestones = s.map((r) => {
749
748
  let t = new M(Number(r.Run));
750
749
  return t.start(r.Start), t.post(r.POST), t.read(r.Read), t.write(r.Write), t;
751
750
  });
752
751
  };
753
- class Bt {
752
+ class Ht {
754
753
  constructor(s, r, t) {
755
754
  c(this, "tenantNodes");
756
755
  c(this, "pb_startTS");
757
756
  c(this, "pb_progress");
758
- c(this, "pb_increment");
759
757
  c(this, "pb_idle");
760
- c(this, "pb_idleMax");
761
758
  c(this, "pb_total");
762
759
  c(this, "pb_timer");
760
+ // Polling: /api/stats is the single source of truth for hydration.
761
+ c(this, "pollIntervalSeconds", 5);
762
+ c(this, "pollTimer", null);
763
+ c(this, "pollLastUpdatedByBatchId", {});
764
+ c(this, "pollInstance", null);
765
+ c(this, "pollAuthorizedUser", null);
766
+ c(this, "pollBatchIdArray", []);
767
+ // Store UI callbacks so we can update the UI from poll/completion events.
768
+ c(this, "setIdleText", null);
769
+ // Handler used by polling: we reuse the same stats-processing logic.
770
+ c(this, "statsHydrationHandler", null);
763
771
  c(this, "milestoneArray");
764
- this.tenantNodes = new Array(), this.init(s, r, t), this.pb_startTS = 0, this.pb_progress = 0, this.pb_increment = 0.25, this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, this.pb_total = 0, this.milestoneArray = new He(!1);
772
+ this.tenantNodes = new Array(), this.init(s, r, t), this.pb_startTS = 0, this.pb_progress = 0, this.pb_timer = null, this.pb_idle = 0, this.pb_total = 0, this.milestoneArray = new Qe(!1);
765
773
  }
766
774
  clearStoredBatchIds() {
767
- G() && localStorage.setItem("BatchIdArray", "[]");
775
+ P() && (localStorage.setItem("BatchIdArray", "[]"), localStorage.removeItem("BatchIdArrayProgress"));
768
776
  }
769
777
  // populate tenantNodes based on config tenants
770
778
  init(s, r, t) {
771
779
  console.log(
772
780
  `Calling BatchArray::init(config: "${s ? s.name : "null"}", bClearLocalStorage: ${t ? "true" : "false"})`
773
- ), t && G() && (localStorage.removeItem(s.name), this.milestoneArray.init(t)), s != null && s.tenants != null && r != null && (this.tenantNodes.length = 0, s.tenants.map((e) => {
781
+ ), t && P() && (localStorage.removeItem(s.name), this.milestoneArray.init(t)), s != null && s.tenants != null && r != null && (this.tenantNodes.length = 0, s.tenants.map((e) => {
774
782
  if (e.configurationTenantType === "source" || e.configurationTenantType === "sourcetarget") {
775
783
  let a = r.ts.find(
776
784
  (o) => o.tid === e.tid
777
785
  );
778
786
  if (a != null) {
779
- let o = new $e(
787
+ let o = new ve(
780
788
  e.tid,
781
789
  a.name,
782
790
  e.batchId
@@ -797,7 +805,7 @@ class Bt {
797
805
  (d) => d.tid === a.tid
798
806
  );
799
807
  if (o != null) {
800
- let d = new $e(
808
+ let d = new ve(
801
809
  a.tid,
802
810
  o.name,
803
811
  a.batchId
@@ -815,107 +823,144 @@ class Bt {
815
823
  }));
816
824
  }
817
825
  initializeProgressBar(s, r, t, e) {
818
- this.pb_startTS = Date.now(), this.pb_progress = 0, this.pb_increment = 0.25, this.pb_idle = 0, this.pb_idleMax = 0, this.pb_total = 0, this.pb_timer = setInterval(() => {
819
- console.log("this.tenantNodes", this.tenantNodes), this.tenantNodes.map((o) => o.targets.map((d) => d.status === "complete" || o.nothingtosync).reduce((d, i) => d && i)).reduce((o, d) => o && d) ? (clearInterval(this.pb_timer), this.pb_timer = null, this.pb_progress = 100, s(this.pb_progress), t(`Complete. [max idle: ${this.pb_idleMax}]`), this.clearStoredBatchIds()) : (this.pb_total = this.pb_total + 1, this.pb_idle = this.pb_idle + 1, this.pb_idleMax = Math.max(this.pb_idle, this.pb_idleMax), t(`${this.pb_total} seconds elapsed. Last update ${this.pb_idle} seconds ago. [max idle: ${this.pb_idleMax}/60]`), this.pb_idle >= 60 && this.milestoneArray.milestones[0].Write == null && r(`sync continuing, but no update for ${this.pb_idle} seconds`), this.pb_progress < 100 && (this.pb_progress = Math.min(100, this.pb_progress + this.pb_increment), s(this.pb_progress)));
826
+ this.setIdleText = t, this.pb_startTS = Date.now(), this.pb_progress = 0, this.pb_idle = 0, this.pb_total = 0, s(this.pb_progress), t("Starting sync..."), this.pb_timer = setInterval(() => {
827
+ console.log("this.tenantNodes", this.tenantNodes), this.pb_total = this.pb_total + 1, this.pb_idle = this.pb_idle + 1, t(`${this.pb_total} seconds elapsed. Last update ${this.pb_idle} seconds ago.`);
820
828
  }, 1e3), this.milestoneArray.start(e);
821
829
  }
822
- uninitializeProgressBar(s, r, t, e) {
823
- this.pb_startTS = 0, this.pb_progress = 0, s(this.pb_progress), r("sync failed to execute"), this.pb_increment = 0, clearInterval(this.pb_timer), this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, t(`No updates seen for ${this.pb_idle} seconds. [max idle: ${this.pb_idleMax}]`), this.milestoneArray.unstart(e);
830
+ stopPolling() {
831
+ this.pollTimer != null && (clearInterval(this.pollTimer), this.pollTimer = null), this.pollInstance = null, this.pollAuthorizedUser = null, this.pollBatchIdArray = [], this.pollLastUpdatedByBatchId = {};
832
+ }
833
+ async pollStatsOnce() {
834
+ if (this.pb_timer != null && !(this.pollInstance == null || this.pollAuthorizedUser == null) && this.statsHydrationHandler && !(!this.pollBatchIdArray || this.pollBatchIdArray.length === 0))
835
+ for (const s of this.pollBatchIdArray) {
836
+ const r = s == null ? void 0 : s.BatchId;
837
+ if (!r) continue;
838
+ const t = await Nt(this.pollInstance, this.pollAuthorizedUser, r);
839
+ if (!t.result || !t.array || !t.array[0]) continue;
840
+ const e = t.array[0], a = e.lastUpdated, o = this.pollLastUpdatedByBatchId[r];
841
+ this.pollLastUpdatedByBatchId[r] = a ?? "", !(!a || a === o) && this.statsHydrationHandler(r, e.stats);
842
+ }
824
843
  }
825
- initializeSignalR(s, r, t, e, a, o, d, i, l, u, f, I, D, R) {
826
- this.milestoneArray.post(f), I("started sync, waiting for updates..."), this.init(s, r, !1);
827
- let W = (C) => (E) => {
828
- console.log(E);
829
- let A = JSON.parse(E);
844
+ uninitializeProgressBar(s, r, t, e) {
845
+ this.pb_startTS = 0, this.pb_progress = 0, s(this.pb_progress), r("sync failed to execute"), clearInterval(this.pb_timer), this.pb_timer = null, this.pb_idle = 0, t(`No updates seen for ${this.pb_idle} seconds.`), this.milestoneArray.unstart(e);
846
+ }
847
+ /**
848
+ * Calculates the sync progress percentage (0-99%) based on completed read and write operations.
849
+ *
850
+ * The progress formula is: (completedReads + completedWrites) / (total * 2) * 100
851
+ *
852
+ * Progress is divided by (total * 2) because the sync process has two phases:
853
+ * 1. Reading phase: read users from source + excluded users
854
+ * 2. Writing phase: write users to target + excluded users + deferred users
855
+ *
856
+ * Each phase can contribute up to 50% of the total progress. The result is capped at 99%
857
+ * to prevent premature completion (100% is only shown when sync is truly complete).
858
+ *
859
+ * @param total - Total number of users to sync
860
+ * @param read - Number of users read from source
861
+ * @param written - Number of users written to target
862
+ * @param excluded - Number of users excluded from sync
863
+ * @param deferred - Number of users deferred (postponed) during writing
864
+ * @returns Progress percentage from 0 to 99
865
+ */
866
+ calculateProgress(s, r, t, e, a) {
867
+ if (s <= 0)
868
+ return 0;
869
+ const o = Math.min(s, r + e), d = Math.min(s, t + e + a), i = o + d;
870
+ return Math.min(99, Math.round(i / (s * 2) * 100));
871
+ }
872
+ updateProgressFromTotals(s, r, t, e, a, o) {
873
+ const d = this.calculateProgress(s, r, t, e, a);
874
+ this.pb_progress = Math.max(this.pb_progress, d), o(this.pb_progress), P() && localStorage.setItem("BatchIdArrayProgress", String(this.pb_progress));
875
+ }
876
+ initializeSignalR(s, r, t, e, a, o, d, i, l, u, f, b, A, C, N, B, D) {
877
+ this.milestoneArray.post(f), b("started sync, waiting for updates..."), this.init(s, r, !1);
878
+ let k = (O, we) => {
879
+ var ke, Ee;
830
880
  this.pb_idle = 0;
831
- let $ = t.find((g) => g.BatchId == A.TargetID);
832
- if ($ == null) {
833
- console.log(`Batch ${A.TargetID} not found in batchIdArray.`);
881
+ let z = t.find((h) => h.BatchId == O);
882
+ if (z == null) {
883
+ console.log(`Batch ${O} not found in batchIdArray.`);
834
884
  debugger;
835
885
  return;
836
886
  }
837
- let h = this.tenantNodes.find((g) => g.tid === $.SourceId);
838
- if (h == null) {
839
- console.log(`Tenant ${$.SourceId} not found in BatchArray.`);
887
+ let g = this.tenantNodes.find((h) => h.tid === z.SourceId);
888
+ if (g == null) {
889
+ console.log(`Tenant ${z.SourceId} not found in BatchArray.`);
840
890
  debugger;
841
891
  return;
842
892
  }
843
- h.batchId = $.BatchId;
844
- let ue = A.Stats, v = Object.keys(ue), O = Object.values(ue), X = !1, fe = !1;
845
- for (let g = 0; g < v.length; g++) {
846
- let P = v[g].endsWith("TotalCount"), L = v[g].endsWith("CurrentCount"), z = v[g].endsWith("ExtCount"), K = v[g].endsWith("DeferredCount"), ee = v[g].endsWith("RescheduledCount");
847
- if (z && (h.excluded = Math.max(Number(O[g]), h.excluded), h.targets.map((T) => {
848
- T.excluded = h.excluded, T.update(T.total, T.read, T.excluded, T.written, T.deferred);
849
- })), P && (X = Number(O[g]) == 0, h.total = Math.max(Number(O[g]), h.total), h.targets.map((T) => {
850
- T.total = h.total, T.update(T.total, T.read, T.excluded, T.written, T.deferred);
851
- })), v[g].startsWith("Reader")) {
852
- let T = /Reader\/TID:(.+)\/TotalCount/;
853
- if (L && (T = /Reader\/TID:(.+)\/CurrentCount/), z && (T = /Reader\/TID:(.+)\/ExtCount/), K && (T = /Reader\/TID:(.+)\/DeferredCount/), ee && (T = /Reader\/TID:(.+)\/RescheduledCount/), v[g].match(T) == null) {
854
- console.log(`tid not found in ${v[g]}.`);
893
+ g.batchId = z.BatchId;
894
+ let v = Object.keys(we), R = Object.values(we), ee = !1, Te = !1;
895
+ for (let h = 0; h < v.length; h++) {
896
+ let E = v[h].endsWith("TotalCount"), V = v[h].endsWith("CurrentCount"), oe = v[h].endsWith("ExtCount"), Z = v[h].endsWith("DeferredCount"), ie = v[h].endsWith("RescheduledCount");
897
+ if (oe && (g.excluded = Math.max(Number(R[h]), g.excluded), g.targets.map((w) => {
898
+ w.excluded = g.excluded, w.update(w.total, w.read, w.excluded, w.written, w.deferred);
899
+ })), E && (ee = Number(R[h]) == 0, g.total = Math.max(Number(R[h]), g.total), g.targets.map((w) => {
900
+ w.total = g.total, w.update(w.total, w.read, w.excluded, w.written, w.deferred);
901
+ })), v[h].startsWith("Reader")) {
902
+ let w = /Reader\/TID:(.+)\/TotalCount/;
903
+ if (V && (w = /Reader\/TID:(.+)\/CurrentCount/), oe && (w = /Reader\/TID:(.+)\/ExtCount/), Z && (w = /Reader\/TID:(.+)\/DeferredCount/), ie && (w = /Reader\/TID:(.+)\/RescheduledCount/), v[h].match(w) == null) {
904
+ console.log(`tid not found in ${v[h]}.`);
855
905
  debugger;
856
906
  return;
857
907
  }
858
- P ? (X = Number(O[g]) == 0, h.total = Math.max(Number(O[g]), h.total), console.log(`----- ${h.name} TID: ${h.tid} batchId: ${h.batchId}`), console.log(`----- ${h.name} Total To Read: ${h.total}`)) : (fe = Number(O[g]) == 0, L ? (h.read = Math.max(Number(O[g]), h.read), console.log(`----- ${h.name} Currently Read: ${h.read}`)) : K && (h.deferred = Math.max(Number(O[g]), h.deferred), console.log(`----- ${h.name} Deferred: ${h.deferred}`)));
908
+ E ? (ee = Number(R[h]) == 0, g.total = Math.max(Number(R[h]), g.total), console.log(`----- ${g.name} TID: ${g.tid} batchId: ${g.batchId}`), console.log(`----- ${g.name} Total To Read: ${g.total}`)) : (Te = Number(R[h]) == 0, V ? (g.read = Math.max(Number(R[h]), g.read), console.log(`----- ${g.name} Currently Read: ${g.read}`)) : Z && (g.deferred = Math.max(Number(R[h]), g.deferred), console.log(`----- ${g.name} Deferred: ${g.deferred}`)));
859
909
  }
860
- if (h.nothingtosync = X && fe, v[g].startsWith("Writer")) {
861
- let T = /Reader\/TID:(.+)\/TotalCount/;
862
- L && (T = /Writer\/TID:(.+)\/CurrentCount/), z && (T = /Writer\/TID:(.+)\/ExtCount/), K && (T = /Writer\/TID:(.+)\/DeferredCount/), ee && (T = /Writer\/TID:(.+)\/RescheduledCount/);
863
- let te = v[g].match(T);
864
- if (te == null) {
865
- console.log(`tid not found in ${v[g]}.`);
910
+ if (g.nothingtosync = ee && Te, v[h].startsWith("Writer")) {
911
+ let w = /Writer\/TID:(.+)\/TotalCount/;
912
+ V && (w = /Writer\/TID:(.+)\/CurrentCount/), oe && (w = /Writer\/TID:(.+)\/ExtCount/), Z && (w = /Writer\/TID:(.+)\/DeferredCount/), ie && (w = /Writer\/TID:(.+)\/RescheduledCount/);
913
+ let le = v[h].match(w);
914
+ if (le == null) {
915
+ console.log(`tid not found in ${v[h]}.`);
866
916
  debugger;
867
917
  return;
868
918
  }
869
- let S = h.targets.find((De) => De.tid === te[1]);
870
- if (S == null) {
871
- console.log(`Writer ${h.name} not found under Reader ${h.name}.`);
919
+ let T = g.targets.find((Ce) => Ce.tid === le[1]);
920
+ if (T == null) {
921
+ console.log(`Writer ${g.name} not found under Reader ${g.name}.`);
872
922
  debugger;
873
923
  return;
874
924
  }
875
- if (S.total = Math.max(Number(h.total), S.total), S.total = Math.max(Number(h.total), S.total), S.batchId = $.BatchId, P)
876
- S.total = Math.max(Number(P), S.total), console.log(`----- ${S.name} TID: ${S.tid} batchId: ${S.batchId}`), console.log(`----- ${S.name} Total To Write: ${S.total}`);
877
- else if (L)
878
- S.written = Math.max(Number(O[g]), S.written), console.log(`----- ${S.name} Total Written: ${S.written}`);
879
- else if (K || ee)
880
- S.deferred = Math.max(Number(O[g]), S.deferred), console.log(`----- ${S.name} Total Deferred: ${S.deferred}`);
925
+ if (T.total = Math.max(Number(g.total), T.total), T.total = Math.max(Number(g.total), T.total), T.batchId = z.BatchId, E)
926
+ T.total = Math.max(Number(R[h]), T.total), console.log(`----- ${T.name} TID: ${T.tid} batchId: ${T.batchId}`), console.log(`----- ${T.name} Total To Write: ${T.total}`);
927
+ else if (V)
928
+ T.written = Math.max(Number(R[h]), T.written), console.log(`----- ${T.name} Total Written: ${T.written}`);
929
+ else if (Z || ie)
930
+ T.deferred = Math.max(Number(R[h]), T.deferred), console.log(`----- ${T.name} Total Deferred: ${T.deferred}`);
881
931
  else {
882
932
  console.log("unknown writer type");
883
933
  debugger;
884
934
  return;
885
935
  }
886
- S.update(S.total, S.read, S.excluded, S.written, S.deferred);
887
- }
888
- }
889
- h.update(h.total, h.read, h.excluded, h.written, h.deferred);
890
- let pe = !0, he = !0, ge = !1, me = !0, Y = 0, ye = 0, we = 0, Te = 0, Se = 0, be = 0;
891
- if (this.tenantNodes.map((g) => {
892
- g.targets.map((P) => {
893
- he && (he = P.status == "complete" || P.status == "failed"), ge || (ge = P.total > 0 || P.status != "not started"), Te += Math.max(P.total, g.total), Se += P.written, be += P.excluded;
894
- }), me && (me = g.nothingtosync), pe && (pe = g.status == "complete" || g.status == "failed"), Y += g.total, ye += g.read, we += g.excluded;
895
- }), a(Y), d(ye), o(we), i(Math.max(Te, Y)), u(Se), l(be), me)
896
- this.milestoneArray.write(f), C.stop(), I("nothing to sync"), this.clearStoredBatchIds(), console.log('Setting config sync result: "nothing to sync"');
897
- else {
898
- if (pe) {
899
- this.milestoneArray.read(f), I("reading complete"), console.log('Setting config sync result: "reading complete"'), e(s.workspaceId);
900
- let z = (Date.now() - this.pb_startTS) / 1e3 / 8.5;
901
- this.pb_increment = z, console.log(`Setting increment: ${this.pb_increment}% per second`);
936
+ T.update(T.total, T.read, T.excluded, T.written, T.deferred);
902
937
  }
903
- he ? (this.milestoneArray.write(f), C.stop(), I("sync complete"), this.clearStoredBatchIds(), console.log('Setting config sync result: "complete"')) : ge ? (I("writing in progress"), console.log('Setting config sync result: "writing in progress"')) : this.milestoneArray.milestones[0].Read == null && (I("reading in progress"), console.log('Setting config sync result: "reading in progress"'));
904
938
  }
939
+ g.update(g.total, g.read, g.excluded, g.written, g.deferred);
940
+ let Se = !0, te = !0, Ie = !1, be = !0, _ = 0, se = 0, K = 0, re = 0, J = 0, ae = 0, ne = 0;
941
+ this.tenantNodes.map((h) => {
942
+ h.targets.map((E) => {
943
+ te && (te = E.status == "complete" || E.status == "failed"), Ie || (Ie = E.total > 0 || E.status != "not started"), re += Math.max(E.total, h.total), J += E.written, ae += E.excluded, ne += E.deferred;
944
+ }), be && (be = h.nothingtosync), Se && (Se = h.total > 0 && h.read + h.excluded >= h.total), _ += h.total, se += h.read, K += h.excluded;
945
+ });
946
+ const $e = _ - K, xe = J + ne, Ae = $e > 0 && $e === xe;
947
+ Ae && (te = !0, this.tenantNodes.forEach((h) => {
948
+ h.targets.forEach((E) => {
949
+ E.status !== "failed" && (E.status = "complete");
950
+ }), h.status !== "failed" && (h.status = "complete");
951
+ })), a(_), d(se), o(K), i(Math.max(re, _)), u(J), l(ae), this.updateProgressFromTotals(
952
+ Math.max(_, re),
953
+ se,
954
+ J,
955
+ Math.max(K, ae),
956
+ // Deferred users count as completed for write.
957
+ ne,
958
+ A
959
+ ), be ? (this.milestoneArray.write(f), this.stopPolling(), b("nothing to sync"), this.pb_timer && (clearInterval(this.pb_timer), this.pb_timer = null), this.pb_progress = 100, A(this.pb_progress), (ke = this.setIdleText) == null || ke.call(this, "Complete (nothing to sync)."), this.clearStoredBatchIds(), console.log('Setting config sync result: "nothing to sync"')) : (Se && (this.milestoneArray.read(f), b("reading complete"), console.log('Setting config sync result: "reading complete"'), e(s.workspaceId)), te && Ae ? (this.milestoneArray.write(f), this.stopPolling(), b("sync complete"), this.pb_timer && (clearInterval(this.pb_timer), this.pb_timer = null), this.pb_progress = 100, A(this.pb_progress), (Ee = this.setIdleText) == null || Ee.call(this, "Complete."), this.clearStoredBatchIds(), console.log('Setting config sync result: "complete"')) : Ie ? (b("writing in progress"), console.log('Setting config sync result: "writing in progress"')) : this.milestoneArray.milestones[0].Read == null && (b("reading in progress"), console.log('Setting config sync result: "reading in progress"')));
905
960
  };
906
- t.map((C) => {
907
- const E = w.signalREndpoint();
908
- let A = new URL(E);
909
- A.searchParams.append("statsId", C.BatchId), console.log(`Creating SignalR Hub for TID: ${C.SourceId} ${A.href}`);
910
- const $ = new V.HubConnectionBuilder().withUrl(A.href).withAutomaticReconnect().configureLogging(V.LogLevel.Information).build();
911
- R && JSON.parse(R).TargetID === C.BatchId && W($)(R), $.on("newMessage", W($)), $.onreconnecting((h) => {
912
- console.assert($.state === V.HubConnectionState.Reconnecting), console.log(`Connection lost due to error "${h}". Reconnecting.`);
913
- }), $.onreconnected((h) => {
914
- console.assert($.state === V.HubConnectionState.Connected), console.log(`Connection reestablished. Connected with connectionId "${h}".`);
915
- }), $.onclose(async () => {
916
- console.log("Connection closing. Attempting restart."), await $.start();
917
- }), $.start().catch(console.error);
918
- });
961
+ this.statsHydrationHandler = k, B && D && (this.pollInstance = B, this.pollAuthorizedUser = D, this.pollBatchIdArray = t, this.stopPolling(), this.pollInstance = B, this.pollAuthorizedUser = D, this.pollBatchIdArray = t, this.pollStatsOnce(), this.pollTimer = setInterval(() => {
962
+ this.pollStatsOnce();
963
+ }, this.pollIntervalSeconds * 1e3));
919
964
  }
920
965
  // start a sync cycle
921
966
  async startSync(s, r, t) {
@@ -924,10 +969,10 @@ class Bt {
924
969
  debugger;
925
970
  return e.result = !1, e.error = "startSync: invalid parameters", e.status = 500, e;
926
971
  }
927
- return e = await Pt(s, r, t), e;
972
+ return e = await Ot(s, r, t), e;
928
973
  }
929
974
  }
930
- class $e {
975
+ class ve {
931
976
  constructor(s, r, t) {
932
977
  c(this, "expanded");
933
978
  c(this, "status", "");
@@ -944,17 +989,26 @@ class $e {
944
989
  this.expanded = !1, this.name = r, this.tid = s, this.batchId = t, this.nothingtosync = !1, this.targets = new Array(), this.update(0, 0, 0, 0, 0);
945
990
  }
946
991
  update(s, r, t, e, a) {
947
- this.total = s, this.read = r, this.excluded = t, this.written = e, this.deferred = a, this.read === 0 && this.written === 0 && (this.status = "not started"), this.read > 0 ? this.read + this.excluded < this.total ? this.status = "in progress" : this.read + this.excluded === this.total && (this.status = "complete") : this.written > 0 && (this.written + this.deferred + this.excluded < this.total ? this.status = "in progress" : this.written + this.deferred + this.excluded === this.total ? this.status = "complete" : this.written + this.deferred + this.excluded >= this.total && (this.status = "failed"));
992
+ if (this.total = s, this.read = r, this.excluded = t, this.written = e, this.deferred = a, this.read === 0 && this.written === 0 && (this.status = "not started"), this.read > 0) {
993
+ if (this.read + this.excluded < this.total)
994
+ this.status = "in progress";
995
+ else if (this.read + this.excluded === this.total)
996
+ if (this.targets != null && this.targets.length > 0) {
997
+ const o = this.targets.every((d) => d.status === "complete" || d.status === "failed");
998
+ this.status = o ? "complete" : "in progress";
999
+ } else
1000
+ this.status = "complete";
1001
+ } else this.written > 0 && (this.written + this.deferred + this.excluded < this.total ? this.status = "in progress" : this.written + this.deferred + this.excluded === this.total ? this.status = "complete" : this.written + this.deferred + this.excluded >= this.total && (this.status = "failed"));
948
1002
  }
949
1003
  }
950
- class ke {
1004
+ class Re {
951
1005
  constructor(s, r) {
952
1006
  c(this, "resourceNodes");
953
1007
  this.resourceNodes = new Array(), s && this.init(r);
954
1008
  }
955
1009
  // get resource data from localStorage or file
956
1010
  init(s) {
957
- if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), G()) {
1011
+ if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), P()) {
958
1012
  let t = localStorage.getItem("ResourceArray");
959
1013
  if (t != null && typeof t == "string" && t !== "")
960
1014
  if (s)
@@ -965,27 +1019,27 @@ class ke {
965
1019
  return;
966
1020
  }
967
1021
  }
968
- var r = JSON.stringify(We);
1022
+ var r = JSON.stringify(_e);
969
1023
  try {
970
- this.resourceNodes = U(qe, r);
1024
+ this.resourceNodes = U(Xe, r);
971
1025
  } catch {
972
1026
  debugger;
973
1027
  }
974
1028
  }
975
1029
  // read
976
1030
  async read(s, r) {
977
- let t = new ke(!1, !1);
978
- return t.resourceNodes = await at(s, r), t;
1031
+ let t = new Re(!1, !1);
1032
+ return t.resourceNodes = await dt(s, r), t;
979
1033
  }
980
1034
  // save resource data to localstorage
981
1035
  save() {
982
- if (G()) {
1036
+ if (P()) {
983
1037
  let s = JSON.stringify(this);
984
1038
  localStorage.setItem("ResourceArray", s);
985
1039
  }
986
1040
  }
987
1041
  }
988
- class qe {
1042
+ class Xe {
989
1043
  constructor(s, r, t) {
990
1044
  c(this, "type");
991
1045
  c(this, "resource");
@@ -995,14 +1049,14 @@ class qe {
995
1049
  this.type = s, this.resource = r, this.cost = t, this.expanded = !1, this.resources = new Array();
996
1050
  }
997
1051
  }
998
- class Ut {
1052
+ class qt {
999
1053
  constructor(s) {
1000
1054
  c(this, "actorNodes");
1001
1055
  this.actorNodes = new Array(), this.init(s);
1002
1056
  }
1003
1057
  // get initial data from localStorage or file
1004
1058
  init(s) {
1005
- if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), G()) {
1059
+ if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${s ? "true" : "false"})`), P()) {
1006
1060
  let t = localStorage.getItem("RBACActors");
1007
1061
  if (t != null && typeof t == "string" && t !== "")
1008
1062
  if (s)
@@ -1013,15 +1067,15 @@ class Ut {
1013
1067
  return;
1014
1068
  }
1015
1069
  }
1016
- var r = JSON.stringify(Fe);
1070
+ var r = JSON.stringify(Me);
1017
1071
  try {
1018
- this.actorNodes = U(Ke, r);
1072
+ this.actorNodes = U(Ye, r);
1019
1073
  } catch {
1020
1074
  debugger;
1021
1075
  }
1022
1076
  }
1023
1077
  }
1024
- class Ke {
1078
+ class Ye {
1025
1079
  constructor(s, r, t, e, a, o) {
1026
1080
  c(this, "type");
1027
1081
  c(this, "actor");
@@ -1033,13 +1087,13 @@ class Ke {
1033
1087
  this.type = s, this.actor = r, this.resource = t, this.role = e, this.updatedby = a, this.updatedon = o, this.actors = new Array();
1034
1088
  }
1035
1089
  }
1036
- function Je(n) {
1090
+ function et(n) {
1037
1091
  return "Group.Read.All User.Read.All openid profile offline_access User.Read Contacts.Read CrossTenantInformation.ReadBasic.All";
1038
1092
  }
1039
- async function Q(n, s) {
1093
+ async function Y(n, s) {
1040
1094
  const r = new Headers();
1041
1095
  r.append("Content-Type", "application/json"), r.append("accept", "*/*");
1042
- const t = Je();
1096
+ const t = et();
1043
1097
  if (s.graphAccessToken == null || s.graphAccessToken === "")
1044
1098
  try {
1045
1099
  let e = await n.acquireTokenByCode({
@@ -1075,12 +1129,12 @@ async function Q(n, s) {
1075
1129
  }
1076
1130
  return r.append("Authorization", `Bearer ${s.graphAccessToken}`), r;
1077
1131
  }
1078
- async function _t(n, s, r) {
1132
+ async function Kt(n, s, r) {
1079
1133
  if (s == null || s.spacode == "")
1080
1134
  return { groups: [], error: "500: invalid user passed to groupsGet" };
1081
- let e = { method: "GET", headers: await Q(n, s) };
1135
+ let e = { method: "GET", headers: await Y(n, s) };
1082
1136
  try {
1083
- let a = F(s.authority) + p.graphGroupsPredicate;
1137
+ let a = W(s.authority) + p.graphGroupsPredicate;
1084
1138
  a += `/?$filter=startsWith(displayName, '${r}')`;
1085
1139
  let d = await (await fetch(a, e)).json();
1086
1140
  return typeof d.error < "u" ? { groups: [], error: `${d.error.code}: ${d.error.message}` } : { groups: d.value, error: "" };
@@ -1088,9 +1142,9 @@ async function _t(n, s, r) {
1088
1142
  return console.log(a), { groups: [], error: `Exception: ${a}` };
1089
1143
  }
1090
1144
  }
1091
- async function Ve(n, s, r, t) {
1145
+ async function tt(n, s, r, t) {
1092
1146
  try {
1093
- let e = F(s.authority) + p.graphOauth2PermissionGrantsPredicate, a = new URL(e);
1147
+ let e = W(s.authority) + p.graphOauth2PermissionGrantsPredicate, a = new URL(e);
1094
1148
  a.searchParams.append("$filter", `resourceId eq '${r}' and consentType eq 'Principal' and principalId eq '${t}'`);
1095
1149
  let d = await (await fetch(a.href, n)).json();
1096
1150
  if (typeof d.error < "u")
@@ -1104,13 +1158,13 @@ async function Ve(n, s, r, t) {
1104
1158
  return console.log(e), { grants: null, id: null, error: `Exception: ${e}` };
1105
1159
  }
1106
1160
  }
1107
- async function Ze(n, s, r, t) {
1161
+ async function st(n, s, r, t) {
1108
1162
  if (s == null || s.spacode == "")
1109
1163
  return !1;
1110
1164
  try {
1111
- let e = F(s.authority);
1165
+ let e = W(s.authority);
1112
1166
  e += p.graphOauth2PermissionGrantsPredicate + `/${r}`;
1113
- let a = `{ "scope": "${t}" }`, d = { method: "PATCH", headers: await Q(n, s), body: a }, i = await fetch(e, d), l = await i.json();
1167
+ let a = `{ "scope": "${t}" }`, d = { method: "PATCH", headers: await Y(n, s), body: a }, i = await fetch(e, d), l = await i.json();
1114
1168
  if (i.status == 204 && i.statusText == "No Content")
1115
1169
  return !0;
1116
1170
  debugger;
@@ -1120,15 +1174,15 @@ async function Ze(n, s, r, t) {
1120
1174
  return console.log(e), !1;
1121
1175
  }
1122
1176
  }
1123
- function Lt(n, s) {
1124
- let r = Le(n.authority);
1177
+ function Jt(n, s) {
1178
+ let r = Ke(n.authority);
1125
1179
  r += n.tid, r += "/adminconsent";
1126
- let t = new URL(r), e = _e(n.authority, s);
1180
+ let t = new URL(r), e = qe(n.authority, s);
1127
1181
  t.searchParams.append("client_id", e), t.searchParams.append("redirect_uri", window.location.origin), t.searchParams.append("domain_hint", n.companyDomain), t.searchParams.append("login_hint", n.mail), window.location.assign(t.href);
1128
1182
  }
1129
- async function Qe(n, s, r) {
1183
+ async function rt(n, s, r) {
1130
1184
  try {
1131
- let t = F(s.authority);
1185
+ let t = W(s.authority);
1132
1186
  t += p.graphServicePrincipalsPredicate, t += `(appId='${r}')`;
1133
1187
  let e = new URL(t);
1134
1188
  e.searchParams.append("$select", "id,appId,displayName");
@@ -1138,10 +1192,10 @@ async function Qe(n, s, r) {
1138
1192
  return console.log(t), { spid: "", error: `Exception: ${t}` };
1139
1193
  }
1140
1194
  }
1141
- async function zt(n, s) {
1195
+ async function Vt(n, s) {
1142
1196
  if (n.authority == "") {
1143
1197
  let e = new H();
1144
- if (e.domain = n.tid, await Ee(e, !1))
1198
+ if (e.domain = n.tid, await Ge(e, !1))
1145
1199
  n.authority = e.authority;
1146
1200
  else {
1147
1201
  debugger;
@@ -1172,7 +1226,7 @@ async function zt(n, s) {
1172
1226
  t.searchParams.append("domainHint", "organizations");
1173
1227
  return s.setTaskStart("initialization", /* @__PURE__ */ new Date()), s.setTaskStart("authenticate user", /* @__PURE__ */ new Date()), window.location.assign(t.href), !0;
1174
1228
  }
1175
- function Mt(n, s) {
1229
+ function Zt(n, s) {
1176
1230
  debugger;
1177
1231
  if (n.oid == "1") return;
1178
1232
  let r = window.location.href;
@@ -1192,7 +1246,7 @@ function Mt(n, s) {
1192
1246
  let t = new URL(r);
1193
1247
  t.searchParams.append("redirectUri", window.location.origin), t.searchParams.append("scope", s), t.searchParams.append("domainHint", "organizations"), t.searchParams.append("loginHint", n.mail), window.location.assign(t.href);
1194
1248
  }
1195
- async function jt(n) {
1249
+ async function Qt(n) {
1196
1250
  if (n.oid == "1") return !1;
1197
1251
  let s = window.location.href;
1198
1252
  s += "user";
@@ -1219,7 +1273,7 @@ async function jt(n) {
1219
1273
  }
1220
1274
  return r = new URL(a), r.searchParams.append("redirectUri", window.location.origin), window.location.assign(r.href), !0;
1221
1275
  }
1222
- async function Ht(n, s, r, t) {
1276
+ async function Xt(n, s, r, t) {
1223
1277
  if (t) debugger;
1224
1278
  if (s.name != null && s.name !== "") return !1;
1225
1279
  if (n.graphAccessToken != null && n.graphAccessToken === "") {
@@ -1235,7 +1289,7 @@ async function Ht(n, s, r, t) {
1235
1289
  e.append("Authorization", a);
1236
1290
  let o = { method: "GET", headers: e };
1237
1291
  try {
1238
- var d = F(s.authority) + p.graphTenantByDomainPredicate;
1292
+ var d = W(s.authority) + p.graphTenantByDomainPredicate;
1239
1293
  d += "(domainName='", d += s.domain, d += "')", console.log("tenantRelationshipsGetByDomain: Attempting GET from /findTenantInformationByDomainName:", d);
1240
1294
  let i = await fetch(d, o);
1241
1295
  if (i.status == 200) {
@@ -1254,7 +1308,7 @@ async function Ht(n, s, r, t) {
1254
1308
  }
1255
1309
  return !1;
1256
1310
  }
1257
- async function Xe(n, s, r, t, e) {
1311
+ async function at(n, s, r, t, e) {
1258
1312
  if (console.log("**** tenantRelationshipsGetById"), e) debugger;
1259
1313
  if (n.graphAccessToken === "")
1260
1314
  try {
@@ -1267,7 +1321,7 @@ async function Xe(n, s, r, t, e) {
1267
1321
  a.append("Authorization", o);
1268
1322
  let d = { method: "GET", headers: a };
1269
1323
  try {
1270
- var i = F(n.authority) + p.graphTenantByIdPredicate;
1324
+ var i = W(n.authority) + p.graphTenantByIdPredicate;
1271
1325
  i += "(tenantId='", i += s.tid, i += "')", console.log("tenantRelationshipsGetById: Attempting GET from /findTenantInformationByTenantId:", i);
1272
1326
  let u = await (await fetch(i, d)).json();
1273
1327
  if (u && typeof u.displayName !== void 0 && u.displayName !== "") {
@@ -1285,7 +1339,7 @@ async function Xe(n, s, r, t, e) {
1285
1339
  }
1286
1340
  return !1;
1287
1341
  }
1288
- async function Ee(n, s) {
1342
+ async function Ge(n, s) {
1289
1343
  if (s) debugger;
1290
1344
  let r = [p.authorityWW, p.authorityUS, p.authorityCN], t = [p.authorityWWRegex, p.authorityUSRegex, p.authorityCNRegex], e = null;
1291
1345
  try {
@@ -1310,22 +1364,22 @@ async function Ee(n, s) {
1310
1364
  }
1311
1365
  return (n.tid == "" || n.authority == "") && console.log(`GET from openid well-known endpoint failed to find tenant: ${e ? e.statusText : "unknown"}`), !1;
1312
1366
  }
1313
- async function Ye(n, s, r) {
1367
+ async function nt(n, s, r) {
1314
1368
  if (s == null || s.spacode == "" || r == null) {
1315
1369
  debugger;
1316
1370
  return { scopes: null, id: null, error: "500: invalid parameter(s) passed to getUserDelegatedScopes" };
1317
1371
  }
1318
- let e = { method: "GET", headers: await Q(n, s) };
1372
+ let e = { method: "GET", headers: await Y(n, s) };
1319
1373
  try {
1320
1374
  if (r.graphSP == "") {
1321
- let { spid: i, error: l } = await Qe(e, s, "00000003-0000-0000-c000-000000000000");
1375
+ let { spid: i, error: l } = await rt(e, s, "00000003-0000-0000-c000-000000000000");
1322
1376
  if (l != "") {
1323
1377
  debugger;
1324
1378
  return { scopes: null, id: null, error: `${l}` };
1325
1379
  }
1326
1380
  r.graphSP = i;
1327
1381
  }
1328
- let { grants: a, id: o, error: d } = await Ve(e, s, r.graphSP, s.oid);
1382
+ let { grants: a, id: o, error: d } = await tt(e, s, r.graphSP, s.oid);
1329
1383
  if (d != "") {
1330
1384
  debugger;
1331
1385
  return { scopes: null, id: null, error: `${d}` };
@@ -1336,29 +1390,29 @@ async function Ye(n, s, r) {
1336
1390
  return console.log(a), { scopes: null, id: null, error: `Exception: ${a}` };
1337
1391
  }
1338
1392
  }
1339
- async function qt(n, s, r, t) {
1393
+ async function Yt(n, s, r, t) {
1340
1394
  if (s == null || s.spacode == "" || r == null) {
1341
1395
  debugger;
1342
1396
  return !1;
1343
1397
  }
1344
- let { scopes: e, id: a, error: o } = await Ye(n, s, r);
1398
+ let { scopes: e, id: a, error: o } = await nt(n, s, r);
1345
1399
  if (o != "") {
1346
1400
  debugger;
1347
1401
  return console.log(`userDelegatedScopesRemove: cannot find userDelegatedScopes for ${s.mail}: ${o}`), !1;
1348
1402
  }
1349
1403
  e = e.replace(t, "");
1350
- let d = await Ze(n, s, a, e);
1404
+ let d = await st(n, s, a, e);
1351
1405
  if (!d) {
1352
1406
  debugger;
1353
1407
  return console.log(`userDelegatedScopesRemove: cannot set oauth2PermissionGrants for ${s.mail}: ${o}`), !1;
1354
1408
  }
1355
1409
  return s.scopes = e.split(" "), d;
1356
1410
  }
1357
- async function Kt(n, s) {
1411
+ async function es(n, s) {
1358
1412
  if (s == null || s.spacode == "")
1359
1413
  return { users: [], error: "500: invalid user passed to usersGet" };
1360
1414
  try {
1361
- let t = { method: "GET", headers: await Q(n, s) }, e = F(s.authority);
1415
+ let t = { method: "GET", headers: await Y(n, s) }, e = W(s.authority);
1362
1416
  e += p.graphUsersPredicate;
1363
1417
  let o = await (await fetch(e, t)).json();
1364
1418
  if (typeof o.error < "u")
@@ -1371,25 +1425,25 @@ async function Kt(n, s) {
1371
1425
  return console.log(r), { users: [], error: `Exception: ${r}` };
1372
1426
  }
1373
1427
  }
1374
- async function Jt(n, s, r, t) {
1375
- return ct(n, s, r, t);
1428
+ async function ts(n, s, r, t) {
1429
+ return gt(n, s, r, t);
1376
1430
  }
1377
- async function Vt(n, s, r, t) {
1378
- return dt(n, s, r, t);
1431
+ async function ss(n, s, r, t) {
1432
+ return mt(n, s, r, t);
1379
1433
  }
1380
- async function Zt(n, s, r, t, e) {
1381
- return ut(n, s, r, t, e);
1434
+ async function rs(n, s, r, t, e) {
1435
+ return yt(n, s, r, t, e);
1382
1436
  }
1383
- async function Qt(n, s, r, t) {
1384
- return ft(n, s, r, t);
1437
+ async function as(n, s, r, t) {
1438
+ return wt(n, s, r, t);
1385
1439
  }
1386
- async function Xt(n, s, r) {
1387
- return pt(n, s, r);
1440
+ async function ns(n, s, r) {
1441
+ return Tt(n, s, r);
1388
1442
  }
1389
- async function Yt(n, s, r, t, e, a, o, d) {
1443
+ async function os(n, s, r, t, e, a, o, d) {
1390
1444
  let i = new m();
1391
1445
  if (r.id === "1") {
1392
- if (i = await Tt(n, s, r, a.id, d), i.result) {
1446
+ if (i = await kt(n, s, r, a.id, d), i.result) {
1393
1447
  r.tenants.forEach((f) => {
1394
1448
  (f.configId === "1" || f.configId === "") && (f.configId = r.id);
1395
1449
  }), t && t(r.id);
@@ -1399,27 +1453,27 @@ async function Yt(n, s, r, t, e, a, o, d) {
1399
1453
  u !== -1 && (a.associatedConfigs.splice(u, 1), a.associatedConfigs.push(r.id));
1400
1454
  }
1401
1455
  } else
1402
- i = await St(n, s, r, d);
1456
+ i = await Et(n, s, r, d);
1403
1457
  return o.save(), i;
1404
1458
  }
1405
- async function es(n, s, r, t, e) {
1459
+ async function is(n, s, r, t, e) {
1406
1460
  let a = new m();
1407
- return a = await wt(n, s, r, t, e), a;
1461
+ return a = await At(n, s, r, t, e), a;
1408
1462
  }
1409
- async function ts(n, s, r, t, e) {
1410
- return ht(n, s, r, t, e);
1463
+ async function ls(n, s, r, t, e) {
1464
+ return St(n, s, r, t, e);
1411
1465
  }
1412
- async function ss(n, s, r, t, e) {
1413
- return gt(n, s, r, t, e);
1466
+ async function cs(n, s, r, t, e) {
1467
+ return It(n, s, r, t, e);
1414
1468
  }
1415
- async function rs(n, s, r, t, e, a) {
1469
+ async function ds(n, s, r, t, e, a) {
1416
1470
  let o = new m();
1417
1471
  if (e) debugger;
1418
1472
  try {
1419
1473
  let d = t.ws.find((i) => i.id === r);
1420
1474
  if (d != null) {
1421
1475
  d.associatedConfigs.length = 0;
1422
- let i = await mt(n, s, a, d.id, e);
1476
+ let i = await bt(n, s, a, d.id, e);
1423
1477
  return i.result && t.tagWithWorkspaces(), i;
1424
1478
  } else
1425
1479
  return o.result = !1, o.error = "Workspace not found.", o.status = 404, o;
@@ -1427,33 +1481,33 @@ async function rs(n, s, r, t, e, a) {
1427
1481
  return console.log(d.message), o.error = d.message, o.result = !1, o.status = 500, o;
1428
1482
  }
1429
1483
  }
1430
- async function as(n, s, r, t, e) {
1431
- return yt(n, s, r, t);
1484
+ async function us(n, s, r, t, e) {
1485
+ return $t(n, s, r, t);
1432
1486
  }
1433
- async function ns(n, s, r, t, e) {
1487
+ async function fs(n, s, r, t, e) {
1434
1488
  console.log(">>>>>> initGet");
1435
1489
  let a = new m();
1436
1490
  if (e)
1437
1491
  debugger;
1438
1492
  let o = new H();
1439
- return o.tid = s.tid, o.domain = s.tid, await Ee(o, e) ? (s.authority = o.authority, t.setTaskStart("GET tenant details", /* @__PURE__ */ new Date()), a.result = await Xe(s, o, r, n, e), t.setTaskEnd("GET tenant details", /* @__PURE__ */ new Date(), "complete"), a.result && (s.companyName = o.name, s.companyDomain = o.domain, t.setTaskStart("POST config init", /* @__PURE__ */ new Date()), a = await It(n, s, e), t.setTaskEnd("POST config init", /* @__PURE__ */ new Date(), a.result ? "complete" : "failed")), a.result && (t.setTaskStart("GET workspaces", /* @__PURE__ */ new Date()), a = await rt(n, s, r, e), t.setTaskEnd("GET workspaces", /* @__PURE__ */ new Date(), a.result ? "complete" : "failed")), console.log("initGet complete. Version: " + _()), a) : (a.error = `Failed to retrieve authority for user "${s.mail}" TID ${s.tid}.`, a.result = !1, a);
1493
+ return o.tid = s.tid, o.domain = s.tid, await Ge(o, e) ? (s.authority = o.authority, t.setTaskStart("GET tenant details", /* @__PURE__ */ new Date()), a.result = await at(s, o, r, n, e), t.setTaskEnd("GET tenant details", /* @__PURE__ */ new Date(), "complete"), a.result && (s.companyName = o.name, s.companyDomain = o.domain, t.setTaskStart("POST config init", /* @__PURE__ */ new Date()), a = await vt(n, s, e), t.setTaskEnd("POST config init", /* @__PURE__ */ new Date(), a.result ? "complete" : "failed")), a.result && (t.setTaskStart("GET workspaces", /* @__PURE__ */ new Date()), a = await ct(n, s, r, e), t.setTaskEnd("GET workspaces", /* @__PURE__ */ new Date(), a.result ? "complete" : "failed")), console.log("initGet complete. Version: " + L()), a) : (a.error = `Failed to retrieve authority for user "${s.mail}" TID ${s.tid}.`, a.result = !1, a);
1440
1494
  }
1441
- async function os(n, s, r, t) {
1442
- return kt(n, s, r, t);
1495
+ async function ps(n, s, r, t) {
1496
+ return Gt(n, s, r, t);
1443
1497
  }
1444
- async function is(n, s, r, t, e) {
1445
- return $t(n, s, r, t);
1498
+ async function hs(n, s, r, t, e) {
1499
+ return Pt(n, s, r, t);
1446
1500
  }
1447
- async function ls(n, s, r, t) {
1448
- return lt(n, s, r, t);
1501
+ async function gs(n, s, r, t) {
1502
+ return ht(n, s, r, t);
1449
1503
  }
1450
- async function cs(n, s, r, t) {
1451
- return ot(n, s, r, t);
1504
+ async function ms(n, s, r, t) {
1505
+ return ft(n, s, r, t);
1452
1506
  }
1453
- async function ds(n, s, r, t) {
1454
- return await Et(n, s, r, t);
1507
+ async function ys(n, s, r, t) {
1508
+ return await xt(n, s, r, t);
1455
1509
  }
1456
- function et(n, s, r, t) {
1510
+ function ot(n, s, r, t) {
1457
1511
  r.map((e) => {
1458
1512
  let a = null, o = s.us.findIndex((l) => l.oid === e.userId || l.oid === e.email);
1459
1513
  if (o === -1) {
@@ -1463,7 +1517,7 @@ function et(n, s, r, t) {
1463
1517
  let u = n.associatedUsers.findIndex((f) => f == "1");
1464
1518
  u !== -1 && (n.associatedUsers.splice(u, 1), n.associatedUsers.push(e.userId));
1465
1519
  } else
1466
- a = new re(), s.us.push(a);
1520
+ a = new de(), s.us.push(a);
1467
1521
  } else
1468
1522
  a = s.us.at(o);
1469
1523
  a.sel = t === e.userId, a.oid = e.userId ? e.userId : e.email, a.name = e.firstName ?? a.name, a.mail = e.email, a.tid = e.tenantId;
@@ -1471,14 +1525,14 @@ function et(n, s, r, t) {
1471
1525
  d != null && (a.authority = d.authority, a.companyName = d.name, a.companyDomain = d.domain), n.associatedUsers.findIndex((l) => l === a.oid) == -1 && n.associatedUsers.push(a.oid);
1472
1526
  }), s.save();
1473
1527
  }
1474
- function tt(n, s, r, t) {
1528
+ function it(n, s, r, t) {
1475
1529
  r.map((e) => {
1476
1530
  let a = null, o = s.ts.findIndex((u) => u.tid === e.tenantId);
1477
1531
  if (o === -1) {
1478
1532
  let u = s.ts.findIndex((f) => f.tid === "1");
1479
1533
  if (u !== -1) {
1480
1534
  a = s.ts.at(u);
1481
- let f = n.associatedTenants.findIndex((I) => I == "1");
1535
+ let f = n.associatedTenants.findIndex((b) => b == "1");
1482
1536
  f !== -1 && (n.associatedTenants.splice(f, 1), n.associatedTenants.push(e.tenantId));
1483
1537
  } else
1484
1538
  a = new H(), s.ts.push(a);
@@ -1489,7 +1543,7 @@ function tt(n, s, r, t) {
1489
1543
  a.authority = i ? i[1] : e.authority, n.associatedTenants.findIndex((u) => u === e.tenantId) == -1 && n.associatedTenants.push(e.tenantId);
1490
1544
  }), s.save();
1491
1545
  }
1492
- function st(n, s, r, t) {
1546
+ function lt(n, s, r, t) {
1493
1547
  r.map((e) => {
1494
1548
  let a = null, o = s.cs.findIndex((i) => i.id === e.id);
1495
1549
  if (o === -1) {
@@ -1499,48 +1553,48 @@ function st(n, s, r, t) {
1499
1553
  let l = n.associatedConfigs.findIndex((u) => u == "1");
1500
1554
  l !== -1 && (n.associatedConfigs.splice(l, 1), n.associatedConfigs.push(e.id));
1501
1555
  } else
1502
- a = new ae(), s.cs.push(a);
1556
+ a = new ue(), s.cs.push(a);
1503
1557
  } else
1504
1558
  a = s.cs.at(o);
1505
1559
  a.sel = t === e.id, a.id = e.id, a.workspaceId = e.workspaceId, a.name = e.name, a.description = e.description, a.isEnabled = e.isEnabled, a.tenants.length = 0, e.tenants.map((i) => {
1506
- let l = new Me();
1560
+ let l = new Ve();
1507
1561
  l.tid = i.tenantId, l.sourceGroupId = i.sourceGroupId ?? "", l.sourceGroupName = i.sourceGroupName ?? "", l.targetGroupId = i.targetGroupId ?? "", l.targetGroupName = i.targetGroupName ?? "", l.configurationTenantType = i.configurationTenantType.toLowerCase(), l.deltaToken = i.deltaToken ?? "", l.configId = a.id, l.batchId = i.batchId ?? "", l.isReadPermissionConsented = i.isReadPermissionConsented, l.isWritePermissionConsented = i.isWritePermissionConsented, a.tenants.push(l);
1508
1562
  }), n.associatedConfigs.findIndex((i) => i === e.id) == -1 && n.associatedConfigs.push(e.id);
1509
1563
  }), console.log("--------------ii-----------", s), s.save();
1510
1564
  }
1511
- async function rt(n, s, r, t) {
1565
+ async function ct(n, s, r, t) {
1512
1566
  let e = new m();
1513
1567
  if (t) debugger;
1514
1568
  try {
1515
- if (e = await Dt(n, s, t), e.result) {
1569
+ if (e = await Ct(n, s, t), e.result) {
1516
1570
  for (let a of e.array) {
1517
- let o = null, d = r.ws.findIndex((E) => E.id === a.id);
1571
+ let o = null, d = r.ws.findIndex((D) => D.id === a.id);
1518
1572
  if (d === -1) {
1519
- let E = r.ws.findIndex((A) => A.id === "1");
1520
- E !== -1 ? o = r.ws.at(E) : (o = new ne(), r.ws.push(o));
1573
+ let D = r.ws.findIndex((k) => k.id === "1");
1574
+ D !== -1 ? o = r.ws.at(D) : (o = new fe(), r.ws.push(o));
1521
1575
  } else
1522
1576
  o = r.ws.at(d);
1523
1577
  let i = "";
1524
- for (let E of o.associatedUsers) {
1525
- let A = r.us.find(($) => $.oid === E);
1526
- A != null && A.sel && (i = A.oid);
1578
+ for (let D of o.associatedUsers) {
1579
+ let k = r.us.find((O) => O.oid === D);
1580
+ k != null && k.sel && (i = k.oid);
1527
1581
  }
1528
1582
  let l = "";
1529
- for (let E of o.associatedTenants) {
1530
- let A = r.ts.find(($) => $.tid === E);
1531
- A != null && A.sel && (l = A.tid);
1583
+ for (let D of o.associatedTenants) {
1584
+ let k = r.ts.find((O) => O.tid === D);
1585
+ k != null && k.sel && (l = k.tid);
1532
1586
  }
1533
1587
  let u = "";
1534
- for (let E of o.associatedConfigs) {
1535
- let A = r.cs.find(($) => $.id === E);
1536
- A != null && A.sel && (u = A.id);
1588
+ for (let D of o.associatedConfigs) {
1589
+ let k = r.cs.find((O) => O.id === D);
1590
+ k != null && k.sel && (u = k.id);
1537
1591
  }
1538
1592
  o.associatedUsers.length = 0, o.associatedTenants.length = 0, o.associatedConfigs.length = 0, o.id = a.id, o.name = a.name, o.ownerid = a.workspaceOwnerUserId;
1539
- let f = it(n, s, o.id, t), I = At(n, s, o.id, t), D = bt(n, s, o.id, t), [R, W, C] = await Promise.all([f, I, D]);
1540
- if (!R.result) return R;
1541
- if (!W.result) return W;
1593
+ let f = pt(n, s, o.id, t), b = Rt(n, s, o.id, t), A = Dt(n, s, o.id, t), [C, N, B] = await Promise.all([f, b, A]);
1542
1594
  if (!C.result) return C;
1543
- tt(o, r, W.array, l), et(o, r, R.array, i), st(o, r, C.array, u), r.tagWithWorkspaces();
1595
+ if (!N.result) return N;
1596
+ if (!B.result) return B;
1597
+ it(o, r, N.array, l), ot(o, r, C.array, i), lt(o, r, B.array, u), r.tagWithWorkspaces();
1544
1598
  }
1545
1599
  return e;
1546
1600
  }
@@ -1549,8 +1603,8 @@ async function rt(n, s, r, t) {
1549
1603
  }
1550
1604
  return e.result = !1, e.status = 500, e;
1551
1605
  }
1552
- async function us(n, s) {
1553
- let r = "", t = _();
1606
+ async function ws(n, s) {
1607
+ let r = "", t = L();
1554
1608
  try {
1555
1609
  let e = n.getAllAccounts(), a = s.oid + "." + s.tid, o = null;
1556
1610
  for (let i = 0; i < e.length; i++)
@@ -1569,7 +1623,7 @@ async function us(n, s) {
1569
1623
  }
1570
1624
  return console.log(t), r;
1571
1625
  }
1572
- async function de(n, s) {
1626
+ async function ye(n, s) {
1573
1627
  const r = new Headers();
1574
1628
  if (r.append("Content-Type", "application/json"), r.append("accept", "*/*"), s.azureAccessToken == null || s.azureAccessToken === "")
1575
1629
  try {
@@ -1597,11 +1651,11 @@ async function de(n, s) {
1597
1651
  }
1598
1652
  return r.append("Authorization", `Bearer ${s.azureAccessToken}`), r;
1599
1653
  }
1600
- async function fs(n, s) {
1654
+ async function Ts(n, s) {
1601
1655
  if (s == null || s.spacode == "")
1602
1656
  return !1;
1603
1657
  try {
1604
- let t = { method: "GET", headers: await de(n, s) }, e = j.azureListRootAssignments;
1658
+ let t = { method: "GET", headers: await ye(n, s) }, e = j.azureListRootAssignments;
1605
1659
  e += "'", e += s.oid, e += "'";
1606
1660
  let a = await fetch(e, t);
1607
1661
  if (a.status == 200) {
@@ -1616,11 +1670,11 @@ async function fs(n, s) {
1616
1670
  }
1617
1671
  return !0;
1618
1672
  }
1619
- async function ps(n, s) {
1673
+ async function Ss(n, s) {
1620
1674
  if (s == null || s.spacode == "")
1621
1675
  return !1;
1622
1676
  try {
1623
- let t = { method: "POST", headers: await de(n, s) }, e = j.azureElevateAccess, a = await fetch(e, t);
1677
+ let t = { method: "POST", headers: await ye(n, s) }, e = j.azureElevateAccess, a = await fetch(e, t);
1624
1678
  if (a.status == 200)
1625
1679
  console.log("Successful call to Azure Resource Graph list root assignments");
1626
1680
  else
@@ -1630,12 +1684,12 @@ async function ps(n, s) {
1630
1684
  }
1631
1685
  return !0;
1632
1686
  }
1633
- async function at(n, s) {
1687
+ async function dt(n, s) {
1634
1688
  let r = new Array();
1635
1689
  if (s == null || s.spacode == "")
1636
1690
  return r;
1637
1691
  try {
1638
- let e = { method: "GET", headers: await de(n, s) }, a = j.azureListRootAssignments;
1692
+ let e = { method: "GET", headers: await ye(n, s) }, a = j.azureListRootAssignments;
1639
1693
  a += "'", a += s.oid, a += "'";
1640
1694
  let o = await fetch(a, e);
1641
1695
  if (o.status == 200) {
@@ -1650,14 +1704,14 @@ async function at(n, s) {
1650
1704
  }
1651
1705
  return r;
1652
1706
  }
1653
- function nt(n) {
1707
+ function ut(n) {
1654
1708
  let s = "8d95d21c-c378-4bb0-9f52-88c30d271e7a", r = n.authority.toLowerCase();
1655
1709
  return r.startsWith("https://login.microsoftonline.com/") ? s = "8d95d21c-c378-4bb0-9f52-88c30d271e7a" : r.startsWith("https://login.microsoftonline.us/") ? s = "48da942e-ea3d-49e4-a054-81649012f8f2" : r.startsWith("https://login.partner.microsoftonline.cn/") && (s = "c91d32e4-dcc5-4d77-826a-16e93ffce666"), `api://${s}/Config.Write`;
1656
1710
  }
1657
- async function b(n, s) {
1711
+ async function I(n, s) {
1658
1712
  const r = new Headers();
1659
1713
  r.append("Content-Type", "application/json"), r.append("accept", "*/*");
1660
- const t = nt(s);
1714
+ const t = ut(s);
1661
1715
  try {
1662
1716
  let e = n.getAllAccounts(), a = s.oid + "." + s.tid, o = null;
1663
1717
  for (let i = 0; i < e.length; i++)
@@ -1701,13 +1755,13 @@ async function y(n) {
1701
1755
  debugger;
1702
1756
  return s;
1703
1757
  }
1704
- async function ot(n, s, r, t) {
1758
+ async function ft(n, s, r, t) {
1705
1759
  let e = new m();
1706
1760
  if (r.oid == "" && r.mail == "" || t == "")
1707
1761
  return e.result = !1, e.error = "adminDelete: invalid parameters", e.status = 500, e;
1708
1762
  let a = null;
1709
- a = new URL(w.adminEndpoint()), a.searchParams.append("workspaceId", t), a.searchParams.append("email", r.mail);
1710
- let d = { method: "DELETE", headers: await b(n, s) };
1763
+ a = new URL(S.adminEndpoint()), a.searchParams.append("workspaceId", t), a.searchParams.append("email", r.mail);
1764
+ let d = { method: "DELETE", headers: await I(n, s) };
1711
1765
  try {
1712
1766
  console.log("Attempting DELETE from /admin: " + a.href);
1713
1767
  let i = await fetch(a.href, d);
@@ -1717,20 +1771,20 @@ async function ot(n, s, r, t) {
1717
1771
  }
1718
1772
  return e;
1719
1773
  }
1720
- async function it(n, s, r, t) {
1774
+ async function pt(n, s, r, t) {
1721
1775
  let e = new m();
1722
1776
  if (r === "")
1723
1777
  return e.result = !1, e.status = 500, e.error = "adminsGet: no workspace provided", e;
1724
- let a = w.adminsEndpoint(), o = new URL(a);
1778
+ let a = S.adminsEndpoint(), o = new URL(a);
1725
1779
  o.searchParams.append("workspaceId", r);
1726
- let i = { method: "GET", headers: await b(n, s) };
1780
+ let i = { method: "GET", headers: await I(n, s) };
1727
1781
  try {
1728
1782
  if (t) debugger;
1729
1783
  console.log("Attempting GET from /admins: " + o.href);
1730
1784
  let l = await fetch(o.href, i);
1731
1785
  if (l.status === 200 && l.statusText === "OK") {
1732
1786
  let u = await l.json();
1733
- return u != null ? (e.array = u, console.log(`Successful GET from /admins: ${e.array.reduce((I, D) => I + D.email + " ", "")}`), e) : (e.error = "Failed GET from /admins: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
1787
+ return u != null ? (e.array = u, console.log(`Successful GET from /admins: ${e.array.reduce((b, A) => b + A.email + " ", "")}`), e) : (e.error = "Failed GET from /admins: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
1734
1788
  } else
1735
1789
  return console.log(`Failed GET from /admins: ${o.href}`), e.error = await y(l), e.status = 500, e.result = !1, console.log(e.error), e;
1736
1790
  } catch (l) {
@@ -1738,12 +1792,12 @@ async function it(n, s, r, t) {
1738
1792
  }
1739
1793
  return e;
1740
1794
  }
1741
- async function lt(n, s, r, t) {
1795
+ async function ht(n, s, r, t) {
1742
1796
  let e = new m();
1743
1797
  if (r.mail == "" || r.authority == "" || r.tid === "")
1744
1798
  return e.result = !1, e.error = "adminPost: invalid argument", e.status = 500, e;
1745
- let a = w.adminEndpoint();
1746
- const o = await b(n, s);
1799
+ let a = S.adminEndpoint();
1800
+ const o = await I(n, s);
1747
1801
  let d = `
1748
1802
  {"email": "${r.mail}",
1749
1803
  "tenantId": "${r.tid}",
@@ -1758,13 +1812,13 @@ async function lt(n, s, r, t) {
1758
1812
  }
1759
1813
  return e;
1760
1814
  }
1761
- async function ct(n, s, r, t) {
1815
+ async function gt(n, s, r, t) {
1762
1816
  n = n, s = s, t = t;
1763
1817
  let e = new m();
1764
1818
  if (r.id === "")
1765
1819
  return e.result = !1, e.error = "auditConfigPost: invalid config ID", e.status = 500, e;
1766
- let a = w.auditConfigEndpoint();
1767
- const o = await b(n, s);
1820
+ let a = S.auditConfigEndpoint();
1821
+ const o = await I(n, s);
1768
1822
  let d = `
1769
1823
  {
1770
1824
  "workspaceId": "${r.workspaceId}",
@@ -1790,14 +1844,14 @@ async function ct(n, s, r, t) {
1790
1844
  }
1791
1845
  return e;
1792
1846
  }
1793
- async function dt(n, s, r, t) {
1847
+ async function mt(n, s, r, t) {
1794
1848
  n = n, s = s, t = t;
1795
1849
  let e = new m();
1796
1850
  if (s.mail == null || s.mail == "")
1797
1851
  return e.result = !1, e.status = 500, e.error = "auditConfigGet: no user provided", e;
1798
1852
  if (!r || r.trim() === "")
1799
1853
  return e.result = !1, e.error = "auditConfigGet: configurationId is required", e.status = 500, e;
1800
- let a = w.auditConfigEndpoint(), o = new URL(`${a}/${r}`), i = { method: "GET", headers: await b(n, s) };
1854
+ let a = S.auditConfigEndpoint(), o = new URL(`${a}/${r}`), i = { method: "GET", headers: await I(n, s) };
1801
1855
  try {
1802
1856
  if (t) debugger;
1803
1857
  console.log("Attempting GET to /audit-configuration: " + o.href);
@@ -1812,13 +1866,13 @@ async function dt(n, s, r, t) {
1812
1866
  }
1813
1867
  return e;
1814
1868
  }
1815
- async function ut(n, s, r, t, e) {
1869
+ async function yt(n, s, r, t, e) {
1816
1870
  let a = new m();
1817
1871
  if (!r || r.trim() === "")
1818
1872
  return a.result = !1, a.error = "auditConfigPut: invalid configuration ID", a.status = 500, a;
1819
- let o = w.auditConfigEndpoint(), d = new URL(o);
1873
+ let o = S.auditConfigEndpoint(), d = new URL(o);
1820
1874
  d.searchParams.append("configurationId", r);
1821
- const i = await b(n, s);
1875
+ const i = await I(n, s);
1822
1876
  let l = `
1823
1877
  {
1824
1878
  "name": "${t.name}",
@@ -1837,15 +1891,15 @@ async function ut(n, s, r, t, e) {
1837
1891
  }
1838
1892
  return a;
1839
1893
  }
1840
- async function ft(n, s, r, t) {
1894
+ async function wt(n, s, r, t) {
1841
1895
  let e = new m();
1842
1896
  if (!s.mail)
1843
1897
  return e.result = !1, e.status = 500, e.error = "auditConfigDelete: no user provided", e;
1844
1898
  if (!r || r.trim() === "")
1845
1899
  return e.result = !1, e.status = 500, e.error = "auditConfigDelete: configurationId is required", e;
1846
- let a = w.auditConfigEndpoint(), o = new URL(a);
1900
+ let a = S.auditConfigEndpoint(), o = new URL(a);
1847
1901
  o.searchParams.append("configurationId", r);
1848
- const i = { method: "DELETE", headers: await b(n, s) };
1902
+ const i = { method: "DELETE", headers: await I(n, s) };
1849
1903
  try {
1850
1904
  if (t) debugger;
1851
1905
  console.log(`Attempting DELETE to /audit-configuration: ${o.href}`);
@@ -1856,11 +1910,11 @@ async function ft(n, s, r, t) {
1856
1910
  }
1857
1911
  return e;
1858
1912
  }
1859
- async function pt(n, s, r) {
1913
+ async function Tt(n, s, r) {
1860
1914
  let t = new m();
1861
1915
  if (s.mail == null || s.mail == "")
1862
1916
  return t.result = !1, t.status = 500, t.error = "auditEventsGet: no user provided", t;
1863
- let e = w.auditEventsEndpoint(), a = new URL(e), d = { method: "GET", headers: await b(n, s) };
1917
+ let e = S.auditEventsEndpoint(), a = new URL(e), d = { method: "GET", headers: await I(n, s) };
1864
1918
  try {
1865
1919
  if (r) debugger;
1866
1920
  console.log("Attempting GET from /audit-events endpoint: " + a.href);
@@ -1870,7 +1924,7 @@ async function pt(n, s, r) {
1870
1924
  if (Array.isArray(l.data)) {
1871
1925
  let u = l.data;
1872
1926
  if (u != null)
1873
- return t.array = u, console.log(`Successful GET from /audit-events: ${t.array.reduce((I, D) => I + D.initiatedByUser + " ", "")}`), t;
1927
+ return t.array = u, console.log(`Successful GET from /audit-events: ${t.array.reduce((b, A) => b + A.initiatedByUser + " ", "")}`), t;
1874
1928
  }
1875
1929
  return t.error = "Failed GET from /audit-events: failed to JSON-parse response", console.log(t.error), t.status = 500, t.result = !1, t;
1876
1930
  } else
@@ -1880,10 +1934,10 @@ async function pt(n, s, r) {
1880
1934
  }
1881
1935
  return t;
1882
1936
  }
1883
- async function ht(n, s, r, t, e) {
1884
- let a = new m(), o = w.configConsentEndpoint(), d = new URL(o);
1937
+ async function St(n, s, r, t, e) {
1938
+ let a = new m(), o = S.configConsentEndpoint(), d = new URL(o);
1885
1939
  d.searchParams.append("configurationId", r);
1886
- const i = await b(n, s);
1940
+ const i = await I(n, s);
1887
1941
  let l = `
1888
1942
  {
1889
1943
  "tenantId": "${t}",
@@ -1898,10 +1952,10 @@ async function ht(n, s, r, t, e) {
1898
1952
  }
1899
1953
  return a;
1900
1954
  }
1901
- async function gt(n, s, r, t, e) {
1902
- let a = new m(), o = w.configConsentEndpoint(), d = new URL(o);
1955
+ async function It(n, s, r, t, e) {
1956
+ let a = new m(), o = S.configConsentEndpoint(), d = new URL(o);
1903
1957
  d.searchParams.append("configurationId", r);
1904
- const i = await b(n, s);
1958
+ const i = await I(n, s);
1905
1959
  let l = `
1906
1960
  {
1907
1961
  "tenantId": "${t}",
@@ -1916,13 +1970,13 @@ async function gt(n, s, r, t, e) {
1916
1970
  }
1917
1971
  return a;
1918
1972
  }
1919
- async function mt(n, s, r, t, e) {
1973
+ async function bt(n, s, r, t, e) {
1920
1974
  let a = new m();
1921
1975
  if (r.id === "" || t == "")
1922
1976
  return a.result = !1, a.error = "configGet: invalid config ID", a.status = 500, a;
1923
1977
  let o = null;
1924
- o = new URL(w.configEndpoint());
1925
- let i = { method: "GET", headers: await b(n, s) };
1978
+ o = new URL(S.configEndpoint());
1979
+ let i = { method: "GET", headers: await I(n, s) };
1926
1980
  try {
1927
1981
  console.log("Attempting GET from /config: " + o.href);
1928
1982
  let l = await fetch(`${o.href}/${r.id}`, i);
@@ -1940,13 +1994,13 @@ async function mt(n, s, r, t, e) {
1940
1994
  }
1941
1995
  return a;
1942
1996
  }
1943
- async function yt(n, s, r, t, e) {
1997
+ async function $t(n, s, r, t, e) {
1944
1998
  let a = new m();
1945
1999
  if (r.id === "" || t == "")
1946
2000
  return a.result = !1, a.error = "configPost: invalid config ID", a.status = 500, a;
1947
2001
  let o = null;
1948
- o = new URL(w.configEndpoint()), o.searchParams.append("configurationId", r.id);
1949
- let i = { method: "DELETE", headers: await b(n, s) };
2002
+ o = new URL(S.configEndpoint()), o.searchParams.append("configurationId", r.id);
2003
+ let i = { method: "DELETE", headers: await I(n, s) };
1950
2004
  try {
1951
2005
  console.log("Attempting DELETE from /config: " + o.href);
1952
2006
  let l = await fetch(o.href, i);
@@ -1956,13 +2010,13 @@ async function yt(n, s, r, t, e) {
1956
2010
  }
1957
2011
  return a;
1958
2012
  }
1959
- async function wt(n, s, r, t, e) {
2013
+ async function At(n, s, r, t, e) {
1960
2014
  let a = new m();
1961
2015
  if (r === "")
1962
2016
  return a.result = !1, a.error = "configPatch: invalid config ID", a.status = 500, a;
1963
- let o = w.configEnabledEndpoint(), d = new URL(o);
2017
+ let o = S.configEnabledEndpoint(), d = new URL(o);
1964
2018
  d.searchParams.append("configurationId", r), d.searchParams.append("isEnabled", t.toString());
1965
- let l = { method: "PATCH", headers: await b(n, s) };
2019
+ let l = { method: "PATCH", headers: await I(n, s) };
1966
2020
  try {
1967
2021
  if (e) debugger;
1968
2022
  console.log("Attempting PATCH to /config: " + d.href);
@@ -1973,12 +2027,12 @@ async function wt(n, s, r, t, e) {
1973
2027
  }
1974
2028
  return a;
1975
2029
  }
1976
- async function Tt(n, s, r, t, e) {
2030
+ async function kt(n, s, r, t, e) {
1977
2031
  let a = new m();
1978
2032
  if (r.id === "")
1979
2033
  return a.result = !1, a.error = "configPost: invalid config ID", a.status = 500, a;
1980
- let o = w.configEndpoint();
1981
- const d = await b(n, s);
2034
+ let o = S.configEndpoint();
2035
+ const d = await I(n, s);
1982
2036
  let i = `
1983
2037
  {
1984
2038
  "workspaceId": "${t}",
@@ -1987,13 +2041,13 @@ async function Tt(n, s, r, t, e) {
1987
2041
  "isEnabled": ${r.isEnabled},
1988
2042
  "tenants": [`;
1989
2043
  r.tenants.map((u) => {
1990
- let f = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", I = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", D = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", R = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
2044
+ let f = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", b = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", A = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", C = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
1991
2045
  i.slice(-1) === "}" && (i += ","), i += `{
1992
2046
  "tenantId": "${u.tid}",
1993
2047
  "sourceGroupId": ${f},
1994
- "sourceGroupName": ${I},
1995
- "targetGroupId": ${D},
1996
- "targetGroupName": ${R},
2048
+ "sourceGroupName": ${b},
2049
+ "targetGroupId": ${A},
2050
+ "targetGroupName": ${C},
1997
2051
  "configurationTenantType": "${u.configurationTenantType}",
1998
2052
  "isReadPermissionConsented": ${u.isReadPermissionConsented},
1999
2053
  "isWritePermissionConsented": ${u.isWritePermissionConsented}
@@ -2015,13 +2069,13 @@ async function Tt(n, s, r, t, e) {
2015
2069
  return a.status = 500, a.result = !1, a.error = u.message, console.log(a.error), a;
2016
2070
  }
2017
2071
  }
2018
- async function St(n, s, r, t) {
2072
+ async function Et(n, s, r, t) {
2019
2073
  let e = new m();
2020
2074
  if (r.id === "")
2021
2075
  return e.result = !1, e.error = "configPost: invalid config ID", e.status = 500, e;
2022
- let a = w.configEndpoint(), o = new URL(a);
2076
+ let a = S.configEndpoint(), o = new URL(a);
2023
2077
  o.searchParams.append("configurationId", r.id);
2024
- const d = await b(n, s);
2078
+ const d = await I(n, s);
2025
2079
  let i = `
2026
2080
  {
2027
2081
  "name": "${r.name}",
@@ -2029,13 +2083,13 @@ async function St(n, s, r, t) {
2029
2083
  "tenants": [`;
2030
2084
  r.tenants.map((u) => {
2031
2085
  i.slice(-1) === "}" && (i += ",");
2032
- let I = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", D = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", R = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", W = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
2086
+ let b = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", A = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", C = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", N = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
2033
2087
  i += `{
2034
2088
  "tenantId": "${u.tid}",
2035
- "sourceGroupId": ${I},
2036
- "sourceGroupName": ${D},
2037
- "targetGroupId": ${R},
2038
- "targetGroupName": ${W},
2089
+ "sourceGroupId": ${b},
2090
+ "sourceGroupName": ${A},
2091
+ "targetGroupId": ${C},
2092
+ "targetGroupName": ${N},
2039
2093
  "configurationTenantType": "${u.configurationTenantType}",
2040
2094
  "deltaToken": "${u.deltaToken}",
2041
2095
  "isReadPermissionConsented": ${u.isReadPermissionConsented},
@@ -2061,20 +2115,20 @@ async function St(n, s, r, t) {
2061
2115
  }
2062
2116
  return e;
2063
2117
  }
2064
- async function bt(n, s, r, t) {
2118
+ async function Dt(n, s, r, t) {
2065
2119
  let e = new m();
2066
2120
  if (r === "")
2067
2121
  return e.result = !1, e.status = 500, e.error = "configsGet: no workspace provided", e;
2068
- let a = w.configsEndpoint(), o = new URL(a);
2122
+ let a = S.configsEndpoint(), o = new URL(a);
2069
2123
  o.searchParams.append("workspaceId", r);
2070
- let i = { method: "GET", headers: await b(n, s) };
2124
+ let i = { method: "GET", headers: await I(n, s) };
2071
2125
  try {
2072
2126
  if (t) debugger;
2073
2127
  console.log("Attempting GET from /configurations: " + o.href);
2074
2128
  let l = await fetch(o.href, i);
2075
2129
  if (l.status === 200 && l.statusText === "OK") {
2076
2130
  let u = await l.json();
2077
- return u != null ? (e.array = u, console.log(`Successful GET from /configurations: ${e.array.reduce((I, D) => I + D.name + " ", "")}`), e) : (e.error = "Failed GET from /configurations: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
2131
+ return u != null ? (e.array = u, console.log(`Successful GET from /configurations: ${e.array.reduce((b, A) => b + A.name + " ", "")}`), e) : (e.error = "Failed GET from /configurations: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
2078
2132
  } else
2079
2133
  return console.log(`Failed GET from /configurations: ${o.href}`), e.error = await y(l), e.status = 500, e.result = !1, console.log(e.error), e;
2080
2134
  } catch (l) {
@@ -2082,13 +2136,13 @@ async function bt(n, s, r, t) {
2082
2136
  }
2083
2137
  return e;
2084
2138
  }
2085
- async function hs(n, s, r, t) {
2139
+ async function Is(n, s, r, t) {
2086
2140
  let e = new m();
2087
2141
  if (!r)
2088
2142
  return e.result = !1, e.status = 500, e.error = "workspaceConfigsGet: no workspace provided", e;
2089
- let a = w.workspaceConfigsEndpoint(), o = new URL(a);
2143
+ let a = S.workspaceConfigsEndpoint(), o = new URL(a);
2090
2144
  o.searchParams.append("workspaceId", r);
2091
- let i = { method: "GET", headers: await b(n, s) };
2145
+ let i = { method: "GET", headers: await I(n, s) };
2092
2146
  try {
2093
2147
  if (t) debugger;
2094
2148
  console.log("Attempting GET from /workspaceConfigs: " + o.href);
@@ -2113,12 +2167,12 @@ async function hs(n, s, r, t) {
2113
2167
  }
2114
2168
  return e;
2115
2169
  }
2116
- async function It(n, s, r) {
2170
+ async function vt(n, s, r) {
2117
2171
  let t = new m();
2118
2172
  if (s.companyName === "" || s.companyDomain === "")
2119
2173
  return t.result = !1, t.error = "initPost: invalid company name or domain", t.status = 500, t;
2120
- let e = w.initEndpoint();
2121
- const a = await b(n, s);
2174
+ let e = S.initEndpoint();
2175
+ const a = await I(n, s);
2122
2176
  let o = `
2123
2177
  {
2124
2178
  "tenantCreateModel": {
@@ -2139,13 +2193,13 @@ async function It(n, s, r) {
2139
2193
  }
2140
2194
  return t.status = 500, t.result = !1, t;
2141
2195
  }
2142
- async function $t(n, s, r, t, e) {
2196
+ async function Pt(n, s, r, t, e) {
2143
2197
  let a = new m();
2144
2198
  if (r.tid === "" || t === "")
2145
2199
  return a.result = !1, a.error = "tenantDelete: invalid tid, workspaceId", a.status = 500, a;
2146
- let o = new URL(w.tenantEndpoint());
2200
+ let o = new URL(S.tenantEndpoint());
2147
2201
  o.searchParams.append("tenantId", r.tid), o.searchParams.append("workspaceId", t);
2148
- let i = { method: "DELETE", headers: await b(n, s) };
2202
+ let i = { method: "DELETE", headers: await I(n, s) };
2149
2203
  try {
2150
2204
  console.log("Attempting DELETE from /tenant: " + o.href);
2151
2205
  let l = await fetch(o.href, i);
@@ -2155,20 +2209,20 @@ async function $t(n, s, r, t, e) {
2155
2209
  }
2156
2210
  return a;
2157
2211
  }
2158
- async function At(n, s, r, t) {
2212
+ async function Rt(n, s, r, t) {
2159
2213
  let e = new m();
2160
2214
  if (r === "")
2161
2215
  return e.result = !1, e.status = 500, e.error = "tenantsGet: no workspace provided", e;
2162
- let a = w.tenantsEndpoint(), o = new URL(a);
2216
+ let a = S.tenantsEndpoint(), o = new URL(a);
2163
2217
  o.searchParams.append("workspaceId", r);
2164
- let i = { method: "GET", headers: await b(n, s) };
2218
+ let i = { method: "GET", headers: await I(n, s) };
2165
2219
  try {
2166
2220
  if (t) debugger;
2167
2221
  console.log(`Attempting GET from /tenants: ${o.href}`);
2168
2222
  let l = await fetch(o.href, i);
2169
2223
  if (l.status === 200 && l.statusText === "OK") {
2170
2224
  let u = await l.json();
2171
- return u != null ? (e.array = u, console.log(`Successful GET from /tenants: ${e.array.reduce((I, D) => I + D.domain + " ", "")}`), e) : (e.error = "Failed GET from /tenants: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
2225
+ return u != null ? (e.array = u, console.log(`Successful GET from /tenants: ${e.array.reduce((b, A) => b + A.domain + " ", "")}`), e) : (e.error = "Failed GET from /tenants: failed to JSON-parse response", console.log(e.error), e.status = 500, e.result = !1, e);
2172
2226
  } else
2173
2227
  return console.log(`Failed GET from /tenants: ${o.href}`), e.error = await y(l), e.status = 500, e.result = !1, console.log(e.error), e;
2174
2228
  } catch (l) {
@@ -2176,13 +2230,13 @@ async function At(n, s, r, t) {
2176
2230
  }
2177
2231
  return e;
2178
2232
  }
2179
- async function kt(n, s, r, t) {
2233
+ async function Gt(n, s, r, t) {
2180
2234
  let e = new m();
2181
2235
  if (r.tid === "" || r.name === "" || r.domain === "")
2182
2236
  return e.result = !1, e.error = "tenantPost: invalid tid, name, domain", e.status = 500, e;
2183
- let a = w.tenantEndpoint(), o = new URL(a);
2237
+ let a = S.tenantEndpoint(), o = new URL(a);
2184
2238
  o.searchParams.append("workspaceId", t);
2185
- const d = await b(n, s);
2239
+ const d = await I(n, s);
2186
2240
  let i = `
2187
2241
  {"tenantId": "${r.tid}",
2188
2242
  "name": "${r.name}",
@@ -2199,13 +2253,13 @@ async function kt(n, s, r, t) {
2199
2253
  }
2200
2254
  return e;
2201
2255
  }
2202
- async function Et(n, s, r, t) {
2256
+ async function xt(n, s, r, t) {
2203
2257
  let e = new m();
2204
2258
  if (r == "" || t == "")
2205
2259
  return e.result = !1, e.error = "workspacePut: invalid workspace ID or name", e.status = 500, e;
2206
- let a = w.workspaceEndpoint(), o = new URL(a);
2260
+ let a = S.workspaceEndpoint(), o = new URL(a);
2207
2261
  o.searchParams.append("workspaceId", r), o.searchParams.append("workspaceName", t);
2208
- let i = { method: "PUT", headers: await b(n, s) };
2262
+ let i = { method: "PUT", headers: await I(n, s) };
2209
2263
  try {
2210
2264
  console.log("Attempting PUT to /workspace: " + o.href);
2211
2265
  let l = await fetch(o.href, i);
@@ -2215,18 +2269,18 @@ async function Et(n, s, r, t) {
2215
2269
  }
2216
2270
  return e;
2217
2271
  }
2218
- async function Dt(n, s, r) {
2272
+ async function Ct(n, s, r) {
2219
2273
  let t = new m();
2220
2274
  if (s.mail == null || s.mail == "")
2221
2275
  return t.result = !1, t.status = 500, t.error = "adminsGet: no workspace provided", t;
2222
- let e = w.workspacesEndpoint(), a = new URL(e), d = { method: "GET", headers: await b(n, s) };
2276
+ let e = S.workspacesEndpoint(), a = new URL(e), d = { method: "GET", headers: await I(n, s) };
2223
2277
  try {
2224
2278
  if (r) debugger;
2225
2279
  console.log("Attempting GET from /workspaces endpoint: " + a.href);
2226
2280
  let i = await fetch(a.href, d);
2227
2281
  if (i.status === 200 && i.statusText === "OK") {
2228
2282
  let l = await i.json();
2229
- return l != null ? (t.array = l, console.log(`Successful GET from /workspaces: ${t.array.reduce((f, I) => f + I.name + " ", "")}`), t) : (t.error = "Failed GET from /workspaces: failed to JSON-parse response", console.log(t.error), t.status = 500, t.result = !1, t);
2283
+ return l != null ? (t.array = l, console.log(`Successful GET from /workspaces: ${t.array.reduce((f, b) => f + b.name + " ", "")}`), t) : (t.error = "Failed GET from /workspaces: failed to JSON-parse response", console.log(t.error), t.status = 500, t.result = !1, t);
2230
2284
  } else
2231
2285
  return console.log(`Failed GET from /workspaces: ${a.href}`), t.error = await y(i), t.status = 500, t.result = !1, console.log(t.error), t;
2232
2286
  } catch (i) {
@@ -2234,13 +2288,13 @@ async function Dt(n, s, r) {
2234
2288
  }
2235
2289
  return t;
2236
2290
  }
2237
- async function Pt(n, s, r) {
2291
+ async function Ot(n, s, r) {
2238
2292
  let t = new m();
2239
2293
  if (n == null || s == null)
2240
2294
  return t.result = !1, t.error = "readerPost: invalid parameters", t.status = 500, t;
2241
- let e = w.readerStartSyncEndpoint(), a = new URL(e);
2295
+ let e = S.readerStartSyncEndpoint(), a = new URL(e);
2242
2296
  a.searchParams.append("configurationId", r.id);
2243
- let d = { method: "POST", headers: await b(n, s) };
2297
+ let d = { method: "POST", headers: await I(n, s) };
2244
2298
  try {
2245
2299
  console.log("Attempting POST to /startSync: " + a.href);
2246
2300
  let i = await fetch(a.href, d);
@@ -2255,11 +2309,11 @@ async function Pt(n, s, r) {
2255
2309
  }
2256
2310
  return t;
2257
2311
  }
2258
- async function gs(n, s, r) {
2312
+ async function Nt(n, s, r) {
2259
2313
  let t = new m();
2260
2314
  if (n == null || s == null)
2261
2315
  return t.result = !1, t.error = "readerPost: invalid parameters", t.status = 500, t;
2262
- let e = w.statsEndpoint(), a = new URL(`${e}/${r}`), d = { method: "GET", headers: await b(n, s) };
2316
+ let e = S.statsEndpoint(), a = new URL(`${e}/${r}`), d = { method: "GET", headers: await I(n, s) };
2263
2317
  try {
2264
2318
  console.log("Attempting GET to /stats: " + a.href);
2265
2319
  let i = await fetch(a.href, d);
@@ -2275,93 +2329,93 @@ async function gs(n, s, r) {
2275
2329
  }
2276
2330
  export {
2277
2331
  m as APIResult,
2278
- Ut as ActorArray,
2279
- Ke as ActorNode,
2280
- Nt as AuditConfig,
2281
- Bt as BatchArray,
2282
- Ct as Group,
2283
- Wt as InitInfo,
2332
+ qt as ActorArray,
2333
+ Ye as ActorNode,
2334
+ _t as AuditConfig,
2335
+ Ht as BatchArray,
2336
+ Lt as Group,
2337
+ Mt as InitInfo,
2284
2338
  M as Milestone,
2285
- He as MilestoneArray,
2286
- ke as ResourceArray,
2287
- qe as ResourceNode,
2288
- ae as SyncConfig,
2289
- se as Task,
2290
- Ft as TaskArray,
2339
+ Qe as MilestoneArray,
2340
+ Re as ResourceArray,
2341
+ Xe as ResourceNode,
2342
+ ue as SyncConfig,
2343
+ ce as Task,
2344
+ jt as TaskArray,
2291
2345
  H as Tenant,
2292
- Me as TenantConfigInfo,
2293
- ze as TenantConfigType,
2294
- $e as TenantNode,
2295
- Ue as TenantPermissionType,
2296
- Be as TenantType,
2297
- re as User,
2298
- Ot as UserScope,
2299
- ne as Workspace,
2300
- ot as adminDelete,
2301
- lt as adminPost,
2302
- it as adminsGet,
2303
- Jt as auditConfigAdd,
2304
- ft as auditConfigDelete,
2305
- Zt as auditConfigEdit,
2306
- dt as auditConfigGet,
2307
- ct as auditConfigPost,
2308
- ut as auditConfigPut,
2309
- Qt as auditConfigRemove,
2310
- Vt as auditConfigRetrieve,
2311
- pt as auditEventsGet,
2312
- Xt as auditEventsRetrieve,
2346
+ Ve as TenantConfigInfo,
2347
+ Je as TenantConfigType,
2348
+ ve as TenantNode,
2349
+ He as TenantPermissionType,
2350
+ je as TenantType,
2351
+ de as User,
2352
+ zt as UserScope,
2353
+ fe as Workspace,
2354
+ ft as adminDelete,
2355
+ ht as adminPost,
2356
+ pt as adminsGet,
2357
+ ts as auditConfigAdd,
2358
+ wt as auditConfigDelete,
2359
+ rs as auditConfigEdit,
2360
+ mt as auditConfigGet,
2361
+ gt as auditConfigPost,
2362
+ yt as auditConfigPut,
2363
+ as as auditConfigRemove,
2364
+ ss as auditConfigRetrieve,
2365
+ Tt as auditEventsGet,
2366
+ ns as auditEventsRetrieve,
2313
2367
  j as azureConfig,
2314
- fs as canListRootAssignments,
2315
- ts as configConsentForRead,
2316
- ss as configConsentForWrite,
2317
- ht as configConsentReadPut,
2318
- gt as configConsentWritePut,
2319
- yt as configDelete,
2320
- Yt as configEdit,
2321
- es as configEnable,
2322
- mt as configGet,
2323
- wt as configPatch,
2324
- Tt as configPost,
2325
- St as configPut,
2326
- as as configRemove,
2327
- bt as configsGet,
2328
- rs as configsRefresh,
2329
- ps as elevateGlobalAdminToUserAccessAdmin,
2330
- us as getPowerBIAccessToken,
2331
- _ as getSyncVersion,
2368
+ Ts as canListRootAssignments,
2369
+ ls as configConsentForRead,
2370
+ cs as configConsentForWrite,
2371
+ St as configConsentReadPut,
2372
+ It as configConsentWritePut,
2373
+ $t as configDelete,
2374
+ os as configEdit,
2375
+ is as configEnable,
2376
+ bt as configGet,
2377
+ At as configPatch,
2378
+ kt as configPost,
2379
+ Et as configPut,
2380
+ us as configRemove,
2381
+ Dt as configsGet,
2382
+ ds as configsRefresh,
2383
+ Ss as elevateGlobalAdminToUserAccessAdmin,
2384
+ ws as getPowerBIAccessToken,
2385
+ L as getSyncVersion,
2332
2386
  p as graphConfig,
2333
- _t as groupsGet,
2334
- xt as helloNpm,
2335
- ns as initGet,
2336
- It as initPost,
2337
- w as mindlineConfig,
2338
- Ve as oauth2PermissionGrantsGet,
2339
- Ze as oauth2PermissionGrantsSet,
2387
+ Kt as groupsGet,
2388
+ Ut as helloNpm,
2389
+ fs as initGet,
2390
+ vt as initPost,
2391
+ S as mindlineConfig,
2392
+ tt as oauth2PermissionGrantsGet,
2393
+ st as oauth2PermissionGrantsSet,
2340
2394
  y as processErrors,
2341
- Pt as readerPost,
2342
- gs as readerStats,
2343
- Lt as requestAdminConsent,
2344
- Qe as servicePrincipalGet,
2345
- zt as signIn,
2346
- Mt as signInIncrementally,
2347
- jt as signOut,
2348
- Gt as sum,
2349
- os as tenantAdd,
2350
- $t as tenantDelete,
2351
- kt as tenantPost,
2352
- Ht as tenantRelationshipsGetByDomain,
2353
- Xe as tenantRelationshipsGetById,
2354
- is as tenantRemove,
2355
- Ee as tenantUnauthenticatedLookup,
2356
- At as tenantsGet,
2357
- ls as userAdd,
2358
- Ye as userDelegatedScopesGet,
2359
- qt as userDelegatedScopesRemove,
2360
- cs as userRemove,
2361
- Kt as usersGet,
2362
- hs as workspaceConfigsGet,
2363
- ds as workspaceEdit,
2364
- Et as workspacePut,
2365
- Dt as workspacesGet
2395
+ Ot as readerPost,
2396
+ Nt as readerStats,
2397
+ Jt as requestAdminConsent,
2398
+ rt as servicePrincipalGet,
2399
+ Vt as signIn,
2400
+ Zt as signInIncrementally,
2401
+ Qt as signOut,
2402
+ Ft as sum,
2403
+ ps as tenantAdd,
2404
+ Pt as tenantDelete,
2405
+ Gt as tenantPost,
2406
+ Xt as tenantRelationshipsGetByDomain,
2407
+ at as tenantRelationshipsGetById,
2408
+ hs as tenantRemove,
2409
+ Ge as tenantUnauthenticatedLookup,
2410
+ Rt as tenantsGet,
2411
+ gs as userAdd,
2412
+ nt as userDelegatedScopesGet,
2413
+ Yt as userDelegatedScopesRemove,
2414
+ ms as userRemove,
2415
+ es as usersGet,
2416
+ Is as workspaceConfigsGet,
2417
+ ys as workspaceEdit,
2418
+ xt as workspacePut,
2419
+ Ct as workspacesGet
2366
2420
  };
2367
2421
  //# sourceMappingURL=sync.es.js.map