jamespot-front-business 1.3.9 → 1.3.11

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.
@@ -1,6 +1,6 @@
1
- import { createEntityAdapter as lt, createSlice as T, createAsyncThunk as p, combineReducers as O } from "@reduxjs/toolkit";
2
- import { jEnsure as li, Format as gt, formatImgUrl as Vi, UserLevel as Hi, WidgetsName as b, StudioApplicationStatus as dt } from "jamespot-user-api";
3
- const Gi = function(t) {
1
+ import { createEntityAdapter as dt, createSlice as T, createAsyncThunk as p, combineReducers as O } from "@reduxjs/toolkit";
2
+ import { jEnsure as ci, Format as ft, formatImgUrl as Gi, UserLevel as Xi, WidgetsName as b, StudioApplicationStatus as ct } from "jamespot-user-api";
3
+ const Ji = function(t) {
4
4
  return [
5
5
  {
6
6
  namespace: "JAMESPOT",
@@ -10,35 +10,35 @@ const Gi = function(t) {
10
10
  }
11
11
  }
12
12
  ];
13
- }, Qo = {
14
- getArticleRTHandlers: Gi
15
- }, v = (t) => !!t && typeof t == "object" && "aborted" in t && !!t.aborted, A = (t, e) => !t || typeof t != "object" ? e ?? "GLOBAL_Technical_Error" : "errorMsg" in t && typeof t.errorMsg == "string" ? t.errorMsg : "message" in t && typeof t.message == "string" ? t.message : e ?? "GLOBAL_Technical_Error", ne = lt({
13
+ }, nl = {
14
+ getArticleRTHandlers: Ji
15
+ }, v = (t) => !!t && typeof t == "object" && "aborted" in t && !!t.aborted, A = (t, e) => !t || typeof t != "object" ? e ?? "GLOBAL_Technical_Error" : "errorMsg" in t && typeof t.errorMsg == "string" ? t.errorMsg : "message" in t && typeof t.message == "string" ? t.message : e ?? "GLOBAL_Technical_Error", ne = dt({
16
16
  selectId: (t) => t.id
17
- }), et = T({
17
+ }), tt = T({
18
18
  name: "toasts",
19
19
  initialState: ne.getInitialState(),
20
20
  reducers: {
21
21
  addOne: ne.addOne,
22
22
  removeOne: ne.removeOne
23
23
  }
24
- }), Xi = () => Math.random().toString(16).slice(2), te = ({ id: t = Xi(), ...e }, i = "success", a = 3e3) => (r) => {
24
+ }), Ki = () => Math.random().toString(16).slice(2), te = ({ id: t = Ki(), ...e }, i = "success", a = 3e3) => (r) => {
25
25
  const n = { id: t, ...e, timeout: a, type: i };
26
- return r(et.actions.addOne(n)), setTimeout(() => {
27
- r(et.actions.removeOne(t));
26
+ return r(tt.actions.addOne(n)), setTimeout(() => {
27
+ r(tt.actions.removeOne(t));
28
28
  }, a), t;
29
- }, Ji = {
29
+ }, Yi = {
30
30
  addMessage: te,
31
31
  success: (t, e) => te(t, "success", e),
32
32
  warning: (t, e) => te(t, "warning", e),
33
33
  error: (t, e) => te(t, "error", e)
34
- }, Ki = ne.getSelectors((t) => t.toasts), y = {
35
- slice: et,
36
- actions: { ...Ji, ...et.actions },
37
- selectors: Ki
38
- }, Nt = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), Yi = () => {
34
+ }, Qi = ne.getSelectors((t) => t.toasts), m = {
35
+ slice: tt,
36
+ actions: { ...Yi, ...tt.actions },
37
+ selectors: Qi
38
+ }, Pt = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), zi = () => {
39
39
  const t = /* @__PURE__ */ new Date();
40
40
  return t.setMonth(t.getMonth() - 1), t;
41
- }, zi = {
41
+ }, Zi = {
42
42
  data: [],
43
43
  loading: "idle",
44
44
  page: 1,
@@ -47,8 +47,8 @@ const Gi = function(t) {
47
47
  name: "dateCreation",
48
48
  method: "between",
49
49
  value: {
50
- start: Nt(Yi()),
51
- end: Nt(/* @__PURE__ */ new Date())
50
+ start: Pt(zi()),
51
+ end: Pt(/* @__PURE__ */ new Date())
52
52
  }
53
53
  }
54
54
  ],
@@ -59,11 +59,11 @@ const Gi = function(t) {
59
59
  try {
60
60
  return (await e.jApi.admin.logs.getLogsNavigation(t)).result;
61
61
  } catch (r) {
62
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs navigation" });
62
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs navigation" });
63
63
  }
64
- }), ft = T({
64
+ }), mt = T({
65
65
  name: "logsNavigation",
66
- initialState: zi,
66
+ initialState: Zi,
67
67
  reducers: {
68
68
  setNavigationOrder: (t, e) => {
69
69
  t.orders = [...e.payload], t.page = 1;
@@ -84,10 +84,10 @@ const Gi = function(t) {
84
84
  e.loading = "idle";
85
85
  });
86
86
  }
87
- }), _t = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), Qi = () => {
87
+ }), Ut = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), ea = () => {
88
88
  const t = /* @__PURE__ */ new Date();
89
89
  return t.setMonth(t.getMonth() - 1), t;
90
- }, Zi = {
90
+ }, ta = {
91
91
  data: [],
92
92
  loading: "idle",
93
93
  page: 1,
@@ -96,8 +96,8 @@ const Gi = function(t) {
96
96
  name: "dateCreation",
97
97
  method: "between",
98
98
  value: {
99
- start: _t(Qi()),
100
- end: _t(/* @__PURE__ */ new Date())
99
+ start: Ut(ea()),
100
+ end: Ut(/* @__PURE__ */ new Date())
101
101
  }
102
102
  }
103
103
  ],
@@ -108,11 +108,11 @@ const Gi = function(t) {
108
108
  try {
109
109
  return (await e.jApi.admin.logs.getLogsObjects(t)).result;
110
110
  } catch (r) {
111
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs Objects" });
111
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs Objects" });
112
112
  }
113
- }), mt = T({
113
+ }), yt = T({
114
114
  name: "logsObjects",
115
- initialState: Zi,
115
+ initialState: ta,
116
116
  reducers: {
117
117
  setObjectsOrder: (t, e) => {
118
118
  t.orders = [...e.payload], t.page = 1;
@@ -133,10 +133,10 @@ const Gi = function(t) {
133
133
  e.loading = "idle";
134
134
  });
135
135
  }
136
- }), Pt = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), ea = () => {
136
+ }), Ft = (t) => t.toISOString().slice(0, 19).replace(/T/g, " "), ia = () => {
137
137
  const t = /* @__PURE__ */ new Date();
138
138
  return t.setMonth(t.getMonth() - 1), t;
139
- }, ta = {
139
+ }, aa = {
140
140
  data: [],
141
141
  loading: "idle",
142
142
  page: 1,
@@ -145,8 +145,8 @@ const Gi = function(t) {
145
145
  name: "dateCreation",
146
146
  method: "between",
147
147
  value: {
148
- start: Pt(ea()),
149
- end: Pt(/* @__PURE__ */ new Date())
148
+ start: Ft(ia()),
149
+ end: Ft(/* @__PURE__ */ new Date())
150
150
  }
151
151
  }
152
152
  ],
@@ -157,11 +157,11 @@ const Gi = function(t) {
157
157
  try {
158
158
  return (await e.jApi.admin.logs.getLogsSearch(t)).result;
159
159
  } catch (r) {
160
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs Search" });
160
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve admin logs Search" });
161
161
  }
162
- }), yt = T({
162
+ }), At = T({
163
163
  name: "logsSearch",
164
- initialState: ta,
164
+ initialState: aa,
165
165
  reducers: {
166
166
  setSearchOrder: (t, e) => {
167
167
  t.orders = [...e.payload], t.page = 1;
@@ -182,37 +182,37 @@ const Gi = function(t) {
182
182
  e.loading = "idle";
183
183
  });
184
184
  }
185
- }), ia = (t) => t.adminLogs.logsNavigation, aa = (t) => t.adminLogs.logsObjects, ra = (t) => t.adminLogs.logsSearch, na = O({
186
- [ft.name]: ft.reducer,
185
+ }), ra = (t) => t.adminLogs.logsNavigation, na = (t) => t.adminLogs.logsObjects, sa = (t) => t.adminLogs.logsSearch, oa = O({
187
186
  [mt.name]: mt.reducer,
188
- [yt.name]: yt.reducer
189
- }), di = {
187
+ [yt.name]: yt.reducer,
188
+ [At.name]: At.reducer
189
+ }), ui = {
190
190
  name: "adminLogs",
191
- reducer: na
192
- }, Zo = di.reducer, el = {
193
- slice: di,
191
+ reducer: oa
192
+ }, sl = ui.reducer, ol = {
193
+ slice: ui,
194
194
  actions: {
195
- ...ft.actions,
196
195
  ...mt.actions,
197
196
  ...yt.actions,
197
+ ...At.actions,
198
198
  fetchLogsNavigation: se,
199
199
  fetchLogsObjects: oe,
200
200
  fetchLogsSearch: le
201
201
  },
202
- selectors: { selectAdminLogsNavigation: ia, selectAdminLogsObjects: aa, selectAdminLogsSearch: ra }
203
- }, sa = {
202
+ selectors: { selectAdminLogsNavigation: ra, selectAdminLogsObjects: na, selectAdminLogsSearch: sa }
203
+ }, la = {
204
204
  animationConfiguration: null,
205
205
  isActiveForCurrentUser: !1,
206
206
  isInitialized: !1,
207
207
  isToggleLoading: !1
208
- }, Ut = T({
208
+ }, Bt = T({
209
209
  name: "animationsList",
210
- initialState: sa,
210
+ initialState: la,
211
211
  reducers: {},
212
212
  extraReducers: (t) => {
213
213
  t.addCase(J.fulfilled, (e, i) => {
214
214
  e.isActiveForCurrentUser = i.payload.isActiveForCurrentUser, e.animationConfiguration = i.payload.animationConfiguration, e.isInitialized = i.payload.isInitialized;
215
- }), t.addCase(tt.fulfilled, (e, i) => {
215
+ }), t.addCase(it.fulfilled, (e, i) => {
216
216
  e.animationConfigurationApp = i.payload;
217
217
  }), t.addCase(de.pending, (e) => {
218
218
  e.isToggleLoading = !0, e.isActiveForCurrentUser = !e.isActiveForCurrentUser;
@@ -227,32 +227,32 @@ const Gi = function(t) {
227
227
  const n = (await e.jApi.animations.GetCurrentAnimation({ signal: r })).result, s = (await e.jApi.animations.GetAnimationActive({ signal: r })).result;
228
228
  return { animationConfiguration: n, isActiveForCurrentUser: s, isInitialized: !0 };
229
229
  } catch (n) {
230
- return v(n) || a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot retrieve animation" });
230
+ return v(n) || a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot retrieve animation" });
231
231
  }
232
- }), tt = p("animations/fetchCurrentAnimationApp", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
232
+ }), it = p("animations/fetchCurrentAnimationApp", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
233
233
  try {
234
234
  return (await e.jApi.animations.GetCurrentAnimationApp()).result;
235
235
  } catch (r) {
236
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation" });
236
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation" });
237
237
  }
238
- }), oa = p(
238
+ }), da = p(
239
239
  "animations/deleteCurrentAnimation",
240
240
  async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
241
241
  try {
242
242
  await e.jApi.animations.DeleteAnimation();
243
243
  return;
244
244
  } catch (r) {
245
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete animation" });
245
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete animation" });
246
246
  }
247
247
  }
248
- ), la = p(
248
+ ), ca = p(
249
249
  "animations/saveCurrentAnimation",
250
250
  async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
251
251
  try {
252
252
  await e.jApi.animations.SaveAnimationConfiguration(t);
253
253
  return;
254
254
  } catch (r) {
255
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot update animation" });
255
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot update animation" });
256
256
  }
257
257
  }
258
258
  ), de = p(
@@ -262,23 +262,23 @@ const Gi = function(t) {
262
262
  await e.jApi.animations.ToggleAnimationActive();
263
263
  return;
264
264
  } catch (r) {
265
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot update animation" });
265
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot update animation" });
266
266
  }
267
267
  }
