@beam3_dev/api_module 0.0.290 → 0.0.292

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,6 +1,6 @@
1
1
  import { v4 as V } from "uuid";
2
2
  import { DateTime as O } from "luxon";
3
- import { requirejs as $, widget as A } from "@widget-lab/3ddashboard-utils";
3
+ import { requirejs as $, widget as L } from "@widget-lab/3ddashboard-utils";
4
4
  function Y() {
5
5
  return V();
6
6
  }
@@ -34,10 +34,10 @@ const H = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function Ne(e, t = void 0, n = void 0) {
38
- const s = parseInt(e);
37
+ async function Ne(e, t = void 0, s = void 0) {
38
+ const n = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function Ne(e, t = void 0, n = void 0) {
47
47
  ).then((i) => i.json()).then((i) => {
48
48
  t && t(i);
49
49
  }).catch((i) => {
50
- n && n(i), console.error("Erreur : " + i);
50
+ s && s(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function xe(e, t = void 0, n = void 0) {
53
+ async function xe(e, t = void 0, s = 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 xe(e, t = void 0, n = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((s) => s.json()).then((s) => {
63
- t && t(s);
64
- }).catch((s) => {
65
- n && n(s), console.error("Erreur : " + s);
62
+ ).then((n) => n.json()).then((n) => {
63
+ t && t(n);
64
+ }).catch((n) => {
65
+ s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
68
  async function Fe(e, t = H) {
69
- let n = O.now().year;
70
- const s = e, i = [], r = (o) => {
69
+ let s = O.now().year;
70
+ const n = e, i = [], r = (o) => {
71
71
  for (let c in o)
72
72
  i.push({ date: c, comment: o[c] });
73
73
  };
74
- for (let o = n; o <= n + 1; o++)
74
+ for (let o = s; o <= s + 1; o++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
77
77
  {
@@ -84,9 +84,9 @@ async function Fe(e, t = H) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const o = s.length === 0 ? {
87
+ const o = n.length === 0 ? {
88
88
  events: []
89
- } : s;
89
+ } : n;
90
90
  for (let c of i)
91
91
  o.events.findIndex(
92
92
  (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
@@ -100,26 +100,26 @@ async function Fe(e, t = H) {
100
100
  return o;
101
101
  })();
102
102
  }
103
- function z(e, t, n) {
104
- const { credentials: s, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
103
+ function z(e, t, s) {
104
+ const { credentials: n, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
107
107
  o.push(d);
108
108
  }
109
109
  Q(
110
- { credentials: s, chunks: o, initLoop: 0, fn: a },
110
+ { credentials: n, chunks: o, initLoop: 0, fn: a },
111
111
  (c) => {
112
112
  t && t(c);
113
113
  },
114
114
  (c) => {
115
- n && n(c);
115
+ s && s(c);
116
116
  }
117
117
  );
118
118
  }
119
- function Q(e, t, n) {
120
- const { credentials: s, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
119
+ function Q(e, t, s) {
120
+ const { credentials: n, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
121
121
  a(
122
- s,
122
+ n,
123
123
  i[c],
124
124
  () => {
125
125
  c++, c < i.length && o(c);
@@ -128,54 +128,54 @@ function Q(e, t, n) {
128
128
  t && t(d);
129
129
  },
130
130
  (d) => {
131
- n && n(d);
131
+ s && s(d);
132
132
  }
133
133
  );
134
134
  };
135
135
  o(r);
136
136
  }
137
- async function Ie(e, t, n = !0) {
138
- const s = e.events.findIndex((i) => i.uuid === t.uuid);
139
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
137
+ async function Ie(e, t, s = !0) {
138
+ const n = e.events.findIndex((i) => i.uuid === t.uuid);
139
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
140
140
  }
141
141
  function m(e, t) {
142
- $(["DS/WAFData/WAFData"], (n) => {
143
- n.authenticatedRequest(e, t);
142
+ $(["DS/WAFData/WAFData"], (s) => {
143
+ s.authenticatedRequest(e, t);
144
144
  });
145
145
  }
146
- function Ue(e, t, n) {
147
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
- s.draggable(e, {
146
+ function Ue(e, t, s) {
147
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
148
+ n.draggable(e, {
149
149
  data: t,
150
- start: n
150
+ start: s
151
151
  });
152
152
  });
153
153
  }
154
154
  function Re(e, t = void 0) {
155
- $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
156
- let s;
157
- s === void 0 && (s = n.createProxy({
158
- widgetId: A.id,
155
+ $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
156
+ let n;
157
+ n === void 0 && (n = s.createProxy({
158
+ widgetId: L.id,
159
159
  filteringMode: "WithFilteringServices"
160
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
160
+ }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
161
161
  });
162
162
  }
163
163
  function je(e, t) {
164
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
165
- n.droppable(e, {
164
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
165
+ s.droppable(e, {
166
166
  drop: t
167
167
  });
168
168
  });
169
169
  }
170
- async function ke(e, t = void 0, n = void 0) {
170
+ async function ke(e, t = void 0, s = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
- (s) => {
174
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
- s.getPlatformServices({
173
+ (n) => {
174
+ (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
+ n.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: t,
178
- onFailure: n
178
+ onFailure: s
179
179
  })
180
180
  );
181
181
  }
@@ -184,55 +184,53 @@ async function ke(e, t = void 0, n = void 0) {
184
184
  function Z() {
185
185
  let e = {};
186
186
  return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
187
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
- tenant: n,
192
- user: s,
191
+ tenant: s,
192
+ user: n,
193
193
  appsConfiguration: i,
194
194
  appConf: r
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function ve(e, t = void 0, n = void 0) {
198
+ function ve(e, t = void 0, s = void 0) {
199
199
  if (e.tenant) {
200
- const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
- m(s, {
200
+ const n = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
+ m(n, {
202
202
  onComplete(i) {
203
203
  const r = typeof i == "string" ? JSON.parse(i) : i;
204
- r && "fields" in r ? t && t(r.fields) : n && n("_getMe return not find properties fields");
204
+ r && "fields" in r ? t && t(r.fields) : s && s("_getMe return not find properties fields");
205
205
  },
206
206
  onFailure(i) {
207
- n && n("_getMe return error", i);
207
+ s && s("_getMe return error", i);
208
208
  }
209
209
  });
210
210
  }
211
211
  }
212
- function P(e, t = void 0, n = void 0) {
213
- if (e.tenant) {
214
- const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
215
- m(s, {
212
+ function M(e, t = void 0, s = void 0) {
213
+ if (console.log("_getServiceUrl"), e.tenant) {
214
+ const n = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
215
+ m(n, {
216
216
  onComplete(i) {
217
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
218
218
  if (r && "platforms" in r) {
219
- const a = r.platforms.find(
220
- (o) => o.id === e.tenant.toUpperCase()
221
- );
222
- t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
219
+ const a = r.platforms.find((o) => o.id === e.tenant.toUpperCase());
220
+ t && a ? t(a) : s && s("_getServiceUrl return listServiceUrl = undefined");
223
221
  } else
224
- n && n("_getServiceUrl return oResponse = undefined");
222
+ s && s("_getServiceUrl return oResponse = undefined");
225
223
  },
226
224
  onFailure(i) {
227
- n && n(i);
225
+ s && s(i);
228
226
  }
229
227
  });
230
228
  }
231
229
  }
232
- function De(e, t = void 0, n = void 0) {
230
+ function Ae(e, t = void 0, s = void 0) {
233
231
  if (e.tenant) {
234
- const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
235
- m(s, {
232
+ const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
+ m(n, {
236
234
  onComplete(i) {
237
235
  const r = JSON.parse(i);
238
236
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
@@ -241,18 +239,18 @@ function De(e, t = void 0, n = void 0) {
241
239
  }
242
240
  },
243
241
  onFailure(i) {
244
- n && n(i);
242
+ s && s(i);
245
243
  }
246
244
  });
247
245
  }
248
246
  }
249
- function Ae(e, t, n) {
250
- const s = {
247
+ function De(e, t, s) {
248
+ const n = {
251
249
  base: `${e.space}`,
252
250
  uri: "/resources/AppsMngt/api/custom/applications",
253
251
  option: `?filter=${e.tenant}`
254
252
  // facultatif
255
- }, i = `${s.base}${s.uri}${s.option}`;
253
+ }, i = `${n.base}${n.uri}${n.option}`;
256
254
  m(i, {
257
255
  method: "GET",
258
256
  headers: {
@@ -268,33 +266,33 @@ function Ae(e, t, n) {
268
266
  },
269
267
  onFailure(r, a) {
270
268
  const o = r;
271
- o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
269
+ o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
272
270
  }
273
271
  });
274
272
  }
275
- function Pe(e, t = void 0, n = void 0) {
276
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
277
- m(s, {
273
+ function Pe(e, t = void 0, s = void 0) {
274
+ let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
275
+ m(n, {
278
276
  onComplete(i, r, a) {
279
277
  const o = JSON.parse(i);
280
278
  console.log("_AppMngt_get_users => ", o), t && t(o);
281
279
  },
282
280
  onFailure(i, r) {
283
281
  const a = i;
284
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
282
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
285
283
  }
286
284
  });
287
285
  }
288
- function Le(e, t, n = void 0, s = void 0) {
286
+ function Le(e, t, s = void 0, n = void 0) {
289
287
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
290
288
  m(i, {
291
289
  onComplete(r, a, o) {
292
290
  const c = JSON.parse(r);
293
- n && n(c);
291
+ s && s(c);
294
292
  },
295
293
  onFailure(r, a) {
296
294
  const o = r;
297
- o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
295
+ o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
298
296
  }
299
297
  });
300
298
  }
@@ -302,7 +300,7 @@ const j = {
302
300
  "Content-Type": "application/json",
303
301
  Accept: "application/json,text/javascript,*/*"
304
302
  };
305
- function Me(e, t, n = void 0, s = void 0) {
303
+ function Me(e, t, s = void 0, n = void 0) {
306
304
  const { space: i, currentUser: r } = e, o = `${i}${{
307
305
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
308
306
  }.URIUGr}`, c = {
@@ -322,16 +320,16 @@ function Me(e, t, n = void 0, s = void 0) {
322
320
  headers: j,
323
321
  data: JSON.stringify(c),
324
322
  onComplete(d) {
325
- n && n(JSON.parse(d));
323
+ s && s(JSON.parse(d));
326
324
  },
327
325
  onFailure(d, u) {
328
326
  console.log(d);
329
327
  const p = d;
330
- p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
328
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
331
329
  }
332
330
  });
333
331
  }
334
- function Je(e, t, n = void 0, s = void 0) {
332
+ function Je(e, t, s = void 0, n = void 0) {
335
333
  const { space: i, tenant: r } = e, a = i, o = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${a}${o}${c}`;
336
334
  m(d, {
337
335
  opts: {
@@ -342,16 +340,16 @@ function Je(e, t, n = void 0, s = void 0) {
342
340
  }
343
341
  },
344
342
  onComplete(f) {
345
- n && n(JSON.parse(f));
343
+ s && s(JSON.parse(f));
346
344
  },
347
345
  onFailure(f, l) {
348
346
  const h = f;
349
- h.msg = l.errormsg, h.errCode = l.errorcode, s && s(h);
347
+ h.msg = l.errormsg, h.errCode = l.errorcode, n && n(h);
350
348
  }
351
349
  });
352
350
  }
353
- function ee(e, t = void 0, n = void 0) {
354
- const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
351
+ function ee(e, t = void 0, s = void 0) {
352
+ const { space: n, tenant: i } = e, r = n, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
355
353
  method: "GET",
356
354
  Accept: "application/json,*/*,test/javascript"
357
355
  }, d = `${r}${a}${o}`;
@@ -362,12 +360,12 @@ function ee(e, t = void 0, n = void 0) {
362
360
  },
363
361
  onFailure(u, p) {
364
362
  const f = u;
365
- f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
363
+ f.msg = p.errormsg, f.errCode = p.errorcode, s && s(f);
366
364
  }
367
365
  });
368
366
  }
369
- function Ge(e, t = void 0, n = void 0) {
370
- const { space: s, currentUser: i } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
367
+ function Ge(e, t = void 0, s = void 0) {
368
+ const { space: n, currentUser: i } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
371
369
  "Content-Type": "application/json",
372
370
  Accept: "application/json,text/javascript,*/*"
373
371
  } };
@@ -384,13 +382,13 @@ function Ge(e, t = void 0, n = void 0) {
384
382
  f.rules = _, t && t(f);
385
383
  },
386
384
  (_) => {
387
- n && n(_);
385
+ s && s(_);
388
386
  }
389
387
  );
390
388
  }
391
389
  },
392
390
  onFailure(u) {
393
- n && n(u);
391
+ s && s(u);
394
392
  }
395
393
  });
396
394
  } catch (u) {
@@ -398,12 +396,12 @@ function Ge(e, t = void 0, n = void 0) {
398
396
  }
399
397
  }
400
398
  function Ke(e, t) {
401
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
399
+ const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
402
400
  m(i, {
403
401
  method: "DELETE"
404
402
  });
405
403
  }
406
- function Be(e, t, n, s = void 0, i = void 0) {
404
+ function Be(e, t, s, n = void 0, i = void 0) {
407
405
  const { space: r, tenant: a } = e, o = {
408
406
  URITI: "/3drdfpersist/resources/v1/template-instances",
409
407
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -412,36 +410,36 @@ function Be(e, t, n, s = void 0, i = void 0) {
412
410
  nexURImem: "/members",
413
411
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
414
412
  OPTsTenant: `tenant=dstenant:${a}`
415
- }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
413
+ }, c = s, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
416
414
  m(d, {
417
415
  headers: j,
418
416
  method: "PATCH",
419
417
  data: u,
420
418
  type: "json",
421
419
  onComplete(p) {
422
- s && s(p);
420
+ n && n(p);
423
421
  },
424
422
  onFailure(p) {
425
423
  i && i(p);
426
424
  }
427
425
  });
428
426
  }
429
- function qe(e, t, n, s = void 0, i = void 0) {
427
+ function qe(e, t, s, n = void 0, i = void 0) {
430
428
  const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
431
429
  m(o, {
432
430
  method: "PATCH",
433
431
  headers: j,
434
- data: JSON.stringify(n),
432
+ data: JSON.stringify(s),
435
433
  type: "json",
436
434
  onComplete(d) {
437
- s && s(d);
435
+ n && n(d);
438
436
  },
439
437
  onFailure(d) {
440
438
  i && i(d);
441
439
  }
442
440
  });
443
441
  }
444
- function Ee(e, t, n = void 0, s = void 0) {
442
+ function Ee(e, t, s = void 0, n = void 0) {
445
443
  const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
446
444
  m(a, {
447
445
  opts: {
@@ -452,22 +450,22 @@ function Ee(e, t, n = void 0, s = void 0) {
452
450
  }
453
451
  },
454
452
  onComplete(d) {
455
- n && n(JSON.parse(d));
453
+ s && s(JSON.parse(d));
456
454
  },
457
455
  onFailure(d) {
458
- s && s(d);
456
+ n && n(d);
459
457
  }
460
458
  });
461
459
  }
462
- async function te(e, t, n) {
460
+ async function te(e, t, s) {
463
461
  if (e.space) {
464
- const s = `${e.space}/resources/v1/application/CSRF`;
465
- m(s, {
462
+ const n = `${e.space}/resources/v1/application/CSRF`;
463
+ m(n, {
466
464
  onComplete(i) {
467
465
  i = JSON.parse(i), t && t(i.csrf);
468
466
  },
469
467
  onFailure(i, r, a) {
470
- n && n({ error: i, headers: r, xhr: a });
468
+ s && s({ error: i, headers: r, xhr: a });
471
469
  }
472
470
  });
473
471
  }
@@ -476,19 +474,19 @@ var x = {};
476
474
  function ne(e, t) {
477
475
  return Object.prototype.hasOwnProperty.call(e, t);
478
476
  }
479
- var se = function(e, t, n, s) {
480
- t = t || "&", n = n || "=";
477
+ var se = function(e, t, s, n) {
478
+ t = t || "&", s = s || "=";
481
479
  var i = {};
482
480
  if (typeof e != "string" || e.length === 0)
483
481
  return i;
484
482
  var r = /\+/g;
485
483
  e = e.split(t);
486
484
  var a = 1e3;
487
- s && typeof s.maxKeys == "number" && (a = s.maxKeys);
485
+ n && typeof n.maxKeys == "number" && (a = n.maxKeys);
488
486
  var o = e.length;
489
487
  a > 0 && o > a && (o = a);
490
488
  for (var c = 0; c < o; ++c) {
491
- var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, h;
489
+ var d = e[c].replace(r, "%20"), u = d.indexOf(s), p, f, l, h;
492
490
  u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), h = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(h) : i[l] = [i[l], h] : i[l] = h;
493
491
  }
494
492
  return i;
@@ -503,17 +501,17 @@ var se = function(e, t, n, s) {
503
501
  default:
504
502
  return "";
505
503
  }
506
- }, ie = function(e, t, n, s) {
507
- return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
508
- var r = encodeURIComponent(N(i)) + n;
504
+ }, ie = function(e, t, s, n) {
505
+ return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
506
+ var r = encodeURIComponent(N(i)) + s;
509
507
  return Array.isArray(e[i]) ? e[i].map(function(a) {
510
508
  return r + encodeURIComponent(N(a));
511
509
  }).join(t) : r + encodeURIComponent(N(e[i]));
512
- }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
510
+ }).filter(Boolean).join(t) : n ? encodeURIComponent(N(n)) + s + encodeURIComponent(N(e)) : "";
513
511
  };
514
512
  x.decode = x.parse = se;
515
513
  x.encode = x.stringify = ie;
516
- async function L(e, t = void 0, n = void 0, s = void 0) {
514
+ async function J(e, t = void 0, s = void 0, n = void 0) {
517
515
  const i = e.space;
518
516
  if (t === void 0) {
519
517
  console.log("Le paramètre docid est obligatoire");
@@ -523,14 +521,14 @@ async function L(e, t = void 0, n = void 0, s = void 0) {
523
521
  m(r, {
524
522
  onComplete(a, o, c) {
525
523
  const d = JSON.parse(a);
526
- n && n(d);
524
+ s && s(d);
527
525
  },
528
526
  onFailure(a) {
529
- s && s(a);
527
+ n && n(a);
530
528
  }
531
529
  });
532
530
  }
533
- async function Xe(e, t = void 0, n = void 0, s = void 0) {
531
+ async function Xe(e, t = void 0, s = void 0, n = void 0) {
534
532
  const i = e.space;
535
533
  if (t === void 0) {
536
534
  console.log("Le paramètre docids est obligatoire");
@@ -547,46 +545,46 @@ async function Xe(e, t = void 0, n = void 0, s = void 0) {
547
545
  data: a,
548
546
  onComplete(o, c, d) {
549
547
  const u = JSON.parse(o);
550
- n && n(u);
548
+ s && s(u);
551
549
  },
552
550
  onFailure(o) {
553
- s && s(o);
551
+ n && n(o);
554
552
  }
555
553
  });
556
554
  }
557
- function F(e, t = void 0, n = void 0) {
555
+ function I(e, t = void 0, s = void 0) {
558
556
  if (e.objID && e.objID !== "") {
559
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
560
- m(s, {
557
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
558
+ m(n, {
561
559
  onComplete(i, r, a) {
562
560
  const o = JSON.parse(i);
563
561
  e.success = !0, e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
564
562
  },
565
563
  onFailure(i) {
566
- n && n(i);
564
+ s && s(i);
567
565
  }
568
566
  });
569
567
  } else
570
568
  b(
571
569
  e,
572
- (s) => {
573
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
570
+ (n) => {
571
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
574
572
  },
575
- (s) => {
576
- n && n(s);
573
+ (n) => {
574
+ s && s(n);
577
575
  }
578
576
  );
579
577
  }
580
- function b(e, t = void 0, n = void 0) {
578
+ function b(e, t = void 0, s = void 0) {
581
579
  if (e.space) {
582
- const s = e.space + "/resources/v1/application/CSRF";
583
- m(s, {
580
+ const n = e.space + "/resources/v1/application/CSRF";
581
+ m(n, {
584
582
  onComplete(i, r, a) {
585
583
  const o = JSON.parse(i);
586
584
  t && t(o.csrf.value);
587
585
  },
588
586
  onFailure(i, r, a) {
589
- n && n({
587
+ s && s({
590
588
  response: i,
591
589
  headers: r,
592
590
  xhr: a
@@ -594,14 +592,14 @@ function b(e, t = void 0, n = void 0) {
594
592
  }
595
593
  });
596
594
  } else
597
- n && n("ERROR : url du 3DSpace non défini.");
595
+ s && s("ERROR : url du 3DSpace non défini.");
598
596
  }
599
- function k(e, t = void 0, n = void 0) {
600
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
601
- F(
597
+ function k(e, t = void 0, s = void 0) {
598
+ let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
599
+ I(
602
600
  e,
603
601
  (i) => {
604
- m(s, {
602
+ m(n, {
605
603
  method: "PUT",
606
604
  headers: {
607
605
  ENO_CSRF_TOKEN: e.token
@@ -611,28 +609,28 @@ function k(e, t = void 0, n = void 0) {
611
609
  t && t(c, a);
612
610
  },
613
611
  onFailure(r, a) {
614
- console.warn("☠️ error => ", r, a), n && n(r, a);
612
+ console.warn("☠️ error => ", r, a), s && s(r, a);
615
613
  }
616
614
  });
617
615
  },
618
616
  (i) => {
619
- console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
617
+ console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
620
618
  }
621
619
  );
622
620
  }
623
- function We(e, t, n = void 0, s = void 0, i = void 0) {
621
+ function We(e, t, s = void 0, n = void 0, i = void 0) {
624
622
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
625
- n || (n = e.token), m(r, {
623
+ s || (s = e.token), m(r, {
626
624
  method: "PUT",
627
625
  headers: {
628
- ENO_CSRF_TOKEN: n
626
+ ENO_CSRF_TOKEN: s
629
627
  },
630
628
  onComplete(a) {
631
629
  let o = JSON.parse(a);
632
630
  if (console.log("☠️ info => ", o), o.success === !0)
633
631
  try {
634
632
  const c = o.data[0].dataelements.ticketURL;
635
- s && s(c);
633
+ n && n(c);
636
634
  } catch (c) {
637
635
  i && i(c);
638
636
  }
@@ -642,18 +640,18 @@ function We(e, t, n = void 0, s = void 0, i = void 0) {
642
640
  }
643
641
  });
644
642
  }
645
- function M(e, t, n, s, i, r = void 0, a = void 0) {
643
+ function G(e, t, s, n, i, r = void 0, a = void 0) {
646
644
  const o = () => ae(
647
645
  e,
648
646
  t,
649
- n,
650
647
  s,
648
+ n,
651
649
  i,
652
650
  e.token,
653
651
  r,
654
652
  a
655
653
  );
656
- e.token ? o() : F(
654
+ e.token ? o() : I(
657
655
  e,
658
656
  t,
659
657
  (c) => {
@@ -661,7 +659,7 @@ function M(e, t, n, s, i, r = void 0, a = void 0) {
661
659
  }
662
660
  );
663
661
  }
664
- function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
662
+ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
665
663
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
666
664
  m(c, {
667
665
  method: "PUT",
@@ -671,7 +669,7 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
671
669
  onComplete(d, u, p) {
672
670
  const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, h = new FormData();
673
671
  let g;
674
- s instanceof Blob ? g = s : g = new Blob([s], {
672
+ n instanceof Blob ? g = n : g = new Blob([n], {
675
673
  type: "text/plain"
676
674
  }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
677
675
  const y = {};
@@ -719,9 +717,13 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
719
717
  }
720
718
  });
721
719
  }
722
- async function Ve(e, t, n = void 0, s = void 0) {
720
+ async function Ve(e, t, s = void 0, n = void 0) {
723
721
  e.space, e.token, e.ctx;
724
722
  const i = e?.description, r = e?.title;
723
+ if (!t) {
724
+ console.warn("Error: docId undefined"), n && n("Error: docId undefined");
725
+ return;
726
+ }
725
727
  let a = `${e.space}/resources/v1/modeler/documents/${t}`;
726
728
  const o = JSON.stringify({
727
729
  data: [
@@ -741,20 +743,20 @@ async function Ve(e, t, n = void 0, s = void 0) {
741
743
  data: o,
742
744
  type: "json",
743
745
  onComplete(c) {
744
- n && n(c);
746
+ s && s(c);
745
747
  },
746
748
  onFailure(c) {
747
- s && s(c);
749
+ n && n(c);
748
750
  }
749
751
  });
750
752
  }
751
- async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
753
+ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0) {
752
754
  let { tenant: a, cs_name: o } = e;
753
755
  if (!a && !o) {
754
756
  i && i("Credentials undefined");
755
757
  return;
756
758
  }
757
- if (!t && !n) {
759
+ if (!t && !s) {
758
760
  i && i("Définition du fichier undefined");
759
761
  return;
760
762
  }
@@ -780,19 +782,19 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
780
782
  try {
781
783
  if (l = JSON.parse(l), l?.ticket) {
782
784
  const { ticket: y, actionurl: _, jobticket: S } = l;
783
- J(
785
+ K(
784
786
  { dataelements: { ticket: y, ticketURL: _ } },
785
- n,
787
+ s,
786
788
  t,
787
789
  (w) => {
788
- const U = new DOMParser().parseFromString(
790
+ const R = new DOMParser().parseFromString(
789
791
  w,
790
792
  "text/html"
791
- ).body.firstChild.querySelector("input").getAttributeNode("value").value, E = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
792
- U
793
+ ).body.firstChild.querySelector("input").getAttributeNode("value").value, v = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
794
+ R
793
795
  )}`;
794
- let X = /(?:\.([^.]+))?$/.exec(t)[1];
795
- const W = JSON.stringify({
796
+ let W = /(?:\.([^.]+))?$/.exec(t)[1];
797
+ const A = JSON.stringify({
796
798
  actions: [],
797
799
  businessobj: {
798
800
  description: e?.description,
@@ -803,27 +805,28 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
803
805
  modified: "",
804
806
  owner: {},
805
807
  thumbnail: "",
806
- title: X ? t.split(".").slice(0, -1).join(".") : t,
808
+ title: W ? t.split(".").slice(0, -1).join(".") : t,
807
809
  type: {}
808
810
  },
809
811
  collabspace: o
810
812
  });
811
- m(E, {
813
+ m(v, {
812
814
  method: "POST",
813
815
  headers: {
814
816
  Accept: "application/json",
815
817
  "Content-Type": "application/json;charset=UTF-8",
816
818
  "X-DS-CSRFTOKEN": p
817
819
  },
818
- data: W,
820
+ data: A,
819
821
  type: "json",
820
- onComplete(R, Ce, Te) {
821
- s && s(R);
822
+ onComplete(F, Ce, Te) {
823
+ n && n(F);
822
824
  },
823
- onFailure(R) {
825
+ onFailure(F) {
824
826
  console.warn(
825
- "_3DSpace_Upload_Doc | pushFileInFcs | onFailure"
826
- ), i && i(R);
827
+ "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
828
+ { url: v, bodyRequest: A, err: F }
829
+ ), i && i(F);
827
830
  }
828
831
  });
829
832
  },
@@ -853,20 +856,20 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
853
856
  }
854
857
  );
855
858
  }
856
- async function He(e, t, n, s = void 0, i = void 0) {
857
- e.space, e.token, e.ctx, L(
859
+ async function He(e, t, s, n = void 0, i = void 0) {
860
+ e.space, e.token, e.ctx, J(
858
861
  e,
859
862
  t,
860
863
  (r) => {
861
864
  const a = r.data[0].relateddata.files[0].id, o = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
862
- M(
865
+ G(
863
866
  e,
864
867
  t,
865
868
  a,
866
- n,
869
+ s,
867
870
  o,
868
871
  (c) => {
869
- s && s(c);
872
+ n && n(c);
870
873
  },
871
874
  (c) => {
872
875
  i && i(c);
@@ -878,21 +881,21 @@ async function He(e, t, n, s = void 0, i = void 0) {
878
881
  }
879
882
  );
880
883
  }
881
- async function ze(e, t, n, s, i = void 0, r = void 0) {
884
+ async function ze(e, t, s, n, i = void 0, r = void 0) {
882
885
  oe(
883
886
  e,
884
887
  (a) => {
885
888
  a?.items >= 1 && a.data.forEach((o) => {
886
- J(
889
+ K(
887
890
  o,
888
891
  t,
889
- n,
892
+ s,
890
893
  (c) => {
891
894
  re(
892
895
  e,
893
896
  c,
894
- n,
895
897
  s,
898
+ n,
896
899
  (d) => {
897
900
  d?.data.length ? i && i(d) : r && r({
898
901
  success: !1,
@@ -909,10 +912,10 @@ async function ze(e, t, n, s, i = void 0, r = void 0) {
909
912
  (a) => console.warn(a)
910
913
  );
911
914
  }
912
- function oe(e, t = void 0, n = void 0) {
915
+ function oe(e, t = void 0, s = void 0) {
913
916
  if (e?.space && e.token && e.ctx) {
914
- let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
915
- m(s, {
917
+ let n = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
918
+ m(n, {
916
919
  method: "PUT",
917
920
  headers: {
918
921
  ENO_CSRF_TOKEN: e.token,
@@ -928,17 +931,17 @@ function oe(e, t = void 0, n = void 0) {
928
931
  t && t(i);
929
932
  },
930
933
  onFailure(i) {
931
- n && n(i);
934
+ s && s(i);
932
935
  }
933
936
  });
934
937
  } else
935
938
  console.log("Error de credentials", e);
936
939
  }
937
- function J(e, t, n, s = void 0, i = void 0, r = void 0) {
940
+ function K(e, t, s, n = void 0, i = void 0, r = void 0) {
938
941
  let a = new FormData();
939
942
  t instanceof Blob || (t = new Blob([t], {
940
943
  type: "text/plain"
941
- })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, n);
944
+ })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, s);
942
945
  let o = e.dataelements.ticketURL;
943
946
  const c = new XMLHttpRequest();
944
947
  c.open("POST", o, !0), c.upload.onprogress = function(d) {
@@ -947,13 +950,13 @@ function J(e, t, n, s = void 0, i = void 0, r = void 0) {
947
950
  r && r(u);
948
951
  }
949
952
  }, c.onload = function() {
950
- c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
953
+ c.status === 200 ? n && n(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
951
954
  }, c.onerror = function() {
952
955
  i && i(c.statusText);
953
956
  }, c.send(a);
954
957
  }
955
- function re(e, t, n, s = void 0, i = void 0, r = void 0) {
956
- console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
958
+ function re(e, t, s, n = void 0, i = void 0, r = void 0) {
959
+ console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: s });
957
960
  const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
958
961
  let o = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
959
962
  m(c, {
@@ -969,14 +972,14 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
969
972
  {
970
973
  type: "Document",
971
974
  dataelements: {
972
- title: a(n),
973
- description: s
975
+ title: a(s),
976
+ description: n
974
977
  },
975
978
  relateddata: {
976
979
  files: [
977
980
  {
978
981
  dataelements: {
979
- title: n,
982
+ title: s,
980
983
  receipt: `${t}
981
984
  `
982
985
  }
@@ -999,7 +1002,7 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
999
1002
  }
1000
1003
  });
1001
1004
  }
1002
- function I(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
1005
+ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1) {
1003
1006
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1004
1007
  m(o, {
1005
1008
  method: "GET",
@@ -1015,10 +1018,10 @@ function I(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1015
1018
  (y, _, S) => _ === S.findIndex(
1016
1019
  (w) => w.organization.pid === y.organization.pid && w.role.pid === y.role.pid
1017
1020
  )
1018
- ), n && (Array.isArray(n) ? n.forEach((y) => {
1021
+ ), s && (Array.isArray(s) ? s.forEach((y) => {
1019
1022
  l || g.forEach((_) => {
1020
- if (y === _.role.name && s === _.organization.title)
1021
- l = y, f = s;
1023
+ if (y === _.role.name && n === _.organization.title)
1024
+ l = y, f = n;
1022
1025
  else if (y === _.role.name) {
1023
1026
  let S = g.filter(
1024
1027
  (w) => w.role.name === y
@@ -1027,11 +1030,11 @@ function I(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1027
1030
  }
1028
1031
  });
1029
1032
  }) : g.forEach((y) => {
1030
- if (n === y.role.name && s === y.organization.title)
1031
- l = n, f = s;
1032
- else if (n === y.role.name) {
1033
+ if (s === y.role.name && n === y.organization.title)
1034
+ l = s, f = n;
1035
+ else if (s === y.role.name) {
1033
1036
  let _ = g.filter(
1034
- (S) => S.role.name === n
1037
+ (S) => S.role.name === s
1035
1038
  );
1036
1039
  _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
1037
1040
  }
@@ -1048,29 +1051,29 @@ function I(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1048
1051
  }
1049
1052
  });
1050
1053
  }
1051
- async function G(e, t = void 0, n = void 0) {
1054
+ async function B(e, t = void 0, s = void 0) {
1052
1055
  return (!e.objID || e.objID === "") && (console.warn(
1053
1056
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1054
- ), n && n(
1057
+ ), s && s(
1055
1058
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1056
1059
  )), (e.space === "" || !e.space) && (console.warn(
1057
1060
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
1058
- ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1061
+ ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1059
1062
  e,
1060
- (s) => {
1061
- e.token = s;
1063
+ (n) => {
1064
+ e.token = n;
1062
1065
  },
1063
- (s) => {
1064
- console.log("☠️ error => ", s);
1066
+ (n) => {
1067
+ console.log("☠️ error => ", n);
1065
1068
  }
1066
- ), new Promise((s, i) => {
1069
+ ), new Promise((n, i) => {
1067
1070
  k(
1068
1071
  e,
1069
1072
  (r) => {
1070
1073
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
1071
1074
  t && t(a);
1072
1075
  }).catch((a) => {
1073
- n && n(a);
1076
+ s && s(a);
1074
1077
  })) : m(r, {
1075
1078
  onComplete(a) {
1076
1079
  let o;
@@ -1079,10 +1082,10 @@ async function G(e, t = void 0, n = void 0) {
1079
1082
  } catch {
1080
1083
  o = a;
1081
1084
  }
1082
- t && typeof t == "function" && t(o), s(o);
1085
+ t && typeof t == "function" && t(o), n(o);
1083
1086
  },
1084
1087
  onFailure(a, o, c) {
1085
- n && (console.log("error http", a), n({
1088
+ s && (console.log("error http", a), s({
1086
1089
  msg: JSON.parse(a),
1087
1090
  headers: o,
1088
1091
  xhr: c
@@ -1095,26 +1098,26 @@ async function G(e, t = void 0, n = void 0) {
1095
1098
  });
1096
1099
  },
1097
1100
  (r) => {
1098
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1101
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1099
1102
  }
1100
1103
  );
1101
1104
  });
1102
1105
  }
1103
- async function ce(e, t, n = void 0, s = void 0) {
1106
+ async function ce(e, t, s = void 0, n = void 0) {
1104
1107
  typeof t < "u" && Array.isArray(t) && t?.length > 0 ? z({
1105
1108
  credentials: e,
1106
1109
  myArray: t,
1107
1110
  chunk: 80,
1108
1111
  fn_to_call: de
1109
1112
  }, (r) => {
1110
- n && n(r);
1113
+ s && s(r);
1111
1114
  }) : (console.warn(
1112
1115
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1113
- ), s && s(
1116
+ ), n && n(
1114
1117
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1115
1118
  ));
1116
1119
  }
1117
- function de(e, t, n = void 0, s = void 0, i = void 0) {
1120
+ function de(e, t, s = void 0, n = void 0, i = void 0) {
1118
1121
  const r = [];
1119
1122
  t.forEach((c) => {
1120
1123
  r.push({
@@ -1135,7 +1138,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1135
1138
  type: "json",
1136
1139
  onComplete(c) {
1137
1140
  const d = c.data;
1138
- c.success === !0 && (n && n(), d.forEach((u) => {
1141
+ c.success === !0 && (s && s(), d.forEach((u) => {
1139
1142
  try {
1140
1143
  const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
1141
1144
  m(f, {
@@ -1146,7 +1149,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1146
1149
  } catch {
1147
1150
  g = l.blob();
1148
1151
  }
1149
- s && s({
1152
+ n && n({
1150
1153
  objectId: u.id,
1151
1154
  headers: h,
1152
1155
  fileName: p,
@@ -1167,7 +1170,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1167
1170
  }
1168
1171
  });
1169
1172
  }
1170
- function Qe(e, t, n = void 0, s = void 0) {
1173
+ function Qe(e, t, s = void 0, n = void 0) {
1171
1174
  return new Promise((i) => {
1172
1175
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1173
1176
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -1188,17 +1191,17 @@ function Qe(e, t, n = void 0, s = void 0) {
1188
1191
  }),
1189
1192
  type: "json",
1190
1193
  onComplete(o) {
1191
- n && n(o);
1194
+ s && s(o);
1192
1195
  },
1193
1196
  onFailure(o) {
1194
- s && s(o);
1197
+ n && n(o);
1195
1198
  }
1196
1199
  };
1197
1200
  m(r, a);
1198
1201
  }
1199
1202
  });
1200
1203
  }
1201
- function Ze(e, t, n, s = void 0, i = void 0) {
1204
+ function Ze(e, t, s, n = void 0, i = void 0) {
1202
1205
  return new Promise((r) => {
1203
1206
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1204
1207
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1214,13 +1217,13 @@ function Ze(e, t, n, s = void 0, i = void 0) {
1214
1217
  data: [
1215
1218
  {
1216
1219
  id: t,
1217
- nextState: n
1220
+ nextState: s
1218
1221
  }
1219
1222
  ]
1220
1223
  }),
1221
1224
  type: "json",
1222
1225
  onComplete(c) {
1223
- s && s(c);
1226
+ n && n(c);
1224
1227
  },
1225
1228
  onFailure(c) {
1226
1229
  i && i(c);
@@ -1230,11 +1233,11 @@ function Ze(e, t, n, s = void 0, i = void 0) {
1230
1233
  }
1231
1234
  });
1232
1235
  }
1233
- function et(e, t, n = void 0, s = void 0) {
1236
+ function et(e, t, s = void 0, n = void 0) {
1234
1237
  return new Promise((i) => {
1235
1238
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1236
1239
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1237
- I(
1240
+ U(
1238
1241
  e.space,
1239
1242
  "ESPACE COMMUN",
1240
1243
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1261,21 +1264,21 @@ function et(e, t, n = void 0, s = void 0) {
1261
1264
  }),
1262
1265
  type: "json",
1263
1266
  onComplete(o) {
1264
- n && n(o);
1267
+ s && s(o);
1265
1268
  },
1266
1269
  onFailure(o) {
1267
- s && s(o);
1270
+ n && n(o);
1268
1271
  }
1269
1272
  };
1270
1273
  m(r, a);
1271
1274
  }
1272
1275
  });
1273
1276
  }
1274
- function tt(e, t, n = void 0, s = void 0) {
1277
+ function tt(e, t, s = void 0, n = void 0) {
1275
1278
  return new Promise((i) => {
1276
1279
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1277
1280
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1278
- I(
1281
+ U(
1279
1282
  e.space,
1280
1283
  "ESPACE COMMUN",
1281
1284
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1308,21 +1311,21 @@ function tt(e, t, n = void 0, s = void 0) {
1308
1311
  }),
1309
1312
  type: "json",
1310
1313
  onComplete(o) {
1311
- n && n(o);
1314
+ s && s(o);
1312
1315
  },
1313
1316
  onFailure(o) {
1314
- s && s(o);
1317
+ n && n(o);
1315
1318
  }
1316
1319
  };
1317
1320
  m(r, a);
1318
1321
  }
1319
1322
  });
1320
1323
  }
1321
- function nt(e, t, n, s = void 0, i = void 0) {
1324
+ function nt(e, t, s, n = void 0, i = void 0) {
1322
1325
  return new Promise((r) => {
1323
1326
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1324
1327
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1325
- I(
1328
+ U(
1326
1329
  e.space,
1327
1330
  "ESPACE COMMUN",
1328
1331
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1344,9 +1347,9 @@ function nt(e, t, n, s = void 0, i = void 0) {
1344
1347
  data: [
1345
1348
  {
1346
1349
  physicalid: t,
1347
- proposedRevision: n,
1350
+ proposedRevision: s,
1348
1351
  modifiedAttributes: {
1349
- revision: n
1352
+ revision: s
1350
1353
  }
1351
1354
  }
1352
1355
  ],
@@ -1355,7 +1358,7 @@ function nt(e, t, n, s = void 0, i = void 0) {
1355
1358
  }),
1356
1359
  type: "json",
1357
1360
  onComplete(c) {
1358
- s && s(c);
1361
+ n && n(c);
1359
1362
  },
1360
1363
  onFailure(c) {
1361
1364
  i && i(c);
@@ -1366,26 +1369,28 @@ function nt(e, t, n, s = void 0, i = void 0) {
1366
1369
  });
1367
1370
  }
1368
1371
  function ue(e) {
1369
- return new Promise((t, n) => {
1370
- const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1371
- m(s, {
1372
+ return new Promise((t, s) => {
1373
+ const n = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1374
+ m(n, {
1372
1375
  method: "GET",
1373
1376
  onComplete(r) {
1374
1377
  t(r);
1375
1378
  },
1376
1379
  onFailure(r) {
1377
- n(r);
1380
+ s(r);
1378
1381
  }
1379
1382
  });
1380
1383
  });
1381
1384
  }
1382
- function st(e, t, n = void 0, s = void 0) {
1385
+ function st(e, t, s = void 0, n = void 0) {
1383
1386
  return new Promise(async (i, r) => {
1384
1387
  const { tenant: a, ctx: o, space: c } = e;
1385
1388
  (!a || !o || !c) && r({ error: "Erreur de credentials", tenant: a, ctx: o, space: c });
1386
1389
  const d = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=1&withAttributes=1&withCopyFrom=1&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1387
1390
  let u;
1388
- await ue(e).then((f) => u = f?.SecurityContext);
1391
+ await ue(e).then(
1392
+ (f) => u = f?.SecurityContext
1393
+ );
1389
1394
  let p = {
1390
1395
  method: "POST",
1391
1396
  headers: {
@@ -1403,22 +1408,22 @@ function st(e, t, n = void 0, s = void 0) {
1403
1408
  }),
1404
1409
  type: "json",
1405
1410
  onComplete(f) {
1406
- n && n(f), i(f);
1411
+ s && s(f), i(f);
1407
1412
  },
1408
1413
  onFailure(f) {
1409
- s && s(f), r(f);
1414
+ n && n(f), r(f);
1410
1415
  }
1411
1416
  };
1412
1417
  m(d, p);
1413
1418
  });
1414
1419
  }
1415
- function it(e, t, n, s, i = void 0, r = void 0) {
1420
+ function it(e, t, s, n, i = void 0, r = void 0) {
1416
1421
  return new Promise((a) => {
1417
1422
  const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1418
1423
  let c = {
1419
1424
  attributes: {
1420
- title: n,
1421
- description: s,
1425
+ title: s,
1426
+ description: n,
1422
1427
  inheritedAccess: "no"
1423
1428
  }
1424
1429
  }, d = {
@@ -1445,7 +1450,7 @@ function it(e, t, n, s, i = void 0, r = void 0) {
1445
1450
  m(o, u);
1446
1451
  });
1447
1452
  }
1448
- function at(e, t, n, s, i = void 0, r = void 0) {
1453
+ function at(e, t, s, n, i = void 0, r = void 0) {
1449
1454
  return console.log("credentials", e), new Promise((a) => {
1450
1455
  `${e.space}`, JSON.stringify({
1451
1456
  csrf: {
@@ -1459,8 +1464,8 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1459
1464
  relId: t,
1460
1465
  id: t,
1461
1466
  dataelements: {
1462
- personList: n,
1463
- eventsList: s
1467
+ personList: s,
1468
+ eventsList: n
1464
1469
  },
1465
1470
  tenant: e.tenant
1466
1471
  }
@@ -1469,12 +1474,12 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1469
1474
  });
1470
1475
  }
1471
1476
  //!SECTION
1472
- function ot(e, t = void 0, n = void 0) {
1473
- const s = {
1477
+ function ot(e, t = void 0, s = void 0) {
1478
+ const n = {
1474
1479
  base: `${e.space}`,
1475
1480
  uri: "/resources/bps/cspaces",
1476
1481
  optTenant: `tenant=${e.tenant}`
1477
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1482
+ }, i = `${n.base}${n.uri}?${n.optTenant}`;
1478
1483
  m(i, {
1479
1484
  method: "GET",
1480
1485
  headers: {
@@ -1486,11 +1491,11 @@ function ot(e, t = void 0, n = void 0) {
1486
1491
  t && t(o, a);
1487
1492
  },
1488
1493
  onFailure(r, a, o) {
1489
- n && n({ response: r, headers: a, xhr: o });
1494
+ s && s({ response: r, headers: a, xhr: o });
1490
1495
  }
1491
1496
  });
1492
1497
  }
1493
- function rt(e, t, n, s) {
1498
+ function rt(e, t, s, n) {
1494
1499
  k(
1495
1500
  e.space,
1496
1501
  t,
@@ -1498,109 +1503,111 @@ function rt(e, t, n, s) {
1498
1503
  m(i, {
1499
1504
  header: { ENO_CSRF_TOKEN: e.token },
1500
1505
  onComplete: (r) => {
1501
- n && n(r);
1506
+ s && s(r);
1502
1507
  },
1503
1508
  onFailure: (r) => {
1504
- console.log("error http", r), s && s(r);
1509
+ console.log("error http", r), n && n(r);
1505
1510
  }
1506
1511
  });
1507
1512
  }
1508
1513
  );
1509
1514
  }
1510
- async function ct(e, t, n = void 0, s = void 0) {
1515
+ async function ct(e, t, s = void 0, n = void 0) {
1511
1516
  return new Promise((i) => {
1512
1517
  k(e, t, (r) => {
1513
1518
  m(r, {
1514
- onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
1519
+ onComplete: (a, o, c) => (i(JSON.parse(a)), s && s(JSON.parse(a), o, c), i),
1515
1520
  onFailure: (a, o, c) => {
1516
- s && s(a, o, c), console.log(a, o?.errormsg);
1521
+ n && n(a, o, c), console.log(a, o?.errormsg);
1517
1522
  }
1518
1523
  });
1519
1524
  });
1520
1525
  });
1521
1526
  }
1522
- function dt(e, t, n, s = void 0, i = void 0) {
1527
+ function dt(e, t, s, n = void 0, i = void 0) {
1523
1528
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1524
- F(
1529
+ e = { ...e, objID: s }, I(
1525
1530
  e,
1526
- n,
1527
1531
  (a) => {
1528
1532
  const o = a.data[0].relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
1529
- M(
1533
+ G(
1530
1534
  e,
1531
- n,
1535
+ s,
1532
1536
  o,
1533
1537
  r,
1534
1538
  c,
1535
1539
  (d) => {
1536
- s && s(d);
1540
+ n && n(d);
1537
1541
  },
1538
1542
  (d) => {
1539
1543
  i && i(d);
1540
1544
  }
1541
1545
  );
1546
+ },
1547
+ (a) => {
1548
+ console.log("En cas d'erreur nous avons :", a), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(a);
1542
1549
  }
1543
1550
  );
1544
1551
  }
1545
- let K, B;
1546
- const v = [];
1547
- async function ut(e, t = void 0, n = void 0) {
1548
- e.objID && e.objID !== "" ? F(
1552
+ let q, E;
1553
+ const D = [];
1554
+ async function ut(e, t = void 0, s = void 0) {
1555
+ e.objID && e.objID !== "" ? I(
1549
1556
  e,
1550
- (s) => {
1551
- t && t(s);
1557
+ (n) => {
1558
+ t && t(n);
1552
1559
  },
1553
- (s) => {
1554
- n && n(s);
1560
+ (n) => {
1561
+ s && s(n);
1555
1562
  }
1556
1563
  ) : (e.objID === null || e.objID === "") && b(
1557
1564
  e,
1558
- (s) => {
1559
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1565
+ (n) => {
1566
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1560
1567
  },
1561
- (s) => {
1562
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1568
+ (n) => {
1569
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1563
1570
  }
1564
1571
  );
1565
1572
  }
1566
- async function pt(e, t = void 0, n = void 0) {
1567
- console.log("getDatasByTenant (getDocuments)", e), await G(
1573
+ async function pt(e, t = void 0, s = void 0) {
1574
+ console.log("getDatasByTenant (getDocuments)", e), await B(
1568
1575
  e,
1569
- (s) => {
1576
+ (n) => {
1570
1577
  const i = {};
1571
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1578
+ i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1572
1579
  },
1573
- (s) => {
1574
- n && n?.(s);
1580
+ (n) => {
1581
+ s && s?.(n);
1575
1582
  }
1576
1583
  );
1577
1584
  }
1578
- function lt(e, t = void 0, n = void 0) {
1579
- const s = [];
1585
+ function lt(e, t = void 0, s = void 0) {
1586
+ const n = [];
1580
1587
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1581
1588
  console.warn("la liste est vide ou n'est pas un tableau");
1582
1589
  return;
1583
1590
  }
1584
1591
  e.objIds.forEach((i, r) => {
1585
- G(
1592
+ B(
1586
1593
  e,
1587
1594
  i.objID,
1588
1595
  (a) => {
1589
- s.push({ [i.name]: a }), i.name === "dbProjets" && (K = a.affaires.map((o) => o.objectID), pe(e, B)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1596
+ n.push({ [i.name]: a }), i.name === "dbProjets" && (q = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1590
1597
  }
1591
1598
  );
1592
1599
  });
1593
1600
  }
1594
- function pe(e, t, n = void 0, s = void 0) {
1601
+ function pe(e, t, s = void 0, n = void 0) {
1595
1602
  ce(
1596
1603
  e,
1597
- K,
1604
+ q,
1598
1605
  (i) => {
1599
1606
  const r = [...t];
1600
- r.find((a) => a.objectID === i.objectId).data = i.data, B = r, v.push(i.data), n && n(v);
1607
+ r.find((a) => a.objectID === i.objectId).data = i.data, E = r, D.push(i.data), s && s(D);
1601
1608
  },
1602
1609
  (i) => {
1603
- s && (s(i), console.log(i));
1610
+ n && (n(i), console.log(i));
1604
1611
  }
1605
1612
  );
1606
1613
  }
@@ -1611,7 +1618,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1611
1618
  "usersgroup",
1612
1619
  "3dplan",
1613
1620
  "dashboard"
1614
- ], q = {
1621
+ ], X = {
1615
1622
  how: "ds6w:how",
1616
1623
  what: "ds6w:what",
1617
1624
  when: "ds6w:when",
@@ -1624,7 +1631,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1624
1631
  order_by: "desc",
1625
1632
  tag: "testTag"
1626
1633
  };
1627
- function ft(e, t, n = void 0, s = void 0) {
1634
+ function ft(e, t, s = void 0, n = void 0) {
1628
1635
  const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1629
1636
  uri: "/resources/6w/tags",
1630
1637
  otpCTX: "SecurityContext=preferred",
@@ -1637,7 +1644,7 @@ function ft(e, t, n = void 0, s = void 0) {
1637
1644
  uri: `pid://${a}`
1638
1645
  }
1639
1646
  ],
1640
- predicate: q[o],
1647
+ predicate: X[o],
1641
1648
  object: {
1642
1649
  literal: c
1643
1650
  }
@@ -1655,7 +1662,7 @@ function ft(e, t, n = void 0, s = void 0) {
1655
1662
  JSON.parse(f);
1656
1663
  const l = {};
1657
1664
  setTimeout(() => {
1658
- L(
1665
+ J(
1659
1666
  e,
1660
1667
  a,
1661
1668
  (h) => {
@@ -1664,27 +1671,27 @@ function ft(e, t, n = void 0, s = void 0) {
1664
1671
  e,
1665
1672
  t,
1666
1673
  (S) => {
1667
- n && n(S);
1674
+ s && s(S);
1668
1675
  },
1669
1676
  (S) => {
1670
- s && s(S);
1677
+ n && n(S);
1671
1678
  }
1672
1679
  );
1673
1680
  },
1674
1681
  (h, g) => {
1675
1682
  const y = h;
1676
- y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), s && s(y);
1683
+ y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), n && n(y);
1677
1684
  }
1678
1685
  );
1679
1686
  }, 2e3);
1680
1687
  },
1681
1688
  onFailure(f, l) {
1682
1689
  const h = f;
1683
- h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
1690
+ h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), n && n(h);
1684
1691
  }
1685
1692
  });
1686
1693
  }
1687
- function he(e, t, n = void 0, s = void 0) {
1694
+ function he(e, t, s = void 0, n = void 0) {
1688
1695
  console.log("obj ", t);
1689
1696
  const i = t.info.name, r = {
1690
1697
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1759,15 +1766,15 @@ function he(e, t, n = void 0, s = void 0) {
1759
1766
  data: JSON.stringify(d),
1760
1767
  onComplete(u) {
1761
1768
  const p = JSON.parse(u);
1762
- n(p);
1769
+ s(p);
1763
1770
  },
1764
1771
  onFailure(u, p) {
1765
1772
  const f = u;
1766
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1773
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1767
1774
  }
1768
1775
  });
1769
1776
  }
1770
- function mt(e, t, n = void 0, s = void 0) {
1777
+ function mt(e, t, s = void 0, n = void 0) {
1771
1778
  const { objId: i, pred: r, tag: a } = t, o = {
1772
1779
  uri: "/resources/6w/tags",
1773
1780
  otpCTX: "SecurityContext=preferred",
@@ -1780,7 +1787,7 @@ function mt(e, t, n = void 0, s = void 0) {
1780
1787
  uri: `pid://${i}`
1781
1788
  }
1782
1789
  ],
1783
- predicate: q[r],
1790
+ predicate: X[r],
1784
1791
  object: {
1785
1792
  literal: a
1786
1793
  }
@@ -1795,15 +1802,15 @@ function mt(e, t, n = void 0, s = void 0) {
1795
1802
  Accept: "application/json,text/javascript,*/*"
1796
1803
  },
1797
1804
  onComplete(u) {
1798
- n && n(u);
1805
+ s && s(u);
1799
1806
  },
1800
1807
  onFailure(u, p) {
1801
1808
  const f = u;
1802
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1809
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
1803
1810
  }
1804
1811
  });
1805
1812
  }
1806
- function ht(e, t = "", n = void 0, s = void 0) {
1813
+ function ht(e, t = "", s = void 0, n = void 0) {
1807
1814
  const { space: i } = e;
1808
1815
  if (t === "")
1809
1816
  return;
@@ -1818,29 +1825,29 @@ function ht(e, t = "", n = void 0, s = void 0) {
1818
1825
  headers: a,
1819
1826
  data: c,
1820
1827
  onComplete(d) {
1821
- n && n(JSON.parse(d));
1828
+ s && s(JSON.parse(d));
1822
1829
  },
1823
1830
  onFailure(d, u) {
1824
1831
  const p = d;
1825
- p.msg = u.error, s && s(p);
1832
+ p.msg = u.error, n && n(p);
1826
1833
  }
1827
1834
  });
1828
1835
  }
1829
- async function C(e, t = void 0, n = void 0) {
1830
- const s = e._3DSwym + "/api/index/tk";
1831
- return m(s, {
1836
+ async function C(e, t = void 0, s = void 0) {
1837
+ const n = e._3DSwym + "/api/index/tk";
1838
+ return m(n, {
1832
1839
  onComplete(i, r, a) {
1833
1840
  const o = JSON.parse(i);
1834
1841
  if (t)
1835
1842
  return t(o), e.token = o?.result?.ServerToken;
1836
1843
  },
1837
1844
  onFailure(i) {
1838
- n && n(i);
1845
+ s && s(i);
1839
1846
  }
1840
1847
  });
1841
1848
  }
1842
- function gt(e, t = void 0, n = void 0) {
1843
- const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1849
+ function gt(e, t = void 0, s = void 0) {
1850
+ const n = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1844
1851
  params: {
1845
1852
  community_id: null,
1846
1853
  hash_key: null,
@@ -1851,7 +1858,7 @@ function gt(e, t = void 0, n = void 0) {
1851
1858
  }
1852
1859
  };
1853
1860
  C(e, (r) => {
1854
- m(s, {
1861
+ m(n, {
1855
1862
  method: "POST",
1856
1863
  headers: {
1857
1864
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1864,13 +1871,13 @@ function gt(e, t = void 0, n = void 0) {
1864
1871
  t && t(a, o);
1865
1872
  },
1866
1873
  onFailure(a, o) {
1867
- n && n(a, o);
1874
+ s && s(a, o);
1868
1875
  }
1869
1876
  });
1870
1877
  });
1871
1878
  }
1872
- function yt(e, t = void 0, n = void 0) {
1873
- const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1879
+ function yt(e, t = void 0, s = void 0) {
1880
+ const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1874
1881
  params: {
1875
1882
  idsToFilterArr: [],
1876
1883
  mode: "offline",
@@ -1880,7 +1887,7 @@ function yt(e, t = void 0, n = void 0) {
1880
1887
  }
1881
1888
  };
1882
1889
  C(e, (r) => {
1883
- m(s, {
1890
+ m(n, {
1884
1891
  method: "POST",
1885
1892
  headers: {
1886
1893
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1894,18 +1901,18 @@ function yt(e, t = void 0, n = void 0) {
1894
1901
  t && t(c, a);
1895
1902
  },
1896
1903
  onFailure(a, o) {
1897
- n && n(a, o);
1904
+ s && s(a, o);
1898
1905
  }
1899
1906
  });
1900
1907
  });
1901
1908
  }
1902
- function _t(e, t = void 0, n = void 0) {
1903
- const s = {
1909
+ function _t(e, t = void 0, s = void 0) {
1910
+ const n = {
1904
1911
  base: e._3DSwym,
1905
1912
  uri: "/api/community/listmycommunities",
1906
1913
  limit: `/limit/${e.limit ? e.limit : 500}`,
1907
1914
  page: `/page/${e.page ? e.page : "1"}`
1908
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1915
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1909
1916
  C(e, (a) => {
1910
1917
  m(i, {
1911
1918
  method: "GET",
@@ -1930,18 +1937,18 @@ function _t(e, t = void 0, n = void 0) {
1930
1937
  (g) => {
1931
1938
  f++, h.members = g, r.push(h), f === p.length && t && t(r);
1932
1939
  },
1933
- (g) => n(g)
1940
+ (g) => s(g)
1934
1941
  );
1935
1942
  });
1936
1943
  },
1937
1944
  onFailure(o, c) {
1938
1945
  const d = o;
1939
- d.status = c.status, d.response = c.errormsg, n && n(d);
1946
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1940
1947
  }
1941
1948
  });
1942
1949
  });
1943
1950
  }
1944
- function ge(e, t, n, s) {
1951
+ function ge(e, t, s, n) {
1945
1952
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
1946
1953
  params: {
1947
1954
  page: e.page ? e.page : 1,
@@ -1960,18 +1967,18 @@ function ge(e, t, n, s) {
1960
1967
  data: JSON.stringify(r),
1961
1968
  type: "json",
1962
1969
  onComplete(o, c, d) {
1963
- n && n(o);
1970
+ s && s(o);
1964
1971
  },
1965
1972
  onFailure(o, c) {
1966
1973
  const d = o;
1967
- d.status = c.status, d.response = c.errormsg, s && s(d);
1974
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1968
1975
  }
1969
1976
  });
1970
1977
  });
1971
1978
  }
1972
- function St(e, t = void 0, n = void 0) {
1973
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1974
- e.commu_id || (e.commu_id = s);
1979
+ function St(e, t = void 0, s = void 0) {
1980
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1981
+ e.commu_id || (e.commu_id = n);
1975
1982
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1976
1983
  C(e, (r) => {
1977
1984
  m(i, {
@@ -1987,12 +1994,12 @@ function St(e, t = void 0, n = void 0) {
1987
1994
  },
1988
1995
  onFailure(a, o) {
1989
1996
  const c = a;
1990
- c.status = o.status, c.response = o.errormsg, n && n(c);
1997
+ c.status = o.status, c.response = o.errormsg, s && s(c);
1991
1998
  }
1992
1999
  });
1993
2000
  });
1994
2001
  }
1995
- function wt(e, t, n = void 0, s = void 0) {
2002
+ function wt(e, t, s = void 0, n = void 0) {
1996
2003
  const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
1997
2004
  console.log("__listAllContacts", i.hits);
1998
2005
  const o = `${a}/api/directmessages`, c = {
@@ -2007,10 +2014,10 @@ function wt(e, t, n = void 0, s = void 0) {
2007
2014
  ye(
2008
2015
  c.users,
2009
2016
  (p) => {
2010
- p !== void 0 && (d.id_msg = p.id, u = !0, D(e, d));
2017
+ p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2011
2018
  },
2012
2019
  (p) => {
2013
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2020
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), d.id_msg = "";
2014
2021
  }
2015
2022
  ), u === !1 && setTimeout(() => {
2016
2023
  u === !1 && C(e, (p) => {
@@ -2025,17 +2032,17 @@ function wt(e, t, n = void 0, s = void 0) {
2025
2032
  type: "json",
2026
2033
  onComplete(f, l, h) {
2027
2034
  const g = f;
2028
- g.reponse = JSON.parse(h.response), g.status = h.status, n && n(g), d.id_msg = g.result.id, D(e, d);
2035
+ g.reponse = JSON.parse(h.response), g.status = h.status, s && s(g), d.id_msg = g.result.id, P(e, d);
2029
2036
  },
2030
2037
  onFailure(f, l, h) {
2031
2038
  const g = f;
2032
- g.msg = l.errormsg, g.status = l.status, s && s(g);
2039
+ g.msg = l.errormsg, g.status = l.status, n && n(g);
2033
2040
  }
2034
2041
  });
2035
2042
  });
2036
2043
  }, 500);
2037
2044
  }
2038
- function ye(e, t, n, s) {
2045
+ function ye(e, t, s, n) {
2039
2046
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2040
2047
  C(e, (r) => {
2041
2048
  m(i, {
@@ -2055,16 +2062,16 @@ function ye(e, t, n, s) {
2055
2062
  f.push(l.login);
2056
2063
  }), JSON.stringify(f) === JSON.stringify(d);
2057
2064
  });
2058
- n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2065
+ s && u !== void 0 ? s(u) : (n || u === void 0) && n(u);
2059
2066
  },
2060
2067
  onFailure(a) {
2061
2068
  const o = a;
2062
- o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
2069
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), n && n(o);
2063
2070
  }
2064
2071
  });
2065
2072
  });
2066
2073
  }
2067
- function D(e, t, n = void 0, s = void 0) {
2074
+ function P(e, t, s = void 0, n = void 0) {
2068
2075
  const i = {
2069
2076
  base: e._3DSwym,
2070
2077
  uri: "/api/community",
@@ -2092,23 +2099,23 @@ function D(e, t, n = void 0, s = void 0) {
2092
2099
  type: "json",
2093
2100
  onComplete(c, d, u) {
2094
2101
  const p = c;
2095
- p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
2102
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
2096
2103
  },
2097
2104
  onFailure(c, d) {
2098
2105
  const u = c;
2099
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2106
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
2100
2107
  }
2101
2108
  });
2102
2109
  });
2103
2110
  }
2104
2111
  function _e(e) {
2105
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2112
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2106
2113
  return `<p>${e} </p>
2107
2114
  <br/>
2108
2115
  <hr/>
2109
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
2116
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
2110
2117
  }
2111
- function Ct(e, t, n = void 0, s = void 0) {
2118
+ function Ct(e, t, s = void 0, n = void 0) {
2112
2119
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2113
2120
  (c) => c.id === t.community_id
2114
2121
  ), a = e.swymCommunities.find(
@@ -2138,20 +2145,20 @@ function Ct(e, t, n = void 0, s = void 0) {
2138
2145
  type: "json",
2139
2146
  onComplete(u, p, f) {
2140
2147
  const l = JSON.parse(u);
2141
- l.status = f.status, l.response = f.response, n && n(l);
2148
+ l.status = f.status, l.response = f.response, s && s(l);
2142
2149
  },
2143
2150
  onFailure(u, p, f) {
2144
2151
  const l = u;
2145
- l.status = p.status, l.response = p.errormsg, s && s(l);
2152
+ l.status = p.status, l.response = p.errormsg, n && n(l);
2146
2153
  }
2147
2154
  });
2148
2155
  });
2149
2156
  }
2150
- function Tt(e, t = void 0, n = void 0) {
2151
- const s = { base: e.space, uri: "/api/idea/add" };
2157
+ function Tt(e, t = void 0, s = void 0) {
2158
+ const n = { base: e.space, uri: "/api/idea/add" };
2152
2159
  if (!Array.isArray(e.swymCommunities)) {
2153
2160
  const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2154
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2161
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2155
2162
  cause: a
2156
2163
  });
2157
2164
  }
@@ -2159,19 +2166,19 @@ function Tt(e, t = void 0, n = void 0) {
2159
2166
  (a) => a.id === e.community_id
2160
2167
  ) === -1) {
2161
2168
  const a = "la communauté n'existe pas dans la liste des communautés du Swym";
2162
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2169
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2163
2170
  cause: a
2164
2171
  });
2165
2172
  }
2166
2173
  if (e.community_id && e.community_id === "") {
2167
2174
  const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2168
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2175
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2169
2176
  cause: a
2170
2177
  });
2171
2178
  }
2172
2179
  if (e.title && e.title === "") {
2173
2180
  const a = "☠️ title doit être un String.";
2174
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2181
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2175
2182
  cause: a
2176
2183
  });
2177
2184
  }
@@ -2190,7 +2197,7 @@ function Tt(e, t = void 0, n = void 0) {
2190
2197
  C(e, (a) => {
2191
2198
  if (!a)
2192
2199
  throw new Error(
2193
- `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2200
+ `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
2194
2201
  {
2195
2202
  cause: a
2196
2203
  }
@@ -2209,18 +2216,18 @@ function Tt(e, t = void 0, n = void 0) {
2209
2216
  },
2210
2217
  onFailure(c, d, u) {
2211
2218
  const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2212
- `Erreur sur cette requête : ${s.base + s.uri}`,
2219
+ `Erreur sur cette requête : ${n.base + n.uri}`,
2213
2220
  {
2214
2221
  cause: { head: p, rep: f }
2215
2222
  }
2216
2223
  );
2217
- n && n(l);
2224
+ s && s(l);
2218
2225
  }
2219
2226
  };
2220
- m(s.base + s.uri, o);
2227
+ m(n.base + n.uri, o);
2221
2228
  });
2222
2229
  }
2223
- function bt(e, t, n = void 0, s = void 0) {
2230
+ function bt(e, t, s = void 0, n = void 0) {
2224
2231
  const i = `${e.space}/api/idea/delete`, r = {
2225
2232
  params: {
2226
2233
  community_id: t.community_id,
@@ -2238,17 +2245,17 @@ function bt(e, t, n = void 0, s = void 0) {
2238
2245
  data: JSON.stringify(r),
2239
2246
  type: "json",
2240
2247
  onComplete(o, c, d) {
2241
- n && n(o);
2248
+ s && s(o);
2242
2249
  },
2243
2250
  onFailure(o, c, d) {
2244
2251
  const u = o;
2245
- u.status = c.status, u.response = c.errormsg, s && s(u);
2252
+ u.status = c.status, u.response = c.errormsg, n && n(u);
2246
2253
  }
2247
2254
  });
2248
2255
  });
2249
2256
  }
2250
- function Ot(e, t = void 0, n = void 0) {
2251
- const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2257
+ function Ot(e, t = void 0, s = void 0) {
2258
+ const { _3DSwym: n, _3DSwym_token: i } = e, r = `${n}/api/idea/get`;
2252
2259
  if (e.idPost === "") {
2253
2260
  const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2254
2261
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
@@ -2271,13 +2278,13 @@ function Ot(e, t = void 0, n = void 0) {
2271
2278
  },
2272
2279
  onFailure(o) {
2273
2280
  const c = o;
2274
- c.status = headers.status, c.response = headers.errormsg, n && n(c);
2281
+ c.status = headers.status, c.response = headers.errormsg, s && s(c);
2275
2282
  }
2276
2283
  });
2277
2284
  }
2278
- function $t(e, t, n) {
2285
+ function $t(e, t, s) {
2279
2286
  const {
2280
- _3DSwym: s,
2287
+ _3DSwym: n,
2281
2288
  _3DSwym_token: i,
2282
2289
  idPost: r,
2283
2290
  title: a,
@@ -2286,7 +2293,7 @@ function $t(e, t, n) {
2286
2293
  status_id: d,
2287
2294
  message: u
2288
2295
  } = e, p = {
2289
- base: `${s}`,
2296
+ base: `${n}`,
2290
2297
  uri: "/api/idea/edit"
2291
2298
  }, l = {
2292
2299
  method: "POST",
@@ -2315,12 +2322,12 @@ function $t(e, t, n) {
2315
2322
  _.status = y.status, t && t(_);
2316
2323
  },
2317
2324
  onFailure(h) {
2318
- n && n(h);
2325
+ s && s(h);
2319
2326
  }
2320
2327
  };
2321
2328
  m(p.base + p.uri, l);
2322
2329
  }
2323
- function Nt(e, t, n = void 0, s = void 0) {
2330
+ function Nt(e, t, s = void 0, n = void 0) {
2324
2331
  const { _3DSwym: i } = e;
2325
2332
  let { community_id: r, limit: a, page: o, search: c } = t;
2326
2333
  const d = [], u = 1;
@@ -2347,15 +2354,15 @@ function Nt(e, t, n = void 0, s = void 0) {
2347
2354
  d.push(w.response.result);
2348
2355
  else {
2349
2356
  const T = w.response.result.find(
2350
- (U) => U.title.includes(c)
2357
+ (R) => R.title.includes(c)
2351
2358
  );
2352
2359
  if (T) {
2353
- n(T);
2360
+ s(T);
2354
2361
  return;
2355
2362
  }
2356
2363
  }
2357
- if (n && f < o && !c) {
2358
- p = !0, n(d);
2364
+ if (s && f < o && !c) {
2365
+ p = !0, s(d);
2359
2366
  return;
2360
2367
  }
2361
2368
  y(_);
@@ -2363,7 +2370,7 @@ function Nt(e, t, n = void 0, s = void 0) {
2363
2370
  },
2364
2371
  onFailure(S, w) {
2365
2372
  const T = S;
2366
- T.status = w.status, T.response = w.errormsg, s && s(T);
2373
+ T.status = w.status, T.response = w.errormsg, n && n(T);
2367
2374
  }
2368
2375
  });
2369
2376
  };
@@ -2445,9 +2452,9 @@ function Se(e) {
2445
2452
  <p>
2446
2453
  </p>` : e;
2447
2454
  }
2448
- function xt(e, t = void 0, n = void 0) {
2449
- const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2450
- if (s && i && r && a && o) {
2455
+ function xt(e, t = void 0, s = void 0) {
2456
+ const { tenant: n, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2457
+ if (n && i && r && a && o) {
2451
2458
  const c = `${i}/api/idea/forward`;
2452
2459
  m(c, {
2453
2460
  method: "POST",
@@ -2457,8 +2464,8 @@ function xt(e, t = void 0, n = void 0) {
2457
2464
  "X-DS-SWYM-CSRFTOKEN": r
2458
2465
  },
2459
2466
  data: JSON.stringify({
2460
- community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2461
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2467
+ community_uri: `swym:prd:${n.toUpperCase()}:community:${a}`,
2468
+ content_uri: `swym:prd:${n.toUpperCase()}:idea:${o}`,
2462
2469
  timeout: 3e4
2463
2470
  }),
2464
2471
  type: "json",
@@ -2467,19 +2474,19 @@ function xt(e, t = void 0, n = void 0) {
2467
2474
  },
2468
2475
  onFailure(d, u) {
2469
2476
  const p = d;
2470
- p.status = u.status, p.response = u.errormsg, n && n(p);
2477
+ p.status = u.status, p.response = u.errormsg, s && s(p);
2471
2478
  }
2472
2479
  });
2473
2480
  } else
2474
- n && n({
2481
+ s && s({
2475
2482
  status: "error",
2476
2483
  msg: "Credentials incomplet !",
2477
2484
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2478
2485
  credentials: e
2479
2486
  });
2480
2487
  }
2481
- function Ft(e, t = void 0, n = void 0) {
2482
- return new Promise((s, i) => {
2488
+ function Ft(e, t = void 0, s = void 0) {
2489
+ return new Promise((n, i) => {
2483
2490
  try {
2484
2491
  let r;
2485
2492
  if (e._3DDashboard) {
@@ -2495,20 +2502,20 @@ function Ft(e, t = void 0, n = void 0) {
2495
2502
  } catch (f) {
2496
2503
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2497
2504
  }
2498
- console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, s(p);
2505
+ console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, n(p);
2499
2506
  },
2500
2507
  onFailure(o) {
2501
2508
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
2502
2509
  }
2503
2510
  });
2504
2511
  }
2505
- r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2512
+ r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2506
2513
  } catch (r) {
2507
2514
  i("ERROR | _3DSwym_get_currentUser => ", r);
2508
2515
  }
2509
2516
  });
2510
2517
  }
2511
- function It(e, t, n = void 0, s = void 0) {
2518
+ function It(e, t, s = void 0, n = void 0) {
2512
2519
  const i = e.space + "/api/user/find/login/" + t;
2513
2520
  C(
2514
2521
  e,
@@ -2518,23 +2525,23 @@ function It(e, t, n = void 0, s = void 0) {
2518
2525
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2519
2526
  onComplete(a, o, c) {
2520
2527
  const d = JSON.parse(a);
2521
- n && n(d);
2528
+ s && s(d);
2522
2529
  },
2523
2530
  onFailure(a) {
2524
- s && s(a);
2531
+ n && n(a);
2525
2532
  }
2526
2533
  });
2527
2534
  },
2528
- s
2535
+ n
2529
2536
  );
2530
2537
  }
2531
- function Ut(e, t = void 0, n = void 0) {
2538
+ function Ut(e, t = void 0, s = void 0) {
2532
2539
  const {
2533
- _3DSwym: s,
2540
+ _3DSwym: n,
2534
2541
  _3DSwym_token: i,
2535
2542
  subjectUri: r,
2536
2543
  richMessage: a
2537
- } = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
2544
+ } = e, o = `${n}/commentproxy/subjects/${r}/comments`, d = {
2538
2545
  method: "POST",
2539
2546
  headers: {
2540
2547
  "Content-type": "application/json;charset=UTF-8",
@@ -2550,24 +2557,26 @@ function Ut(e, t = void 0, n = void 0) {
2550
2557
  l.status = f.status, t && t(l);
2551
2558
  },
2552
2559
  onFailure(u) {
2553
- n && n(u);
2560
+ s && s(u);
2554
2561
  }
2555
2562
  };
2556
2563
  m(o, d);
2557
2564
  }
2558
- function Rt(e, t = void 0, n = void 0) {
2559
- e.tenant && P(e, (s) => {
2560
- const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2565
+ function Rt(e, t = void 0, s = void 0) {
2566
+ e.tenant && M(e, (n) => {
2567
+ const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2561
2568
  return t && t(i), i;
2562
2569
  });
2563
2570
  }
2564
- function jt(e, t = void 0, n = void 0) {
2565
- e.tenant && P(e, (s) => {
2566
- const i = s.services.find(
2571
+ function jt(e, t = void 0, s = void 0) {
2572
+ console.log("_Iterop_Auth_CAS"), e.tenant && M(e, (n) => {
2573
+ console.log("serviceUrls", n);
2574
+ const i = n.services.find(
2567
2575
  (o) => o.id === "3dpassport"
2568
- )?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
2576
+ )?.url, r = n.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?cors=false&service=${r}/auth/cas`;
2569
2577
  m(a, {
2570
2578
  async onComplete(o) {
2579
+ console.log("response", o);
2571
2580
  const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
2572
2581
  await fetch(c, {
2573
2582
  method: "POST"
@@ -2576,24 +2585,24 @@ function jt(e, t = void 0, n = void 0) {
2576
2585
  });
2577
2586
  },
2578
2587
  onFailure(o) {
2579
- n && n(o);
2588
+ s && s(o);
2580
2589
  }
2581
2590
  });
2582
2591
  });
2583
2592
  }
2584
- function kt(e, t = void 0, n = void 0) {
2593
+ function kt(e, t = void 0, s = void 0) {
2585
2594
  if (e.tenant) {
2586
- const s = e.tenant.toLowerCase();
2587
- fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2595
+ const n = e.tenant.toLowerCase();
2596
+ fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2588
2597
  method: "POST"
2589
2598
  }).then((i) => i.json()).then((i) => {
2590
2599
  t && t(i);
2591
2600
  }).catch((i) => {
2592
- n && n(i);
2601
+ s && s(i);
2593
2602
  });
2594
2603
  }
2595
2604
  }
2596
- async function vt(e, t, n = void 0, s = void 0) {
2605
+ async function vt(e, t, s = void 0, n = void 0) {
2597
2606
  if (e.tenant) {
2598
2607
  const i = e.tenant.toLowerCase();
2599
2608
  fetch(
@@ -2602,61 +2611,61 @@ async function vt(e, t, n = void 0, s = void 0) {
2602
2611
  method: "GET"
2603
2612
  }
2604
2613
  ).then((r) => r.json()).then((r) => {
2605
- n && n(r);
2606
- }).catch((r) => {
2607
2614
  s && s(r);
2615
+ }).catch((r) => {
2616
+ n && n(r);
2608
2617
  });
2609
2618
  }
2610
2619
  }
2611
- async function Dt(e, t, n, s = void 0, i = void 0) {
2620
+ async function At(e, t, s, n = void 0, i = void 0) {
2612
2621
  if (e.tenant) {
2613
2622
  const r = e.tenant.toLowerCase();
2614
2623
  fetch(
2615
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2624
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${s}?t=${t}`,
2616
2625
  {
2617
2626
  method: "POST"
2618
2627
  }
2619
2628
  ).then((a) => a.json()).then((a) => {
2620
- s && s(a);
2629
+ n && n(a);
2621
2630
  }).catch((a) => {
2622
2631
  i && i(a);
2623
2632
  });
2624
2633
  }
2625
2634
  }
2626
- async function At(e, t, n, s = void 0, i = void 0) {
2635
+ async function Dt(e, t, s, n = void 0, i = void 0) {
2627
2636
  if (e.tenant) {
2628
2637
  const r = e.tenant.toLowerCase();
2629
2638
  fetch(
2630
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2639
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${s}/?t=${t}`,
2631
2640
  {
2632
2641
  method: "POST"
2633
2642
  }
2634
2643
  ).then((a) => a.json()).then((a) => {
2635
- s && s(a);
2644
+ n && n(a);
2636
2645
  }).catch((a) => {
2637
2646
  i && i(a);
2638
2647
  });
2639
2648
  }
2640
2649
  }
2641
- async function Pt(e, t, n, s, i = void 0, r = void 0) {
2650
+ async function Pt(e, t, s, n, i = void 0, r = void 0) {
2642
2651
  if (e.tenant) {
2643
2652
  const a = e.tenant.toLowerCase();
2644
2653
  fetch(
2645
- `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2654
+ `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`,
2646
2655
  {
2647
2656
  method: "POST"
2648
2657
  }
2649
2658
  ).then((o) => o.json()).then((o) => {
2650
2659
  i && i(o);
2651
2660
  }).catch((o) => {
2652
- r && r(o, n, s);
2661
+ r && r(o, s, n);
2653
2662
  });
2654
2663
  }
2655
2664
  }
2656
- async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2665
+ async function Lt(e, t, s, n, i, r = void 0, a = void 0) {
2657
2666
  if (e.tenant) {
2658
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2659
- s
2667
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2668
+ n
2660
2669
  )}&b=${encodeURIComponent(i)}`;
2661
2670
  fetch(o, {
2662
2671
  method: "POST"
@@ -2665,17 +2674,17 @@ async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2665
2674
  }).catch((c) => {
2666
2675
  a && a({
2667
2676
  error: c,
2668
- tableId: n,
2669
- columns: s,
2677
+ tableId: s,
2678
+ columns: n,
2670
2679
  body: i
2671
2680
  });
2672
2681
  });
2673
2682
  }
2674
2683
  }
2675
- async function Mt(e, t, n, s, i = void 0, r = void 0) {
2684
+ async function Mt(e, t, s, n, i = void 0, r = void 0) {
2676
2685
  if (e.tenant) {
2677
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2678
- s
2686
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2687
+ n
2679
2688
  )}`;
2680
2689
  fetch(a, {
2681
2690
  method: "POST"
@@ -2689,15 +2698,15 @@ async function Mt(e, t, n, s, i = void 0, r = void 0) {
2689
2698
  });
2690
2699
  }
2691
2700
  }
2692
- async function Jt(e, t, n, s = void 0, i = void 0) {
2701
+ async function Jt(e, t, s, n = void 0, i = void 0) {
2693
2702
  if (e.tenant) {
2694
2703
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2695
- n
2704
+ s
2696
2705
  )}`;
2697
2706
  fetch(r, {
2698
2707
  method: "POST"
2699
2708
  }).then((a) => a.json()).then((a) => {
2700
- s && s(a);
2709
+ n && n(a);
2701
2710
  }).catch((a) => {
2702
2711
  i && i({
2703
2712
  error: a,
@@ -2706,11 +2715,11 @@ async function Jt(e, t, n, s = void 0, i = void 0) {
2706
2715
  });
2707
2716
  }
2708
2717
  }
2709
- async function Gt(e, t, n, s, i = void 0, r = void 0) {
2718
+ async function Gt(e, t, s, n, i = void 0, r = void 0) {
2710
2719
  if (e.tenant) {
2711
2720
  const a = e.tenant.toLowerCase();
2712
2721
  fetch(
2713
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2722
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2714
2723
  {
2715
2724
  method: "POST"
2716
2725
  }
@@ -2721,26 +2730,26 @@ async function Gt(e, t, n, s, i = void 0, r = void 0) {
2721
2730
  });
2722
2731
  }
2723
2732
  }
2724
- async function Kt(e, t, n, s = void 0, i = void 0) {
2733
+ async function Kt(e, t, s, n = void 0, i = void 0) {
2725
2734
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2726
2735
  const r = e.tenant.toLowerCase();
2727
2736
  fetch(
2728
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2737
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${s}/?t=${t}`,
2729
2738
  {
2730
2739
  method: "POST"
2731
2740
  }
2732
2741
  ).then((a) => a.json()).then((a) => {
2733
- s && s(a);
2742
+ n && n(a);
2734
2743
  }).catch((a) => {
2735
2744
  i && i(a);
2736
2745
  });
2737
2746
  }
2738
2747
  }
2739
- async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2748
+ async function Bt(e, t, s, n, i, r = void 0, a = void 0) {
2740
2749
  if (e.tenant) {
2741
2750
  const o = e.tenant.toLowerCase();
2742
2751
  fetch(
2743
- `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2752
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2744
2753
  {
2745
2754
  method: "POST"
2746
2755
  }
@@ -2751,11 +2760,11 @@ async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2751
2760
  });
2752
2761
  }
2753
2762
  }
2754
- async function qt(e, t, n, s, i = void 0, r = void 0) {
2763
+ async function qt(e, t, s, n, i = void 0, r = void 0) {
2755
2764
  if (e.tenant) {
2756
2765
  const a = e.tenant.toLowerCase();
2757
2766
  fetch(
2758
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2767
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2759
2768
  {
2760
2769
  method: "POST"
2761
2770
  }
@@ -2767,16 +2776,16 @@ async function qt(e, t, n, s, i = void 0, r = void 0) {
2767
2776
  }
2768
2777
  }
2769
2778
  //!SECTION
2770
- async function Et(e, t, n, s = void 0, i = void 0) {
2779
+ async function Et(e, t, s, n = void 0, i = void 0) {
2771
2780
  if (e.tenant) {
2772
2781
  const r = e.tenant.toLowerCase();
2773
2782
  fetch(
2774
- `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2783
+ `https://api.uixhome.fr/${r}/iterop/list/one/${s}/?t=${t}`,
2775
2784
  {
2776
2785
  method: "POST"
2777
2786
  }
2778
2787
  ).then((a) => a.json()).then((a) => {
2779
- s && s(a);
2788
+ n && n(a);
2780
2789
  }).catch((a) => {
2781
2790
  i && i(a);
2782
2791
  });
@@ -2787,13 +2796,13 @@ function Xt(e) {
2787
2796
  const t = "Hello " + e;
2788
2797
  return console.log(t), t;
2789
2798
  }
2790
- function Wt(e, t = void 0, n = void 0) {
2791
- return console.log("credentials", e), new Promise((s) => {
2799
+ function Wt(e, t = void 0, s = void 0) {
2800
+ return console.log("credentials", e), new Promise((n) => {
2792
2801
  if (e.token === "" && b(e), !e.space || e.space === "") {
2793
2802
  const a = Z();
2794
2803
  console.log("platformeInfo", a);
2795
2804
  }
2796
- I(
2805
+ U(
2797
2806
  e,
2798
2807
  "Common space",
2799
2808
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2855,13 +2864,13 @@ function Wt(e, t = void 0, n = void 0) {
2855
2864
  t && t(d);
2856
2865
  },
2857
2866
  onFailure(d) {
2858
- n && n(d);
2867
+ s && s(d);
2859
2868
  }
2860
2869
  });
2861
2870
  }
2862
2871
  },
2863
2872
  onFailure(a) {
2864
- n && n(a);
2873
+ s && s(a);
2865
2874
  }
2866
2875
  });
2867
2876
  });
@@ -2875,16 +2884,16 @@ export {
2875
2884
  at as _3DSpace_bookmark_addSubsciptions,
2876
2885
  it as _3DSpace_bookmark_newWorkspace,
2877
2886
  b as _3DSpace_csrf,
2878
- G as _3DSpace_download_doc,
2887
+ B as _3DSpace_download_doc,
2879
2888
  ce as _3DSpace_download_multidoc,
2880
- M as _3DSpace_file_update,
2889
+ G as _3DSpace_file_update,
2881
2890
  ae as _3DSpace_file_update_csr,
2882
2891
  We as _3DSpace_file_url_csr,
2883
- F as _3DSpace_get_csrf,
2884
- L as _3DSpace_get_docInfo,
2892
+ I as _3DSpace_get_csrf,
2893
+ J as _3DSpace_get_docInfo,
2885
2894
  de as _3DSpace_get_downloadTicket_multidoc,
2886
2895
  Xe as _3DSpace_get_multiDocInfo,
2887
- I as _3DSpace_get_securityContexts,
2896
+ U as _3DSpace_get_securityContexts,
2888
2897
  k as _3DSpace_get_ticket,
2889
2898
  nt as _3DSpace_lifecycle_changeRevision,
2890
2899
  Ze as _3DSpace_lifecycle_changeState,
@@ -2911,7 +2920,7 @@ export {
2911
2920
  It as _3DSwym_get_findUser,
2912
2921
  Tt as _3DSwym_postIdea,
2913
2922
  Ct as _3DSwym_postIdeaTemplate,
2914
- D as _3DSwym_sendMessageData,
2923
+ P as _3DSwym_sendMessageData,
2915
2924
  Le as _AppMngt_get_info_user,
2916
2925
  Pe as _AppMngt_get_users,
2917
2926
  Pt as _Iterop_AddOrRemoveRows,
@@ -2923,16 +2932,16 @@ export {
2923
2932
  Lt as _Iterop_businessTableSearchInRows,
2924
2933
  Jt as _Iterop_createBusinessTable,
2925
2934
  vt as _Iterop_getAllBusinessTables,
2926
- Dt as _Iterop_getOneBusinessTable,
2927
- At as _Iterop_getOneBusinessTableRows,
2935
+ At as _Iterop_getOneBusinessTable,
2936
+ Dt as _Iterop_getOneBusinessTableRows,
2928
2937
  kt as _Iterop_jwtUser,
2929
2938
  Gt as _Iterop_runProcess,
2930
2939
  Mt as _Iterop_updateBusinessTable,
2931
2940
  ve as _getMe,
2932
2941
  Z as _getPlateformInfos,
2933
2942
  ke as _getPlatformServices,
2934
- P as _getServiceUrl,
2935
- De as _getServiceUrl_3DPassport,
2943
+ M as _getServiceUrl,
2944
+ Ae as _getServiceUrl_3DPassport,
2936
2945
  Rt as _getServiceUrl_Iterop,
2937
2946
  m as _httpCallAuthenticated,
2938
2947
  Ue as _setDraggable,
@@ -2940,7 +2949,7 @@ export {
2940
2949
  Re as _setupTagger,
2941
2950
  ft as addTagToDoc,
2942
2951
  z as chunkArray,
2943
- Ae as compass_getListAdditionalApps,
2952
+ De as compass_getListAdditionalApps,
2944
2953
  H as couleurs,
2945
2954
  Me as createUserGroups,
2946
2955
  pe as dataMixing,