@beam3_dev/api_module 0.0.61 → 0.0.63

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,7 +67,7 @@ async function re(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let n = N.now().year;
70
- const s = e, o = [], r = (a) => {
70
+ const s = e, o = [], i = (a) => {
71
71
  for (let c in a)
72
72
  o.push({ date: c, comment: a[c] });
73
73
  };
@@ -81,7 +81,7 @@ async function ce(e, t = L) {
81
81
  }
82
82
  }
83
83
  ).then((c) => c.json()).then((c) => {
84
- r(c);
84
+ i(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
102
102
  }
103
103
  async function de(e, t, n = !0) {
104
104
  const s = e.events.findIndex((o) => o.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((o, r) => o.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((o, i) => o.start - i.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, n = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), i = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: n,
153
153
  user: s,
154
154
  appsConfiguration: o,
155
- appConf: r
155
+ appConf: i
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,42 +169,42 @@ function ge(e, t, n) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(r, i, a) {
173
- const c = JSON.parse(r), d = c.data.map((l) => {
172
+ onComplete(i, r, a) {
173
+ const c = JSON.parse(i), d = c.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
177
  t && t(d, c);
178
178
  },
179
- onFailure(r, i) {
180
- const a = r;
181
- a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
179
+ onFailure(i, r) {
180
+ const a = i;
181
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
185
185
  function he(e, t = void 0, n = void 0) {
186
186
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  f(s, {
188
- onComplete(o, r, i) {
188
+ onComplete(o, i, r) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(o, r) {
193
- const i = o;
194
- i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
192
+ onFailure(o, i) {
193
+ const r = o;
194
+ r.msg = i.errormsg, r.errCode = i.errorcode, n && n(r);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, n = void 0, s = void 0) {
199
199
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  f(o, {
201
- onComplete(r, i, a) {
202
- const c = JSON.parse(r);
201
+ onComplete(i, r, a) {
202
+ const c = JSON.parse(i);
203
203
  n && n(c);
204
204
  },
205
- onFailure(r, i) {
206
- const a = r;
207
- a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
205
+ onFailure(i, r) {
206
+ const a = i;
207
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -213,14 +213,14 @@ const F = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, n = void 0, s = void 0) {
216
- const { space: o, currentUser: r } = e, a = `${o}${{
216
+ const { space: o, currentUser: i } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
218
  }.URIUGr}`, c = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [i.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -242,7 +242,7 @@ function _e(e, t, n = void 0, s = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, n = void 0, s = void 0) {
245
- const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
245
+ const { space: o, tenant: i } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${i}`, d = `${r}${a}${c}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,10 +261,10 @@ function ye(e, t, n = void 0, s = void 0) {
261
261
  });
262
262
  }
263
263
  function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
264
+ const { space: s, tenant: o } = e, i = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${r}${i}${a}`;
267
+ }, d = `${i}${r}${a}`;
268
268
  f(d, {
269
269
  OPTsH: c,
270
270
  onComplete(l) {
@@ -314,15 +314,15 @@ function Te(e, t) {
314
314
  });
315
315
  }
316
316
  function Ce(e, t, n, s = void 0, o = void 0) {
317
- const { space: r, tenant: i } = e, a = {
317
+ const { space: i, tenant: r } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${i}`
325
- }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
324
+ OPTsTenant: `tenant=dstenant:${r}`
325
+ }, c = n, d = `${i}${a.URIUGr}/${t}`, l = JSON.stringify(c);
326
326
  f(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
@@ -337,7 +337,7 @@ function Ce(e, t, n, s = void 0, o = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, n, s = void 0, o = void 0) {
340
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
340
+ const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
343
  headers: F,
@@ -352,8 +352,8 @@ function Oe(e, t, n, s = void 0, o = void 0) {
352
352
  });
353
353
  }
354
354
  function be(e, t, n = void 0, s = void 0) {
355
- const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- f(i, {
355
+ const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ f(r, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -374,10 +374,18 @@ const J = async (e, t, n) => {
374
374
  return;
375
375
  const s = `${e.space}/resources/v1/application/CSRF`;
376
376
  try {
377
- const o = await f(s), r = JSON.parse(o);
378
- console.log("getCSRFToken() / response => ", r), t?.(r.csrf);
379
- } catch ({ error: o, headers: r, xhr: i }) {
380
- n?.({ error: o, headers: r, xhr: i });
377
+ return response = await f(
378
+ s,
379
+ (o) => {
380
+ const i = JSON.parse(o);
381
+ return console.log("getCSRFToken() / response => ", i), t?.(i.csrf), i;
382
+ },
383
+ (o) => {
384
+ n?.({ error, headers, xhr });
385
+ }
386
+ );
387
+ } catch (o) {
388
+ n?.("erreur", o);
381
389
  }
382
390
  };
383
391
  async function G(e, t = void 0, n = void 0, s = void 0) {
@@ -386,14 +394,14 @@ async function G(e, t = void 0, n = void 0, s = void 0) {
386
394
  console.log("Le paramètre docid est obligatoire");
387
395
  return;
388
396
  }
389
- const r = o + `/resources/v1/modeler/documents/${t}`;
390
- f(r, {
391
- onComplete(i, a, c) {
392
- const d = JSON.parse(i);
397
+ const i = o + `/resources/v1/modeler/documents/${t}`;
398
+ f(i, {
399
+ onComplete(r, a, c) {
400
+ const d = JSON.parse(r);
393
401
  n && n(d);
394
402
  },
395
- onFailure(i) {
396
- s && s(i);
403
+ onFailure(r) {
404
+ s && s(r);
397
405
  }
398
406
  });
399
407
  }
@@ -401,7 +409,7 @@ function k(e, t = void 0, n = void 0) {
401
409
  if (e.objID && e.objID !== "") {
402
410
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
403
411
  console.log("_3DSpace_get_csrf / url", s), f(s, {
404
- onComplete(o, r, i) {
412
+ onComplete(o, i, r) {
405
413
  const a = JSON.parse(o);
406
414
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
407
415
  },
@@ -424,12 +432,12 @@ function C(e, t = void 0, n = void 0) {
424
432
  if (e.space) {
425
433
  const s = e.space + "/resources/v1/application/CSRF";
426
434
  f(s, {
427
- onComplete(o, r, i) {
435
+ onComplete(o, i, r) {
428
436
  const a = JSON.parse(o);
429
437
  console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
430
438
  },
431
- onFailure(o, r, i) {
432
- n && n({ response: o, headers: r, xhr: i });
439
+ onFailure(o, i, r) {
440
+ n && n({ response: o, headers: i, xhr: r });
433
441
  }
434
442
  });
435
443
  } else
@@ -449,12 +457,12 @@ function U(e, t = void 0, n = void 0) {
449
457
  headers: {
450
458
  ENO_CSRF_TOKEN: e.token
451
459
  },
452
- onComplete(r) {
453
- const a = JSON.parse(r).data[0].dataelements.ticketURL;
460
+ onComplete(i) {
461
+ const a = JSON.parse(i).data[0].dataelements.ticketURL;
454
462
  console.log("le ticket est dans la callback"), t && t(a);
455
463
  },
456
- onFailure(r, i) {
457
- console.warn("☠️ error => ", r, i), n && n(r, i);
464
+ onFailure(i, r) {
465
+ console.warn("☠️ error => ", i, r), n && n(i, r);
458
466
  }
459
467
  });
460
468
  },
@@ -464,14 +472,14 @@ function U(e, t = void 0, n = void 0) {
464
472
  );
465
473
  }
466
474
  function Ne(e, t, n, s = void 0, o = void 0) {
467
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
468
- n || (n = e.token), f(r, {
475
+ const i = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
476
+ n || (n = e.token), f(i, {
469
477
  method: "PUT",
470
478
  headers: {
471
479
  ENO_CSRF_TOKEN: n
472
480
  },
473
- onComplete(i) {
474
- let a = JSON.parse(i);
481
+ onComplete(r) {
482
+ let a = JSON.parse(r);
475
483
  if (console.log("☠️ info => ", a), a.success === !0)
476
484
  try {
477
485
  const c = a.data[0].dataelements.ticketURL;
@@ -480,12 +488,12 @@ function Ne(e, t, n, s = void 0, o = void 0) {
480
488
  o && o(c);
481
489
  }
482
490
  },
483
- onFailure(i) {
484
- o && o(i);
491
+ onFailure(r) {
492
+ o && o(r);
485
493
  }
486
494
  });
487
495
  }
488
- function K(e, t, n, s, o, r = void 0, i = void 0) {
496
+ function K(e, t, n, s, o, i = void 0, r = void 0) {
489
497
  k(
490
498
  e,
491
499
  t,
@@ -497,18 +505,18 @@ function K(e, t, n, s, o, r = void 0, i = void 0) {
497
505
  s,
498
506
  o,
499
507
  a.csrf.value,
500
- r,
501
- i
508
+ i,
509
+ r
502
510
  );
503
511
  }
504
512
  );
505
513
  }
506
- function W(e, t, n, s, o, r, i = void 0, a = void 0) {
514
+ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
507
515
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
508
516
  f(c, {
509
517
  method: "PUT",
510
518
  headers: {
511
- ENO_CSRF_TOKEN: r
519
+ ENO_CSRF_TOKEN: i
512
520
  },
513
521
  onComplete(d, l, p) {
514
522
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
@@ -518,7 +526,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
518
526
  let S = "temp_" + Date.now(), _ = {
519
527
  method: "PUT",
520
528
  headers: {
521
- ENO_CSRF_TOKEN: r
529
+ ENO_CSRF_TOKEN: i
522
530
  },
523
531
  data: JSON.stringify({
524
532
  data: [
@@ -542,7 +550,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
542
550
  }),
543
551
  type: "json",
544
552
  onComplete(y) {
545
- i && i(y);
553
+ r && r(y);
546
554
  },
547
555
  onFailure(y) {
548
556
  a && a(y);
@@ -558,14 +566,14 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
558
566
  }
559
567
  });
560
568
  }
561
- async function ke(e, t, n, s, o = void 0, r = void 0) {
562
- const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
569
+ async function ke(e, t, n, s, o = void 0, i = void 0) {
570
+ const r = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
563
571
  type: "text/plain"
564
572
  }), p = {
565
- url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
566
- url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
573
+ url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
574
+ url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
567
575
  };
568
- if (!i && i !== "") {
576
+ if (!r && r !== "") {
569
577
  console.log("le store._3DSpace est vide");
570
578
  return;
571
579
  }
@@ -628,15 +636,15 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
628
636
  }
629
637
  function y(T, D) {
630
638
  console.log("Erreur -- response ", T, `
631
- headers `, D), r && r(T);
639
+ headers `, D), i && i(T);
632
640
  }
633
641
  f(h.ticketURL, S);
634
642
  }
635
643
  });
636
644
  }
637
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
638
- const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
639
- f(i, {
645
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
646
+ const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
647
+ f(r, {
640
648
  method: "GET",
641
649
  onComplete(a) {
642
650
  const c = JSON.parse(a);
@@ -658,7 +666,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
658
666
  let _ = g.filter(
659
667
  (y) => y.role.name === h
660
668
  );
661
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
669
+ _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : i(_);
662
670
  }
663
671
  });
664
672
  }) : g.forEach((h) => {
@@ -668,12 +676,12 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
668
676
  let S = g.filter(
669
677
  (_) => _.role.name === n
670
678
  );
671
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
679
+ S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : i(S);
672
680
  }
673
681
  }));
674
682
  }
675
683
  }
676
- l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : r && (d = u + "." + p + "." + l, r(d));
684
+ l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : i && (d = u + "." + p + "." + l, i(d));
677
685
  },
678
686
  onFailure(a) {
679
687
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -682,38 +690,38 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
682
690
  }
683
691
  async function I(e, t = void 0, n = void 0, s = void 0) {
684
692
  const o = e.objID;
685
- (!o || o === "") && console.warn(
693
+ delete e.token, (!o || o === "") && console.warn(
686
694
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
687
695
  ), (e.space === "" || !e.space) && console.warn(
688
696
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
689
- ), delete e.token, (e.token === "" || !e.token) && (J(
697
+ ), (e.token === "" || !e.token) && (console.log("je récupère un nouveau token"), J(
690
698
  e,
691
- (r) => {
692
- e.token = r;
699
+ (i) => {
700
+ e.token = i;
693
701
  },
694
- (r) => {
695
- console.log("☠️ error => ", r);
702
+ (i) => {
703
+ console.log("☠️ error => ", i);
696
704
  }
697
705
  ), console.warn(
698
706
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
699
707
  )), console.log("_3DSpace_download_doc / credentials", e), U(
700
708
  e,
701
- (r) => {
702
- f(r, {
709
+ (i) => {
710
+ f(i, {
703
711
  headers: {
704
712
  ENO_CSRF_TOKEN: e.token
705
713
  },
706
- onComplete(i) {
707
- const a = JSON.parse(i);
714
+ onComplete(r) {
715
+ const a = JSON.parse(r);
708
716
  console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
709
717
  },
710
- onFailure(i, a, c) {
711
- n && (console.log("error http", i), n({ error: i, headers: a, xhr: c }));
718
+ onFailure(r, a, c) {
719
+ n && (console.log("error http", r), n({ error: r, headers: a, xhr: c }));
712
720
  }
713
721
  });
714
722
  },
715
- (r) => {
716
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
723
+ (i) => {
724
+ n && n(i), console.log("*_3dspace_download_doc / error file URL *", i);
717
725
  }
718
726
  );
719
727
  }
@@ -723,38 +731,38 @@ async function X(e, t, n = void 0, s = void 0) {
723
731
  const c = t.slice(a, a + 80);
724
732
  o.push(c);
725
733
  }
726
- const i = (a) => {
734
+ const r = (a) => {
727
735
  V(
728
736
  e,
729
737
  o[a],
730
738
  () => {
731
- a++, a < o.length && i(a);
739
+ a++, a < o.length && r(a);
732
740
  },
733
741
  (c) => {
734
742
  n && n(c);
735
743
  }
736
744
  );
737
745
  };
738
- i(0);
746
+ r(0);
739
747
  }
740
748
  function V(e, t, n = void 0, s = void 0, o = void 0) {
741
- const r = [];
749
+ const i = [];
742
750
  t.forEach((c) => {
743
- r.push({
751
+ i.push({
744
752
  id: c
745
753
  });
746
754
  });
747
- let i = JSON.stringify({
755
+ let r = JSON.stringify({
748
756
  csrf: {
749
757
  name: "ENO_CSRF_TOKEN",
750
758
  value: e.token
751
759
  },
752
- data: r
760
+ data: i
753
761
  });
754
762
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
755
763
  f(a, {
756
764
  method: "PUT",
757
- data: i,
765
+ data: r,
758
766
  type: "json",
759
767
  onComplete(c) {
760
768
  const d = c.data;
@@ -786,7 +794,7 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
786
794
  function De(e, t, n = void 0, s = void 0) {
787
795
  return new Promise((o) => {
788
796
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
789
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
797
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
790
798
  b(
791
799
  e.space,
792
800
  "ESPACE COMMUN",
@@ -797,7 +805,7 @@ function De(e, t, n = void 0, s = void 0) {
797
805
  console.log("onError =>", a);
798
806
  }
799
807
  );
800
- let i = {
808
+ let r = {
801
809
  method: "POST",
802
810
  headers: {
803
811
  SecurityContext: "ctx::" + e.ctx,
@@ -820,14 +828,14 @@ function De(e, t, n = void 0, s = void 0) {
820
828
  s && s(a);
821
829
  }
822
830
  };
823
- f(r, i);
831
+ f(i, r);
824
832
  }
825
833
  });
826
834
  }
827
835
  function Fe(e, t, n, s = void 0, o = void 0) {
828
- return new Promise((r) => {
836
+ return new Promise((i) => {
829
837
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
830
- const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
838
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
831
839
  b(
832
840
  e.space,
833
841
  "ESPACE COMMUN",
@@ -862,14 +870,14 @@ function Fe(e, t, n, s = void 0, o = void 0) {
862
870
  o && o(c);
863
871
  }
864
872
  };
865
- f(i, a);
873
+ f(r, a);
866
874
  }
867
875
  });
868
876
  }
869
877
  function Ue(e, t, n = void 0, s = void 0) {
870
878
  return new Promise((o) => {
871
879
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
872
- const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
880
+ const i = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
873
881
  b(
874
882
  e.space,
875
883
  "ESPACE COMMUN",
@@ -880,7 +888,7 @@ function Ue(e, t, n = void 0, s = void 0) {
880
888
  console.log("onError =>", a);
881
889
  }
882
890
  );
883
- let i = {
891
+ let r = {
884
892
  method: "POST",
885
893
  headers: {
886
894
  securitycontext: "ctx::" + e.ctx,
@@ -903,14 +911,14 @@ function Ue(e, t, n = void 0, s = void 0) {
903
911
  s && s(a);
904
912
  }
905
913
  };
906
- f(r, i);
914
+ f(i, r);
907
915
  }
908
916
  });
909
917
  }
910
918
  function $e(e, t, n = void 0, s = void 0) {
911
919
  return new Promise((o) => {
912
920
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
913
- const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
921
+ const i = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
914
922
  b(
915
923
  e.space,
916
924
  "ESPACE COMMUN",
@@ -921,7 +929,7 @@ function $e(e, t, n = void 0, s = void 0) {
921
929
  console.log("onError =>", a);
922
930
  }
923
931
  );
924
- let i = {
932
+ let r = {
925
933
  method: "POST",
926
934
  headers: {
927
935
  SecurityContext: "ctx::" + e.ctx,
@@ -950,14 +958,14 @@ function $e(e, t, n = void 0, s = void 0) {
950
958
  s && s(a);
951
959
  }
952
960
  };
953
- f(r, i);
961
+ f(i, r);
954
962
  }
955
963
  });
956
964
  }
957
965
  function je(e, t, n, s = void 0, o = void 0) {
958
- return new Promise((r) => {
966
+ return new Promise((i) => {
959
967
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
960
- const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
+ const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
961
969
  b(
962
970
  e.space,
963
971
  "ESPACE COMMUN",
@@ -997,7 +1005,7 @@ function je(e, t, n, s = void 0, o = void 0) {
997
1005
  o && o(c);
998
1006
  }
999
1007
  };
1000
- f(i, a);
1008
+ f(r, a);
1001
1009
  }
1002
1010
  });
1003
1011
  }
@@ -1014,12 +1022,12 @@ function Re(e, t = void 0, n = void 0) {
1014
1022
  Accept: "application/json,text/javascript,*/*",
1015
1023
  "Content-Type": "application/ds-json"
1016
1024
  },
1017
- onComplete(r, i) {
1018
- const a = JSON.parse(r);
1019
- t && t(a, i);
1025
+ onComplete(i, r) {
1026
+ const a = JSON.parse(i);
1027
+ t && t(a, r);
1020
1028
  },
1021
- onFailure(r, i, a) {
1022
- n && n({ response: r, headers: i, xhr: a });
1029
+ onFailure(i, r, a) {
1030
+ n && n({ response: i, headers: r, xhr: a });
1023
1031
  }
1024
1032
  });
1025
1033
  }
@@ -1030,11 +1038,11 @@ function Ae(e, t, n, s) {
1030
1038
  (o) => {
1031
1039
  f(o, {
1032
1040
  header: { ENO_CSRF_TOKEN: e.token },
1033
- onComplete: (r) => {
1034
- n && n(r);
1041
+ onComplete: (i) => {
1042
+ n && n(i);
1035
1043
  },
1036
- onFailure: (r) => {
1037
- console.log("error http", r), s && s(r);
1044
+ onFailure: (i) => {
1045
+ console.log("error http", i), s && s(i);
1038
1046
  }
1039
1047
  });
1040
1048
  }
@@ -1042,28 +1050,28 @@ function Ae(e, t, n, s) {
1042
1050
  }
1043
1051
  async function Ie(e, t, n = void 0, s = void 0) {
1044
1052
  return new Promise((o) => {
1045
- U(e, t, (r) => {
1046
- f(r, {
1047
- onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
1048
- onFailure: (i, a, c) => {
1049
- s && s(i, a, c), console.log(i, a?.errormsg);
1053
+ U(e, t, (i) => {
1054
+ f(i, {
1055
+ onComplete: (r, a, c) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, c), o),
1056
+ onFailure: (r, a, c) => {
1057
+ s && s(r, a, c), console.log(r, a?.errormsg);
1050
1058
  }
1051
1059
  });
1052
1060
  });
1053
1061
  });
1054
1062
  }
1055
1063
  function ve(e, t, n, s = void 0, o = void 0) {
1056
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1064
+ const i = new Blob([JSON.stringify(t)], { type: "text/plain" });
1057
1065
  k(
1058
1066
  e,
1059
1067
  n,
1060
- (i) => {
1061
- const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1068
+ (r) => {
1069
+ const a = r.data[0].relateddata.files[0].id, c = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1062
1070
  K(
1063
1071
  e,
1064
1072
  n,
1065
1073
  a,
1066
- r,
1074
+ i,
1067
1075
  c,
1068
1076
  (d) => {
1069
1077
  s && s(d);
@@ -1110,15 +1118,15 @@ async function Pe(e, t = void 0, n = void 0) {
1110
1118
  }
1111
1119
  function Me(e, t = void 0, n = void 0) {
1112
1120
  const s = [];
1113
- e.objIds.forEach((o, r) => {
1121
+ e.objIds.forEach((o, i) => {
1114
1122
  I(
1115
1123
  e,
1116
1124
  o.objId,
1117
- (i) => {
1118
- s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && t && t(s);
1125
+ (r) => {
1126
+ s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, x)), i === e.objIds.length - 1 && t && t(s);
1119
1127
  },
1120
- (i) => {
1121
- n && n(i);
1128
+ (r) => {
1129
+ n && n(r);
1122
1130
  }
1123
1131
  );
1124
1132
  });
@@ -1128,8 +1136,8 @@ function B(e, t, n = void 0, s = void 0) {
1128
1136
  e,
1129
1137
  v,
1130
1138
  (o) => {
1131
- const r = [...t];
1132
- r.find((i) => i.objectID === o.objectId).data = o.data, x = r, $.push(o.data), n && n($);
1139
+ const i = [...t];
1140
+ i.find((r) => r.objectID === o.objectId).data = o.data, x = i, $.push(o.data), n && n($);
1133
1141
  },
1134
1142
  (o) => {
1135
1143
  s && (s(o), console.log(o));
@@ -1157,16 +1165,16 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1157
1165
  tag: "testTag"
1158
1166
  };
1159
1167
  function Le(e, t, n = void 0, s = void 0) {
1160
- const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
1168
+ const { space: o, tenant: i } = e, { objId: r, pred: a, tag: c } = t, d = {
1161
1169
  uri: "/resources/6w/tags",
1162
1170
  otpCTX: "SecurityContext=preferred",
1163
- optTenant: `tenant=${r}`
1171
+ optTenant: `tenant=${i}`
1164
1172
  }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1165
1173
  tag: [
1166
1174
  {
1167
1175
  subject: [
1168
1176
  {
1169
- uri: `pid://${i}`
1177
+ uri: `pid://${r}`
1170
1178
  }
1171
1179
  ],
1172
1180
  predicate: P[a],
@@ -1189,7 +1197,7 @@ function Le(e, t, n = void 0, s = void 0) {
1189
1197
  setTimeout(() => {
1190
1198
  G(
1191
1199
  e,
1192
- i,
1200
+ r,
1193
1201
  (g) => {
1194
1202
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1195
1203
  m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
@@ -1218,10 +1226,10 @@ function Le(e, t, n = void 0, s = void 0) {
1218
1226
  }
1219
1227
  function q(e, t, n = void 0, s = void 0) {
1220
1228
  console.log("obj ", t);
1221
- const o = t.info.name, r = {
1229
+ const o = t.info.name, i = {
1222
1230
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1223
1231
  uri: "/federated/search"
1224
- }, i = `${r.baseUrl}${r.uri}`, a = {
1232
+ }, r = `${i.baseUrl}${i.uri}`, a = {
1225
1233
  "Content-Type": "application/json",
1226
1234
  Accept: "application/json,text/javascript,*/*"
1227
1235
  }, c = A(), d = {
@@ -1285,7 +1293,7 @@ function q(e, t, n = void 0, s = void 0) {
1285
1293
  }
1286
1294
  }
1287
1295
  };
1288
- console.log("dataPattern => ", d), f(i, {
1296
+ console.log("dataPattern => ", d), f(r, {
1289
1297
  method: "POST",
1290
1298
  headers: a,
1291
1299
  data: JSON.stringify(d),
@@ -1300,7 +1308,7 @@ function q(e, t, n = void 0, s = void 0) {
1300
1308
  });
1301
1309
  }
1302
1310
  function Ee(e, t, n = void 0, s = void 0) {
1303
- const { objId: o, pred: r, tag: i } = t, a = {
1311
+ const { objId: o, pred: i, tag: r } = t, a = {
1304
1312
  uri: "/resources/6w/tags",
1305
1313
  otpCTX: "SecurityContext=preferred",
1306
1314
  optTenant: `tenant=${e.tenant}`
@@ -1312,9 +1320,9 @@ function Ee(e, t, n = void 0, s = void 0) {
1312
1320
  uri: `pid://${o}`
1313
1321
  }
1314
1322
  ],
1315
- predicate: P[r],
1323
+ predicate: P[i],
1316
1324
  object: {
1317
- literal: i
1325
+ literal: r
1318
1326
  }
1319
1327
  }
1320
1328
  ]
@@ -1339,15 +1347,15 @@ function Je(e, t = "", n = void 0, s = void 0) {
1339
1347
  const { space: o } = e;
1340
1348
  if (t === "")
1341
1349
  return;
1342
- const r = {
1350
+ const i = {
1343
1351
  uri: "/resources/v1/modeler/documents"
1344
- }, i = {
1352
+ }, r = {
1345
1353
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1346
1354
  Accept: "application/json,text/javascript,*/*"
1347
- }, a = `${o}${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}`;
1355
+ }, a = `${o}${i.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}`;
1348
1356
  f(a, {
1349
1357
  method: "POST",
1350
- headers: i,
1358
+ headers: r,
1351
1359
  data: c,
1352
1360
  onComplete(d) {
1353
1361
  n && n(JSON.parse(d));
@@ -1361,7 +1369,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
1361
1369
  async function w(e, t = void 0, n = void 0) {
1362
1370
  const s = e.space + "/api/index/tk";
1363
1371
  return f(s, {
1364
- onComplete(o, r, i) {
1372
+ onComplete(o, i, r) {
1365
1373
  const a = JSON.parse(o);
1366
1374
  if (t)
1367
1375
  return t(a), e.token = a?.result?.ServerToken;
@@ -1382,21 +1390,21 @@ function Ge(e, t = void 0, n = void 0) {
1382
1390
  start: 0
1383
1391
  }
1384
1392
  };
1385
- w(e, (r) => {
1393
+ w(e, (i) => {
1386
1394
  f(s, {
1387
1395
  method: "POST",
1388
1396
  headers: {
1389
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1397
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1390
1398
  "Content-type": "application/json;charset=UTF-8",
1391
1399
  Accept: "application/json"
1392
1400
  },
1393
1401
  data: JSON.stringify(o),
1394
1402
  type: "json",
1395
- onComplete(i, a) {
1396
- t && t(i, a);
1403
+ onComplete(r, a) {
1404
+ t && t(r, a);
1397
1405
  },
1398
- onFailure(i, a) {
1399
- n && n(i, a);
1406
+ onFailure(r, a) {
1407
+ n && n(r, a);
1400
1408
  }
1401
1409
  });
1402
1410
  });
@@ -1411,22 +1419,22 @@ function Ke(e, t = void 0, n = void 0) {
1411
1419
  maxNbOfCommonElements: "5"
1412
1420
  }
1413
1421
  };
1414
- w(e, (r) => {
1422
+ w(e, (i) => {
1415
1423
  f(s, {
1416
1424
  method: "POST",
1417
1425
  headers: {
1418
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1426
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1419
1427
  "Content-type": "application/json;charset=UTF-8",
1420
1428
  Accept: "application/json"
1421
1429
  },
1422
1430
  data: JSON.stringify(o),
1423
1431
  type: "json",
1424
- onComplete(i, a) {
1425
- const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1426
- t && t(c, i);
1432
+ onComplete(r, a) {
1433
+ const c = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1434
+ t && t(c, r);
1427
1435
  },
1428
- onFailure(i, a) {
1429
- n && n(i, a);
1436
+ onFailure(r, a) {
1437
+ n && n(r, a);
1430
1438
  }
1431
1439
  });
1432
1440
  });
@@ -1437,12 +1445,12 @@ function We(e, t = void 0, n = void 0) {
1437
1445
  uri: "/api/community/listmycommunities",
1438
1446
  limit: `/limit/${e.limit ? e.limit : 128}`,
1439
1447
  page: `/page/${e.page ? e.page : "1"}`
1440
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1441
- w(e, (i) => {
1448
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, i = [];
1449
+ w(e, (r) => {
1442
1450
  f(o, {
1443
1451
  method: "GET",
1444
1452
  headers: {
1445
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1453
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1446
1454
  },
1447
1455
  onComplete(a, c, d) {
1448
1456
  const p = JSON.parse(a).result;
@@ -1460,7 +1468,7 @@ function We(e, t = void 0, n = void 0) {
1460
1468
  e,
1461
1469
  m.id,
1462
1470
  (h) => {
1463
- u++, g.members = h, r.push(g), u === p.length && t && t(r);
1471
+ u++, g.members = h, i.push(g), u === p.length && t && t(i);
1464
1472
  },
1465
1473
  (h) => n(h)
1466
1474
  );
@@ -1474,22 +1482,22 @@ function We(e, t = void 0, n = void 0) {
1474
1482
  });
1475
1483
  }
1476
1484
  function Q(e, t, n, s) {
1477
- const o = `${e.space}/api/community/listmembers`, r = {
1485
+ const o = `${e.space}/api/community/listmembers`, i = {
1478
1486
  params: {
1479
1487
  page: e.page ? e.page : 1,
1480
1488
  limit: e.limit ? e.limit : 50,
1481
1489
  community_id: t
1482
1490
  }
1483
1491
  };
1484
- w(e, (i) => {
1492
+ w(e, (r) => {
1485
1493
  f(o, {
1486
1494
  method: "POST",
1487
1495
  headers: {
1488
1496
  "Content-type": "application/json;charset=UTF-8",
1489
1497
  Accept: "application/json",
1490
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1498
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1491
1499
  },
1492
- data: JSON.stringify(r),
1500
+ data: JSON.stringify(i),
1493
1501
  type: "json",
1494
1502
  onComplete(a, c, d) {
1495
1503
  n && n(a);
@@ -1505,30 +1513,30 @@ function Xe(e, t = void 0, n = void 0) {
1505
1513
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1506
1514
  e.commu_id || (e.commu_id = s);
1507
1515
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1508
- w(e, (r) => {
1516
+ w(e, (i) => {
1509
1517
  f(o, {
1510
1518
  method: "GET",
1511
1519
  headers: {
1512
1520
  "Content-type": "application/json;charset=UTF-8",
1513
1521
  Accept: "application/json",
1514
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1522
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1515
1523
  },
1516
- onComplete(i) {
1517
- const a = JSON.parse(i);
1524
+ onComplete(r) {
1525
+ const a = JSON.parse(r);
1518
1526
  t && t(a);
1519
1527
  },
1520
- onFailure(i, a) {
1521
- const c = i;
1528
+ onFailure(r, a) {
1529
+ const c = r;
1522
1530
  c.status = a.status, c.response = a.errormsg, n && n(c);
1523
1531
  }
1524
1532
  });
1525
1533
  });
1526
1534
  }
1527
1535
  function Ve(e, t, n = void 0, s = void 0) {
1528
- const { listAllContacts: o, currentUser: r } = e;
1536
+ const { listAllContacts: o, currentUser: i } = e;
1529
1537
  console.log("__listAllContacts", o.hits);
1530
- const i = `${e.space}/api/directmessages`, a = {
1531
- users: [r.login].concat(t.receipt)
1538
+ const r = `${e.space}/api/directmessages`, a = {
1539
+ users: [i.login].concat(t.receipt)
1532
1540
  }, c = {
1533
1541
  id_msg: "",
1534
1542
  senderId: e.currentUser.login,
@@ -1546,7 +1554,7 @@ function Ve(e, t, n = void 0, s = void 0) {
1546
1554
  }
1547
1555
  ), d === !1 && setTimeout(() => {
1548
1556
  d === !1 && w(e, (l) => {
1549
- f(i, {
1557
+ f(r, {
1550
1558
  method: "POST",
1551
1559
  headers: {
1552
1560
  "Content-Type": "application/json",
@@ -1569,15 +1577,15 @@ function Ve(e, t, n = void 0, s = void 0) {
1569
1577
  }
1570
1578
  function Z(e, t, n, s) {
1571
1579
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1572
- w(e, (r) => {
1580
+ w(e, (i) => {
1573
1581
  f(o, {
1574
1582
  method: "GET",
1575
1583
  headers: {
1576
1584
  Accept: "application/json,text/javascript,*/*",
1577
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1585
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1578
1586
  },
1579
- onComplete(i) {
1580
- const a = JSON.parse(i), c = [];
1587
+ onComplete(r) {
1588
+ const a = JSON.parse(r), c = [];
1581
1589
  a.result.forEach((p) => {
1582
1590
  p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1583
1591
  });
@@ -1589,8 +1597,8 @@ function Z(e, t, n, s) {
1589
1597
  });
1590
1598
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1591
1599
  },
1592
- onFailure(i) {
1593
- const a = i;
1600
+ onFailure(r) {
1601
+ const a = r;
1594
1602
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1595
1603
  }
1596
1604
  });
@@ -1602,7 +1610,7 @@ function j(e, t, n = void 0, s = void 0) {
1602
1610
  uri: "/api/community",
1603
1611
  id_msg: `${t.id_msg}`,
1604
1612
  endUri: "/instantmessages"
1605
- }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1613
+ }, i = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
1606
1614
  author: { login: t.senderId, displayName: t.senderName },
1607
1615
  accessState: null,
1608
1616
  commentUri: null,
@@ -1612,15 +1620,15 @@ function j(e, t, n = void 0, s = void 0) {
1612
1620
  parentCommentUri: null,
1613
1621
  richMessage: t.msg
1614
1622
  };
1615
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1616
- f(r, {
1623
+ console.log("_3dSwym_sendDirectMessageData url ", i), w(e, (a) => {
1624
+ f(i, {
1617
1625
  method: "POST",
1618
1626
  headers: {
1619
1627
  "Content-Type": "application/json",
1620
1628
  Accept: "application/json",
1621
1629
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1622
1630
  },
1623
- data: JSON.stringify(i),
1631
+ data: JSON.stringify(r),
1624
1632
  type: "json",
1625
1633
  onComplete(c, d, l) {
1626
1634
  const p = c;
@@ -1651,15 +1659,15 @@ const te = {
1651
1659
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1652
1660
  };
1653
1661
  function Be(e, t, n = void 0, s = void 0) {
1654
- const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1662
+ const o = `${e.space}/api/idea/add`, i = e.swymCommunities.find(
1655
1663
  (c) => c.id === t.community_id
1656
- ), i = e.swymCommunities.find(
1664
+ ), r = e.swymCommunities.find(
1657
1665
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1658
1666
  ), a = {
1659
1667
  params: {
1660
1668
  title: t.title,
1661
1669
  // String, le nom de l'affaire
1662
- community_id: r?.id !== void 0 ? r.id : i.id,
1670
+ community_id: i?.id !== void 0 ? i.id : r.id,
1663
1671
  // String, l'id de la communauté
1664
1672
  message: ne(t.text_html),
1665
1673
  // STRING => le contenue du message doit être au format HTML
@@ -1690,21 +1698,21 @@ function Be(e, t, n = void 0, s = void 0) {
1690
1698
  });
1691
1699
  }
1692
1700
  function Ye(e, t, n = void 0, s = void 0) {
1693
- const o = `${e.space}/api/idea/delete`, r = {
1701
+ const o = `${e.space}/api/idea/delete`, i = {
1694
1702
  params: {
1695
1703
  community_id: t.community_id,
1696
1704
  ideationIds: [t.idee_id]
1697
1705
  }
1698
1706
  };
1699
- w(e, (i) => {
1707
+ w(e, (r) => {
1700
1708
  f(o, {
1701
1709
  method: "POST",
1702
1710
  headers: {
1703
1711
  "Content-type": "application/json;charset=UTF-8",
1704
1712
  Accept: "application/json",
1705
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1713
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1706
1714
  },
1707
- data: JSON.stringify(r),
1715
+ data: JSON.stringify(i),
1708
1716
  type: "json",
1709
1717
  onComplete(a, c, d) {
1710
1718
  n && n(a);
@@ -1719,20 +1727,20 @@ function Ye(e, t, n = void 0, s = void 0) {
1719
1727
  function He(e, t = "", n = void 0, s = void 0) {
1720
1728
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1721
1729
  t === "" && (t = o);
1722
- const r = `${e.space}/api/idea/get`, i = {
1730
+ const i = `${e.space}/api/idea/get`, r = {
1723
1731
  params: {
1724
1732
  id: t
1725
1733
  }
1726
1734
  };
1727
1735
  w(e, (a) => {
1728
- f(r, {
1736
+ f(i, {
1729
1737
  method: "POST",
1730
1738
  headers: {
1731
1739
  "Content-type": "application/json;charset=UTF-8",
1732
1740
  Accept: "application/json",
1733
1741
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1734
1742
  },
1735
- data: JSON.stringify(i),
1743
+ data: JSON.stringify(r),
1736
1744
  type: "json",
1737
1745
  onComplete(c) {
1738
1746
  const d = c;
@@ -1750,12 +1758,12 @@ function ze(e, t = te, n = void 0, s = void 0) {
1750
1758
  uri: "/api/idea/list",
1751
1759
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1752
1760
  limit: `/limit/${t.limit ? t.limit : 10}`
1753
- }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1754
- w(e, (i) => {
1755
- f(r, {
1761
+ }, i = `${e.space}${o.uri}${o.comId}${o.limit}`;
1762
+ w(e, (r) => {
1763
+ f(i, {
1756
1764
  method: "GET",
1757
1765
  headers: {
1758
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1766
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1759
1767
  },
1760
1768
  onComplete(a) {
1761
1769
  const c = JSON.parse(a);
@@ -1851,12 +1859,12 @@ function qe(e, t = void 0, n = void 0) {
1851
1859
  headers: {
1852
1860
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1853
1861
  },
1854
- onComplete(r, i, a) {
1855
- const c = JSON.parse(r);
1862
+ onComplete(i, r, a) {
1863
+ const c = JSON.parse(i);
1856
1864
  t && t(c.result);
1857
1865
  },
1858
- onFailure(r, i, a) {
1859
- const c = { erreur: JSON.parse(r), headers: i, xhr: a };
1866
+ onFailure(i, r, a) {
1867
+ const c = { erreur: JSON.parse(i), headers: r, xhr: a };
1860
1868
  n && n(c);
1861
1869
  }
1862
1870
  });
@@ -1866,16 +1874,16 @@ function Qe(e, t, n = void 0, s = void 0) {
1866
1874
  const o = e.space + "/api/user/find/login/" + t;
1867
1875
  w(
1868
1876
  e,
1869
- (r) => {
1877
+ (i) => {
1870
1878
  f(o, {
1871
1879
  method: "GET",
1872
- headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1873
- onComplete(i, a, c) {
1874
- const d = JSON.parse(i);
1880
+ headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1881
+ onComplete(r, a, c) {
1882
+ const d = JSON.parse(r);
1875
1883
  n && n(d);
1876
1884
  },
1877
- onFailure(i) {
1878
- s && s(i);
1885
+ onFailure(r) {
1886
+ s && s(r);
1879
1887
  }
1880
1888
  });
1881
1889
  },