@beam3_dev/api_module 0.0.164 → 0.0.165

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/wb3Api.js CHANGED
@@ -67,9 +67,9 @@ async function me(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function ge(e, t = G) {
69
69
  let n = v.now().year;
70
- const s = e, a = [], r = (i) => {
71
- for (let c in i)
72
- a.push({ date: c, comment: i[c] });
70
+ const s = e, a = [], c = (i) => {
71
+ for (let r in i)
72
+ a.push({ date: r, comment: i[r] });
73
73
  };
74
74
  for (let i = n; i <= n + 1; i++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ge(e, t = G) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((c) => c.json()).then((c) => {
84
- r(c);
85
- }).catch((c) => console.error("Erreur : " + c));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
87
  const i = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let c of a)
90
+ for (let r of a)
91
91
  i.events.findIndex(
92
- (l) => l.start === v.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
92
+ (l) => l.start === v.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && i.events.push({
94
- name: "Férié : " + c.comment,
95
- start: v.fromISO(c.date).toISODate(),
96
- end: v.fromISO(c.date).toISODate(),
94
+ name: "Férié : " + r.comment,
95
+ start: v.fromISO(r.date).toISODate(),
96
+ end: v.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function ge(e, t = G) {
102
102
  }
103
103
  async function he(e, t, n = !0) {
104
104
  const s = e.events.findIndex((a) => a.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((a, r) => a.start - r.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((a, c) => a.start - c.start), e;
106
106
  }
107
107
  function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -150,14 +150,14 @@ async function we(e, t = void 0, n = void 0) {
150
150
  function K() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), a = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), a = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
157
  tenant: n,
158
158
  user: s,
159
159
  appsConfiguration: a,
160
- appConf: r
160
+ appConf: c
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
@@ -166,9 +166,9 @@ function $(e, t = void 0, n = void 0) {
166
166
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
167
  m(s, {
168
168
  onComplete(a) {
169
- const r = typeof a == "string" ? JSON.parse(a) : a;
170
- if (r && "platforms" in r) {
171
- const o = r.platforms.find(
169
+ const c = typeof a == "string" ? JSON.parse(a) : a;
170
+ if (c && "platforms" in c) {
171
+ const o = c.platforms.find(
172
172
  (i) => i.id === e.tenant.toUpperCase()
173
173
  );
174
174
  t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
@@ -186,9 +186,9 @@ function Ce(e, t = void 0, n = void 0) {
186
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
187
  m(s, {
188
188
  onComplete(a) {
189
- const r = JSON.parse(a);
190
- if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
- const o = `${r[0].services[0].url}`;
189
+ const c = JSON.parse(a);
190
+ if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
191
+ const o = `${c[0].services[0].url}`;
192
192
  t && t(o);
193
193
  }
194
194
  },
@@ -211,15 +211,15 @@ function Te(e, t, n) {
211
211
  "Content-Type": "application/json",
212
212
  Accept: "application/json"
213
213
  },
214
- onComplete(r, o, i) {
215
- const c = JSON.parse(r), d = c.data.map((l) => {
214
+ onComplete(c, o, i) {
215
+ const r = JSON.parse(c), d = r.data.map((l) => {
216
216
  const p = l.attributes.name, f = l.id;
217
217
  return { name: p, id: f };
218
218
  });
219
- t && t(d, c);
219
+ t && t(d, r);
220
220
  },
221
- onFailure(r, o) {
222
- const i = r;
221
+ onFailure(c, o) {
222
+ const i = c;
223
223
  i.msg = o.errormsg, i.errCode = o.errorcode, n && n(i);
224
224
  }
225
225
  });
@@ -227,25 +227,25 @@ function Te(e, t, n) {
227
227
  function Oe(e, t = void 0, n = void 0) {
228
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
229
  m(s, {
230
- onComplete(a, r, o) {
230
+ onComplete(a, c, o) {
231
231
  const i = JSON.parse(a);
232
232
  console.log("_AppMngt_get_users => ", i), t && t(i);
233
233
  },
234
- onFailure(a, r) {
234
+ onFailure(a, c) {
235
235
  const o = a;
236
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
236
+ o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
237
237
  }
238
238
  });
239
239
  }
240
240
  function be(e, t, n = void 0, s = void 0) {
241
241
  let a = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
242
  m(a, {
243
- onComplete(r, o, i) {
244
- const c = JSON.parse(r);
245
- n && n(c);
243
+ onComplete(c, o, i) {
244
+ const r = JSON.parse(c);
245
+ n && n(r);
246
246
  },
247
- onFailure(r, o) {
248
- const i = r;
247
+ onFailure(c, o) {
248
+ const i = c;
249
249
  i.msg = o.errormsg, i.errCode = o.errorcode, s && s(i);
250
250
  }
251
251
  });
@@ -255,14 +255,14 @@ const F = {
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
257
  function Ne(e, t, n = void 0, s = void 0) {
258
- const { space: a, currentUser: r } = e, i = `${a}${{
258
+ const { space: a, currentUser: c } = e, i = `${a}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
- }.URIUGr}`, c = {
260
+ }.URIUGr}`, r = {
261
261
  groups: [
262
262
  {
263
263
  title: t.title,
264
264
  description: t.description,
265
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
265
+ members: t.members || [c.email, "samuel.mureau@beam3.fr"],
266
266
  pending_members: [],
267
267
  sharing: t.sharing,
268
268
  visibility: t.visibility
@@ -272,7 +272,7 @@ function Ne(e, t, n = void 0, s = void 0) {
272
272
  m(i, {
273
273
  method: "POST",
274
274
  headers: F,
275
- data: JSON.stringify(c),
275
+ data: JSON.stringify(r),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
278
278
  },
@@ -284,7 +284,7 @@ function Ne(e, t, n = void 0, s = void 0) {
284
284
  });
285
285
  }
286
286
  function ve(e, t, n = void 0, s = void 0) {
287
- const { space: a, tenant: r } = e, o = a, i = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${i}${c}`;
287
+ const { space: a, tenant: c } = e, o = a, i = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${i}${r}`;
288
288
  m(d, {
289
289
  opts: {
290
290
  method: "GET",
@@ -303,12 +303,12 @@ function ve(e, t, n = void 0, s = void 0) {
303
303
  });
304
304
  }
305
305
  function V(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: a } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", i = `?tenant=dstenant:${a}`, c = {
306
+ const { space: s, tenant: a } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", i = `?tenant=dstenant:${a}`, r = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
- }, d = `${r}${o}${i}`;
309
+ }, d = `${c}${o}${i}`;
310
310
  m(d, {
311
- OPTsH: c,
311
+ OPTsH: r,
312
312
  onComplete(l) {
313
313
  t && t(JSON.parse(l));
314
314
  },
@@ -356,7 +356,7 @@ function $e(e, t) {
356
356
  });
357
357
  }
358
358
  function Ae(e, t, n, s = void 0, a = void 0) {
359
- const { space: r, tenant: o } = e, i = {
359
+ const { space: c, tenant: o } = e, i = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
362
  nextURICh: "/characteristics",
@@ -364,7 +364,7 @@ function Ae(e, t, n, s = void 0, a = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, c = n, d = `${r}${i.URIUGr}/${t}`, l = JSON.stringify(c);
367
+ }, r = n, d = `${c}${i.URIUGr}/${t}`, l = JSON.stringify(r);
368
368
  m(d, {
369
369
  headers: F,
370
370
  method: "PATCH",
@@ -379,7 +379,7 @@ function Ae(e, t, n, s = void 0, a = void 0) {
379
379
  });
380
380
  }
381
381
  function ke(e, t, n, s = void 0, a = void 0) {
382
- const { space: r } = e, i = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
382
+ const { space: c } = e, i = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  m(i, {
384
384
  method: "PATCH",
385
385
  headers: F,
@@ -418,8 +418,8 @@ async function W(e, t, n) {
418
418
  onComplete(a) {
419
419
  a = JSON.parse(a), t && t(a.csrf);
420
420
  },
421
- onFailure(a, r, o) {
422
- n && n({ error: a, headers: r, xhr: o });
421
+ onFailure(a, c, o) {
422
+ n && n({ error: a, headers: c, xhr: o });
423
423
  }
424
424
  });
425
425
  }
@@ -433,14 +433,14 @@ var X = function(e, t, n, s) {
433
433
  var a = {};
434
434
  if (typeof e != "string" || e.length === 0)
435
435
  return a;
436
- var r = /\+/g;
436
+ var c = /\+/g;
437
437
  e = e.split(t);
438
438
  var o = 1e3;
439
439
  s && typeof s.maxKeys == "number" && (o = s.maxKeys);
440
440
  var i = e.length;
441
441
  o > 0 && i > o && (i = o);
442
- for (var c = 0; c < i; ++c) {
443
- var d = e[c].replace(r, "%20"), l = d.indexOf(n), p, f, u, g;
442
+ for (var r = 0; r < i; ++r) {
443
+ var d = e[r].replace(c, "%20"), l = d.indexOf(n), p, f, u, g;
444
444
  l >= 0 ? (p = d.substr(0, l), f = d.substr(l + 1)) : (p = d, f = ""), u = decodeURIComponent(p), g = decodeURIComponent(f), B(a, u) ? Array.isArray(a[u]) ? a[u].push(g) : a[u] = [a[u], g] : a[u] = g;
445
445
  }
446
446
  return a;
@@ -457,10 +457,10 @@ var X = function(e, t, n, s) {
457
457
  }
458
458
  }, Y = function(e, t, n, s) {
459
459
  return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(a) {
460
- var r = encodeURIComponent(N(a)) + n;
460
+ var c = encodeURIComponent(N(a)) + n;
461
461
  return Array.isArray(e[a]) ? e[a].map(function(o) {
462
- return r + encodeURIComponent(N(o));
463
- }).join(t) : r + encodeURIComponent(N(e[a]));
462
+ return c + encodeURIComponent(N(o));
463
+ }).join(t) : c + encodeURIComponent(N(e[a]));
464
464
  }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
465
465
  };
466
466
  I.decode = I.parse = X;
@@ -471,9 +471,9 @@ async function H(e, t = void 0, n = void 0, s = void 0) {
471
471
  console.log("Le paramètre docid est obligatoire");
472
472
  return;
473
473
  }
474
- const r = a + `/resources/v1/modeler/documents/${t}`;
475
- m(r, {
476
- onComplete(o, i, c) {
474
+ const c = a + `/resources/v1/modeler/documents/${t}`;
475
+ m(c, {
476
+ onComplete(o, i, r) {
477
477
  const d = JSON.parse(o);
478
478
  n && n(d);
479
479
  },
@@ -488,16 +488,16 @@ async function Ue(e, t = void 0, n = void 0, s = void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
489
489
  return;
490
490
  }
491
- let r = `${a}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
491
+ let c = `${a}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
492
492
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
493
493
  });
494
- m(r, {
494
+ m(c, {
495
495
  method: "POST",
496
496
  headers: {
497
497
  "Content-Type": "application/x-www-form-urlencoded"
498
498
  },
499
499
  data: o,
500
- onComplete(i, c, d) {
500
+ onComplete(i, r, d) {
501
501
  const l = JSON.parse(i);
502
502
  n && n(l);
503
503
  },
@@ -510,7 +510,7 @@ function A(e, t = void 0, n = void 0) {
510
510
  if (e.objID && e.objID !== "") {
511
511
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
512
  m(s, {
513
- onComplete(a, r, o) {
513
+ onComplete(a, c, o) {
514
514
  const i = JSON.parse(a);
515
515
  e.token = i?.csrf?.value, e.datas = i?.data[0], t && t(e);
516
516
  },
@@ -533,14 +533,14 @@ function T(e, t = void 0, n = void 0) {
533
533
  if (e.space) {
534
534
  const s = e.space + "/resources/v1/application/CSRF";
535
535
  m(s, {
536
- onComplete(a, r, o) {
536
+ onComplete(a, c, o) {
537
537
  const i = JSON.parse(a);
538
538
  t && t(i.csrf.value);
539
539
  },
540
- onFailure(a, r, o) {
540
+ onFailure(a, c, o) {
541
541
  n && n({
542
542
  response: a,
543
- headers: r,
543
+ headers: c,
544
544
  xhr: o
545
545
  });
546
546
  }
@@ -558,12 +558,12 @@ function U(e, t = void 0, n = void 0) {
558
558
  headers: {
559
559
  ENO_CSRF_TOKEN: e.token
560
560
  },
561
- onComplete(r, o) {
562
- const c = JSON.parse(r).data[0].dataelements.ticketURL;
563
- t && t(c, o);
561
+ onComplete(c, o) {
562
+ const r = JSON.parse(c).data[0].dataelements.ticketURL;
563
+ t && t(r, o);
564
564
  },
565
- onFailure(r, o) {
566
- console.warn("☠️ error => ", r, o), n && n(r, o);
565
+ onFailure(c, o) {
566
+ console.warn("☠️ error => ", c, o), n && n(c, o);
567
567
  }
568
568
  });
569
569
  },
@@ -573,8 +573,8 @@ function U(e, t = void 0, n = void 0) {
573
573
  );
574
574
  }
575
575
  function je(e, t, n, s = void 0, a = void 0) {
576
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
- n || (n = e.token), m(r, {
576
+ const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
+ n || (n = e.token), m(c, {
578
578
  method: "PUT",
579
579
  headers: {
580
580
  ENO_CSRF_TOKEN: n
@@ -583,10 +583,10 @@ function je(e, t, n, s = void 0, a = void 0) {
583
583
  let i = JSON.parse(o);
584
584
  if (console.log("☠️ info => ", i), i.success === !0)
585
585
  try {
586
- const c = i.data[0].dataelements.ticketURL;
587
- s && s(c);
588
- } catch (c) {
589
- a && a(c);
586
+ const r = i.data[0].dataelements.ticketURL;
587
+ s && s(r);
588
+ } catch (r) {
589
+ a && a(r);
590
590
  }
591
591
  },
592
592
  onFailure(o) {
@@ -594,7 +594,7 @@ function je(e, t, n, s = void 0, a = void 0) {
594
594
  }
595
595
  });
596
596
  }
597
- function z(e, t, n, s, a, r = void 0, o = void 0) {
597
+ function z(e, t, n, s, a, c = void 0, o = void 0) {
598
598
  const i = () => q(
599
599
  e,
600
600
  t,
@@ -602,23 +602,23 @@ function z(e, t, n, s, a, r = void 0, o = void 0) {
602
602
  s,
603
603
  a,
604
604
  e.token,
605
- r,
605
+ c,
606
606
  o
607
607
  );
608
608
  e.token ? i() : A(
609
609
  e,
610
610
  t,
611
- (c) => {
612
- e.token = c.csrf.value, i();
611
+ (r) => {
612
+ e.token = r.csrf.value, i();
613
613
  }
614
614
  );
615
615
  }
616
- function q(e, t, n, s, a, r, o = void 0, i = void 0) {
617
- const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
- m(c, {
616
+ function q(e, t, n, s, a, c, o = void 0, i = void 0) {
617
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
+ m(r, {
619
619
  method: "PUT",
620
620
  headers: {
621
- ENO_CSRF_TOKEN: r
621
+ ENO_CSRF_TOKEN: c
622
622
  },
623
623
  onComplete(d, l, p) {
624
624
  const f = JSON.parse(d).data[0].dataelements, u = new FormData();
@@ -628,7 +628,7 @@ function q(e, t, n, s, a, r, o = void 0, i = void 0) {
628
628
  let S = "temp_" + Date.now(), _ = {
629
629
  method: "PUT",
630
630
  headers: {
631
- ENO_CSRF_TOKEN: r
631
+ ENO_CSRF_TOKEN: c
632
632
  },
633
633
  data: JSON.stringify({
634
634
  data: [{
@@ -664,12 +664,12 @@ function q(e, t, n, s, a, r, o = void 0, i = void 0) {
664
664
  }
665
665
  });
666
666
  }
667
- async function De(e, t, n, s, a = void 0, r = void 0) {
668
- const o = e.space, i = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
667
+ async function De(e, t, n, s, a = void 0, c = void 0) {
668
+ const o = e.space, i = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
669
669
  type: "text/plain"
670
670
  }), p = {
671
671
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
672
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
672
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
673
673
  };
674
674
  if (!o && o !== "") {
675
675
  console.log("le store._3DSpace est vide");
@@ -687,7 +687,7 @@ async function De(e, t, n, s, a = void 0, r = void 0) {
687
687
  method: "POST",
688
688
  data: d,
689
689
  onComplete(C) {
690
- if (c !== "" && i !== "") {
690
+ if (r !== "" && i !== "") {
691
691
  const k = {
692
692
  method: "POST",
693
693
  headers: {
@@ -719,7 +719,7 @@ async function De(e, t, n, s, a = void 0, r = void 0) {
719
719
  onComplete: _,
720
720
  onFailure: y
721
721
  };
722
- c !== "" && m(p.url_Post, k);
722
+ r !== "" && m(p.url_Post, k);
723
723
  } else
724
724
  console.warn("le store est vide");
725
725
  },
@@ -730,18 +730,18 @@ async function De(e, t, n, s, a = void 0, r = void 0) {
730
730
  }
731
731
  function y(C, k) {
732
732
  console.log("Erreur -- response ", C, `
733
- headers `, k), r && r(C);
733
+ headers `, k), c && c(C);
734
734
  }
735
735
  m(h.ticketURL, S);
736
736
  }
737
737
  });
738
738
  }
739
- function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1) {
739
+ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, c = void 0, o = !1) {
740
740
  const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
741
741
  m(i, {
742
742
  method: "GET",
743
- onComplete(c) {
744
- const d = JSON.parse(c);
743
+ onComplete(r) {
744
+ const d = JSON.parse(r);
745
745
  let l = "", p, f, u;
746
746
  if (t) {
747
747
  let g = d.collabspaces.find((h) => h.title === t);
@@ -760,7 +760,7 @@ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1
760
760
  let y = h.filter(
761
761
  (C) => C.role.name === S
762
762
  );
763
- y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : r(y);
763
+ y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : c(y);
764
764
  }
765
765
  });
766
766
  }) : h.forEach((S) => {
@@ -770,16 +770,16 @@ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1
770
770
  let _ = h.filter(
771
771
  (y) => y.role.name === n
772
772
  );
773
- _.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : r(_);
773
+ _.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : c(_);
774
774
  }
775
775
  }));
776
776
  }
777
777
  }
778
- p && f && u ? (l = u + "." + f + "." + p, a(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(l)) : r && (l = u + "." + f + "." + p, r(l));
778
+ p && f && u ? (l = u + "." + f + "." + p, a(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(l)) : c && (l = u + "." + f + "." + p, c(l));
779
779
  },
780
- onFailure(c, d) {
780
+ onFailure(r, d) {
781
781
  console.log("Erreur de récupération du contexte de sécurité. => ", {
782
- err: c,
782
+ err: r,
783
783
  headers: d
784
784
  });
785
785
  }
@@ -801,12 +801,12 @@ async function x(e, t = void 0, n = void 0) {
801
801
  ), new Promise((s, a) => {
802
802
  U(
803
803
  e,
804
- (r) => {
805
- e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
804
+ (c) => {
805
+ e?.returnType === "blob" ? (console.log("ticketURL blob", c), fetch(c).then((o) => o.blob()).then((o) => {
806
806
  t && t(o);
807
807
  }).catch((o) => {
808
808
  n && n(o);
809
- })) : m(r, {
809
+ })) : m(c, {
810
810
  onComplete(o) {
811
811
  let i;
812
812
  try {
@@ -816,21 +816,21 @@ async function x(e, t = void 0, n = void 0) {
816
816
  }
817
817
  t && typeof t == "function" && t(i), s(i);
818
818
  },
819
- onFailure(o, i, c) {
819
+ onFailure(o, i, r) {
820
820
  n && (console.log("error http", o), n({
821
821
  msg: JSON.parse(o),
822
822
  headers: i,
823
- xhr: c
823
+ xhr: r
824
824
  }), a({
825
825
  msg: JSON.parse(o),
826
826
  headers: i,
827
- xhr: c
827
+ xhr: r
828
828
  }));
829
829
  }
830
830
  });
831
831
  },
832
- (r) => {
833
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), a(r);
832
+ (c) => {
833
+ n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), a(c);
834
834
  }
835
835
  );
836
836
  });
@@ -839,8 +839,8 @@ async function Q(e, t, n = void 0, s = void 0) {
839
839
  let a = [];
840
840
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
841
841
  for (let i = 0; i < t.length; i += 80) {
842
- const c = t.slice(i, i + 80);
843
- a.push(c);
842
+ const r = t.slice(i, i + 80);
843
+ a.push(r);
844
844
  }
845
845
  const o = (i) => {
846
846
  Z(
@@ -849,8 +849,8 @@ async function Q(e, t, n = void 0, s = void 0) {
849
849
  () => {
850
850
  i++, i < a.length && o(i);
851
851
  },
852
- (c) => {
853
- n && n(c);
852
+ (r) => {
853
+ n && n(r);
854
854
  }
855
855
  );
856
856
  };
@@ -863,10 +863,10 @@ async function Q(e, t, n = void 0, s = void 0) {
863
863
  );
864
864
  }
865
865
  function Z(e, t, n = void 0, s = void 0, a = void 0) {
866
- const r = [];
867
- t.forEach((c) => {
868
- r.push({
869
- id: c
866
+ const c = [];
867
+ t.forEach((r) => {
868
+ c.push({
869
+ id: r
870
870
  });
871
871
  });
872
872
  let o = JSON.stringify({
@@ -874,16 +874,16 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
874
874
  name: "ENO_CSRF_TOKEN",
875
875
  value: e.token
876
876
  },
877
- data: r
877
+ data: c
878
878
  });
879
879
  const i = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
880
880
  m(i, {
881
881
  method: "PUT",
882
882
  data: o,
883
883
  type: "json",
884
- onComplete(c) {
885
- const d = c.data;
886
- c.success === !0 && (n && n(), d.forEach((l) => {
884
+ onComplete(r) {
885
+ const d = r.data;
886
+ r.success === !0 && (n && n(), d.forEach((l) => {
887
887
  try {
888
888
  const p = l.dataelements.fileName, f = l.dataelements.ticketURL;
889
889
  m(f, {
@@ -910,15 +910,15 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
910
910
  }
911
911
  }));
912
912
  },
913
- onFailure(c) {
914
- console.log(c), a && a(c);
913
+ onFailure(r) {
914
+ console.log(r), a && a(r);
915
915
  }
916
916
  });
917
917
  }
918
918
  function Pe(e, t, n = void 0, s = void 0) {
919
919
  return new Promise((a) => {
920
920
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
921
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
921
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
922
922
  b(
923
923
  e.space,
924
924
  "ESPACE COMMUN",
@@ -950,12 +950,12 @@ function Pe(e, t, n = void 0, s = void 0) {
950
950
  s && s(i);
951
951
  }
952
952
  };
953
- m(r, o);
953
+ m(c, o);
954
954
  }
955
955
  });
956
956
  }
957
957
  function Re(e, t, n, s = void 0, a = void 0) {
958
- return new Promise((r) => {
958
+ return new Promise((c) => {
959
959
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
960
960
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
961
961
  b(
@@ -963,9 +963,9 @@ function Re(e, t, n, s = void 0, a = void 0) {
963
963
  "ESPACE COMMUN",
964
964
  ["VPLMProjectLeader", "VPLMCreator"],
965
965
  void 0,
966
- (c) => e.ctx = c,
967
- (c) => {
968
- console.log("onError =>", c);
966
+ (r) => e.ctx = r,
967
+ (r) => {
968
+ console.log("onError =>", r);
969
969
  }
970
970
  );
971
971
  let i = {
@@ -983,11 +983,11 @@ function Re(e, t, n, s = void 0, a = void 0) {
983
983
  }]
984
984
  }),
985
985
  type: "json",
986
- onComplete(c) {
987
- s && s(c);
986
+ onComplete(r) {
987
+ s && s(r);
988
988
  },
989
- onFailure(c) {
990
- a && a(c);
989
+ onFailure(r) {
990
+ a && a(r);
991
991
  }
992
992
  };
993
993
  m(o, i);
@@ -997,7 +997,7 @@ function Re(e, t, n, s = void 0, a = void 0) {
997
997
  function xe(e, t, n = void 0, s = void 0) {
998
998
  return new Promise((a) => {
999
999
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1000
- const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1000
+ const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1001
1001
  b(
1002
1002
  e.space,
1003
1003
  "ESPACE COMMUN",
@@ -1029,14 +1029,14 @@ function xe(e, t, n = void 0, s = void 0) {
1029
1029
  s && s(i);
1030
1030
  }
1031
1031
  };
1032
- m(r, o);
1032
+ m(c, o);
1033
1033
  }
1034
1034
  });
1035
1035
  }
1036
1036
  function Me(e, t, n = void 0, s = void 0) {
1037
1037
  return new Promise((a) => {
1038
1038
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1039
- const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1039
+ const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1040
1040
  b(
1041
1041
  e.space,
1042
1042
  "ESPACE COMMUN",
@@ -1074,12 +1074,12 @@ function Me(e, t, n = void 0, s = void 0) {
1074
1074
  s && s(i);
1075
1075
  }
1076
1076
  };
1077
- m(r, o);
1077
+ m(c, o);
1078
1078
  }
1079
1079
  });
1080
1080
  }
1081
1081
  function Le(e, t, n, s = void 0, a = void 0) {
1082
- return new Promise((r) => {
1082
+ return new Promise((c) => {
1083
1083
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1084
1084
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1085
1085
  b(
@@ -1087,9 +1087,9 @@ function Le(e, t, n, s = void 0, a = void 0) {
1087
1087
  "ESPACE COMMUN",
1088
1088
  ["VPLMProjectLeader", "VPLMCreator"],
1089
1089
  void 0,
1090
- (c) => e.ctx = c,
1091
- (c) => {
1092
- console.log("onError =>", c);
1090
+ (r) => e.ctx = r,
1091
+ (r) => {
1092
+ console.log("onError =>", r);
1093
1093
  }
1094
1094
  );
1095
1095
  let i = {
@@ -1112,21 +1112,21 @@ function Le(e, t, n, s = void 0, a = void 0) {
1112
1112
  notificationTimeout: 600
1113
1113
  }),
1114
1114
  type: "json",
1115
- onComplete(c) {
1116
- s && s(c);
1115
+ onComplete(r) {
1116
+ s && s(r);
1117
1117
  },
1118
- onFailure(c) {
1119
- a && a(c);
1118
+ onFailure(r) {
1119
+ a && a(r);
1120
1120
  }
1121
1121
  };
1122
1122
  m(o, i);
1123
1123
  }
1124
1124
  });
1125
1125
  }
1126
- function Je(e, t, n, s, a = void 0, r = void 0) {
1126
+ function Je(e, t, n, s, a = void 0, c = void 0) {
1127
1127
  return new Promise((o) => {
1128
1128
  const i = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1129
- let c = {
1129
+ let r = {
1130
1130
  attributes: {
1131
1131
  title: n,
1132
1132
  description: s,
@@ -1135,7 +1135,7 @@ function Je(e, t, n, s, a = void 0, r = void 0) {
1135
1135
  }, d = {
1136
1136
  items: []
1137
1137
  };
1138
- t && (d.parentId = t), d.items.push(c);
1138
+ t && (d.parentId = t), d.items.push(r);
1139
1139
  let l = {
1140
1140
  method: "POST",
1141
1141
  headers: {
@@ -1150,13 +1150,13 @@ function Je(e, t, n, s, a = void 0, r = void 0) {
1150
1150
  a && a(p);
1151
1151
  },
1152
1152
  onFailure(p) {
1153
- r && r(p);
1153
+ c && c(p);
1154
1154
  }
1155
1155
  };
1156
1156
  m(i, l);
1157
1157
  });
1158
1158
  }
1159
- function Ee(e, t, n, s, a = void 0, r = void 0) {
1159
+ function Ee(e, t, n, s, a = void 0, c = void 0) {
1160
1160
  return console.log("credentials", e), new Promise((o) => {
1161
1161
  `${e.space}`, JSON.stringify({
1162
1162
  csrf: {
@@ -1190,12 +1190,12 @@ function Ge(e, t = void 0, n = void 0) {
1190
1190
  Accept: "application/json,text/javascript,*/*",
1191
1191
  "Content-Type": "application/ds-json"
1192
1192
  },
1193
- onComplete(r, o) {
1194
- const i = JSON.parse(r);
1193
+ onComplete(c, o) {
1194
+ const i = JSON.parse(c);
1195
1195
  t && t(i, o);
1196
1196
  },
1197
- onFailure(r, o, i) {
1198
- n && n({ response: r, headers: o, xhr: i });
1197
+ onFailure(c, o, i) {
1198
+ n && n({ response: c, headers: o, xhr: i });
1199
1199
  }
1200
1200
  });
1201
1201
  }
@@ -1206,11 +1206,11 @@ function Ke(e, t, n, s) {
1206
1206
  (a) => {
1207
1207
  m(a, {
1208
1208
  header: { ENO_CSRF_TOKEN: e.token },
1209
- onComplete: (r) => {
1210
- n && n(r);
1209
+ onComplete: (c) => {
1210
+ n && n(c);
1211
1211
  },
1212
- onFailure: (r) => {
1213
- console.log("error http", r), s && s(r);
1212
+ onFailure: (c) => {
1213
+ console.log("error http", c), s && s(c);
1214
1214
  }
1215
1215
  });
1216
1216
  }
@@ -1218,29 +1218,29 @@ function Ke(e, t, n, s) {
1218
1218
  }
1219
1219
  async function Ve(e, t, n = void 0, s = void 0) {
1220
1220
  return new Promise((a) => {
1221
- U(e, t, (r) => {
1222
- m(r, {
1223
- onComplete: (o, i, c) => (a(JSON.parse(o)), n && n(JSON.parse(o), i, c), a),
1224
- onFailure: (o, i, c) => {
1225
- s && s(o, i, c), console.log(o, i?.errormsg);
1221
+ U(e, t, (c) => {
1222
+ m(c, {
1223
+ onComplete: (o, i, r) => (a(JSON.parse(o)), n && n(JSON.parse(o), i, r), a),
1224
+ onFailure: (o, i, r) => {
1225
+ s && s(o, i, r), console.log(o, i?.errormsg);
1226
1226
  }
1227
1227
  });
1228
1228
  });
1229
1229
  });
1230
1230
  }
1231
1231
  function We(e, t, n, s = void 0, a = void 0) {
1232
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1232
+ const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1233
1233
  A(
1234
1234
  e,
1235
1235
  n,
1236
1236
  (o) => {
1237
- const i = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1237
+ const i = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1238
1238
  z(
1239
1239
  e,
1240
1240
  n,
1241
1241
  i,
1242
- r,
1243
1242
  c,
1243
+ r,
1244
1244
  (d) => {
1245
1245
  s && s(d);
1246
1246
  },
@@ -1290,12 +1290,12 @@ function Ye(e, t = void 0, n = void 0) {
1290
1290
  console.warn("la liste est vide ou n'est pas un tableau");
1291
1291
  return;
1292
1292
  }
1293
- e.objIds.forEach((a, r) => {
1293
+ e.objIds.forEach((a, c) => {
1294
1294
  x(
1295
1295
  e,
1296
1296
  a.objID,
1297
1297
  (o) => {
1298
- s.push({ [a.name]: o }), a.name === "dbProjets" && (M = o.affaires.map((i) => i.objectID), ee(e, L)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1298
+ s.push({ [a.name]: o }), a.name === "dbProjets" && (M = o.affaires.map((i) => i.objectID), ee(e, L)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1299
1299
  }
1300
1300
  );
1301
1301
  });
@@ -1305,8 +1305,8 @@ function ee(e, t, n = void 0, s = void 0) {
1305
1305
  e,
1306
1306
  M,
1307
1307
  (a) => {
1308
- const r = [...t];
1309
- r.find((o) => o.objectID === a.objectId).data = a.data, L = r, j.push(a.data), n && n(j);
1308
+ const c = [...t];
1309
+ c.find((o) => o.objectID === a.objectId).data = a.data, L = c, j.push(a.data), n && n(j);
1310
1310
  },
1311
1311
  (a) => {
1312
1312
  s && (s(a), console.log(a));
@@ -1334,10 +1334,10 @@ const te = "FA35FB9B177A280065800EA0000F599C", ne = [
1334
1334
  tag: "testTag"
1335
1335
  };
1336
1336
  function He(e, t, n = void 0, s = void 0) {
1337
- const { space: a, tenant: r } = e, { objId: o, pred: i, tag: c } = t, d = {
1337
+ const { space: a, tenant: c } = e, { objId: o, pred: i, tag: r } = t, d = {
1338
1338
  uri: "/resources/6w/tags",
1339
1339
  otpCTX: "SecurityContext=preferred",
1340
- optTenant: `tenant=${r}`
1340
+ optTenant: `tenant=${c}`
1341
1341
  }, l = `${a}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1342
1342
  tag: [
1343
1343
  {
@@ -1348,7 +1348,7 @@ function He(e, t, n = void 0, s = void 0) {
1348
1348
  ],
1349
1349
  predicate: J[i],
1350
1350
  object: {
1351
- literal: c
1351
+ literal: r
1352
1352
  }
1353
1353
  }
1354
1354
  ]
@@ -1395,17 +1395,17 @@ function He(e, t, n = void 0, s = void 0) {
1395
1395
  }
1396
1396
  function ie(e, t, n = void 0, s = void 0) {
1397
1397
  console.log("obj ", t);
1398
- const a = t.info.name, r = {
1398
+ const a = t.info.name, c = {
1399
1399
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1400
1400
  uri: "/federated/search"
1401
- }, o = `${r.baseUrl}${r.uri}`, i = {
1401
+ }, o = `${c.baseUrl}${c.uri}`, i = {
1402
1402
  "Content-Type": "application/json",
1403
1403
  Accept: "application/json,text/javascript,*/*"
1404
- }, c = R(), d = {
1404
+ }, r = R(), d = {
1405
1405
  with_indexing_date: !0,
1406
1406
  with_synthesis: !0,
1407
1407
  with_nls: !1,
1408
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1408
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1409
1409
  locale: "fr",
1410
1410
  select_predicate: [
1411
1411
  "ds6w:label",
@@ -1477,11 +1477,11 @@ function ie(e, t, n = void 0, s = void 0) {
1477
1477
  });
1478
1478
  }
1479
1479
  function ze(e, t, n = void 0, s = void 0) {
1480
- const { objId: a, pred: r, tag: o } = t, i = {
1480
+ const { objId: a, pred: c, tag: o } = t, i = {
1481
1481
  uri: "/resources/6w/tags",
1482
1482
  otpCTX: "SecurityContext=preferred",
1483
1483
  optTenant: `tenant=${e.tenant}`
1484
- }, c = `${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`, d = {
1484
+ }, r = `${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`, d = {
1485
1485
  tag: [
1486
1486
  {
1487
1487
  subject: [
@@ -1489,14 +1489,14 @@ function ze(e, t, n = void 0, s = void 0) {
1489
1489
  uri: `pid://${a}`
1490
1490
  }
1491
1491
  ],
1492
- predicate: J[r],
1492
+ predicate: J[c],
1493
1493
  object: {
1494
1494
  literal: o
1495
1495
  }
1496
1496
  }
1497
1497
  ]
1498
1498
  };
1499
- m(c, {
1499
+ m(r, {
1500
1500
  method: "DELETE",
1501
1501
  data: JSON.stringify(d),
1502
1502
  headers: {
@@ -1516,16 +1516,16 @@ function qe(e, t = "", n = void 0, s = void 0) {
1516
1516
  const { space: a } = e;
1517
1517
  if (t === "")
1518
1518
  return;
1519
- const r = {
1519
+ const c = {
1520
1520
  uri: "/resources/v1/modeler/documents"
1521
1521
  }, o = {
1522
1522
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1523
1523
  Accept: "application/json,text/javascript,*/*"
1524
- }, i = `${a}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1524
+ }, i = `${a}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1525
1525
  m(i, {
1526
1526
  method: "POST",
1527
1527
  headers: o,
1528
- data: c,
1528
+ data: r,
1529
1529
  onComplete(d) {
1530
1530
  n && n(JSON.parse(d));
1531
1531
  },
@@ -1538,7 +1538,7 @@ function qe(e, t = "", n = void 0, s = void 0) {
1538
1538
  async function w(e, t = void 0, n = void 0) {
1539
1539
  const s = e.space + "/api/index/tk";
1540
1540
  return m(s, {
1541
- onComplete(a, r, o) {
1541
+ onComplete(a, c, o) {
1542
1542
  const i = JSON.parse(a);
1543
1543
  if (t)
1544
1544
  return t(i), e.token = i?.result?.ServerToken;
@@ -1559,11 +1559,11 @@ function Qe(e, t = void 0, n = void 0) {
1559
1559
  start: 0
1560
1560
  }
1561
1561
  };
1562
- w(e, (r) => {
1562
+ w(e, (c) => {
1563
1563
  m(s, {
1564
1564
  method: "POST",
1565
1565
  headers: {
1566
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1566
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1567
1567
  "Content-type": "application/json;charset=UTF-8",
1568
1568
  Accept: "application/json"
1569
1569
  },
@@ -1588,19 +1588,19 @@ function Ze(e, t = void 0, n = void 0) {
1588
1588
  maxNbOfCommonElements: "5"
1589
1589
  }
1590
1590
  };
1591
- w(e, (r) => {
1591
+ w(e, (c) => {
1592
1592
  m(s, {
1593
1593
  method: "POST",
1594
1594
  headers: {
1595
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1595
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1596
1596
  "Content-type": "application/json;charset=UTF-8",
1597
1597
  Accept: "application/json"
1598
1598
  },
1599
1599
  data: JSON.stringify(a),
1600
1600
  type: "json",
1601
1601
  onComplete(o, i) {
1602
- const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1603
- t && t(c, o);
1602
+ const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1603
+ t && t(r, o);
1604
1604
  },
1605
1605
  onFailure(o, i) {
1606
1606
  n && n(o, i);
@@ -1614,14 +1614,14 @@ function et(e, t = void 0, n = void 0) {
1614
1614
  uri: "/api/community/listmycommunities",
1615
1615
  limit: `/limit/${e.limit ? e.limit : 128}`,
1616
1616
  page: `/page/${e.page ? e.page : "1"}`
1617
- }, a = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1617
+ }, a = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1618
1618
  w(e, (o) => {
1619
1619
  m(a, {
1620
1620
  method: "GET",
1621
1621
  headers: {
1622
1622
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1623
1623
  },
1624
- onComplete(i, c, d) {
1624
+ onComplete(i, r, d) {
1625
1625
  const p = JSON.parse(i).result;
1626
1626
  let f = 0;
1627
1627
  p.forEach((u) => {
@@ -1637,21 +1637,21 @@ function et(e, t = void 0, n = void 0) {
1637
1637
  e,
1638
1638
  u.id,
1639
1639
  (h) => {
1640
- f++, g.members = h, r.push(g), f === p.length && t && t(r);
1640
+ f++, g.members = h, c.push(g), f === p.length && t && t(c);
1641
1641
  },
1642
1642
  (h) => n(h)
1643
1643
  );
1644
1644
  });
1645
1645
  },
1646
- onFailure(i, c) {
1646
+ onFailure(i, r) {
1647
1647
  const d = i;
1648
- d.status = c.status, d.response = c.errormsg, n && n(d);
1648
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1649
1649
  }
1650
1650
  });
1651
1651
  });
1652
1652
  }
1653
1653
  function ae(e, t, n, s) {
1654
- const a = `${e.space}/api/community/listmembers`, r = {
1654
+ const a = `${e.space}/api/community/listmembers`, c = {
1655
1655
  params: {
1656
1656
  page: e.page ? e.page : 1,
1657
1657
  limit: e.limit ? e.limit : 50,
@@ -1666,14 +1666,14 @@ function ae(e, t, n, s) {
1666
1666
  Accept: "application/json",
1667
1667
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1668
1668
  },
1669
- data: JSON.stringify(r),
1669
+ data: JSON.stringify(c),
1670
1670
  type: "json",
1671
- onComplete(i, c, d) {
1671
+ onComplete(i, r, d) {
1672
1672
  n && n(i);
1673
1673
  },
1674
- onFailure(i, c) {
1674
+ onFailure(i, r) {
1675
1675
  const d = i;
1676
- d.status = c.status, d.response = c.errormsg, s && s(d);
1676
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1677
1677
  }
1678
1678
  });
1679
1679
  });
@@ -1682,31 +1682,31 @@ function tt(e, t = void 0, n = void 0) {
1682
1682
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1683
1683
  e.commu_id || (e.commu_id = s);
1684
1684
  const a = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1685
- w(e, (r) => {
1685
+ w(e, (c) => {
1686
1686
  m(a, {
1687
1687
  method: "GET",
1688
1688
  headers: {
1689
1689
  "Content-type": "application/json;charset=UTF-8",
1690
1690
  Accept: "application/json",
1691
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1691
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1692
1692
  },
1693
1693
  onComplete(o) {
1694
1694
  const i = JSON.parse(o);
1695
1695
  t && t(i);
1696
1696
  },
1697
1697
  onFailure(o, i) {
1698
- const c = o;
1699
- c.status = i.status, c.response = i.errormsg, n && n(c);
1698
+ const r = o;
1699
+ r.status = i.status, r.response = i.errormsg, n && n(r);
1700
1700
  }
1701
1701
  });
1702
1702
  });
1703
1703
  }
1704
1704
  function nt(e, t, n = void 0, s = void 0) {
1705
- const { listAllContacts: a, currentUser: r } = e;
1705
+ const { listAllContacts: a, currentUser: c } = e;
1706
1706
  console.log("__listAllContacts", a.hits);
1707
1707
  const o = `${e.space}/api/directmessages`, i = {
1708
- users: [r.login].concat(t.receipt)
1709
- }, c = {
1708
+ users: [c.login].concat(t.receipt)
1709
+ }, r = {
1710
1710
  id_msg: "",
1711
1711
  senderId: e.currentUser.login,
1712
1712
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1716,10 +1716,10 @@ function nt(e, t, n = void 0, s = void 0) {
1716
1716
  oe(
1717
1717
  i.users,
1718
1718
  (l) => {
1719
- l !== void 0 && (c.id_msg = l.id, d = !0, D(e, c));
1719
+ l !== void 0 && (r.id_msg = l.id, d = !0, D(e, r));
1720
1720
  },
1721
1721
  (l) => {
1722
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1722
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1723
1723
  }
1724
1724
  ), d === !1 && setTimeout(() => {
1725
1725
  d === !1 && w(e, (l) => {
@@ -1734,7 +1734,7 @@ function nt(e, t, n = void 0, s = void 0) {
1734
1734
  type: "json",
1735
1735
  onComplete(p, f, u) {
1736
1736
  const g = p;
1737
- g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, D(e, c);
1737
+ g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), r.id_msg = g.result.id, D(e, r);
1738
1738
  },
1739
1739
  onFailure(p, f, u) {
1740
1740
  const g = p;
@@ -1746,19 +1746,19 @@ function nt(e, t, n = void 0, s = void 0) {
1746
1746
  }
1747
1747
  function oe(e, t, n, s) {
1748
1748
  const a = `${e.space}/api/directmessages/lite?with_favorites=false`;
1749
- w(e, (r) => {
1749
+ w(e, (c) => {
1750
1750
  m(a, {
1751
1751
  method: "GET",
1752
1752
  headers: {
1753
1753
  Accept: "application/json,text/javascript,*/*",
1754
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1754
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1755
1755
  },
1756
1756
  onComplete(o) {
1757
- const i = JSON.parse(o), c = [];
1757
+ const i = JSON.parse(o), r = [];
1758
1758
  i.result.forEach((p) => {
1759
- p.users = p.users.sort((f, u) => f.login.localeCompare(u.login)), p.users.length === t.length && c.push(p);
1759
+ p.users = p.users.sort((f, u) => f.login.localeCompare(u.login)), p.users.length === t.length && r.push(p);
1760
1760
  });
1761
- const d = t.sort(), l = c.find((p) => {
1761
+ const d = t.sort(), l = r.find((p) => {
1762
1762
  const f = [];
1763
1763
  return p.users.forEach((u) => {
1764
1764
  f.push(u.login);
@@ -1779,7 +1779,7 @@ function D(e, t, n = void 0, s = void 0) {
1779
1779
  uri: "/api/community",
1780
1780
  id_msg: `${t.id_msg}`,
1781
1781
  endUri: "/instantmessages"
1782
- }, r = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, o = {
1782
+ }, c = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, o = {
1783
1783
  author: { login: t.senderId, displayName: t.senderName },
1784
1784
  accessState: null,
1785
1785
  commentUri: null,
@@ -1789,8 +1789,8 @@ function D(e, t, n = void 0, s = void 0) {
1789
1789
  parentCommentUri: null,
1790
1790
  richMessage: t.msg
1791
1791
  };
1792
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (i) => {
1793
- m(r, {
1792
+ console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (i) => {
1793
+ m(c, {
1794
1794
  method: "POST",
1795
1795
  headers: {
1796
1796
  "Content-Type": "application/json",
@@ -1799,12 +1799,12 @@ function D(e, t, n = void 0, s = void 0) {
1799
1799
  },
1800
1800
  data: JSON.stringify(o),
1801
1801
  type: "json",
1802
- onComplete(c, d, l) {
1803
- const p = c;
1802
+ onComplete(r, d, l) {
1803
+ const p = r;
1804
1804
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1805
1805
  },
1806
- onFailure(c, d) {
1807
- const l = c;
1806
+ onFailure(r, d) {
1807
+ const l = r;
1808
1808
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1809
1809
  }
1810
1810
  });
@@ -1828,15 +1828,15 @@ const ce = {
1828
1828
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1829
1829
  };
1830
1830
  function st(e, t, n = void 0, s = void 0) {
1831
- const a = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1832
- (c) => c.id === t.community_id
1831
+ const a = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1832
+ (r) => r.id === t.community_id
1833
1833
  ), o = e.swymCommunities.find(
1834
- (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1834
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1835
1835
  ), i = {
1836
1836
  params: {
1837
1837
  title: t.title,
1838
1838
  // String, le nom de l'affaire
1839
- community_id: r?.id !== void 0 ? r.id : o.id,
1839
+ community_id: c?.id !== void 0 ? c.id : o.id,
1840
1840
  // String, l'id de la communauté
1841
1841
  message: de(t.text_html),
1842
1842
  // STRING => le contenue du message doit être au format HTML
@@ -1844,11 +1844,11 @@ function st(e, t, n = void 0, s = void 0) {
1844
1844
  // 1 publier, 0 non publier
1845
1845
  }
1846
1846
  };
1847
- w(e, (c) => {
1847
+ w(e, (r) => {
1848
1848
  const d = {
1849
1849
  "Content-type": "application/json;charset=UTF-8",
1850
1850
  Accept: "application/json",
1851
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1851
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1852
1852
  };
1853
1853
  m(a, {
1854
1854
  method: "POST",
@@ -1867,7 +1867,7 @@ function st(e, t, n = void 0, s = void 0) {
1867
1867
  });
1868
1868
  }
1869
1869
  function it(e, t, n = void 0, s = void 0) {
1870
- const a = `${e.space}/api/idea/delete`, r = {
1870
+ const a = `${e.space}/api/idea/delete`, c = {
1871
1871
  params: {
1872
1872
  community_id: t.community_id,
1873
1873
  ideationIds: [t.idee_id]
@@ -1881,14 +1881,14 @@ function it(e, t, n = void 0, s = void 0) {
1881
1881
  Accept: "application/json",
1882
1882
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1883
1883
  },
1884
- data: JSON.stringify(r),
1884
+ data: JSON.stringify(c),
1885
1885
  type: "json",
1886
- onComplete(i, c, d) {
1886
+ onComplete(i, r, d) {
1887
1887
  n && n(i);
1888
1888
  },
1889
- onFailure(i, c, d) {
1889
+ onFailure(i, r, d) {
1890
1890
  const l = i;
1891
- l.status = c.status, l.response = c.errormsg, s && s(l);
1891
+ l.status = r.status, l.response = r.errormsg, s && s(l);
1892
1892
  }
1893
1893
  });
1894
1894
  });
@@ -1896,13 +1896,13 @@ function it(e, t, n = void 0, s = void 0) {
1896
1896
  function at(e, t = "", n = void 0, s = void 0) {
1897
1897
  const a = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1898
1898
  t === "" && (t = a);
1899
- const r = `${e.space}/api/idea/get`, o = {
1899
+ const c = `${e.space}/api/idea/get`, o = {
1900
1900
  params: {
1901
1901
  id: t
1902
1902
  }
1903
1903
  };
1904
1904
  w(e, (i) => {
1905
- m(r, {
1905
+ m(c, {
1906
1906
  method: "POST",
1907
1907
  headers: {
1908
1908
  "Content-type": "application/json;charset=UTF-8",
@@ -1911,12 +1911,12 @@ function at(e, t = "", n = void 0, s = void 0) {
1911
1911
  },
1912
1912
  data: JSON.stringify(o),
1913
1913
  type: "json",
1914
- onComplete(c) {
1915
- const d = c;
1914
+ onComplete(r) {
1915
+ const d = r;
1916
1916
  d.msg = d.result.message, n && n(d);
1917
1917
  },
1918
- onFailure(c) {
1919
- const d = c;
1918
+ onFailure(r) {
1919
+ const d = r;
1920
1920
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1921
1921
  }
1922
1922
  });
@@ -1927,20 +1927,20 @@ function ot(e, t = ce, n = void 0, s = void 0) {
1927
1927
  uri: "/api/idea/list",
1928
1928
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1929
1929
  limit: `/limit/${t.limit ? t.limit : 10}`
1930
- }, r = `${e.space}${a.uri}${a.comId}${a.limit}`;
1930
+ }, c = `${e.space}${a.uri}${a.comId}${a.limit}`;
1931
1931
  w(e, (o) => {
1932
- m(r, {
1932
+ m(c, {
1933
1933
  method: "GET",
1934
1934
  headers: {
1935
1935
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1936
1936
  },
1937
1937
  onComplete(i) {
1938
- const c = JSON.parse(i);
1939
- n && n(c);
1938
+ const r = JSON.parse(i);
1939
+ n && n(r);
1940
1940
  },
1941
- onFailure(i, c) {
1941
+ onFailure(i, r) {
1942
1942
  const d = i;
1943
- d.status = c.status, d.response = c.errormsg, s && s(d);
1943
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1944
1944
  }
1945
1945
  });
1946
1946
  });
@@ -2028,13 +2028,13 @@ function rt(e, t = void 0, n = void 0) {
2028
2028
  headers: {
2029
2029
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
2030
2030
  },
2031
- onComplete(r, o, i) {
2032
- const c = JSON.parse(r);
2033
- t && t(c.result);
2031
+ onComplete(c, o, i) {
2032
+ const r = JSON.parse(c);
2033
+ t && t(r.result);
2034
2034
  },
2035
- onFailure(r, o, i) {
2036
- const c = { erreur: JSON.parse(r), headers: o, xhr: i };
2037
- n && n(c);
2035
+ onFailure(c, o, i) {
2036
+ const r = { erreur: JSON.parse(c), headers: o, xhr: i };
2037
+ n && n(r);
2038
2038
  }
2039
2039
  });
2040
2040
  });
@@ -2043,11 +2043,11 @@ function ct(e, t, n = void 0, s = void 0) {
2043
2043
  const a = e.space + "/api/user/find/login/" + t;
2044
2044
  w(
2045
2045
  e,
2046
- (r) => {
2046
+ (c) => {
2047
2047
  m(a, {
2048
2048
  method: "GET",
2049
- headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2050
- onComplete(o, i, c) {
2049
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
2050
+ onComplete(o, i, r) {
2051
2051
  const d = JSON.parse(o);
2052
2052
  n && n(d);
2053
2053
  },
@@ -2062,19 +2062,19 @@ function ct(e, t, n = void 0, s = void 0) {
2062
2062
  function dt(e, t = void 0, n = void 0) {
2063
2063
  e.tenant && $(e, (s) => {
2064
2064
  console.log("serviceUrls", s);
2065
- const a = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2065
+ const a = s.services.find((c) => c.id === "businessprocess")?.url + "/api/v2";
2066
2066
  return t && t(a), a;
2067
2067
  });
2068
2068
  }
2069
2069
  function lt(e, t = void 0, n = void 0) {
2070
2070
  e.tenant && $(e, (s) => {
2071
2071
  console.log("serviceUrls", s);
2072
- const a = s.services.find((i) => i.id === "3dpassport")?.url, r = s.services.find((i) => i.id === "businessprocess")?.url + "/api/v2", o = `${a}/login/?service=${r}/auth/cas`;
2072
+ const a = s.services.find((i) => i.id === "3dpassport")?.url, c = s.services.find((i) => i.id === "businessprocess")?.url + "/api/v2", o = `${a}/login/?service=${c}/auth/cas`;
2073
2073
  m(o, {
2074
2074
  async onComplete(i) {
2075
2075
  console.log("response", i);
2076
- const c = typeof i == "string" ? JSON.parse(i)?.x3ds_service_redirect_url : i?.x3ds_service_redirect_url;
2077
- await fetch(c, {
2076
+ const r = typeof i == "string" ? JSON.parse(i)?.x3ds_service_redirect_url : i?.x3ds_service_redirect_url;
2077
+ await fetch(r, {
2078
2078
  method: "POST"
2079
2079
  }).then((d) => d.json()).then(async (d) => {
2080
2080
  t && t(d?.token);
@@ -2088,40 +2088,41 @@ function lt(e, t = void 0, n = void 0) {
2088
2088
  }
2089
2089
  async function pt(e, t, n = void 0, s = void 0) {
2090
2090
  e.tenant && $(e, (a) => {
2091
- const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
2092
- fetch(`https://api.uixhome.fr/${e.tenant}/iterop/listusers?t=${t}&s=${o}`, {
2091
+ const o = `${a.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/identity/users`, i = e.tenant.toLowerCase();
2092
+ fetch(`https://api.uixhome.fr/${i}/iterop/listusers?t=${t}&s=${o}`, {
2093
2093
  method: "POST"
2094
- }).then((i) => i.json()).then((i) => {
2095
- n && n(i);
2096
- }).catch((i) => {
2097
- s && s(i);
2094
+ }).then((r) => r.json()).then((r) => {
2095
+ n && n(r);
2096
+ }).catch((r) => {
2097
+ s && s(r);
2098
2098
  });
2099
2099
  });
2100
2100
  }
2101
2101
  async function ut(e, t, n = void 0, s = void 0) {
2102
2102
  e.tenant && $(e, (a) => {
2103
- const o = `${a.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, i = e.tenant.toLowerCase();
2103
+ const o = `${a.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, i = e.tenant.toLowerCase();
2104
2104
  fetch(`https://api.uixhome.fr/${i}/iterop/repository/data/tables?t=${t}&s=${o}`, {
2105
2105
  method: "GET"
2106
- }).then((c) => c.json()).then((c) => {
2107
- n && n(c);
2108
- }).catch((c) => {
2109
- s && s(c);
2106
+ }).then((r) => r.json()).then((r) => {
2107
+ n && n(r);
2108
+ }).catch((r) => {
2109
+ s && s(r);
2110
2110
  });
2111
2111
  });
2112
2112
  }
2113
- async function ft(e, t, n, s, a = void 0, r = void 0) {
2113
+ async function ft(e, t, n, s, a = void 0, c = void 0) {
2114
2114
  e.tenant && $(e, (o) => {
2115
- const i = o.services.find((d) => d.id === "businessprocess")?.url + "/api/v2", c = encodeURIComponent(`${i}`);
2115
+ o.services.find((r) => r.id === "businessprocess")?.url + "";
2116
+ const i = e.tenant.toLowerCase();
2116
2117
  fetch(
2117
- `https://api.uixhome.fr/${e.tenant}/iterop/runtime/processes/${n}?t=${t}&s=${c}&b=${s}`,
2118
+ `https://api.uixhome.fr/${i}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2118
2119
  {
2119
2120
  method: "POST"
2120
2121
  }
2121
- ).then((d) => d.json()).then((d) => {
2122
- a && a(d);
2123
- }).catch((d) => {
2124
- r && r(d);
2122
+ ).then((r) => r.json()).then((r) => {
2123
+ a && a(r);
2124
+ }).catch((r) => {
2125
+ c && c(r);
2125
2126
  });
2126
2127
  });
2127
2128
  }
@@ -2146,14 +2147,14 @@ function gt(e, t = void 0, n = void 0) {
2146
2147
  },
2147
2148
  !0
2148
2149
  );
2149
- const a = v.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2150
- m(r, {
2150
+ const a = v.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2151
+ m(c, {
2151
2152
  onComplete(o) {
2152
2153
  if (Array.isArray(JSON.parse(o))) {
2153
2154
  const i = JSON.parse(o);
2154
2155
  console.log("serviceId=3dsearch", i);
2155
- const c = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2156
- m(c, {
2156
+ const r = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2157
+ m(r, {
2157
2158
  method: "POST",
2158
2159
  headers: {
2159
2160
  Accept: "application/json",