@beam3_dev/api_module 0.0.279 → 0.0.281

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,10 +1,10 @@
1
- import { v4 as K } from "uuid";
1
+ import { v4 as V } from "uuid";
2
2
  import { DateTime as O } from "luxon";
3
- import { requirejs as $, widget as D } from "@widget-lab/3ddashboard-utils";
4
- function B() {
5
- return K();
3
+ import { requirejs as $, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function Y() {
5
+ return V();
6
6
  }
7
- const W = {
7
+ const H = {
8
8
  b3M3Yellow: "#FFB300",
9
9
  b3AboutageBlue: "#42A5F5",
10
10
  b3UsinageGreen: "#689F38",
@@ -34,10 +34,10 @@ const W = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function _e(e, t = void 0, s = void 0) {
38
- const n = parseInt(e);
37
+ async function $e(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 _e(e, t = void 0, s = void 0) {
47
47
  ).then((i) => i.json()).then((i) => {
48
48
  t && t(i);
49
49
  }).catch((i) => {
50
- s && s(i), console.error("Erreur : " + i);
50
+ n && n(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function Se(e, t = void 0, s = void 0) {
53
+ async function Ne(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 Se(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
- async function we(e, t = W) {
69
- let s = O.now().year;
70
- const n = e, i = [], r = (a) => {
68
+ async function Fe(e, t = H) {
69
+ let n = O.now().year;
70
+ const s = e, i = [], r = (a) => {
71
71
  for (let c in a)
72
72
  i.push({ date: c, comment: a[c] });
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,12 +84,12 @@ async function we(e, t = W) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
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 c of i)
91
91
  a.events.findIndex(
92
- (p) => p.start === O.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
92
+ (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
94
  name: "Férié : " + c.comment,
95
95
  start: O.fromISO(c.date).toISODate(),
@@ -100,26 +100,26 @@ async function we(e, t = W) {
100
100
  return a;
101
101
  })();
102
102
  }
103
- function X(e, t, s) {
104
- const { credentials: n, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
103
+ function z(e, t, n) {
104
+ const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
107
107
  a.push(d);
108
108
  }
109
- V(
110
- { credentials: n, chunks: a, initLoop: 0, fn: o },
109
+ Q(
110
+ { credentials: s, chunks: a, initLoop: 0, fn: o },
111
111
  (c) => {
112
112
  t && t(c);
113
113
  },
114
114
  (c) => {
115
- s && s(c);
115
+ n && n(c);
116
116
  }
117
117
  );
118
118
  }
119
- function V(e, t, s) {
120
- const { credentials: n, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
119
+ function Q(e, t, n) {
120
+ const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
121
121
  o(
122
- n,
122
+ s,
123
123
  i[c],
124
124
  () => {
125
125
  c++, c < i.length && a(c);
@@ -128,97 +128,111 @@ function V(e, t, s) {
128
128
  t && t(d);
129
129
  },
130
130
  (d) => {
131
- s && s(d);
131
+ n && n(d);
132
132
  }
133
133
  );
134
134
  };
135
135
  a(r);
136
136
  }
137
- async function Ce(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;
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;
140
140
  }
141
141
  function m(e, t) {
142
- $(["DS/WAFData/WAFData"], (s) => {
143
- s.authenticatedRequest(e, t);
142
+ $(["DS/WAFData/WAFData"], (n) => {
143
+ n.authenticatedRequest(e, t);
144
144
  });
145
145
  }
146
- function Te(e, t, s) {
147
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
148
- n.draggable(e, {
146
+ function Ue(e, t, n) {
147
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
+ s.draggable(e, {
149
149
  data: t,
150
- start: s
150
+ start: n
151
151
  });
152
152
  });
153
153
  }
154
- function be(e, t = void 0) {
155
- $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
156
- let n;
157
- n === void 0 && (n = s.createProxy({
158
- widgetId: D.id,
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,
159
159
  filteringMode: "WithFilteringServices"
160
- }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
160
+ }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
161
161
  });
162
162
  }
163
- function Oe(e, t) {
164
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
165
- s.droppable(e, {
163
+ function xe(e, t) {
164
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
165
+ n.droppable(e, {
166
166
  drop: t
167
167
  });
168
168
  });
169
169
  }
170
- async function $e(e, t = void 0, s = void 0) {
170
+ async function ke(e, t = void 0, n = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
- (n) => {
174
- (!e || e === "") && (e = D.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
- n.getPlatformServices({
173
+ (s) => {
174
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
+ s.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: t,
178
- onFailure: s
178
+ onFailure: n
179
179
  })
180
180
  );
181
181
  }
182
182
  );
183
183
  }
184
- function q() {
184
+ function Z() {
185
185
  let e = {};
186
186
  return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
- const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
187
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
- tenant: s,
192
- user: n,
191
+ tenant: n,
192
+ user: s,
193
193
  appsConfiguration: i,
194
194
  appConf: r
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function v(e, t = void 0, s = void 0) {
198
+ function je(e, t = void 0, n = void 0) {
199
+ if (e.tenant) {
200
+ const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
+ m(s, {
202
+ onComplete(i) {
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");
205
+ },
206
+ onFailure(i) {
207
+ n && n("_getMe return error", i);
208
+ }
209
+ });
210
+ }
211
+ }
212
+ function P(e, t = void 0, n = void 0) {
199
213
  if (e.tenant) {
200
- const n = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
201
- m(n, {
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, {
202
216
  onComplete(i) {
203
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
204
218
  if (r && "platforms" in r) {
205
219
  const o = r.platforms.find(
206
220
  (a) => a.id === e.tenant.toUpperCase()
207
221
  );
208
- t && o ? t(o) : s && s("_getServiceUrl return listServiceUrl = undefined");
222
+ t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
209
223
  } else
210
- s && s("_getServiceUrl return oResponse = undefined");
224
+ n && n("_getServiceUrl return oResponse = undefined");
211
225
  },
212
226
  onFailure(i) {
213
- s && s(i);
227
+ n && n(i);
214
228
  }
215
229
  });
216
230
  }
217
231
  }
218
- function Ne(e, t = void 0, s = void 0) {
232
+ function De(e, t = void 0, n = void 0) {
219
233
  if (e.tenant) {
220
- const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
221
- m(n, {
234
+ const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
235
+ m(s, {
222
236
  onComplete(i) {
223
237
  const r = JSON.parse(i);
224
238
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
@@ -227,18 +241,18 @@ function Ne(e, t = void 0, s = void 0) {
227
241
  }
228
242
  },
229
243
  onFailure(i) {
230
- s && s(i);
244
+ n && n(i);
231
245
  }
232
246
  });
233
247
  }
234
248
  }
235
- function Ie(e, t, s) {
236
- const n = {
249
+ function ve(e, t, n) {
250
+ const s = {
237
251
  base: `${e.space}`,
238
252
  uri: "/resources/AppsMngt/api/custom/applications",
239
253
  option: `?filter=${e.tenant}`
240
254
  // facultatif
241
- }, i = `${n.base}${n.uri}${n.option}`;
255
+ }, i = `${s.base}${s.uri}${s.option}`;
242
256
  m(i, {
243
257
  method: "GET",
244
258
  headers: {
@@ -246,49 +260,49 @@ function Ie(e, t, s) {
246
260
  Accept: "application/json"
247
261
  },
248
262
  onComplete(r, o, a) {
249
- const c = JSON.parse(r), d = c.data.map((p) => {
250
- const u = p.attributes.name, f = p.id;
251
- return { name: u, id: f };
263
+ const c = JSON.parse(r), d = c.data.map((u) => {
264
+ const p = u.attributes.name, f = u.id;
265
+ return { name: p, id: f };
252
266
  });
253
267
  t && t(d, c);
254
268
  },
255
269
  onFailure(r, o) {
256
270
  const a = r;
257
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
271
+ a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
258
272
  }
259
273
  });
260
274
  }
261
- function Re(e, t = void 0, s = void 0) {
262
- let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
263
- m(n, {
275
+ function Ae(e, t = void 0, n = void 0) {
276
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
277
+ m(s, {
264
278
  onComplete(i, r, o) {
265
279
  const a = JSON.parse(i);
266
280
  console.log("_AppMngt_get_users => ", a), t && t(a);
267
281
  },
268
282
  onFailure(i, r) {
269
283
  const o = i;
270
- o.msg = r.errormsg, o.errCode = r.errorcode, s && s(o);
284
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
271
285
  }
272
286
  });
273
287
  }
274
- function Ue(e, t, s = void 0, n = void 0) {
288
+ function Pe(e, t, n = void 0, s = void 0) {
275
289
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
276
290
  m(i, {
277
291
  onComplete(r, o, a) {
278
292
  const c = JSON.parse(r);
279
- s && s(c);
293
+ n && n(c);
280
294
  },
281
295
  onFailure(r, o) {
282
296
  const a = r;
283
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
297
+ a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
284
298
  }
285
299
  });
286
300
  }
287
- const F = {
301
+ const k = {
288
302
  "Content-Type": "application/json",
289
303
  Accept: "application/json,text/javascript,*/*"
290
304
  };
291
- function Fe(e, t, s = void 0, n = void 0) {
305
+ function Le(e, t, n = void 0, s = void 0) {
292
306
  const { space: i, currentUser: r } = e, a = `${i}${{
293
307
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
294
308
  }.URIUGr}`, c = {
@@ -305,19 +319,19 @@ function Fe(e, t, s = void 0, n = void 0) {
305
319
  };
306
320
  m(a, {
307
321
  method: "POST",
308
- headers: F,
322
+ headers: k,
309
323
  data: JSON.stringify(c),
310
324
  onComplete(d) {
311
- s && s(JSON.parse(d));
325
+ n && n(JSON.parse(d));
312
326
  },
313
- onFailure(d, p) {
327
+ onFailure(d, u) {
314
328
  console.log(d);
315
- const u = d;
316
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
329
+ const p = d;
330
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
317
331
  }
318
332
  });
319
333
  }
320
- function ke(e, t, s = void 0, n = void 0) {
334
+ function Me(e, t, n = void 0, s = void 0) {
321
335
  const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
322
336
  m(d, {
323
337
  opts: {
@@ -328,68 +342,68 @@ function ke(e, t, s = void 0, n = void 0) {
328
342
  }
329
343
  },
330
344
  onComplete(f) {
331
- s && s(JSON.parse(f));
345
+ n && n(JSON.parse(f));
332
346
  },
333
347
  onFailure(f, l) {
334
- const g = f;
335
- g.msg = l.errormsg, g.errCode = l.errorcode, n && n(g);
348
+ const h = f;
349
+ h.msg = l.errormsg, h.errCode = l.errorcode, s && s(h);
336
350
  }
337
351
  });
338
352
  }
339
- function Y(e, t = void 0, s = void 0) {
340
- const { space: n, tenant: i } = e, r = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
353
+ function ee(e, t = void 0, n = void 0) {
354
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
341
355
  method: "GET",
342
356
  Accept: "application/json,*/*,test/javascript"
343
357
  }, d = `${r}${o}${a}`;
344
358
  m(d, {
345
359
  OPTsH: c,
346
- onComplete(p) {
347
- t && t(JSON.parse(p));
360
+ onComplete(u) {
361
+ t && t(JSON.parse(u));
348
362
  },
349
- onFailure(p, u) {
350
- const f = p;
351
- f.msg = u.errormsg, f.errCode = u.errorcode, s && s(f);
363
+ onFailure(u, p) {
364
+ const f = u;
365
+ f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
352
366
  }
353
367
  });
354
368
  }
355
- function je(e, t = void 0, s = void 0) {
356
- const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
369
+ function Je(e, t = void 0, n = void 0) {
370
+ const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
357
371
  "Content-Type": "application/json",
358
372
  Accept: "application/json,text/javascript,*/*"
359
373
  } };
360
374
  try {
361
375
  m(a, {
362
376
  opts: d,
363
- onComplete(p) {
364
- const u = JSON.parse(p), f = {}, l = u.groups.filter((g) => g.uri.startsWith("uuid:"));
377
+ onComplete(u) {
378
+ const p = JSON.parse(u), f = {}, l = p.groups.filter((h) => h.uri.startsWith("uuid:"));
365
379
  if (i && Object.keys(i).length > 0) {
366
- const g = l.filter((_) => _.owner === i.email), h = l.filter((_) => _.members.includes(i.email)), y = g.concat(h);
367
- f.iam = y, f.UG = l, f.iamMember = h, Y(
380
+ const h = l.filter((y) => y.owner === i.email), g = l.filter((y) => y.members.includes(i.email)), _ = h.concat(g);
381
+ f.iam = _, f.UG = l, f.iamMember = g, ee(
368
382
  e,
369
- (_) => {
370
- f.rules = _, t && t(f);
383
+ (y) => {
384
+ f.rules = y, t && t(f);
371
385
  },
372
- (_) => {
373
- s && s(_);
386
+ (y) => {
387
+ n && n(y);
374
388
  }
375
389
  );
376
390
  }
377
391
  },
378
- onFailure(p) {
379
- s && s(p);
392
+ onFailure(u) {
393
+ n && n(u);
380
394
  }
381
395
  });
382
- } catch (p) {
383
- console.log(p);
396
+ } catch (u) {
397
+ console.log(u);
384
398
  }
385
399
  }
386
- function Ae(e, t) {
387
- const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
400
+ function Ge(e, t) {
401
+ const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
388
402
  m(i, {
389
403
  method: "DELETE"
390
404
  });
391
405
  }
392
- function De(e, t, s, n = void 0, i = void 0) {
406
+ function Ke(e, t, n, s = void 0, i = void 0) {
393
407
  const { space: r, tenant: o } = e, a = {
394
408
  URITI: "/3drdfpersist/resources/v1/template-instances",
395
409
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -398,36 +412,36 @@ function De(e, t, s, n = void 0, i = void 0) {
398
412
  nexURImem: "/members",
399
413
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
400
414
  OPTsTenant: `tenant=dstenant:${o}`
401
- }, c = s, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
415
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, u = JSON.stringify(c);
402
416
  m(d, {
403
- headers: F,
417
+ headers: k,
404
418
  method: "PATCH",
405
- data: p,
419
+ data: u,
406
420
  type: "json",
407
- onComplete(u) {
408
- n && n(u);
421
+ onComplete(p) {
422
+ s && s(p);
409
423
  },
410
- onFailure(u) {
411
- i && i(u);
424
+ onFailure(p) {
425
+ i && i(p);
412
426
  }
413
427
  });
414
428
  }
415
- function ve(e, t, s, n = void 0, i = void 0) {
429
+ function Be(e, t, n, s = void 0, i = void 0) {
416
430
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
417
431
  m(a, {
418
432
  method: "PATCH",
419
- headers: F,
420
- data: JSON.stringify(s),
433
+ headers: k,
434
+ data: JSON.stringify(n),
421
435
  type: "json",
422
436
  onComplete(d) {
423
- n && n(d);
437
+ s && s(d);
424
438
  },
425
439
  onFailure(d) {
426
440
  i && i(d);
427
441
  }
428
442
  });
429
443
  }
430
- function xe(e, t, s = void 0, n = void 0) {
444
+ function Ee(e, t, n = void 0, s = void 0) {
431
445
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
432
446
  m(o, {
433
447
  opts: {
@@ -438,44 +452,44 @@ function xe(e, t, s = void 0, n = void 0) {
438
452
  }
439
453
  },
440
454
  onComplete(d) {
441
- s && s(JSON.parse(d));
455
+ n && n(JSON.parse(d));
442
456
  },
443
457
  onFailure(d) {
444
- n && n(d);
458
+ s && s(d);
445
459
  }
446
460
  });
447
461
  }
448
- async function H(e, t, s) {
462
+ async function te(e, t, n) {
449
463
  if (e.space) {
450
- const n = `${e.space}/resources/v1/application/CSRF`;
451
- m(n, {
464
+ const s = `${e.space}/resources/v1/application/CSRF`;
465
+ m(s, {
452
466
  onComplete(i) {
453
467
  i = JSON.parse(i), t && t(i.csrf);
454
468
  },
455
469
  onFailure(i, r, o) {
456
- s && s({ error: i, headers: r, xhr: o });
470
+ n && n({ error: i, headers: r, xhr: o });
457
471
  }
458
472
  });
459
473
  }
460
474
  }
461
- var I = {};
462
- function z(e, t) {
475
+ var F = {};
476
+ function ne(e, t) {
463
477
  return Object.prototype.hasOwnProperty.call(e, t);
464
478
  }
465
- var Q = function(e, t, s, n) {
466
- t = t || "&", s = s || "=";
479
+ var se = function(e, t, n, s) {
480
+ t = t || "&", n = n || "=";
467
481
  var i = {};
468
482
  if (typeof e != "string" || e.length === 0)
469
483
  return i;
470
484
  var r = /\+/g;
471
485
  e = e.split(t);
472
486
  var o = 1e3;
473
- n && typeof n.maxKeys == "number" && (o = n.maxKeys);
487
+ s && typeof s.maxKeys == "number" && (o = s.maxKeys);
474
488
  var a = e.length;
475
489
  o > 0 && a > o && (a = o);
476
490
  for (var c = 0; c < a; ++c) {
477
- var d = e[c].replace(r, "%20"), p = d.indexOf(s), u, f, l, g;
478
- p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
491
+ var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, h;
492
+ 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;
479
493
  }
480
494
  return i;
481
495
  }, N = function(e) {
@@ -489,17 +503,17 @@ var Q = function(e, t, s, n) {
489
503
  default:
490
504
  return "";
491
505
  }
492
- }, Z = function(e, t, s, n) {
493
- return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
494
- var r = encodeURIComponent(N(i)) + s;
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;
495
509
  return Array.isArray(e[i]) ? e[i].map(function(o) {
496
510
  return r + encodeURIComponent(N(o));
497
511
  }).join(t) : r + encodeURIComponent(N(e[i]));
498
- }).filter(Boolean).join(t) : n ? encodeURIComponent(N(n)) + s + encodeURIComponent(N(e)) : "";
512
+ }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
499
513
  };
500
- I.decode = I.parse = Q;
501
- I.encode = I.stringify = Z;
502
- async function x(e, t = void 0, s = void 0, n = void 0) {
514
+ F.decode = F.parse = se;
515
+ F.encode = F.stringify = ie;
516
+ async function L(e, t = void 0, n = void 0, s = void 0) {
503
517
  const i = e.space;
504
518
  if (t === void 0) {
505
519
  console.log("Le paramètre docid est obligatoire");
@@ -509,20 +523,20 @@ async function x(e, t = void 0, s = void 0, n = void 0) {
509
523
  m(r, {
510
524
  onComplete(o, a, c) {
511
525
  const d = JSON.parse(o);
512
- s && s(d);
526
+ n && n(d);
513
527
  },
514
528
  onFailure(o) {
515
- n && n(o);
529
+ s && s(o);
516
530
  }
517
531
  });
518
532
  }
519
- async function Pe(e, t = void 0, s = void 0, n = void 0) {
533
+ async function qe(e, t = void 0, n = void 0, s = void 0) {
520
534
  const i = e.space;
521
535
  if (t === void 0) {
522
536
  console.log("Le paramètre docids est obligatoire");
523
537
  return;
524
538
  }
525
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
539
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = F.stringify({
526
540
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
527
541
  });
528
542
  m(r, {
@@ -532,47 +546,47 @@ async function Pe(e, t = void 0, s = void 0, n = void 0) {
532
546
  },
533
547
  data: o,
534
548
  onComplete(a, c, d) {
535
- const p = JSON.parse(a);
536
- s && s(p);
549
+ const u = JSON.parse(a);
550
+ n && n(u);
537
551
  },
538
552
  onFailure(a) {
539
- n && n(a);
553
+ s && s(a);
540
554
  }
541
555
  });
542
556
  }
543
- function R(e, t = void 0, s = void 0) {
557
+ function U(e, t = void 0, n = void 0) {
544
558
  if (e.objID && e.objID !== "") {
545
- let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
546
- m(n, {
559
+ let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
560
+ m(s, {
547
561
  onComplete(i, r, o) {
548
562
  const a = JSON.parse(i);
549
563
  e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
550
564
  },
551
565
  onFailure(i) {
552
- s && s(i);
566
+ n && n(i);
553
567
  }
554
568
  });
555
569
  } else
556
570
  b(
557
571
  e,
558
- (n) => {
559
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
572
+ (s) => {
573
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
560
574
  },
561
- (n) => {
562
- s && s(n);
575
+ (s) => {
576
+ n && n(s);
563
577
  }
564
578
  );
565
579
  }
566
- function b(e, t = void 0, s = void 0) {
580
+ function b(e, t = void 0, n = void 0) {
567
581
  if (e.space) {
568
- const n = e.space + "/resources/v1/application/CSRF";
569
- m(n, {
582
+ const s = e.space + "/resources/v1/application/CSRF";
583
+ m(s, {
570
584
  onComplete(i, r, o) {
571
585
  const a = JSON.parse(i);
572
586
  t && t(a.csrf.value);
573
587
  },
574
588
  onFailure(i, r, o) {
575
- s && s({
589
+ n && n({
576
590
  response: i,
577
591
  headers: r,
578
592
  xhr: o
@@ -580,14 +594,14 @@ function b(e, t = void 0, s = void 0) {
580
594
  }
581
595
  });
582
596
  } else
583
- s && s("ERROR : url du 3DSpace non défini.");
597
+ n && n("ERROR : url du 3DSpace non défini.");
584
598
  }
585
- function k(e, t = void 0, s = void 0) {
586
- let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
587
- R(
599
+ function j(e, t = void 0, n = void 0) {
600
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
601
+ U(
588
602
  e,
589
603
  (i) => {
590
- m(n, {
604
+ m(s, {
591
605
  method: "PUT",
592
606
  headers: {
593
607
  ENO_CSRF_TOKEN: e.token
@@ -597,28 +611,28 @@ function k(e, t = void 0, s = void 0) {
597
611
  t && t(c, o);
598
612
  },
599
613
  onFailure(r, o) {
600
- console.warn("☠️ error => ", r, o), s && s(r, o);
614
+ console.warn("☠️ error => ", r, o), n && n(r, o);
601
615
  }
602
616
  });
603
617
  },
604
618
  (i) => {
605
- console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
619
+ console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
606
620
  }
607
621
  );
608
622
  }
609
- function Le(e, t, s = void 0, n = void 0, i = void 0) {
623
+ function Xe(e, t, n = void 0, s = void 0, i = void 0) {
610
624
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
611
- s || (s = e.token), m(r, {
625
+ n || (n = e.token), m(r, {
612
626
  method: "PUT",
613
627
  headers: {
614
- ENO_CSRF_TOKEN: s
628
+ ENO_CSRF_TOKEN: n
615
629
  },
616
630
  onComplete(o) {
617
631
  let a = JSON.parse(o);
618
632
  if (console.log("☠️ info => ", a), a.success === !0)
619
633
  try {
620
634
  const c = a.data[0].dataelements.ticketURL;
621
- n && n(c);
635
+ s && s(c);
622
636
  } catch (c) {
623
637
  i && i(c);
624
638
  }
@@ -628,18 +642,18 @@ function Le(e, t, s = void 0, n = void 0, i = void 0) {
628
642
  }
629
643
  });
630
644
  }
631
- function P(e, t, s, n, i, r = void 0, o = void 0) {
632
- const a = () => ee(
645
+ function M(e, t, n, s, i, r = void 0, o = void 0) {
646
+ const a = () => ae(
633
647
  e,
634
648
  t,
635
- s,
636
649
  n,
650
+ s,
637
651
  i,
638
652
  e.token,
639
653
  r,
640
654
  o
641
655
  );
642
- e.token ? a() : R(
656
+ e.token ? a() : U(
643
657
  e,
644
658
  t,
645
659
  (c) => {
@@ -647,21 +661,21 @@ function P(e, t, s, n, i, r = void 0, o = void 0) {
647
661
  }
648
662
  );
649
663
  }
650
- function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
664
+ function ae(e, t, n, s, i, r, o = void 0, a = void 0) {
651
665
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
652
666
  m(c, {
653
667
  method: "PUT",
654
668
  headers: {
655
669
  ENO_CSRF_TOKEN: e.token
656
670
  },
657
- onComplete(d, p, u) {
658
- const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, g = new FormData();
659
- let h;
660
- n instanceof Blob ? h = n : h = new Blob([n], {
671
+ onComplete(d, u, p) {
672
+ const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, h = new FormData();
673
+ let g;
674
+ s instanceof Blob ? g = s : g = new Blob([s], {
661
675
  type: "text/plain"
662
- }), g.append("__fcs__jobTicket", l.ticket), g.append("file_0", h, i);
663
- const y = {};
664
- y.method = "POST", y.data = g, y.onComplete = function(_) {
676
+ }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
677
+ const _ = {};
678
+ _.method = "POST", _.data = h, _.onComplete = function(y) {
665
679
  let S = {
666
680
  method: "PUT",
667
681
  headers: {
@@ -676,7 +690,7 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
676
690
  {
677
691
  dataelements: {
678
692
  title: i,
679
- receipt: _
693
+ receipt: y
680
694
  },
681
695
  updateAction: "REVISE"
682
696
  }
@@ -699,13 +713,13 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
699
713
  e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${w}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
700
714
  S
701
715
  );
702
- }, y.onFailure = function(_) {
703
- a && a(_);
704
- }, y.timeout = 0, m(l.ticketURL, y);
716
+ }, _.onFailure = function(y) {
717
+ a && a(y);
718
+ }, _.timeout = 0, m(l.ticketURL, _);
705
719
  }
706
720
  });
707
721
  }
708
- async function Me(e, t, s = void 0, n = void 0) {
722
+ async function We(e, t, n = void 0, s = void 0) {
709
723
  e.space, e.token, e.ctx;
710
724
  const i = e?.description, r = e?.title;
711
725
  let o = `${e.space}/resources/v1/modeler/documents/${t}`;
@@ -727,27 +741,127 @@ async function Me(e, t, s = void 0, n = void 0) {
727
741
  data: a,
728
742
  type: "json",
729
743
  onComplete(c) {
730
- s && s(c);
744
+ n && n(c);
731
745
  },
732
746
  onFailure(c) {
733
- n && n(c);
747
+ s && s(c);
734
748
  }
735
749
  });
736
750
  }
737
- async function Je(e, t, s, n = void 0, i = void 0) {
738
- e.space, e.token, e.ctx, x(
751
+ async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
752
+ let { tenant: o, cs_name: a } = e;
753
+ if (!o && !a) {
754
+ i && i("Credentials undefined");
755
+ return;
756
+ }
757
+ if (!t && !n) {
758
+ i && i("Définition du fichier undefined");
759
+ return;
760
+ }
761
+ const c = O.now().ts;
762
+ let d = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
763
+ a
764
+ )}/ticket?id=${c}&tenant=${o.toUpperCase()}&xrequestedwith=xmlhttprequest`;
765
+ m(
766
+ `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/session?tenant=${o.toUpperCase()}&xrequestedwith=xmlhttprequest`,
767
+ {
768
+ method: "GET",
769
+ onComplete(u) {
770
+ try {
771
+ u = JSON.parse(u);
772
+ const { csrftoken: p, isadmin: f } = u;
773
+ p && m(d, {
774
+ method: "GET",
775
+ headers: {
776
+ ENO_CSRF_TOKEN: e.token,
777
+ Accept: "application/json"
778
+ },
779
+ onComplete(l, h, g) {
780
+ try {
781
+ if (l = JSON.parse(l), l?.ticket) {
782
+ const { ticket: _, actionurl: y, jobticket: S } = l;
783
+ J(
784
+ { dataelements: { ticket: _, ticketURL: y } },
785
+ n,
786
+ t,
787
+ (w) => {
788
+ const x = new DOMParser().parseFromString(w, "text/html").body.firstChild.querySelector("input").getAttributeNode("value").value, q = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${a}/contents?receipt=${encodeURIComponent(
789
+ x
790
+ )}`;
791
+ let X = /(?:\.([^.]+))?$/.exec(t)[1];
792
+ const W = JSON.stringify({
793
+ actions: [],
794
+ businessobj: {
795
+ description: "",
796
+ file: t,
797
+ fullnameowner: "",
798
+ icon: "",
799
+ maturity: "",
800
+ modified: "",
801
+ owner: {},
802
+ thumbnail: "",
803
+ title: X ? t.split(".").slice(0, -1).join(".") : t,
804
+ type: {}
805
+ },
806
+ collabspace: a
807
+ });
808
+ m(q, {
809
+ method: "POST",
810
+ headers: {
811
+ Accept: "application/json",
812
+ "Content-Type": "application/json;charset=UTF-8",
813
+ "X-DS-CSRFTOKEN": p
814
+ },
815
+ data: W,
816
+ type: "json",
817
+ onComplete(I, we, Ce) {
818
+ console.log("_3DSpace_Upload_Doc | pushFileInFcs | onComplete", I), s && s(I);
819
+ },
820
+ onFailure(I) {
821
+ console.log("_3DSpace_Upload_Doc | pushFileInFcs | onFailure"), i && i(I);
822
+ }
823
+ });
824
+ },
825
+ (w) => {
826
+ console.warn("pushFileInFcs", w), i && i(w);
827
+ },
828
+ (w) => {
829
+ r && r({ fileName: t, progress: w });
830
+ }
831
+ );
832
+ }
833
+ } catch (_) {
834
+ i && i(_);
835
+ }
836
+ },
837
+ onFailure(l) {
838
+ console.warn("_3DSpace_Upload_Doc | onFailure"), i && i(l);
839
+ }
840
+ });
841
+ } catch {
842
+ i && i();
843
+ }
844
+ },
845
+ onFailure(u) {
846
+ i && i(u);
847
+ }
848
+ }
849
+ );
850
+ }
851
+ async function Ye(e, t, n, s = void 0, i = void 0) {
852
+ e.space, e.token, e.ctx, L(
739
853
  e,
740
854
  t,
741
855
  (r) => {
742
856
  const o = r.data[0].relateddata.files[0].id, a = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
743
- P(
857
+ M(
744
858
  e,
745
859
  t,
746
860
  o,
747
- s,
861
+ n,
748
862
  a,
749
863
  (c) => {
750
- n && n(c);
864
+ s && s(c);
751
865
  },
752
866
  (c) => {
753
867
  i && i(c);
@@ -759,21 +873,21 @@ async function Je(e, t, s, n = void 0, i = void 0) {
759
873
  }
760
874
  );
761
875
  }
762
- async function Ge(e, t, s, n, i = void 0, r = void 0) {
763
- te(
876
+ async function He(e, t, n, s, i = void 0, r = void 0) {
877
+ oe(
764
878
  e,
765
879
  (o) => {
766
880
  o?.items >= 1 && o.data.forEach((a) => {
767
- ne(
881
+ J(
768
882
  a,
769
883
  t,
770
- s,
884
+ n,
771
885
  (c) => {
772
- se(
886
+ re(
773
887
  e,
774
888
  c,
775
- s,
776
889
  n,
890
+ s,
777
891
  (d) => {
778
892
  d?.data.length ? i && i(d) : r && r({
779
893
  success: !1,
@@ -790,10 +904,10 @@ async function Ge(e, t, s, n, i = void 0, r = void 0) {
790
904
  (o) => console.warn(o)
791
905
  );
792
906
  }
793
- function te(e, t = void 0, s = void 0) {
907
+ function oe(e, t = void 0, n = void 0) {
794
908
  if (e?.space && e.token && e.ctx) {
795
- let n = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
796
- m(n, {
909
+ let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
910
+ m(s, {
797
911
  method: "PUT",
798
912
  headers: {
799
913
  ENO_CSRF_TOKEN: e.token,
@@ -809,31 +923,31 @@ function te(e, t = void 0, s = void 0) {
809
923
  t && t(i);
810
924
  },
811
925
  onFailure(i) {
812
- s && s(i);
926
+ n && n(i);
813
927
  }
814
928
  });
815
929
  } else
816
930
  console.log("Error de credentials", e);
817
931
  }
818
- function ne(e, t, s, n = void 0, i = void 0) {
932
+ function J(e, t, n, s = void 0, i = void 0) {
819
933
  let r = new FormData();
820
934
  t instanceof Blob || (t = new Blob([t], {
821
935
  type: "text/plain"
822
- })), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, s);
936
+ })), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, n);
823
937
  let o = e.dataelements.ticketURL;
824
938
  m(o, {
825
939
  method: "POST",
826
940
  data: r,
827
941
  onComplete(a) {
828
- n && n(a.replace(/[\n\r]/g, ""));
942
+ s && s(a.replace(/[\n\r]/g, ""));
829
943
  },
830
944
  onFailure(a) {
831
945
  i && i(a);
832
946
  }
833
947
  });
834
948
  }
835
- function se(e, t, s, n = void 0, i = void 0, r = void 0) {
836
- console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: s });
949
+ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
950
+ console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
837
951
  const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
838
952
  let a = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
839
953
  m(c, {
@@ -849,14 +963,14 @@ function se(e, t, s, n = void 0, i = void 0, r = void 0) {
849
963
  {
850
964
  type: "Document",
851
965
  dataelements: {
852
- title: o(s),
853
- description: n
966
+ title: o(n),
967
+ description: s
854
968
  },
855
969
  relateddata: {
856
970
  files: [
857
971
  {
858
972
  dataelements: {
859
- title: s,
973
+ title: n,
860
974
  receipt: `${t}
861
975
  `
862
976
  }
@@ -879,46 +993,46 @@ function se(e, t, s, n = void 0, i = void 0, r = void 0) {
879
993
  }
880
994
  });
881
995
  }
882
- function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
996
+ function R(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
883
997
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
884
998
  m(a, {
885
999
  method: "GET",
886
1000
  onComplete(c) {
887
1001
  const d = JSON.parse(c);
888
- let p = "", u, f, l;
1002
+ let u = "", p, f, l;
889
1003
  if (t) {
890
- let g = d.collabspaces.find((h) => h.title === t);
891
- if (g) {
892
- u = t;
893
- let h = g.couples;
894
- h = h.filter(
895
- (y, _, S) => _ === S.findIndex(
896
- (w) => w.organization.pid === y.organization.pid && w.role.pid === y.role.pid
1004
+ let h = d.collabspaces.find((g) => g.title === t);
1005
+ if (h) {
1006
+ p = t;
1007
+ let g = h.couples;
1008
+ g = g.filter(
1009
+ (_, y, S) => y === S.findIndex(
1010
+ (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
897
1011
  )
898
- ), s && (Array.isArray(s) ? s.forEach((y) => {
899
- l || h.forEach((_) => {
900
- if (y === _.role.name && n === _.organization.title)
901
- l = y, f = n;
902
- else if (y === _.role.name) {
903
- let S = h.filter(
904
- (w) => w.role.name === y
1012
+ ), n && (Array.isArray(n) ? n.forEach((_) => {
1013
+ l || g.forEach((y) => {
1014
+ if (_ === y.role.name && s === y.organization.title)
1015
+ l = _, f = s;
1016
+ else if (_ === y.role.name) {
1017
+ let S = g.filter(
1018
+ (w) => w.role.name === _
905
1019
  );
906
1020
  S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
907
1021
  }
908
1022
  });
909
- }) : h.forEach((y) => {
910
- if (s === y.role.name && n === y.organization.title)
911
- l = s, f = n;
912
- else if (s === y.role.name) {
913
- let _ = h.filter(
914
- (S) => S.role.name === s
1023
+ }) : g.forEach((_) => {
1024
+ if (n === _.role.name && s === _.organization.title)
1025
+ l = n, f = s;
1026
+ else if (n === _.role.name) {
1027
+ let y = g.filter(
1028
+ (S) => S.role.name === n
915
1029
  );
916
- _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
1030
+ y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
917
1031
  }
918
1032
  }));
919
1033
  }
920
1034
  }
921
- u && f && l ? (p = l + "." + f + "." + u, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = l + "." + f + "." + u, r(p));
1035
+ p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
922
1036
  },
923
1037
  onFailure(c, d) {
924
1038
  console.warn("Erreur de récupération du contexte de sécurité. => ", {
@@ -928,29 +1042,29 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
928
1042
  }
929
1043
  });
930
1044
  }
931
- async function L(e, t = void 0, s = void 0) {
1045
+ async function G(e, t = void 0, n = void 0) {
932
1046
  return (!e.objID || e.objID === "") && (console.warn(
933
1047
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
934
- ), s && s(
1048
+ ), n && n(
935
1049
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
936
1050
  )), (e.space === "" || !e.space) && (console.warn(
937
1051
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
938
- ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && H(
1052
+ ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
939
1053
  e,
940
- (n) => {
941
- e.token = n;
1054
+ (s) => {
1055
+ e.token = s;
942
1056
  },
943
- (n) => {
944
- console.log("☠️ error => ", n);
1057
+ (s) => {
1058
+ console.log("☠️ error => ", s);
945
1059
  }
946
- ), new Promise((n, i) => {
947
- k(
1060
+ ), new Promise((s, i) => {
1061
+ j(
948
1062
  e,
949
1063
  (r) => {
950
1064
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
951
1065
  t && t(o);
952
1066
  }).catch((o) => {
953
- s && s(o);
1067
+ n && n(o);
954
1068
  })) : m(r, {
955
1069
  onComplete(o) {
956
1070
  let a;
@@ -959,10 +1073,10 @@ async function L(e, t = void 0, s = void 0) {
959
1073
  } catch {
960
1074
  a = o;
961
1075
  }
962
- t && typeof t == "function" && t(a), n(a);
1076
+ t && typeof t == "function" && t(a), s(a);
963
1077
  },
964
1078
  onFailure(o, a, c) {
965
- s && (console.log("error http", o), s({
1079
+ n && (console.log("error http", o), n({
966
1080
  msg: JSON.parse(o),
967
1081
  headers: a,
968
1082
  xhr: c
@@ -975,26 +1089,26 @@ async function L(e, t = void 0, s = void 0) {
975
1089
  });
976
1090
  },
977
1091
  (r) => {
978
- s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1092
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
979
1093
  }
980
1094
  );
981
1095
  });
982
1096
  }
983
- async function ie(e, t, s = void 0, n = void 0) {
984
- typeof t < "u" && Array.isArray(t) && t?.length > 0 ? X({
1097
+ async function ce(e, t, n = void 0, s = void 0) {
1098
+ typeof t < "u" && Array.isArray(t) && t?.length > 0 ? z({
985
1099
  credentials: e,
986
1100
  myArray: t,
987
1101
  chunk: 80,
988
- fn_to_call: ae
1102
+ fn_to_call: de
989
1103
  }, (r) => {
990
- s && s(r);
1104
+ n && n(r);
991
1105
  }) : (console.warn(
992
1106
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
993
- ), n && n(
1107
+ ), s && s(
994
1108
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
995
1109
  ));
996
1110
  }
997
- function ae(e, t, s = void 0, n = void 0, i = void 0) {
1111
+ function de(e, t, n = void 0, s = void 0, i = void 0) {
998
1112
  const r = [];
999
1113
  t.forEach((c) => {
1000
1114
  r.push({
@@ -1015,30 +1129,30 @@ function ae(e, t, s = void 0, n = void 0, i = void 0) {
1015
1129
  type: "json",
1016
1130
  onComplete(c) {
1017
1131
  const d = c.data;
1018
- c.success === !0 && (s && s(), d.forEach((p) => {
1132
+ c.success === !0 && (n && n(), d.forEach((u) => {
1019
1133
  try {
1020
- const u = p.dataelements.fileName, f = p.dataelements.ticketURL;
1134
+ const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
1021
1135
  m(f, {
1022
- onComplete: (l, g) => {
1023
- let h;
1136
+ onComplete: (l, h) => {
1137
+ let g;
1024
1138
  try {
1025
- h = JSON.parse(l);
1139
+ g = JSON.parse(l);
1026
1140
  } catch {
1027
- h = l.blob();
1141
+ g = l.blob();
1028
1142
  }
1029
- n && n({
1030
- objectId: p.id,
1031
- headers: g,
1032
- fileName: u,
1033
- data: h
1143
+ s && s({
1144
+ objectId: u.id,
1145
+ headers: h,
1146
+ fileName: p,
1147
+ data: g
1034
1148
  });
1035
1149
  },
1036
1150
  onFailure: (l) => {
1037
1151
  console.log("error http", l);
1038
1152
  }
1039
1153
  });
1040
- } catch (u) {
1041
- console.log(u), i && i(u);
1154
+ } catch (p) {
1155
+ console.log(p), i && i(p);
1042
1156
  }
1043
1157
  }));
1044
1158
  },
@@ -1047,7 +1161,7 @@ function ae(e, t, s = void 0, n = void 0, i = void 0) {
1047
1161
  }
1048
1162
  });
1049
1163
  }
1050
- function Ee(e, t, s = void 0, n = void 0) {
1164
+ function ze(e, t, n = void 0, s = void 0) {
1051
1165
  return new Promise((i) => {
1052
1166
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1053
1167
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -1068,17 +1182,17 @@ function Ee(e, t, s = void 0, n = void 0) {
1068
1182
  }),
1069
1183
  type: "json",
1070
1184
  onComplete(a) {
1071
- s && s(a);
1185
+ n && n(a);
1072
1186
  },
1073
1187
  onFailure(a) {
1074
- n && n(a);
1188
+ s && s(a);
1075
1189
  }
1076
1190
  };
1077
1191
  m(r, o);
1078
1192
  }
1079
1193
  });
1080
1194
  }
1081
- function Ke(e, t, s, n = void 0, i = void 0) {
1195
+ function Qe(e, t, n, s = void 0, i = void 0) {
1082
1196
  return new Promise((r) => {
1083
1197
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1084
1198
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1094,13 +1208,13 @@ function Ke(e, t, s, n = void 0, i = void 0) {
1094
1208
  data: [
1095
1209
  {
1096
1210
  id: t,
1097
- nextState: s
1211
+ nextState: n
1098
1212
  }
1099
1213
  ]
1100
1214
  }),
1101
1215
  type: "json",
1102
1216
  onComplete(c) {
1103
- n && n(c);
1217
+ s && s(c);
1104
1218
  },
1105
1219
  onFailure(c) {
1106
1220
  i && i(c);
@@ -1110,11 +1224,11 @@ function Ke(e, t, s, n = void 0, i = void 0) {
1110
1224
  }
1111
1225
  });
1112
1226
  }
1113
- function Be(e, t, s = void 0, n = void 0) {
1227
+ function Ze(e, t, n = void 0, s = void 0) {
1114
1228
  return new Promise((i) => {
1115
1229
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1116
1230
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1117
- U(
1231
+ R(
1118
1232
  e.space,
1119
1233
  "ESPACE COMMUN",
1120
1234
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1141,21 +1255,21 @@ function Be(e, t, s = void 0, n = void 0) {
1141
1255
  }),
1142
1256
  type: "json",
1143
1257
  onComplete(a) {
1144
- s && s(a);
1258
+ n && n(a);
1145
1259
  },
1146
1260
  onFailure(a) {
1147
- n && n(a);
1261
+ s && s(a);
1148
1262
  }
1149
1263
  };
1150
1264
  m(r, o);
1151
1265
  }
1152
1266
  });
1153
1267
  }
1154
- function We(e, t, s = void 0, n = void 0) {
1268
+ function et(e, t, n = void 0, s = void 0) {
1155
1269
  return new Promise((i) => {
1156
1270
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1157
1271
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1158
- U(
1272
+ R(
1159
1273
  e.space,
1160
1274
  "ESPACE COMMUN",
1161
1275
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1188,21 +1302,21 @@ function We(e, t, s = void 0, n = void 0) {
1188
1302
  }),
1189
1303
  type: "json",
1190
1304
  onComplete(a) {
1191
- s && s(a);
1305
+ n && n(a);
1192
1306
  },
1193
1307
  onFailure(a) {
1194
- n && n(a);
1308
+ s && s(a);
1195
1309
  }
1196
1310
  };
1197
1311
  m(r, o);
1198
1312
  }
1199
1313
  });
1200
1314
  }
1201
- function Xe(e, t, s, n = void 0, i = void 0) {
1315
+ function tt(e, t, n, s = void 0, i = void 0) {
1202
1316
  return new Promise((r) => {
1203
1317
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1204
1318
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1205
- U(
1319
+ R(
1206
1320
  e.space,
1207
1321
  "ESPACE COMMUN",
1208
1322
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1224,9 +1338,9 @@ function Xe(e, t, s, n = void 0, i = void 0) {
1224
1338
  data: [
1225
1339
  {
1226
1340
  physicalid: t,
1227
- proposedRevision: s,
1341
+ proposedRevision: n,
1228
1342
  modifiedAttributes: {
1229
- revision: s
1343
+ revision: n
1230
1344
  }
1231
1345
  }
1232
1346
  ],
@@ -1235,7 +1349,7 @@ function Xe(e, t, s, n = void 0, i = void 0) {
1235
1349
  }),
1236
1350
  type: "json",
1237
1351
  onComplete(c) {
1238
- n && n(c);
1352
+ s && s(c);
1239
1353
  },
1240
1354
  onFailure(c) {
1241
1355
  i && i(c);
@@ -1245,20 +1359,20 @@ function Xe(e, t, s, n = void 0, i = void 0) {
1245
1359
  }
1246
1360
  });
1247
1361
  }
1248
- function Ve(e, t, s, n, i = void 0, r = void 0) {
1362
+ function nt(e, t, n, s, i = void 0, r = void 0) {
1249
1363
  return new Promise((o) => {
1250
1364
  const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1251
1365
  let c = {
1252
1366
  attributes: {
1253
- title: s,
1254
- description: n,
1367
+ title: n,
1368
+ description: s,
1255
1369
  inheritedAccess: "no"
1256
1370
  }
1257
1371
  }, d = {
1258
1372
  items: []
1259
1373
  };
1260
1374
  t && (d.parentId = t), d.items.push(c);
1261
- let p = {
1375
+ let u = {
1262
1376
  method: "POST",
1263
1377
  headers: {
1264
1378
  Accept: "application/json",
@@ -1268,17 +1382,17 @@ function Ve(e, t, s, n, i = void 0, r = void 0) {
1268
1382
  },
1269
1383
  data: JSON.stringify(d),
1270
1384
  type: "json",
1271
- onComplete(u) {
1272
- i && i(u);
1385
+ onComplete(p) {
1386
+ i && i(p);
1273
1387
  },
1274
- onFailure(u) {
1275
- r && r(u);
1388
+ onFailure(p) {
1389
+ r && r(p);
1276
1390
  }
1277
1391
  };
1278
- m(a, p);
1392
+ m(a, u);
1279
1393
  });
1280
1394
  }
1281
- function qe(e, t, s, n, i = void 0, r = void 0) {
1395
+ function st(e, t, n, s, i = void 0, r = void 0) {
1282
1396
  return console.log("credentials", e), new Promise((o) => {
1283
1397
  `${e.space}`, JSON.stringify({
1284
1398
  csrf: {
@@ -1292,8 +1406,8 @@ function qe(e, t, s, n, i = void 0, r = void 0) {
1292
1406
  relId: t,
1293
1407
  id: t,
1294
1408
  dataelements: {
1295
- personList: s,
1296
- eventsList: n
1409
+ personList: n,
1410
+ eventsList: s
1297
1411
  },
1298
1412
  tenant: e.tenant
1299
1413
  }
@@ -1302,12 +1416,12 @@ function qe(e, t, s, n, i = void 0, r = void 0) {
1302
1416
  });
1303
1417
  }
1304
1418
  //!SECTION
1305
- function Ye(e, t = void 0, s = void 0) {
1306
- const n = {
1419
+ function it(e, t = void 0, n = void 0) {
1420
+ const s = {
1307
1421
  base: `${e.space}`,
1308
1422
  uri: "/resources/bps/cspaces",
1309
1423
  optTenant: `tenant=${e.tenant}`
1310
- }, i = `${n.base}${n.uri}?${n.optTenant}`;
1424
+ }, i = `${s.base}${s.uri}?${s.optTenant}`;
1311
1425
  m(i, {
1312
1426
  method: "GET",
1313
1427
  headers: {
@@ -1319,54 +1433,54 @@ function Ye(e, t = void 0, s = void 0) {
1319
1433
  t && t(a, o);
1320
1434
  },
1321
1435
  onFailure(r, o, a) {
1322
- s && s({ response: r, headers: o, xhr: a });
1436
+ n && n({ response: r, headers: o, xhr: a });
1323
1437
  }
1324
1438
  });
1325
1439
  }
1326
- function He(e, t, s, n) {
1327
- k(
1440
+ function at(e, t, n, s) {
1441
+ j(
1328
1442
  e.space,
1329
1443
  t,
1330
1444
  (i) => {
1331
1445
  m(i, {
1332
1446
  header: { ENO_CSRF_TOKEN: e.token },
1333
1447
  onComplete: (r) => {
1334
- s && s(r);
1448
+ n && n(r);
1335
1449
  },
1336
1450
  onFailure: (r) => {
1337
- console.log("error http", r), n && n(r);
1451
+ console.log("error http", r), s && s(r);
1338
1452
  }
1339
1453
  });
1340
1454
  }
1341
1455
  );
1342
1456
  }
1343
- async function ze(e, t, s = void 0, n = void 0) {
1457
+ async function ot(e, t, n = void 0, s = void 0) {
1344
1458
  return new Promise((i) => {
1345
- k(e, t, (r) => {
1459
+ j(e, t, (r) => {
1346
1460
  m(r, {
1347
- onComplete: (o, a, c) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, c), i),
1461
+ onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1348
1462
  onFailure: (o, a, c) => {
1349
- n && n(o, a, c), console.log(o, a?.errormsg);
1463
+ s && s(o, a, c), console.log(o, a?.errormsg);
1350
1464
  }
1351
1465
  });
1352
1466
  });
1353
1467
  });
1354
1468
  }
1355
- function Qe(e, t, s, n = void 0, i = void 0) {
1469
+ function rt(e, t, n, s = void 0, i = void 0) {
1356
1470
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1357
- R(
1471
+ U(
1358
1472
  e,
1359
- s,
1473
+ n,
1360
1474
  (o) => {
1361
1475
  const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1362
- P(
1476
+ M(
1363
1477
  e,
1364
- s,
1478
+ n,
1365
1479
  a,
1366
1480
  r,
1367
1481
  c,
1368
1482
  (d) => {
1369
- n && n(d);
1483
+ s && s(d);
1370
1484
  },
1371
1485
  (d) => {
1372
1486
  i && i(d);
@@ -1375,94 +1489,94 @@ function Qe(e, t, s, n = void 0, i = void 0) {
1375
1489
  }
1376
1490
  );
1377
1491
  }
1378
- let M, J;
1379
- const j = [];
1380
- async function Ze(e, t = void 0, s = void 0) {
1381
- e.objID && e.objID !== "" ? R(
1492
+ let K, B;
1493
+ const D = [];
1494
+ async function ct(e, t = void 0, n = void 0) {
1495
+ e.objID && e.objID !== "" ? U(
1382
1496
  e,
1383
- (n) => {
1384
- t && t(n);
1497
+ (s) => {
1498
+ t && t(s);
1385
1499
  },
1386
- (n) => {
1387
- s && s(n);
1500
+ (s) => {
1501
+ n && n(s);
1388
1502
  }
1389
1503
  ) : (e.objID === null || e.objID === "") && b(
1390
1504
  e,
1391
- (n) => {
1392
- t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1505
+ (s) => {
1506
+ t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1393
1507
  },
1394
- (n) => {
1395
- s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1508
+ (s) => {
1509
+ n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1396
1510
  }
1397
1511
  );
1398
1512
  }
1399
- async function et(e, t = void 0, s = void 0) {
1400
- console.log("getDatasByTenant (getDocuments)", e), await L(
1513
+ async function dt(e, t = void 0, n = void 0) {
1514
+ console.log("getDatasByTenant (getDocuments)", e), await G(
1401
1515
  e,
1402
- (n) => {
1516
+ (s) => {
1403
1517
  const i = {};
1404
- i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1518
+ i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1405
1519
  },
1406
- (n) => {
1407
- s && s?.(n);
1520
+ (s) => {
1521
+ n && n?.(s);
1408
1522
  }
1409
1523
  );
1410
1524
  }
1411
- function tt(e, t = void 0, s = void 0) {
1412
- const n = [];
1525
+ function ut(e, t = void 0, n = void 0) {
1526
+ const s = [];
1413
1527
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1414
1528
  console.warn("la liste est vide ou n'est pas un tableau");
1415
1529
  return;
1416
1530
  }
1417
1531
  e.objIds.forEach((i, r) => {
1418
- L(
1532
+ G(
1419
1533
  e,
1420
1534
  i.objID,
1421
1535
  (o) => {
1422
- n.push({ [i.name]: o }), i.name === "dbProjets" && (M = o.affaires.map((a) => a.objectID), oe(e, J)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1536
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (K = o.affaires.map((a) => a.objectID), ue(e, B)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1423
1537
  }
1424
1538
  );
1425
1539
  });
1426
1540
  }
1427
- function oe(e, t, s = void 0, n = void 0) {
1428
- ie(
1541
+ function ue(e, t, n = void 0, s = void 0) {
1542
+ ce(
1429
1543
  e,
1430
- M,
1544
+ K,
1431
1545
  (i) => {
1432
1546
  const r = [...t];
1433
- r.find((o) => o.objectID === i.objectId).data = i.data, J = r, j.push(i.data), s && s(j);
1547
+ r.find((o) => o.objectID === i.objectId).data = i.data, B = r, D.push(i.data), n && n(D);
1434
1548
  },
1435
1549
  (i) => {
1436
- n && (n(i), console.log(i));
1550
+ s && (s(i), console.log(i));
1437
1551
  }
1438
1552
  );
1439
1553
  }
1440
- const re = "FA35FB9B177A280065800EA0000F599C", ce = [
1554
+ const pe = "FA35FB9B177A280065800EA0000F599C", le = [
1441
1555
  "swym",
1442
1556
  "3dspace",
1443
1557
  "drive",
1444
1558
  "usersgroup",
1445
1559
  "3dplan",
1446
1560
  "dashboard"
1447
- ], G = {
1561
+ ], E = {
1448
1562
  how: "ds6w:how",
1449
1563
  what: "ds6w:what",
1450
1564
  when: "ds6w:when",
1451
1565
  where: "ds6w:where",
1452
1566
  who: "ds6w:who",
1453
1567
  why: "ds6w:why"
1454
- }, de = {
1455
- objId: re,
1568
+ }, fe = {
1569
+ objId: pe,
1456
1570
  pred: "who",
1457
1571
  order_by: "desc",
1458
1572
  tag: "testTag"
1459
1573
  };
1460
- function nt(e, t, s = void 0, n = void 0) {
1574
+ function pt(e, t, n = void 0, s = void 0) {
1461
1575
  const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1462
1576
  uri: "/resources/6w/tags",
1463
1577
  otpCTX: "SecurityContext=preferred",
1464
1578
  optTenant: `tenant=${r}`
1465
- }, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, u = {
1579
+ }, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1466
1580
  tag: [
1467
1581
  {
1468
1582
  subject: [
@@ -1470,54 +1584,54 @@ function nt(e, t, s = void 0, n = void 0) {
1470
1584
  uri: `pid://${o}`
1471
1585
  }
1472
1586
  ],
1473
- predicate: G[a],
1587
+ predicate: E[a],
1474
1588
  object: {
1475
1589
  literal: c
1476
1590
  }
1477
1591
  }
1478
1592
  ]
1479
1593
  };
1480
- m(p, {
1594
+ m(u, {
1481
1595
  method: "PUT",
1482
1596
  headers: {
1483
1597
  "Content-Type": "application/json",
1484
1598
  Accept: "application/json"
1485
1599
  },
1486
- data: JSON.stringify(u),
1600
+ data: JSON.stringify(p),
1487
1601
  onComplete(f) {
1488
1602
  JSON.parse(f);
1489
1603
  const l = {};
1490
1604
  setTimeout(() => {
1491
- x(
1605
+ L(
1492
1606
  e,
1493
1607
  o,
1494
- (g) => {
1495
- const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1496
- l.name = h, l.ext = y, l.createBy = _, t.info = { ...l }, ue(
1608
+ (h) => {
1609
+ const g = h.data[0].dataelements.title, _ = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", y = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1610
+ l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, me(
1497
1611
  e,
1498
1612
  t,
1499
1613
  (S) => {
1500
- s && s(S);
1614
+ n && n(S);
1501
1615
  },
1502
1616
  (S) => {
1503
- n && n(S);
1617
+ s && s(S);
1504
1618
  }
1505
1619
  );
1506
1620
  },
1507
- (g, h) => {
1508
- const y = g;
1509
- y.msg = h.errormsg, y.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", y), n && n(y);
1621
+ (h, g) => {
1622
+ const _ = h;
1623
+ _.msg = g.errormsg, _.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", _), s && s(_);
1510
1624
  }
1511
1625
  );
1512
1626
  }, 2e3);
1513
1627
  },
1514
1628
  onFailure(f, l) {
1515
- const g = f;
1516
- g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1629
+ const h = f;
1630
+ h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
1517
1631
  }
1518
1632
  });
1519
1633
  }
1520
- function ue(e, t, s = void 0, n = void 0) {
1634
+ function me(e, t, n = void 0, s = void 0) {
1521
1635
  console.log("obj ", t);
1522
1636
  const i = t.info.name, r = {
1523
1637
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1525,7 +1639,7 @@ function ue(e, t, s = void 0, n = void 0) {
1525
1639
  }, o = `${r.baseUrl}${r.uri}`, a = {
1526
1640
  "Content-Type": "application/json",
1527
1641
  Accept: "application/json,text/javascript,*/*"
1528
- }, c = B(), d = {
1642
+ }, c = Y(), d = {
1529
1643
  with_indexing_date: !0,
1530
1644
  with_synthesis: !0,
1531
1645
  with_nls: !1,
@@ -1567,7 +1681,7 @@ function ue(e, t, s = void 0, n = void 0) {
1567
1681
  }
1568
1682
  },
1569
1683
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1570
- order_by: de.order_by,
1684
+ order_by: fe.order_by,
1571
1685
  order_field: "relevance",
1572
1686
  select_snippets: [
1573
1687
  "ds6w:snippet",
@@ -1578,7 +1692,7 @@ function ue(e, t, s = void 0, n = void 0) {
1578
1692
  ],
1579
1693
  nresults: 40,
1580
1694
  start: "0",
1581
- source: ce,
1695
+ source: le,
1582
1696
  tenant: e.tenant,
1583
1697
  login: {
1584
1698
  "3dspace": {
@@ -1590,17 +1704,17 @@ function ue(e, t, s = void 0, n = void 0) {
1590
1704
  method: "POST",
1591
1705
  headers: a,
1592
1706
  data: JSON.stringify(d),
1593
- onComplete(p) {
1594
- const u = JSON.parse(p);
1595
- s(u);
1707
+ onComplete(u) {
1708
+ const p = JSON.parse(u);
1709
+ n(p);
1596
1710
  },
1597
- onFailure(p, u) {
1598
- const f = p;
1599
- f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
1711
+ onFailure(u, p) {
1712
+ const f = u;
1713
+ 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);
1600
1714
  }
1601
1715
  });
1602
1716
  }
1603
- function st(e, t, s = void 0, n = void 0) {
1717
+ function lt(e, t, n = void 0, s = void 0) {
1604
1718
  const { objId: i, pred: r, tag: o } = t, a = {
1605
1719
  uri: "/resources/6w/tags",
1606
1720
  otpCTX: "SecurityContext=preferred",
@@ -1613,7 +1727,7 @@ function st(e, t, s = void 0, n = void 0) {
1613
1727
  uri: `pid://${i}`
1614
1728
  }
1615
1729
  ],
1616
- predicate: G[r],
1730
+ predicate: E[r],
1617
1731
  object: {
1618
1732
  literal: o
1619
1733
  }
@@ -1627,16 +1741,16 @@ function st(e, t, s = void 0, n = void 0) {
1627
1741
  "Content-Type": "application/json",
1628
1742
  Accept: "application/json,text/javascript,*/*"
1629
1743
  },
1630
- onComplete(p) {
1631
- s && s(p);
1744
+ onComplete(u) {
1745
+ n && n(u);
1632
1746
  },
1633
- onFailure(p, u) {
1634
- const f = p;
1635
- f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
1747
+ onFailure(u, p) {
1748
+ const f = u;
1749
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1636
1750
  }
1637
1751
  });
1638
1752
  }
1639
- function it(e, t = "", s = void 0, n = void 0) {
1753
+ function ft(e, t = "", n = void 0, s = void 0) {
1640
1754
  const { space: i } = e;
1641
1755
  if (t === "")
1642
1756
  return;
@@ -1651,29 +1765,29 @@ function it(e, t = "", s = void 0, n = void 0) {
1651
1765
  headers: o,
1652
1766
  data: c,
1653
1767
  onComplete(d) {
1654
- s && s(JSON.parse(d));
1768
+ n && n(JSON.parse(d));
1655
1769
  },
1656
- onFailure(d, p) {
1657
- const u = d;
1658
- u.msg = p.error, n && n(u);
1770
+ onFailure(d, u) {
1771
+ const p = d;
1772
+ p.msg = u.error, s && s(p);
1659
1773
  }
1660
1774
  });
1661
1775
  }
1662
- async function C(e, t = void 0, s = void 0) {
1663
- const n = e._3DSwym + "/api/index/tk";
1664
- return m(n, {
1776
+ async function C(e, t = void 0, n = void 0) {
1777
+ const s = e._3DSwym + "/api/index/tk";
1778
+ return m(s, {
1665
1779
  onComplete(i, r, o) {
1666
1780
  const a = JSON.parse(i);
1667
1781
  if (t)
1668
1782
  return t(a), e.token = a?.result?.ServerToken;
1669
1783
  },
1670
1784
  onFailure(i) {
1671
- s && s(i);
1785
+ n && n(i);
1672
1786
  }
1673
1787
  });
1674
1788
  }
1675
- function at(e, t = void 0, s = void 0) {
1676
- const n = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1789
+ function mt(e, t = void 0, n = void 0) {
1790
+ const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1677
1791
  params: {
1678
1792
  community_id: null,
1679
1793
  hash_key: null,
@@ -1684,7 +1798,7 @@ function at(e, t = void 0, s = void 0) {
1684
1798
  }
1685
1799
  };
1686
1800
  C(e, (r) => {
1687
- m(n, {
1801
+ m(s, {
1688
1802
  method: "POST",
1689
1803
  headers: {
1690
1804
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1697,13 +1811,13 @@ function at(e, t = void 0, s = void 0) {
1697
1811
  t && t(o, a);
1698
1812
  },
1699
1813
  onFailure(o, a) {
1700
- s && s(o, a);
1814
+ n && n(o, a);
1701
1815
  }
1702
1816
  });
1703
1817
  });
1704
1818
  }
1705
- function ot(e, t = void 0, s = void 0) {
1706
- const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1819
+ function ht(e, t = void 0, n = void 0) {
1820
+ const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1707
1821
  params: {
1708
1822
  idsToFilterArr: [],
1709
1823
  mode: "offline",
@@ -1713,7 +1827,7 @@ function ot(e, t = void 0, s = void 0) {
1713
1827
  }
1714
1828
  };
1715
1829
  C(e, (r) => {
1716
- m(n, {
1830
+ m(s, {
1717
1831
  method: "POST",
1718
1832
  headers: {
1719
1833
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1727,18 +1841,18 @@ function ot(e, t = void 0, s = void 0) {
1727
1841
  t && t(c, o);
1728
1842
  },
1729
1843
  onFailure(o, a) {
1730
- s && s(o, a);
1844
+ n && n(o, a);
1731
1845
  }
1732
1846
  });
1733
1847
  });
1734
1848
  }
1735
- function rt(e, t = void 0, s = void 0) {
1736
- const n = {
1849
+ function gt(e, t = void 0, n = void 0) {
1850
+ const s = {
1737
1851
  base: e._3DSwym,
1738
1852
  uri: "/api/community/listmycommunities",
1739
1853
  limit: `/limit/${e.limit ? e.limit : 500}`,
1740
1854
  page: `/page/${e.page ? e.page : "1"}`
1741
- }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1855
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1742
1856
  C(e, (o) => {
1743
1857
  m(i, {
1744
1858
  method: "GET",
@@ -1746,10 +1860,10 @@ function rt(e, t = void 0, s = void 0) {
1746
1860
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1747
1861
  },
1748
1862
  onComplete(a, c, d) {
1749
- const u = JSON.parse(a).result;
1863
+ const p = JSON.parse(a).result;
1750
1864
  let f = 0;
1751
- u.forEach((l) => {
1752
- const g = {
1865
+ p.forEach((l) => {
1866
+ const h = {
1753
1867
  description: l.description,
1754
1868
  id: l.id,
1755
1869
  title: l.title,
@@ -1757,24 +1871,24 @@ function rt(e, t = void 0, s = void 0) {
1757
1871
  role: l.role,
1758
1872
  access: l.access
1759
1873
  };
1760
- pe(
1874
+ he(
1761
1875
  e,
1762
1876
  l.id,
1763
- (h) => {
1764
- f++, g.members = h, r.push(g), f === u.length && t && t(r);
1877
+ (g) => {
1878
+ f++, h.members = g, r.push(h), f === p.length && t && t(r);
1765
1879
  },
1766
- (h) => s(h)
1880
+ (g) => n(g)
1767
1881
  );
1768
1882
  });
1769
1883
  },
1770
1884
  onFailure(a, c) {
1771
1885
  const d = a;
1772
- d.status = c.status, d.response = c.errormsg, s && s(d);
1886
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1773
1887
  }
1774
1888
  });
1775
1889
  });
1776
1890
  }
1777
- function pe(e, t, s, n) {
1891
+ function he(e, t, n, s) {
1778
1892
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
1779
1893
  params: {
1780
1894
  page: e.page ? e.page : 1,
@@ -1793,18 +1907,18 @@ function pe(e, t, s, n) {
1793
1907
  data: JSON.stringify(r),
1794
1908
  type: "json",
1795
1909
  onComplete(a, c, d) {
1796
- s && s(a);
1910
+ n && n(a);
1797
1911
  },
1798
1912
  onFailure(a, c) {
1799
1913
  const d = a;
1800
- d.status = c.status, d.response = c.errormsg, n && n(d);
1914
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1801
1915
  }
1802
1916
  });
1803
1917
  });
1804
1918
  }
1805
- function ct(e, t = void 0, s = void 0) {
1806
- const n = "YXdA5x4DSUKtlAi2wmnyTA";
1807
- e.commu_id || (e.commu_id = n);
1919
+ function _t(e, t = void 0, n = void 0) {
1920
+ const s = "YXdA5x4DSUKtlAi2wmnyTA";
1921
+ e.commu_id || (e.commu_id = s);
1808
1922
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1809
1923
  C(e, (r) => {
1810
1924
  m(i, {
@@ -1820,12 +1934,12 @@ function ct(e, t = void 0, s = void 0) {
1820
1934
  },
1821
1935
  onFailure(o, a) {
1822
1936
  const c = o;
1823
- c.status = a.status, c.response = a.errormsg, s && s(c);
1937
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1824
1938
  }
1825
1939
  });
1826
1940
  });
1827
1941
  }
1828
- function dt(e, t, s = void 0, n = void 0) {
1942
+ function yt(e, t, n = void 0, s = void 0) {
1829
1943
  const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
1830
1944
  console.log("__listAllContacts", i.hits);
1831
1945
  const a = `${o}/api/directmessages`, c = {
@@ -1834,41 +1948,41 @@ function dt(e, t, s = void 0, n = void 0) {
1834
1948
  id_msg: "",
1835
1949
  senderId: e.currentUser.login,
1836
1950
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1837
- msg: fe(t.msg)
1951
+ msg: _e(t.msg)
1838
1952
  };
1839
- let p = !1;
1840
- le(
1953
+ let u = !1;
1954
+ ge(
1841
1955
  c.users,
1842
- (u) => {
1843
- u !== void 0 && (d.id_msg = u.id, p = !0, A(e, d));
1956
+ (p) => {
1957
+ p !== void 0 && (d.id_msg = p.id, u = !0, v(e, d));
1844
1958
  },
1845
- (u) => {
1846
- p = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", u), n && n(u), d.id_msg = "";
1959
+ (p) => {
1960
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
1847
1961
  }
1848
- ), p === !1 && setTimeout(() => {
1849
- p === !1 && C(e, (u) => {
1962
+ ), u === !1 && setTimeout(() => {
1963
+ u === !1 && C(e, (p) => {
1850
1964
  m(a, {
1851
1965
  method: "POST",
1852
1966
  headers: {
1853
1967
  "Content-Type": "application/json",
1854
1968
  Accept: "application/json",
1855
- "X-DS-SWYM-CSRFTOKEN": u.result.ServerToken
1969
+ "X-DS-SWYM-CSRFTOKEN": p.result.ServerToken
1856
1970
  },
1857
1971
  data: JSON.stringify(c),
1858
1972
  type: "json",
1859
- onComplete(f, l, g) {
1860
- const h = f;
1861
- h.reponse = JSON.parse(g.response), h.status = g.status, s && s(h), d.id_msg = h.result.id, A(e, d);
1973
+ onComplete(f, l, h) {
1974
+ const g = f;
1975
+ g.reponse = JSON.parse(h.response), g.status = h.status, n && n(g), d.id_msg = g.result.id, v(e, d);
1862
1976
  },
1863
- onFailure(f, l, g) {
1864
- const h = f;
1865
- h.msg = l.errormsg, h.status = l.status, n && n(h);
1977
+ onFailure(f, l, h) {
1978
+ const g = f;
1979
+ g.msg = l.errormsg, g.status = l.status, s && s(g);
1866
1980
  }
1867
1981
  });
1868
1982
  });
1869
1983
  }, 500);
1870
1984
  }
1871
- function le(e, t, s, n) {
1985
+ function ge(e, t, n, s) {
1872
1986
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
1873
1987
  C(e, (r) => {
1874
1988
  m(i, {
@@ -1879,25 +1993,25 @@ function le(e, t, s, n) {
1879
1993
  },
1880
1994
  onComplete(o) {
1881
1995
  const a = JSON.parse(o), c = [];
1882
- a.result.forEach((u) => {
1883
- u.users = u.users.sort((f, l) => f.login.localeCompare(l.login)), u.users.length === t.length && c.push(u);
1996
+ a.result.forEach((p) => {
1997
+ p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
1884
1998
  });
1885
- const d = t.sort(), p = c.find((u) => {
1999
+ const d = t.sort(), u = c.find((p) => {
1886
2000
  const f = [];
1887
- return u.users.forEach((l) => {
2001
+ return p.users.forEach((l) => {
1888
2002
  f.push(l.login);
1889
2003
  }), JSON.stringify(f) === JSON.stringify(d);
1890
2004
  });
1891
- s && p !== void 0 ? s(p) : (n || p === void 0) && n(p);
2005
+ n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
1892
2006
  },
1893
2007
  onFailure(o) {
1894
2008
  const a = o;
1895
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
2009
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1896
2010
  }
1897
2011
  });
1898
2012
  });
1899
2013
  }
1900
- function A(e, t, s = void 0, n = void 0) {
2014
+ function v(e, t, n = void 0, s = void 0) {
1901
2015
  const i = {
1902
2016
  base: e._3DSwym,
1903
2017
  uri: "/api/community",
@@ -1923,25 +2037,25 @@ function A(e, t, s = void 0, n = void 0) {
1923
2037
  },
1924
2038
  data: JSON.stringify(o),
1925
2039
  type: "json",
1926
- onComplete(c, d, p) {
1927
- const u = c;
1928
- u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), s && s(u);
2040
+ onComplete(c, d, u) {
2041
+ const p = c;
2042
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1929
2043
  },
1930
2044
  onFailure(c, d) {
1931
- const p = c;
1932
- p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
2045
+ const u = c;
2046
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1933
2047
  }
1934
2048
  });
1935
2049
  });
1936
2050
  }
1937
- function fe(e) {
1938
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2051
+ function _e(e) {
2052
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1939
2053
  return `<p>${e} </p>
1940
2054
  <br/>
1941
2055
  <hr/>
1942
- <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
2056
+ <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1943
2057
  }
1944
- function ut(e, t, s = void 0, n = void 0) {
2058
+ function St(e, t, n = void 0, s = void 0) {
1945
2059
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1946
2060
  (c) => c.id === t.community_id
1947
2061
  ), o = e.swymCommunities.find(
@@ -1952,7 +2066,7 @@ function ut(e, t, s = void 0, n = void 0) {
1952
2066
  // String, le nom de l'affaire
1953
2067
  community_id: r?.id !== void 0 ? r.id : o.id,
1954
2068
  // String, l'id de la communauté
1955
- message: me(t.text_html),
2069
+ message: ye(t.text_html),
1956
2070
  // STRING => le contenue du message doit être au format HTML
1957
2071
  published: 1
1958
2072
  // 1 publier, 0 non publier
@@ -1969,22 +2083,22 @@ function ut(e, t, s = void 0, n = void 0) {
1969
2083
  headers: d,
1970
2084
  data: JSON.stringify(a),
1971
2085
  type: "json",
1972
- onComplete(p, u, f) {
1973
- const l = JSON.parse(p);
1974
- l.status = f.status, l.response = f.response, s && s(l);
2086
+ onComplete(u, p, f) {
2087
+ const l = JSON.parse(u);
2088
+ l.status = f.status, l.response = f.response, n && n(l);
1975
2089
  },
1976
- onFailure(p, u, f) {
1977
- const l = p;
1978
- l.status = u.status, l.response = u.errormsg, n && n(l);
2090
+ onFailure(u, p, f) {
2091
+ const l = u;
2092
+ l.status = p.status, l.response = p.errormsg, s && s(l);
1979
2093
  }
1980
2094
  });
1981
2095
  });
1982
2096
  }
1983
- function pt(e, t = void 0, s = void 0) {
1984
- const n = { base: e.space, uri: "/api/idea/add" };
2097
+ function wt(e, t = void 0, n = void 0) {
2098
+ const s = { base: e.space, uri: "/api/idea/add" };
1985
2099
  if (!Array.isArray(e.swymCommunities)) {
1986
2100
  const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
1987
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2101
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1988
2102
  cause: o
1989
2103
  });
1990
2104
  }
@@ -1992,19 +2106,19 @@ function pt(e, t = void 0, s = void 0) {
1992
2106
  (o) => o.id === e.community_id
1993
2107
  ) === -1) {
1994
2108
  const o = "la communauté n'existe pas dans la liste des communautés du Swym";
1995
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2109
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1996
2110
  cause: o
1997
2111
  });
1998
2112
  }
1999
2113
  if (e.community_id && e.community_id === "") {
2000
2114
  const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2001
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2115
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2002
2116
  cause: o
2003
2117
  });
2004
2118
  }
2005
2119
  if (e.title && e.title === "") {
2006
2120
  const o = "☠️ title doit être un String.";
2007
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2121
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2008
2122
  cause: o
2009
2123
  });
2010
2124
  }
@@ -2023,7 +2137,7 @@ function pt(e, t = void 0, s = void 0) {
2023
2137
  C(e, (o) => {
2024
2138
  if (!o)
2025
2139
  throw new Error(
2026
- `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
2140
+ `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2027
2141
  {
2028
2142
  cause: o
2029
2143
  }
@@ -2036,24 +2150,24 @@ function pt(e, t = void 0, s = void 0) {
2036
2150
  },
2037
2151
  method: "POST",
2038
2152
  data: JSON.stringify(r),
2039
- onComplete(c, d, p) {
2040
- const u = { response: c };
2041
- typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
2153
+ onComplete(c, d, u) {
2154
+ const p = { response: c };
2155
+ typeof p.response == "string" && (p.response = JSON.parse(p.response)), p.status = u.status, t && t(p);
2042
2156
  },
2043
- onFailure(c, d, p) {
2044
- const u = JSON.parse(d), f = JSON.parse(c), l = new Error(
2045
- `Erreur sur cette requête : ${n.base + n.uri}`,
2157
+ onFailure(c, d, u) {
2158
+ const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2159
+ `Erreur sur cette requête : ${s.base + s.uri}`,
2046
2160
  {
2047
- cause: { head: u, rep: f }
2161
+ cause: { head: p, rep: f }
2048
2162
  }
2049
2163
  );
2050
- s && s(l);
2164
+ n && n(l);
2051
2165
  }
2052
2166
  };
2053
- m(n.base + n.uri, a);
2167
+ m(s.base + s.uri, a);
2054
2168
  });
2055
2169
  }
2056
- function lt(e, t, s = void 0, n = void 0) {
2170
+ function Ct(e, t, n = void 0, s = void 0) {
2057
2171
  const i = `${e.space}/api/idea/delete`, r = {
2058
2172
  params: {
2059
2173
  community_id: t.community_id,
@@ -2071,17 +2185,17 @@ function lt(e, t, s = void 0, n = void 0) {
2071
2185
  data: JSON.stringify(r),
2072
2186
  type: "json",
2073
2187
  onComplete(a, c, d) {
2074
- s && s(a);
2188
+ n && n(a);
2075
2189
  },
2076
2190
  onFailure(a, c, d) {
2077
- const p = a;
2078
- p.status = c.status, p.response = c.errormsg, n && n(p);
2191
+ const u = a;
2192
+ u.status = c.status, u.response = c.errormsg, s && s(u);
2079
2193
  }
2080
2194
  });
2081
2195
  });
2082
2196
  }
2083
- function ft(e, t = void 0, s = void 0) {
2084
- const { _3DSwym: n, _3DSwym_token: i } = e, r = `${n}/api/idea/get`;
2197
+ function Tt(e, t = void 0, n = void 0) {
2198
+ const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2085
2199
  if (e.idPost === "") {
2086
2200
  const a = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2087
2201
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: a });
@@ -2104,22 +2218,22 @@ function ft(e, t = void 0, s = void 0) {
2104
2218
  },
2105
2219
  onFailure(a) {
2106
2220
  const c = a;
2107
- c.status = headers.status, c.response = headers.errormsg, s && s(c);
2221
+ c.status = headers.status, c.response = headers.errormsg, n && n(c);
2108
2222
  }
2109
2223
  });
2110
2224
  }
2111
- function mt(e, t, s) {
2225
+ function bt(e, t, n) {
2112
2226
  const {
2113
- _3DSwym: n,
2227
+ _3DSwym: s,
2114
2228
  _3DSwym_token: i,
2115
2229
  idPost: r,
2116
2230
  title: o,
2117
2231
  community_id: a,
2118
2232
  status_comment: c,
2119
2233
  status_id: d,
2120
- message: p
2121
- } = e, u = {
2122
- base: `${n}`,
2234
+ message: u
2235
+ } = e, p = {
2236
+ base: `${s}`,
2123
2237
  uri: "/api/idea/edit"
2124
2238
  }, l = {
2125
2239
  method: "POST",
@@ -2136,74 +2250,74 @@ function mt(e, t, s) {
2136
2250
  community_id: a,
2137
2251
  status_comment: c,
2138
2252
  status_id: d,
2139
- message: p,
2253
+ message: u,
2140
2254
  published: "1"
2141
2255
  }
2142
2256
  }),
2143
2257
  type: "json",
2144
- onComplete(g, h, y) {
2145
- const _ = {
2146
- response: typeof g == "string" ? JSON.parse(g) : g
2258
+ onComplete(h, g, _) {
2259
+ const y = {
2260
+ response: typeof h == "string" ? JSON.parse(h) : h
2147
2261
  };
2148
- _.status = y.status, t && t(_);
2262
+ y.status = _.status, t && t(y);
2149
2263
  },
2150
- onFailure(g) {
2151
- s && s(g);
2264
+ onFailure(h) {
2265
+ n && n(h);
2152
2266
  }
2153
2267
  };
2154
- m(u.base + u.uri, l);
2268
+ m(p.base + p.uri, l);
2155
2269
  }
2156
- function gt(e, t, s = void 0, n = void 0) {
2270
+ function Ot(e, t, n = void 0, s = void 0) {
2157
2271
  const { _3DSwym: i } = e;
2158
2272
  let { community_id: r, limit: o, page: a, search: c } = t;
2159
- const d = [], p = 1;
2160
- let u = !1, f = 2;
2161
- a || (a = p), o || (o = 100);
2273
+ const d = [], u = 1;
2274
+ let p = !1, f = 2;
2275
+ a || (a = u), o || (o = 100);
2162
2276
  const l = {
2163
2277
  uri: "/api/idea/list",
2164
2278
  comId: `/community_id/${r}`,
2165
2279
  limit: `/limit/${o}`,
2166
2280
  page: `/page/${a}`
2167
2281
  };
2168
- let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2169
- C(e, (h) => {
2170
- const y = (_) => {
2171
- m(_, {
2282
+ let h = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2283
+ C(e, (g) => {
2284
+ const _ = (y) => {
2285
+ m(y, {
2172
2286
  method: "GET",
2173
2287
  headers: {
2174
- "X-DS-SWYM-CSRFTOKEN": h.result.ServerToken
2288
+ "X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
2175
2289
  },
2176
2290
  onComplete(S) {
2177
2291
  const w = { response: JSON.parse(S) };
2178
2292
  if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= a) {
2179
- if (a++, l.page = `/page/${a}`, _ = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2293
+ if (a++, l.page = `/page/${a}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2180
2294
  d.push(w.response.result);
2181
2295
  else {
2182
2296
  const T = w.response.result.find(
2183
- (E) => E.title.includes(c)
2297
+ (x) => x.title.includes(c)
2184
2298
  );
2185
2299
  if (T) {
2186
- s(T);
2300
+ n(T);
2187
2301
  return;
2188
2302
  }
2189
2303
  }
2190
- if (s && f < a && !c) {
2191
- u = !0, s(d);
2304
+ if (n && f < a && !c) {
2305
+ p = !0, n(d);
2192
2306
  return;
2193
2307
  }
2194
- y(_);
2308
+ _(y);
2195
2309
  }
2196
2310
  },
2197
2311
  onFailure(S, w) {
2198
2312
  const T = S;
2199
- T.status = w.status, T.response = w.errormsg, n && n(T);
2313
+ T.status = w.status, T.response = w.errormsg, s && s(T);
2200
2314
  }
2201
2315
  });
2202
2316
  };
2203
- u || y(g);
2317
+ p || _(h);
2204
2318
  });
2205
2319
  }
2206
- function me(e) {
2320
+ function ye(e) {
2207
2321
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
2208
2322
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
2209
2323
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -2278,9 +2392,9 @@ function me(e) {
2278
2392
  <p>
2279
2393
  </p>` : e;
2280
2394
  }
2281
- function ht(e, t = void 0, s = void 0) {
2282
- const { tenant: n, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2283
- if (n && i && r && o && a) {
2395
+ function $t(e, t = void 0, n = void 0) {
2396
+ const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2397
+ if (s && i && r && o && a) {
2284
2398
  const c = `${i}/api/idea/forward`;
2285
2399
  m(c, {
2286
2400
  method: "POST",
@@ -2290,29 +2404,29 @@ function ht(e, t = void 0, s = void 0) {
2290
2404
  "X-DS-SWYM-CSRFTOKEN": r
2291
2405
  },
2292
2406
  data: JSON.stringify({
2293
- community_uri: `swym:prd:${n.toUpperCase()}:community:${o}`,
2294
- content_uri: `swym:prd:${n.toUpperCase()}:idea:${a}`,
2407
+ community_uri: `swym:prd:${s.toUpperCase()}:community:${o}`,
2408
+ content_uri: `swym:prd:${s.toUpperCase()}:idea:${a}`,
2295
2409
  timeout: 3e4
2296
2410
  }),
2297
2411
  type: "json",
2298
2412
  onComplete(d) {
2299
2413
  t && t(d);
2300
2414
  },
2301
- onFailure(d, p) {
2302
- const u = d;
2303
- u.status = p.status, u.response = p.errormsg, s && s(u);
2415
+ onFailure(d, u) {
2416
+ const p = d;
2417
+ p.status = u.status, p.response = u.errormsg, n && n(p);
2304
2418
  }
2305
2419
  });
2306
2420
  } else
2307
- s && s({
2421
+ n && n({
2308
2422
  status: "error",
2309
2423
  msg: "Credentials incomplet !",
2310
2424
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2311
2425
  credentials: e
2312
2426
  });
2313
2427
  }
2314
- function yt(e, t = void 0, s = void 0) {
2315
- return new Promise((n, i) => {
2428
+ function Nt(e, t = void 0, n = void 0) {
2429
+ return new Promise((s, i) => {
2316
2430
  try {
2317
2431
  let r;
2318
2432
  if (e._3DDashboard) {
@@ -2320,28 +2434,28 @@ function yt(e, t = void 0, s = void 0) {
2320
2434
  console.log("_3DSwym_get_currentUser | url", o), m(o, {
2321
2435
  method: "GET",
2322
2436
  onComplete(a, c, d) {
2323
- let p = a.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2324
- p = p.replace('"[', "[").replace(']"', "]").replace('"{', "{").replace('}"', "}").replace(/\\/g, ""), console.log("result", p);
2325
- let u = {};
2437
+ let u = a.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2438
+ u = u.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, ""), console.log("result", u);
2439
+ let p = {};
2326
2440
  try {
2327
- u = JSON.parse(p);
2441
+ p = JSON.parse(u);
2328
2442
  } catch (f) {
2329
2443
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2330
2444
  }
2331
- console.log(u), u.first_name = u?.firstName ? u.firstName : "", u.last_name = u?.lastName ? u.lastName : "", console.log("_3DSwym_get_currentUser | info", u), r = u, n(u);
2445
+ 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);
2332
2446
  },
2333
2447
  onFailure(a) {
2334
2448
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
2335
2449
  }
2336
2450
  });
2337
2451
  }
2338
- r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2452
+ r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2339
2453
  } catch (r) {
2340
2454
  i("ERROR | _3DSwym_get_currentUser => ", r);
2341
2455
  }
2342
2456
  });
2343
2457
  }
2344
- function _t(e, t, s = void 0, n = void 0) {
2458
+ function Ft(e, t, n = void 0, s = void 0) {
2345
2459
  const i = e.space + "/api/user/find/login/" + t;
2346
2460
  C(
2347
2461
  e,
@@ -2351,23 +2465,23 @@ function _t(e, t, s = void 0, n = void 0) {
2351
2465
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2352
2466
  onComplete(o, a, c) {
2353
2467
  const d = JSON.parse(o);
2354
- s && s(d);
2468
+ n && n(d);
2355
2469
  },
2356
2470
  onFailure(o) {
2357
- n && n(o);
2471
+ s && s(o);
2358
2472
  }
2359
2473
  });
2360
2474
  },
2361
- n
2475
+ s
2362
2476
  );
2363
2477
  }
2364
- function St(e, t = void 0, s = void 0) {
2478
+ function It(e, t = void 0, n = void 0) {
2365
2479
  const {
2366
- _3DSwym: n,
2480
+ _3DSwym: s,
2367
2481
  _3DSwym_token: i,
2368
2482
  subjectUri: r,
2369
2483
  richMessage: o
2370
- } = e, a = `${n}/commentproxy/subjects/${r}/comments`, d = {
2484
+ } = e, a = `${s}/commentproxy/subjects/${r}/comments`, d = {
2371
2485
  method: "POST",
2372
2486
  headers: {
2373
2487
  "Content-type": "application/json;charset=UTF-8",
@@ -2376,29 +2490,29 @@ function St(e, t = void 0, s = void 0) {
2376
2490
  },
2377
2491
  data: JSON.stringify({ richMessage: o }),
2378
2492
  type: "json",
2379
- onComplete(p, u, f) {
2493
+ onComplete(u, p, f) {
2380
2494
  const l = {
2381
- response: typeof p == "string" ? JSON.parse(p) : p
2495
+ response: typeof u == "string" ? JSON.parse(u) : u
2382
2496
  };
2383
2497
  l.status = f.status, t && t(l);
2384
2498
  },
2385
- onFailure(p) {
2386
- s && s(p);
2499
+ onFailure(u) {
2500
+ n && n(u);
2387
2501
  }
2388
2502
  };
2389
2503
  m(a, d);
2390
2504
  }
2391
- function wt(e, t = void 0, s = void 0) {
2392
- e.tenant && v(e, (n) => {
2393
- const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2505
+ function Ut(e, t = void 0, n = void 0) {
2506
+ e.tenant && P(e, (s) => {
2507
+ const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2394
2508
  return t && t(i), i;
2395
2509
  });
2396
2510
  }
2397
- function Ct(e, t = void 0, s = void 0) {
2398
- e.tenant && v(e, (n) => {
2399
- const i = n.services.find(
2511
+ function Rt(e, t = void 0, n = void 0) {
2512
+ e.tenant && P(e, (s) => {
2513
+ const i = s.services.find(
2400
2514
  (a) => a.id === "3dpassport"
2401
- )?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2515
+ )?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2402
2516
  m(o, {
2403
2517
  async onComplete(a) {
2404
2518
  const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
@@ -2409,24 +2523,24 @@ function Ct(e, t = void 0, s = void 0) {
2409
2523
  });
2410
2524
  },
2411
2525
  onFailure(a) {
2412
- s && s(a);
2526
+ n && n(a);
2413
2527
  }
2414
2528
  });
2415
2529
  });
2416
2530
  }
2417
- function Tt(e, t = void 0, s = void 0) {
2531
+ function xt(e, t = void 0, n = void 0) {
2418
2532
  if (e.tenant) {
2419
- const n = e.tenant.toLowerCase();
2420
- fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2533
+ const s = e.tenant.toLowerCase();
2534
+ fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2421
2535
  method: "POST"
2422
2536
  }).then((i) => i.json()).then((i) => {
2423
2537
  t && t(i);
2424
2538
  }).catch((i) => {
2425
- s && s(i);
2539
+ n && n(i);
2426
2540
  });
2427
2541
  }
2428
2542
  }
2429
- async function bt(e, t, s = void 0, n = void 0) {
2543
+ async function kt(e, t, n = void 0, s = void 0) {
2430
2544
  if (e.tenant) {
2431
2545
  const i = e.tenant.toLowerCase();
2432
2546
  fetch(
@@ -2435,61 +2549,61 @@ async function bt(e, t, s = void 0, n = void 0) {
2435
2549
  method: "GET"
2436
2550
  }
2437
2551
  ).then((r) => r.json()).then((r) => {
2438
- s && s(r);
2439
- }).catch((r) => {
2440
2552
  n && n(r);
2553
+ }).catch((r) => {
2554
+ s && s(r);
2441
2555
  });
2442
2556
  }
2443
2557
  }
2444
- async function Ot(e, t, s, n = void 0, i = void 0) {
2558
+ async function jt(e, t, n, s = void 0, i = void 0) {
2445
2559
  if (e.tenant) {
2446
2560
  const r = e.tenant.toLowerCase();
2447
2561
  fetch(
2448
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${s}?t=${t}`,
2562
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2449
2563
  {
2450
2564
  method: "POST"
2451
2565
  }
2452
2566
  ).then((o) => o.json()).then((o) => {
2453
- n && n(o);
2567
+ s && s(o);
2454
2568
  }).catch((o) => {
2455
2569
  i && i(o);
2456
2570
  });
2457
2571
  }
2458
2572
  }
2459
- async function $t(e, t, s, n = void 0, i = void 0) {
2573
+ async function Dt(e, t, n, s = void 0, i = void 0) {
2460
2574
  if (e.tenant) {
2461
2575
  const r = e.tenant.toLowerCase();
2462
2576
  fetch(
2463
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${s}/?t=${t}`,
2577
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2464
2578
  {
2465
2579
  method: "POST"
2466
2580
  }
2467
2581
  ).then((o) => o.json()).then((o) => {
2468
- n && n(o);
2582
+ s && s(o);
2469
2583
  }).catch((o) => {
2470
2584
  i && i(o);
2471
2585
  });
2472
2586
  }
2473
2587
  }
2474
- async function Nt(e, t, s, n, i = void 0, r = void 0) {
2588
+ async function vt(e, t, n, s, i = void 0, r = void 0) {
2475
2589
  if (e.tenant) {
2476
2590
  const o = e.tenant.toLowerCase();
2477
2591
  fetch(
2478
- `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`,
2592
+ `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2479
2593
  {
2480
2594
  method: "POST"
2481
2595
  }
2482
2596
  ).then((a) => a.json()).then((a) => {
2483
2597
  i && i(a);
2484
2598
  }).catch((a) => {
2485
- r && r(a, s, n);
2599
+ r && r(a, n, s);
2486
2600
  });
2487
2601
  }
2488
2602
  }
2489
- async function It(e, t, s, n, i, r = void 0, o = void 0) {
2603
+ async function At(e, t, n, s, i, r = void 0, o = void 0) {
2490
2604
  if (e.tenant) {
2491
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2492
- n
2605
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2606
+ s
2493
2607
  )}&b=${encodeURIComponent(i)}`;
2494
2608
  fetch(a, {
2495
2609
  method: "POST"
@@ -2498,17 +2612,17 @@ async function It(e, t, s, n, i, r = void 0, o = void 0) {
2498
2612
  }).catch((c) => {
2499
2613
  o && o({
2500
2614
  error: c,
2501
- tableId: s,
2502
- columns: n,
2615
+ tableId: n,
2616
+ columns: s,
2503
2617
  body: i
2504
2618
  });
2505
2619
  });
2506
2620
  }
2507
2621
  }
2508
- async function Rt(e, t, s, n, i = void 0, r = void 0) {
2622
+ async function Pt(e, t, n, s, i = void 0, r = void 0) {
2509
2623
  if (e.tenant) {
2510
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2511
- n
2624
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2625
+ s
2512
2626
  )}`;
2513
2627
  fetch(o, {
2514
2628
  method: "POST"
@@ -2522,15 +2636,15 @@ async function Rt(e, t, s, n, i = void 0, r = void 0) {
2522
2636
  });
2523
2637
  }
2524
2638
  }
2525
- async function Ut(e, t, s, n = void 0, i = void 0) {
2639
+ async function Lt(e, t, n, s = void 0, i = void 0) {
2526
2640
  if (e.tenant) {
2527
2641
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2528
- s
2642
+ n
2529
2643
  )}`;
2530
2644
  fetch(r, {
2531
2645
  method: "POST"
2532
2646
  }).then((o) => o.json()).then((o) => {
2533
- n && n(o);
2647
+ s && s(o);
2534
2648
  }).catch((o) => {
2535
2649
  i && i({
2536
2650
  error: o,
@@ -2539,11 +2653,11 @@ async function Ut(e, t, s, n = void 0, i = void 0) {
2539
2653
  });
2540
2654
  }
2541
2655
  }
2542
- async function Ft(e, t, s, n, i = void 0, r = void 0) {
2656
+ async function Mt(e, t, n, s, i = void 0, r = void 0) {
2543
2657
  if (e.tenant) {
2544
2658
  const o = e.tenant.toLowerCase();
2545
2659
  fetch(
2546
- `https://api.uixhome.fr/${o}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2660
+ `https://api.uixhome.fr/${o}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2547
2661
  {
2548
2662
  method: "POST"
2549
2663
  }
@@ -2554,26 +2668,26 @@ async function Ft(e, t, s, n, i = void 0, r = void 0) {
2554
2668
  });
2555
2669
  }
2556
2670
  }
2557
- async function kt(e, t, s, n = void 0, i = void 0) {
2671
+ async function Jt(e, t, n, s = void 0, i = void 0) {
2558
2672
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2559
2673
  const r = e.tenant.toLowerCase();
2560
2674
  fetch(
2561
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${s}/?t=${t}`,
2675
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2562
2676
  {
2563
2677
  method: "POST"
2564
2678
  }
2565
2679
  ).then((o) => o.json()).then((o) => {
2566
- n && n(o);
2680
+ s && s(o);
2567
2681
  }).catch((o) => {
2568
2682
  i && i(o);
2569
2683
  });
2570
2684
  }
2571
2685
  }
2572
- async function jt(e, t, s, n, i, r = void 0, o = void 0) {
2686
+ async function Gt(e, t, n, s, i, r = void 0, o = void 0) {
2573
2687
  if (e.tenant) {
2574
2688
  const a = e.tenant.toLowerCase();
2575
2689
  fetch(
2576
- `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2690
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2577
2691
  {
2578
2692
  method: "POST"
2579
2693
  }
@@ -2584,11 +2698,11 @@ async function jt(e, t, s, n, i, r = void 0, o = void 0) {
2584
2698
  });
2585
2699
  }
2586
2700
  }
2587
- async function At(e, t, s, n, i = void 0, r = void 0) {
2701
+ async function Kt(e, t, n, s, i = void 0, r = void 0) {
2588
2702
  if (e.tenant) {
2589
2703
  const o = e.tenant.toLowerCase();
2590
2704
  fetch(
2591
- `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2705
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2592
2706
  {
2593
2707
  method: "POST"
2594
2708
  }
@@ -2600,33 +2714,33 @@ async function At(e, t, s, n, i = void 0, r = void 0) {
2600
2714
  }
2601
2715
  }
2602
2716
  //!SECTION
2603
- async function Dt(e, t, s, n = void 0, i = void 0) {
2717
+ async function Bt(e, t, n, s = void 0, i = void 0) {
2604
2718
  if (e.tenant) {
2605
2719
  const r = e.tenant.toLowerCase();
2606
2720
  fetch(
2607
- `https://api.uixhome.fr/${r}/iterop/list/one/${s}/?t=${t}`,
2721
+ `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2608
2722
  {
2609
2723
  method: "POST"
2610
2724
  }
2611
2725
  ).then((o) => o.json()).then((o) => {
2612
- n && n(o);
2726
+ s && s(o);
2613
2727
  }).catch((o) => {
2614
2728
  i && i(o);
2615
2729
  });
2616
2730
  }
2617
2731
  }
2618
2732
  //!SECTION
2619
- function vt(e) {
2733
+ function Et(e) {
2620
2734
  const t = "Hello " + e;
2621
2735
  return console.log(t), t;
2622
2736
  }
2623
- function xt(e, t = void 0, s = void 0) {
2624
- return console.log("credentials", e), new Promise((n) => {
2737
+ function qt(e, t = void 0, n = void 0) {
2738
+ return console.log("credentials", e), new Promise((s) => {
2625
2739
  if (e.token === "" && b(e), !e.space || e.space === "") {
2626
- const o = q();
2740
+ const o = Z();
2627
2741
  console.log("platformeInfo", o);
2628
2742
  }
2629
- U(
2743
+ R(
2630
2744
  e,
2631
2745
  "Common space",
2632
2746
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2688,113 +2802,115 @@ function xt(e, t = void 0, s = void 0) {
2688
2802
  t && t(d);
2689
2803
  },
2690
2804
  onFailure(d) {
2691
- s && s(d);
2805
+ n && n(d);
2692
2806
  }
2693
2807
  });
2694
2808
  }
2695
2809
  },
2696
2810
  onFailure(o) {
2697
- s && s(o);
2811
+ n && n(o);
2698
2812
  }
2699
2813
  });
2700
2814
  });
2701
2815
  }
2702
2816
  export {
2703
- B as UUID,
2704
- xt as _3DSearch_usersGroup,
2705
- Ge as _3DSpace_Create_Doc,
2706
- Je as _3DSpace_Update_Doc,
2707
- qe as _3DSpace_bookmark_addSubsciptions,
2708
- Ve as _3DSpace_bookmark_newWorkspace,
2817
+ Y as UUID,
2818
+ qt as _3DSearch_usersGroup,
2819
+ He as _3DSpace_Create_Doc,
2820
+ Ye as _3DSpace_Update_Doc,
2821
+ Ve as _3DSpace_Upload_File,
2822
+ st as _3DSpace_bookmark_addSubsciptions,
2823
+ nt as _3DSpace_bookmark_newWorkspace,
2709
2824
  b as _3DSpace_csrf,
2710
- L as _3DSpace_download_doc,
2711
- ie as _3DSpace_download_multidoc,
2712
- P as _3DSpace_file_update,
2713
- ee as _3DSpace_file_update_csr,
2714
- Le as _3DSpace_file_url_csr,
2715
- R as _3DSpace_get_csrf,
2716
- x as _3DSpace_get_docInfo,
2717
- ae as _3DSpace_get_downloadTicket_multidoc,
2718
- Pe as _3DSpace_get_multiDocInfo,
2719
- U as _3DSpace_get_securityContexts,
2720
- k as _3DSpace_get_ticket,
2721
- Xe as _3DSpace_lifecycle_changeRevision,
2722
- Ke as _3DSpace_lifecycle_changeState,
2723
- Be as _3DSpace_lifecycle_getGraph,
2724
- We as _3DSpace_lifecycle_getNextRevision,
2725
- Ee as _3DSpace_lifecycle_getNextStates,
2726
- Me as _3DSpace_put_docInfo,
2727
- ht as _3DSwym_ForwardIdea,
2728
- St as _3DSwym_addComment,
2729
- dt as _3DSwym_buildDirectMessage,
2730
- lt as _3DSwym_deleteIdea,
2731
- mt as _3DSwym_editIdea,
2732
- le as _3DSwym_findCommunityToInstantMSG,
2733
- rt as _3DSwym_getAllCommunities,
2734
- gt as _3DSwym_getAllListIdeas,
2735
- at as _3DSwym_getAllNews,
2736
- ot as _3DSwym_getFamiliarPeople,
2737
- ct as _3DSwym_getIdeaStatusMaturity,
2738
- pe as _3DSwym_getMembersCommunity,
2739
- ft as _3DSwym_getOneIdea,
2825
+ G as _3DSpace_download_doc,
2826
+ ce as _3DSpace_download_multidoc,
2827
+ M as _3DSpace_file_update,
2828
+ ae as _3DSpace_file_update_csr,
2829
+ Xe as _3DSpace_file_url_csr,
2830
+ U as _3DSpace_get_csrf,
2831
+ L as _3DSpace_get_docInfo,
2832
+ de as _3DSpace_get_downloadTicket_multidoc,
2833
+ qe as _3DSpace_get_multiDocInfo,
2834
+ R as _3DSpace_get_securityContexts,
2835
+ j as _3DSpace_get_ticket,
2836
+ tt as _3DSpace_lifecycle_changeRevision,
2837
+ Qe as _3DSpace_lifecycle_changeState,
2838
+ Ze as _3DSpace_lifecycle_getGraph,
2839
+ et as _3DSpace_lifecycle_getNextRevision,
2840
+ ze as _3DSpace_lifecycle_getNextStates,
2841
+ We as _3DSpace_put_docInfo,
2842
+ $t as _3DSwym_ForwardIdea,
2843
+ It as _3DSwym_addComment,
2844
+ yt as _3DSwym_buildDirectMessage,
2845
+ Ct as _3DSwym_deleteIdea,
2846
+ bt as _3DSwym_editIdea,
2847
+ ge as _3DSwym_findCommunityToInstantMSG,
2848
+ gt as _3DSwym_getAllCommunities,
2849
+ Ot as _3DSwym_getAllListIdeas,
2850
+ mt as _3DSwym_getAllNews,
2851
+ ht as _3DSwym_getFamiliarPeople,
2852
+ _t as _3DSwym_getIdeaStatusMaturity,
2853
+ he as _3DSwym_getMembersCommunity,
2854
+ Tt as _3DSwym_getOneIdea,
2740
2855
  C as _3DSwym_get_Token,
2741
- yt as _3DSwym_get_currentUser,
2742
- _t as _3DSwym_get_findUser,
2743
- pt as _3DSwym_postIdea,
2744
- ut as _3DSwym_postIdeaTemplate,
2745
- A as _3DSwym_sendMessageData,
2746
- Ue as _AppMngt_get_info_user,
2747
- Re as _AppMngt_get_users,
2748
- Nt as _Iterop_AddOrRemoveRows,
2749
- Ct as _Iterop_Auth_CAS,
2750
- kt as _Iterop_GetOneDependencyTable,
2751
- Dt as _Iterop_GetOneList,
2752
- jt as _Iterop_PatchDependencyTable,
2753
- At as _Iterop_PutDependencyTable,
2754
- It as _Iterop_businessTableSearchInRows,
2755
- Ut as _Iterop_createBusinessTable,
2756
- bt as _Iterop_getAllBusinessTables,
2757
- Ot as _Iterop_getOneBusinessTable,
2758
- $t as _Iterop_getOneBusinessTableRows,
2759
- Tt as _Iterop_jwtUser,
2760
- Ft as _Iterop_runProcess,
2761
- Rt as _Iterop_updateBusinessTable,
2762
- q as _getPlateformInfos,
2763
- $e as _getPlatformServices,
2764
- v as _getServiceUrl,
2765
- Ne as _getServiceUrl_3DPassport,
2766
- wt as _getServiceUrl_Iterop,
2856
+ Nt as _3DSwym_get_currentUser,
2857
+ Ft as _3DSwym_get_findUser,
2858
+ wt as _3DSwym_postIdea,
2859
+ St as _3DSwym_postIdeaTemplate,
2860
+ v as _3DSwym_sendMessageData,
2861
+ Pe as _AppMngt_get_info_user,
2862
+ Ae as _AppMngt_get_users,
2863
+ vt as _Iterop_AddOrRemoveRows,
2864
+ Rt as _Iterop_Auth_CAS,
2865
+ Jt as _Iterop_GetOneDependencyTable,
2866
+ Bt as _Iterop_GetOneList,
2867
+ Gt as _Iterop_PatchDependencyTable,
2868
+ Kt as _Iterop_PutDependencyTable,
2869
+ At as _Iterop_businessTableSearchInRows,
2870
+ Lt as _Iterop_createBusinessTable,
2871
+ kt as _Iterop_getAllBusinessTables,
2872
+ jt as _Iterop_getOneBusinessTable,
2873
+ Dt as _Iterop_getOneBusinessTableRows,
2874
+ xt as _Iterop_jwtUser,
2875
+ Mt as _Iterop_runProcess,
2876
+ Pt as _Iterop_updateBusinessTable,
2877
+ je as _getMe,
2878
+ Z as _getPlateformInfos,
2879
+ ke as _getPlatformServices,
2880
+ P as _getServiceUrl,
2881
+ De as _getServiceUrl_3DPassport,
2882
+ Ut as _getServiceUrl_Iterop,
2767
2883
  m as _httpCallAuthenticated,
2768
- Te as _setDraggable,
2769
- Oe as _setDroppable,
2770
- be as _setupTagger,
2771
- nt as addTagToDoc,
2772
- X as chunkArray,
2773
- Ie as compass_getListAdditionalApps,
2774
- W as couleurs,
2775
- Fe as createUserGroups,
2776
- oe as dataMixing,
2777
- Ae as deleteUserGroups,
2778
- Se as findAdresse,
2779
- Ye as getAllContextSecurity,
2780
- H as getCSRFToken,
2781
- _e as getCommunes,
2782
- ke as getComplementUG,
2783
- He as getDataFrom3DSpace,
2784
- we as getDataFromGouvFr,
2785
- et as getDatasByTenant,
2786
- tt as getDatasFrom3DSpace,
2787
- ze as getDownloadDocument,
2788
- it as getInfoDocTags,
2789
- je as getUserGroupsList,
2790
- Y as getUsersGroupRules,
2791
- Ze as get_3DSpace_csrf,
2792
- De as patchUserGroups,
2793
- ve as patchUserGroupsControl,
2794
- Qe as pushDataIn3DSpace,
2795
- xe as readUserGroupControl,
2796
- st as removeTagToDoc,
2797
- vt as sayHello,
2798
- Ce as updateEvent
2884
+ Ue as _setDraggable,
2885
+ xe as _setDroppable,
2886
+ Re as _setupTagger,
2887
+ pt as addTagToDoc,
2888
+ z as chunkArray,
2889
+ ve as compass_getListAdditionalApps,
2890
+ H as couleurs,
2891
+ Le as createUserGroups,
2892
+ ue as dataMixing,
2893
+ Ge as deleteUserGroups,
2894
+ Ne as findAdresse,
2895
+ it as getAllContextSecurity,
2896
+ te as getCSRFToken,
2897
+ $e as getCommunes,
2898
+ Me as getComplementUG,
2899
+ at as getDataFrom3DSpace,
2900
+ Fe as getDataFromGouvFr,
2901
+ dt as getDatasByTenant,
2902
+ ut as getDatasFrom3DSpace,
2903
+ ot as getDownloadDocument,
2904
+ ft as getInfoDocTags,
2905
+ Je as getUserGroupsList,
2906
+ ee as getUsersGroupRules,
2907
+ ct as get_3DSpace_csrf,
2908
+ Ke as patchUserGroups,
2909
+ Be as patchUserGroupsControl,
2910
+ rt as pushDataIn3DSpace,
2911
+ Ee as readUserGroupControl,
2912
+ lt as removeTagToDoc,
2913
+ Et as sayHello,
2914
+ Ie as updateEvent
2799
2915
  };
2800
2916
  //# sourceMappingURL=wb3Api.js.map