@beam3_dev/api_module 0.0.67 → 0.0.69

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
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
3
  import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
- function R() {
4
+ function I() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -34,10 +34,10 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ie(e, t = void 0, s = void 0) {
38
- const n = parseInt(e);
37
+ async function ie(e, t = void 0, n = void 0) {
38
+ const s = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function ie(e, t = void 0, s = void 0) {
47
47
  ).then((o) => o.json()).then((o) => {
48
48
  t && t(o);
49
49
  }).catch((o) => {
50
- s && s(o), console.error("Erreur : " + o);
50
+ n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function re(e, t = void 0, s = void 0) {
53
+ async function re(e, t = void 0, n = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -59,19 +59,19 @@ async function re(e, t = void 0, s = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((n) => n.json()).then((n) => {
63
- t && t(n);
64
- }).catch((n) => {
65
- s && s(n), console.error("Erreur : " + n);
62
+ ).then((s) => s.json()).then((s) => {
63
+ t && t(s);
64
+ }).catch((s) => {
65
+ n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
68
  async function ce(e, t = L) {
69
- let s = N.now().year;
70
- const n = e, o = [], c = (a) => {
69
+ let n = N.now().year;
70
+ const s = e, o = [], c = (a) => {
71
71
  for (let i in a)
72
72
  o.push({ date: i, comment: a[i] });
73
73
  };
74
- for (let a = s; a <= s + 1; a++)
74
+ for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
77
  {
@@ -84,9 +84,9 @@ async function ce(e, t = L) {
84
84
  c(i);
85
85
  }).catch((i) => console.error("Erreur : " + i));
86
86
  return (() => {
87
- const a = n.length === 0 ? {
87
+ const a = s.length === 0 ? {
88
88
  events: []
89
- } : n;
89
+ } : s;
90
90
  for (let i of o)
91
91
  a.events.findIndex(
92
92
  (l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
@@ -100,43 +100,43 @@ async function ce(e, t = L) {
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function de(e, t, s = !0) {
104
- const n = e.events.findIndex((o) => o.uuid === t.uuid);
105
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
103
+ async function de(e, t, n = !0) {
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, c) => o.start - c.start), e;
106
106
  }
107
107
  function f(e, t) {
108
- O(["DS/WAFData/WAFData"], (s) => {
109
- s.authenticatedRequest(e, t);
108
+ O(["DS/WAFData/WAFData"], (n) => {
109
+ n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function le(e, t, s) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
- n.draggable(e, { data: t, start: s });
112
+ function le(e, t, n) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
+ s.draggable(e, { data: t, start: n });
115
115
  });
116
116
  }
117
117
  function pe(e, t = void 0) {
118
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
- let n;
120
- n === void 0 && (n = s.createProxy({
118
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
+ let s;
120
+ s === void 0 && (s = n.createProxy({
121
121
  widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
- }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
123
+ }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
125
125
  }
126
126
  function ue(e, t) {
127
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
- s.droppable(e, { drop: t });
127
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
+ n.droppable(e, { drop: t });
129
129
  });
130
130
  }
131
- async function fe(e, t = void 0, s = void 0) {
131
+ async function fe(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
- (n) => {
135
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", n), t(
136
- n.getPlatformServices({
134
+ (s) => {
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
136
+ s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
139
- onFailure: s
139
+ onFailure: n
140
140
  })
141
141
  ));
142
142
  }
@@ -145,24 +145,24 @@ async function fe(e, t = void 0, s = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
- tenant: s,
153
- user: n,
152
+ tenant: n,
153
+ user: s,
154
154
  appsConfiguration: o,
155
155
  appConf: c
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
159
- function ge(e, t, s) {
160
- const n = {
159
+ function ge(e, t, n) {
160
+ const s = {
161
161
  base: `${e.space}`,
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, o = `${n.base}${n.uri}${n.option}`;
165
+ }, o = `${s.base}${s.uri}${s.option}`;
166
166
  f(o, {
167
167
  method: "GET",
168
168
  headers: {
@@ -178,33 +178,33 @@ function ge(e, t, s) {
178
178
  },
179
179
  onFailure(c, r) {
180
180
  const a = c;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
181
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
185
- function he(e, t = void 0, s = void 0) {
186
- let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- f(n, {
185
+ function he(e, t = void 0, n = void 0) {
186
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
+ f(s, {
188
188
  onComplete(o, c, r) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
192
  onFailure(o, c) {
193
193
  const r = o;
194
- r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
194
+ r.msg = c.errormsg, r.errCode = c.errorcode, n && n(r);
195
195
  }
196
196
  });
197
197
  }
198
- function Se(e, t, s = void 0, n = void 0) {
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
201
  onComplete(c, r, a) {
202
202
  const i = JSON.parse(c);
203
- s && s(i);
203
+ n && n(i);
204
204
  },
205
205
  onFailure(c, r) {
206
206
  const a = c;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
207
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -212,7 +212,7 @@ const F = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
- function _e(e, t, s = void 0, n = void 0) {
215
+ function _e(e, t, n = void 0, s = void 0) {
216
216
  const { space: o, currentUser: c } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
218
  }.URIUGr}`, i = {
@@ -232,16 +232,16 @@ function _e(e, t, s = void 0, n = void 0) {
232
232
  headers: F,
233
233
  data: JSON.stringify(i),
234
234
  onComplete(d) {
235
- s && s(JSON.parse(d));
235
+ n && n(JSON.parse(d));
236
236
  },
237
237
  onFailure(d, l) {
238
238
  console.log(d);
239
239
  const p = d;
240
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
240
+ p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
241
241
  }
242
242
  });
243
243
  }
244
- function ye(e, t, s = void 0, n = void 0) {
244
+ function ye(e, t, n = void 0, s = void 0) {
245
245
  const { space: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
246
246
  f(d, {
247
247
  opts: {
@@ -252,16 +252,16 @@ function ye(e, t, s = void 0, n = void 0) {
252
252
  }
253
253
  },
254
254
  onComplete(u) {
255
- s && s(JSON.parse(u));
255
+ n && n(JSON.parse(u));
256
256
  },
257
257
  onFailure(u, m) {
258
258
  const g = u;
259
- g.msg = m.errormsg, g.errCode = m.errorcode, n && n(g);
259
+ g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
260
260
  }
261
261
  });
262
262
  }
263
- function E(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: o } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
263
+ function E(e, t = void 0, n = void 0) {
264
+ const { space: s, tenant: o } = e, c = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
267
  }, d = `${c}${r}${a}`;
@@ -272,12 +272,12 @@ function E(e, t = void 0, s = void 0) {
272
272
  },
273
273
  onFailure(l, p) {
274
274
  const u = l;
275
- u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
275
+ u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
276
276
  }
277
277
  });
278
278
  }
279
- function we(e, t = void 0, s = void 0) {
280
- const { space: n, currentUser: o } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
279
+ function we(e, t = void 0, n = void 0) {
280
+ const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
281
  "Content-Type": "application/json",
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
@@ -294,13 +294,13 @@ function we(e, t = void 0, s = void 0) {
294
294
  u.rules = _, t && t(u);
295
295
  },
296
296
  (_) => {
297
- s && s(_);
297
+ n && n(_);
298
298
  }
299
299
  );
300
300
  }
301
301
  },
302
302
  onFailure(l) {
303
- s && s(l);
303
+ n && n(l);
304
304
  }
305
305
  });
306
306
  } catch (l) {
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
308
308
  }
309
309
  }
310
310
  function Te(e, t) {
311
- const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
311
+ const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
312
  f(o, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Ce(e, t, s, n = void 0, o = void 0) {
316
+ function Ce(e, t, n, s = void 0, o = void 0) {
317
317
  const { space: c, tenant: r } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -322,36 +322,36 @@ function Ce(e, t, s, n = void 0, o = void 0) {
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
324
  OPTsTenant: `tenant=dstenant:${r}`
325
- }, i = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
325
+ }, i = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
326
326
  f(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
331
331
  onComplete(p) {
332
- n && n(p);
332
+ s && s(p);
333
333
  },
334
334
  onFailure(p) {
335
335
  o && o(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Oe(e, t, s, n = void 0, o = void 0) {
339
+ function Oe(e, t, n, s = void 0, o = void 0) {
340
340
  const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
343
  headers: F,
344
- data: JSON.stringify(s),
344
+ data: JSON.stringify(n),
345
345
  type: "json",
346
346
  onComplete(d) {
347
- n && n(d);
347
+ s && s(d);
348
348
  },
349
349
  onFailure(d) {
350
350
  o && o(d);
351
351
  }
352
352
  });
353
353
  }
354
- function be(e, t, s = void 0, n = void 0) {
354
+ function be(e, t, n = void 0, s = void 0) {
355
355
  const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
356
  f(r, {
357
357
  opts: {
@@ -362,27 +362,27 @@ function be(e, t, s = void 0, n = void 0) {
362
362
  }
363
363
  },
364
364
  onComplete(d) {
365
- s && s(JSON.parse(d));
365
+ n && n(JSON.parse(d));
366
366
  },
367
367
  onFailure(d) {
368
- n && n(d);
368
+ s && s(d);
369
369
  }
370
370
  });
371
371
  }
372
- async function J(e, t, s) {
372
+ async function J(e, t, n) {
373
373
  if (e.space) {
374
- const n = `${e.space}/resources/v1/application/CSRF`;
375
- f(n, {
374
+ const s = `${e.space}/resources/v1/application/CSRF`;
375
+ f(s, {
376
376
  onComplete(o) {
377
377
  o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
378
378
  },
379
379
  onFailure(o, c, r) {
380
- s && s({ error: o, headers: c, xhr: r });
380
+ n && n({ error: o, headers: c, xhr: r });
381
381
  }
382
382
  });
383
383
  }
384
384
  }
385
- async function G(e, t = void 0, s = void 0, n = void 0) {
385
+ async function G(e, t = void 0, n = void 0, s = void 0) {
386
386
  const o = e.space;
387
387
  if (t === void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
@@ -392,53 +392,53 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
392
392
  f(c, {
393
393
  onComplete(r, a, i) {
394
394
  const d = JSON.parse(r);
395
- s && s(d);
395
+ n && n(d);
396
396
  },
397
397
  onFailure(r) {
398
- n && n(r);
398
+ s && s(r);
399
399
  }
400
400
  });
401
401
  }
402
- function k(e, t = void 0, s = void 0) {
402
+ function k(e, t = void 0, n = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
- let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- console.log("_3DSpace_get_csrf / url", n), f(n, {
404
+ let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
+ console.log("_3DSpace_get_csrf / url", s), f(s, {
406
406
  onComplete(o, c, r) {
407
407
  const a = JSON.parse(o);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
410
410
  onFailure(o) {
411
- s && s(o);
411
+ n && n(o);
412
412
  }
413
413
  });
414
414
  } else
415
415
  C(
416
416
  e,
417
- (n) => {
418
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
417
+ (s) => {
418
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
419
419
  },
420
- (n) => {
421
- s && s(n);
420
+ (s) => {
421
+ n && n(s);
422
422
  }
423
423
  );
424
424
  }
425
- function C(e, t = void 0, s = void 0) {
425
+ function C(e, t = void 0, n = void 0) {
426
426
  if (e.space) {
427
- const n = e.space + "/resources/v1/application/CSRF";
428
- f(n, {
427
+ const s = e.space + "/resources/v1/application/CSRF";
428
+ f(s, {
429
429
  onComplete(o, c, r) {
430
430
  const a = JSON.parse(o);
431
431
  console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
432
432
  },
433
433
  onFailure(o, c, r) {
434
- s && s({ response: o, headers: c, xhr: r });
434
+ n && n({ response: o, headers: c, xhr: r });
435
435
  }
436
436
  });
437
437
  } else
438
- s && s("ERROR : url du 3DSpace non défini.");
438
+ n && n("ERROR : url du 3DSpace non défini.");
439
439
  }
440
- function U(e, t = void 0, s = void 0) {
441
- let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
440
+ function U(e, t = void 0, n = void 0) {
441
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
442
442
  k(
443
443
  e,
444
444
  (o) => {
@@ -446,7 +446,7 @@ function U(e, t = void 0, s = void 0) {
446
446
  "_3DSpace_get_ticket / onComplete / ☠️ info => ",
447
447
  o,
448
448
  e.token
449
- ), f(n, {
449
+ ), f(s, {
450
450
  method: "PUT",
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
@@ -456,28 +456,28 @@ function U(e, t = void 0, s = void 0) {
456
456
  console.log("le ticket est dans la callback"), t && t(a);
457
457
  },
458
458
  onFailure(c, r) {
459
- console.warn("☠️ error => ", c, r), s && s(c, r);
459
+ console.warn("☠️ error => ", c, r), n && n(c, r);
460
460
  }
461
461
  });
462
462
  },
463
463
  (o) => {
464
- console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
464
+ console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
465
465
  }
466
466
  );
467
467
  }
468
- function Ne(e, t, s, n = void 0, o = void 0) {
468
+ function Ne(e, t, n, s = void 0, o = void 0) {
469
469
  const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- s || (s = e.token), f(c, {
470
+ n || (n = e.token), f(c, {
471
471
  method: "PUT",
472
472
  headers: {
473
- ENO_CSRF_TOKEN: s
473
+ ENO_CSRF_TOKEN: n
474
474
  },
475
475
  onComplete(r) {
476
476
  let a = JSON.parse(r);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
479
  const i = a.data[0].dataelements.ticketURL;
480
- n && n(i);
480
+ s && s(i);
481
481
  } catch (i) {
482
482
  o && o(i);
483
483
  }
@@ -487,7 +487,7 @@ function Ne(e, t, s, n = void 0, o = void 0) {
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, s, n, o, c = void 0, r = void 0) {
490
+ function K(e, t, n, s, o, c = void 0, r = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -495,8 +495,8 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
495
495
  W(
496
496
  e,
497
497
  t,
498
- s,
499
498
  n,
499
+ s,
500
500
  o,
501
501
  a.csrf.value,
502
502
  c,
@@ -505,7 +505,7 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
505
505
  }
506
506
  );
507
507
  }
508
- function W(e, t, s, n, o, c, r = void 0, a = void 0) {
508
+ function W(e, t, n, s, o, c, r = void 0, a = void 0) {
509
509
  const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
510
  f(i, {
511
511
  method: "PUT",
@@ -514,7 +514,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
517
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", n, o);
517
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
518
518
  const g = {};
519
519
  g.method = "POST", g.data = m, g.onComplete = function(h) {
520
520
  let S = "temp_" + Date.now(), _ = {
@@ -529,7 +529,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
529
529
  relateddata: {
530
530
  files: [
531
531
  {
532
- id: s,
532
+ id: n,
533
533
  dataelements: {
534
534
  title: o,
535
535
  receipt: h
@@ -560,7 +560,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
560
560
  }
561
561
  });
562
562
  }
563
- async function ke(e, t, s, n, o = void 0, c = void 0) {
563
+ async function ke(e, t, n, s, o = void 0, c = void 0) {
564
564
  const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
565
565
  type: "text/plain"
566
566
  }), p = {
@@ -578,7 +578,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
578
578
  },
579
579
  onComplete(u, m, g) {
580
580
  const h = JSON.parse(u).data[0].dataelements;
581
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
581
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
582
582
  const S = {
583
583
  method: "POST",
584
584
  data: d,
@@ -596,21 +596,21 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
596
596
  {
597
597
  type: "Document",
598
598
  dataelements: {
599
- title: `Title_${s.toLowerCase().split(" ").join("_")}`,
599
+ title: `Title_${n.toLowerCase().split(" ").join("_")}`,
600
600
  policy: "Document Release",
601
- description: n
601
+ description: s
602
602
  },
603
603
  relateddata: {
604
604
  files: [
605
605
  {
606
606
  dataelements: {
607
- title: `${s}.json`,
607
+ title: `${n}.json`,
608
608
  receipt: T
609
609
  }
610
610
  }
611
611
  ]
612
612
  },
613
- tempId: R()
613
+ tempId: I()
614
614
  }
615
615
  ]
616
616
  }),
@@ -636,7 +636,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
636
636
  }
637
637
  });
638
638
  }
639
- function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
639
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
640
640
  const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
641
641
  f(r, {
642
642
  method: "GET",
@@ -652,10 +652,10 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
652
652
  (h, S, _) => S === _.findIndex(
653
653
  (y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
654
654
  )
655
- ), s && (Array.isArray(s) ? s.forEach((h) => {
655
+ ), n && (Array.isArray(n) ? n.forEach((h) => {
656
656
  u || g.forEach((S) => {
657
- if (h === S.role.name && n === S.organization.title)
658
- u = h, p = n;
657
+ if (h === S.role.name && s === S.organization.title)
658
+ u = h, p = s;
659
659
  else if (h === S.role.name) {
660
660
  let _ = g.filter(
661
661
  (y) => y.role.name === h
@@ -664,11 +664,11 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
664
664
  }
665
665
  });
666
666
  }) : g.forEach((h) => {
667
- if (s === h.role.name && n === h.organization.title)
668
- u = s, p = n;
669
- else if (s === h.role.name) {
667
+ if (n === h.role.name && s === h.organization.title)
668
+ u = n, p = s;
669
+ else if (n === h.role.name) {
670
670
  let S = g.filter(
671
- (_) => _.role.name === s
671
+ (_) => _.role.name === n
672
672
  );
673
673
  S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
674
674
  }
@@ -682,50 +682,52 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
682
682
  }
683
683
  });
684
684
  }
685
- async function I(e, t = void 0, s = void 0) {
686
- const n = e.objID;
687
- return (!n || n === "") && console.warn(
685
+ async function R(e, t = void 0, n = void 0) {
686
+ return (!e.objID || e.objID === "") && console.warn(
688
687
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
689
688
  ), (e.space === "" || !e.space) && console.warn(
690
689
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
691
690
  ), (e.token === "" || !e.token) && (J(
692
691
  e,
693
- (c) => {
694
- e.token = c;
692
+ (o) => {
693
+ e.token = o;
695
694
  },
696
- (c) => {
697
- console.log("☠️ error => ", c);
695
+ (o) => {
696
+ console.log("☠️ error => ", o);
698
697
  }
699
698
  ), console.warn(
700
699
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
701
- )), console.log("_3DSpace_download_doc / credentials", e), new Promise((c, r) => {
700
+ )), console.log("_3DSpace_download_doc / credentials", e), new Promise((o, c) => {
702
701
  U(
703
702
  e,
704
- (a) => {
703
+ (r) => {
705
704
  setTimeout(() => {
706
- f(a, {
705
+ f(r, {
707
706
  headers: {
707
+ // ENO_CSRF_TOKEN: credentials.token,
708
708
  "Content-Type": "application/json",
709
- Accept: "application/json",
710
- ENO_CSRF_TOKEN: e.token
709
+ Accept: "application/json"
711
710
  },
712
711
  onComplete(i) {
713
712
  const d = JSON.parse(i);
714
- console.log("_3DSpace_download_doc / reponse ", d), t && t(d), c(d);
713
+ console.log(
714
+ "_3DSpace_download_doc / reponse (liste d'objetsID) ",
715
+ d
716
+ ), t && t(d), o(d);
715
717
  },
716
718
  onFailure(i, d, l) {
717
- s && (console.log("error http", i), s({ error: i, headers: d, xhr: l }), r({ error: i, headers: d, xhr: l }));
719
+ n && (console.log("error http", i), n({ msg: JSON.parse(i), headers: d, xhr: l }), c({ msg: JSON.parse(i), headers: d, xhr: l }));
718
720
  }
719
721
  });
720
- }, 500);
722
+ }, 1e3);
721
723
  },
722
- (a) => {
723
- s && s(a), console.log("*_3dspace_download_doc / error file URL *", a), r(a);
724
+ (r) => {
725
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), c(r);
724
726
  }
725
727
  );
726
728
  });
727
729
  }
728
- async function X(e, t, s = void 0, n = void 0) {
730
+ async function X(e, t, n = void 0, s = void 0) {
729
731
  let o = [];
730
732
  for (let a = 0; a < t.length; a += 80) {
731
733
  const i = t.slice(a, a + 80);
@@ -739,13 +741,13 @@ async function X(e, t, s = void 0, n = void 0) {
739
741
  a++, a < o.length && r(a);
740
742
  },
741
743
  (i) => {
742
- s && s(i);
744
+ n && n(i);
743
745
  }
744
746
  );
745
747
  };
746
748
  r(0);
747
749
  }
748
- function V(e, t, s = void 0, n = void 0, o = void 0) {
750
+ function V(e, t, n = void 0, s = void 0, o = void 0) {
749
751
  const c = [];
750
752
  t.forEach((i) => {
751
753
  c.push({
@@ -766,12 +768,12 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
766
768
  type: "json",
767
769
  onComplete(i) {
768
770
  const d = i.data;
769
- i.success === !0 && (s && s(), d.forEach((l) => {
771
+ i.success === !0 && (n && n(), d.forEach((l) => {
770
772
  try {
771
773
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
772
774
  f(u, {
773
775
  onComplete: (m) => {
774
- n && n({
776
+ s && s({
775
777
  objectId: l.id,
776
778
  fileName: p,
777
779
  data: JSON.parse(m)
@@ -791,7 +793,7 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
791
793
  }
792
794
  });
793
795
  }
794
- function De(e, t, s = void 0, n = void 0) {
796
+ function De(e, t, n = void 0, s = void 0) {
795
797
  return new Promise((o) => {
796
798
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
797
799
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -822,17 +824,17 @@ function De(e, t, s = void 0, n = void 0) {
822
824
  }),
823
825
  type: "json",
824
826
  onComplete(a) {
825
- s && s(a);
827
+ n && n(a);
826
828
  },
827
829
  onFailure(a) {
828
- n && n(a);
830
+ s && s(a);
829
831
  }
830
832
  };
831
833
  f(c, r);
832
834
  }
833
835
  });
834
836
  }
835
- function Fe(e, t, s, n = void 0, o = void 0) {
837
+ function Fe(e, t, n, s = void 0, o = void 0) {
836
838
  return new Promise((c) => {
837
839
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
838
840
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -858,13 +860,13 @@ function Fe(e, t, s, n = void 0, o = void 0) {
858
860
  data: [
859
861
  {
860
862
  id: t,
861
- nextState: s
863
+ nextState: n
862
864
  }
863
865
  ]
864
866
  }),
865
867
  type: "json",
866
868
  onComplete(i) {
867
- n && n(i);
869
+ s && s(i);
868
870
  },
869
871
  onFailure(i) {
870
872
  o && o(i);
@@ -874,7 +876,7 @@ function Fe(e, t, s, n = void 0, o = void 0) {
874
876
  }
875
877
  });
876
878
  }
877
- function Ue(e, t, s = void 0, n = void 0) {
879
+ function Ue(e, t, n = void 0, s = void 0) {
878
880
  return new Promise((o) => {
879
881
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
880
882
  const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
@@ -905,17 +907,17 @@ function Ue(e, t, s = void 0, n = void 0) {
905
907
  }),
906
908
  type: "json",
907
909
  onComplete(a) {
908
- s && s(a);
910
+ n && n(a);
909
911
  },
910
912
  onFailure(a) {
911
- n && n(a);
913
+ s && s(a);
912
914
  }
913
915
  };
914
916
  f(c, r);
915
917
  }
916
918
  });
917
919
  }
918
- function $e(e, t, s = void 0, n = void 0) {
920
+ function $e(e, t, n = void 0, s = void 0) {
919
921
  return new Promise((o) => {
920
922
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
921
923
  const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
@@ -952,17 +954,17 @@ function $e(e, t, s = void 0, n = void 0) {
952
954
  }),
953
955
  type: "json",
954
956
  onComplete(a) {
955
- s && s(a);
957
+ n && n(a);
956
958
  },
957
959
  onFailure(a) {
958
- n && n(a);
960
+ s && s(a);
959
961
  }
960
962
  };
961
963
  f(c, r);
962
964
  }
963
965
  });
964
966
  }
965
- function je(e, t, s, n = void 0, o = void 0) {
967
+ function je(e, t, n, s = void 0, o = void 0) {
966
968
  return new Promise((c) => {
967
969
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
968
970
  const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -988,9 +990,9 @@ function je(e, t, s, n = void 0, o = void 0) {
988
990
  data: [
989
991
  {
990
992
  physicalid: t,
991
- proposedRevision: s,
993
+ proposedRevision: n,
992
994
  modifiedAttributes: {
993
- revision: s
995
+ revision: n
994
996
  }
995
997
  }
996
998
  ],
@@ -999,7 +1001,7 @@ function je(e, t, s, n = void 0, o = void 0) {
999
1001
  }),
1000
1002
  type: "json",
1001
1003
  onComplete(i) {
1002
- n && n(i);
1004
+ s && s(i);
1003
1005
  },
1004
1006
  onFailure(i) {
1005
1007
  o && o(i);
@@ -1010,12 +1012,12 @@ function je(e, t, s, n = void 0, o = void 0) {
1010
1012
  });
1011
1013
  }
1012
1014
  //!SECTION
1013
- function Ae(e, t = void 0, s = void 0) {
1014
- const n = {
1015
+ function Ae(e, t = void 0, n = void 0) {
1016
+ const s = {
1015
1017
  base: `${e.space}`,
1016
1018
  uri: "/resources/bps/cspaces",
1017
1019
  optTenant: `tenant=${e.tenant}`
1018
- }, o = `${n.base}${n.uri}?${n.optTenant}`;
1020
+ }, o = `${s.base}${s.uri}?${s.optTenant}`;
1019
1021
  f(o, {
1020
1022
  method: "GET",
1021
1023
  headers: {
@@ -1027,11 +1029,11 @@ function Ae(e, t = void 0, s = void 0) {
1027
1029
  t && t(a, r);
1028
1030
  },
1029
1031
  onFailure(c, r, a) {
1030
- s && s({ response: c, headers: r, xhr: a });
1032
+ n && n({ response: c, headers: r, xhr: a });
1031
1033
  }
1032
1034
  });
1033
1035
  }
1034
- function Re(e, t, s, n) {
1036
+ function Ie(e, t, n, s) {
1035
1037
  U(
1036
1038
  e.space,
1037
1039
  t,
@@ -1039,42 +1041,42 @@ function Re(e, t, s, n) {
1039
1041
  f(o, {
1040
1042
  header: { ENO_CSRF_TOKEN: e.token },
1041
1043
  onComplete: (c) => {
1042
- s && s(c);
1044
+ n && n(c);
1043
1045
  },
1044
1046
  onFailure: (c) => {
1045
- console.log("error http", c), n && n(c);
1047
+ console.log("error http", c), s && s(c);
1046
1048
  }
1047
1049
  });
1048
1050
  }
1049
1051
  );
1050
1052
  }
1051
- async function Ie(e, t, s = void 0, n = void 0) {
1053
+ async function Re(e, t, n = void 0, s = void 0) {
1052
1054
  return new Promise((o) => {
1053
1055
  U(e, t, (c) => {
1054
1056
  f(c, {
1055
- onComplete: (r, a, i) => (o(JSON.parse(r)), s && s(JSON.parse(r), a, i), o),
1057
+ onComplete: (r, a, i) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, i), o),
1056
1058
  onFailure: (r, a, i) => {
1057
- n && n(r, a, i), console.log(r, a?.errormsg);
1059
+ s && s(r, a, i), console.log(r, a?.errormsg);
1058
1060
  }
1059
1061
  });
1060
1062
  });
1061
1063
  });
1062
1064
  }
1063
- function ve(e, t, s, n = void 0, o = void 0) {
1065
+ function ve(e, t, n, s = void 0, o = void 0) {
1064
1066
  const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1065
1067
  k(
1066
1068
  e,
1067
- s,
1069
+ n,
1068
1070
  (r) => {
1069
1071
  const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1070
1072
  K(
1071
1073
  e,
1072
- s,
1074
+ n,
1073
1075
  a,
1074
1076
  c,
1075
1077
  i,
1076
1078
  (d) => {
1077
- n && n(d);
1079
+ s && s(d);
1078
1080
  },
1079
1081
  (d) => {
1080
1082
  o && o(d);
@@ -1085,59 +1087,59 @@ function ve(e, t, s, n = void 0, o = void 0) {
1085
1087
  }
1086
1088
  let v, P;
1087
1089
  const $ = [];
1088
- async function Pe(e, t = void 0, s = void 0) {
1090
+ async function Pe(e, t = void 0, n = void 0) {
1089
1091
  e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1090
1092
  e,
1091
- (n) => {
1092
- t && t(n);
1093
+ (s) => {
1094
+ t && t(s);
1093
1095
  },
1094
- (n) => {
1095
- s && s(n);
1096
+ (s) => {
1097
+ n && n(s);
1096
1098
  }
1097
1099
  )) : (e.objID === null || e.objID === "") && C(
1098
1100
  e,
1099
- (n) => {
1100
- t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1101
+ (s) => {
1102
+ t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1101
1103
  },
1102
- (n) => {
1103
- s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1104
+ (s) => {
1105
+ n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1104
1106
  }
1105
1107
  );
1106
1108
  }
1107
- async function xe(e, t = void 0, s = void 0) {
1108
- console.log("getDatasByTenant (getDocuments)", e), await I(
1109
+ async function xe(e, t = void 0, n = void 0) {
1110
+ console.log("getDatasByTenant (getDocuments)", e), await R(
1109
1111
  e,
1110
- (n) => {
1112
+ (s) => {
1111
1113
  const o = {};
1112
- o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1114
+ o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1113
1115
  },
1114
- (n) => {
1115
- s && s?.(n);
1116
+ (s) => {
1117
+ n && n?.(s);
1116
1118
  }
1117
1119
  );
1118
1120
  }
1119
- function Me(e, t = void 0, s = void 0) {
1120
- const n = [];
1121
+ function Me(e, t = void 0, n = void 0) {
1122
+ const s = [];
1121
1123
  e.objIds.forEach((o, c) => {
1122
- I(
1124
+ R(
1123
1125
  e,
1124
1126
  o.objId,
1125
1127
  (r) => {
1126
- n.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(n);
1128
+ s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(s);
1127
1129
  }
1128
1130
  );
1129
1131
  });
1130
1132
  }
1131
- function B(e, t, s = void 0, n = void 0) {
1133
+ function B(e, t, n = void 0, s = void 0) {
1132
1134
  X(
1133
1135
  e,
1134
1136
  v,
1135
1137
  (o) => {
1136
1138
  const c = [...t];
1137
- c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), s && s($);
1139
+ c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), n && n($);
1138
1140
  },
1139
1141
  (o) => {
1140
- n && (n(o), console.log(o));
1142
+ s && (s(o), console.log(o));
1141
1143
  }
1142
1144
  );
1143
1145
  }
@@ -1161,7 +1163,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1161
1163
  order_by: "desc",
1162
1164
  tag: "testTag"
1163
1165
  };
1164
- function Le(e, t, s = void 0, n = void 0) {
1166
+ function Le(e, t, n = void 0, s = void 0) {
1165
1167
  const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
1166
1168
  uri: "/resources/6w/tags",
1167
1169
  otpCTX: "SecurityContext=preferred",
@@ -1201,27 +1203,27 @@ function Le(e, t, s = void 0, n = void 0) {
1201
1203
  e,
1202
1204
  t,
1203
1205
  (y) => {
1204
- s && s(y);
1206
+ n && n(y);
1205
1207
  },
1206
1208
  (y) => {
1207
- n && n(y);
1209
+ s && s(y);
1208
1210
  }
1209
1211
  );
1210
1212
  },
1211
1213
  (g, h) => {
1212
1214
  const S = g;
1213
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1215
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1214
1216
  }
1215
1217
  );
1216
1218
  }, 2e3);
1217
1219
  },
1218
1220
  onFailure(u, m) {
1219
1221
  const g = u;
1220
- g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1222
+ g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1221
1223
  }
1222
1224
  });
1223
1225
  }
1224
- function q(e, t, s = void 0, n = void 0) {
1226
+ function q(e, t, n = void 0, s = void 0) {
1225
1227
  console.log("obj ", t);
1226
1228
  const o = t.info.name, c = {
1227
1229
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1229,7 +1231,7 @@ function q(e, t, s = void 0, n = void 0) {
1229
1231
  }, r = `${c.baseUrl}${c.uri}`, a = {
1230
1232
  "Content-Type": "application/json",
1231
1233
  Accept: "application/json,text/javascript,*/*"
1232
- }, i = R(), d = {
1234
+ }, i = I(), d = {
1233
1235
  with_indexing_date: !0,
1234
1236
  with_synthesis: !0,
1235
1237
  with_nls: !1,
@@ -1296,15 +1298,15 @@ function q(e, t, s = void 0, n = void 0) {
1296
1298
  data: JSON.stringify(d),
1297
1299
  onComplete(l) {
1298
1300
  const p = JSON.parse(l);
1299
- s(p);
1301
+ n(p);
1300
1302
  },
1301
1303
  onFailure(l, p) {
1302
1304
  const u = l;
1303
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1305
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1304
1306
  }
1305
1307
  });
1306
1308
  }
1307
- function Ee(e, t, s = void 0, n = void 0) {
1309
+ function Ee(e, t, n = void 0, s = void 0) {
1308
1310
  const { objId: o, pred: c, tag: r } = t, a = {
1309
1311
  uri: "/resources/6w/tags",
1310
1312
  otpCTX: "SecurityContext=preferred",
@@ -1332,15 +1334,15 @@ function Ee(e, t, s = void 0, n = void 0) {
1332
1334
  Accept: "application/json,text/javascript,*/*"
1333
1335
  },
1334
1336
  onComplete(l) {
1335
- s && s(l);
1337
+ n && n(l);
1336
1338
  },
1337
1339
  onFailure(l, p) {
1338
1340
  const u = l;
1339
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
1341
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1340
1342
  }
1341
1343
  });
1342
1344
  }
1343
- function Je(e, t = "", s = void 0, n = void 0) {
1345
+ function Je(e, t = "", n = void 0, s = void 0) {
1344
1346
  const { space: o } = e;
1345
1347
  if (t === "")
1346
1348
  return;
@@ -1355,29 +1357,29 @@ function Je(e, t = "", s = void 0, n = void 0) {
1355
1357
  headers: r,
1356
1358
  data: i,
1357
1359
  onComplete(d) {
1358
- s && s(JSON.parse(d));
1360
+ n && n(JSON.parse(d));
1359
1361
  },
1360
1362
  onFailure(d, l) {
1361
1363
  const p = d;
1362
- p.msg = l.error, n && n(p);
1364
+ p.msg = l.error, s && s(p);
1363
1365
  }
1364
1366
  });
1365
1367
  }
1366
- async function w(e, t = void 0, s = void 0) {
1367
- const n = e.space + "/api/index/tk";
1368
- return f(n, {
1368
+ async function w(e, t = void 0, n = void 0) {
1369
+ const s = e.space + "/api/index/tk";
1370
+ return f(s, {
1369
1371
  onComplete(o, c, r) {
1370
1372
  const a = JSON.parse(o);
1371
1373
  if (t)
1372
1374
  return t(a), e.token = a?.result?.ServerToken;
1373
1375
  },
1374
1376
  onFailure(o) {
1375
- s && s(o);
1377
+ n && n(o);
1376
1378
  }
1377
1379
  });
1378
1380
  }
1379
- function Ge(e, t = void 0, s = void 0) {
1380
- const n = `${e.space}/api/exalead/whatsnew`, o = {
1381
+ function Ge(e, t = void 0, n = void 0) {
1382
+ const s = `${e.space}/api/exalead/whatsnew`, o = {
1381
1383
  params: {
1382
1384
  community_id: null,
1383
1385
  hash_key: null,
@@ -1388,7 +1390,7 @@ function Ge(e, t = void 0, s = void 0) {
1388
1390
  }
1389
1391
  };
1390
1392
  w(e, (c) => {
1391
- f(n, {
1393
+ f(s, {
1392
1394
  method: "POST",
1393
1395
  headers: {
1394
1396
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1401,13 +1403,13 @@ function Ge(e, t = void 0, s = void 0) {
1401
1403
  t && t(r, a);
1402
1404
  },
1403
1405
  onFailure(r, a) {
1404
- s && s(r, a);
1406
+ n && n(r, a);
1405
1407
  }
1406
1408
  });
1407
1409
  });
1408
1410
  }
1409
- function Ke(e, t = void 0, s = void 0) {
1410
- const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1411
+ function Ke(e, t = void 0, n = void 0) {
1412
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1411
1413
  params: {
1412
1414
  idsToFilterArr: [],
1413
1415
  mode: "offline",
@@ -1417,7 +1419,7 @@ function Ke(e, t = void 0, s = void 0) {
1417
1419
  }
1418
1420
  };
1419
1421
  w(e, (c) => {
1420
- f(n, {
1422
+ f(s, {
1421
1423
  method: "POST",
1422
1424
  headers: {
1423
1425
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1431,18 +1433,18 @@ function Ke(e, t = void 0, s = void 0) {
1431
1433
  t && t(i, r);
1432
1434
  },
1433
1435
  onFailure(r, a) {
1434
- s && s(r, a);
1436
+ n && n(r, a);
1435
1437
  }
1436
1438
  });
1437
1439
  });
1438
1440
  }
1439
- function We(e, t = void 0, s = void 0) {
1440
- const n = {
1441
+ function We(e, t = void 0, n = void 0) {
1442
+ const s = {
1441
1443
  base: e.space,
1442
1444
  uri: "/api/community/listmycommunities",
1443
1445
  limit: `/limit/${e.limit ? e.limit : 128}`,
1444
1446
  page: `/page/${e.page ? e.page : "1"}`
1445
- }, o = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1447
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1446
1448
  w(e, (r) => {
1447
1449
  f(o, {
1448
1450
  method: "GET",
@@ -1467,18 +1469,18 @@ function We(e, t = void 0, s = void 0) {
1467
1469
  (h) => {
1468
1470
  u++, g.members = h, c.push(g), u === p.length && t && t(c);
1469
1471
  },
1470
- (h) => s(h)
1472
+ (h) => n(h)
1471
1473
  );
1472
1474
  });
1473
1475
  },
1474
1476
  onFailure(a, i) {
1475
1477
  const d = a;
1476
- d.status = i.status, d.response = i.errormsg, s && s(d);
1478
+ d.status = i.status, d.response = i.errormsg, n && n(d);
1477
1479
  }
1478
1480
  });
1479
1481
  });
1480
1482
  }
1481
- function Q(e, t, s, n) {
1483
+ function Q(e, t, n, s) {
1482
1484
  const o = `${e.space}/api/community/listmembers`, c = {
1483
1485
  params: {
1484
1486
  page: e.page ? e.page : 1,
@@ -1497,18 +1499,18 @@ function Q(e, t, s, n) {
1497
1499
  data: JSON.stringify(c),
1498
1500
  type: "json",
1499
1501
  onComplete(a, i, d) {
1500
- s && s(a);
1502
+ n && n(a);
1501
1503
  },
1502
1504
  onFailure(a, i) {
1503
1505
  const d = a;
1504
- d.status = i.status, d.response = i.errormsg, n && n(d);
1506
+ d.status = i.status, d.response = i.errormsg, s && s(d);
1505
1507
  }
1506
1508
  });
1507
1509
  });
1508
1510
  }
1509
- function Xe(e, t = void 0, s = void 0) {
1510
- const n = "YXdA5x4DSUKtlAi2wmnyTA";
1511
- e.commu_id || (e.commu_id = n);
1511
+ function Xe(e, t = void 0, n = void 0) {
1512
+ const s = "YXdA5x4DSUKtlAi2wmnyTA";
1513
+ e.commu_id || (e.commu_id = s);
1512
1514
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1513
1515
  w(e, (c) => {
1514
1516
  f(o, {
@@ -1524,12 +1526,12 @@ function Xe(e, t = void 0, s = void 0) {
1524
1526
  },
1525
1527
  onFailure(r, a) {
1526
1528
  const i = r;
1527
- i.status = a.status, i.response = a.errormsg, s && s(i);
1529
+ i.status = a.status, i.response = a.errormsg, n && n(i);
1528
1530
  }
1529
1531
  });
1530
1532
  });
1531
1533
  }
1532
- function Ve(e, t, s = void 0, n = void 0) {
1534
+ function Ve(e, t, n = void 0, s = void 0) {
1533
1535
  const { listAllContacts: o, currentUser: c } = e;
1534
1536
  console.log("__listAllContacts", o.hits);
1535
1537
  const r = `${e.space}/api/directmessages`, a = {
@@ -1547,7 +1549,7 @@ function Ve(e, t, s = void 0, n = void 0) {
1547
1549
  l !== void 0 && (i.id_msg = l.id, d = !0, j(e, i));
1548
1550
  },
1549
1551
  (l) => {
1550
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
1552
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), i.id_msg = "";
1551
1553
  }
1552
1554
  ), d === !1 && setTimeout(() => {
1553
1555
  d === !1 && w(e, (l) => {
@@ -1562,17 +1564,17 @@ function Ve(e, t, s = void 0, n = void 0) {
1562
1564
  type: "json",
1563
1565
  onComplete(p, u, m) {
1564
1566
  const g = p;
1565
- g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), i.id_msg = g.result.id, j(e, i);
1567
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), i.id_msg = g.result.id, j(e, i);
1566
1568
  },
1567
1569
  onFailure(p, u, m) {
1568
1570
  const g = p;
1569
- g.msg = u.errormsg, g.status = u.status, n && n(g);
1571
+ g.msg = u.errormsg, g.status = u.status, s && s(g);
1570
1572
  }
1571
1573
  });
1572
1574
  });
1573
1575
  }, 500);
1574
1576
  }
1575
- function Z(e, t, s, n) {
1577
+ function Z(e, t, n, s) {
1576
1578
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1577
1579
  w(e, (c) => {
1578
1580
  f(o, {
@@ -1592,16 +1594,16 @@ function Z(e, t, s, n) {
1592
1594
  u.push(m.login);
1593
1595
  }), JSON.stringify(u) === JSON.stringify(d);
1594
1596
  });
1595
- s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1597
+ n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1596
1598
  },
1597
1599
  onFailure(r) {
1598
1600
  const a = r;
1599
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1601
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1600
1602
  }
1601
1603
  });
1602
1604
  });
1603
1605
  }
1604
- function j(e, t, s = void 0, n = void 0) {
1606
+ function j(e, t, n = void 0, s = void 0) {
1605
1607
  const o = {
1606
1608
  base: e.space,
1607
1609
  uri: "/api/community",
@@ -1629,21 +1631,21 @@ function j(e, t, s = void 0, n = void 0) {
1629
1631
  type: "json",
1630
1632
  onComplete(i, d, l) {
1631
1633
  const p = i;
1632
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1634
+ p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1633
1635
  },
1634
1636
  onFailure(i, d) {
1635
1637
  const l = i;
1636
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1638
+ l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1637
1639
  }
1638
1640
  });
1639
1641
  });
1640
1642
  }
1641
1643
  function ee(e) {
1642
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1644
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1643
1645
  return `<p>${e} </p>
1644
1646
  <br/>
1645
1647
  <hr/>
1646
- <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1648
+ <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1647
1649
  }
1648
1650
  const te = {
1649
1651
  title: "TEST DEV COMMUNITY IDEA",
@@ -1655,7 +1657,7 @@ const te = {
1655
1657
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1656
1658
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1657
1659
  };
1658
- function Be(e, t, s = void 0, n = void 0) {
1660
+ function Be(e, t, n = void 0, s = void 0) {
1659
1661
  const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1660
1662
  (i) => i.id === t.community_id
1661
1663
  ), r = e.swymCommunities.find(
@@ -1685,16 +1687,16 @@ function Be(e, t, s = void 0, n = void 0) {
1685
1687
  type: "json",
1686
1688
  onComplete(l, p, u) {
1687
1689
  const m = JSON.parse(l);
1688
- m.status = u.status, m.response = u.response, s && s(m);
1690
+ m.status = u.status, m.response = u.response, n && n(m);
1689
1691
  },
1690
1692
  onFailure(l, p, u) {
1691
1693
  const m = l;
1692
- m.status = p.status, m.response = p.errormsg, n && n(m);
1694
+ m.status = p.status, m.response = p.errormsg, s && s(m);
1693
1695
  }
1694
1696
  });
1695
1697
  });
1696
1698
  }
1697
- function Ye(e, t, s = void 0, n = void 0) {
1699
+ function Ye(e, t, n = void 0, s = void 0) {
1698
1700
  const o = `${e.space}/api/idea/delete`, c = {
1699
1701
  params: {
1700
1702
  community_id: t.community_id,
@@ -1712,16 +1714,16 @@ function Ye(e, t, s = void 0, n = void 0) {
1712
1714
  data: JSON.stringify(c),
1713
1715
  type: "json",
1714
1716
  onComplete(a, i, d) {
1715
- s && s(a);
1717
+ n && n(a);
1716
1718
  },
1717
1719
  onFailure(a, i, d) {
1718
1720
  const l = a;
1719
- l.status = i.status, l.response = i.errormsg, n && n(l);
1721
+ l.status = i.status, l.response = i.errormsg, s && s(l);
1720
1722
  }
1721
1723
  });
1722
1724
  });
1723
1725
  }
1724
- function He(e, t = "", s = void 0, n = void 0) {
1726
+ function He(e, t = "", n = void 0, s = void 0) {
1725
1727
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1726
1728
  t === "" && (t = o);
1727
1729
  const c = `${e.space}/api/idea/get`, r = {
@@ -1741,16 +1743,16 @@ function He(e, t = "", s = void 0, n = void 0) {
1741
1743
  type: "json",
1742
1744
  onComplete(i) {
1743
1745
  const d = i;
1744
- d.msg = d.result.message, s && s(d);
1746
+ d.msg = d.result.message, n && n(d);
1745
1747
  },
1746
1748
  onFailure(i) {
1747
1749
  const d = i;
1748
- d.status = headers.status, d.response = headers.errormsg, n && n(d);
1750
+ d.status = headers.status, d.response = headers.errormsg, s && s(d);
1749
1751
  }
1750
1752
  });
1751
1753
  });
1752
1754
  }
1753
- function ze(e, t = te, s = void 0, n = void 0) {
1755
+ function ze(e, t = te, n = void 0, s = void 0) {
1754
1756
  const o = {
1755
1757
  uri: "/api/idea/list",
1756
1758
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
@@ -1764,11 +1766,11 @@ function ze(e, t = te, s = void 0, n = void 0) {
1764
1766
  },
1765
1767
  onComplete(a) {
1766
1768
  const i = JSON.parse(a);
1767
- s && s(i);
1769
+ n && n(i);
1768
1770
  },
1769
1771
  onFailure(a, i) {
1770
1772
  const d = a;
1771
- d.status = i.status, d.response = i.errormsg, n && n(d);
1773
+ d.status = i.status, d.response = i.errormsg, s && s(d);
1772
1774
  }
1773
1775
  });
1774
1776
  });
@@ -1848,10 +1850,10 @@ function ne(e) {
1848
1850
  <p>
1849
1851
  </p>` : e;
1850
1852
  }
1851
- function qe(e, t = void 0, s = void 0) {
1852
- const n = e.space + "/api/user/getcurrent/";
1853
+ function qe(e, t = void 0, n = void 0) {
1854
+ const s = e.space + "/api/user/getcurrent/";
1853
1855
  w(e, (o) => {
1854
- f(n, {
1856
+ f(s, {
1855
1857
  method: "GET",
1856
1858
  headers: {
1857
1859
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
@@ -1862,12 +1864,12 @@ function qe(e, t = void 0, s = void 0) {
1862
1864
  },
1863
1865
  onFailure(c, r, a) {
1864
1866
  const i = { erreur: JSON.parse(c), headers: r, xhr: a };
1865
- s && s(i);
1867
+ n && n(i);
1866
1868
  }
1867
1869
  });
1868
1870
  });
1869
1871
  }
1870
- function Qe(e, t, s = void 0, n = void 0) {
1872
+ function Qe(e, t, n = void 0, s = void 0) {
1871
1873
  const o = e.space + "/api/user/find/login/" + t;
1872
1874
  w(
1873
1875
  e,
@@ -1877,14 +1879,14 @@ function Qe(e, t, s = void 0, n = void 0) {
1877
1879
  headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1878
1880
  onComplete(r, a, i) {
1879
1881
  const d = JSON.parse(r);
1880
- s && s(d);
1882
+ n && n(d);
1881
1883
  },
1882
1884
  onFailure(r) {
1883
- n && n(r);
1885
+ s && s(r);
1884
1886
  }
1885
1887
  });
1886
1888
  },
1887
- n
1889
+ s
1888
1890
  );
1889
1891
  }
1890
1892
  function Ze(e) {
@@ -1892,10 +1894,10 @@ function Ze(e) {
1892
1894
  return console.log(t), t;
1893
1895
  }
1894
1896
  export {
1895
- R as UUID,
1897
+ I as UUID,
1896
1898
  ke as _3DSpace_Create_Doc,
1897
1899
  C as _3DSpace_csrf,
1898
- I as _3DSpace_download_doc,
1900
+ R as _3DSpace_download_doc,
1899
1901
  X as _3DSpace_download_multidoc,
1900
1902
  K as _3DSpace_file_update,
1901
1903
  W as _3DSpace_file_update_csr,
@@ -1944,11 +1946,11 @@ export {
1944
1946
  J as getCSRFToken,
1945
1947
  ie as getCommunes,
1946
1948
  ye as getComplementUG,
1947
- Re as getDataFrom3DSpace,
1949
+ Ie as getDataFrom3DSpace,
1948
1950
  ce as getDataFromGouvFr,
1949
1951
  xe as getDatasByTenant,
1950
1952
  Me as getDatasFrom3DSpace,
1951
- Ie as getDownloadDocument,
1953
+ Re as getDownloadDocument,
1952
1954
  Je as getInfoDocTags,
1953
1955
  we as getUserGroupsList,
1954
1956
  E as getUsersGroupRules,