268
- ), da = function(t) {
268
+ ), ua = function(t) {
269
269
  return [
270
270
  {
271
271
  namespace: "ANIMATIONS",
272
272
  function: "add",
273
273
  handler: function(r) {
274
- r.namespace === "ANIMATIONS" && r.function === "add" && (t(J()), t(tt()));
274
+ r.namespace === "ANIMATIONS" && r.function === "add" && (t(J()), t(it()));
275
275
  }
276
276
  },
277
277
  {
278
278
  namespace: "ANIMATIONS",
279
279
  function: "delete",
280
280
  handler: function(r) {
281
- r.namespace === "ANIMATIONS" && r.function === "delete" && (t(J()), t(tt()));
281
+ r.namespace === "ANIMATIONS" && r.function === "delete" && (t(J()), t(it()));
282
282
  }
283
283
  },
284
284
  {
@@ -293,14 +293,14 @@ const Gi = function(t) {
293
293
  try {
294
294
  return (await e.jApi.animations.GetAnimationStats(t)).result.data;
295
295
  } catch (r) {
296
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation stats" });
296
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation stats" });
297
297
  }
298
- }), ca = {
298
+ }), pa = {
299
299
  stats: [],
300
300
  loading: "idle"
301
- }, Bt = T({
301
+ }, Wt = T({
302
302
  name: "animationStats",
303
- initialState: ca,
303
+ initialState: pa,
304
304
  reducers: {},
305
305
  extraReducers: (t) => {
306
306
  t.addCase(ce.pending, (e) => {
@@ -315,14 +315,14 @@ const Gi = function(t) {
315
315
  try {
316
316
  return (await e.jApi.animations.GetAnimationStatsCurrent(t)).result;
317
317
  } catch (r) {
318
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation stats current" });
318
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve animation stats current" });
319
319
  }
320
- }), ua = {
320
+ }), ga = {
321
321
  stats: null,
322
322
  loading: "idle"
323
- }, Wt = T({
323
+ }, qt = T({
324
324
  name: "animationStatsCurrent",
325
- initialState: ua,
325
+ initialState: ga,
326
326
  reducers: {},
327
327
  extraReducers: (t) => {
328
328
  t.addCase(ue.pending, (e) => {
@@ -333,50 +333,50 @@ const Gi = function(t) {
333
333
  e.loading = "idle";
334
334
  });
335
335
  }
336
- }), pa = (t) => t.animations.animationsList.animationConfiguration, ga = (t) => t.animations.animationsList.isActiveForCurrentUser, fa = (t) => t.animations.animationsList.isToggleLoading, ma = (t) => t.animations.animationsList.animationConfigurationApp, ya = O({
337
- [Ut.name]: Ut.reducer,
336
+ }), fa = (t) => t.animations.animationsList.animationConfiguration, ma = (t) => t.animations.animationsList.isActiveForCurrentUser, ya = (t) => t.animations.animationsList.isToggleLoading, Aa = (t) => t.animations.animationsList.animationConfigurationApp, Ea = O({
338
337
  [Bt.name]: Bt.reducer,
339
- [Wt.name]: Wt.reducer
340
- }), ci = {
338
+ [Wt.name]: Wt.reducer,
339
+ [qt.name]: qt.reducer
340
+ }), pi = {
341
341
  name: "animations",
342
- reducer: ya
343
- }, tl = ci.reducer, il = {
344
- slice: ci,
342
+ reducer: Ea
343
+ }, ll = pi.reducer, dl = {
344
+ slice: pi,
345
345
  actions: {
346
- saveCurrentAnimation: la,
346
+ saveCurrentAnimation: ca,
347
347
  fetchCurrentAnimation: J,
348
- deleteCurrentAnimation: oa,
348
+ deleteCurrentAnimation: da,
349
349
  toggleAnimationIsActive: de,
350
- fetchCurrentAnimationApp: tt,
350
+ fetchCurrentAnimationApp: it,
351
351
  fetchAnimationStats: ce,
352
352
  fetchAnimationStatsCurrent: ue
353
353
  },
354
- selectors: { selectCurrentAnimation: pa, isActiveAnimation: ga, isToggleLoading: fa, selectAnimationConfigurationApp: ma },
355
- getAnimationsRTHandlers: da
356
- }, F = lt({
354
+ selectors: { selectCurrentAnimation: fa, isActiveAnimation: ma, isToggleLoading: ya, selectAnimationConfigurationApp: Aa },
355
+ getAnimationsRTHandlers: ua
356
+ }, W = dt({
357
357
  selectId: (t) => t.name,
358
358
  sortComparer: (t, e) => t.label.localeCompare(e.label)
359
- }), ui = p(
359
+ }), gi = p(
360
360
  "application/fetch",
361
361
  async (t, { extra: e }) => await e.jApi.application.list()
362
- ), Ft = T({
362
+ ), $t = T({
363
363
  name: "applications",
364
- initialState: F.getInitialState(),
364
+ initialState: W.getInitialState(),
365
365
  reducers: {
366
- addOne: F.addOne,
367
- addMany: F.addMany,
368
- setAll: F.setAll
366
+ addOne: W.addOne,
367
+ addMany: W.addMany,
368
+ setAll: W.setAll
369
369
  },
370
370
  extraReducers: (t) => {
371
- t.addCase(ui.fulfilled, (e, i) => {
372
- F.setAll(e, i.payload.result);
371
+ t.addCase(gi.fulfilled, (e, i) => {
372
+ W.setAll(e, i.payload.result);
373
373
  });
374
374
  }
375
- }), Aa = F.getSelectors((t) => t.entities.applications), al = {
376
- slice: Ft,
377
- actions: { fetchList: ui, ...Ft.actions },
378
- selectors: Aa
379
- }, Ea = {
375
+ }), Sa = W.getSelectors((t) => t.entities.applications), cl = {
376
+ slice: $t,
377
+ actions: { fetchList: gi, ...$t.actions },
378
+ selectors: Sa
379
+ }, Ta = {
380
380
  entities: [],
381
381
  loading: "idle",
382
382
  nbResults: 0
@@ -392,9 +392,9 @@ const Gi = function(t) {
392
392
  format: "raw-list"
393
393
  });
394
394
  }
395
- ), $t = T({
395
+ ), Vt = T({
396
396
  name: "bookableAsset",
397
- initialState: Ea,
397
+ initialState: Ta,
398
398
  reducers: {},
399
399
  extraReducers: (t) => {
400
400
  t.addCase(pe.pending, (e) => {
@@ -408,7 +408,7 @@ const Gi = function(t) {
408
408
  }), ge = p(
409
409
  "AssetReservation/configuration",
410
410
  async (t, { extra: e }) => await e.jApi.assetReservation.configuration()
411
- ), Sa = {
411
+ ), Ca = {
412
412
  description: "",
413
413
  right: {
414
414
  manage: !1
@@ -419,9 +419,9 @@ const Gi = function(t) {
419
419
  bookingClosingTime: "24:00",
420
420
  lastBookingSchedule: "24:00",
421
421
  loading: "idle"
422
- }, qt = T({
422
+ }, Ht = T({
423
423
  name: "configuration",
424
- initialState: Sa,
424
+ initialState: Ca,
425
425
  reducers: {},
426
426
  extraReducers: (t) => {
427
427
  t.addCase(ge.pending, (e) => {
@@ -433,15 +433,15 @@ const Gi = function(t) {
433
433
  e.loading = "idle";
434
434
  });
435
435
  }
436
- }), pi = {
436
+ }), fi = {
437
437
  date: "",
438
438
  hourStart: "",
439
439
  hourEnd: ""
440
- }, Ta = {
440
+ }, ba = {
441
441
  entities: [],
442
442
  loading: "idle",
443
443
  nbResults: 0,
444
- form: pi
444
+ form: fi
445
445
  }, fe = p("Reservation/fetchReservation", async (t, { extra: e }) => {
446
446
  const i = {
447
447
  format: "raw-list",
@@ -449,15 +449,15 @@ const Gi = function(t) {
449
449
  viewMode: t === "history" ? "history" : void 0
450
450
  };
451
451
  return await e.jApi.assetReservation.getList(i);
452
- }), At = T({
452
+ }), Et = T({
453
453
  name: "reservation",
454
- initialState: Ta,
454
+ initialState: ba,
455
455
  reducers: {
456
456
  setForm: (t, e) => {
457
457
  t.form = e.payload;
458
458
  },
459
459
  resetForm: (t) => {
460
- t.form = pi;
460
+ t.form = fi;
461
461
  },
462
462
  removeReservation: (t, e) => {
463
463
  t.entities = t.entities.filter((i) => i.id !== e.payload);
@@ -472,25 +472,25 @@ const Gi = function(t) {
472
472
  e.loading = "idle";
473
473
  });
474
474
  }
475
- }), Ca = O({
476
- [$t.name]: $t.reducer,
477
- [qt.name]: qt.reducer,
478
- [At.name]: At.reducer
479
- }), ba = {
475
+ }), La = O({
476
+ [Vt.name]: Vt.reducer,
477
+ [Ht.name]: Ht.reducer,
478
+ [Et.name]: Et.reducer
479
+ }), wa = {
480
480
  name: "assetReservation",
481
- reducer: Ca
482
- }, wa = (t) => t.assetReservation.configuration, Ia = (t) => t.assetReservation.bookableAsset.entities, La = (t) => t.assetReservation.bookableAsset.loading, va = (t) => t.assetReservation.reservation.entities, ha = (t) => t.assetReservation.reservation.loading, Oa = (t) => t.assetReservation.reservation.form, rl = {
483
- slice: ba,
484
- actions: { ...At.actions, fetchBookableAsset: pe, fetchConfiguration: ge, fetchReservation: fe },
481
+ reducer: La
482
+ }, Ia = (t) => t.assetReservation.configuration, va = (t) => t.assetReservation.bookableAsset.entities, ha = (t) => t.assetReservation.bookableAsset.loading, Oa = (t) => t.assetReservation.reservation.entities, Ra = (t) => t.assetReservation.reservation.loading, Da = (t) => t.assetReservation.reservation.form, ul = {
483
+ slice: wa,
484
+ actions: { ...Et.actions, fetchBookableAsset: pe, fetchConfiguration: ge, fetchReservation: fe },
485
485
  selectors: {
486
- configuration: wa,
487
- bookableAssetEntities: Ia,
488
- bookableAssetLoading: La,
489
- reservationEntities: va,
490
- reservationLoading: ha,
491
- reservationForm: Oa
492
- }
493
- }, Ra = {
486
+ configuration: Ia,
487
+ bookableAssetEntities: va,
488
+ bookableAssetLoading: ha,
489
+ reservationEntities: Oa,
490
+ reservationLoading: Ra,
491
+ reservationForm: Da
492
+ }
493
+ }, ka = {
494
494
  loading: "idle",
495
495
  reports: [],
496
496
  page: 1,
@@ -500,9 +500,9 @@ const Gi = function(t) {
500
500
  limit: 10,
501
501
  nbResults: 0,
502
502
  pendingReports: []
503
- }, Da = T({
503
+ }, Ma = T({
504
504
  name: "contentReport",
505
- initialState: Ra,
505
+ initialState: ka,
506
506
  reducers: {
507
507
  setTab: (t, e) => {
508
508
  t.tab = e.payload, t.page = 1, t.orders = [], t.filters = [];
@@ -554,23 +554,23 @@ const Gi = function(t) {
554
554
  limit: n.limit
555
555
  })).result;
556
556
  } catch (l) {
557
- return v(l) || a(y.actions.error({ label: A(l) })), e({ error: 1, errorMsg: "Cannot fetch pads" });
557
+ return v(l) || a(m.actions.error({ label: A(l) })), e({ error: 1, errorMsg: "Cannot fetch pads" });
558
558
  }
559
559
  }
560
560
  ), ye = p("contentReport/updateStatus", async (t, { dispatch: e, rejectWithValue: i, extra: a }) => {
561
561
  try {
562
- return await a.jApi.contentReport.updateStatus(t), e(y.actions.success({ label: "GLOBAL_Successfully_Saved" })), !0;
562
+ return await a.jApi.contentReport.updateStatus(t), e(m.actions.success({ label: "GLOBAL_Successfully_Saved" })), !0;
563
563
  } catch (r) {
564
- return v(r) || e(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot fetch pads" });
564
+ return v(r) || e(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot fetch pads" });
565
565
  }
566
- }), ka = (t) => t.contentReport, nl = {
567
- slice: Da,
566
+ }), xa = (t) => t.contentReport, pl = {
567
+ slice: Ma,
568
568
  actions: {
569
569
  fetchReports: me,
570
570
  updateStatus: ye
571
571
  },
572
- selectors: { selectContentReport: ka }
573
- }, Ma = {
572
+ selectors: { selectContentReport: xa }
573
+ }, ja = {
574
574
  bookmarks: [],
575
575
  loading: "idle",
576
576
  status: void 0,
@@ -587,18 +587,18 @@ const Gi = function(t) {
587
587
  try {
588
588
  return await e.jApi.bookmark.getFormattedList(r, "raw-list");
589
589
  } catch (n) {
590
- return a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot retrieve bookmarks" });
590
+ return a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot retrieve bookmarks" });
591
591
  }
592
592
  }), Ae = p("bookmarkList/addBookmark", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
593
593
  try {
594
- return li.isBookmarkLink(t) ? await e.jApi.bookmark.addFormattedLink(
594
+ return ci.isBookmarkLink(t) ? await e.jApi.bookmark.addFormattedLink(
595
595
  t.targetId,
596
596
  t.targetType,
597
597
  "raw-list"
598
598
  ) : await e.jApi.bookmark.addBookmark(t);
599
599
  } catch (r) {
600
600
  const n = A(r);
601
- return a(y.actions.error({ label: n })), i({ error: 1, errorMsg: "Error saving bookmark" });
601
+ return a(m.actions.error({ label: n })), i({ error: 1, errorMsg: "Error saving bookmark" });
602
602
  }
603
603
  }), Ee = p(
604
604
  "bookmarkList/moveBookmark",
@@ -607,7 +607,7 @@ const Gi = function(t) {
607
607
  await a.jApi.bookmark.move(t.id, e.id, i);
608
608
  return;
609
609
  } catch (s) {
610
- return n(y.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Error moving bookmark" });
610
+ return n(m.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Error moving bookmark" });
611
611
  }
612
612
  }
613
613
  ), Se = p("bookmarkList/deleteBookmark", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
@@ -615,11 +615,11 @@ const Gi = function(t) {
615
615
  await e.jApi.bookmark.delete(t.id);
616
616
  return;
617
617
  } catch (r) {
618
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Error deleting bookmark" });
618
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Error deleting bookmark" });
619
619
  }
620
620
  }), Z = T({
621
621
  name: "bookmarkList",
622
- initialState: Ma,
622
+ initialState: ja,
623
623
  reducers: {
624
624
  resetAddBookmarkStatus: (t, e) => {
625
625
  t.add[e.payload] && delete t.add[e.payload];
@@ -688,9 +688,9 @@ const Gi = function(t) {
688
688
  });
689
689
  });
690
690
  }
691
- }), xa = function(t) {
691
+ }), _a = function(t) {
692
692
  const e = function(n, s) {
693
- li.objectIsType("bookmarkLink", n.object) ? t(s(n.object)) : t(V());
693
+ ci.objectIsType("bookmarkLink", n.object) ? t(s(n.object)) : t(V());
694
694
  }, i = function() {
695
695
  t(V());
696
696
  }, a = function(n) {
@@ -725,7 +725,7 @@ const Gi = function(t) {
725
725
  handler: i
726
726
  }
727
727
  ];
728
- }, ja = {
728
+ }, Na = {
729
729
  bookmark: void 0,
730
730
  status: void 0,
731
731
  loading: "idle"
@@ -741,9 +741,9 @@ const Gi = function(t) {
741
741
  return i({ error: 2, errorMsg: "Error saving bookmark" });
742
742
  }
743
743
  }
744
- ), Et = T({
744
+ ), St = T({
745
745
  name: "bookmarkEdit",
746
- initialState: ja,
746
+ initialState: Na,
747
747
  reducers: {
748
748
  setEditBookmark: (t, e) => {
749
749
  t.bookmark = { ...e.payload };
@@ -764,40 +764,40 @@ const Gi = function(t) {
764
764
  e.status = "error", e.loading = "idle";
765
765
  });
766
766
  }
767
- }), Na = O({
767
+ }), Pa = O({
768
768
  [Z.name]: Z.reducer,
769
- [Et.name]: Et.reducer
770
- }), _a = {
769
+ [St.name]: St.reducer
770
+ }), Ua = {
771
771
  name: "bookmark",
772
- reducer: Na
773
- }, Pa = (t) => t.bookmark.bookmarkList, Ua = (t) => t.bookmark.bookmarkList.isInitialized, Ba = (t) => t.bookmark.bookmarkEdit.bookmark, Wa = (t, e) => t.bookmark.bookmarkList.bookmarks.find((i) => i.targetId === e), sl = {
774
- slice: _a,
772
+ reducer: Pa
773
+ }, Fa = (t) => t.bookmark.bookmarkList, Ba = (t) => t.bookmark.bookmarkList.isInitialized, Wa = (t) => t.bookmark.bookmarkEdit.bookmark, qa = (t, e) => t.bookmark.bookmarkList.bookmarks.find((i) => i.targetId === e), gl = {
774
+ slice: Ua,
775
775
  actions: {
776
776
  fetchBookmark: V,
777
777
  addBookmark: Ae,
778
778
  moveBookmark: Ee,
779
779
  deleteBookmark: Se,
780
780
  editBookmark: Te,
781
- ...Et.actions,
781
+ ...St.actions,
782
782
  ...Z.actions
783
783
  },
784
784
  selectors: {
785
- bookmarkList: Pa,
786
- bookmarkListIsInitialized: Ua,
787
- bookmarkEditBookmark: Ba,
788
- bookmarkByArticleId: Wa
785
+ bookmarkList: Fa,
786
+ bookmarkListIsInitialized: Ba,
787
+ bookmarkEditBookmark: Wa,
788
+ bookmarkByArticleId: qa
789
789
  },
790
- getRTHandlers: xa
791
- }, Vt = {
790
+ getRTHandlers: _a
791
+ }, Gt = {
792
792
  list: [],
793
793
  statuses: ["subscribed", "unanswered"],
794
794
  loading: "idle",
795
795
  types: [],
796
796
  pendingStatusChanges: []
797
797
  };
798
- let ut = null;
799
- const gi = (t, e, i = 500) => {
800
- ut && clearTimeout(ut), ut = setTimeout(() => {
798
+ let pt = null;
799
+ const mi = (t, e, i = 500) => {
800
+ pt && clearTimeout(pt), pt = setTimeout(() => {
801
801
  t(j(e));
802
802
  }, i);
803
803
  }, j = p("calendarEvents/fetchEvents", async (t, { extra: e, rejectWithValue: i, dispatch: a, signal: r, getState: n }) => {
@@ -820,9 +820,9 @@ const gi = (t, e, i = 500) => {
820
820
  signal: r
821
821
  })).result;
822
822
  } catch (d) {
823
- return v(d) || a(y.actions.error({ label: A(d) })), i({ error: 1, errorMsg: "Cannot retrieve events" });
823
+ return v(d) || a(m.actions.error({ label: A(d) })), i({ error: 1, errorMsg: "Cannot retrieve events" });
824
824
  }
825
- }), fi = p("calendarEvents/setDates", async (t, { dispatch: e }) => (gi(e, { dates: t }), !0)), mi = p("calendarEvents/setTypes", async (t, { dispatch: e }) => (gi(e, { types: t }), !0)), Ce = p("calendarEvents/changeResponse", async (t, { dispatch: e, extra: i, signal: a, rejectWithValue: r }) => {
825
+ }), yi = p("calendarEvents/setDates", async (t, { dispatch: e }) => (mi(e, { dates: t }), !0)), Ai = p("calendarEvents/setTypes", async (t, { dispatch: e }) => (mi(e, { types: t }), !0)), Ce = p("calendarEvents/changeResponse", async (t, { dispatch: e, extra: i, signal: a, rejectWithValue: r }) => {
826
826
  try {
827
827
  return t.status === "unknown" ? await i.jApi.global.removeAction(
828
828
  {
@@ -839,13 +839,13 @@ const gi = (t, e, i = 500) => {
839
839
  value: t.status
840
840
  },
841
841
  { signal: a }
842
- ), e(y.actions.success({ label: "GLOBAL_Successfully_Saved" })), !0;
842
+ ), e(m.actions.success({ label: "GLOBAL_Successfully_Saved" })), !0;
843
843
  } catch (n) {
844
- return v(n) || e(y.actions.error({ label: A(n) })), r({ error: 1, errorMsg: "Cannot change response" });
844
+ return v(n) || e(m.actions.error({ label: A(n) })), r({ error: 1, errorMsg: "Cannot change response" });
845
845
  }
846
846
  }), x = T({
847
847
  name: "events",
848
- initialState: Vt,
848
+ initialState: Gt,
849
849
  reducers: {
850
850
  addEvent: (t, e) => {
851
851
  t.list = [e.payload, ...t.list];
@@ -856,7 +856,7 @@ const gi = (t, e, i = 500) => {
856
856
  updateEvent: (t, e) => {
857
857
  t.list = t.list.map((i) => i.uri === e.payload.uri ? e.payload : i);
858
858
  },
859
- reset: () => Vt
859
+ reset: () => Gt
860
860
  },
861
861
  extraReducers: (t) => {
862
862
  t.addCase(j.pending, (e, i) => {
@@ -891,13 +891,13 @@ const gi = (t, e, i = 500) => {
891
891
  (n) => n.requestId !== i.meta.requestId
892
892
  );
893
893
  }
894
- }).addCase(fi.pending, (e, i) => {
894
+ }).addCase(yi.pending, (e, i) => {
895
895
  e.dates = { start: i.meta.arg.start, end: i.meta.arg.end }, e.loading = "pending";
896
- }).addCase(mi.pending, (e, i) => {
896
+ }).addCase(Ai.pending, (e, i) => {
897
897
  e.types = i.meta.arg, e.loading = "pending";
898
898
  });
899
899
  }
900
- }), ie = (t) => ["socialEvent", "meeting", "animatedMeeting", "recurringEvent", "recurringEventOccurrence"].includes(t), Fa = function(t, e) {
900
+ }), ie = (t) => ["socialEvent", "meeting", "animatedMeeting", "recurringEvent", "recurringEventOccurrence"].includes(t), $a = function(t, e) {
901
901
  const i = function(s) {
902
902
  if (s.namespace === "JAMESPOT" && s.function === "article-create" && ie(s.object.type)) {
903
903
  if (s.object.type === "recurringEvent") {
@@ -910,7 +910,7 @@ const gi = (t, e, i = 500) => {
910
910
  ).then((l) => {
911
911
  (!("hideFromCalendar" in l.result) || !l.result.hideFromCalendar) && t(x.actions.addEvent(l.result));
912
912
  }).catch((l) => {
913
- t(y.actions.error({ label: A(l) }));
913
+ t(m.actions.error({ label: A(l) }));
914
914
  });
915
915
  }
916
916
  }, a = function(s) {
@@ -933,7 +933,7 @@ const gi = (t, e, i = 500) => {
933
933
  ).then((l) => {
934
934
  "hideFromCalendar" in l.result && l.result.hideFromCalendar ? t(x.actions.removeEvent({ uri: s.object.uri })) : t(x.actions.updateEvent(l.result));
935
935
  }).catch((l) => {
936
- t(y.actions.error({ label: A(l) }));
936
+ t(m.actions.error({ label: A(l) }));
937
937
  });
938
938
  }
939
939
  }, n = function(s) {
@@ -943,7 +943,7 @@ const gi = (t, e, i = 500) => {
943
943
  ).then((l) => {
944
944
  t(x.actions.updateEvent(l.result));
945
945
  }).catch((l) => {
946
- t(y.actions.error({ label: A(l) }));
946
+ t(m.actions.error({ label: A(l) }));
947
947
  });
948
948
  };
949
949
  return [
@@ -973,25 +973,25 @@ const gi = (t, e, i = 500) => {
973
973
  handler: n
974
974
  }
975
975
  ];
976
- }, $a = O({
976
+ }, Va = O({
977
977
  [x.name]: x.reducer
978
- }), qa = {
978
+ }), Ha = {
979
979
  name: "calendar",
980
- reducer: $a
981
- }, Va = (t) => t.calendar.events, ol = {
982
- slice: qa,
980
+ reducer: Va
981
+ }, Ga = (t) => t.calendar.events, fl = {
982
+ slice: Ha,
983
983
  actions: {
984
984
  fetchEvents: j,
985
- setDates: fi,
986
- setTypes: mi,
985
+ setDates: yi,
986
+ setTypes: Ai,
987
987
  changeResponse: Ce,
988
988
  ...x.actions
989
989
  },
990
990
  selectors: {
991
- selectCalendarEvents: Va
991
+ selectCalendarEvents: Ga
992
992
  },
993
- getCalendarRTHandlers: Fa
994
- }, Ha = {
993
+ getCalendarRTHandlers: $a
994
+ }, Xa = {
995
995
  loading: "idle",
996
996
  comments: []
997
997
  }, P = p(
@@ -1004,21 +1004,21 @@ const gi = (t, e, i = 500) => {
1004
1004
  });
1005
1005
  return { idArticle: t.idArticle, list: r.result };
1006
1006
  } catch (r) {
1007
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve comments" });
1007
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve comments" });
1008
1008
  }
1009
1009
  }
1010
- ), St = p(
1010
+ ), Tt = p(
1011
1011
  "commentList/deleteComment",
1012
1012
  async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
1013
1013
  try {
1014
1014
  return await e.jApi.article.deleteComment(t.idComment), !0;
1015
1015
  } catch (r) {
1016
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete comment" });
1016
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete comment" });
1017
1017
  }
1018
1018
  }
1019
- ), Tt = T({
1019
+ ), Ct = T({
1020
1020
  name: "commentList",
1021
- initialState: Ha,
1021
+ initialState: Xa,
1022
1022
  reducers: {
1023
1023
  discardComments: (t, e) => {
1024
1024
  t.comments = t.comments.filter((i) => i.idArticle !== e.payload.idArticle);
@@ -1035,7 +1035,7 @@ const gi = (t, e, i = 500) => {
1035
1035
  ];
1036
1036
  return;
1037
1037
  }
1038
- const n = [], s = t.comments.reduce((d, g) => Array.isArray(g.list) ? [...d, ...g.list.map((m) => m.uri)] : [...d], n), l = Array.isArray(a) ? a.filter((d) => !s.includes(d.uri)) : [];
1038
+ const n = [], s = t.comments.reduce((d, g) => Array.isArray(g.list) ? [...d, ...g.list.map((y) => y.uri)] : [...d], n), l = Array.isArray(a) ? a.filter((d) => !s.includes(d.uri)) : [];
1039
1039
  t.comments = t.comments.map((d) => d.idArticle === i ? {
1040
1040
  ...d,
1041
1041
  list: Array.isArray(d.list) ? [...d.list, ...l] : [...l]
@@ -1066,14 +1066,14 @@ const gi = (t, e, i = 500) => {
1066
1066
  ];
1067
1067
  }).addCase(P.rejected, (e) => {
1068
1068
  e.loading = "idle";
1069
- }).addCase(St.pending, (e, i) => {
1069
+ }).addCase(Tt.pending, (e, i) => {
1070
1070
  e.comments = e.comments.map((a) => a.idArticle !== i.meta.arg.idArticle ? a : {
1071
1071
  ...a,
1072
1072
  list: a.list.map(
1073
1073
  (r) => r.id === i.meta.arg.idComment ? { ...r, pending: !0 } : r
1074
1074
  )
1075
1075
  });
1076
- }).addCase(St.rejected, (e, i) => {
1076
+ }).addCase(Tt.rejected, (e, i) => {
1077
1077
  e.comments = e.comments.map((a) => a.idArticle !== i.meta.arg.idArticle ? a : {
1078
1078
  ...a,
1079
1079
  list: a.list.map(
@@ -1082,7 +1082,7 @@ const gi = (t, e, i = 500) => {
1082
1082
  });
1083
1083
  });
1084
1084
  }
1085
- }), Ga = function(t, e) {
1085
+ }), Ja = function(t, e) {
1086
1086
  return [
1087
1087
  {
1088
1088
  namespace: "JAMESPOT",
@@ -1099,7 +1099,7 @@ const gi = (t, e, i = 500) => {
1099
1099
  }
1100
1100
  }
1101
1101
  ];
1102
- }, Xa = function(t, e, i) {
1102
+ }, Ka = function(t, e, i) {
1103
1103
  const a = function(r) {
1104
1104
  r.namespace === "CUSTOM-ACTION" && (r.function === "add" || r.function === "remove") && r.object.type === "sociallike" && r.object.targetId && e && e.includes(r.object.targetId) && t(P({ idArticle: i }));
1105
1105
  };
@@ -1107,29 +1107,29 @@ const gi = (t, e, i = 500) => {
1107
1107
  { namespace: "CUSTOM-ACTION", function: "add", handler: a },
1108
1108
  { namespace: "CUSTOM-ACTION", function: "remove", handler: a }
1109
1109
  ] : [];
1110
- }, Ja = O({
1111
- [Tt.name]: Tt.reducer
1112
- }), Ka = {
1110
+ }, Ya = O({
1111
+ [Ct.name]: Ct.reducer
1112
+ }), Qa = {
1113
1113
  name: "comment",
1114
- reducer: Ja
1115
- }, Ya = (t, e, i = 0) => {
1114
+ reducer: Ya
1115
+ }, za = (t, e, i = 0) => {
1116
1116
  const a = t.comment.commentList.comments.find((n) => n.idArticle === e), r = a ? [...a.list].sort((n, s) => n.id - s.id) : [];
1117
1117
  return i !== 0 ? r.slice(-i) : r;
1118
- }, ll = {
1119
- slice: Ka,
1120
- actions: { fetchComments: P, deleteComment: St, ...Tt.actions },
1118
+ }, ml = {
1119
+ slice: Qa,
1120
+ actions: { fetchComments: P, deleteComment: Tt, ...Ct.actions },
1121
1121
  selectors: {
1122
- commentList: Ya
1122
+ commentList: za
1123
1123
  },
1124
- getCommentRTHandlers: Ga,
1125
- getCommentsLikeRTHandlers: Xa
1124
+ getCommentRTHandlers: Ja,
1125
+ getCommentsLikeRTHandlers: Ka
1126
1126
  }, D = {
1127
1127
  route: "extra-bot",
1128
1128
  moduleName: "ExtraBotHook",
1129
1129
  configurationType: "extraBot",
1130
1130
  listLimit: 20,
1131
1131
  listDefaultPage: 1
1132
- }, za = {
1132
+ }, Za = {
1133
1133
  global: {
1134
1134
  loading: "idle"
1135
1135
  },
@@ -1169,7 +1169,7 @@ const gi = (t, e, i = 500) => {
1169
1169
  orders: n.orders
1170
1170
  })).result;
1171
1171
  } catch (s) {
1172
- return v(s) || a(y.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot list" });
1172
+ return v(s) || a(m.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot list" });
1173
1173
  }
1174
1174
  }
1175
1175
  ), be = p("extraBot/fetchMines", async (t, { extra: e, rejectWithValue: i, dispatch: a, getState: r }) => {
@@ -1182,30 +1182,30 @@ const gi = (t, e, i = 500) => {
1182
1182
  orders: n.orders
1183
1183
  })).result;
1184
1184
  } catch (s) {
1185
- return v(s) || a(y.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot list" });
1185
+ return v(s) || a(m.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot list" });
1186
1186
  }
1187
- }), we = p(
1187
+ }), Le = p(
1188
1188
  "extraBot/toggleActivation",
1189
1189
  async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
1190
1190
  try {
1191
1191
  const r = !t.enabled, n = (await e.jApi.article.update(
1192
1192
  { ...t, enabled: r },
1193
- { format: gt.VIEW }
1193
+ { format: ft.VIEW }
1194
1194
  )).result;
1195
1195
  return n.enabled !== t.enabled ? (a(
1196
- y.actions.success({
1196
+ m.actions.success({
1197
1197
  label: r ? "APP_ExtraBot_Toast_ActivationSuccess" : "APP_ExtraBot_Toast_DeactivationSuccess"
1198
1198
  })
1199
1199
  ), a(K())) : a(
1200
- y.actions.error({
1200
+ m.actions.error({
1201
1201
  label: "APP_ExtraBot_Toast_FailedToChangeActivation"
1202
1202
  })
1203
1203
  ), n;
1204
1204
  } catch (r) {
1205
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Failed to change extra bot activation" });
1205
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Failed to change extra bot activation" });
1206
1206
  }
1207
1207
  }
1208
- ), Ie = p(
1208
+ ), we = p(
1209
1209
  "extraBot/save",
1210
1210
  async ({ extraBot: t }, { extra: e, rejectWithValue: i, dispatch: a }) => {
1211
1211
  try {
@@ -1215,29 +1215,29 @@ const gi = (t, e, i = 500) => {
1215
1215
  n = (await e.jApi.article.update(
1216
1216
  r,
1217
1217
  {
1218
- format: gt.VIEW
1218
+ format: ft.VIEW
1219
1219
  }
1220
1220
  )).result, s = (await e.jApi.extraBot.updateBot(n.uri)).result;
1221
1221
  else {
1222
1222
  if (n = (await e.jApi.article.create(
1223
1223
  { ...r },
1224
- { format: gt.VIEW }
1224
+ { format: ft.VIEW }
1225
1225
  )).result[0], !n)
1226
1226
  throw new Error("ExtraBot configuration creation failed");
1227
1227
  s = (await e.jApi.extraBot.createBot(n.uri)).result, n._user = s;
1228
1228
  }
1229
1229
  const l = t.uri ? "APP_ExtraBot_Toast_SaveEdit" : "APP_ExtraBot_Toast_SaveCreate";
1230
- return a(y.actions.success({ label: l })), n;
1230
+ return a(m.actions.success({ label: l })), n;
1231
1231
  } catch (r) {
1232
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot" });
1232
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve extra bot" });
1233
1233
  }
1234
1234
  }
1235
- ), Qa = (t, e, i, a) => {
1235
+ ), er = (t, e, i, a) => {
1236
1236
  const r = t.listAll.data.find((s) => s.uri === e), n = t.listMines.data.find((s) => s.uri === e);
1237
1237
  r && (r[i] = a), n && (n[i] = a);
1238
- }, Ht = T({
1238
+ }, Xt = T({
1239
1239
  name: "extraBot",
1240
- initialState: za,
1240
+ initialState: Za,
1241
1241
  reducers: {
1242
1242
  setListAllOrder: (t, e) => {
1243
1243
  t.listAll.orders = [...e.payload], t.listAll.page = D.listDefaultPage;
@@ -1277,36 +1277,36 @@ const gi = (t, e, i = 500) => {
1277
1277
  e.listMines.data = i.payload.data, e.listMines.nbResults = i.payload.cnt, e.listMines.limit = i.payload.limit ?? D.listLimit, e.listMines.page = i.payload.page, e.listMines.loading = "idle";
1278
1278
  }).addCase(be.rejected, (e) => {
1279
1279
  e.listMines.loading = "idle";
1280
- }).addCase(we.pending, (e) => {
1280
+ }).addCase(Le.pending, (e) => {
1281
1281
  e.global.loading = "pending";
1282
- }).addCase(we.fulfilled, (e, i) => {
1282
+ }).addCase(Le.fulfilled, (e, i) => {
1283
1283
  e.global.loading = "idle";
1284
1284
  const a = i.payload;
1285
- Qa(e, a.uri, "enabled", a.enabled);
1286
- }).addCase(we.rejected, (e) => {
1285
+ er(e, a.uri, "enabled", a.enabled);
1286
+ }).addCase(Le.rejected, (e) => {
1287
1287
  e.global.loading = "idle";
1288
- }).addCase(Ie.pending, (e) => {
1288
+ }).addCase(we.pending, (e) => {
1289
1289
  e.global.loading = "pending";
1290
- }).addCase(Ie.fulfilled, (e, i) => {
1290
+ }).addCase(we.fulfilled, (e, i) => {
1291
1291
  e.global.loading = "idle", e.formModal.open = !1;
1292
- }).addCase(Ie.rejected, (e) => {
1292
+ }).addCase(we.rejected, (e) => {
1293
1293
  e.global.loading = "idle";
1294
1294
  });
1295
1295
  }
1296
- }), Za = (t) => t.extraBot.listAll, er = (t) => t.extraBot.listMines, dl = {
1297
- slice: Ht,
1296
+ }), tr = (t) => t.extraBot.listAll, ir = (t) => t.extraBot.listMines, yl = {
1297
+ slice: Xt,
1298
1298
  actions: {
1299
1299
  fetchExtraBotListAll: K,
1300
1300
  fetchExtraBotListMines: be,
1301
- toggleExtraBotActivation: we,
1302
- saveExtraBot: Ie,
1303
- ...Ht.actions
1301
+ toggleExtraBotActivation: Le,
1302
+ saveExtraBot: we,
1303
+ ...Xt.actions
1304
1304
  },
1305
- selectors: { selectExtraBotListAll: Za, selectExtraBotListMines: er }
1306
- }, tr = {
1305
+ selectors: { selectExtraBotListAll: tr, selectExtraBotListMines: ir }
1306
+ }, ar = {
1307
1307
  loading: "idle",
1308
1308
  access: { createCategory: !1 }
1309
- }, Le = p(
1309
+ }, Ie = p(
1310
1310
  "faqConfig/fetch",
1311
1311
  async (t, { extra: e }) => {
1312
1312
  try {
@@ -1329,25 +1329,25 @@ const gi = (t, e, i = 500) => {
1329
1329
  throw i;
1330
1330
  }
1331
1331
  }
1332
- ), Gt = T({
1332
+ ), Jt = T({
1333
1333
  name: "config",
1334
- initialState: tr,
1334
+ initialState: ar,
1335
1335
  reducers: {},
1336
1336
  extraReducers: (t) => {
1337
- t.addCase(Le.pending, (e) => {
1337
+ t.addCase(Ie.pending, (e) => {
1338
1338
  e.loading === "idle" && (e.loading = "pending");
1339
- }).addCase(Le.fulfilled, (e, i) => (e.loading == "pending" && (e.loading = "idle"), i.payload._web !== void 0 && (e._web = i.payload._web), i.payload.appImage && (e.appImage = i.payload.appImage), i.payload.appImageText && (e.appImageText = i.payload.appImageText), i.payload.access && (e.access = i.payload.access), i.payload._displayComment !== void 0 && (e._displayComment = i.payload._displayComment), e)).addCase(Le.rejected, (e) => {
1339
+ }).addCase(Ie.fulfilled, (e, i) => (e.loading == "pending" && (e.loading = "idle"), i.payload._web !== void 0 && (e._web = i.payload._web), i.payload.appImage && (e.appImage = i.payload.appImage), i.payload.appImageText && (e.appImageText = i.payload.appImageText), i.payload.access && (e.access = i.payload.access), i.payload._displayComment !== void 0 && (e._displayComment = i.payload._displayComment), e)).addCase(Ie.rejected, (e) => {
1340
1340
  e.loading == "pending" && (e.loading = "idle");
1341
1341
  });
1342
1342
  }
1343
- }), ir = {
1343
+ }), rr = {
1344
1344
  loading: "idle",
1345
1345
  categories: null
1346
1346
  }, ve = p("faqCategories/fetch", async (t, { extra: e }) => ({
1347
1347
  categories: (await e.jApi.faq.getCategoriesList()).result.data
1348
- })), Xt = T({
1348
+ })), Kt = T({
1349
1349
  name: "categories",
1350
- initialState: ir,
1350
+ initialState: rr,
1351
1351
  reducers: {},
1352
1352
  extraReducers: (t) => {
1353
1353
  t.addCase(ve.pending, (e) => {
@@ -1356,26 +1356,26 @@ const gi = (t, e, i = 500) => {
1356
1356
  e.loading == "pending" && (e.loading = "idle");
1357
1357
  });
1358
1358
  }
1359
- }), ar = O({
1360
- [Gt.name]: Gt.reducer,
1361
- [Xt.name]: Xt.reducer
1362
- }), rr = {
1359
+ }), nr = O({
1360
+ [Jt.name]: Jt.reducer,
1361
+ [Kt.name]: Kt.reducer
1362
+ }), sr = {
1363
1363
  name: "faq",
1364
- reducer: ar
1365
- }, nr = (t) => t.faq.config, sr = (t) => t.faq.categories, cl = {
1366
- slice: rr,
1364
+ reducer: nr
1365
+ }, or = (t) => t.faq.config, lr = (t) => t.faq.categories, Al = {
1366
+ slice: sr,
1367
1367
  actions: {
1368
- fetchFaqConfig: Le,
1368
+ fetchFaqConfig: Ie,
1369
1369
  fetchFaqCategories: ve
1370
1370
  },
1371
1371
  selectors: {
1372
- selectFaqConfig: nr,
1373
- selectFaqCategories: sr
1372
+ selectFaqConfig: or,
1373
+ selectFaqCategories: lr
1374
1374
  }
1375
1375
  }, Y = {
1376
1376
  listLimit: 50,
1377
1377
  listDefaultPage: 1
1378
- }, or = {
1378
+ }, dr = {
1379
1379
  list: {
1380
1380
  loading: "idle",
1381
1381
  data: [],
@@ -1403,7 +1403,7 @@ const gi = (t, e, i = 500) => {
1403
1403
  orders: n.orders
1404
1404
  })).result;
1405
1405
  } catch (s) {
1406
- return v(s) || a(y.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve file integrity list" });
1406
+ return v(s) || a(m.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Cannot retrieve file integrity list" });
1407
1407
  }
1408
1408
  }), Oe = p(
1409
1409
  "fileIntegrity/releaseQuarantine",
@@ -1411,7 +1411,7 @@ const gi = (t, e, i = 500) => {
1411
1411
  try {
1412
1412
  return (await e.jApi.fileIntegrity.release(t)).result;
1413
1413
  } catch (r) {
1414
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot release quarantined file" });
1414
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot release quarantined file" });
1415
1415
  }
1416
1416
  }
1417
1417
  ), Re = p(
@@ -1420,12 +1420,12 @@ const gi = (t, e, i = 500) => {
1420
1420
  try {
1421
1421
  return (await e.jApi.fileIntegrity.delete(t)).result;
1422
1422
  } catch (r) {
1423
- return v(r) || a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete quarantined file" });
1423
+ return v(r) || a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot delete quarantined file" });
1424
1424
  }
1425
1425
  }
1426
- ), Jt = T({
1426
+ ), Yt = T({
1427
1427
  name: "fileIntegrity",
1428
- initialState: or,
1428
+ initialState: dr,
1429
1429
  reducers: {
1430
1430
  setListOrder: (t, e) => {
1431
1431
  t.list.orders = [...e.payload], t.list.page = Y.listDefaultPage;
@@ -1458,34 +1458,34 @@ const gi = (t, e, i = 500) => {
1458
1458
  e.action.loading = "idle";
1459
1459
  });
1460
1460
  }
1461
- }), lr = (t) => t.fileIntegrity.action, dr = (t) => t.fileIntegrity.list, ul = {
1462
- slice: Jt,
1461
+ }), cr = (t) => t.fileIntegrity.action, ur = (t) => t.fileIntegrity.list, El = {
1462
+ slice: Yt,
1463
1463
  actions: {
1464
1464
  deleteQuarantine: Re,
1465
1465
  fetchFileIntegrityList: he,
1466
1466
  releaseQuarantine: Oe,
1467
- ...Jt.actions
1467
+ ...Yt.actions
1468
1468
  },
1469
- selectors: { selectFileIntegrityAction: lr, selectFileIntegrityList: dr }
1470
- }, cr = (t) => t ? Object.keys(t).filter((e) => t[e]) : [], Kt = T({
1469
+ selectors: { selectFileIntegrityAction: cr, selectFileIntegrityList: ur }
1470
+ }, pr = (t) => t ? Object.keys(t).filter((e) => t[e]) : [], Qt = T({
1471
1471
  name: "hooks",
1472
1472
  initialState: {},
1473
1473
  reducers: {
1474
1474
  initHooks: (t, { payload: e }) => e
1475
1475
  }
1476
- }), ur = (t) => t.hooks, pr = (t, e) => t.hooks[e], gr = (t, e) => !!t.hooks[e]?.hasLicense, pl = {
1477
- slice: Kt,
1478
- actions: Kt.actions,
1479
- selectors: { selectHooks: ur, selectHook: pr, hasHookLicense: gr },
1480
- utils: { buildDrivesArrayFromObject: cr }
1481
- }, Rt = (t) => {
1476
+ }), gr = (t) => t.hooks, fr = (t, e) => t.hooks[e], mr = (t, e) => !!t.hooks[e]?.hasLicense, Sl = {
1477
+ slice: Qt,
1478
+ actions: Qt.actions,
1479
+ selectors: { selectHooks: gr, selectHook: fr, hasHookLicense: mr },
1480
+ utils: { buildDrivesArrayFromObject: pr }
1481
+ }, kt = (t) => {
1482
1482
  const e = t.urlToJland;
1483
1483
  if (!e)
1484
1484
  return;
1485
1485
  const i = /(https:\/\/[^/]+)\/.*/g.exec(e);
1486
1486
  if (i)
1487
1487
  return i[1];
1488
- }, Dt = (t, e, i) => `${i}/map/${e}/${t.uri}`, U = p("/fetchMaps", async ({ jlandUrlBase: t, retrieveAllMaps: e }, { extra: i }) => {
1488
+ }, Mt = (t, e, i) => `${i}/map/${e}/${t.uri}`, U = p("/fetchMaps", async ({ jlandUrlBase: t, retrieveAllMaps: e }, { extra: i }) => {
1489
1489
  const a = i.jApi, r = await a.network.getHostname();
1490
1490
  return await new Promise((n, s) => {
1491
1491
  const l = {
@@ -1497,14 +1497,14 @@ const gi = (t, e, i = 500) => {
1497
1497
  })).then((g) => {
1498
1498
  const f = g.result.data.map((c) => {
1499
1499
  const E = { ...c };
1500
- return E.urlToJland = Dt(c, r, t), E;
1500
+ return E.urlToJland = Mt(c, r, t), E;
1501
1501
  });
1502
1502
  n(f);
1503
1503
  }).catch((g) => {
1504
1504
  g.error && s(g), s({ error: 1, errorMsg: "Error retrieving maps" });
1505
1505
  });
1506
1506
  });
1507
- }), B = p(
1507
+ }), F = p(
1508
1508
  "/fetchAvailableLicenses",
1509
1509
  async (t, { extra: e }) => {
1510
1510
  const i = e.jApi;
@@ -1524,10 +1524,10 @@ const gi = (t, e, i = 500) => {
1524
1524
  });
1525
1525
  }
1526
1526
  ), De = p("/unassignLicense", async ({ map: t, retrieveAllMaps: e }, { extra: i, dispatch: a }) => {
1527
- const r = i.jApi, n = Rt(t);
1527
+ const r = i.jApi, n = kt(t);
1528
1528
  return n ? await new Promise((s, l) => {
1529
1529
  r.admin.license.unAssignLicense(t.uri).then((d) => {
1530
- d.result && (a(B()), a(U({ jlandUrlBase: n, retrieveAllMaps: e }))), s(d.result);
1530
+ d.result && (a(F()), a(U({ jlandUrlBase: n, retrieveAllMaps: e }))), s(d.result);
1531
1531
  }).catch((d) => {
1532
1532
  if (d.error) {
1533
1533
  l(d);
@@ -1537,10 +1537,10 @@ const gi = (t, e, i = 500) => {
1537
1537
  });
1538
1538
  }) : !1;
1539
1539
  }), ke = p("/deleteLicense", async ({ map: t, retrieveAllMaps: e }, { extra: i, dispatch: a }) => {
1540
- const r = i.jApi, n = Rt(t);
1540
+ const r = i.jApi, n = kt(t);
1541
1541
  return n ? await new Promise((s, l) => {
1542
1542
  r.article.delete(t.id).then((d) => {
1543
- s(d.result), a(U({ jlandUrlBase: n, retrieveAllMaps: e })), a(B());
1543
+ s(d.result), a(U({ jlandUrlBase: n, retrieveAllMaps: e })), a(F());
1544
1544
  }).catch((d) => {
1545
1545
  if (d.error) {
1546
1546
  l(d);
@@ -1549,14 +1549,14 @@ const gi = (t, e, i = 500) => {
1549
1549
  l({ error: 1, errorMsg: d.errorMsg + "" });
1550
1550
  });
1551
1551
  }) : !1;
1552
- }), z = p("/assignLicense", async ({ map: t, retrieveAllMaps: e }, { extra: i, dispatch: a }) => {
1553
- const r = Rt(t);
1552
+ }), Q = p("/assignLicense", async ({ map: t, retrieveAllMaps: e }, { extra: i, dispatch: a }) => {
1553
+ const r = kt(t);
1554
1554
  if (!r)
1555
1555
  return !1;
1556
1556
  const n = i.jApi;
1557
1557
  return await new Promise((s, l) => {
1558
1558
  n.admin.license.assignLicense(t.uri).then((d) => {
1559
- d.result && (a(B()), a(U({ jlandUrlBase: r, retrieveAllMaps: e }))), s(d.result);
1559
+ d.result && (a(F()), a(U({ jlandUrlBase: r, retrieveAllMaps: e }))), s(d.result);
1560
1560
  }).catch((d) => {
1561
1561
  if (d.error) {
1562
1562
  l(d);
@@ -1565,7 +1565,7 @@ const gi = (t, e, i = 500) => {
1565
1565
  l({ error: 1, errorMsg: "Error assign license" });
1566
1566
  });
1567
1567
  });
1568
- }), Yt = T({
1568
+ }), zt = T({
1569
1569
  name: "jLandMapList",
1570
1570
  initialState: {
1571
1571
  maps: [],
@@ -1583,17 +1583,17 @@ const gi = (t, e, i = 500) => {
1583
1583
  e.loading === "pending" && (e.loading = "idle", e.maps = i.payload);
1584
1584
  }).addCase(U.rejected, (e) => {
1585
1585
  e.loading === "pending" && (e.loading = "idle");
1586
- }).addCase(B.pending, (e) => {
1586
+ }).addCase(F.pending, (e) => {
1587
1587
  e.loadingAvailableLicenses === "idle" && (e.loadingAvailableLicenses = "pending");
1588
- }).addCase(B.fulfilled, (e, i) => {
1588
+ }).addCase(F.fulfilled, (e, i) => {
1589
1589
  e.loadingAvailableLicenses === "pending" && (e.loadingAvailableLicenses = "idle", e.availableLicenses = i.payload);
1590
- }).addCase(B.rejected, (e) => {
1590
+ }).addCase(F.rejected, (e) => {
1591
1591
  e.loadingAvailableLicenses === "pending" && (e.loadingAvailableLicenses = "idle");
1592
- }).addCase(z.pending, (e, i) => {
1592
+ }).addCase(Q.pending, (e, i) => {
1593
1593
  e.loadingLicenseOperation[i.meta.arg.map.id] || (e.loadingLicenseOperation[i.meta.arg.map.id] = "pending");
1594
- }).addCase(z.fulfilled, (e, i) => {
1594
+ }).addCase(Q.fulfilled, (e, i) => {
1595
1595
  e.loadingLicenseOperation[i.meta.arg.map.id] === "pending" && (e.loadingLicenseOperation[i.meta.arg.map.id] = void 0);
1596
- }).addCase(z.rejected, (e, i) => {
1596
+ }).addCase(Q.rejected, (e, i) => {
1597
1597
  e.loadingLicenseOperation[i.meta.arg.map.id] === "pending" && (e.loadingLicenseOperation[i.meta.arg.map.id] = void 0);
1598
1598
  }).addCase(De.pending, (e, i) => {
1599
1599
  e.loadingLicenseOperation[i.meta.arg.map.id] || (e.loadingLicenseOperation[i.meta.arg.map.id] = "pending");
@@ -1609,7 +1609,7 @@ const gi = (t, e, i = 500) => {
1609
1609
  e.loadingMapDeletion === "pending" && (e.loadingMapDeletion = "idle");
1610
1610
  });
1611
1611
  }
1612
- }), fr = {
1612
+ }), yr = {
1613
1613
  title: "",
1614
1614
  type: "",
1615
1615
  flavor: "",
@@ -1617,8 +1617,8 @@ const gi = (t, e, i = 500) => {
1617
1617
  audience: [],
1618
1618
  illustration: "",
1619
1619
  assignLicense: !1
1620
- }, zt = {
1621
- map: { ...fr },
1620
+ }, Zt = {
1621
+ map: { ...yr },
1622
1622
  loading: "idle",
1623
1623
  status: void 0,
1624
1624
  msg: void 0
@@ -1640,22 +1640,22 @@ const gi = (t, e, i = 500) => {
1640
1640
  }
1641
1641
  const g = d.result[0] ? { ...d.result[0], urlToJland: void 0 } : void 0;
1642
1642
  if (t.assignLicense && g !== void 0) {
1643
- const m = await n.network.getHostname();
1644
- g.urlToJland = Dt(g, m, e), a(z({ map: g, retrieveAllMaps: !1 }));
1643
+ const y = await n.network.getHostname();
1644
+ g.urlToJland = Mt(g, y, e), a(Q({ map: g, retrieveAllMaps: !1 }));
1645
1645
  }
1646
1646
  s(d.result);
1647
1647
  }).catch(() => {
1648
1648
  l({ error: 1, errorMsg: "Error assign license" });
1649
1649
  });
1650
1650
  });
1651
- }), Ct = T({
1651
+ }), bt = T({
1652
1652
  name: "mapCreate",
1653
- initialState: zt,
1653
+ initialState: Zt,
1654
1654
  reducers: {
1655
1655
  setMap: (t, e) => {
1656
1656
  t.map = e.payload;
1657
1657
  },
1658
- resetCreateMapState: () => zt
1658
+ resetCreateMapState: () => Zt
1659
1659
  },
1660
1660
  extraReducers: (t) => {
1661
1661
  t.addCase(Me.pending, (e) => {
@@ -1666,36 +1666,36 @@ const gi = (t, e, i = 500) => {
1666
1666
  e.msg = i.error.message ?? void 0, e.status = "error", e.loading = "idle";
1667
1667
  });
1668
1668
  }
1669
- }), mr = function(e) {
1669
+ }), Ar = function(e) {
1670
1670
  return e.jland.jLandMapList.maps;
1671
- }, yr = function(e) {
1671
+ }, Er = function(e) {
1672
1672
  return e.jland.jLandMapList.availableLicenses;
1673
- }, Ar = function(e) {
1673
+ }, Sr = function(e) {
1674
1674
  return e.jland.mapCreate;
1675
- }, Er = O({
1676
- [Yt.name]: Yt.reducer,
1677
- [Ct.name]: Ct.reducer
1678
- }), Sr = {
1675
+ }, Tr = O({
1676
+ [zt.name]: zt.reducer,
1677
+ [bt.name]: bt.reducer
1678
+ }), Cr = {
1679
1679
  name: "jland",
1680
- reducer: Er
1681
- }, gl = {
1682
- slice: Sr,
1680
+ reducer: Tr
1681
+ }, Tl = {
1682
+ slice: Cr,
1683
1683
  actions: {
1684
- ...Ct.actions,
1685
- assignLicense: z,
1684
+ ...bt.actions,
1685
+ assignLicense: Q,
1686
1686
  unassignLicense: De,
1687
1687
  deleteJlandMap: ke,
1688
1688
  fetchJLandMaps: U,
1689
- fetchJLandAvailableLicenses: B,
1689
+ fetchJLandAvailableLicenses: F,
1690
1690
  createMap: Me
1691
1691
  },
1692
1692
  selectors: {
1693
- selectJLandMaps: mr,
1694
- selectJLandAvailableLicenses: yr,
1695
- selectMapCreate: Ar
1693
+ selectJLandMaps: Ar,
1694
+ selectJLandAvailableLicenses: Er,
1695
+ selectMapCreate: Sr
1696
1696
  },
1697
- utils: { buildUrlToJland: Dt }
1698
- }, Tr = {
1697
+ utils: { buildUrlToJland: Mt }
1698
+ }, br = {
1699
1699
  loading: "idle",
1700
1700
  pads: [],
1701
1701
  query: "",
@@ -1705,9 +1705,9 @@ const gi = (t, e, i = 500) => {
1705
1705
  orders: [],
1706
1706
  limit: 10,
1707
1707
  nbResults: 0
1708
- }, Cr = T({
1708
+ }, Lr = T({
1709
1709
  name: "magicPad",
1710
- initialState: Tr,
1710
+ initialState: br,
1711
1711
  reducers: {
1712
1712
  setTab: (t, e) => {
1713
1713
  t.tab = e.payload, t.page = 1, t.orders = [], t.filters = [];
@@ -1757,71 +1757,77 @@ const gi = (t, e, i = 500) => {
1757
1757
  }
1758
1758
  )).result;
1759
1759
  } catch (n) {
1760
- return a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot fetch pads" });
1760
+ return a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot fetch pads" });
1761
1761
  }
1762
- }), br = (t) => t.magicPad, fl = {
1763
- slice: Cr,
1762
+ }), wr = (t) => t.magicPad, Cl = {
1763
+ slice: Lr,
1764
1764
  actions: {
1765
1765
  fetchPads: xe
1766
1766
  },
1767
- selectors: { selectMagicPad: br }
1768
- }, wr = {
1769
- typeMediaLibraryFolder: "mediaLibraryFolder"
1770
- }, Ir = 18, Lr = {
1767
+ selectors: { selectMagicPad: wr }
1768
+ }, Lt = {
1769
+ typeMediaLibraryFolder: "mediaLibraryFolder",
1770
+ typeMediaLibraryFile: "mediaLibraryFile"
1771
+ }, Ir = 18, vr = 12, hr = 18, Or = {
1771
1772
  loading: "idle",
1772
- page: 1,
1773
1773
  nbResults: 0,
1774
- folders: [],
1775
- unclassifiedFiles: { list: [], page: 0, totalPages: 0 },
1774
+ query: "",
1775
+ folders: { loading: "idle", list: [], page: 1, totalPages: 0 },
1776
+ foldersAll: { loading: "idle", list: [] },
1777
+ folderFiles: { loading: "idle", list: [], page: 1, totalPages: 0 },
1778
+ unclassifiedFiles: { loading: "idle", list: [], page: 1, totalPages: 0, nbResults: 0 },
1776
1779
  mediaLibraryAccess: !1,
1777
1780
  stats: null,
1778
1781
  foldersStats: { loading: !1, pager: null },
1779
1782
  filesStats: { loading: !1, pager: null }
1780
- }, yi = T({
1783
+ }, Ei = T({
1781
1784
  name: "mediaLibrary",
1782
- initialState: Lr,
1785
+ initialState: Or,
1783
1786
  reducers: {
1784
- setPage(t, e) {
1787
+ removeFileFromFolder(t, e) {
1785
1788
  return {
1786
1789
  ...t,
1787
- page: e.payload
1788
- };
1789
- },
1790
- setFolderList(t, e) {
1791
- return {
1792
- ...t,
1793
- folders: e.payload
1790
+ folderFiles: {
1791
+ ...t.folderFiles,
1792
+ list: t.folderFiles.list.filter(
1793
+ (i) => i.id !== e.payload
1794
+ )
1795
+ }
1794
1796
  };
1795
1797
  },
1796
- setFileUnclassifiedList(t, e) {
1797
- return {
1798
- ...t,
1799
- unclassifiedFiles: e.payload
1800
- };
1798
+ removeUnclassifiedFile(t, e) {
1799
+ t.unclassifiedFiles.list = t.unclassifiedFiles.list.filter(
1800
+ (i) => i.id !== e.payload
1801
+ );
1801
1802
  }
1802
1803
  },
1803
1804
  extraReducers: (t) => {
1804
- t.addCase(je.pending, (e) => {
1805
- e.loading = "pending";
1805
+ t.addCase(je.pending, (e, i) => {
1806
+ (i?.meta?.arg?.noLimit ?? !1) && e.foldersAll ? e.foldersAll.loading = "pending" : e.folders.loading = "pending";
1806
1807
  }).addCase(je.fulfilled, (e, i) => {
1807
- e.loading = "idle", e.folders = [...i.payload.result.data], e.nbResults = 0;
1808
- }).addCase(je.rejected, (e) => {
1809
- e.loading = "idle";
1808
+ const a = i?.meta?.arg?.noLimit ?? !1, r = i.payload.result.limit && i.payload.result.limit > 0 ? i.payload.result.limit : 1, n = i.payload.result.page, s = i.meta.arg.query ?? "";
1809
+ a ? e.foldersAll = { loading: "idle", list: i.payload.result.data } : (e.query !== s ? (e.folders.list = i.payload.result.data, e.folders.page = 1) : (e.folders.list = i.payload.result.data, e.folders.page = n), e.folders.totalPages = Math.ceil(i.payload.result.cnt / r)), e.folders.loading = "idle", e.query = s;
1810
+ }).addCase(je.rejected, (e, i) => {
1811
+ (i?.meta?.arg?.noLimit ?? !1) && e.foldersAll ? e.foldersAll.loading = "idle" : e.folders.loading = "idle";
1812
+ }).addCase(_e.pending, (e, i) => {
1813
+ i.meta.arg.page == 1 && (e.folderFiles.list = []), e.folderFiles.loading = "pending";
1814
+ }).addCase(_e.fulfilled, (e, i) => {
1815
+ const a = i.payload.result.page, r = i.payload.result.limit && i.payload.result.limit > 0 ? i.payload.result.limit : 1, n = Math.ceil(i.payload.result.cnt / r);
1816
+ a > 1 ? e.folderFiles.list.push(...i.payload.result.data) : e.folderFiles.list = i.payload.result.data, e.folderFiles.page = a, e.folderFiles.totalPages = n, e.folderFiles.loading = "idle";
1817
+ }).addCase(_e.rejected, (e) => {
1818
+ e.folderFiles.loading = "idle";
1810
1819
  }).addCase(Ne.pending, (e) => {
1811
- e.loading = "pending";
1820
+ e.unclassifiedFiles.loading = "pending";
1812
1821
  }).addCase(Ne.fulfilled, (e, i) => {
1813
- e.loading = "idle", e.unclassifiedFiles = {
1814
- list: [...i.payload.result.data],
1815
- page: i.payload.result.page,
1816
- totalPages: i.payload.result.limit === null ? 1 : Math.ceil(i.payload.result.cnt / i.payload.result.limit)
1817
- }, e.nbResults = 0;
1822
+ const a = i.payload.result.limit || 1, r = i.payload.result.page, n = Math.ceil(i.payload.result.cnt / a), s = i.meta.arg.query ?? e.query ?? "";
1823
+ e.query !== s || r === 1 ? (e.unclassifiedFiles.list = i.payload.result.data, e.unclassifiedFiles.page = 1) : (e.unclassifiedFiles.list.push(...i.payload.result.data), e.unclassifiedFiles.page = r), e.unclassifiedFiles.totalPages = n, e.unclassifiedFiles.loading = "idle", e.query = s;
1818
1824
  }).addCase(Ne.rejected, (e) => {
1819
- e.loading = "idle";
1820
- }).addCase(_e.fulfilled, (e, i) => {
1825
+ e.unclassifiedFiles.loading = "idle";
1826
+ }).addCase(Pe.fulfilled, (e, i) => {
1821
1827
  e.loading = "idle", e.mediaLibraryAccess = i.payload?.result ?? !1;
1822
- }).addCase(_e.rejected, (e) => {
1828
+ }).addCase(Pe.rejected, (e) => {
1823
1829
  e.loading = "idle", e.mediaLibraryAccess = !1;
1824
- }).addCase(_e.pending, (e) => {
1830
+ }).addCase(Pe.pending, (e) => {
1825
1831
  e.loading = "pending", e.mediaLibraryAccess = !1;
1826
1832
  }).addCase(Be.fulfilled, (e, i) => {
1827
1833
  e.loading = "idle", e.stats = { ...i.payload?.result };
@@ -1829,67 +1835,93 @@ const gi = (t, e, i = 500) => {
1829
1835
  e.loading = "idle", e.stats = null;
1830
1836
  }).addCase(Be.pending, (e) => {
1831
1837
  e.loading = "pending";
1832
- }).addCase(Pe.fulfilled, (e, i) => {
1838
+ }).addCase(Ue.fulfilled, (e, i) => {
1833
1839
  e.foldersStats = { loading: !1, pager: i.payload?.result };
1834
- }).addCase(Pe.rejected, (e) => {
1840
+ }).addCase(Ue.rejected, (e) => {
1835
1841
  e.foldersStats = { loading: !1, pager: null };
1836
- }).addCase(Pe.pending, (e) => {
1842
+ }).addCase(Ue.pending, (e) => {
1837
1843
  e.foldersStats.loading = !0;
1838
- }).addCase(Ue.fulfilled, (e, i) => {
1844
+ }).addCase(Fe.fulfilled, (e, i) => {
1839
1845
  e.filesStats = { loading: !1, pager: i.payload?.result };
1840
- }).addCase(Ue.rejected, (e) => {
1846
+ }).addCase(Fe.rejected, (e) => {
1841
1847
  e.filesStats = { loading: !1, pager: null };
1842
- }).addCase(Ue.pending, (e) => {
1848
+ }).addCase(Fe.pending, (e) => {
1843
1849
  e.filesStats.loading = !0;
1844
1850
  });
1845
1851
  }
1846
- }), je = p("MediaLibrary/fetchMediaLibraryFolders", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
1847
- const r = {
1848
- type: wr.typeMediaLibraryFolder,
1849
- limit: 10
1852
+ }), je = p("MediaLibrary/fetchMediaLibraryFolders", async ({ page: t = 1, noLimit: e = !1, query: i }, { extra: a, rejectWithValue: r, dispatch: n, getState: s }) => {
1853
+ const l = {
1854
+ type: Lt.typeMediaLibraryFolder,
1855
+ page: t,
1856
+ orders: [{ name: "title", sort: "ASC" }]
1850
1857
  };
1858
+ e || (l.limit = vr);
1851
1859
  try {
1852
- return await e.jApi.article.list(r, {
1860
+ const d = s().mediaLibrary;
1861
+ return l.query = i ?? d.query, await a.jApi.article.list(l, {
1853
1862
  format: "raw-list"
1854
1863
  });
1855
- } catch (n) {
1856
- return a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Cannot retrieve folders" });
1864
+ } catch (d) {
1865
+ return n(m.actions.error({ label: A(d) })), r({ error: 1, errorMsg: "Cannot retrieve folders" });
1857
1866
  }
1858
- }), Ne = p("MediaLibrary/fetchMediaLibraryUnclassifiedFiles", async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
1867
+ }), _e = p(
1868
+ "MediaLibrary/fetchFolderFiles",
1869
+ async ({ folderId: t, page: e }, { extra: i, rejectWithValue: a, dispatch: r }) => {
1870
+ const n = {
1871
+ type: Lt.typeMediaLibraryFile,
1872
+ page: e,
1873
+ limit: hr,
1874
+ filters: [
1875
+ {
1876
+ name: "mediaLibraryFolderOrientedLinks",
1877
+ value: { targetId: t, targetType: Lt.typeMediaLibraryFolder }
1878
+ }
1879
+ ],
1880
+ format: "raw-list",
1881
+ orders: [{ name: "title", sort: "ASC" }]
1882
+ };
1883
+ try {
1884
+ return await i.jApi.article.list(n);
1885
+ } catch (s) {
1886
+ return r(m.actions.error({ label: A(s) })), a({ error: 1, errorMsg: `Cannot retrieve files for folder ${t}` });
1887
+ }
1888
+ }
1889
+ ), Ne = p("MediaLibrary/fetchMediaLibraryUnclassifiedFiles", async ({ page: t, query: e }, { extra: i, rejectWithValue: a, dispatch: r, getState: n }) => {
1859
1890
  try {
1860
- return await e.jApi.mediaLibrary.GetUnclassifiedFiles({
1861
- format: "raw-little",
1891
+ const s = n().mediaLibrary, l = e ?? s.query;
1892
+ return await i.jApi.mediaLibrary.GetUnclassifiedFiles({
1862
1893
  page: t,
1863
- limit: Ir
1894
+ limit: Ir,
1895
+ query: l
1864
1896
  });
1865
- } catch (r) {
1866
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot retrieve UnclassifiedFiles" });
1897
+ } catch (s) {
1898
+ return r(m.actions.error({ label: A(s) })), a({ error: 1, errorMsg: "Cannot retrieve UnclassifiedFiles" });
1867
1899
  }
1868
- }), _e = p(
1900
+ }), Pe = p(
1869
1901
  "MediaLibrary/fetchMediaLibraryConfig",
1870
1902
  async (t, { extra: e, rejectWithValue: i, dispatch: a }) => {
1871
1903
  try {
1872
1904
  return await e.jApi.mediaLibrary.getAccess();
1873
1905
  } catch (r) {
1874
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot get MediaLibrary Config" });
1906
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot get MediaLibrary Config" });
1875
1907
  }
1876
1908
  }
1877
- ), Pe = p(
1909
+ ), Ue = p(
1878
1910
  "MediaLibrary/fetchMediaLibraryFoldersStats",
1879
1911
  async ({ page: t, filters: e, orders: i }, { extra: a, rejectWithValue: r, dispatch: n }) => {
1880
1912
  try {
1881
1913
  return await a.jApi.mediaLibrary.getFoldersStatsList(e, i, t);
1882
1914
  } catch (s) {
1883
- return n(y.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Cannot get MediaLibrary folders stats" });
1915
+ return n(m.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Cannot get MediaLibrary folders stats" });
1884
1916
  }
1885
1917
  }
1886
- ), Ue = p(
1918
+ ), Fe = p(
1887
1919
  "MediaLibrary/fetchMediaLibraryFilesStats",
1888
1920
  async ({ page: t, filters: e, orders: i }, { extra: a, rejectWithValue: r, dispatch: n }) => {
1889
1921
  try {
1890
1922
  return await a.jApi.mediaLibrary.getFilesStatsList(e, i, t);
1891
1923
  } catch (s) {
1892
- return n(y.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Cannot get MediaLibrary files stats" });
1924
+ return n(m.actions.error({ label: A(s) })), r({ error: 1, errorMsg: "Cannot get MediaLibrary files stats" });
1893
1925
  }
1894
1926
  }
1895
1927
  ), Be = p(
@@ -1898,36 +1930,41 @@ const gi = (t, e, i = 500) => {
1898
1930
  try {
1899
1931
  return await e.jApi.mediaLibrary.getStats();
1900
1932
  } catch (r) {
1901
- return a(y.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot get MediaLibrary stats" });
1933
+ return a(m.actions.error({ label: A(r) })), i({ error: 1, errorMsg: "Cannot get MediaLibrary stats" });
1902
1934
  }
1903
1935
  }
1904
- ), vr = (t) => t.mediaLibrary, hr = (t) => t.mediaLibrary.stats, Or = (t) => t.mediaLibrary.foldersStats, Rr = (t) => t.mediaLibrary.filesStats, ml = yi.reducer, yl = {
1905
- slice: yi,
1936
+ ), Rr = (t) => t.mediaLibrary, Dr = (t) => t.mediaLibrary.stats, kr = (t) => t.mediaLibrary.foldersStats, Mr = (t) => t.mediaLibrary.filesStats, xr = (t) => t.mediaLibrary.folders, jr = (t) => t.mediaLibrary.foldersAll, _r = (t) => t.mediaLibrary.folderFiles, Nr = (t) => t.mediaLibrary.unclassifiedFiles, bl = Ei.reducer, Ll = {
1937
+ slice: Ei,
1906
1938
  actions: {
1907
1939
  fetchMediaLibraryFolders: je,
1940
+ fetchFolderFiles: _e,
1908
1941
  fetchMediaLibraryUnclassifiedFiles: Ne,
1909
- fetchMediaLibraryConfig: _e,
1942
+ fetchMediaLibraryConfig: Pe,
1910
1943
  fetchMediaLibraryStats: Be,
1911
- fetchMediaLibraryFilesStats: Ue,
1912
- fetchMediaLibraryFoldersStats: Pe
1944
+ fetchMediaLibraryFilesStats: Fe,
1945
+ fetchMediaLibraryFoldersStats: Ue
1913
1946
  },
1914
1947
  selectors: {
1915
- selectMediaLibrary: vr,
1916
- selectMediaLibraryStats: hr,
1917
- selectMediaLibraryFoldersStats: Or,
1918
- selectMediaLibraryFilesStats: Rr
1919
- }
1920
- }, G = lt({
1948
+ selectMediaLibrary: Rr,
1949
+ selectMediaLibraryStats: Dr,
1950
+ selectMediaLibraryFoldersStats: kr,
1951
+ selectMediaLibraryFilesStats: Mr,
1952
+ selectFolders: xr,
1953
+ selectFolderAll: jr,
1954
+ selectFolderFiles: _r,
1955
+ selectUnclassifiedFiles: Nr
1956
+ }
1957
+ }, G = dt({
1921
1958
  selectId: (t) => t.type,
1922
1959
  sortComparer: (t, e) => t.label.localeCompare(e.label)
1923
- }), Dr = (t, e) => {
1960
+ }), Pr = (t, e) => {
1924
1961
  const i = {
1925
1962
  from: "imagestatic",
1926
1963
  size: e ?? "fitx600",
1927
1964
  uri: `icons/${t && t.icon ? t.icon : "article"}-white`
1928
1965
  };
1929
- return Vi(i);
1930
- }, kr = (t) => `icon-${{
1966
+ return Gi(i);
1967
+ }, Ur = (t) => `icon-${{
1931
1968
  actionplan: "fs-actionplan",
1932
1969
  animatedMeeting: "fs-animated_meeting",
1933
1970
  // Diapazone
@@ -1973,7 +2010,7 @@ const gi = (t, e, i = 500) => {
1973
2010
  "weDoc-pptx": "file-powerpoint",
1974
2011
  wiki: "fs-wiki",
1975
2012
  workgroup: "fs-workgroup"
1976
- }[t] ?? t}`, Qt = T({
2013
+ }[t] ?? t}`, ei = T({
1977
2014
  name: "models",
1978
2015
  initialState: G.getInitialState(),
1979
2016
  reducers: {
@@ -1981,64 +2018,64 @@ const gi = (t, e, i = 500) => {
1981
2018
  addMany: G.addMany,
1982
2019
  setAll: G.setAll
1983
2020
  }
1984
- }), Mr = G.getSelectors((t) => t.entities.models), xr = {
1985
- getModelIconSrc: Dr,
1986
- getModelFontAwesomeIcon: kr
1987
- }, jr = (t, e) => e.map((i) => t.entities.models.entities[i]).filter((i) => !!i), Nr = {
1988
- slice: Qt,
1989
- actions: { ...Qt.actions },
1990
- utils: xr,
2021
+ }), Fr = G.getSelectors((t) => t.entities.models), Br = {
2022
+ getModelIconSrc: Pr,
2023
+ getModelFontAwesomeIcon: Ur
2024
+ }, Wr = (t, e) => e.map((i) => t.entities.models.entities[i]).filter((i) => !!i), qr = {
2025
+ slice: ei,
2026
+ actions: { ...ei.actions },
2027
+ utils: Br,
1991
2028
  selectors: {
1992
- ...Mr,
1993
- selectByIds: jr
2029
+ ...Fr,
2030
+ selectByIds: Wr
1994
2031
  }
1995
- }, _r = {}, bt = T({
2032
+ }, $r = {}, wt = T({
1996
2033
  name: "statics",
1997
- initialState: _r,
2034
+ initialState: $r,
1998
2035
  reducers: {
1999
2036
  initNetworkStatics: (t, { payload: e }) => e
2000
2037
  }
2001
- }), Pr = O({
2002
- [bt.name]: bt.reducer
2003
- }), Ur = {
2038
+ }), Vr = O({
2039
+ [wt.name]: wt.reducer
2040
+ }), Hr = {
2004
2041
  name: "network",
2005
- reducer: Pr
2006
- }, Br = (t) => t.network.statics, Wr = (t) => t.network.statics.networkPublic, Fr = (t) => t.network.statics.networkMe, Al = {
2007
- slice: Ur,
2042
+ reducer: Vr
2043
+ }, Gr = (t) => t.network.statics, Xr = (t) => t.network.statics.networkPublic, Jr = (t) => t.network.statics.networkMe, wl = {
2044
+ slice: Hr,
2008
2045
  actions: {
2009
- ...bt.actions
2046
+ ...wt.actions
2010
2047
  },
2011
2048
  selectors: {
2012
- selectNetworkStatics: Br,
2013
- selectNetworkPublic: Wr,
2014
- selectNetworkMe: Fr
2049
+ selectNetworkStatics: Gr,
2050
+ selectNetworkPublic: Xr,
2051
+ selectNetworkMe: Jr
2015
2052
  }
2016
- }, $r = {
2053
+ }, Kr = {
2017
2054
  userAccountStatus: 0,
2018
2055
  sendAlert: 0
2019
- }, Ai = T({
2056
+ }, Si = T({
2020
2057
  name: "config",
2021
- initialState: $r,
2058
+ initialState: Kr,
2022
2059
  reducers: {
2023
2060
  initPlatformConfig: (t, { payload: e }) => e
2024
2061
  }
2025
- }), qr = O({
2026
- config: Ai.reducer
2027
- }), Vr = {
2062
+ }), Yr = O({
2063
+ config: Si.reducer
2064
+ }), Qr = {
2028
2065
  name: "platform",
2029
- reducer: qr
2030
- }, Hr = (t) => t.platform.config, Gr = (t) => t.platform.config.userHighlightFields, Xr = (t) => t.platform.config.userAccountStatus, Jr = (t) => t.platform.config.urlBase, El = {
2031
- slice: Vr,
2066
+ reducer: Yr
2067
+ }, zr = (t) => t.platform.config, Zr = (t) => t.platform.config.userHighlightFields, en = (t) => t.platform.config.userAccountStatus, tn = (t) => t.platform.config.urlBase, Il = {
2068
+ slice: Qr,
2032
2069
  actions: {
2033
- ...Ai.actions
2070
+ ...Si.actions
2034
2071
  },
2035
2072
  selectors: {
2036
- selectPlatformConfig: Hr,
2037
- selectUserHighlightFields: Gr,
2038
- selectUserAccountStatus: Xr,
2039
- selectUrlBase: Jr
2073
+ selectPlatformConfig: zr,
2074
+ selectUserHighlightFields: Zr,
2075
+ selectUserAccountStatus: en,
2076
+ selectUrlBase: tn
2040
2077
  }
2041
- }, Ei = {
2078
+ }, Ti = {
2042
2079
  query: "",
2043
2080
  filters: [],
2044
2081
  limit: 20,
@@ -2046,14 +2083,14 @@ const gi = (t, e, i = 500) => {
2046
2083
  page: 1
2047
2084
  }, We = p("/fetchFiles", async ({ page: t, query: e, sort: i }, { extra: a, getState: r }) => {
2048
2085
  const n = a.jApi, s = r(), l = s.wedoc.tab === "my-documents" ? [{ name: "idUser", value: "0" }] : [], d = [{ name: "dateCreation", sort: i }], g = e !== s.wedoc.query ? 1 : t;
2049
- return await n.wedoc.getFiles({ ...Ei, filters: l, query: e, orders: d, page: g, limit: 12 });
2050
- }), Fe = p(
2086
+ return await n.wedoc.getFiles({ ...Ti, filters: l, query: e, orders: d, page: g, limit: 12 });
2087
+ }), qe = p(
2051
2088
  "/fetchRecentFiles",
2052
2089
  async (t, { extra: e, getState: i }) => {
2053
2090
  const a = e.jApi, n = i().wedoc.tab === "my-documents" ? [{ name: "idUser", value: "0" }] : [];
2054
- return await a.wedoc.getFiles({ ...Ei, filters: n, limit: 3 });
2091
+ return await a.wedoc.getFiles({ ...Ti, filters: n, limit: 3 });
2055
2092
  }
2056
- ), Kr = {
2093
+ ), an = {
2057
2094
  entities: [],
2058
2095
  nbEntities: 0,
2059
2096
  entitiesRecent: [],
@@ -2062,9 +2099,9 @@ const gi = (t, e, i = 500) => {
2062
2099
  loadingRecent: "idle",
2063
2100
  query: "",
2064
2101
  page: 1
2065
- }, Yr = T({
2102
+ }, rn = T({
2066
2103
  name: "wedoc",
2067
- initialState: Kr,
2104
+ initialState: an,
2068
2105
  reducers: {
2069
2106
  update: (t, e) => {
2070
2107
  t.entities = [
@@ -2087,16 +2124,16 @@ const gi = (t, e, i = 500) => {
2087
2124
  e.loading = "idle", e.entities = i.payload.result.data, e.nbEntities = i.payload.result.cnt, e.page = i.payload.result.page;
2088
2125
  }).addCase(We.rejected, (e) => {
2089
2126
  e.loading = "idle";
2090
- }).addCase(Fe.pending, (e) => {
2127
+ }).addCase(qe.pending, (e) => {
2091
2128
  e.loadingRecent = "pending";
2092
- }).addCase(Fe.fulfilled, (e, i) => {
2129
+ }).addCase(qe.fulfilled, (e, i) => {
2093
2130
  e.loadingRecent = "idle", e.entitiesRecent = i.payload.result.data;
2094
- }).addCase(Fe.rejected, (e) => {
2131
+ }).addCase(qe.rejected, (e) => {
2095
2132
  e.loadingRecent = "idle";
2096
2133
  });
2097
2134
  }
2098
- }), Sl = {
2099
- slice: Yr,
2135
+ }), vl = {
2136
+ slice: rn,
2100
2137
  selectors: {
2101
2138
  getFiles: (t) => ({
2102
2139
  entities: t.wedoc.entities,
@@ -2114,15 +2151,15 @@ const gi = (t, e, i = 500) => {
2114
2151
  },
2115
2152
  actions: {
2116
2153
  fetchFiles: We,
2117
- fetchRecentFiles: Fe
2154
+ fetchRecentFiles: qe
2118
2155
  }
2119
- }, $e = p("/fetchRequest", async ({ uri: t, idUser: e }, { extra: i }) => await i.jApi.object.getAccessRequest(t, e)), zr = {
2156
+ }, $e = p("/fetchRequest", async ({ uri: t, idUser: e }, { extra: i }) => await i.jApi.object.getAccessRequest(t, e)), nn = {
2120
2157
  entities: [],
2121
2158
  nbEntities: 0,
2122
2159
  loading: "idle"
2123
- }, Qr = T({
2160
+ }, sn = T({
2124
2161
  name: "share",
2125
- initialState: zr,
2162
+ initialState: nn,
2126
2163
  reducers: {
2127
2164
  remove: (t, e) => {
2128
2165
  t.entities = [...t.entities.filter((i) => i.id !== e.payload)];
@@ -2137,8 +2174,8 @@ const gi = (t, e, i = 500) => {
2137
2174
  e.loading = "idle";
2138
2175
  });
2139
2176
  }
2140
- }), Tl = {
2141
- slice: Qr,
2177
+ }), hl = {
2178
+ slice: sn,
2142
2179
  selectors: {
2143
2180
  requests: (t) => ({
2144
2181
  loading: t.share.loading,
@@ -2148,12 +2185,12 @@ const gi = (t, e, i = 500) => {
2148
2185
  actions: {
2149
2186
  fetchRequest: $e
2150
2187
  }
2151
- }, Zr = {
2188
+ }, on = {
2152
2189
  message: void 0,
2153
2190
  status: "idle"
2154
- }, it = T({
2191
+ }, at = T({
2155
2192
  name: "teamWorkToDo",
2156
- initialState: Zr,
2193
+ initialState: on,
2157
2194
  reducers: {
2158
2195
  setMessageAndStatus: (t, e) => {
2159
2196
  const { status: i, message: a } = e.payload;
@@ -2161,49 +2198,49 @@ const gi = (t, e, i = 500) => {
2161
2198
  }
2162
2199
  },
2163
2200
  extraReducers: (t) => {
2164
- t.addCase(wt.fulfilled, (e, i) => {
2201
+ t.addCase(It.fulfilled, (e, i) => {
2165
2202
  i.payload ? e.status = "processing" : e.status = "error";
2166
- }), t.addCase(wt.rejected, (e, i) => {
2203
+ }), t.addCase(It.rejected, (e, i) => {
2167
2204
  e.status = "error", e.message = i.payload?.errorMsg ?? "GLOBAL_Technical_Error";
2168
2205
  });
2169
2206
  }
2170
- }), wt = p(
2207
+ }), It = p(
2171
2208
  "teamWork/startToDoCreation",
2172
2209
  async (t, { extra: e, rejectWithValue: i, dispatch: a, signal: r }) => {
2173
2210
  try {
2174
2211
  return (await e.jApi.teamWork.aiGeneratedToDo({ signal: r })).result;
2175
2212
  } catch (n) {
2176
- return v(n) || a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "APP_TEAMWORK_ToDo_Not_Sent" });
2213
+ return v(n) || a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "APP_TEAMWORK_ToDo_Not_Sent" });
2177
2214
  }
2178
2215
  }
2179
- ), en = function(t) {
2216
+ ), ln = function(t) {
2180
2217
  return [
2181
2218
  {
2182
2219
  namespace: "TEAMWORK",
2183
2220
  function: "update",
2184
2221
  handler: function(i) {
2185
- i.namespace === "TEAMWORK" && i.function === "update" && t(it.actions.setMessageAndStatus({ status: i.state, message: i.msg }));
2222
+ i.namespace === "TEAMWORK" && i.function === "update" && t(at.actions.setMessageAndStatus({ status: i.state, message: i.msg }));
2186
2223
  }
2187
2224
  }
2188
2225
  ];
2189
- }, tn = (t) => t.teamWork.teamWorkToDo, an = O({
2190
- [it.name]: it.reducer
2191
- }), Si = {
2226
+ }, dn = (t) => t.teamWork.teamWorkToDo, cn = O({
2227
+ [at.name]: at.reducer
2228
+ }), Ci = {
2192
2229
  name: "teamWork",
2193
- reducer: an
2194
- }, Cl = Si.reducer, bl = {
2195
- slice: Si,
2230
+ reducer: cn
2231
+ }, Ol = Ci.reducer, Rl = {
2232
+ slice: Ci,
2196
2233
  actions: {
2197
- ...it.actions,
2198
- startToDoCreation: wt
2234
+ ...at.actions,
2235
+ startToDoCreation: It
2199
2236
  },
2200
- selectors: { selectToDoState: tn },
2201
- getTeamWorkRTHandlers: en
2202
- }, rn = {
2237
+ selectors: { selectToDoState: dn },
2238
+ getTeamWorkRTHandlers: ln
2239
+ }, un = {
2203
2240
  channels: void 0,
2204
2241
  loading: "idle",
2205
2242
  loadingChannelDeletion: "idle"
2206
- }, Q = p(
2243
+ }, z = p(
2207
2244
  "/fetchChannels",
2208
2245
  async (t, { extra: e }) => {
2209
2246
  const i = t ?? 1, a = e.jApi;
@@ -2222,78 +2259,78 @@ const gi = (t, e, i = 500) => {
2222
2259
  });
2223
2260
  });
2224
2261
  }
2225
- ), qe = p("/deleteChannel", async ({ channel: t }, { extra: e, dispatch: i }) => {
2262
+ ), Ve = p("/deleteChannel", async ({ channel: t }, { extra: e, dispatch: i }) => {
2226
2263
  const a = e.jApi;
2227
2264
  return await new Promise((r, n) => {
2228
2265
  a.article.delete(t.id).then((s) => {
2229
- r(s.result), i(Q());
2266
+ r(s.result), i(z());
2230
2267
  }).catch((s) => {
2231
2268
  n({ error: s.error ?? 1, errorMsg: s.errorMsg ?? "Error deleting channel" });
2232
2269
  });
2233
2270
  });
2234
- }), Zt = T({
2271
+ }), ti = T({
2235
2272
  name: "channelsList",
2236
- initialState: { ...rn },
2273
+ initialState: { ...un },
2237
2274
  reducers: {},
2238
2275
  extraReducers: (t) => {
2239
- t.addCase(Q.pending, (e) => {
2276
+ t.addCase(z.pending, (e) => {
2240
2277
  e.loading === "idle" && (e.loading = "pending");
2241
- }).addCase(Q.fulfilled, (e, i) => {
2278
+ }).addCase(z.fulfilled, (e, i) => {
2242
2279
  e.loading === "pending" && (e.loading = "idle", e.channels = i.payload);
2243
- }).addCase(Q.rejected, (e) => {
2280
+ }).addCase(z.rejected, (e) => {
2244
2281
  e.loading === "pending" && (e.loading = "idle");
2245
- }).addCase(qe.pending, (e) => {
2282
+ }).addCase(Ve.pending, (e) => {
2246
2283
  e.loadingChannelDeletion = "pending";
2247
- }).addCase(qe.fulfilled, (e) => {
2284
+ }).addCase(Ve.fulfilled, (e) => {
2248
2285
  e.loadingChannelDeletion === "pending" && (e.loadingChannelDeletion = "idle");
2249
- }).addCase(qe.rejected, (e) => {
2286
+ }).addCase(Ve.rejected, (e) => {
2250
2287
  e.loadingChannelDeletion === "pending" && (e.loadingChannelDeletion = "idle");
2251
2288
  });
2252
2289
  }
2253
2290
  });
2254
- function nn(t) {
2291
+ function pn(t) {
2255
2292
  return t.tvChannelType === "DYNAMIC" ? !!t.tvChannelBackgroundColor && !!t.tvChannelGroupTarget : t.tvChannelNumImages !== 0;
2256
2293
  }
2257
- const sn = O({
2258
- [Zt.name]: Zt.reducer
2259
- }), on = {
2294
+ const gn = O({
2295
+ [ti.name]: ti.reducer
2296
+ }), fn = {
2260
2297
  name: "tvDisplay",
2261
- reducer: sn
2262
- }, ln = function(e) {
2298
+ reducer: gn
2299
+ }, mn = function(e) {
2263
2300
  return e.tvDisplay.channelsList;
2264
- }, wl = {
2265
- slice: on,
2301
+ }, Dl = {
2302
+ slice: fn,
2266
2303
  actions: {
2267
- fetchChannels: Q,
2268
- deleteChannel: qe
2304
+ fetchChannels: z,
2305
+ deleteChannel: Ve
2269
2306
  },
2270
2307
  selectors: {
2271
- selectChannelsList: ln
2308
+ selectChannelsList: mn
2272
2309
  },
2273
2310
  utils: {
2274
- isChannelConfigured: nn
2311
+ isChannelConfigured: pn
2275
2312
  }
2276
- }, dn = {}, It = T({
2313
+ }, yn = {}, vt = T({
2277
2314
  name: "options",
2278
- initialState: dn,
2315
+ initialState: yn,
2279
2316
  reducers: {
2280
2317
  initOptions: (t, { payload: e }) => e
2281
2318
  }
2282
- }), cn = O({
2283
- [It.name]: It.reducer
2284
- }), un = {
2319
+ }), An = O({
2320
+ [vt.name]: vt.reducer
2321
+ }), En = {
2285
2322
  name: "tinymce",
2286
- reducer: cn
2287
- }, pn = (t) => t.tinymce.options.common, gn = (t) => t.tinymce.options.extended, Il = {
2288
- slice: un,
2323
+ reducer: An
2324
+ }, Sn = (t) => t.tinymce.options.common, Tn = (t) => t.tinymce.options.extended, kl = {
2325
+ slice: En,
2289
2326
  actions: {
2290
- ...It.actions
2327
+ ...vt.actions
2291
2328
  },
2292
2329
  selectors: {
2293
- selectTinyMCECommonOptions: pn,
2294
- selectTinyMCEExtendedOptions: gn
2330
+ selectTinyMCECommonOptions: Sn,
2331
+ selectTinyMCEExtendedOptions: Tn
2295
2332
  }
2296
- }, fn = {
2333
+ }, Cn = {
2297
2334
  id: 0,
2298
2335
  mainType: "user",
2299
2336
  type: "user",
@@ -2304,33 +2341,33 @@ const sn = O({
2304
2341
  dateModified: "",
2305
2342
  level: 0,
2306
2343
  active: 1
2307
- }, ei = T({
2344
+ }, ii = T({
2308
2345
  name: "userCurrent",
2309
- initialState: fn,
2346
+ initialState: Cn,
2310
2347
  reducers: {
2311
2348
  init: (t, { payload: e }) => e
2312
2349
  }
2313
- }), mn = (t) => t.userCurrent, yn = (t) => t.level === Hi.ADMIN, An = (t) => t.id !== 0, Ll = {
2314
- slice: ei,
2315
- actions: { ...ei.actions },
2350
+ }), bn = (t) => t.userCurrent, Ln = (t) => t.level === Xi.ADMIN, wn = (t) => t.id !== 0, Ml = {
2351
+ slice: ii,
2352
+ actions: { ...ii.actions },
2316
2353
  selectors: {
2317
- get: mn
2354
+ get: bn
2318
2355
  },
2319
- utils: { isAdmin: yn, isLogged: An }
2356
+ utils: { isAdmin: Ln, isLogged: wn }
2320
2357
  };
2321
- function kt() {
2358
+ function xt() {
2322
2359
  let t = "";
2323
2360
  for (let e = 0; e < 16; e++)
2324
2361
  t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
2325
2362
  return t;
2326
2363
  }
2327
- const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDGET_Quick_Survey", wi = "WIDGET_Quick_Survey_Text", En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2364
+ const bi = "WIDGET_Check_List", Li = "WIDGET_Check_List_Description", wi = "WIDGET_Quick_Survey", Ii = "WIDGET_Quick_Survey_Text", In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2328
2365
  __proto__: null,
2329
- WIDGET_CHECK_LIST_DESCRIPTION: Ci,
2330
- WIDGET_CHECK_LIST_LABEL: Ti,
2331
- WIDGET_QUICK_SURVEY_DESCRIPTION: wi,
2332
- WIDGET_QUICK_SURVEY_LABEL: bi
2333
- }, Symbol.toStringTag, { value: "Module" })), Sn = {
2366
+ WIDGET_CHECK_LIST_DESCRIPTION: Li,
2367
+ WIDGET_CHECK_LIST_LABEL: bi,
2368
+ WIDGET_QUICK_SURVEY_DESCRIPTION: Ii,
2369
+ WIDGET_QUICK_SURVEY_LABEL: wi
2370
+ }, Symbol.toStringTag, { value: "Module" })), vn = {
2334
2371
  label: "WIDGET_Article_Attachment",
2335
2372
  description: "WIDGET_Article_Attachment_Description",
2336
2373
  name: b.ArticleAttachment,
@@ -2342,9 +2379,9 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2342
2379
  useSelection: !1,
2343
2380
  useWidgets: !1
2344
2381
  }
2345
- }, Tn = {
2382
+ }, hn = {
2346
2383
  files: []
2347
- }, Cn = {
2384
+ }, On = {
2348
2385
  label: "WIDGET_BUTTON",
2349
2386
  description: "WIDGET_Button_Description",
2350
2387
  name: b.ArticleButton,
@@ -2356,7 +2393,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2356
2393
  useSelection: !1,
2357
2394
  useWidgets: !1
2358
2395
  }
2359
- }, bn = {
2396
+ }, Rn = {
2360
2397
  text: "",
2361
2398
  openingType: "link",
2362
2399
  openingTypeLink: {
@@ -2369,7 +2406,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2369
2406
  backgroundColor: "#4dbf96",
2370
2407
  buttonSize: "lg",
2371
2408
  borderRadius: "4"
2372
- }, ti = {
2409
+ }, ai = {
2373
2410
  label: "WIDGET_Article_Gallery",
2374
2411
  description: "WIDGET_Article_Gallery_Description",
2375
2412
  name: b.ArticleGallery,
@@ -2381,11 +2418,11 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2381
2418
  useSelection: !1,
2382
2419
  useWidgets: !1
2383
2420
  }
2384
- }, wn = {
2421
+ }, Dn = {
2385
2422
  files: [],
2386
2423
  gap: "4",
2387
2424
  column: "3"
2388
- }, In = {
2425
+ }, kn = {
2389
2426
  label: "WIDGET_Article_Image",
2390
2427
  description: "WIDGET_Article_Image_Description",
2391
2428
  name: b.ArticleImage,
@@ -2397,7 +2434,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2397
2434
  useSelection: !1,
2398
2435
  useWidgets: !1
2399
2436
  }
2400
- }, Ln = {}, vn = {
2437
+ }, Mn = {}, xn = {
2401
2438
  label: "WIDGET_Slider",
2402
2439
  description: "WIDGET_Slider_Description",
2403
2440
  name: b.ArticleSlider,
@@ -2409,13 +2446,13 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2409
2446
  useSelection: !1,
2410
2447
  useWidgets: !1
2411
2448
  }
2412
- }, hn = {
2449
+ }, jn = {
2413
2450
  slides: [],
2414
2451
  maxWidth: 800,
2415
2452
  loop: !1,
2416
2453
  useDots: !0,
2417
2454
  startAt: 0
2418
- }, On = {
2455
+ }, _n = {
2419
2456
  label: "WIDGET_Text",
2420
2457
  description: "WIDGET_Text_Description",
2421
2458
  name: b.ArticleText,
@@ -2427,9 +2464,9 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2427
2464
  useSelection: !1,
2428
2465
  useWidgets: !1
2429
2466
  }
2430
- }, Rn = {
2467
+ }, Nn = {
2431
2468
  text: ""
2432
- }, Dn = {
2469
+ }, Pn = {
2433
2470
  label: "WIDGET_Title",
2434
2471
  description: "WIDGET_Title_Description",
2435
2472
  name: b.ArticleTitle,
@@ -2441,11 +2478,11 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2441
2478
  useSelection: !1,
2442
2479
  useWidgets: !1
2443
2480
  }
2444
- }, kn = {
2481
+ }, Un = {
2445
2482
  text: "",
2446
2483
  heading: "h1",
2447
2484
  backgroundColor: "transparent"
2448
- }, Mn = {
2485
+ }, Fn = {
2449
2486
  label: "WIDGET_Calendar_CalDav",
2450
2487
  description: "WIDGET_Calendar_CalDav_Text",
2451
2488
  name: b.CalendarCalDav,
@@ -2458,13 +2495,13 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2458
2495
  useSelection: !0,
2459
2496
  useWidgets: !1
2460
2497
  }
2461
- }, xn = {
2498
+ }, Bn = {
2462
2499
  calEventsLimit: !1,
2463
2500
  calEventsLimitValue: 10,
2464
2501
  calEventsPromptStatus: "shared"
2465
- }, jn = {
2466
- label: Ti,
2467
- description: Ci,
2502
+ }, Wn = {
2503
+ label: bi,
2504
+ description: Li,
2468
2505
  name: b.CheckList,
2469
2506
  img: "/img/fast-intranet/widget-check-list.png",
2470
2507
  available: !0,
@@ -2474,10 +2511,10 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2474
2511
  useSelection: !1,
2475
2512
  useWidgets: !1
2476
2513
  }
2477
- }, Nn = {
2514
+ }, qn = {
2478
2515
  arr: [],
2479
2516
  edit: !1
2480
- }, _n = {
2517
+ }, $n = {
2481
2518
  label: "WIDGET_Contact_CardDav",
2482
2519
  description: "WIDGET_Contact_CardDav_Text",
2483
2520
  name: b.ContactCardDav,
@@ -2490,11 +2527,11 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2490
2527
  useSelection: !0,
2491
2528
  useWidgets: !1
2492
2529
  }
2493
- }, Pn = {
2530
+ }, Vn = {
2494
2531
  contactLimit: !1,
2495
2532
  contactLimitValue: 10,
2496
2533
  contactPromptStatus: "shared"
2497
- }, Un = {
2534
+ }, Hn = {
2498
2535
  label: "WIDGET_Datasource_Table",
2499
2536
  description: "WIDGET_Datasource_Table_Description",
2500
2537
  name: b.DatasourceTable,
@@ -2506,14 +2543,14 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2506
2543
  useSelection: !0,
2507
2544
  useWidgets: !1
2508
2545
  }
2509
- }, Bn = {
2546
+ }, Gn = {
2510
2547
  tableHeadColor: "#f1f1f1",
2511
2548
  tableHeadTextColor: "#000",
2512
2549
  tableHeadIconColor: "#000",
2513
2550
  tableRowColor: "#f5f5f5",
2514
2551
  tableRowTextColor: "#000",
2515
2552
  limit: 20
2516
- }, Wn = {
2553
+ }, Xn = {
2517
2554
  label: "WIDGET_Email_IMAP",
2518
2555
  description: "WIDGET_Email_IMAP_Text",
2519
2556
  name: b.EmailsImap,
@@ -2526,11 +2563,11 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2526
2563
  useSelection: !0,
2527
2564
  useWidgets: !1
2528
2565
  }
2529
- }, Fn = {
2566
+ }, Jn = {
2530
2567
  emailsLimit: !1,
2531
2568
  emailsLimitValue: 10,
2532
2569
  emailsPromptStatus: "shared"
2533
- }, $n = {
2570
+ }, Kn = {
2534
2571
  label: "WIDGET_Excel_Datasource_Table",
2535
2572
  description: "WIDGET_Excel_Datasource_Table_Text",
2536
2573
  name: b.ExcelDatasourceTable,
@@ -2542,14 +2579,14 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2542
2579
  useSelection: !0,
2543
2580
  useWidgets: !1
2544
2581
  }
2545
- }, qn = {
2582
+ }, Yn = {
2546
2583
  tableHeadColor: "#f1f1f1",
2547
2584
  tableHeadTextColor: "#000",
2548
2585
  tableHeadIconColor: "#000",
2549
2586
  tableRowColor: "#f5f5f5",
2550
2587
  tableRowTextColor: "#000",
2551
2588
  limit: 20
2552
- }, Vn = {
2589
+ }, Qn = {
2553
2590
  label: "WIDGET_Extension",
2554
2591
  description: "WIDGET_Extension_Description",
2555
2592
  name: b.Extension,
@@ -2561,9 +2598,9 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2561
2598
  useSelection: !1,
2562
2599
  useWidgets: !1
2563
2600
  }
2564
- }, Hn = {
2601
+ }, zn = {
2565
2602
  extensionName: ""
2566
- }, Gn = {
2603
+ }, Zn = {
2567
2604
  label: "WIDGET_Lucca_Absence",
2568
2605
  description: "WIDGET_Lucca_Absence_Text",
2569
2606
  name: b.LuccaAbsence,
@@ -2575,9 +2612,9 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2575
2612
  useSelection: !0,
2576
2613
  useWidgets: !1
2577
2614
  }
2578
- }, Xn = {
2615
+ }, es = {
2579
2616
  url: ""
2580
- }, Jn = {
2617
+ }, ts = {
2581
2618
  label: "WIDGET_Presence",
2582
2619
  description: "WIDGET_Presence_Text",
2583
2620
  name: b.Presence,
@@ -2589,13 +2626,13 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2589
2626
  useSelection: !1,
2590
2627
  useWidgets: !1
2591
2628
  }
2592
- }, Kn = {
2629
+ }, is = {
2593
2630
  closing: !1,
2594
2631
  limit: !1,
2595
2632
  limitValue: 100
2596
- }, Yn = {
2597
- label: bi,
2598
- description: wi,
2633
+ }, as = {
2634
+ label: wi,
2635
+ description: Ii,
2599
2636
  name: b.QuickSurvey,
2600
2637
  img: "/img/fast-intranet/widget-quick-survey.png",
2601
2638
  available: !0,
@@ -2605,7 +2642,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2605
2642
  useSelection: !1,
2606
2643
  useWidgets: !1
2607
2644
  }
2608
- }, zn = {
2645
+ }, rs = {
2609
2646
  arr: [],
2610
2647
  open: !1,
2611
2648
  multi: !1,
@@ -2613,7 +2650,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2613
2650
  isClosed: !1,
2614
2651
  showResult: !1,
2615
2652
  isNotDisabled: !1
2616
- }, Qn = {
2653
+ }, ns = {
2617
2654
  label: "WIDGET_User_Profil",
2618
2655
  description: "WIDGET_User_Profil_Text",
2619
2656
  name: b.UserProfile,
@@ -2625,7 +2662,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2625
2662
  useSelection: !0,
2626
2663
  useWidgets: !1
2627
2664
  }
2628
- }, Zn = {}, es = {
2665
+ }, ss = {}, os = {
2629
2666
  label: "WIDGET_Color",
2630
2667
  description: "WIDGET_Color_Text",
2631
2668
  name: b.Color,
@@ -2637,7 +2674,7 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2637
2674
  useSelection: !0,
2638
2675
  useWidgets: !1
2639
2676
  }
2640
- }, ts = {}, is = {
2677
+ }, ls = {}, ds = {
2641
2678
  label: "WIDGET_Welcome",
2642
2679
  description: "WIDGET_Welcome_Text",
2643
2680
  name: b.Welcome,
@@ -2649,153 +2686,153 @@ const Ti = "WIDGET_Check_List", Ci = "WIDGET_Check_List_Description", bi = "WIDG
2649
2686
  useSelection: !0,
2650
2687
  useWidgets: !1
2651
2688
  }
2652
- }, as = {};
2653
- function rs(t) {
2689
+ }, cs = {};
2690
+ function us(t) {
2654
2691
  switch (t) {
2655
2692
  default:
2656
- return ti;
2693
+ return ai;
2657
2694
  case "widget-article-gallery":
2658
- return ti;
2695
+ return ai;
2659
2696
  case "widget-article-attachment":
2660
- return Sn;
2697
+ return vn;
2661
2698
  case "widget-presence":
2662
- return Jn;
2699
+ return ts;
2663
2700
  case "widget-article-slider":
2664
- return vn;
2701
+ return xn;
2665
2702
  case "widget-article-text":
2666
- return On;
2703
+ return _n;
2667
2704
  case "widget-article-title":
2668
- return Dn;
2705
+ return Pn;
2669
2706
  case "widget-article-image":
2670
- return In;
2707
+ return kn;
2671
2708
  case "widget-datasource-table":
2672
- return Un;
2709
+ return Hn;
2673
2710
  case "widget-excel-datasource-table":
2674
- return $n;
2711
+ return Kn;
2675
2712
  case "widget-article-button":
2676
- return Cn;
2713
+ return On;
2677
2714
  case "widget-check-list":
2678
- return jn;
2715
+ return Wn;
2679
2716
  case "widget-quick-survey":
2680
- return Yn;
2717
+ return as;
2681
2718
  case "widget-calendar-calDav":
2682
- return Mn;
2719
+ return Fn;
2683
2720
  case "widget-contact-cardDav":
2684
- return _n;
2721
+ return $n;
2685
2722
  case "widget-lucca-absence":
2686
- return Gn;
2723
+ return Zn;
2687
2724
  case "widget-emails-imap":
2688
- return Wn;
2725
+ return Xn;
2689
2726
  case "widget-welcome":
2690
- return is;
2727
+ return ds;
2691
2728
  case "widget-user-profil":
2692
- return Qn;
2729
+ return ns;
2693
2730
  case "widget-extension":
2694
- return Vn;
2731
+ return Qn;
2695
2732
  case "widget-color":
2696
- return es;
2733
+ return os;
2697
2734
  }
2698
2735
  }
2699
- function ns(t) {
2736
+ function ps(t) {
2700
2737
  return {
2701
2738
  title: "",
2702
2739
  level: 3,
2703
- widget: ss(t)
2740
+ widget: gs(t)
2704
2741
  };
2705
2742
  }
2706
- function ss(t) {
2743
+ function gs(t) {
2707
2744
  return {
2708
- uniqid: kt(),
2745
+ uniqid: xt(),
2709
2746
  name: t,
2710
- content: os(t)
2747
+ content: fs(t)
2711
2748
  };
2712
2749
  }
2713
- function os(t) {
2750
+ function fs(t) {
2714
2751
  switch (t) {
2715
2752
  default:
2716
2753
  case "widget-lucca-absence":
2717
2754
  return {
2718
- ...Xn
2755
+ ...es
2719
2756
  };
2720
2757
  case "widget-article-attachment":
2721
2758
  return {
2722
- ...Tn
2759
+ ...hn
2723
2760
  };
2724
2761
  case "widget-presence":
2725
2762
  return {
2726
- ...Kn
2763
+ ...is
2727
2764
  };
2728
2765
  case "widget-datasource-table":
2729
2766
  return {
2730
- ...Bn
2767
+ ...Gn
2731
2768
  };
2732
2769
  case "widget-excel-datasource-table":
2733
2770
  return {
2734
- ...qn
2771
+ ...Yn
2735
2772
  };
2736
2773
  case "widget-article-slider":
2737
2774
  return {
2738
- ...hn
2775
+ ...jn
2739
2776
  };
2740
2777
  case "widget-article-gallery":
2741
2778
  return {
2742
- ...wn
2779
+ ...Dn
2743
2780
  };
2744
2781
  case "widget-article-button":
2745
2782
  return {
2746
- ...bn
2783
+ ...Rn
2747
2784
  };
2748
2785
  case "widget-article-title":
2749
2786
  return {
2750
- ...kn
2787
+ ...Un
2751
2788
  };
2752
2789
  case "widget-article-image":
2753
2790
  return {
2754
- ...Ln
2791
+ ...Mn
2755
2792
  };
2756
2793
  case "widget-article-text":
2757
2794
  return {
2758
- ...Rn
2795
+ ...Nn
2759
2796
  };
2760
2797
  case "widget-check-list":
2761
2798
  return {
2762
- ...Nn
2799
+ ...qn
2763
2800
  };
2764
2801
  case "widget-quick-survey":
2765
2802
  return {
2766
- ...zn
2803
+ ...rs
2767
2804
  };
2768
2805
  case "widget-calendar-calDav":
2769
2806
  return {
2770
- ...xn
2807
+ ...Bn
2771
2808
  };
2772
2809
  case "widget-contact-cardDav":
2773
2810
  return {
2774
- ...Pn
2811
+ ...Vn
2775
2812
  };
2776
2813
  case "widget-emails-imap":
2777
2814
  return {
2778
- ...Fn
2815
+ ...Jn
2779
2816
  };
2780
2817
  case "widget-welcome":
2781
2818
  return {
2782
- ...as
2819
+ ...cs
2783
2820
  };
2784
2821
  case "widget-user-profil":
2785
2822
  return {
2786
- ...Zn
2823
+ ...ss
2787
2824
  };
2788
2825
  case "widget-extension":
2789
2826
  return {
2790
- ...Hn
2827
+ ...zn
2791
2828
  };
2792
2829
  case "widget-color":
2793
2830
  return {
2794
- ...ts
2831
+ ...ls
2795
2832
  };
2796
2833
  }
2797
2834
  }
2798
- const ls = {
2835
+ const ms = {
2799
2836
  token: void 0,
2800
2837
  ids: {},
2801
2838
  layers: {},
@@ -2813,7 +2850,7 @@ const ls = {
2813
2850
  flushedWidgets: [],
2814
2851
  rtObjectStack: [],
2815
2852
  widgetContext: {}
2816
- }, ds = [
2853
+ }, ys = [
2817
2854
  b.ArticleTitle,
2818
2855
  b.ArticleText,
2819
2856
  b.ArticleImage,
@@ -2822,7 +2859,7 @@ const ls = {
2822
2859
  b.ArticleAttachment
2823
2860
  ], X = T({
2824
2861
  name: "widgets",
2825
- initialState: ls,
2862
+ initialState: ms,
2826
2863
  reducers: {
2827
2864
  registerWidget: (t, e) => {
2828
2865
  const { uniqid: i, widget: a, context: r } = e.payload;
@@ -2832,7 +2869,7 @@ const ls = {
2832
2869
  loading: !1,
2833
2870
  mounted: !1,
2834
2871
  hover: !1,
2835
- empty: ds.includes(a.widget.name),
2872
+ empty: ys.includes(a.widget.name),
2836
2873
  locked: !1
2837
2874
  }, t.widgetContext[i] = r;
2838
2875
  },
@@ -2889,7 +2926,7 @@ const ls = {
2889
2926
  t.ids && t.ids[i] && (t.ids[i] = Object.assign({ ...t.ids[i], ...e.payload }));
2890
2927
  },
2891
2928
  registerLayer: (t, e) => {
2892
- const i = kt(), a = { ...t.ids[e.payload.uniqid] };
2929
+ const i = xt(), a = { ...t.ids[e.payload.uniqid] };
2893
2930
  a && a.widget && (t.ids[e.payload.uniqid] && a.widget.layers ? t.ids[e.payload.uniqid] = Object.assign({
2894
2931
  ...t.ids[e.payload.uniqid],
2895
2932
  widget: {
@@ -2978,7 +3015,7 @@ const ls = {
2978
3015
  t.modal = void 0;
2979
3016
  }
2980
3017
  }
2981
- }), cs = function(t, e) {
3018
+ }), As = function(t, e) {
2982
3019
  return [
2983
3020
  {
2984
3021
  namespace: "WIDGET",
@@ -3033,43 +3070,43 @@ const ls = {
3033
3070
  }
3034
3071
  }
3035
3072
  ];
3036
- }, us = (t) => t.widgets.token, ps = (t) => t.widgets.modal, gs = (t) => t.widgets.ids, fs = (t) => t.widgets.flushedWidgets, ms = (t, e) => t.widgets.states[e] ?? void 0, ys = (t, e) => t.widgets.ids[e] ?? void 0, As = (t, e) => t.widgets.ids[e]?.level ?? void 0, Es = (t, e) => t.widgets.widgetObject[e] ?? void 0, Ss = (t, e) => {
3073
+ }, Es = (t) => t.widgets.token, Ss = (t) => t.widgets.modal, Ts = (t) => t.widgets.ids, Cs = (t) => t.widgets.flushedWidgets, bs = (t, e) => t.widgets.states[e] ?? void 0, Ls = (t, e) => t.widgets.ids[e] ?? void 0, ws = (t, e) => t.widgets.ids[e]?.level ?? void 0, Is = (t, e) => t.widgets.widgetObject[e] ?? void 0, vs = (t, e) => {
3037
3074
  const i = t.widgets.widgetObject[e];
3038
3075
  if (i && "uri" in i)
3039
3076
  return i.uri;
3040
- }, Ts = (t, e) => t.widgets.widgetObjectRights[e] ?? void 0, Cs = (t, e) => t.widgets.widgetContext[e] ?? void 0, bs = (t, e) => t.widgets.widgetAuthor[e] ?? void 0, ws = (t, e) => t.widgets.widgetChipCount[e] ?? 0, Is = (t, e) => t.widgets.widgetWrapperStyle[e] ?? {}, Ls = (t, e) => t.widgets.widgetTitleStyle[e] ?? {}, vs = (t, e) => t.widgets.currentEditableWidgetId === e, hs = (t, e) => t.widgets.rtObjectStack.filter((i) => i.uniqid === e), vl = (t, e, i) => Os.slice.actions.updateWidget({ uniqid: t, content: e, override: i ?? !1 }), Os = {
3041
- const: En,
3042
- factory: ns,
3043
- definition: rs,
3077
+ }, hs = (t, e) => t.widgets.widgetObjectRights[e] ?? void 0, Os = (t, e) => t.widgets.widgetContext[e] ?? void 0, Rs = (t, e) => t.widgets.widgetAuthor[e] ?? void 0, Ds = (t, e) => t.widgets.widgetChipCount[e] ?? 0, ks = (t, e) => t.widgets.widgetWrapperStyle[e] ?? {}, Ms = (t, e) => t.widgets.widgetTitleStyle[e] ?? {}, xs = (t, e) => t.widgets.currentEditableWidgetId === e, js = (t, e) => t.widgets.rtObjectStack.filter((i) => i.uniqid === e), xl = (t, e, i) => _s.slice.actions.updateWidget({ uniqid: t, content: e, override: i ?? !1 }), _s = {
3078
+ const: In,
3079
+ factory: ps,
3080
+ definition: us,
3044
3081
  utils: {
3045
- uniqid: kt
3082
+ uniqid: xt
3046
3083
  },
3047
3084
  slice: X,
3048
- getWidgetRTHandlers: cs,
3085
+ getWidgetRTHandlers: As,
3049
3086
  selectors: {
3050
- isActive: vs,
3051
- selectToken: us,
3052
- selectWidgets: gs,
3053
- selectWidget: ys,
3054
- selectWidgetState: ms,
3055
- selectModal: ps,
3056
- selectWidgetObject: Es,
3057
- selectWidgetObjectUri: Ss,
3058
- selectWidgetAuthor: bs,
3059
- selectWidgetObjectRights: Ts,
3060
- selectAllWidgetRTObject: hs,
3061
- selectFlushedWidgets: fs,
3062
- selectWidgetContext: Cs,
3063
- selectWidgetLevel: As,
3064
- selectWidgetWrapperStyle: Is,
3065
- selectWidgetTitleStyle: Ls,
3066
- selectWidgetChipCount: ws
3067
- }
3068
- }, Rs = {
3087
+ isActive: xs,
3088
+ selectToken: Es,
3089
+ selectWidgets: Ts,
3090
+ selectWidget: Ls,
3091
+ selectWidgetState: bs,
3092
+ selectModal: Ss,
3093
+ selectWidgetObject: Is,
3094
+ selectWidgetObjectUri: vs,
3095
+ selectWidgetAuthor: Rs,
3096
+ selectWidgetObjectRights: hs,
3097
+ selectAllWidgetRTObject: js,
3098
+ selectFlushedWidgets: Cs,
3099
+ selectWidgetContext: Os,
3100
+ selectWidgetLevel: ws,
3101
+ selectWidgetWrapperStyle: ks,
3102
+ selectWidgetTitleStyle: Ms,
3103
+ selectWidgetChipCount: Ds
3104
+ }
3105
+ }, Ns = {
3069
3106
  editors: []
3070
- }, Ds = T({
3107
+ }, Ps = T({
3071
3108
  name: "editors",
3072
- initialState: Rs,
3109
+ initialState: Ns,
3073
3110
  reducers: {
3074
3111
  registerEditor: (t, e) => {
3075
3112
  const { uniqid: i, name: a, onSave: r, mode: n } = e.payload, s = r ? {
@@ -3119,29 +3156,29 @@ const ls = {
3119
3156
  window.dispatchEvent(new Event("WidgetEditorFlushAll")), t.editors.length = 0;
3120
3157
  }
3121
3158
  }
3122
- }), ks = (t) => t.editors.editors, Ms = (t, e) => t.editors.editors.find((i) => i.uniqid === e), hl = {
3123
- slice: Ds,
3159
+ }), Us = (t) => t.editors.editors, Fs = (t, e) => t.editors.editors.find((i) => i.uniqid === e), jl = {
3160
+ slice: Ps,
3124
3161
  selectors: {
3125
- selectEditors: ks,
3126
- selectEditor: Ms
3162
+ selectEditors: Us,
3163
+ selectEditor: Fs
3127
3164
  }
3128
- }, _ = lt({
3165
+ }, N = dt({
3129
3166
  selectId: (t) => `${t.targetId}-${t.type}`
3130
- }), ii = T({
3167
+ }), ri = T({
3131
3168
  name: "socialActions",
3132
- initialState: _.getInitialState(),
3169
+ initialState: N.getInitialState(),
3133
3170
  reducers: {
3134
- addOne: _.addOne,
3135
- addMany: _.addMany,
3136
- setAll: _.setAll,
3137
- clear: _.removeAll,
3138
- updateOne: _.updateOne
3139
- }
3140
- }), xs = _.getSelectors((t) => t.entities.socialActions), Ol = {
3141
- slice: ii,
3142
- actions: { ...ii.actions },
3143
- selectors: xs
3144
- }, at = {
3171
+ addOne: N.addOne,
3172
+ addMany: N.addMany,
3173
+ setAll: N.setAll,
3174
+ clear: N.removeAll,
3175
+ updateOne: N.updateOne
3176
+ }
3177
+ }), Bs = N.getSelectors((t) => t.entities.socialActions), _l = {
3178
+ slice: ri,
3179
+ actions: { ...ri.actions },
3180
+ selectors: Bs
3181
+ }, rt = {
3145
3182
  ALL: "1",
3146
3183
  CUSTOM: "0"
3147
3184
  }, H = {
@@ -3152,10 +3189,10 @@ const ls = {
3152
3189
  DRAFT: H.draft,
3153
3190
  INSTALLED: H.installed,
3154
3191
  SUSPENDED: H.suspended
3155
- }, rt = {
3192
+ }, nt = {
3156
3193
  SOLR: "1",
3157
3194
  NOT_SOLR: "0"
3158
- }, Mt = ["create", "popup", "edit", "filter", "list", "view"], o = {
3195
+ }, jt = ["create", "popup", "edit", "filter", "list", "view"], o = {
3159
3196
  IMAGE: "IMAGE",
3160
3197
  DESCRIPTION: "DESCRIPTION",
3161
3198
  TEXT: "TEXT",
@@ -3183,7 +3220,7 @@ const ls = {
3183
3220
  SENDALERTTOSUBSCRIBERS: "SENDALERTTOSUBSCRIBERS",
3184
3221
  RECEIVEACOPY: "RECEIVEACOPY",
3185
3222
  CREATIONDATE: "CREATIONDATE"
3186
- }, js = {
3223
+ }, Ws = {
3187
3224
  TITLE: "title",
3188
3225
  USER: "user",
3189
3226
  PUBLISHTO: "publishTo",
@@ -3198,10 +3235,10 @@ const ls = {
3198
3235
  OPTIONS_EDITOR: "options_editor",
3199
3236
  TAXONOMY: "taxonomy",
3200
3237
  CONTENTTYPE: "contenttype"
3201
- }, Ns = [o.DESCRIPTION, o.IMAGE], Rl = Ns, nt = /* @__PURE__ */ new Map();
3202
- nt.set(o.IMAGE, ["list", "filter", "view"]);
3203
- nt.set(o.CODEHTML, ["list", "filter", "view"]);
3204
- const q = {
3238
+ }, qs = [o.DESCRIPTION, o.IMAGE], Nl = qs, st = /* @__PURE__ */ new Map();
3239
+ st.set(o.IMAGE, ["list", "filter", "view"]);
3240
+ st.set(o.CODEHTML, ["list", "filter", "view"]);
3241
+ const $ = {
3205
3242
  create: {
3206
3243
  fixed: [u.TITLE],
3207
3244
  optional: [
@@ -3230,47 +3267,47 @@ const q = {
3230
3267
  fixed: [u.TITLE],
3231
3268
  optional: []
3232
3269
  }
3233
- }, _s = [
3270
+ }, $s = [
3234
3271
  u.TITLE,
3235
3272
  u.USER,
3236
3273
  u.CREATIONDATE,
3237
3274
  o.DESCRIPTION
3238
- ], Ii = [o.DESCRIPTION], Li = Ii, Dl = [
3275
+ ], vi = [o.DESCRIPTION], hi = vi, Pl = [
3239
3276
  u.TITLE,
3240
3277
  u.PUBLISHTO,
3241
3278
  u.SENDALERTTOSUBSCRIBERS,
3242
3279
  u.RECEIVEACOPY,
3243
3280
  u.USER,
3244
3281
  u.CREATIONDATE
3245
- ], Ps = [
3282
+ ], Vs = [
3246
3283
  u.USER,
3247
3284
  u.TITLE
3248
- ], Us = [o.CODEHTML], Bs = Ps.concat(Us).concat(Ii);
3249
- var Ws = /* @__PURE__ */ ((t) => (t.Attr = "attr", t.PublishTo = "publishTo", t))(Ws || {}), Fs = /* @__PURE__ */ ((t) => (t.Empty = "", t.FieldTagDescription = "Field_Tag_Description", t.FieldTitleDescription = "Field_Title_Description", t.WWWDescCOM = "www.desc.com", t))(Fs || {}), L = [];
3250
- for (var pt = 0; pt < 256; ++pt)
3251
- L.push((pt + 256).toString(16).slice(1));
3252
- function $s(t, e = 0) {
3253
- return (L[t[e + 0]] + L[t[e + 1]] + L[t[e + 2]] + L[t[e + 3]] + "-" + L[t[e + 4]] + L[t[e + 5]] + "-" + L[t[e + 6]] + L[t[e + 7]] + "-" + L[t[e + 8]] + L[t[e + 9]] + "-" + L[t[e + 10]] + L[t[e + 11]] + L[t[e + 12]] + L[t[e + 13]] + L[t[e + 14]] + L[t[e + 15]]).toLowerCase();
3285
+ ], Hs = [o.CODEHTML], Gs = Vs.concat(Hs).concat(vi);
3286
+ var Xs = /* @__PURE__ */ ((t) => (t.Attr = "attr", t.PublishTo = "publishTo", t))(Xs || {}), Js = /* @__PURE__ */ ((t) => (t.Empty = "", t.FieldTagDescription = "Field_Tag_Description", t.FieldTitleDescription = "Field_Title_Description", t.WWWDescCOM = "www.desc.com", t))(Js || {}), I = [];
3287
+ for (var gt = 0; gt < 256; ++gt)
3288
+ I.push((gt + 256).toString(16).slice(1));
3289
+ function Ks(t, e = 0) {
3290
+ return (I[t[e + 0]] + I[t[e + 1]] + I[t[e + 2]] + I[t[e + 3]] + "-" + I[t[e + 4]] + I[t[e + 5]] + "-" + I[t[e + 6]] + I[t[e + 7]] + "-" + I[t[e + 8]] + I[t[e + 9]] + "-" + I[t[e + 10]] + I[t[e + 11]] + I[t[e + 12]] + I[t[e + 13]] + I[t[e + 14]] + I[t[e + 15]]).toLowerCase();
3254
3291
  }
3255
- var ae, qs = new Uint8Array(16);
3256
- function Vs() {
3292
+ var ae, Ys = new Uint8Array(16);
3293
+ function Qs() {
3257
3294
  if (!ae && (ae = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ae))
3258
3295
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3259
- return ae(qs);
3296
+ return ae(Ys);
3260
3297
  }
3261
- var Hs = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3262
- const ai = {
3263
- randomUUID: Hs
3298
+ var zs = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3299
+ const ni = {
3300
+ randomUUID: zs
3264
3301
  };
3265
3302
  function M(t, e, i) {
3266
- if (ai.randomUUID && !t)
3267
- return ai.randomUUID();
3303
+ if (ni.randomUUID && !t)
3304
+ return ni.randomUUID();
3268
3305
  t = t || {};
3269
- var a = t.random || (t.rng || Vs)();
3270
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, $s(a);
3306
+ var a = t.random || (t.rng || Qs)();
3307
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ks(a);
3271
3308
  }
3272
- var $ = /* @__PURE__ */ ((t) => (t.TITLE = "TITLE", t.IMAGE = "IMAGE", t.DESCRIPTION = "DESCRIPTION", t.IDUSER = "IDUSER", t.PUBLISHTO = "PUBLISHTO", t.SENDALERTTOSUBSCRIBERS = "SENDALERTTOSUBSCRIBERS", t.RECEIVEACOPY = "RECEIVEACOPY", t.TEXT = "TEXT", t.TEXTAREA = "TEXTAREA", t.TEXTAREAHTML = "TEXTAREAHTML", t.DATE = "DATE", t.DATETIME = "DATETIME", t.RANGE = "RANGE", t.NUMBER = "NUMBER", t.URL = "URL", t.EMAIL = "EMAIL", t.SELECT = "SELECT", t.CHECKBOX = "CHECKBOX", t.TOGGLE = "TOGGLE", t.RADIO = "RADIO", t.TAGS = "TAGS", t.ADDFILEATTACHMENT = "ADDFILEATTACHMENT", t.AUDIENCE = "AUDIENCE", t.CODEHTML = "CODEHTML", t.DATECREATION = "DATECREATION", t.USERLINK = "USERLINK", t.CONTENTLINK = "CONTENTLINK", t))($ || {});
3273
- function vi(t) {
3309
+ var q = /* @__PURE__ */ ((t) => (t.TITLE = "TITLE", t.IMAGE = "IMAGE", t.DESCRIPTION = "DESCRIPTION", t.IDUSER = "IDUSER", t.PUBLISHTO = "PUBLISHTO", t.SENDALERTTOSUBSCRIBERS = "SENDALERTTOSUBSCRIBERS", t.RECEIVEACOPY = "RECEIVEACOPY", t.TEXT = "TEXT", t.TEXTAREA = "TEXTAREA", t.TEXTAREAHTML = "TEXTAREAHTML", t.DATE = "DATE", t.DATETIME = "DATETIME", t.RANGE = "RANGE", t.NUMBER = "NUMBER", t.URL = "URL", t.EMAIL = "EMAIL", t.SELECT = "SELECT", t.CHECKBOX = "CHECKBOX", t.TOGGLE = "TOGGLE", t.RADIO = "RADIO", t.TAGS = "TAGS", t.ADDFILEATTACHMENT = "ADDFILEATTACHMENT", t.AUDIENCE = "AUDIENCE", t.CODEHTML = "CODEHTML", t.DATECREATION = "DATECREATION", t.USERLINK = "USERLINK", t.CONTENTLINK = "CONTENTLINK", t))(q || {});
3310
+ function Oi(t) {
3274
3311
  const e = t, i = e.manifest, a = n(), r = {
3275
3312
  idApp: e.idApp,
3276
3313
  status: e.status,
@@ -3318,18 +3355,18 @@ function vi(t) {
3318
3355
  return o[c];
3319
3356
  }
3320
3357
  function l(c) {
3321
- const E = [], C = c.options && Object.prototype.hasOwnProperty.call(c, "hasDefaultValue"), w = {
3358
+ const E = [], C = c.options && Object.prototype.hasOwnProperty.call(c, "hasDefaultValue"), L = {
3322
3359
  isRequired: c.mandatory || !1,
3323
3360
  ...C && { isOptionsEditorEnhanced: !0 }
3324
3361
  };
3325
3362
  return c.labels && (E.push({
3326
3363
  propertyType: S.LABEL,
3327
3364
  value: c.labels.label?.content || "",
3328
- ...w
3365
+ ...L
3329
3366
  }), E.push({
3330
3367
  propertyType: S.DESCRIPTION,
3331
3368
  value: c.labels.description?.content || "",
3332
- ...w
3369
+ ...L
3333
3370
  })), c.options && E.push({
3334
3371
  propertyType: S.OPTIONS_EDITOR,
3335
3372
  value: C ? {
@@ -3339,24 +3376,24 @@ function vi(t) {
3339
3376
  canSelectMultiple: c.multiple ?? !1,
3340
3377
  userCanModifiyByComment: c.explain ?? !1
3341
3378
  } : { propertyOptions: d(c.options ?? []) },
3342
- ...w
3379
+ ...L
3343
3380
  }), c.code && E.push({
3344
3381
  propertyType: S.RICHTEXT,
3345
3382
  value: { html: c.code.html, text: c.code.text },
3346
- ...w
3383
+ ...L
3347
3384
  }), Object.prototype.hasOwnProperty.call(c, "digits") && E.push({
3348
3385
  propertyType: S.CHECKBOX,
3349
3386
  value: c.digits || !1,
3350
3387
  checkBoxOptions: [{ label: "APPSTUDIO_FormEditProps_Digits", value: c.digits }],
3351
- ...w
3388
+ ...L
3352
3389
  }), Object.prototype.hasOwnProperty.call(c, "taxonomy") && E.push({
3353
3390
  propertyType: S.TAXONOMY,
3354
3391
  value: c.taxonomy || "",
3355
- ...w
3392
+ ...L
3356
3393
  }), Object.prototype.hasOwnProperty.call(c, "contentType") && E.push({
3357
3394
  propertyType: S.CONTENTTYPE,
3358
3395
  value: c.contentType || "",
3359
- ...w
3396
+ ...L
3360
3397
  }), E;
3361
3398
  }
3362
3399
  function d(c) {
@@ -3370,18 +3407,18 @@ function vi(t) {
3370
3407
  }
3371
3408
  function g() {
3372
3409
  return {
3373
- create: m(e.formItemsViewList.find((c) => c.view == "create").formItemRefs),
3374
- popup: m(e.formItemsViewList.find((c) => c.view == "popup").formItemRefs),
3375
- edit: m(e.formItemsViewList.find((c) => c.view == "edit").formItemRefs),
3376
- list: m(e.formItemsViewList.find((c) => c.view == "list").formItemRefs),
3377
- filter: m(e.formItemsViewList.find((c) => c.view == "filter").formItemRefs),
3378
- view: m(e.formItemsViewList.find((c) => c.view == "view").formItemRefs)
3410
+ create: y(e.formItemsViewList.find((c) => c.view == "create").formItemRefs),
3411
+ popup: y(e.formItemsViewList.find((c) => c.view == "popup").formItemRefs),
3412
+ edit: y(e.formItemsViewList.find((c) => c.view == "edit").formItemRefs),
3413
+ list: y(e.formItemsViewList.find((c) => c.view == "list").formItemRefs),
3414
+ filter: y(e.formItemsViewList.find((c) => c.view == "filter").formItemRefs),
3415
+ view: y(e.formItemsViewList.find((c) => c.view == "view").formItemRefs)
3379
3416
  };
3380
3417
  }
3381
- function m(c) {
3418
+ function y(c) {
3382
3419
  const E = {};
3383
3420
  return c.forEach((C) => {
3384
- const w = {
3421
+ const L = {
3385
3422
  isUsed: !0,
3386
3423
  isFixed: !1,
3387
3424
  isOptional: !1,
@@ -3390,42 +3427,42 @@ function vi(t) {
3390
3427
  isLockedValue: !!C.fixedValue || !1,
3391
3428
  value: C.fixedValue || ""
3392
3429
  };
3393
- if (C.ref === $.TITLE)
3430
+ if (C.ref === q.TITLE)
3394
3431
  E[M()] = {
3395
- ...w,
3432
+ ...L,
3396
3433
  type: u.TITLE,
3397
3434
  isFixed: !0
3398
3435
  };
3399
- else if (C.ref === $.IDUSER)
3436
+ else if (C.ref === q.IDUSER)
3400
3437
  E[M()] = {
3401
- ...w,
3438
+ ...L,
3402
3439
  type: u.USER,
3403
3440
  isFixed: !0
3404
3441
  };
3405
- else if (C.ref === $.PUBLISHTO)
3442
+ else if (C.ref === q.PUBLISHTO)
3406
3443
  E[M()] = {
3407
- ...w,
3444
+ ...L,
3408
3445
  type: u.PUBLISHTO,
3409
3446
  isOptional: !0
3410
3447
  };
3411
- else if (C.ref === $.SENDALERTTOSUBSCRIBERS)
3448
+ else if (C.ref === q.SENDALERTTOSUBSCRIBERS)
3412
3449
  E[M()] = {
3413
- ...w,
3450
+ ...L,
3414
3451
  type: u.SENDALERTTOSUBSCRIBERS,
3415
3452
  isOptional: !0
3416
3453
  };
3417
- else if (C.ref === $.RECEIVEACOPY)
3454
+ else if (C.ref === q.RECEIVEACOPY)
3418
3455
  E[M()] = {
3419
- ...w,
3456
+ ...L,
3420
3457
  type: u.RECEIVEACOPY,
3421
3458
  isOptional: !0
3422
3459
  };
3423
3460
  else {
3424
- const I = f(C);
3425
- I && (E[I.id] = {
3426
- type: I.type,
3427
- ...w,
3428
- properties: I.properties || []
3461
+ const w = f(C);
3462
+ w && (E[w.id] = {
3463
+ type: w.type,
3464
+ ...L,
3465
+ properties: w.properties || []
3429
3466
  });
3430
3467
  }
3431
3468
  }), E;
@@ -3442,7 +3479,7 @@ function ee(t, e = !0) {
3442
3479
  return {
3443
3480
  id: M(),
3444
3481
  type: t,
3445
- properties: Js(t),
3482
+ properties: to(t),
3446
3483
  mandatory: !1,
3447
3484
  views: {
3448
3485
  create: e,
@@ -3459,15 +3496,15 @@ function ee(t, e = !0) {
3459
3496
  isLockedValue: !1
3460
3497
  };
3461
3498
  }
3462
- const Gs = {
3499
+ const Zs = {
3463
3500
  type: "taxonomyOpen",
3464
3501
  id: 1,
3465
3502
  title: "Mots-clés"
3466
- }, Xs = {
3503
+ }, eo = {
3467
3504
  type: "mpArticle",
3468
3505
  label: "Article"
3469
3506
  };
3470
- function Js(t) {
3507
+ function to(t) {
3471
3508
  switch (t) {
3472
3509
  case o.TEXT:
3473
3510
  case o.DESCRIPTION:
@@ -3527,7 +3564,7 @@ function Js(t) {
3527
3564
  { propertyType: S.DESCRIPTION, value: "" },
3528
3565
  {
3529
3566
  propertyType: S.TAXONOMY,
3530
- value: { ...Gs }
3567
+ value: { ...Zs }
3531
3568
  }
3532
3569
  ];
3533
3570
  case o.CONTENTLINK:
@@ -3536,7 +3573,7 @@ function Js(t) {
3536
3573
  { propertyType: S.DESCRIPTION, value: "" },
3537
3574
  {
3538
3575
  propertyType: S.CONTENTTYPE,
3539
- value: { ...Xs }
3576
+ value: { ...eo }
3540
3577
  }
3541
3578
  ];
3542
3579
  default:
@@ -3551,7 +3588,7 @@ function h(t, e) {
3551
3588
  };
3552
3589
  return i.properties[0].value = e.label, i.properties[1].value = e.description, i;
3553
3590
  }
3554
- function hi(t) {
3591
+ function Ri(t) {
3555
3592
  const e = [];
3556
3593
  return Object.keys(t).forEach((i) => {
3557
3594
  e.push({
@@ -3560,7 +3597,7 @@ function hi(t) {
3560
3597
  });
3561
3598
  }), e;
3562
3599
  }
3563
- function Ks(t) {
3600
+ function io(t) {
3564
3601
  const e = {
3565
3602
  ...ee(o.ADDFILEATTACHMENT, !1),
3566
3603
  id: t.name,
@@ -3568,31 +3605,31 @@ function Ks(t) {
3568
3605
  };
3569
3606
  return e.properties[0].value = t.label, e;
3570
3607
  }
3571
- function Ys(t) {
3608
+ function ao(t) {
3572
3609
  const e = {
3573
3610
  ...ee(o.CODEHTML, !1),
3574
3611
  id: t.name
3575
3612
  }, i = t.properties.code;
3576
3613
  return typeof i == "object" && i?.html && typeof i.html == "string" ? e.properties[0].value = i.html : typeof i == "string" && (e.properties[0].value = i), e;
3577
3614
  }
3578
- function zs() {
3615
+ function ro() {
3579
3616
  return ee(o.IMAGE, !1);
3580
3617
  }
3581
- function Qs(t) {
3618
+ function no(t) {
3582
3619
  const e = h(o.NUMBER, t);
3583
3620
  return e.properties[2].value = t.widget.params?.step === "0.01", e;
3584
3621
  }
3585
- function Zs(t) {
3622
+ function so(t) {
3586
3623
  const e = h(o.TAGS, t);
3587
3624
  return e.properties[2].value.id = +(t.widget.params?.idTaxonomy ?? 1), e;
3588
3625
  }
3589
- function eo(t) {
3626
+ function oo(t) {
3590
3627
  const e = h(o.SELECT, t), i = t.widget.params?.defaultValue ? {
3591
3628
  title: t.widget.options[t.widget.params?.defaultValue],
3592
3629
  value: t.widget.params?.defaultValue
3593
3630
  } : void 0, a = {
3594
3631
  // TODO : better typing
3595
- propertyOptions: hi(t.widget.options),
3632
+ propertyOptions: Ri(t.widget.options),
3596
3633
  canSelectMultiple: t.widget.multiple === "1",
3597
3634
  userCanModifiyByComment: t.widget.params?.explain === "1",
3598
3635
  defaultSelectOption: !!t.widget.params?.defaultValue,
@@ -3600,57 +3637,57 @@ function eo(t) {
3600
3637
  };
3601
3638
  return e.properties[2].value = a, e;
3602
3639
  }
3603
- function Oi(t) {
3640
+ function Di(t) {
3604
3641
  const e = h(o.RADIO, t), i = {
3605
- propertyOptions: hi(t.widget.options)
3642
+ propertyOptions: Ri(t.widget.options)
3606
3643
  };
3607
3644
  return e.properties[2].value = i, e;
3608
3645
  }
3609
- function to(t) {
3610
- const e = Oi(t);
3646
+ function lo(t) {
3647
+ const e = Di(t);
3611
3648
  return e.type = o.CHECKBOX, e;
3612
3649
  }
3613
- function io(t, e) {
3650
+ function co(t, e) {
3614
3651
  const i = h(o.CONTENTLINK, t);
3615
3652
  i.properties[2].value.type = t.widget.params.types ?? "mpArticle";
3616
- const a = e.entities === void 0 ? void 0 : { entities: e.entities }, r = a ? Nr.selectors.selectById(a, i.properties[2].value.type) : void 0;
3653
+ const a = e.entities === void 0 ? void 0 : { entities: e.entities }, r = a ? qr.selectors.selectById(a, i.properties[2].value.type) : void 0;
3617
3654
  return i.properties[2].value.label = r?.label ?? "Article", i;
3618
3655
  }
3619
- function ao(t) {
3656
+ function uo(t) {
3620
3657
  return h(o.TEXT, t);
3621
3658
  }
3622
- function ro(t) {
3659
+ function po(t) {
3623
3660
  return h(o.DESCRIPTION, t);
3624
3661
  }
3625
- function no(t) {
3662
+ function go(t) {
3626
3663
  return h(o.TEXTAREAHTML, t);
3627
3664
  }
3628
- function so(t) {
3665
+ function fo(t) {
3629
3666
  return h(o.DATE, t);
3630
3667
  }
3631
- function oo(t) {
3668
+ function mo(t) {
3632
3669
  return h(o.DATETIME, t);
3633
3670
  }
3634
- function lo(t) {
3671
+ function yo(t) {
3635
3672
  return h(o.URL, t);
3636
3673
  }
3637
- function co(t) {
3674
+ function Ao(t) {
3638
3675
  return h(o.EMAIL, t);
3639
3676
  }
3640
- function uo(t) {
3677
+ function Eo(t) {
3641
3678
  return h(o.TOGGLE, t);
3642
3679
  }
3643
- function po(t) {
3680
+ function So(t) {
3644
3681
  return h(o.USERLINK, t);
3645
3682
  }
3646
- function go(t) {
3683
+ function To(t) {
3647
3684
  return h(o.TEXTAREA, t);
3648
3685
  }
3649
- function fo(t) {
3686
+ function Co(t) {
3650
3687
  const { manifest: e, views: i, audience: a, installFor: r } = t;
3651
3688
  return `<?xml version='1.0' encoding='utf-8'?>
3652
3689
  <Application>
3653
- ${mo(e, i, a, r, t.idApp)}
3690
+ ${bo(e, i, a, r, t.idApp)}
3654
3691
  <Types>
3655
3692
  <objecttype
3656
3693
  label="${e.typeLabel}"
@@ -3666,14 +3703,14 @@ function fo(t) {
3666
3703
  searchtablabel="${e.typeLabel}"
3667
3704
  buttonlabel="${e.typeLabel}"
3668
3705
  extends="article">
3669
- ${So(t.fields)}
3670
- ${To(t.fields)}
3706
+ ${vo(t.fields)}
3707
+ ${ho(t.fields)}
3671
3708
  </objecttype>
3672
- ${vo(t)}
3709
+ ${xo(t)}
3673
3710
  </Types>
3674
3711
  </Application>`;
3675
3712
  }
3676
- function mo(t, e, i, a, r) {
3713
+ function bo(t, e, i, a, r) {
3677
3714
  return `<Manifest>
3678
3715
  <ShowImport>true</ShowImport>
3679
3716
  <AppShortName>${r}</AppShortName>
@@ -3689,67 +3726,67 @@ function mo(t, e, i, a, r) {
3689
3726
  <Editor>Jamespot</Editor>
3690
3727
  <EditorUrl>https://www.fr.jamespot.com/</EditorUrl>
3691
3728
  <Type>${r}</Type>
3692
- ${yo(t.viewSolr, e.list)}
3693
- ${Ao(e.filter)}
3694
- ${Eo(i, a)}
3729
+ ${Lo(t.viewSolr, e.list)}
3730
+ ${wo(e.filter)}
3731
+ ${Io(i, a)}
3695
3732
  <Order>1</Order>
3696
3733
  </Manifest>`;
3697
3734
  }
3698
- function yo(t, e) {
3699
- if (t === rt.SOLR) {
3735
+ function Lo(t, e) {
3736
+ if (t === nt.SOLR) {
3700
3737
  let i = "<AppView>solr</AppView>";
3701
3738
  const a = [];
3702
3739
  return Object.entries(e).sort((r, n) => r[1].pos - n[1].pos).forEach(([r, n]) => {
3703
- n.isUsed && ([o.IMAGE].includes(n.type) || a.push(xt(n, r)));
3740
+ n.isUsed && ([o.IMAGE].includes(n.type) || a.push(_t(n, r)));
3704
3741
  }), i += `<AppColumns>${a.join()}</AppColumns>`, i;
3705
3742
  }
3706
3743
  return "";
3707
3744
  }
3708
- function Ao(t) {
3745
+ function wo(t) {
3709
3746
  const e = [];
3710
3747
  return Object.entries(t).sort((i, a) => i[1].pos - a[1].pos).forEach(([i, a]) => {
3711
3748
  if (!a.isUsed)
3712
3749
  return;
3713
- [u.TITLE, o.IMAGE].includes(a.type) || e.push(xt(a, i));
3750
+ [u.TITLE, o.IMAGE].includes(a.type) || e.push(_t(a, i));
3714
3751
  }), `<AttrExposed>${e.join()}</AttrExposed>`;
3715
3752
  }
3716
- function Ri(t) {
3753
+ function ki(t) {
3717
3754
  return t === u.TITLE ? "title" : t === u.SENDALERTTOSUBSCRIBERS ? "sendAlert" : t === u.RECEIVEACOPY ? "alertAuthor" : t === u.PUBLISHTO ? "publishTo" : t === u.USER ? "idUser" : t === u.CREATIONDATE ? "dateCreation" : t === o.DESCRIPTION ? "description" : t;
3718
3755
  }
3719
- function xt(t, e) {
3720
- return _s.includes(t.type) ? Ri(t.type) : jt(e).toLowerCase();
3756
+ function _t(t, e) {
3757
+ return $s.includes(t.type) ? ki(t.type) : Nt(e).toLowerCase();
3721
3758
  }
3722
- function Eo(t, e) {
3723
- return t === at.ALL ? "<checkAccess>false</checkAccess>" : e.length > 0 ? `<checkAccess>true</checkAccess>
3759
+ function Io(t, e) {
3760
+ return t === rt.ALL ? "<checkAccess>false</checkAccess>" : e.length > 0 ? `<checkAccess>true</checkAccess>
3724
3761
  <accessRightList>${e.map((i) => i.uri).join()}</accessRightList>` : "";
3725
3762
  }
3726
- function So(t) {
3727
- const e = t?.filter((i) => Li.includes(i.type));
3728
- return e.length === 0 ? "" : `<primaryFields>${e.map((i) => Lt(i)).join("")}</primaryFields>`;
3763
+ function vo(t) {
3764
+ const e = t?.filter((i) => hi.includes(i.type));
3765
+ return e.length === 0 ? "" : `<primaryFields>${e.map((i) => ht(i)).join("")}</primaryFields>`;
3729
3766
  }
3730
- function To(t) {
3731
- const i = t?.filter((n) => !Li.includes(n.type))?.filter((n) => n.type !== o.IMAGE);
3767
+ function ho(t) {
3768
+ const i = t?.filter((n) => !hi.includes(n.type))?.filter((n) => n.type !== o.IMAGE);
3732
3769
  if (i.length === 0) return "";
3733
3770
  const a = i.filter(
3734
- (n) => n.type !== o.TAGS && !Bs.includes(n.type)
3771
+ (n) => n.type !== o.TAGS && !Gs.includes(n.type)
3735
3772
  ), r = i.filter((n) => n.type === o.TAGS);
3736
3773
  return `<custom>
3737
3774
  ${a.length > 0 ? `<articlemstable>
3738
- ${a.map((n) => Lt(n)).join("")}
3775
+ ${a.map((n) => ht(n)).join("")}
3739
3776
  </articlemstable>` : ""}
3740
3777
  ${r.length > 0 ? `<linkstable tablename="tag_links" sqlNameColumn="name" sqlSrcIdColumn="srcId" sqlSrcTypeColumn="srcType" sqlTargetIdColumn="targetId" sqlTargetTypeColumn="targetType">
3741
- ${r.map((n) => Lt(n)).join("")}
3778
+ ${r.map((n) => ht(n)).join("")}
3742
3779
  </linkstable>` : ""}</custom>`;
3743
3780
  }
3744
- function Lt(t) {
3781
+ function ht(t) {
3745
3782
  return `<field
3746
- type="${Io(t.type)}"
3747
- name="${xt(t, t.id)}"
3748
- sqlname="${bo(t.type, t.id)}"
3749
- ${t.properties && ri(t.properties, S.LABEL)}
3750
- ${t.properties && ri(t.properties, S.DESCRIPTION)}
3783
+ type="${ko(t.type)}"
3784
+ name="${_t(t, t.id)}"
3785
+ sqlname="${Ro(t.type, t.id)}"
3786
+ ${t.properties && si(t.properties, S.LABEL)}
3787
+ ${t.properties && si(t.properties, S.DESCRIPTION)}
3751
3788
  mandatory="${t.type === o.TOGGLE ? "false" : t.mandatory}"
3752
- solr.type="${wo(t.type)}"
3789
+ solr.type="${Do(t.type)}"
3753
3790
  solr.used="true"
3754
3791
  solr.indexed="true"
3755
3792
  solr.stored="true"
@@ -3758,10 +3795,10 @@ function Lt(t) {
3758
3795
  teaser="true"
3759
3796
  display="true"
3760
3797
  >
3761
- ${Co(t.type, t.properties)}
3798
+ ${Oo(t.type, t.properties)}
3762
3799
  </field>`;
3763
3800
  }
3764
- function Co(t, e) {
3801
+ function Oo(t, e) {
3765
3802
  switch (t) {
3766
3803
  case o.DESCRIPTION:
3767
3804
  return '<widget form="textarea"><params><param key="class" value="mceEditor"></param><param key="mention" value="1"></param></params></widget>';
@@ -3877,7 +3914,7 @@ function Co(t, e) {
3877
3914
  return "";
3878
3915
  }
3879
3916
  }
3880
- function ri(t, e) {
3917
+ function si(t, e) {
3881
3918
  const i = t?.find((a) => a.propertyType === e);
3882
3919
  if (i) {
3883
3920
  const a = i.value.replaceAll('"', "&quot;");
@@ -3885,17 +3922,17 @@ function ri(t, e) {
3885
3922
  }
3886
3923
  return "";
3887
3924
  }
3888
- function bo(t, e) {
3925
+ function Ro(t, e) {
3889
3926
  switch (t) {
3890
3927
  case o.DESCRIPTION:
3891
3928
  return "Description";
3892
3929
  case u.USER:
3893
3930
  return "IdUser";
3894
3931
  default:
3895
- return jt(e);
3932
+ return Nt(e);
3896
3933
  }
3897
3934
  }
3898
- function wo(t) {
3935
+ function Do(t) {
3899
3936
  switch (t) {
3900
3937
  case o.DESCRIPTION:
3901
3938
  case o.TEXT:
@@ -3923,7 +3960,7 @@ function wo(t) {
3923
3960
  return "";
3924
3961
  }
3925
3962
  }
3926
- function Io(t) {
3963
+ function ko(t) {
3927
3964
  switch (t) {
3928
3965
  default:
3929
3966
  case o.DESCRIPTION:
@@ -3952,36 +3989,36 @@ function Io(t) {
3952
3989
  return "float";
3953
3990
  }
3954
3991
  }
3955
- const jt = (t) => {
3992
+ const Nt = (t) => {
3956
3993
  let e = "";
3957
3994
  for (let i = 0; i < t.length; i++) {
3958
3995
  const a = t.charAt(i);
3959
- a >= "0" && a <= "9" ? e += Lo(Number(a)) : a >= "a" && a <= "z" && (e += a);
3996
+ a >= "0" && a <= "9" ? e += Mo(Number(a)) : a >= "a" && a <= "z" && (e += a);
3960
3997
  }
3961
3998
  return e;
3962
- }, Lo = (t) => {
3999
+ }, Mo = (t) => {
3963
4000
  let e = "", i;
3964
4001
  for (; t > 0; )
3965
4002
  i = (t - 1) % 26, e = String.fromCharCode(97 + i) + e, t = (t - i) / 26 | 0;
3966
4003
  return e;
3967
- }, ni = {
4004
+ }, oi = {
3968
4005
  create: "create",
3969
4006
  popup: "create-popup",
3970
4007
  edit: "edit",
3971
4008
  view: "display"
3972
4009
  };
3973
- function vo(t) {
4010
+ function xo(t) {
3974
4011
  let e = "";
3975
4012
  return Object.entries(t.views).forEach(([i, a]) => {
3976
- if (Object.prototype.hasOwnProperty.call(ni, i)) {
4013
+ if (Object.prototype.hasOwnProperty.call(oi, i)) {
3977
4014
  const r = Object.entries(a).filter((n) => n[1].isUsed && (i !== "view" || n[0] !== "title")).sort((n, s) => n[1].pos - s[1].pos);
3978
- e += `<display view="${ni[i]}${i === "view" && t.manifest.displayContentLegacyTable ? "Disabled" : ""}" mode="${i === "view" ? "view" : "form"}">
3979
- ${r.map(([n, s]) => Oo(n, s)).join("")}
4015
+ e += `<display view="${oi[i]}${i === "view" && t.manifest.displayContentLegacyTable ? "Disabled" : ""}" mode="${i === "view" ? "view" : "form"}">
4016
+ ${r.map(([n, s]) => _o(n, s)).join("")}
3980
4017
  </display>`;
3981
4018
  }
3982
4019
  }), e.length > 0 && (e = `<displays type="${t.idApp}">${e}</displays>`), e;
3983
4020
  }
3984
- function ho(t, e) {
4021
+ function jo(t, e) {
3985
4022
  switch (e.type) {
3986
4023
  case u.TITLE:
3987
4024
  return "title";
@@ -3998,12 +4035,12 @@ function ho(t, e) {
3998
4035
  case o.DESCRIPTION:
3999
4036
  return "description";
4000
4037
  default:
4001
- return jt(t);
4038
+ return Nt(t);
4002
4039
  }
4003
4040
  }
4004
- function Oo(t, e) {
4041
+ function _o(t, e) {
4005
4042
  let i = "";
4006
- const a = ho(t, e);
4043
+ const a = jo(t, e);
4007
4044
  if (e.isLockedValue) {
4008
4045
  const n = {
4009
4046
  ref: a,
@@ -4028,17 +4065,17 @@ function Oo(t, e) {
4028
4065
  });
4029
4066
  else if (e.type === o.DATE) {
4030
4067
  const s = new Date(e.value), l = [
4031
- N(s.getDate()),
4032
- N(s.getMonth() + 1),
4068
+ _(s.getDate()),
4069
+ _(s.getMonth() + 1),
4033
4070
  s.getFullYear()
4034
4071
  ].join("/");
4035
4072
  i += '<input type="hidden" name="' + a + '" value="' + l + '">';
4036
4073
  } else if (e.type === o.DATETIME) {
4037
4074
  const s = new Date(e.value), l = `${[
4038
- N(s.getDate()),
4039
- N(s.getMonth() + 1),
4075
+ _(s.getDate()),
4076
+ _(s.getMonth() + 1),
4040
4077
  s.getFullYear()
4041
- ].join("/")} ${N(s.getHours())}:${N(s.getMinutes())}:${N(s.getSeconds())}`;
4078
+ ].join("/")} ${_(s.getHours())}:${_(s.getMinutes())}:${_(s.getSeconds())}`;
4042
4079
  i += '<input type="hidden" name="' + a + '" value="' + l + '">';
4043
4080
  } else e.type === o.TAGS ? i += `<input type="hidden" name="${a}" value="${e.value?.map((s) => s.uri)?.join(",")}">` : e.type === o.DESCRIPTION || e.type === o.TEXTAREAHTML ? i += `<input type="hidden" name="${a}" value="${e.value}">` : e.type === u.RECEIVEACOPY ? e.value && (i += '<input type="hidden" name="alertAuthor[jamespot]"><input type="hidden" ng-model="form.alertAuthor" name="alertAuthor[]" value="1">') : e.type === u.SENDALERTTOSUBSCRIBERS ? e.value && (i += '<input type="hidden" name="sendAlert[jamespot]"><input type="hidden" ng-model="form.sendAlert" name="sendAlert[]" value="1">') : i += `<input type="hidden" name="${a}" value="${e.value}">`;
4044
4081
  i += "]]></html>";
@@ -4069,10 +4106,10 @@ function Oo(t, e) {
4069
4106
  }
4070
4107
  return i;
4071
4108
  }
4072
- function N(t) {
4109
+ function _(t) {
4073
4110
  return t < 10 ? "0" + t : t;
4074
4111
  }
4075
- const Di = {
4112
+ const Mi = {
4076
4113
  "create-popup": "popup",
4077
4114
  create: "create",
4078
4115
  edit: "edit",
@@ -4080,99 +4117,99 @@ const Di = {
4080
4117
  displayDisabled: "view"
4081
4118
  // appInstalled.columns => 'list' view,
4082
4119
  // appInstalled.attrExposed => 'filter' view,
4083
- }, si = ["title", "alertAuthor", "sendAlert"], Ro = ["edito"];
4084
- function ki(t, e, i) {
4120
+ }, li = ["title", "alertAuthor", "sendAlert"], No = ["edito"];
4121
+ function xi(t, e, i) {
4085
4122
  return Object.assign(
4086
4123
  {},
4087
- ...Mt.map((a) => {
4124
+ ...jt.map((a) => {
4088
4125
  const r = {};
4089
4126
  let n = [];
4090
- q[a]?.optional !== void 0 && (n = n.concat(
4091
- q[a]?.optional ?? []
4127
+ $[a]?.optional !== void 0 && (n = n.concat(
4128
+ $[a]?.optional ?? []
4092
4129
  ));
4093
4130
  let s = [];
4094
- q[a]?.fixed !== void 0 && (s = s.concat(q[a]?.fixed ?? [])), Object.entries(t[a]).forEach(([m, f]) => {
4095
- f.isFixed && (r[m] = f, s.splice(
4131
+ $[a]?.fixed !== void 0 && (s = s.concat($[a]?.fixed ?? [])), Object.entries(t[a]).forEach(([y, f]) => {
4132
+ f.isFixed && (r[y] = f, s.splice(
4096
4133
  s.findIndex((c) => c === f.type),
4097
4134
  1
4098
- )), f.isOptional && (r[m] = f, n.splice(
4135
+ )), f.isOptional && (r[y] = f, n.splice(
4099
4136
  n.findIndex((c) => c === f.type),
4100
4137
  1
4101
4138
  ));
4102
4139
  });
4103
4140
  const l = new Set(s.concat(n)), d = {
4104
- [u.CREATIONDATE]: () => Ui(!1),
4105
- [u.TITLE]: () => st({ fixedValue: void 0 }),
4106
- [u.USER]: () => Pi(!1),
4107
- [u.RECEIVEACOPY]: () => ji({ fixedValue: void 0 }),
4108
- [u.SENDALERTTOSUBSCRIBERS]: () => Ni({ fixedValue: void 0 }),
4109
- [u.PUBLISHTO]: () => _i({ fixedValue: void 0 })
4141
+ [u.CREATIONDATE]: () => Bi(!1),
4142
+ [u.TITLE]: () => ot({ fixedValue: void 0 }),
4143
+ [u.USER]: () => Fi(!1),
4144
+ [u.RECEIVEACOPY]: () => Ni({ fixedValue: void 0 }),
4145
+ [u.SENDALERTTOSUBSCRIBERS]: () => Pi({ fixedValue: void 0 }),
4146
+ [u.PUBLISHTO]: () => Ui({ fixedValue: void 0 })
4110
4147
  };
4111
- l.forEach((m) => {
4112
- const f = d[m];
4148
+ l.forEach((y) => {
4149
+ const f = d[y];
4113
4150
  if (f) {
4114
4151
  const [c, E] = f();
4115
4152
  r[c] = E;
4116
4153
  } else
4117
- console.error("ExtraAppFieldsItemViews does not have this field type: " + m);
4154
+ console.error("ExtraAppFieldsItemViews does not have this field type: " + y);
4118
4155
  });
4119
4156
  const g = [];
4120
- return i.forEach((m, f) => {
4121
- const c = m.views[a], E = Object.keys(t[a]).includes(m.id), C = m.type;
4122
- if (nt.get(C) && nt.get(C)?.includes(a))
4157
+ return i.forEach((y, f) => {
4158
+ const c = y.views[a], E = Object.keys(t[a]).includes(y.id), C = y.type;
4159
+ if (st.get(C) && st.get(C)?.includes(a))
4123
4160
  return;
4124
- let w;
4161
+ let L;
4125
4162
  if (C === o.CODEHTML) {
4126
- const I = m.properties?.find(
4163
+ const w = y.properties?.find(
4127
4164
  (R) => R.propertyType === S.RICHTEXT
4128
4165
  );
4129
- I?.value && (w = I?.value);
4166
+ w?.value && (L = w?.value);
4130
4167
  }
4131
4168
  if (C === o.SELECT) {
4132
- const I = m.properties?.find(
4169
+ const w = y.properties?.find(
4133
4170
  (R) => R.propertyType === S.OPTIONS_EDITOR
4134
4171
  );
4135
4172
  if (E) {
4136
- const R = t[a][m.id], W = R.properties?.find(
4137
- (qi) => qi.propertyType === S.OPTIONS_EDITOR
4138
- ), ct = !!I?.value?.canSelectMultiple, $i = !!W?.value?.canSelectMultiple;
4139
- ct === $i && (w = R.value);
4173
+ const R = t[a][y.id], B = R.properties?.find(
4174
+ (Hi) => Hi.propertyType === S.OPTIONS_EDITOR
4175
+ ), ut = !!w?.value?.canSelectMultiple, Vi = !!B?.value?.canSelectMultiple;
4176
+ ut === Vi && (L = R.value);
4140
4177
  } else {
4141
- const W = !!I?.isOptionsEditorEnhanced && I?.value.defaultSelectOption ? I?.value.defaultSelectOptionValue : "";
4142
- W && (w = W);
4178
+ const B = !!w?.isOptionsEditorEnhanced && w?.value.defaultSelectOption ? w?.value.defaultSelectOptionValue : "";
4179
+ B && (L = B);
4143
4180
  }
4144
4181
  }
4145
4182
  if (E) {
4146
- const I = t[a][m.id];
4147
- r[m.id] = {
4148
- ...I,
4149
- properties: m.properties || I.properties || [],
4150
- ...w !== void 0 && { value: w },
4183
+ const w = t[a][y.id];
4184
+ r[y.id] = {
4185
+ ...w,
4186
+ properties: y.properties || w.properties || [],
4187
+ ...L !== void 0 && { value: L },
4151
4188
  isUsed: c,
4152
- pos: e?.[a] ? f : I.pos,
4153
- isLockedValue: (w !== void 0 || I.value !== void 0) && I.isLockedValue
4189
+ pos: e?.[a] ? f : w.pos,
4190
+ isLockedValue: (L !== void 0 || w.value !== void 0) && w.isLockedValue
4154
4191
  };
4155
4192
  } else {
4156
- g.push({ id: m.id, idx: f });
4157
- const I = Object.values(t[a]).filter(
4193
+ g.push({ id: y.id, idx: f });
4194
+ const w = Object.values(t[a]).filter(
4158
4195
  (R) => !R.isFixed && !R.isOptional
4159
4196
  ).length;
4160
- r[m.id] = {
4161
- type: m.type,
4162
- properties: m.properties || [],
4197
+ r[y.id] = {
4198
+ type: y.type,
4199
+ properties: y.properties || [],
4163
4200
  isUsed: c,
4164
4201
  isOptional: !1,
4165
4202
  isLockedValue: !1,
4166
4203
  isFixed: !1,
4167
- value: w ?? null,
4168
- pos: e?.[a] ? f : I + f
4204
+ value: L ?? null,
4205
+ pos: e?.[a] ? f : w + f
4169
4206
  };
4170
4207
  }
4171
- }), e?.[a] || g.forEach((m) => {
4172
- const f = r[m.id];
4173
- f.pos = m.idx + 1, Object.keys(r).forEach((c) => {
4208
+ }), e?.[a] || g.forEach((y) => {
4209
+ const f = r[y.id];
4210
+ f.pos = y.idx + 1, Object.keys(r).forEach((c) => {
4174
4211
  const E = r[c];
4175
- E && !Object.values(js).includes(c) && c !== m.id && E.pos >= f.pos && E.pos++;
4212
+ E && !Object.values(Ws).includes(c) && c !== y.id && E.pos >= f.pos && E.pos++;
4176
4213
  });
4177
4214
  }), {
4178
4215
  [a]: r
@@ -4180,7 +4217,7 @@ function ki(t, e, i) {
4180
4217
  })
4181
4218
  );
4182
4219
  }
4183
- function Do(t) {
4220
+ function Po(t) {
4184
4221
  return t.map((e) => ({
4185
4222
  id: `${e.type}/${e.id}`,
4186
4223
  uri: `${e.type}/${e.id}`,
@@ -4197,14 +4234,14 @@ function Do(t) {
4197
4234
  _url: e._url
4198
4235
  }));
4199
4236
  }
4200
- function ko(t, e, i) {
4237
+ function Uo(t, e, i) {
4201
4238
  const a = t.typeModel.tables, r = t.typeModel.displays;
4202
4239
  if (!r)
4203
4240
  return;
4204
4241
  const n = /* @__PURE__ */ new Map();
4205
4242
  Object.entries(r).forEach((s) => {
4206
4243
  const [l, d] = s;
4207
- Object.keys(Di).includes(l) && Mo(
4244
+ Object.keys(Mi).includes(l) && Fo(
4208
4245
  e,
4209
4246
  n,
4210
4247
  l,
@@ -4212,38 +4249,38 @@ function ko(t, e, i) {
4212
4249
  a,
4213
4250
  i
4214
4251
  );
4215
- }), xo(e, n, t.columns, a, i), jo(e, n, t.attrExposed, a, i);
4252
+ }), Bo(e, n, t.columns, a, i), Wo(e, n, t.attrExposed, a, i);
4216
4253
  }
4217
- function Mo(t, e, i, a, r, n) {
4218
- const s = Di[i];
4254
+ function Fo(t, e, i, a, r, n) {
4255
+ const s = Mi[i];
4219
4256
  if (t.views[s] = {}, s === "view") {
4220
- const [l, d] = st({ fixedValue: void 0 });
4257
+ const [l, d] = ot({ fixedValue: void 0 });
4221
4258
  t.views[s][l] = d;
4222
4259
  }
4223
4260
  a.composants.forEach((l, d) => {
4224
4261
  let g;
4225
- if (l.name && Ro.includes(l.name))
4262
+ if (l.name && No.includes(l.name))
4226
4263
  return;
4227
- const [m, f] = Po(t, e, l, r, n);
4228
- if (m === -1 && f)
4264
+ const [y, f] = Vo(t, e, l, r, n);
4265
+ if (y === -1 && f)
4229
4266
  switch (f.ref) {
4230
4267
  case "title":
4231
4268
  if (s === "view")
4232
4269
  break;
4233
- const [c, E] = st(f);
4270
+ const [c, E] = ot(f);
4234
4271
  t.views[s][c] = E;
4235
4272
  break;
4236
4273
  case "alertAuthor":
4237
- const [C, w] = ji(f);
4238
- t.views[s][C] = w;
4274
+ const [C, L] = Ni(f);
4275
+ t.views[s][C] = L;
4239
4276
  break;
4240
4277
  case "sendAlert":
4241
- const [I, R] = Ni(f);
4242
- t.views[s][I] = R;
4278
+ const [w, R] = Pi(f);
4279
+ t.views[s][w] = R;
4243
4280
  break;
4244
4281
  case "publishTo":
4245
- const [W, ct] = _i(f);
4246
- t.views[s][W] = ct;
4282
+ const [B, ut] = Ui(f);
4283
+ t.views[s][B] = ut;
4247
4284
  break;
4248
4285
  /* istanbul ignore next */
4249
4286
  /* can't generate a ref going here with createOrGetField */
@@ -4251,67 +4288,67 @@ function Mo(t, e, i, a, r, n) {
4251
4288
  console.error("fixed field info with unsupported ref ", f);
4252
4289
  break;
4253
4290
  }
4254
- else if (m !== -1) {
4255
- if (g = t.fields[m], !g || !g.views)
4291
+ else if (y !== -1) {
4292
+ if (g = t.fields[y], !g || !g.views)
4256
4293
  throw new Error(
4257
- `error converting installed app to V2: created field not found in fields array: ${m}, ${f}`
4294
+ `error converting installed app to V2: created field not found in fields array: ${y}, ${f}`
4258
4295
  );
4259
- g.views[s] = !0, xi(s, g, t, d, f);
4296
+ g.views[s] = !0, _i(s, g, t, d, f);
4260
4297
  }
4261
4298
  });
4262
4299
  }
4263
- function xo(t, e, i, a, r) {
4300
+ function Bo(t, e, i, a, r) {
4264
4301
  i && Object.keys(i).forEach((n, s) => {
4265
- Mi(t, e, a, "list", n, s, r);
4302
+ ji(t, e, a, "list", n, s, r);
4266
4303
  });
4267
4304
  }
4268
- function jo(t, e, i, a, r) {
4305
+ function Wo(t, e, i, a, r) {
4269
4306
  i.forEach((n, s) => {
4270
- Mi(t, e, a, "filter", n, s, r);
4307
+ ji(t, e, a, "filter", n, s, r);
4271
4308
  });
4272
4309
  }
4273
- function Mi(t, e, i, a, r, n, s) {
4310
+ function ji(t, e, i, a, r, n, s) {
4274
4311
  switch (r) {
4275
4312
  case "title":
4276
- const [l, d] = st({ fixedValue: void 0 });
4313
+ const [l, d] = ot({ fixedValue: void 0 });
4277
4314
  t.views[a][l] = d;
4278
4315
  break;
4279
4316
  case "iduser":
4280
4317
  case "idUser":
4281
- const [g, m] = Pi();
4282
- t.views[a][g] = m;
4318
+ const [g, y] = Fi();
4319
+ t.views[a][g] = y;
4283
4320
  break;
4284
4321
  case "datecreation":
4285
4322
  case "dateCreation":
4286
- const [f, c] = Ui();
4323
+ const [f, c] = Bi();
4287
4324
  t.views[a][f] = c;
4288
4325
  break;
4289
4326
  default:
4290
- No(t, e, i, a, r, n, s);
4327
+ qo(t, e, i, a, r, n, s);
4291
4328
  break;
4292
4329
  }
4293
4330
  }
4294
- function No(t, e, i, a, r, n, s) {
4295
- const l = _o(t, e, i, r, s), d = t.fields[l];
4331
+ function qo(t, e, i, a, r, n, s) {
4332
+ const l = $o(t, e, i, r, s), d = t.fields[l];
4296
4333
  if (!d || !d.views)
4297
4334
  throw new Error(`error converting installed app to V2: unable to handle ${r} in list view`);
4298
- d.views[a] = !0, xi(a, d, t, n, void 0);
4335
+ d.views[a] = !0, _i(a, d, t, n, void 0);
4299
4336
  }
4300
- function _o(t, e, i, a, r) {
4337
+ function $o(t, e, i, a, r) {
4301
4338
  const n = e.get(a);
4302
4339
  if (n !== void 0)
4303
4340
  return n;
4304
- const [s, l] = vt(t, a, i, r);
4341
+ const [s, l] = Ot(t, a, i, r);
4305
4342
  return e.set(s, l), l;
4306
4343
  }
4307
- function Po(t, e, i, a, r) {
4344
+ function Vo(t, e, i, a, r) {
4308
4345
  if (i.name !== void 0 && i.element === "attr") {
4309
- if (si.includes(i.name))
4346
+ if (li.includes(i.name))
4310
4347
  return [-1, { ref: i.name, fixedValue: void 0 }];
4311
4348
  const n = e.get(i.name);
4312
4349
  if (n !== void 0)
4313
4350
  return [n, void 0];
4314
- const [s, l] = vt(t, i.name, a, r);
4351
+ const [s, l] = Ot(t, i.name, a, r);
4315
4352
  return e.set(s, l), [l, void 0];
4316
4353
  } else if (i.element === "html") {
4317
4354
  const n = i.html;
@@ -4323,24 +4360,24 @@ function Po(t, e, i, a, r) {
4323
4360
  const g = JSON.parse(d);
4324
4361
  if (g?.ref.toUpperCase() in u) {
4325
4362
  const E = g.ref.toUpperCase();
4326
- return [-1, { ...g, ref: Ri(E) }];
4363
+ return [-1, { ...g, ref: ki(E) }];
4327
4364
  }
4328
- if (si.includes(g?.ref))
4365
+ if (li.includes(g?.ref))
4329
4366
  return [-1, g];
4330
- const m = e.get(g?.ref);
4331
- if (m !== void 0)
4332
- return [m, g];
4333
- const [f, c] = vt(t, g.ref, a, r);
4367
+ const y = e.get(g?.ref);
4368
+ if (y !== void 0)
4369
+ return [y, g];
4370
+ const [f, c] = Ot(t, g.ref, a, r);
4334
4371
  return e.set(f, c), [c, g];
4335
4372
  } catch {
4336
4373
  return console.error("error while parsing studio installed fixed attr in a view: json parsing failed"), [-1, void 0];
4337
4374
  }
4338
4375
  } else if (n.includes("<JAMESPOT.STUDIO.CODEHTML>"))
4339
4376
  try {
4340
- const s = n.indexOf("<JAMESPOT.STUDIO.CODEHTML>") + 26, l = n.indexOf("</JAMESPOT.STUDIO.CODEHTML>"), d = n.substring(s, l), g = JSON.parse(d), m = e.get(g?.name);
4341
- if (m !== void 0)
4342
- return [m, void 0];
4343
- const f = Ys(g), c = t.fields.push(f) - 1;
4377
+ const s = n.indexOf("<JAMESPOT.STUDIO.CODEHTML>") + 26, l = n.indexOf("</JAMESPOT.STUDIO.CODEHTML>"), d = n.substring(s, l), g = JSON.parse(d), y = e.get(g?.name);
4378
+ if (y !== void 0)
4379
+ return [y, void 0];
4380
+ const f = ao(g), c = t.fields.push(f) - 1;
4344
4381
  return e.set(f.id, c), [c, void 0];
4345
4382
  } catch {
4346
4383
  return console.error("error while parsing studio installed codehtml attr in a view: json parsing failed"), [-1, void 0];
@@ -4351,53 +4388,53 @@ function Po(t, e, i, a, r) {
4351
4388
  const n = e.get("image");
4352
4389
  if (n !== void 0)
4353
4390
  return [n, void 0];
4354
- const s = zs(), l = t.fields.push(s) - 1;
4391
+ const s = ro(), l = t.fields.push(s) - 1;
4355
4392
  return e.set("image", l), [l, void 0];
4356
4393
  } else return i.element === "publishTo" ? [-1, { ref: "publishTo", fixedValue: void 0 }] : (console.error("error while parsing studio installed attr in a view: unknown attr :O"), [-1, void 0]);
4357
4394
  }
4358
- function vt(t, e, i, a) {
4359
- const r = Uo(e, i), n = Bo(r), s = (function() {
4395
+ function Ot(t, e, i, a) {
4396
+ const r = Ho(e, i), n = Go(r), s = (function() {
4360
4397
  switch (n) {
4361
4398
  case o.ADDFILEATTACHMENT:
4362
- return Ks(r);
4399
+ return io(r);
4363
4400
  case o.NUMBER:
4364
- return Qs(r);
4401
+ return no(r);
4365
4402
  case o.TAGS:
4366
- return Zs(r);
4403
+ return so(r);
4367
4404
  case o.SELECT:
4368
- return eo(r);
4405
+ return oo(r);
4369
4406
  case o.RADIO:
4370
- return Oi(r);
4407
+ return Di(r);
4371
4408
  case o.CHECKBOX:
4372
- return to(r);
4409
+ return lo(r);
4373
4410
  case o.CONTENTLINK:
4374
- return io(r, a);
4411
+ return co(r, a);
4375
4412
  case o.DESCRIPTION:
4376
- return ro(r);
4413
+ return po(r);
4377
4414
  case o.TEXTAREAHTML:
4378
- return no(r);
4415
+ return go(r);
4379
4416
  case o.DATE:
4380
- return so(r);
4417
+ return fo(r);
4381
4418
  case o.DATETIME:
4382
- return oo(r);
4419
+ return mo(r);
4383
4420
  case o.URL:
4384
- return lo(r);
4421
+ return yo(r);
4385
4422
  case o.EMAIL:
4386
- return co(r);
4423
+ return Ao(r);
4387
4424
  case o.TOGGLE:
4388
- return uo(r);
4425
+ return Eo(r);
4389
4426
  case o.USERLINK:
4390
- return po(r);
4427
+ return So(r);
4391
4428
  case o.TEXTAREA:
4392
- return go(r);
4429
+ return To(r);
4393
4430
  case o.TEXT:
4394
4431
  default:
4395
- return ao(r);
4432
+ return uo(r);
4396
4433
  }
4397
4434
  })(), l = t.fields.push(s) - 1;
4398
4435
  return [e, l];
4399
4436
  }
4400
- function Uo(t, e) {
4437
+ function Ho(t, e) {
4401
4438
  let i;
4402
4439
  for (let a = 0; a < e.length && !i; a++)
4403
4440
  i = e[a]?.attributes.find((r) => r.name === t);
@@ -4405,7 +4442,7 @@ function Uo(t, e) {
4405
4442
  throw new Error("error converting installed app to V2: installed field not found in tables " + t);
4406
4443
  return i;
4407
4444
  }
4408
- function xi(t, e, i, a, r) {
4445
+ function _i(t, e, i, a, r) {
4409
4446
  e.views && (e.views[t] = !0, i.views[t][e.id] = {
4410
4447
  type: e.type,
4411
4448
  properties: e.properties || [],
@@ -4417,7 +4454,7 @@ function xi(t, e, i, a, r) {
4417
4454
  pos: a
4418
4455
  });
4419
4456
  }
4420
- function Bo(t) {
4457
+ function Go(t) {
4421
4458
  switch (t.widget.type) {
4422
4459
  case "number":
4423
4460
  return o.NUMBER;
@@ -4458,7 +4495,7 @@ function Bo(t) {
4458
4495
  "error converting installed app to V2: installed field type not recognized for field " + t.name + ":" + JSON.stringify(t)
4459
4496
  );
4460
4497
  }
4461
- function st(t, e = !0) {
4498
+ function ot(t, e = !0) {
4462
4499
  return [
4463
4500
  "title",
4464
4501
  {
@@ -4473,7 +4510,7 @@ function st(t, e = !0) {
4473
4510
  }
4474
4511
  ];
4475
4512
  }
4476
- function ji(t, e = !0) {
4513
+ function Ni(t, e = !0) {
4477
4514
  return [
4478
4515
  "alertAuthor",
4479
4516
  {
@@ -4488,7 +4525,7 @@ function ji(t, e = !0) {
4488
4525
  }
4489
4526
  ];
4490
4527
  }
4491
- function Ni(t, e = !0) {
4528
+ function Pi(t, e = !0) {
4492
4529
  return [
4493
4530
  "sendAlert",
4494
4531
  {
@@ -4503,7 +4540,7 @@ function Ni(t, e = !0) {
4503
4540
  }
4504
4541
  ];
4505
4542
  }
4506
- function _i(t, e = !0) {
4543
+ function Ui(t, e = !0) {
4507
4544
  return [
4508
4545
  "publishTo",
4509
4546
  {
@@ -4518,7 +4555,7 @@ function _i(t, e = !0) {
4518
4555
  }
4519
4556
  ];
4520
4557
  }
4521
- function Pi(t = !0) {
4558
+ function Fi(t = !0) {
4522
4559
  return [
4523
4560
  "user",
4524
4561
  {
@@ -4533,7 +4570,7 @@ function Pi(t = !0) {
4533
4570
  }
4534
4571
  ];
4535
4572
  }
4536
- function Ui(t = !0) {
4573
+ function Bi(t = !0) {
4537
4574
  return [
4538
4575
  "dateCreation",
4539
4576
  {
@@ -4548,15 +4585,15 @@ function Ui(t = !0) {
4548
4585
  }
4549
4586
  ];
4550
4587
  }
4551
- function Wo(t, e, i) {
4588
+ function Xo(t, e, i) {
4552
4589
  const { version: a, dateCreation: r } = t.manifest, n = t.typeModel, s = Object.assign(
4553
4590
  {},
4554
- ...Mt.map((f) => ({
4591
+ ...jt.map((f) => ({
4555
4592
  [f]: {}
4556
4593
  }))
4557
4594
  ), l = t, d = {
4558
4595
  idApp: t.idApp,
4559
- status: ht(t),
4596
+ status: Rt(t),
4560
4597
  studioVersion: 2,
4561
4598
  manifest: {
4562
4599
  appShortName: t.label,
@@ -4570,7 +4607,7 @@ function Wo(t, e, i) {
4570
4607
  checkAccess: !1,
4571
4608
  accessRightList: "",
4572
4609
  attrExposed: [],
4573
- viewSolr: t.view ? rt.SOLR : rt.NOT_SOLR,
4610
+ viewSolr: t.view ? nt.SOLR : nt.NOT_SOLR,
4574
4611
  typeLabel: n.typeLabel,
4575
4612
  articlesCount: t.articlesCount ?? 0,
4576
4613
  displayContentLegacyTable: !!l?.typeModel?.displays?.displayDisabled
@@ -4578,64 +4615,64 @@ function Wo(t, e, i) {
4578
4615
  fields: [],
4579
4616
  views: s,
4580
4617
  // TODO: weird cast
4581
- installFor: t.accessRightObjectList ? Do(t.accessRightObjectList) : [],
4582
- audience: t.checkAccess === !1 ? at.ALL : at.CUSTOM
4618
+ installFor: t.accessRightObjectList ? Po(t.accessRightObjectList) : [],
4619
+ audience: t.checkAccess === !1 ? rt.ALL : rt.CUSTOM
4583
4620
  };
4584
- ko(t, d, i), d.views = ki(d.views, d.syncViewFieldOrder, d.fields);
4585
- const g = Fo(t.idApp, e);
4621
+ Uo(t, d, i), d.views = xi(d.views, d.syncViewFieldOrder, d.fields);
4622
+ const g = Jo(t.idApp, e);
4586
4623
  if (!g) return d;
4587
- const m = Bi(g);
4588
- return m && (d.inWorkVersion = m), d;
4624
+ const y = Wi(g);
4625
+ return y && (d.inWorkVersion = y), d;
4589
4626
  }
4590
- function Bi(t) {
4627
+ function Wi(t) {
4591
4628
  if (!t.value) return;
4592
4629
  const e = JSON.parse(t.value);
4593
4630
  return e.studioVersion == 2 ? {
4594
4631
  idApp: t.idApp,
4595
4632
  studioVersion: 2,
4596
- status: ht(t),
4633
+ status: Rt(t),
4597
4634
  manifest: e.manifest,
4598
4635
  fields: e.fields,
4599
4636
  views: e.views,
4600
4637
  syncViewFieldOrder: e.syncViewFieldOrder,
4601
4638
  audience: e.audience,
4602
4639
  installFor: e.installFor
4603
- } : { ...vi(e), status: ht(t), migratedFrom: 1 };
4640
+ } : { ...Oi(e), status: Rt(t), migratedFrom: 1 };
4604
4641
  }
4605
- function ht(t) {
4606
- return t.status === dt.installed ? t.suspended ? H.suspended : H.installed : H.draft;
4642
+ function Rt(t) {
4643
+ return t.status === ct.installed ? t.suspended ? H.suspended : H.installed : H.draft;
4607
4644
  }
4608
- function Fo(t, e) {
4609
- return e.find((a) => a.idApp === t && a.status === dt.saved);
4645
+ function Jo(t, e) {
4646
+ return e.find((a) => a.idApp === t && a.status === ct.saved);
4610
4647
  }
4611
- function $o(t, e) {
4612
- return !!e.find((i) => i.idApp === t && i.status === dt.installed);
4648
+ function Ko(t, e) {
4649
+ return !!e.find((i) => i.idApp === t && i.status === ct.installed);
4613
4650
  }
4614
- function Wi(t, e) {
4651
+ function qi(t, e) {
4615
4652
  return t.map((a) => {
4616
4653
  try {
4617
- return a.status === dt.installed ? Wo(a, t, e) : $o(a.idApp, t) ? void 0 : Bi(a);
4654
+ return a.status === ct.installed ? Xo(a, t, e) : Ko(a.idApp, t) ? void 0 : Wi(a);
4618
4655
  } catch (r) {
4619
4656
  console.error(r);
4620
4657
  return;
4621
4658
  }
4622
4659
  }).filter((a) => a !== void 0);
4623
4660
  }
4624
- const qo = {
4661
+ const Yo = {
4625
4662
  currentStudioApp: null,
4626
4663
  fetchCurrentStudioAppStatus: "idle",
4627
4664
  saveCurrentStudioAppStatus: "idle",
4628
4665
  installStudioAppStatus: "idle",
4629
4666
  hasChanged: !1
4630
- }, Ve = p("studio/fetchCurrentStudioApp", async ({ idApp: t, status: e }, { extra: i, rejectWithValue: a, getState: r }) => {
4667
+ }, He = p("studio/fetchCurrentStudioApp", async ({ idApp: t, status: e }, { extra: i, rejectWithValue: a, getState: r }) => {
4631
4668
  const n = i.jApi, s = { error: 1, errorMsg: "Error fetching application" };
4632
4669
  try {
4633
- const l = (await n.application.studioGet(t, e)).result, d = Wi([l], r())[0];
4670
+ const l = (await n.application.studioGet(t, e)).result, d = qi([l], r())[0];
4634
4671
  return d || a(s);
4635
4672
  } catch {
4636
4673
  return a(s);
4637
4674
  }
4638
- }), He = p(
4675
+ }), Ge = p(
4639
4676
  "studio/saveCurrentStudioApp",
4640
4677
  async (t, { extra: e, rejectWithValue: i, getState: a, dispatch: r }) => {
4641
4678
  const n = e.jApi, s = { error: 1, errorMsg: "Error saving application" }, l = a().studio.currentStudioApp.currentStudioApp;
@@ -4643,26 +4680,26 @@ const qo = {
4643
4680
  return i(s);
4644
4681
  const d = JSON.stringify(l);
4645
4682
  try {
4646
- await n.application.studioSave(l.idApp, d, "saved"), r(y.actions.success({ label: "APPSTUDIO_AppItem_Edition_Saved" }));
4683
+ await n.application.studioSave(l.idApp, d, "saved"), r(m.actions.success({ label: "APPSTUDIO_AppItem_Edition_Saved" }));
4647
4684
  return;
4648
4685
  } catch (g) {
4649
- return r(y.actions.error({ label: A(g) })), i(s);
4686
+ return r(m.actions.error({ label: A(g) })), i(s);
4650
4687
  }
4651
4688
  }
4652
- ), Ge = p("studio/installApp", async ({ callback: t }, { extra: e, rejectWithValue: i, getState: a, dispatch: r }) => {
4689
+ ), Xe = p("studio/installApp", async ({ callback: t }, { extra: e, rejectWithValue: i, getState: a, dispatch: r }) => {
4653
4690
  const n = e.jApi, s = { error: 1, errorMsg: "Error saving application" }, l = a().studio.currentStudioApp.currentStudioApp;
4654
4691
  if (!l)
4655
4692
  return i(s);
4656
- const d = fo(l);
4693
+ const d = Co(l);
4657
4694
  try {
4658
- await n.application.studioInstall(d), r(y.actions.success({ label: "APPSTUDIO_AppItem_Installed" })), t && t();
4695
+ await n.application.studioInstall(d), r(m.actions.success({ label: "APPSTUDIO_AppItem_Installed" })), t && t();
4659
4696
  return;
4660
4697
  } catch (g) {
4661
- return r(y.actions.error({ label: A(g) })), i(s);
4698
+ return r(m.actions.error({ label: A(g) })), i(s);
4662
4699
  }
4663
- }), ot = T({
4700
+ }), lt = T({
4664
4701
  name: "currentStudioApp",
4665
- initialState: qo,
4702
+ initialState: Yo,
4666
4703
  reducers: {
4667
4704
  setCurrentApp: (t, e) => {
4668
4705
  t.currentStudioApp = e.payload;
@@ -4675,29 +4712,29 @@ const qo = {
4675
4712
  }
4676
4713
  },
4677
4714
  extraReducers: (t) => {
4678
- t.addCase(Ve.pending, (e) => {
4715
+ t.addCase(He.pending, (e) => {
4679
4716
  e.fetchCurrentStudioAppStatus === "idle" && (e.fetchCurrentStudioAppStatus = "pending");
4680
- }).addCase(Ve.fulfilled, (e, i) => {
4717
+ }).addCase(He.fulfilled, (e, i) => {
4681
4718
  e.fetchCurrentStudioAppStatus === "pending" && (e.fetchCurrentStudioAppStatus = "idle"), e.currentStudioApp = i.payload;
4682
- }).addCase(Ve.rejected, (e) => {
4719
+ }).addCase(He.rejected, (e) => {
4683
4720
  e.fetchCurrentStudioAppStatus === "pending" && (e.fetchCurrentStudioAppStatus = "idle");
4684
- }).addCase(He.pending, (e) => {
4721
+ }).addCase(Ge.pending, (e) => {
4685
4722
  e.saveCurrentStudioAppStatus === "idle" && (e.saveCurrentStudioAppStatus = "pending");
4686
- }).addCase(He.fulfilled, (e) => {
4723
+ }).addCase(Ge.fulfilled, (e) => {
4687
4724
  e.saveCurrentStudioAppStatus === "pending" && (e.saveCurrentStudioAppStatus = "idle");
4688
- }).addCase(He.rejected, (e) => {
4725
+ }).addCase(Ge.rejected, (e) => {
4689
4726
  e.saveCurrentStudioAppStatus === "pending" && (e.saveCurrentStudioAppStatus = "idle");
4690
- }).addCase(Ge.pending, (e) => {
4727
+ }).addCase(Xe.pending, (e) => {
4691
4728
  e.installStudioAppStatus === "idle" && (e.installStudioAppStatus = "pending");
4692
- }).addCase(Ge.fulfilled, (e) => {
4729
+ }).addCase(Xe.fulfilled, (e) => {
4693
4730
  e.installStudioAppStatus === "pending" && (e.installStudioAppStatus = "idle");
4694
- }).addCase(Ge.rejected, (e) => {
4731
+ }).addCase(Xe.rejected, (e) => {
4695
4732
  e.installStudioAppStatus === "pending" && (e.installStudioAppStatus = "idle");
4696
4733
  });
4697
4734
  }
4698
4735
  });
4699
- function Fi(t, e, i) {
4700
- const a = t.studioVersion !== 2 ? JSON.parse(JSON.stringify(vi(t))) : JSON.parse(JSON.stringify(t));
4736
+ function $i(t, e, i) {
4737
+ const a = t.studioVersion !== 2 ? JSON.parse(JSON.stringify(Oi(t))) : JSON.parse(JSON.stringify(t));
4701
4738
  if (delete a.inWorkVersion, i)
4702
4739
  a.manifest.version = a.manifest.version + 0.1;
4703
4740
  else {
@@ -4714,12 +4751,12 @@ function Fi(t, e, i) {
4714
4751
  }
4715
4752
  return [a, a.idApp];
4716
4753
  }
4717
- function Vo({ author: t, appName: e }) {
4754
+ function Qo({ author: t, appName: e }) {
4718
4755
  const i = M(), a = Object.assign(
4719
4756
  {},
4720
- ...Mt.map((r) => {
4757
+ ...jt.map((r) => {
4721
4758
  const n = {};
4722
- return q[r]?.fixed.forEach((s, l) => {
4759
+ return $[r]?.fixed.forEach((s, l) => {
4723
4760
  n[M()] = {
4724
4761
  type: s,
4725
4762
  properties: [],
@@ -4730,7 +4767,7 @@ function Vo({ author: t, appName: e }) {
4730
4767
  value: null,
4731
4768
  pos: l
4732
4769
  };
4733
- }), q[r]?.optional.forEach((s, l) => {
4770
+ }), $[r]?.optional.forEach((s, l) => {
4734
4771
  n[M()] = {
4735
4772
  type: s,
4736
4773
  properties: [],
@@ -4766,7 +4803,7 @@ function Vo({ author: t, appName: e }) {
4766
4803
  },
4767
4804
  version: 0.1,
4768
4805
  dateCreation: (/* @__PURE__ */ new Date()).toISOString(),
4769
- viewSolr: rt.SOLR,
4806
+ viewSolr: nt.SOLR,
4770
4807
  checkAccess: !1,
4771
4808
  accessRightList: "",
4772
4809
  attrExposed: [],
@@ -4782,7 +4819,7 @@ function Vo({ author: t, appName: e }) {
4782
4819
  },
4783
4820
  fields: [],
4784
4821
  views: a,
4785
- audience: at.CUSTOM,
4822
+ audience: rt.CUSTOM,
4786
4823
  installFor: []
4787
4824
  }
4788
4825
  };
@@ -4790,7 +4827,7 @@ function Vo({ author: t, appName: e }) {
4790
4827
  function re(t, e) {
4791
4828
  return t.manifest.appName > e.manifest.appName ? 1 : -1;
4792
4829
  }
4793
- const Ho = {
4830
+ const zo = {
4794
4831
  loadingStudioAppsList: "idle",
4795
4832
  deleteStudioAppStatus: "idle",
4796
4833
  suspendStudioAppStatus: "idle",
@@ -4798,7 +4835,7 @@ const Ho = {
4798
4835
  cloneStudioAppStatus: "idle",
4799
4836
  createInWorkAppStatus: "idle",
4800
4837
  createNewStudioAppStatus: "idle"
4801
- }, Xe = p("studio/appsList", async (t, { extra: e, rejectWithValue: i, dispatch: a, getState: r }) => {
4838
+ }, Je = p("studio/appsList", async (t, { extra: e, rejectWithValue: i, dispatch: a, getState: r }) => {
4802
4839
  const n = e.jApi;
4803
4840
  try {
4804
4841
  const { result: s } = await n.application.studioList(), l = await n.taxonomy.list(), g = (await Promise.allSettled(
@@ -4806,15 +4843,15 @@ const Ho = {
4806
4843
  const c = (await n.application.studioGet(f.idApp, f.status)).result, E = (await n.article.count(f.idApp)).result;
4807
4844
  return { ...c, articlesCount: E };
4808
4845
  })
4809
- )).map((f) => f.status === "fulfilled" ? f.value : null).reduce((f, c) => c !== null ? f.concat([c]) : f, []), m = Wi(g, r());
4810
- return m.forEach(async (f) => {
4811
- f.fields = oi(f.fields, l, t), f.inWorkVersion && (f.inWorkVersion.fields = oi(f.inWorkVersion.fields, l, t));
4812
- }), m;
4846
+ )).map((f) => f.status === "fulfilled" ? f.value : null).reduce((f, c) => c !== null ? f.concat([c]) : f, []), y = qi(g, r());
4847
+ return y.forEach(async (f) => {
4848
+ f.fields = di(f.fields, l, t), f.inWorkVersion && (f.inWorkVersion.fields = di(f.inWorkVersion.fields, l, t));
4849
+ }), y;
4813
4850
  } catch (s) {
4814
- throw console.error(s), a(y.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Error retrieving applications" });
4851
+ throw console.error(s), a(m.actions.error({ label: A(s) })), i({ error: 1, errorMsg: "Error retrieving applications" });
4815
4852
  }
4816
4853
  });
4817
- function oi(t, e, i) {
4854
+ function di(t, e, i) {
4818
4855
  return t.map((a) => {
4819
4856
  if (a.type !== o.TAGS)
4820
4857
  return a;
@@ -4822,29 +4859,29 @@ function oi(t, e, i) {
4822
4859
  return s && n && (n.value.title = i.formatMessage({ id: s.title }), n.value.type = s.type), r;
4823
4860
  });
4824
4861
  }
4825
- const Je = p("studio/createApp", async ({ appName: t, callback: e }, { extra: i, dispatch: a, rejectWithValue: r, getState: n }) => {
4826
- const s = i.jApi, l = n().userCurrent?.uri, { newAppId: d, newStudioApp: g } = Vo({ appName: t, ...l && { author: l } });
4862
+ const Ke = p("studio/createApp", async ({ appName: t, callback: e }, { extra: i, dispatch: a, rejectWithValue: r, getState: n }) => {
4863
+ const s = i.jApi, l = n().userCurrent?.uri, { newAppId: d, newStudioApp: g } = Qo({ appName: t, ...l && { author: l } });
4827
4864
  try {
4828
- return await s.application.studioSave(d, JSON.stringify(g), "saved"), a(y.actions.success({ label: "APPSTUDIO_StudioApp_Created" })), a(ot.actions.setCurrentApp(g)), e && e(), g;
4829
- } catch (m) {
4830
- throw a(y.actions.error({ label: A(m) })), r({ error: 1, errorMsg: "Error creating application" });
4865
+ return await s.application.studioSave(d, JSON.stringify(g), "saved"), a(m.actions.success({ label: "APPSTUDIO_StudioApp_Created" })), a(lt.actions.setCurrentApp(g)), e && e(), g;
4866
+ } catch (y) {
4867
+ throw a(m.actions.error({ label: A(y) })), r({ error: 1, errorMsg: "Error creating application" });
4831
4868
  }
4832
- }), Ke = p("studio/deleteApp", async ({ idApp: t, status: e }, { extra: i, rejectWithValue: a, dispatch: r }) => {
4869
+ }), Ye = p("studio/deleteApp", async ({ idApp: t, status: e }, { extra: i, rejectWithValue: a, dispatch: r }) => {
4833
4870
  const n = i.jApi;
4834
4871
  try {
4835
4872
  const s = await n.application.studioDelete(t, e);
4836
- return r(y.actions.success({ label: "APPSTUDIO_StudioApp_Deleted" })), s;
4873
+ return r(m.actions.success({ label: "APPSTUDIO_StudioApp_Deleted" })), s;
4837
4874
  } catch (s) {
4838
- return r(y.actions.error({ label: A(s) })), a({ error: 1, errorMsg: "Error deleting application" });
4875
+ return r(m.actions.error({ label: A(s) })), a({ error: 1, errorMsg: "Error deleting application" });
4839
4876
  }
4840
- }), Ye = p(
4877
+ }), Qe = p(
4841
4878
  "studio/suspendStudioApp",
4842
4879
  async ({ idApp: t }, { extra: e, rejectWithValue: i, dispatch: a }) => {
4843
4880
  const r = e.jApi;
4844
4881
  try {
4845
- await r.application.studioSuspend(t), a(y.actions.success({ label: "APPSTUDIO_AppItem_Suspended" }));
4882
+ await r.application.studioSuspend(t), a(m.actions.success({ label: "APPSTUDIO_AppItem_Suspended" }));
4846
4883
  } catch (n) {
4847
- throw a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Error suspending application" });
4884
+ throw a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Error suspending application" });
4848
4885
  }
4849
4886
  }
4850
4887
  ), ze = p(
@@ -4852,12 +4889,12 @@ const Je = p("studio/createApp", async ({ appName: t, callback: e }, { extra: i,
4852
4889
  async ({ idApp: t }, { extra: e, rejectWithValue: i, dispatch: a }) => {
4853
4890
  const r = e.jApi;
4854
4891
  try {
4855
- await r.application.studioRestart(t), a(y.actions.success({ label: "APPSTUDIO_AppItem_Restarted" }));
4892
+ await r.application.studioRestart(t), a(m.actions.success({ label: "APPSTUDIO_AppItem_Restarted" }));
4856
4893
  } catch (n) {
4857
- throw a(y.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Error restarting application" });
4894
+ throw a(m.actions.error({ label: A(n) })), i({ error: 1, errorMsg: "Error restarting application" });
4858
4895
  }
4859
4896
  }
4860
- ), Qe = p("studio/cloneStudioApp", async ({ idApp: t, inWork: e }, { extra: i, getState: a, rejectWithValue: r, dispatch: n }) => {
4897
+ ), Ze = p("studio/cloneStudioApp", async ({ idApp: t, inWork: e }, { extra: i, getState: a, rejectWithValue: r, dispatch: n }) => {
4861
4898
  const s = i.jApi;
4862
4899
  let l = a().studio.studioAppsList.studioAppsList?.find((c) => c.idApp === t);
4863
4900
  if (!l) return r({ error: 1, errorMsg: "Error cloning application" });
@@ -4866,55 +4903,55 @@ const Je = p("studio/createApp", async ({ appName: t, callback: e }, { extra: i,
4866
4903
  l = l.inWorkVersion;
4867
4904
  else
4868
4905
  return r({ error: 1, errorMsg: "Error cloning application" });
4869
- const d = a().userCurrent?.uri, [g, m] = Fi(l, d), f = JSON.stringify(g);
4906
+ const d = a().userCurrent?.uri, [g, y] = $i(l, d), f = JSON.stringify(g);
4870
4907
  try {
4871
- return await s.application.studioSave(m, f, "saved"), n(y.actions.success({ label: "APPSTUDIO_AppItem_Cloned" })), g;
4908
+ return await s.application.studioSave(y, f, "saved"), n(m.actions.success({ label: "APPSTUDIO_AppItem_Cloned" })), g;
4872
4909
  } catch (c) {
4873
- return n(y.actions.error({ label: A(c) })), r({ error: 1, errorMsg: "Error cloning application" });
4910
+ return n(m.actions.error({ label: A(c) })), r({ error: 1, errorMsg: "Error cloning application" });
4874
4911
  }
4875
- }), Ze = p("studio/createInWorkStudioApp", async ({ idApp: t }, { extra: e, getState: i, rejectWithValue: a, dispatch: r }) => {
4912
+ }), et = p("studio/createInWorkStudioApp", async ({ idApp: t }, { extra: e, getState: i, rejectWithValue: a, dispatch: r }) => {
4876
4913
  const n = e.jApi, s = i().studio.studioAppsList.studioAppsList?.find((f) => f.idApp === t);
4877
4914
  if (!s || ![k.INSTALLED, k.SUSPENDED].includes(s.status))
4878
4915
  return a({ error: 1, errorMsg: "Error cloning application" });
4879
- const l = i().userCurrent?.uri, [d, g] = Fi(s, l, !0), m = JSON.stringify(d);
4916
+ const l = i().userCurrent?.uri, [d, g] = $i(s, l, !0), y = JSON.stringify(d);
4880
4917
  try {
4881
- return await n.application.studioSave(g, m, "saved"), r(y.actions.success({ label: "APPSTUDIO_AppItem_CreateInWork" })), d;
4918
+ return await n.application.studioSave(g, y, "saved"), r(m.actions.success({ label: "APPSTUDIO_AppItem_CreateInWork" })), d;
4882
4919
  } catch (f) {
4883
- return r(y.actions.error({ label: A(f) })), a({ error: 1, errorMsg: "Error creating in work version for application" });
4920
+ return r(m.actions.error({ label: A(f) })), a({ error: 1, errorMsg: "Error creating in work version for application" });
4884
4921
  }
4885
- }), Ot = T({
4922
+ }), Dt = T({
4886
4923
  name: "studioAppsList",
4887
- initialState: Ho,
4924
+ initialState: zo,
4888
4925
  reducers: {
4889
4926
  setAppsList: (t, e) => {
4890
4927
  t.studioAppsList = [...e.payload].sort(re);
4891
4928
  }
4892
4929
  },
4893
4930
  extraReducers: (t) => {
4894
- t.addCase(Xe.pending, (e) => {
4931
+ t.addCase(Je.pending, (e) => {
4895
4932
  e.loadingStudioAppsList === "idle" && (e.loadingStudioAppsList = "pending");
4896
- }).addCase(Xe.fulfilled, (e, i) => {
4933
+ }).addCase(Je.fulfilled, (e, i) => {
4897
4934
  e.loadingStudioAppsList === "pending" && (e.loadingStudioAppsList = "idle"), e.studioAppsList = [...i.payload].sort(re);
4898
- }).addCase(Xe.rejected, (e) => {
4935
+ }).addCase(Je.rejected, (e) => {
4899
4936
  e.loadingStudioAppsList === "pending" && (e.loadingStudioAppsList = "idle");
4900
- }).addCase(Ke.pending, (e) => {
4937
+ }).addCase(Ye.pending, (e) => {
4901
4938
  e.deleteStudioAppStatus === "idle" && (e.deleteStudioAppStatus = "pending");
4902
- }).addCase(Ke.fulfilled, (e, i) => {
4939
+ }).addCase(Ye.fulfilled, (e, i) => {
4903
4940
  e.deleteStudioAppStatus === "pending" && (e.deleteStudioAppStatus = "idle"), e.studioAppsList = e.studioAppsList?.reduce((a, r) => {
4904
4941
  const { idApp: n } = i.meta.arg;
4905
4942
  let { status: s } = i.meta.arg;
4906
4943
  return s === k.INSTALLED && (s = k.SUSPENDED), r.idApp === n && r.status === s ? r.inWorkVersion && r.status === k.SUSPENDED ? (r.inWorkVersion.status = k.DRAFT, [...a, r.inWorkVersion]) : a : (r.inWorkVersion && r.inWorkVersion.idApp === n && r.inWorkVersion.status === s && delete r.inWorkVersion, [...a, r]);
4907
4944
  }, []) ?? [];
4908
- }).addCase(Ke.rejected, (e) => {
4945
+ }).addCase(Ye.rejected, (e) => {
4909
4946
  e.deleteStudioAppStatus === "pending" && (e.deleteStudioAppStatus = "idle");
4910
- }).addCase(Ye.pending, (e) => {
4947
+ }).addCase(Qe.pending, (e) => {
4911
4948
  e.suspendStudioAppStatus === "idle" && (e.suspendStudioAppStatus = "pending");
4912
- }).addCase(Ye.fulfilled, (e, i) => {
4949
+ }).addCase(Qe.fulfilled, (e, i) => {
4913
4950
  e.suspendStudioAppStatus === "pending" && (e.suspendStudioAppStatus = "idle"), e.studioAppsList = e.studioAppsList?.map((a) => {
4914
4951
  const { idApp: r } = i.meta.arg;
4915
4952
  return a.idApp === r && (a.status = k.SUSPENDED), a;
4916
4953
  }) ?? [];
4917
- }).addCase(Ye.rejected, (e) => {
4954
+ }).addCase(Qe.rejected, (e) => {
4918
4955
  e.suspendStudioAppStatus === "pending" && (e.suspendStudioAppStatus = "idle");
4919
4956
  }).addCase(ze.pending, (e) => {
4920
4957
  e.restartStudioAppStatus === "idle" && (e.restartStudioAppStatus = "pending");
@@ -4925,151 +4962,152 @@ const Je = p("studio/createApp", async ({ appName: t, callback: e }, { extra: i,
4925
4962
  }) ?? [];
4926
4963
  }).addCase(ze.rejected, (e) => {
4927
4964
  e.restartStudioAppStatus === "pending" && (e.restartStudioAppStatus = "idle");
4928
- }).addCase(Qe.pending, (e) => {
4965
+ }).addCase(Ze.pending, (e) => {
4929
4966
  e.cloneStudioAppStatus === "idle" && (e.cloneStudioAppStatus = "pending");
4930
- }).addCase(Qe.fulfilled, (e, i) => {
4967
+ }).addCase(Ze.fulfilled, (e, i) => {
4931
4968
  e.cloneStudioAppStatus === "pending" && (e.cloneStudioAppStatus = "idle"), e.studioAppsList = [...e.studioAppsList ?? [], i.payload].sort(re);
4932
- }).addCase(Qe.rejected, (e) => {
4969
+ }).addCase(Ze.rejected, (e) => {
4933
4970
  e.cloneStudioAppStatus === "pending" && (e.cloneStudioAppStatus = "idle");
4934
- }).addCase(Ze.pending, (e) => {
4971
+ }).addCase(et.pending, (e) => {
4935
4972
  e.createInWorkAppStatus === "idle" && (e.createInWorkAppStatus = "pending");
4936
- }).addCase(Ze.fulfilled, (e, i) => {
4973
+ }).addCase(et.fulfilled, (e, i) => {
4937
4974
  e.createInWorkAppStatus === "pending" && (e.createInWorkAppStatus = "idle");
4938
4975
  const a = e.studioAppsList?.find((r) => r.idApp === i.payload.idApp);
4939
4976
  a && (a.inWorkVersion = i.payload);
4940
- }).addCase(Ze.rejected, (e) => {
4977
+ }).addCase(et.rejected, (e) => {
4941
4978
  e.createInWorkAppStatus === "pending" && (e.createInWorkAppStatus = "idle");
4942
- }).addCase(Je.pending, (e) => {
4979
+ }).addCase(Ke.pending, (e) => {
4943
4980
  e.createNewStudioAppStatus === "idle" && (e.createNewStudioAppStatus = "pending");
4944
- }).addCase(Je.fulfilled, (e, i) => {
4981
+ }).addCase(Ke.fulfilled, (e, i) => {
4945
4982
  e.createNewStudioAppStatus === "pending" && (e.createNewStudioAppStatus = "idle"), e.studioAppsList = [...e.studioAppsList ?? [], i.payload].sort(re);
4946
- }).addCase(Je.rejected, (e) => {
4983
+ }).addCase(Ke.rejected, (e) => {
4947
4984
  e.createNewStudioAppStatus === "pending" && (e.createNewStudioAppStatus = "idle");
4948
4985
  });
4949
4986
  }
4950
- }), Go = O({
4951
- [Ot.name]: Ot.reducer,
4952
- [ot.name]: ot.reducer
4987
+ }), Zo = O({
4988
+ [Dt.name]: Dt.reducer,
4989
+ [lt.name]: lt.reducer
4953
4990
  });
4954
- function Xo(t) {
4991
+ function el(t) {
4955
4992
  return t.studio.studioAppsList;
4956
4993
  }
4957
- function Jo(t) {
4994
+ function tl(t) {
4958
4995
  return t.studio.currentStudioApp;
4959
4996
  }
4960
- const Ko = {
4997
+ const il = {
4961
4998
  name: "studio",
4962
- reducer: Go
4963
- }, kl = {
4964
- slice: Ko,
4999
+ reducer: Zo
5000
+ }, Ul = {
5001
+ slice: il,
4965
5002
  actions: {
4966
- ...Ot.actions,
4967
- ...ot.actions,
4968
- fetchStudioAppsList: Xe,
4969
- deleteStudioApp: Ke,
4970
- suspendStudioApp: Ye,
5003
+ ...Dt.actions,
5004
+ ...lt.actions,
5005
+ fetchStudioAppsList: Je,
5006
+ deleteStudioApp: Ye,
5007
+ suspendStudioApp: Qe,
4971
5008
  restartStudioApp: ze,
4972
- cloneStudioApp: Qe,
4973
- createNewStudioApp: Je,
4974
- fetchCurrentStudioApp: Ve,
4975
- saveCurrentStudioApp: He,
4976
- installStudioApp: Ge,
4977
- createInWorkStudioApp: Ze
5009
+ cloneStudioApp: Ze,
5010
+ createNewStudioApp: Ke,
5011
+ fetchCurrentStudioApp: He,
5012
+ saveCurrentStudioApp: Ge,
5013
+ installStudioApp: Xe,
5014
+ createInWorkStudioApp: et
4978
5015
  },
4979
5016
  selectors: {
4980
- selectStudioAppsList: Xo,
4981
- selectCurrentStudioApp: Jo
5017
+ selectStudioAppsList: el,
5018
+ selectCurrentStudioApp: tl
4982
5019
  },
4983
5020
  utils: {
4984
- updateViewsFromFields: ki,
5021
+ updateViewsFromFields: xi,
4985
5022
  generateNewFormField: ee
4986
5023
  }
4987
5024
  };
4988
5025
  export {
4989
5026
  k as APP_STATUS_TYPE,
4990
- at as AUDIENCE,
4991
- el as AdminLogs,
4992
- il as Animations,
4993
- _s as AppColumnsDefaultTypes,
5027
+ rt as AUDIENCE,
5028
+ ol as AdminLogs,
5029
+ dl as Animations,
5030
+ $s as AppColumnsDefaultTypes,
4994
5031
  S as AppFieldFormPropertyTypes,
4995
- nt as AppFormBannedFromViews,
4996
- Us as AppFormFieldOnlyInView,
4997
- Dl as AppFormFixedList,
5032
+ st as AppFormBannedFromViews,
5033
+ Hs as AppFormFieldOnlyInView,
5034
+ Pl as AppFormFixedList,
4998
5035
  o as AppFormItemTypes,
4999
- Ps as AppFormNoAsFieldList,
5000
- Bs as AppFormNonPrimaryList,
5001
- Li as AppFormPrimaryListValues,
5002
- Rl as AppFormUniqueListCheck,
5003
- al as Application,
5004
- Qo as Article,
5005
- rl as AssetReservation,
5006
- sl as Bookmark,
5007
- ol as Calendar,
5008
- ll as Comment,
5009
- nl as ContentReport,
5010
- Fs as Description,
5011
- Ws as Element,
5012
- js as ExtraAppFieldsItemName,
5036
+ Vs as AppFormNoAsFieldList,
5037
+ Gs as AppFormNonPrimaryList,
5038
+ hi as AppFormPrimaryListValues,
5039
+ Nl as AppFormUniqueListCheck,
5040
+ cl as Application,
5041
+ nl as Article,
5042
+ ul as AssetReservation,
5043
+ gl as Bookmark,
5044
+ fl as Calendar,
5045
+ ml as Comment,
5046
+ pl as ContentReport,
5047
+ Js as Description,
5048
+ Xs as Element,
5049
+ Ws as ExtraAppFieldsItemName,
5013
5050
  u as ExtraAppFieldsItemViews,
5014
- dl as ExtraBot,
5015
- cl as Faq,
5016
- ul as FileIntegrity,
5017
- Jt as FileIntegritySlice,
5018
- pl as Hook,
5019
- fl as MagicPad,
5020
- q as MapExtraFieldsWithView,
5021
- yl as MediaLibrary,
5022
- Nr as Model,
5023
- Al as Network,
5024
- El as Platform,
5025
- rt as STUDIO_VIEW,
5026
- Tl as Share,
5027
- Ol as SocialActions,
5051
+ yl as ExtraBot,
5052
+ Al as Faq,
5053
+ El as FileIntegrity,
5054
+ Yt as FileIntegritySlice,
5055
+ Sl as Hook,
5056
+ Cl as MagicPad,
5057
+ $ as MapExtraFieldsWithView,
5058
+ Ll as MediaLibrary,
5059
+ qr as Model,
5060
+ wl as Network,
5061
+ Il as Platform,
5062
+ nt as STUDIO_VIEW,
5063
+ hl as Share,
5064
+ _l as SocialActions,
5028
5065
  H as StatusType,
5029
- wl as TVDisplay,
5030
- bl as TeamWork,
5031
- Il as TinyMCE,
5032
- y as Toast,
5033
- Ll as UserCurrent,
5034
- Sl as WedocApp,
5035
- Os as Widget,
5036
- hl as WidgetEditor,
5037
- Ji as actions,
5038
- Zo as adminLogsReducer,
5039
- di as adminLogsSlice,
5040
- tl as animationsReducer,
5041
- ci as animationsSlice,
5042
- Da as contentReportSlice,
5066
+ Dl as TVDisplay,
5067
+ Rl as TeamWork,
5068
+ kl as TinyMCE,
5069
+ m as Toast,
5070
+ Ml as UserCurrent,
5071
+ vl as WedocApp,
5072
+ _s as Widget,
5073
+ jl as WidgetEditor,
5074
+ Yi as actions,
5075
+ sl as adminLogsReducer,
5076
+ ui as adminLogsSlice,
5077
+ ll as animationsReducer,
5078
+ pi as animationsSlice,
5079
+ Ma as contentReportSlice,
5043
5080
  Re as deleteQuarantine,
5044
- Ht as extraBotSlice,
5081
+ Xt as extraBotSlice,
5045
5082
  K as fetchExtraBotListAll,
5046
5083
  be as fetchExtraBotListMines,
5047
5084
  he as fetchFileIntegrityList,
5048
- _e as fetchMediaLibraryConfig,
5049
- Ue as fetchMediaLibraryFilesStats,
5085
+ _e as fetchFolderFiles,
5086
+ Pe as fetchMediaLibraryConfig,
5087
+ Fe as fetchMediaLibraryFilesStats,
5050
5088
  je as fetchMediaLibraryFolders,
5051
- Pe as fetchMediaLibraryFoldersStats,
5089
+ Ue as fetchMediaLibraryFoldersStats,
5052
5090
  Be as fetchMediaLibraryStats,
5053
5091
  Ne as fetchMediaLibraryUnclassifiedFiles,
5054
5092
  xe as fetchPads,
5055
5093
  me as fetchReports,
5056
- gl as jland,
5057
- Cr as magicPadSlice,
5058
- ml as mediaLibraryReducer,
5059
- yi as mediaLibrarySlice,
5094
+ Tl as jland,
5095
+ Lr as magicPadSlice,
5096
+ bl as mediaLibraryReducer,
5097
+ Ei as mediaLibrarySlice,
5060
5098
  Oe as releaseQuarantine,
5061
- Ie as saveExtraBot,
5062
- Za as selectExtraBotListAll,
5063
- er as selectExtraBotListMines,
5064
- lr as selectFileIntegrityAction,
5065
- dr as selectFileIntegrityList,
5066
- ei as slice,
5067
- kl as studio,
5068
- Si as teamWorkSlice,
5069
- Cl as teamworkReducer,
5070
- we as toggleExtraBotActivation,
5071
- Qa as updateListBotProperty,
5099
+ we as saveExtraBot,
5100
+ tr as selectExtraBotListAll,
5101
+ ir as selectExtraBotListMines,
5102
+ cr as selectFileIntegrityAction,
5103
+ ur as selectFileIntegrityList,
5104
+ ii as slice,
5105
+ Ul as studio,
5106
+ Ci as teamWorkSlice,
5107
+ Ol as teamworkReducer,
5108
+ Le as toggleExtraBotActivation,
5109
+ er as updateListBotProperty,
5072
5110
  ye as updateStatus,
5073
- vl as updateWidgetContent,
5074
- Mt as viewsList
5111
+ xl as updateWidgetContent,
5112
+ jt as viewsList
5075
5113
  };