@amsom-habitat/cresol 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cresol.js CHANGED
@@ -1,22 +1,26 @@
1
- import { AmsomModal as e, AmsomOverlay as t } from "@amsom-habitat/ui";
2
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, guardReactiveProps as d, inject as f, mergeProps as p, normalizeClass as m, normalizeProps as h, openBlock as g, provide as _, reactive as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toHandlers as ee, toRef as w, unref as T, vShow as te, withCtx as E, withDirectives as ne } from "vue";
3
- import { AmsomNavTabsHorizontal as re } from "@amsom-habitat/nav-tabs";
4
- import ie from "@amsom-habitat/horizontal-stepper";
5
- import { AmsomAutocomplete as D } from "@amsom-habitat/amsom-autocomplete";
6
- import ae from "@amsom-habitat/axios-overlay";
7
- import O from "@amsom-habitat/user-manager";
8
- import { library as oe } from "@fortawesome/fontawesome-svg-core";
9
- import { AmsomTextarea as se } from "@amsom-habitat/amsom-textarea";
10
- import { AmsomUploadFile as ce } from "@amsom-habitat/file-manager";
1
+ import { library as e } from "@fortawesome/fontawesome-svg-core";
2
+ import { faBriefcase as t, faBuilding as n, faBuildingShield as r, faCheck as i, faChevronLeft as a, faChevronRight as o, faCircleExclamation as s, faCircleInfo as c, faCircleQuestion as l, faDungeon as u, faFileSignature as d, faHandsHolding as f, faHourglass as p, faHouse as ee, faInfo as m, faLayerGroup as h, faLocationDot as te, faMagnifyingGlass as ne, faPersonShelter as re, faSquareParking as ie, faStore as ae, faTag as oe, faUser as se, faUserGraduate as ce, faXmark as le } from "@fortawesome/free-solid-svg-icons";
3
+ import { AmsomModal as ue, AmsomOverlay as g } from "@amsom-habitat/ui";
4
+ import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, guardReactiveProps as E, inject as de, mergeProps as fe, normalizeClass as D, normalizeProps as O, openBlock as k, provide as pe, reactive as A, ref as j, renderList as M, renderSlot as N, resolveComponent as P, toDisplayString as F, toHandlers as me, toRef as I, unref as L, vShow as he, withCtx as R, withDirectives as ge } from "vue";
5
+ import { AmsomNavTabsHorizontal as _e } from "@amsom-habitat/nav-tabs";
6
+ import ve from "@amsom-habitat/horizontal-stepper";
7
+ import { AmsomAutocomplete as z } from "@amsom-habitat/amsom-autocomplete";
8
+ import ye from "@amsom-habitat/axios-overlay";
9
+ import B from "@amsom-habitat/user-manager";
10
+ import { AmsomTextarea as be } from "@amsom-habitat/amsom-textarea";
11
+ import { AmsomUploadFile as xe } from "@amsom-habitat/file-manager";
12
+ //#region src/icons.js
13
+ e.add(t, n, r, i, a, o, s, c, l, u, d, f, p, ee, m, h, te, ne, re, ie, ae, oe, se, ce, le);
14
+ //#endregion
11
15
  //#region src/utils/provenanceContact.js
12
- var k = {
16
+ var V = {
13
17
  T: "phone",
14
18
  M: "envelope",
15
19
  G: "user-shield",
16
20
  V: "building",
17
21
  IP: "exclamation-triangle",
18
22
  C: "envelope-open"
19
- }, le = "comment-dots", ue = (e) => k[e] ?? "comment-dots", de = Object.keys(k), fe = "T", A = {
23
+ }, Se = "comment-dots", Ce = (e) => V[e] ?? "comment-dots", we = Object.keys(V), Te = "T", H = {
20
24
  locataire: {
21
25
  libelle: "Locataire",
22
26
  icon: "house-user",
@@ -52,14 +56,14 @@ var k = {
52
56
  icon: "circle-question",
53
57
  couleur: "danger"
54
58
  }
55
- }, pe = ["L", "P"], j = {
56
- ...Object.fromEntries(pe.map((e) => [e, "locataire"])),
59
+ }, Ee = ["L", "P"], De = {
60
+ ...Object.fromEntries(Ee.map((e) => [e, "locataire"])),
57
61
  D: "demandeur",
58
62
  T: "tiers",
59
63
  U: "autre",
60
64
  F: "fournisseur",
61
65
  E: "personnel"
62
- }, M = Object.keys(j), me = (e) => [...new Set(e.map((e) => j[e]))], N = (e) => e ? A[e.categorie] ? e.categorie : j[e.type] ?? "inconnu" : null, he = (e) => A[N(e)] ?? null, ge = Symbol("cresol:draft"), P = () => ({
66
+ }, U = Object.keys(De), Oe = (e) => [...new Set(e.map((e) => De[e]))], ke = (e) => e ? H[e.categorie] ? e.categorie : De[e.type] ?? "inconnu" : null, Ae = (e) => H[ke(e)] ?? null, je = Symbol("cresol:draft"), W = () => ({
63
67
  idCommune: null,
64
68
  commune: null,
65
69
  idEntree: null,
@@ -74,7 +78,7 @@ var k = {
74
78
  typeContratActuel: null,
75
79
  idContratActuel: null,
76
80
  occupantActuel: null
77
- }), F = () => ({
81
+ }), Me = () => ({
78
82
  idMotif: null,
79
83
  idCategorie: null,
80
84
  idType: null,
@@ -92,7 +96,7 @@ var k = {
92
96
  dateFaits: null,
93
97
  dateFaitsOverride: !1,
94
98
  fichier: null
95
- }), I = [
99
+ }), Ne = [
96
100
  "reclamant",
97
101
  "provenance",
98
102
  "motif",
@@ -101,19 +105,19 @@ var k = {
101
105
  "dateFaits",
102
106
  "responsable",
103
107
  "fichier"
104
- ], L = (e = "T") => ({
108
+ ], Pe = (e = "T") => ({
105
109
  reclamant: {
106
110
  type: null,
107
111
  id: null
108
112
  },
109
113
  provenance: e,
110
114
  lignes: [{
111
- ...F(),
115
+ ...Me(),
112
116
  cibleMode: "contrat",
113
- patrimoine: P(),
117
+ patrimoine: W(),
114
118
  description: ""
115
119
  }]
116
- }), _e = (e) => e?.id ?? e ?? null, ve = (e) => {
120
+ }), Fe = (e) => e?.id ?? e ?? null, Ie = (e) => {
117
121
  if (!e) return "Cible non définie";
118
122
  let t = [
119
123
  e.commune,
@@ -121,17 +125,17 @@ var k = {
121
125
  e.libelleModule
122
126
  ].filter(Boolean);
123
127
  return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
124
- }, ye = (e) => !!e && (e.idModule != null || e.idEntree != null), be = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : ye(e.patrimoine), xe = (e, t) => e.description == null ? !t : e.description.trim().length > 0, Se = (e = {}) => {
128
+ }, Le = (e) => !!e && (e.idModule != null || e.idEntree != null), Re = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : Le(e.patrimoine), ze = (e, t) => e.description == null ? !t : e.description.trim().length > 0, Be = (e = {}) => {
125
129
  let t = {
126
- ...F(),
130
+ ...Me(),
127
131
  ...e
128
132
  };
129
133
  return e.patrimoine && (t.patrimoine = {
130
- ...P(),
134
+ ...W(),
131
135
  ...e.patrimoine
132
136
  }), t;
133
- }, Ce = (e) => {
134
- let t = L();
137
+ }, Ve = (e) => {
138
+ let t = Pe();
135
139
  if (!e) return t;
136
140
  let n = Array.isArray(e.lignes) && e.lignes.length ? e.lignes : null;
137
141
  return {
@@ -144,168 +148,168 @@ var k = {
144
148
  provenance: e.provenance ?? t.provenance,
145
149
  lignes: n ? n.map((e, n) => n === 0 ? {
146
150
  ...t.lignes[0],
147
- ...Se(e)
148
- } : Se(e)) : t.lignes
151
+ ...Be(e)
152
+ } : Be(e)) : t.lignes
149
153
  };
150
154
  };
151
- function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly: i = y(!1) } = {}) {
152
- let a = v(L()), o = r(() => {
153
- let e = T(i);
154
- return e === !0 ? I : Array.isArray(e) ? e : [];
155
- }), s = (e) => o.value.includes(e), c = r(() => a.lignes[0]), l = r(() => a.lignes.slice(1)), u = r(() => T(e) ?? []), d = y(null), f = (e, t) => e.type === t.type && String(e.id) === String(t.id), p = r(() => {
156
- let e = d.value;
157
- return !e || u.value.some((t) => f(t, e)) ? u.value : [...u.value, e];
158
- }), m = r(() => p.value.find((e) => f(e, a.reclamant)) ?? p.value[0] ?? null), h = r(() => {
159
- let e = T(t) ?? [], r = T(n);
155
+ function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly: r = j(!1) } = {}) {
156
+ let i = A(Pe()), a = v(() => {
157
+ let e = L(r);
158
+ return e === !0 ? Ne : Array.isArray(e) ? e : [];
159
+ }), o = (e) => a.value.includes(e), s = v(() => i.lignes[0]), c = v(() => i.lignes.slice(1)), l = v(() => L(e) ?? []), u = j(null), d = (e, t) => e.type === t.type && String(e.id) === String(t.id), f = v(() => {
160
+ let e = u.value;
161
+ return !e || l.value.some((t) => d(t, e)) ? l.value : [...l.value, e];
162
+ }), p = v(() => f.value.find((e) => d(e, i.reclamant)) ?? f.value[0] ?? null), ee = v(() => {
163
+ let e = L(t) ?? [], r = L(n);
160
164
  return (r == null ? null : e.find((e) => String(e.idModule) === String(r))) ?? e.find((e) => e.estModulePrincipal) ?? e[0] ?? null;
161
- }), g = r(() => !!m.value && pe.includes(m.value.type)), _ = {
162
- draft: a,
163
- lignePrincipale: c,
164
- lignesAssociees: l,
165
- reclamantsFournis: u,
166
- reclamantsDisponibles: p,
167
- reclamantSelectionne: m,
168
- moduleReclamantPrincipal: h,
169
- reclamantEstContrat: g,
170
- ciblesValid: r(() => a.lignes.every((e) => be(e, g.value))),
171
- detailsValid: r(() => a.lignes.every((e, t) => xe(e, t === 0))),
172
- isReadonly: s,
165
+ }), m = v(() => !!p.value && Ee.includes(p.value.type)), h = {
166
+ draft: i,
167
+ lignePrincipale: s,
168
+ lignesAssociees: c,
169
+ reclamantsFournis: l,
170
+ reclamantsDisponibles: f,
171
+ reclamantSelectionne: p,
172
+ moduleReclamantPrincipal: ee,
173
+ reclamantEstContrat: m,
174
+ ciblesValid: v(() => i.lignes.every((e) => Re(e, m.value))),
175
+ detailsValid: v(() => i.lignes.every((e, t) => ze(e, t === 0))),
176
+ isReadonly: o,
173
177
  reset(e = null) {
174
- let t = Ce(e);
175
- Object.assign(a, t), a.lignes = t.lignes;
178
+ let t = Ve(e);
179
+ Object.assign(i, t), i.lignes = t.lignes;
176
180
  },
177
181
  setProvenance(e) {
178
- a.provenance = e;
182
+ i.provenance = e;
179
183
  },
180
184
  syncReclamant() {
181
- let e = m.value;
182
- _.setReclamant({
185
+ let e = p.value;
186
+ h.setReclamant({
183
187
  type: e?.type ?? null,
184
188
  id: e?.id ?? null
185
189
  });
186
190
  },
187
191
  selectReclamant(e) {
188
- e && (u.value.some((t) => f(t, e)) || (d.value = e), _.setReclamant(e));
192
+ e && (l.value.some((t) => d(t, e)) || (u.value = e), h.setReclamant(e));
189
193
  },
190
194
  setReclamant({ type: e, id: t }) {
191
- if (a.reclamant = {
195
+ if (i.reclamant = {
192
196
  type: e ?? null,
193
197
  id: t ?? null
194
- }, s("cible")) return;
195
- let n = a.lignes[0];
196
- e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = g.value ? "contrat" : "patrimoine", n.contratReclamant = g.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = P(), _.prefillCiblePrincipale());
198
+ }, o("cible")) return;
199
+ let n = i.lignes[0];
200
+ e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = m.value ? "contrat" : "patrimoine", n.contratReclamant = m.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = W(), h.prefillCiblePrincipale());
197
201
  },
198
202
  prefillCiblePrincipale() {
199
- if (s("cible")) return;
200
- let e = h.value;
201
- e && _.prefillFromModule(0, e);
203
+ if (o("cible")) return;
204
+ let e = ee.value;
205
+ e && h.prefillFromModule(0, e);
202
206
  },
203
207
  _resetAfterNomenclature() {
204
- a.lignes[0].responsable = null, a.lignes.splice(1);
208
+ i.lignes[0].responsable = null, i.lignes.splice(1);
205
209
  },
206
210
  setCategorie(e) {
207
- let t = a.lignes[0];
208
- t.idCategorie = e, t.idType = null, t.idNature = null, t.idMotif = null, _._resetAfterNomenclature();
211
+ let t = i.lignes[0];
212
+ t.idCategorie = e, t.idType = null, t.idNature = null, t.idMotif = null, h._resetAfterNomenclature();
209
213
  },
210
214
  setType(e) {
211
- let t = a.lignes[0];
212
- t.idType = e, t.idNature = null, t.idMotif = null, _._resetAfterNomenclature();
215
+ let t = i.lignes[0];
216
+ t.idType = e, t.idNature = null, t.idMotif = null, h._resetAfterNomenclature();
213
217
  },
214
218
  setNature(e) {
215
- let t = a.lignes[0];
216
- t.idNature = e, t.idMotif = null, _._resetAfterNomenclature();
219
+ let t = i.lignes[0];
220
+ t.idNature = e, t.idMotif = null, h._resetAfterNomenclature();
217
221
  },
218
222
  setMotif(e) {
219
- a.lignes[0].idMotif = e, _._resetAfterNomenclature();
223
+ i.lignes[0].idMotif = e, h._resetAfterNomenclature();
220
224
  },
221
225
  selectMotifChain(e) {
222
- let t = a.lignes[0];
223
- t.idCategorie = e?.idCategorie ?? null, t.idType = e?.idType ?? null, t.idNature = e?.idNature ?? null, t.idMotif = e?.id ?? null, _._resetAfterNomenclature();
226
+ let t = i.lignes[0];
227
+ t.idCategorie = e?.idCategorie ?? null, t.idType = e?.idType ?? null, t.idNature = e?.idNature ?? null, t.idMotif = e?.id ?? null, h._resetAfterNomenclature();
224
228
  },
225
229
  toggleLigneAssociee(e, t = {}) {
226
- let n = a.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
227
- n === -1 ? a.lignes.push({
228
- ...F(),
230
+ let n = i.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
231
+ n === -1 ? i.lignes.push({
232
+ ...Me(),
229
233
  idMotif: e,
230
234
  ...t
231
- }) : a.lignes.splice(n, 1);
235
+ }) : i.lignes.splice(n, 1);
232
236
  },
233
237
  _patrimoine(e) {
234
- return a.lignes[e]?.patrimoine ?? null;
238
+ return i.lignes[e]?.patrimoine ?? null;
235
239
  },
236
240
  setCibleMode(e, t) {
237
- let n = a.lignes[e];
238
- n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && g.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= P());
241
+ let n = i.lignes[e];
242
+ n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && m.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= W());
239
243
  },
240
244
  setModulePrecis(e, t) {
241
- let n = a.lignes[e];
242
- n && (n.modulePrecis = !!t, n.modulePrecis || _.setPatrimoineModule(e, null));
245
+ let n = i.lignes[e];
246
+ n && (n.modulePrecis = !!t, n.modulePrecis || h.setPatrimoineModule(e, null));
243
247
  },
244
248
  toggleContratReclamant(e, t) {
245
- let n = a.lignes[e];
246
- n && (n.contratReclamant = t ?? !n.contratReclamant, n.contratCible = null, n.patrimoine && _.setPatrimoineModule(e, null));
249
+ let n = i.lignes[e];
250
+ n && (n.contratReclamant = t ?? !n.contratReclamant, n.contratCible = null, n.patrimoine && h.setPatrimoineModule(e, null));
247
251
  },
248
252
  setContratCible(e, t) {
249
- let n = a.lignes[e];
253
+ let n = i.lignes[e];
250
254
  n && (n.contratCible = t ? {
251
255
  typeContrat: t.typeContrat,
252
256
  idContrat: t.idContrat,
253
257
  libelle: t.libelle ?? null
254
- } : null, _.setPatrimoineModule(e, null));
258
+ } : null, h.setPatrimoineModule(e, null));
255
259
  },
256
260
  setPatrimoineCommune(e, t) {
257
- let n = _._patrimoine(e);
258
- n && (n.idCommune = t?.idCommune ?? null, n.commune = t?.commune ?? null, _.setPatrimoineEntree(e, null));
261
+ let n = h._patrimoine(e);
262
+ n && (n.idCommune = t?.idCommune ?? null, n.commune = t?.commune ?? null, h.setPatrimoineEntree(e, null));
259
263
  },
260
264
  setPatrimoineEntree(e, t) {
261
- let n = _._patrimoine(e);
262
- n && (n.idEntree = t?.idEntree ?? null, n.entree = t?.entree ?? null, n.codeProgramme = t?.codeProgramme ?? null, n.codeTranche = t?.codeTranche ?? null, n.codeBatiment = t?.codeBatiment ?? null, n.codeEscalier = t?.codeEscalier ?? null, n.etage = null, _.setPatrimoineModule(e, null));
265
+ let n = h._patrimoine(e);
266
+ n && (n.idEntree = t?.idEntree ?? null, n.entree = t?.entree ?? null, n.codeProgramme = t?.codeProgramme ?? null, n.codeTranche = t?.codeTranche ?? null, n.codeBatiment = t?.codeBatiment ?? null, n.codeEscalier = t?.codeEscalier ?? null, n.etage = null, h.setPatrimoineModule(e, null));
263
267
  },
264
268
  setPatrimoineEtage(e, t) {
265
- let n = _._patrimoine(e);
266
- n && (n.etage = t, _.setPatrimoineModule(e, null));
269
+ let n = h._patrimoine(e);
270
+ n && (n.etage = t, h.setPatrimoineModule(e, null));
267
271
  },
268
272
  setPatrimoineModule(e, t) {
269
- let n = _._patrimoine(e);
273
+ let n = h._patrimoine(e);
270
274
  n && (n.idModule = t?.idModule ?? null, n.libelleModule = t?.libelleModule ?? null, n.typeContratActuel = t?.typeContratActuel ?? null, n.idContratActuel = t?.idContratActuel ?? null, n.occupantActuel = t?.occupantActuel ?? null, t && (n.codeProgramme = t.codeProgramme ?? n.codeProgramme, n.codeTranche = t.codeTranche ?? n.codeTranche, n.codeBatiment = t.codeBatiment ?? n.codeBatiment, n.codeEscalier = t.codeEscalier ?? n.codeEscalier, t.idEntree != null && (n.idEntree = t.idEntree), t.etage != null && (n.etage = t.etage)));
271
275
  },
272
276
  prefillFromModule(e, t) {
273
- let n = _._patrimoine(e);
277
+ let n = h._patrimoine(e);
274
278
  n && t && (n.idCommune = t.idCommune ?? null, n.commune = t.commune ?? null, n.idEntree = t.idEntree ?? null, n.entree = t.adresse ?? t.numeroRue ?? null, n.codeProgramme = t.codeProgramme ?? null, n.codeTranche = t.codeTranche ?? null, n.codeBatiment = t.codeBatiment ?? null, n.codeEscalier = t.codeEscalier ?? null, n.etage = t.etage ?? null, n.idModule = t.idModule ?? null, n.libelleModule = t.libelleModule ?? t.adresse ?? null, n.typeContratActuel = t.typeContratActuel ?? null, n.idContratActuel = t.idContratActuel ?? null, n.occupantActuel = t.occupantActuel ?? null);
275
279
  },
276
280
  toggleCibleOverride(e) {
277
- let t = a.lignes[e];
281
+ let t = i.lignes[e];
278
282
  if (!t) return;
279
- let n = a.lignes[0];
283
+ let n = i.lignes[0];
280
284
  t.cibleOverride ? (t.cibleOverride = !1, t.cibleMode = null, t.patrimoine = null, t.reprendreLocataireActuel = !1, t.modulePrecis = !0, t.contratReclamant = !0, t.contratCible = null) : (t.cibleOverride = !0, t.cibleMode = n.cibleMode, t.patrimoine = n.cibleMode === "demande" ? null : { ...n.patrimoine }, t.reprendreLocataireActuel = n.reprendreLocataireActuel, t.modulePrecis = n.modulePrecis, t.contratReclamant = n.contratReclamant, t.contratCible = n.contratCible ? { ...n.contratCible } : null);
281
285
  },
282
286
  setReprendreLocataireActuel(e, t) {
283
- let n = a.lignes[e];
287
+ let n = i.lignes[e];
284
288
  n && (n.reprendreLocataireActuel = !!t);
285
289
  },
286
290
  setDescription(e, t) {
287
- let n = a.lignes[e];
291
+ let n = i.lignes[e];
288
292
  n && (n.description = t);
289
293
  },
290
294
  setDateFaits(e, t) {
291
- let n = a.lignes[e];
295
+ let n = i.lignes[e];
292
296
  n && (n.dateFaits = t);
293
297
  },
294
298
  setResponsable(e, t) {
295
- let n = a.lignes[e];
299
+ let n = i.lignes[e];
296
300
  n && (n.responsable = t);
297
301
  },
298
302
  setFichier(e, t) {
299
- let n = a.lignes[e];
303
+ let n = i.lignes[e];
300
304
  n && (n.fichier = t);
301
305
  },
302
306
  toggleDescriptionOverride(e) {
303
- let t = a.lignes[e];
307
+ let t = i.lignes[e];
304
308
  t && (t.description = t.description == null ? "" : null);
305
309
  },
306
310
  toggleDateFaitsOverride(e) {
307
- let t = a.lignes[e];
308
- t && (t.dateFaitsOverride = !t.dateFaitsOverride, t.dateFaits = t.dateFaitsOverride ? a.lignes[0].dateFaits : null);
311
+ let t = i.lignes[e];
312
+ t && (t.dateFaitsOverride = !t.dateFaitsOverride, t.dateFaits = t.dateFaitsOverride ? i.lignes[0].dateFaits : null);
309
313
  },
310
314
  _patrimoinePayload(e) {
311
315
  return e.idModule == null ? {
@@ -317,26 +321,26 @@ function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
317
321
  } : { idModule: e.idModule };
318
322
  },
319
323
  _lignePayload(e, t) {
320
- let n = a.lignes[0], r = t > 0 && !e.cibleOverride ? n : e, i = (e.description ?? "").trim() || (n.description ?? "").trim(), o = e.dateFaits == null ? n.dateFaits : e.dateFaits, s = a.reclamant.type === "D", c = {
324
+ let n = i.lignes[0], r = t > 0 && !e.cibleOverride ? n : e, a = (e.description ?? "").trim() || (n.description ?? "").trim(), o = e.dateFaits == null ? n.dateFaits : e.dateFaits, s = i.reclamant.type === "D", c = {
321
325
  categorie: e.idCategorie,
322
326
  type: e.idType,
323
327
  nature: e.idNature,
324
328
  motif: e.idMotif,
325
- description: i,
329
+ description: a,
326
330
  dateFaits: o,
327
- responsable: _e(e.responsable)
331
+ responsable: Fe(e.responsable)
328
332
  };
329
333
  if (r.cibleMode === "demande") return {
330
334
  ...c,
331
335
  codeTypeCible: "D",
332
- idCible: a.reclamant.id,
336
+ idCible: i.reclamant.id,
333
337
  deduireCible: !1
334
338
  };
335
- let l = _._patrimoinePayload(r.patrimoine);
339
+ let l = h._patrimoinePayload(r.patrimoine);
336
340
  if (r.cibleMode === "contrat" && !r.reprendreLocataireActuel) {
337
- let e = r.contratReclamant && g.value ? {
338
- typeContrat: a.reclamant.type,
339
- idContrat: a.reclamant.id
341
+ let e = r.contratReclamant && m.value ? {
342
+ typeContrat: i.reclamant.type,
343
+ idContrat: i.reclamant.id
340
344
  } : r.contratCible;
341
345
  return {
342
346
  ...c,
@@ -355,57 +359,57 @@ function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
355
359
  };
356
360
  },
357
361
  cibleResume(e) {
358
- let t = a.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
362
+ let t = i.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
359
363
  if (n.cibleMode === "demande") return "La demande";
360
- let r = ve(n.patrimoine);
364
+ let r = Ie(n.patrimoine);
361
365
  if (n.cibleMode === "patrimoine" && !n.modulePrecis) return `Parties communes — ${r}`;
362
366
  if (n.cibleMode !== "contrat") return r;
363
- let i = "Contrat non défini";
364
- if (n.contratReclamant && g.value) i = "Contrat du réclamant";
367
+ let a = "Contrat non défini";
368
+ if (n.contratReclamant && m.value) a = "Contrat du réclamant";
365
369
  else if (n.contratCible) {
366
370
  let e = n.contratCible;
367
- i = `${e.libelle ?? "Contrat"} (${e.typeContrat}/${e.idContrat})`;
371
+ a = `${e.libelle ?? "Contrat"} (${e.typeContrat}/${e.idContrat})`;
368
372
  }
369
- return `${i} — ${r}`;
373
+ return `${a} — ${r}`;
370
374
  },
371
375
  lignesPayload() {
372
- return a.lignes.map((e, t) => _._lignePayload(e, t));
376
+ return i.lignes.map((e, t) => h._lignePayload(e, t));
373
377
  },
374
378
  creationPayload() {
375
- let e = m.value;
379
+ let e = p.value;
376
380
  return {
377
381
  typeReclamant: e?.type ?? null,
378
382
  reclamant: e?.id ?? null,
379
- lignes: _.lignesPayload(),
380
- provenance: a.provenance
383
+ lignes: h.lignesPayload(),
384
+ provenance: i.provenance
381
385
  };
382
386
  }
383
387
  };
384
- return v(_);
388
+ return A(h);
385
389
  }
386
- function Te(e) {
387
- return _(ge, e), e;
390
+ function Ue(e) {
391
+ return pe(je, e), e;
388
392
  }
389
- function R() {
390
- let e = f(ge, null);
393
+ function G() {
394
+ let e = de(je, null);
391
395
  if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
392
396
  return e;
393
397
  }
394
398
  //#endregion
395
399
  //#region \0plugin-vue:export-helper
396
- var z = (e, t) => {
400
+ var K = (e, t) => {
397
401
  let n = e.__vccOpts || e;
398
402
  for (let [e, r] of t) n[e] = r;
399
403
  return n;
400
- }, Ee = {
404
+ }, We = {
401
405
  name: "AsideBlock",
402
- components: { AmsomNavTabsHorizontal: re },
406
+ components: { AmsomNavTabsHorizontal: _e },
403
407
  props: { nbSimilaires: {
404
408
  type: Number,
405
409
  default: 0
406
410
  } },
407
411
  setup() {
408
- return { draft: R() };
412
+ return { draft: G() };
409
413
  },
410
414
  data() {
411
415
  return { activeTab: null };
@@ -441,44 +445,44 @@ var z = (e, t) => {
441
445
  e.some((e) => e.id === this.activeTab) || (this.activeTab = e[0]?.id ?? null);
442
446
  }
443
447
  } }
444
- }, De = {
448
+ }, Ge = {
445
449
  key: 0,
446
450
  class: "badge bg-danger ms-1"
447
- }, Oe = { style: { "min-height": "320px" } }, ke = { key: 0 }, Ae = { key: 1 };
448
- function je(e, t, n, r, c, l) {
449
- let f = S("font-awesome-icon"), p = S("amsom-nav-tabs-horizontal");
450
- return l.tabs.length ? (g(), i(p, {
451
+ }, Ke = { style: { "min-height": "320px" } }, qe = { key: 0 }, Je = { key: 1 };
452
+ function Ye(e, t, n, r, i, a) {
453
+ let o = P("font-awesome-icon"), s = P("amsom-nav-tabs-horizontal");
454
+ return a.tabs.length ? (k(), y(s, {
451
455
  key: 0,
452
- modelValue: c.activeTab,
453
- "onUpdate:modelValue": t[0] ||= (e) => c.activeTab = e,
454
- items: l.tabs,
456
+ modelValue: i.activeTab,
457
+ "onUpdate:modelValue": t[0] ||= (e) => i.activeTab = e,
458
+ items: a.tabs,
455
459
  "item-key": "id",
456
460
  "tab-spacing": 1
457
461
  }, {
458
- libelle: E(({ item: e }) => [
459
- u(f, { icon: e.icon }, null, 8, ["icon"]),
460
- s("span", null, C(e.label), 1),
461
- e.id === "similarite" && n.nbSimilaires > 0 ? (g(), o("span", De, C(n.nbSimilaires), 1)) : a("", !0)
462
+ libelle: R(({ item: e }) => [
463
+ T(o, { icon: e.icon }, null, 8, ["icon"]),
464
+ S("span", null, F(e.label), 1),
465
+ e.id === "similarite" && n.nbSimilaires > 0 ? (k(), x("span", Ge, F(n.nbSimilaires), 1)) : b("", !0)
462
466
  ]),
463
- content: E(() => [s("div", Oe, [e.$slots.similaires ? ne((g(), o("div", ke, [x(e.$slots, "similaires", h(d(l.scope)))], 512)), [[te, c.activeTab === "similarite"]]) : a("", !0), e.$slots.evenements ? ne((g(), o("div", Ae, [x(e.$slots, "evenements")], 512)), [[te, c.activeTab === "evenements"]]) : a("", !0)])]),
467
+ content: R(() => [S("div", Ke, [e.$slots.similaires ? ge((k(), x("div", qe, [N(e.$slots, "similaires", O(E(a.scope)))], 512)), [[he, i.activeTab === "similarite"]]) : b("", !0), e.$slots.evenements ? ge((k(), x("div", Je, [N(e.$slots, "evenements")], 512)), [[he, i.activeTab === "evenements"]]) : b("", !0)])]),
464
468
  _: 3
465
- }, 8, ["modelValue", "items"])) : a("", !0);
469
+ }, 8, ["modelValue", "items"])) : b("", !0);
466
470
  }
467
- var Me = /*#__PURE__*/ z(Ee, [["render", je]]), Ne = {
471
+ var Xe = /*#__PURE__*/ K(We, [["render", Ye]]), Ze = {
468
472
  baseUrl: "",
469
- getToken: () => O.getToken(),
470
- setToken: (e) => O.setToken(e),
471
- logout: () => O.logout(),
472
- goToLoginPage: () => O.goToLoginPage()
473
+ getToken: () => B.getToken(),
474
+ setToken: (e) => B.setToken(e),
475
+ logout: () => B.logout(),
476
+ goToLoginPage: () => B.goToLoginPage()
473
477
  };
474
- function Pe(e = {}) {
475
- Object.assign(Ne, e);
478
+ function Qe(e = {}) {
479
+ Object.assign(Ze, e);
476
480
  }
477
- var B = () => Ne;
481
+ var $e = () => Ze;
478
482
  //#endregion
479
483
  //#region src/api/transport/axiosOverlayConnector.js
480
- function Fe(e, t = {}) {
481
- let n = B(), r = {
484
+ function et(e, t = {}) {
485
+ let n = $e(), r = {
482
486
  getToken: () => n.getToken?.() ?? null,
483
487
  setToken: (e) => n.setToken?.(e),
484
488
  logout: () => n.logout?.(),
@@ -500,74 +504,74 @@ function Fe(e, t = {}) {
500
504
  }, t.functions.errorsHandlers = {
501
505
  ...r.errorsHandlers,
502
506
  ...t.functions.errorsHandlers ?? {}
503
- }, ae(e, t);
507
+ }, ye(e, t);
504
508
  }
505
509
  //#endregion
506
510
  //#region src/api/transport/httpClient.js
507
- var Ie = (e, t) => {
508
- let n = t || B().baseUrl;
511
+ var tt = (e, t) => {
512
+ let n = t || $e().baseUrl;
509
513
  if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
510
514
  return `${n}${e}`;
511
- }, Le = (e = {}) => {
515
+ }, nt = (e = {}) => {
512
516
  let t = new URLSearchParams();
513
517
  Object.entries(e).forEach(([e, n]) => {
514
518
  n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
515
519
  });
516
520
  let n = t.toString();
517
521
  return n ? `?${n}` : "";
518
- }, Re = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => Fe({
519
- url: Ie(`${t}${Le(n)}`, a),
522
+ }, rt = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => et({
523
+ url: tt(`${t}${nt(n)}`, a),
520
524
  method: e,
521
525
  ...r === void 0 ? {} : { data: r },
522
526
  ...i ? { signal: i } : {}
523
- }, o), V = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => Re({
527
+ }, o), q = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => rt({
524
528
  method: "GET",
525
529
  path: e,
526
530
  params: t,
527
531
  signal: n,
528
532
  baseUrl: i
529
- }, r).then((e) => e.data), ze = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => Re({
533
+ }, r).then((e) => e.data), it = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => rt({
530
534
  method: "POST",
531
535
  path: e,
532
536
  params: n,
533
537
  data: t,
534
538
  signal: r,
535
539
  baseUrl: a
536
- }, i).then((e) => e.data), Be = { mustBeAuthenticated: !1 }, H = (e, { signal: t, baseUrl: n } = {}) => V(e, {
540
+ }, i).then((e) => e.data), at = { mustBeAuthenticated: !1 }, J = (e, { signal: t, baseUrl: n } = {}) => q(e, {
537
541
  signal: t,
538
542
  baseUrl: n,
539
- overlay: Be
540
- }), Ve = (e) => H("/v2/sollicitation/motifs", e), He = (e) => H("/v2/sollicitation/categories", e), Ue = (e) => H("/v2/sollicitation/types", e), We = (e) => H("/v2/sollicitation/natures", e), Ge = (e) => H("/v2/sollicitation/etats", e), Ke = ({ signal: e, baseUrl: t } = {}) => V("/v2/sollicitation/provenances", {
543
+ overlay: at
544
+ }), ot = (e) => J("/v2/sollicitation/motifs", e), st = (e) => J("/v2/sollicitation/categories", e), ct = (e) => J("/v2/sollicitation/types", e), lt = (e) => J("/v2/sollicitation/natures", e), ut = (e) => J("/v2/sollicitation/etats", e), dt = ({ signal: e, baseUrl: t } = {}) => q("/v2/sollicitation/provenances", {
541
545
  params: { estDesactive: !1 },
542
546
  signal: e,
543
547
  baseUrl: t,
544
- overlay: Be
545
- }), qe = ({ signal: e, baseUrl: t } = {}) => V("/collaborateurs", {
548
+ overlay: at
549
+ }), ft = ({ signal: e, baseUrl: t } = {}) => q("/collaborateurs", {
546
550
  params: { actif: !0 },
547
551
  signal: e,
548
552
  baseUrl: t
549
- }), Je = async ({ signal: e, baseUrl: t } = {}) => (await V("/v2/patrimoine/communes", {
553
+ }), pt = async ({ signal: e, baseUrl: t } = {}) => (await q("/v2/patrimoine/communes", {
550
554
  signal: e,
551
555
  baseUrl: t
552
556
  }) ?? []).map((e) => ({
553
557
  idCommune: e.id,
554
558
  commune: e.libelle
555
- })), Ye = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/entrees", {
559
+ })), mt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/entrees", {
556
560
  params: { idCommune: e },
557
561
  signal: t,
558
562
  baseUrl: n
559
- }), Xe = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/modules", {
563
+ }), ht = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/modules", {
560
564
  params: { codeProgramme: e },
561
565
  signal: t,
562
566
  baseUrl: n
563
- }), Ze = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => V("/v2/patrimoine/contrat_modules", {
567
+ }), gt = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => q("/v2/patrimoine/contrat_modules", {
564
568
  params: {
565
569
  idContrat: e,
566
570
  typeContrat: t
567
571
  },
568
572
  signal: n,
569
573
  baseUrl: r
570
- }), Qe = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => V("/v2/sollicitation/responsables", {
574
+ }), _t = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => q("/v2/sollicitation/responsables", {
571
575
  params: {
572
576
  motif: e,
573
577
  categorie: t,
@@ -576,11 +580,11 @@ var Ie = (e, t) => {
576
580
  },
577
581
  signal: i,
578
582
  baseUrl: a
579
- }), $e = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/contrat_module_rechercher", {
583
+ }), vt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/contrat_module_rechercher", {
580
584
  params: { recherche: e },
581
585
  signal: t,
582
586
  baseUrl: n
583
- }), et = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => V("/v2/cresol/reclamant_rechercher", {
587
+ }), yt = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => q("/v2/cresol/reclamant_rechercher", {
584
588
  params: {
585
589
  categorie: e,
586
590
  recherche: t
@@ -590,11 +594,11 @@ var Ie = (e, t) => {
590
594
  });
591
595
  //#endregion
592
596
  //#region src/utils/apiError.js
593
- function U(e) {
597
+ function bt(e) {
594
598
  let t = e?.response?.data;
595
599
  return t?.error ? t.error : t?.errorList ? t.errorList.map((e) => e.message).join(", ") : e?.response?.status === 500 ? "Erreur interne" : e?.response?.status === 401 ? "Non autorisé à faire cette action" : "Erreur";
596
600
  }
597
- var tt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", nt = Symbol("cresol:data"), rt = () => ({
601
+ var xt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", St = Symbol("cresol:data"), Ct = () => ({
598
602
  motifs: null,
599
603
  categories: null,
600
604
  types: null,
@@ -607,71 +611,71 @@ var tt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", nt = Sy
607
611
  modulesByProgramme: {},
608
612
  modulesByContrat: {},
609
613
  responsablesByMotif: {}
610
- }), W = /* @__PURE__ */ new Map(), it = (e) => (W.has(e) || W.set(e, v(rt())), W.get(e)), G = /* @__PURE__ */ new Map();
611
- function at() {
612
- W.clear(), G.clear();
614
+ }), wt = /* @__PURE__ */ new Map(), Tt = (e) => (wt.has(e) || wt.set(e, A(Ct())), wt.get(e)), Y = /* @__PURE__ */ new Map();
615
+ function Et() {
616
+ wt.clear(), Y.clear();
613
617
  }
614
- var K = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, q = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
615
- function ot({ onError: e, baseUrl: t } = {}) {
616
- let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) || B().baseUrl || "", o = () => it(a()), s = (t, r) => {
617
- let i = `${a()}|${t}`;
618
- if (G.has(i)) return G.get(i);
618
+ var X = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, Dt = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
619
+ function Ot({ onError: e, baseUrl: t } = {}) {
620
+ let n = j(0), r = () => ({ baseUrl: L(t) || null }), i = () => L(t) || $e().baseUrl || "", a = () => Tt(i()), o = (t, r) => {
621
+ let a = `${i()}|${t}`;
622
+ if (Y.has(a)) return Y.get(a);
619
623
  n.value += 1;
620
- let o = Promise.resolve().then(r).catch((t) => (tt(t) || e?.(U(t)), null)).finally(() => {
621
- --n.value, G.delete(i);
624
+ let o = Promise.resolve().then(r).catch((t) => (xt(t) || e?.(bt(t)), null)).finally(() => {
625
+ --n.value, Y.delete(a);
622
626
  });
623
- return G.set(i, o), o;
624
- }, c = (e, t) => o()[e]?.length ? Promise.resolve(o()[e]) : s(`referentiel:${e}`, async () => (o()[e] = await t(i()), o()[e])), l = {
627
+ return Y.set(a, o), o;
628
+ }, s = (e, t) => a()[e]?.length ? Promise.resolve(a()[e]) : o(`referentiel:${e}`, async () => (a()[e] = await t(r()), a()[e])), c = {
625
629
  get cache() {
626
- return o();
630
+ return a();
627
631
  },
628
632
  loading: n,
629
- isLoading: r(() => n.value > 0),
633
+ isLoading: v(() => n.value > 0),
630
634
  loadNomenclature() {
631
635
  return Promise.all([
632
- c("motifs", Ve),
633
- c("categories", He),
634
- c("types", Ue),
635
- c("natures", We),
636
- c("etats", Ge)
636
+ s("motifs", ot),
637
+ s("categories", st),
638
+ s("types", ct),
639
+ s("natures", lt),
640
+ s("etats", ut)
637
641
  ]);
638
642
  },
639
- loadCollaborateurs: () => c("collaborateurs", qe),
640
- loadProvenances: () => c("provenances", Ke),
643
+ loadCollaborateurs: () => s("collaborateurs", ft),
644
+ loadProvenances: () => s("provenances", dt),
641
645
  loadCommunes() {
642
- return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await Je(i()), o().communes));
646
+ return a().communes?.length ? Promise.resolve(a().communes) : o("communes", async () => (a().communes = await pt(r()), a().communes));
643
647
  },
644
648
  loadAdresses(e) {
645
- return e == null ? Promise.resolve([]) : o().adressesByCommune[e] ? Promise.resolve(o().adressesByCommune[e]) : s(`adresses:${e}`, async () => {
646
- let t = await Ye(e, i());
647
- return o().adressesByCommune[e] = t ?? [], t;
649
+ return e == null ? Promise.resolve([]) : a().adressesByCommune[e] ? Promise.resolve(a().adressesByCommune[e]) : o(`adresses:${e}`, async () => {
650
+ let t = await mt(e, r());
651
+ return a().adressesByCommune[e] = t ?? [], t;
648
652
  });
649
653
  },
650
654
  loadModulesOfProgramme(e) {
651
- return e == null ? Promise.resolve([]) : o().modulesByProgramme[e] ? Promise.resolve(o().modulesByProgramme[e]) : s(`modules:${e}`, async () => {
652
- let t = await Xe(e, i());
653
- return o().modulesByProgramme[e] = t ?? [], t;
655
+ return e == null ? Promise.resolve([]) : a().modulesByProgramme[e] ? Promise.resolve(a().modulesByProgramme[e]) : o(`modules:${e}`, async () => {
656
+ let t = await ht(e, r());
657
+ return a().modulesByProgramme[e] = t ?? [], t;
654
658
  });
655
659
  },
656
660
  loadModulesOfContrat({ idContrat: e, typeContrat: t }) {
657
661
  if (e == null) return Promise.resolve([]);
658
662
  let n = `${t ?? ""}|${e}`;
659
- return o().modulesByContrat[n] ? Promise.resolve(o().modulesByContrat[n]) : s(`contratModules:${n}`, async () => {
660
- let r = await Ze({
663
+ return a().modulesByContrat[n] ? Promise.resolve(a().modulesByContrat[n]) : o(`contratModules:${n}`, async () => {
664
+ let i = await gt({
661
665
  idContrat: e,
662
666
  typeContrat: t
663
- }, i());
664
- return o().modulesByContrat[n] = r ?? [], r;
667
+ }, r());
668
+ return a().modulesByContrat[n] = i ?? [], i;
665
669
  });
666
670
  },
667
671
  async searchContrats(e, { signal: t } = {}) {
668
672
  let n = (e ?? "").trim();
669
673
  if (!n) return [];
670
- let r = await $e(n, {
671
- ...i(),
674
+ let i = await vt(n, {
675
+ ...r(),
672
676
  signal: t
673
677
  }), a = /* @__PURE__ */ new Map();
674
- for (let e of r ?? []) {
678
+ for (let e of i ?? []) {
675
679
  let t = `${e.typeContrat}|${e.idContrat}`;
676
680
  (!a.has(t) || e.estModulePrincipal) && a.set(t, {
677
681
  typeContrat: e.typeContrat,
@@ -687,13 +691,13 @@ function ot({ onError: e, baseUrl: t } = {}) {
687
691
  return [...a.values()].sort((e, t) => Number(e.estSorti) - Number(t.estSorti) || (e.libelle ?? "").localeCompare(t.libelle ?? ""));
688
692
  },
689
693
  async searchReclamants(e, t, { signal: n } = {}) {
690
- let r = (t ?? "").trim();
691
- if (!r) return [];
692
- let a = await et({
694
+ let i = (t ?? "").trim();
695
+ if (!i) return [];
696
+ let a = await yt({
693
697
  categorie: e,
694
- recherche: r
698
+ recherche: i
695
699
  }, {
696
- ...i(),
700
+ ...r(),
697
701
  signal: n
698
702
  }), o = /* @__PURE__ */ new Map();
699
703
  for (let t of a ?? []) {
@@ -723,25 +727,25 @@ function ot({ onError: e, baseUrl: t } = {}) {
723
727
  };
724
728
  });
725
729
  },
726
- loadResponsables({ motif: e, categorie: t, type: n, nature: r }) {
727
- return e == null ? Promise.resolve([]) : o().responsablesByMotif[e] ? Promise.resolve(o().responsablesByMotif[e]) : s(`responsables:${e}`, async () => {
728
- let a = await Qe({
730
+ loadResponsables({ motif: e, categorie: t, type: n, nature: i }) {
731
+ return e == null ? Promise.resolve([]) : a().responsablesByMotif[e] ? Promise.resolve(a().responsablesByMotif[e]) : o(`responsables:${e}`, async () => {
732
+ let o = await _t({
729
733
  motif: e,
730
734
  categorie: t,
731
735
  type: n,
732
- nature: r
733
- }, i());
734
- return o().responsablesByMotif[e] = a ?? [], a;
736
+ nature: i
737
+ }, r());
738
+ return a().responsablesByMotif[e] = o ?? [], o;
735
739
  });
736
740
  },
737
- adressesOfCommune: (e) => o().adressesByCommune[e] ?? null,
738
- modulesOfProgramme: (e) => o().modulesByProgramme[e] ?? null,
739
- modulesOfContrat: ({ idContrat: e, typeContrat: t }) => o().modulesByContrat[`${t ?? ""}|${e}`] ?? null,
740
- allAdresses: () => Object.values(o().adressesByCommune).flat(),
741
+ adressesOfCommune: (e) => a().adressesByCommune[e] ?? null,
742
+ modulesOfProgramme: (e) => a().modulesByProgramme[e] ?? null,
743
+ modulesOfContrat: ({ idContrat: e, typeContrat: t }) => a().modulesByContrat[`${t ?? ""}|${e}`] ?? null,
744
+ allAdresses: () => Object.values(a().adressesByCommune).flat(),
741
745
  getResponsableSuggere({ idMotif: e, codeProgramme: t, codeTranche: n, codeBatiment: r, codeEscalier: i }) {
742
- let a = o().responsablesByMotif[e];
743
- if (!a?.length || t == null) return null;
744
- let s = a.filter((e) => String(e.codeProgramme) === String(t) && (e.codeTranche == null || e.codeTranche === n) && (e.codeBatiment == null || e.codeBatiment === r) && (e.codeEscalier == null || e.codeEscalier === i));
746
+ let o = a().responsablesByMotif[e];
747
+ if (!o?.length || t == null) return null;
748
+ let s = o.filter((e) => String(e.codeProgramme) === String(t) && (e.codeTranche == null || e.codeTranche === n) && (e.codeBatiment == null || e.codeBatiment === r) && (e.codeEscalier == null || e.codeEscalier === i));
745
749
  if (!s.length) return null;
746
750
  let c = (e) => (e.codeEscalier == null ? 0 : 4) + (e.codeBatiment == null ? 0 : 2) + (e.codeTranche == null ? 0 : 1), l = s.reduce((e, t) => c(t) > c(e) ? t : e);
747
751
  return {
@@ -749,54 +753,54 @@ function ot({ onError: e, baseUrl: t } = {}) {
749
753
  libelle: l.libelleResponsable
750
754
  };
751
755
  },
752
- motifLibelle: (e) => K(o().motifs, "id", e),
753
- categorieLibelle: (e) => K(o().categories, "id", e),
754
- typeLibelle: (e) => K(o().types, "id", e),
755
- natureLibelle: (e) => K(o().natures, "id", e),
756
- etatLibelle: (e) => K(o().etats, "code", e),
757
- motifIcon: (e) => q(o().motifs, "id", e),
758
- categorieIcon: (e) => q(o().categories, "id", e),
759
- typeIcon: (e) => q(o().types, "id", e),
760
- natureIcon: (e) => q(o().natures, "id", e)
756
+ motifLibelle: (e) => X(a().motifs, "id", e),
757
+ categorieLibelle: (e) => X(a().categories, "id", e),
758
+ typeLibelle: (e) => X(a().types, "id", e),
759
+ natureLibelle: (e) => X(a().natures, "id", e),
760
+ etatLibelle: (e) => X(a().etats, "code", e),
761
+ motifIcon: (e) => Dt(a().motifs, "id", e),
762
+ categorieIcon: (e) => Dt(a().categories, "id", e),
763
+ typeIcon: (e) => Dt(a().types, "id", e),
764
+ natureIcon: (e) => Dt(a().natures, "id", e)
761
765
  };
762
- return v(l);
766
+ return A(c);
763
767
  }
764
- function st(e) {
765
- return _(nt, e), e;
768
+ function kt(e) {
769
+ return pe(St, e), e;
766
770
  }
767
- function J() {
768
- let e = f(nt, null);
771
+ function Z() {
772
+ let e = de(St, null);
769
773
  if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
770
774
  return e;
771
775
  }
772
776
  //#endregion
773
777
  //#region src/utils/fontAwesomeIcons.js
774
- var ct = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
775
- async function Y(e) {
776
- let t = await import("@fortawesome/free-solid-svg-icons");
777
- [...new Set(e.filter(Boolean))].forEach((e) => {
778
- let n = t[ct(e)];
779
- n && oe.add(n);
778
+ var At = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
779
+ async function jt(t) {
780
+ let n = await import("@fortawesome/free-solid-svg-icons");
781
+ [...new Set(t.filter(Boolean))].forEach((t) => {
782
+ let r = n[At(t)];
783
+ r && e.add(r);
780
784
  });
781
785
  }
782
786
  //#endregion
783
787
  //#region src/utils/date.js
784
- function lt(e) {
788
+ function Mt(e) {
785
789
  return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
786
790
  }
787
- function ut(e) {
791
+ function Nt(e) {
788
792
  return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
789
793
  }
790
- function X(e) {
794
+ function Pt(e) {
791
795
  return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
792
796
  }
793
797
  //#endregion
794
798
  //#region src/composables/useCresolContext.js
795
- var dt = Symbol("cresol:options"), ft = (e) => _(dt, e), Z = () => f(dt, {}), pt = y(!1);
796
- Y(Object.values(A).map((e) => e.icon)).then(() => {
797
- pt.value = !0;
799
+ var Ft = Symbol("cresol:options"), It = (e) => pe(Ft, e), Q = () => de(Ft, {}), Lt = j(!1);
800
+ jt(Object.values(H).map((e) => e.icon)).then(() => {
801
+ Lt.value = !0;
798
802
  });
799
- var mt = {
803
+ var Rt = {
800
804
  name: "ReclamantTypeBadgeComponent",
801
805
  props: {
802
806
  reclamant: {
@@ -809,29 +813,29 @@ var mt = {
809
813
  }
810
814
  },
811
815
  setup() {
812
- return { iconsReady: pt };
816
+ return { iconsReady: Lt };
813
817
  },
814
818
  computed: { type() {
815
- return he(this.reclamant);
819
+ return Ae(this.reclamant);
816
820
  } }
817
- }, ht = ["title"], gt = { key: 1 };
818
- function _t(e, t, n, r, s, c) {
819
- let l = S("font-awesome-icon");
820
- return c.type ? (g(), o("span", {
821
+ }, zt = ["title"], Bt = { key: 1 };
822
+ function Vt(e, t, n, r, i, a) {
823
+ let o = P("font-awesome-icon");
824
+ return a.type ? (k(), x("span", {
821
825
  key: 0,
822
- class: m(["badge d-inline-flex align-items-center gap-1 border flex-shrink-0", `bg-${c.type.couleur}-subtle text-${c.type.couleur}-emphasis border-${c.type.couleur}-subtle`]),
823
- title: c.type.libelle
824
- }, [r.iconsReady ? (g(), i(l, {
826
+ class: D(["badge d-inline-flex align-items-center gap-1 border flex-shrink-0", `bg-${a.type.couleur}-subtle text-${a.type.couleur}-emphasis border-${a.type.couleur}-subtle`]),
827
+ title: a.type.libelle
828
+ }, [r.iconsReady ? (k(), y(o, {
825
829
  key: 0,
826
- icon: c.type.icon,
830
+ icon: a.type.icon,
827
831
  "fixed-width": ""
828
- }, null, 8, ["icon"])) : a("", !0), n.iconOnly ? a("", !0) : (g(), o("span", gt, C(c.type.libelle), 1))], 10, ht)) : a("", !0);
832
+ }, null, 8, ["icon"])) : b("", !0), n.iconOnly ? b("", !0) : (k(), x("span", Bt, F(a.type.libelle), 1))], 10, zt)) : b("", !0);
829
833
  }
830
- var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
834
+ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
831
835
  {
832
836
  key: "locataire",
833
837
  label: "Locataire",
834
- icon: A.locataire.icon,
838
+ icon: H.locataire.icon,
835
839
  recherche: "Rechercher un locataire",
836
840
  aucun: "Aucun locataire trouvé.",
837
841
  placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
@@ -839,7 +843,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
839
843
  {
840
844
  key: "demandeur",
841
845
  label: "Demandeur",
842
- icon: A.demandeur.icon,
846
+ icon: H.demandeur.icon,
843
847
  recherche: "Rechercher un demandeur",
844
848
  aucun: "Aucun demandeur trouvé.",
845
849
  placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
@@ -847,7 +851,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
847
851
  {
848
852
  key: "tiers",
849
853
  label: "Tiers",
850
- icon: A.tiers.icon,
854
+ icon: H.tiers.icon,
851
855
  recherche: "Rechercher un tiers",
852
856
  aucun: "Aucun tiers trouvé.",
853
857
  placeholder: "Raison sociale, adresse, téléphone ou mail…"
@@ -855,7 +859,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
855
859
  {
856
860
  key: "autre",
857
861
  label: "Autre",
858
- icon: A.autre.icon,
862
+ icon: H.autre.icon,
859
863
  recherche: "Rechercher un individu « Autre »",
860
864
  aucun: "Aucun individu « Autre » trouvé.",
861
865
  placeholder: "Nom, prénom, adresse, téléphone ou mail…"
@@ -863,7 +867,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
863
867
  {
864
868
  key: "fournisseur",
865
869
  label: "Fournisseur",
866
- icon: A.fournisseur.icon,
870
+ icon: H.fournisseur.icon,
867
871
  recherche: "Rechercher un fournisseur",
868
872
  aucun: "Aucun fournisseur trouvé.",
869
873
  placeholder: "Raison sociale, adresse, téléphone ou mail…"
@@ -871,7 +875,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
871
875
  {
872
876
  key: "personnel",
873
877
  label: "Personnel",
874
- icon: A.personnel.icon,
878
+ icon: H.personnel.icon,
875
879
  recherche: "Rechercher un collaborateur",
876
880
  aucun: "Aucun collaborateur trouvé.",
877
881
  placeholder: "Nom, prénom, téléphone ou mail…"
@@ -884,21 +888,21 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
884
888
  aucun: "Aucun réclamant trouvé.",
885
889
  placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
886
890
  }
887
- ], yt = {
891
+ ], Wt = {
888
892
  signataire: "Signataire",
889
893
  occupant: "Occupant",
890
894
  demandeur: "Demandeur"
891
- }, bt = {
895
+ }, Gt = {
892
896
  name: "ReclamantRechercheBlock",
893
897
  components: {
894
- AmsomAutocomplete: D,
895
- ReclamantTypeBadgeComponent: vt
898
+ AmsomAutocomplete: z,
899
+ ReclamantTypeBadgeComponent: Ht
896
900
  },
897
901
  setup() {
898
902
  return {
899
- draft: R(),
900
- data: J(),
901
- options: Z()
903
+ draft: G(),
904
+ data: Z(),
905
+ options: Q()
902
906
  };
903
907
  },
904
908
  data() {
@@ -912,16 +916,16 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
912
916
  },
913
917
  computed: {
914
918
  typesAutorises() {
915
- return this.options.typesReclamant ?? M;
919
+ return this.options.typesReclamant ?? U;
916
920
  },
917
921
  autorisees() {
918
- return me(this.typesAutorises);
922
+ return Oe(this.typesAutorises);
919
923
  },
920
924
  categories() {
921
- return Q.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
925
+ return Ut.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
922
926
  },
923
927
  categorieCourante() {
924
- return Q.find((e) => e.key === this.categorie);
928
+ return Ut.find((e) => e.key === this.categorie);
925
929
  },
926
930
  selectionne() {
927
931
  return this.draft.reclamantSelectionne;
@@ -936,7 +940,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
936
940
  }
937
941
  },
938
942
  async created() {
939
- this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await Y(Q.map((e) => e.icon)), this.iconsReady = !0;
943
+ this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await jt(Ut.map((e) => e.icon)), this.iconsReady = !0;
940
944
  },
941
945
  beforeUnmount() {
942
946
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
@@ -963,11 +967,11 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
963
967
  return e ? `${e.type}|${e.id}` : null;
964
968
  },
965
969
  categorieOf(e) {
966
- let t = N(e);
970
+ let t = ke(e);
967
971
  return this.autorisees.includes(t) ? t : null;
968
972
  },
969
973
  sortiLibelle(e) {
970
- return e?.dateSortie == null ? "sorti" : `sorti le ${X(e.dateSortie)}`;
974
+ return e?.dateSortie == null ? "sorti" : `sorti le ${Pt(e.dateSortie)}`;
971
975
  },
972
976
  nomsOf(e) {
973
977
  return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
@@ -980,72 +984,72 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
980
984
  referenceOf(e) {
981
985
  if (!e?.individus) return "";
982
986
  let t = this.categorieOf(e);
983
- return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : he(e).libelle;
987
+ return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : Ae(e).libelle;
984
988
  },
985
989
  detailOf(e) {
986
990
  let t = e?.individus ?? [];
987
- if (!["locataire", "demandeur"].includes(N(e))) {
991
+ if (!["locataire", "demandeur"].includes(ke(e))) {
988
992
  let e = t[0];
989
993
  return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
990
994
  }
991
995
  return t.map((t) => {
992
- let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${X(t.dateSortie)}` : null, i = [yt[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
996
+ let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${Pt(t.dateSortie)}` : null, i = [Wt[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
993
997
  return i ? `${n} (${i})` : n;
994
998
  }).join(", ");
995
999
  }
996
1000
  }
997
- }, xt = {
1001
+ }, Kt = {
998
1002
  key: 0,
999
1003
  class: "d-flex flex-column gap-3"
1000
- }, St = { class: "d-flex flex-wrap gap-2" }, Ct = ["onClick"], wt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Tt = { class: "min-w-0" }, Et = {
1004
+ }, qt = { class: "d-flex flex-wrap gap-2" }, Jt = ["onClick"], Yt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Xt = { class: "min-w-0" }, Zt = {
1001
1005
  key: 0,
1002
1006
  class: "badge bg-warning-subtle text-warning-emphasis ms-1"
1003
- }, Dt = { class: "text-muted d-block text-truncate" }, Ot = { key: 0 }, kt = {
1007
+ }, Qt = { class: "text-muted d-block text-truncate" }, $t = { key: 0 }, en = {
1004
1008
  key: 0,
1005
1009
  class: "text-muted d-block text-truncate"
1006
- }, At = {
1010
+ }, tn = {
1007
1011
  key: 0,
1008
1012
  class: "text-muted"
1009
1013
  };
1010
- function jt(e, t, r, c, d, f) {
1011
- let p = S("font-awesome-icon"), h = S("reclamant-type-badge-component"), _ = S("amsom-autocomplete");
1012
- return d.iconsReady ? (g(), o("div", xt, [s("div", null, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), s("div", St, [(g(!0), o(n, null, b(f.categories, (e) => (g(), o("button", {
1014
+ function nn(e, t, n, r, i, a) {
1015
+ let o = P("font-awesome-icon"), s = P("reclamant-type-badge-component"), c = P("amsom-autocomplete");
1016
+ return i.iconsReady ? (k(), x("div", Kt, [S("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), S("div", qt, [(k(!0), x(_, null, M(a.categories, (e) => (k(), x("button", {
1013
1017
  key: e.key,
1014
1018
  type: "button",
1015
- class: m(["btn btn-sm d-inline-flex align-items-center gap-2", d.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
1016
- onClick: (t) => f.setCategorie(e.key)
1017
- }, [u(p, {
1019
+ class: D(["btn btn-sm d-inline-flex align-items-center gap-2", i.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
1020
+ onClick: (t) => a.setCategorie(e.key)
1021
+ }, [T(o, {
1018
1022
  icon: e.icon,
1019
1023
  "fixed-width": ""
1020
- }, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10, Ct))), 128))])]), s("div", null, [
1021
- s("label", wt, C(f.categorieCourante.recherche), 1),
1022
- (g(), i(_, {
1023
- key: d.categorie,
1024
- modelValue: f.selectedTrouve,
1025
- "onUpdate:modelValue": t[0] ||= (e) => f.selectedTrouve = e,
1026
- items: d.trouves,
1024
+ }, null, 8, ["icon"]), S("span", null, F(e.label), 1)], 10, Jt))), 128))])]), S("div", null, [
1025
+ S("label", Yt, F(a.categorieCourante.recherche), 1),
1026
+ (k(), y(c, {
1027
+ key: i.categorie,
1028
+ modelValue: a.selectedTrouve,
1029
+ "onUpdate:modelValue": t[0] ||= (e) => a.selectedTrouve = e,
1030
+ items: i.trouves,
1027
1031
  "filtering-function": ({ items: e }) => e,
1028
- loading: d.rechercheEnCours,
1029
- "get-id": f.cleReclamant,
1032
+ loading: i.rechercheEnCours,
1033
+ "get-id": a.cleReclamant,
1030
1034
  "get-input-libelle": (e) => e?.libelle ?? "",
1031
- placeholder: f.categorieCourante.placeholder,
1035
+ placeholder: a.categorieCourante.placeholder,
1032
1036
  "input-size": "sm",
1033
1037
  "hide-choices": "",
1034
1038
  "debounce-delay": 0,
1035
- onSearch: f.rechercherPlusTard
1039
+ onSearch: a.rechercherPlusTard
1036
1040
  }, {
1037
- options: E((e) => [s("div", Tt, [
1038
- s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
1039
- u(h, {
1041
+ options: R((e) => [S("div", Xt, [
1042
+ S("div", { class: D(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
1043
+ T(s, {
1040
1044
  reclamant: e,
1041
1045
  "icon-only": "",
1042
1046
  class: "me-1"
1043
1047
  }, null, 8, ["reclamant"]),
1044
- l(" " + C(f.titreOf(e)) + " ", 1),
1045
- e?.estActif ? a("", !0) : (g(), o("span", Et, C(f.categorieOf(e) === "demandeur" ? "inactive" : f.sortiLibelle(e)), 1))
1048
+ w(" " + F(a.titreOf(e)) + " ", 1),
1049
+ e?.estActif ? b("", !0) : (k(), x("span", Zt, F(a.categorieOf(e) === "demandeur" ? "inactive" : a.sortiLibelle(e)), 1))
1046
1050
  ], 2),
1047
- s("small", Dt, [l(C(f.referenceOf(e)) + " ", 1), e?.adresse ? (g(), o("span", Ot, " — " + C(e.adresse), 1)) : a("", !0)]),
1048
- f.detailOf(e) ? (g(), o("small", kt, C(f.detailOf(e)), 1)) : a("", !0)
1051
+ S("small", Qt, [w(F(a.referenceOf(e)) + " ", 1), e?.adresse ? (k(), x("span", $t, " — " + F(e.adresse), 1)) : b("", !0)]),
1052
+ a.detailOf(e) ? (k(), x("small", en, F(a.detailOf(e)), 1)) : b("", !0)
1049
1053
  ])]),
1050
1054
  _: 1
1051
1055
  }, 8, [
@@ -1058,16 +1062,16 @@ function jt(e, t, r, c, d, f) {
1058
1062
  "placeholder",
1059
1063
  "onSearch"
1060
1064
  ])),
1061
- d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small", At, C(f.categorieCourante.aucun), 1)) : a("", !0)
1062
- ])])) : a("", !0);
1065
+ i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (k(), x("small", tn, F(a.categorieCourante.aucun), 1)) : b("", !0)
1066
+ ])])) : b("", !0);
1063
1067
  }
1064
- var Mt = /*#__PURE__*/ z(bt, [["render", jt]]), Nt = {
1068
+ var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
1065
1069
  name: "ProvenanceSelecteurBlock",
1066
1070
  setup() {
1067
1071
  return {
1068
- draft: R(),
1069
- data: J(),
1070
- options: Z()
1072
+ draft: G(),
1073
+ data: Z(),
1074
+ options: Q()
1071
1075
  };
1072
1076
  },
1073
1077
  data() {
@@ -1091,62 +1095,62 @@ var Mt = /*#__PURE__*/ z(bt, [["render", jt]]), Nt = {
1091
1095
  }
1092
1096
  },
1093
1097
  async created() {
1094
- await Y([...Object.values(k), le]), this.iconsReady = !0;
1098
+ await jt([...Object.values(V), Se]), this.iconsReady = !0;
1095
1099
  },
1096
- methods: { iconOf: ue }
1097
- }, Pt = {
1100
+ methods: { iconOf: Ce }
1101
+ }, on = {
1098
1102
  key: 0,
1099
1103
  class: "fs-7 text-muted"
1100
- }, Ft = { class: "fw-medium" }, It = { key: 1 }, Lt = { class: "d-flex flex-wrap gap-2" }, Rt = ["onClick"], zt = {
1104
+ }, sn = { class: "fw-medium" }, cn = { key: 1 }, ln = { class: "d-flex flex-wrap gap-2" }, un = ["onClick"], dn = {
1101
1105
  key: 0,
1102
1106
  class: "fs-7 text-danger mt-1"
1103
1107
  };
1104
- function Bt(e, t, r, c, u, d) {
1105
- let f = S("font-awesome-icon");
1106
- return c.draft.isReadonly("provenance") ? (g(), o("div", Pt, [t[0] ||= l(" Provenance du contact : ", -1), s("span", Ft, [u.iconsReady && d.selected ? (g(), i(f, {
1108
+ function fn(e, t, n, r, i, a) {
1109
+ let o = P("font-awesome-icon");
1110
+ return r.draft.isReadonly("provenance") ? (k(), x("div", on, [t[0] ||= w(" Provenance du contact : ", -1), S("span", sn, [i.iconsReady && a.selected ? (k(), y(o, {
1107
1111
  key: 0,
1108
- icon: d.iconOf(d.selected),
1112
+ icon: a.iconOf(a.selected),
1109
1113
  "fixed-width": ""
1110
- }, null, 8, ["icon"])) : a("", !0), l(" " + C(d.libelleFige), 1)])])) : (g(), o("div", It, [
1111
- t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [l(" Provenance du contact "), s("span", { class: "text-danger" }, "*")], -1),
1112
- s("div", Lt, [(g(!0), o(n, null, b(d.provenances, (e) => (g(), o("button", {
1114
+ }, null, 8, ["icon"])) : b("", !0), w(" " + F(a.libelleFige), 1)])])) : (k(), x("div", cn, [
1115
+ t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [w(" Provenance du contact "), S("span", { class: "text-danger" }, "*")], -1),
1116
+ S("div", ln, [(k(!0), x(_, null, M(a.provenances, (e) => (k(), x("button", {
1113
1117
  key: e.id,
1114
1118
  type: "button",
1115
- class: m(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === d.selected ? "btn-primary" : "btn-outline-primary"]),
1116
- onClick: (t) => c.draft.setProvenance(e.id)
1117
- }, [u.iconsReady ? (g(), i(f, {
1119
+ class: D(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === a.selected ? "btn-primary" : "btn-outline-primary"]),
1120
+ onClick: (t) => r.draft.setProvenance(e.id)
1121
+ }, [i.iconsReady ? (k(), y(o, {
1118
1122
  key: 0,
1119
1123
  icon: e.icon,
1120
1124
  "fixed-width": ""
1121
- }, null, 8, ["icon"])) : a("", !0), s("span", null, C(e.libelle), 1)], 10, Rt))), 128))]),
1122
- d.loaded && !d.provenanceChoisie ? (g(), o("div", zt, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : a("", !0)
1125
+ }, null, 8, ["icon"])) : b("", !0), S("span", null, F(e.libelle), 1)], 10, un))), 128))]),
1126
+ a.loaded && !a.provenanceChoisie ? (k(), x("div", dn, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : b("", !0)
1123
1127
  ]));
1124
1128
  }
1125
- var Vt = /*#__PURE__*/ z(Nt, [["render", Bt]]), Ht = {
1129
+ var pn = /*#__PURE__*/ K(an, [["render", fn]]), mn = {
1126
1130
  name: "EtapeReclamantBlock",
1127
1131
  components: {
1128
- ReclamantRechercheBlock: Mt,
1129
- ProvenanceSelecteurBlock: Vt
1132
+ ReclamantRechercheBlock: rn,
1133
+ ProvenanceSelecteurBlock: pn
1130
1134
  },
1131
1135
  props: { premiere: {
1132
1136
  type: Boolean,
1133
1137
  default: !1
1134
1138
  } },
1135
1139
  setup() {
1136
- return { draft: R() };
1140
+ return { draft: G() };
1137
1141
  }
1138
- }, Ut = { class: "d-flex flex-column gap-3" }, Wt = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
1139
- function Gt(e, t, n, r, c, d) {
1140
- let f = S("provenance-selecteur-block"), p = S("font-awesome-icon"), m = S("reclamant-recherche-block");
1141
- return g(), o("div", Ut, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
1142
+ }, hn = { class: "d-flex flex-column gap-3" }, gn = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
1143
+ function _n(e, t, n, r, i, a) {
1144
+ let o = P("provenance-selecteur-block"), s = P("font-awesome-icon"), c = P("reclamant-recherche-block");
1145
+ return k(), x("div", hn, [n.premiere ? (k(), y(o, { key: 0 })) : b("", !0), N(e.$slots, "reclamant", {
1142
1146
  reclamant: r.draft.reclamantSelectionne,
1143
1147
  select: r.draft.selectReclamant
1144
- }, () => [s("div", Wt, [u(p, {
1148
+ }, () => [S("div", gn, [T(s, {
1145
1149
  icon: "user",
1146
1150
  class: "text-primary me-2"
1147
- }), t[0] ||= l(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), u(m)])]);
1151
+ }), t[0] ||= w(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), T(c)])]);
1148
1152
  }
1149
- var Kt = /*#__PURE__*/ z(Ht, [["render", Gt]]);
1153
+ var vn = /*#__PURE__*/ K(mn, [["render", _n]]);
1150
1154
  //#endregion
1151
1155
  //#region src/utils/text.js
1152
1156
  function $(e, t = !0) {
@@ -1156,11 +1160,11 @@ function $(e, t = !0) {
1156
1160
  }
1157
1161
  //#endregion
1158
1162
  //#region src/components/ReclamantSelecteurBlock.vue
1159
- var qt = {
1163
+ var yn = {
1160
1164
  name: "ReclamantSelecteurBlock",
1161
1165
  components: {
1162
- AmsomAutocomplete: D,
1163
- ReclamantTypeBadgeComponent: vt
1166
+ AmsomAutocomplete: z,
1167
+ ReclamantTypeBadgeComponent: Ht
1164
1168
  },
1165
1169
  props: {
1166
1170
  mode: {
@@ -1174,8 +1178,8 @@ var qt = {
1174
1178
  },
1175
1179
  setup() {
1176
1180
  return {
1177
- draft: R(),
1178
- options: Z()
1181
+ draft: G(),
1182
+ options: Q()
1179
1183
  };
1180
1184
  },
1181
1185
  computed: {
@@ -1205,42 +1209,42 @@ var qt = {
1205
1209
  return n ? t.filter((e) => ($(e?.libelle) ?? "").includes(n)) : t;
1206
1210
  }
1207
1211
  }
1208
- }, Jt = {
1212
+ }, bn = {
1209
1213
  key: 0,
1210
1214
  class: "fs-7 text-muted"
1211
- }, Yt = { class: "fw-medium" }, Xt = {
1215
+ }, xn = { class: "fw-medium" }, Sn = {
1212
1216
  key: 0,
1213
1217
  class: "btn-group btn-group-sm",
1214
1218
  role: "group"
1215
- }, Zt = ["onClick"], Qt = ["value"], $t = ["value"];
1216
- function en(e, t, r, a, c, d) {
1217
- let f = S("reclamant-type-badge-component"), p = S("amsom-autocomplete");
1218
- return d.estFige ? (g(), o("div", Jt, [t[2] ||= l(" Réclamant : ", -1), s("span", Yt, C(d.reclamantSelectionne?.libelle), 1)])) : (g(), o("div", {
1219
+ }, Cn = ["onClick"], wn = ["value"], Tn = ["value"];
1220
+ function En(e, t, n, r, i, a) {
1221
+ let o = P("reclamant-type-badge-component"), s = P("amsom-autocomplete");
1222
+ return a.estFige ? (k(), x("div", bn, [t[2] ||= w(" Réclamant : ", -1), S("span", xn, F(a.reclamantSelectionne?.libelle), 1)])) : (k(), x("div", {
1219
1223
  key: 1,
1220
- class: m(r.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
1221
- }, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), d.presentation === "switch" ? (g(), o("div", Xt, [(g(!0), o(n, null, b(d.reclamants, (e, t) => (g(), o("button", {
1224
+ class: D(n.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
1225
+ }, [t[3] ||= S("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), a.presentation === "switch" ? (k(), x("div", Sn, [(k(!0), x(_, null, M(a.reclamants, (e, t) => (k(), x("button", {
1222
1226
  key: t,
1223
1227
  type: "button",
1224
- class: m(["btn btn-sm py-0", e === d.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
1225
- onClick: (t) => d.select(e)
1226
- }, C(e.libelle), 11, Zt))), 128))])) : d.presentation === "autocomplete" ? (g(), i(p, {
1228
+ class: D(["btn btn-sm py-0", e === a.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
1229
+ onClick: (t) => a.select(e)
1230
+ }, F(e.libelle), 11, Cn))), 128))])) : a.presentation === "autocomplete" ? (k(), y(s, {
1227
1231
  key: 1,
1228
- "model-value": d.reclamantSelectionne,
1229
- items: d.reclamants,
1230
- "get-id": d.reclamantId,
1232
+ "model-value": a.reclamantSelectionne,
1233
+ items: a.reclamants,
1234
+ "get-id": a.reclamantId,
1231
1235
  "get-input-libelle": (e) => e?.libelle ?? "",
1232
- "filtering-function": d.filterReclamants,
1236
+ "filtering-function": a.filterReclamants,
1233
1237
  placeholder: "Rechercher un réclamant…",
1234
1238
  "input-size": "sm",
1235
1239
  "hide-choices": "",
1236
- class: m(r.inline ? "" : "w-100"),
1237
- "onUpdate:modelValue": t[0] ||= (e) => d.select(e)
1240
+ class: D(n.inline ? "" : "w-100"),
1241
+ "onUpdate:modelValue": t[0] ||= (e) => a.select(e)
1238
1242
  }, {
1239
- options: E((e) => [u(f, {
1243
+ options: R((e) => [T(o, {
1240
1244
  reclamant: e,
1241
1245
  "icon-only": "",
1242
1246
  class: "me-1"
1243
- }, null, 8, ["reclamant"]), l(" " + C(e?.libelle), 1)]),
1247
+ }, null, 8, ["reclamant"]), w(" " + F(e?.libelle), 1)]),
1244
1248
  _: 1
1245
1249
  }, 8, [
1246
1250
  "model-value",
@@ -1249,25 +1253,25 @@ function en(e, t, r, a, c, d) {
1249
1253
  "get-input-libelle",
1250
1254
  "filtering-function",
1251
1255
  "class"
1252
- ])) : (g(), o("select", {
1256
+ ])) : (k(), x("select", {
1253
1257
  key: 2,
1254
- class: m(["form-select form-select-sm", r.inline ? "w-auto" : ""]),
1255
- value: d.reclamants.indexOf(d.reclamantSelectionne),
1256
- onChange: t[1] ||= (e) => d.select(d.reclamants[e.target.value])
1257
- }, [(g(!0), o(n, null, b(d.reclamants, (e, t) => (g(), o("option", {
1258
+ class: D(["form-select form-select-sm", n.inline ? "w-auto" : ""]),
1259
+ value: a.reclamants.indexOf(a.reclamantSelectionne),
1260
+ onChange: t[1] ||= (e) => a.select(a.reclamants[e.target.value])
1261
+ }, [(k(!0), x(_, null, M(a.reclamants, (e, t) => (k(), x("option", {
1258
1262
  key: t,
1259
1263
  value: t
1260
- }, C(e.libelle), 9, $t))), 128))], 42, Qt))], 2));
1264
+ }, F(e.libelle), 9, Tn))), 128))], 42, wn))], 2));
1261
1265
  }
1262
1266
  //#endregion
1263
1267
  //#region src/components/EtapeCategorieBlock.vue
1264
- var tn = {
1268
+ var Dn = {
1265
1269
  name: "EtapeCategorieBlock",
1266
1270
  components: {
1267
- AmsomOverlay: t,
1268
- AmsomAutocomplete: D,
1269
- ReclamantSelecteurBlock: /* @__PURE__ */ z(qt, [["render", en]]),
1270
- ProvenanceSelecteurBlock: Vt
1271
+ AmsomOverlay: g,
1272
+ AmsomAutocomplete: z,
1273
+ ReclamantSelecteurBlock: /* @__PURE__ */ K(yn, [["render", En]]),
1274
+ ProvenanceSelecteurBlock: pn
1271
1275
  },
1272
1276
  props: { premiere: {
1273
1277
  type: Boolean,
@@ -1275,9 +1279,9 @@ var tn = {
1275
1279
  } },
1276
1280
  setup() {
1277
1281
  return {
1278
- draft: R(),
1279
- data: J(),
1280
- options: Z()
1282
+ draft: G(),
1283
+ data: Z(),
1284
+ options: Q()
1281
1285
  };
1282
1286
  },
1283
1287
  data() {
@@ -1394,7 +1398,7 @@ var tn = {
1394
1398
  });
1395
1399
  },
1396
1400
  registerIcons() {
1397
- return Y([
1401
+ return jt([
1398
1402
  ...this.data.cache.categories ?? [],
1399
1403
  ...this.data.cache.types ?? [],
1400
1404
  ...this.data.cache.natures ?? [],
@@ -1429,57 +1433,57 @@ var tn = {
1429
1433
  return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
1430
1434
  }
1431
1435
  }
1432
- }, nn = {
1436
+ }, On = {
1433
1437
  key: 0,
1434
1438
  class: "d-flex flex-column gap-3"
1435
- }, rn = { key: 2 }, an = { class: "d-flex flex-wrap align-items-center gap-2" }, on = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, sn = { key: 3 }, cn = { class: "d-flex align-items-center gap-2" }, ln = { class: "min-w-0" }, un = { class: "fw-medium text-truncate" }, dn = { class: "text-muted d-block text-truncate" }, fn = {
1439
+ }, kn = { key: 2 }, An = { class: "d-flex flex-wrap align-items-center gap-2" }, jn = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, Mn = { key: 3 }, Nn = { class: "d-flex align-items-center gap-2" }, Pn = { class: "min-w-0" }, Fn = { class: "fw-medium text-truncate" }, In = { class: "text-muted d-block text-truncate" }, Ln = {
1436
1440
  key: 4,
1437
1441
  class: "d-flex align-items-center gap-2 text-muted fs-7"
1438
- }, pn = {
1442
+ }, Rn = {
1439
1443
  key: 5,
1440
1444
  class: "d-flex flex-wrap align-items-center gap-2"
1441
- }, mn = ["onClick"], hn = { key: 6 }, gn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, _n = { class: "row justify-content-around g-3" }, vn = ["title", "onClick"], yn = { class: "fs-7 mt-1 lh-sm" }, bn = {
1445
+ }, zn = ["onClick"], Bn = { key: 6 }, Vn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, Hn = { class: "row justify-content-around g-3" }, Un = ["title", "onClick"], Wn = { class: "fs-7 mt-1 lh-sm" }, Gn = {
1442
1446
  key: 0,
1443
1447
  class: "col-12 text-muted fs-7"
1444
- }, xn = [
1448
+ }, Kn = [
1445
1449
  "id",
1446
1450
  "checked",
1447
1451
  "disabled",
1448
1452
  "onChange"
1449
- ], Sn = ["for"];
1450
- function Cn(e, t, r, c, d, f) {
1451
- let p = S("provenance-selecteur-block"), m = S("reclamant-selecteur-block"), h = S("font-awesome-icon"), _ = S("amsom-autocomplete"), v = S("amsom-overlay");
1452
- return g(), i(v, { loading: c.data.isLoading && !c.data.cache.motifs || !d.iconsReady }, {
1453
- default: E(() => [d.iconsReady ? (g(), o("div", nn, [
1454
- r.premiere ? (g(), i(p, { key: 0 })) : a("", !0),
1455
- c.options.reclamantMode === "step" ? a("", !0) : (g(), i(m, { key: 1 })),
1456
- f.motifFige && f.selectionChain.length ? (g(), o("div", rn, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), s("div", an, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1453
+ ], qn = ["for"];
1454
+ function Jn(e, t, n, r, i, a) {
1455
+ let o = P("provenance-selecteur-block"), s = P("reclamant-selecteur-block"), c = P("font-awesome-icon"), l = P("amsom-autocomplete"), u = P("amsom-overlay");
1456
+ return k(), y(u, { loading: r.data.isLoading && !r.data.cache.motifs || !i.iconsReady }, {
1457
+ default: R(() => [i.iconsReady ? (k(), x("div", On, [
1458
+ n.premiere ? (k(), y(o, { key: 0 })) : b("", !0),
1459
+ r.options.reclamantMode === "step" ? b("", !0) : (k(), y(s, { key: 1 })),
1460
+ a.motifFige && a.selectionChain.length ? (k(), x("div", kn, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), S("div", An, [(k(!0), x(_, null, M(a.selectionChain, (e, t) => (k(), x(_, { key: e.level }, [t > 0 ? (k(), y(c, {
1457
1461
  key: 0,
1458
1462
  icon: "fa-solid fa-chevron-right",
1459
1463
  class: "text-muted fs-7"
1460
- })) : a("", !0), s("span", on, [e.icon ? (g(), i(h, {
1464
+ })) : b("", !0), S("span", jn, [e.icon ? (k(), y(c, {
1461
1465
  key: 0,
1462
1466
  icon: e.icon,
1463
1467
  "fixed-width": ""
1464
- }, null, 8, ["icon"])) : a("", !0), l(" " + C(e.libelle), 1)])], 64))), 128))])])) : a("", !0),
1465
- f.motifFige ? a("", !0) : (g(), o("div", sn, [t[2] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), u(_, {
1466
- modelValue: f.motifRecherche,
1467
- "onUpdate:modelValue": t[0] ||= (e) => f.motifRecherche = e,
1468
- items: f.allowedMotifs,
1469
- "get-id": f.getMotifId,
1470
- "get-input-libelle": f.getMotifInputLibelle,
1471
- "get-input-libelle-from-id": f.motifLibelleFromId,
1472
- "filtering-function": f.filterMotifs,
1468
+ }, null, 8, ["icon"])) : b("", !0), w(" " + F(e.libelle), 1)])], 64))), 128))])])) : b("", !0),
1469
+ a.motifFige ? b("", !0) : (k(), x("div", Mn, [t[2] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), T(l, {
1470
+ modelValue: a.motifRecherche,
1471
+ "onUpdate:modelValue": t[0] ||= (e) => a.motifRecherche = e,
1472
+ items: a.allowedMotifs,
1473
+ "get-id": a.getMotifId,
1474
+ "get-input-libelle": a.getMotifInputLibelle,
1475
+ "get-input-libelle-from-id": a.motifLibelleFromId,
1476
+ "filtering-function": a.filterMotifs,
1473
1477
  placeholder: "Rechercher (motif, catégorie, type, nature)…",
1474
1478
  "input-size": "sm",
1475
1479
  "hide-choices": ""
1476
1480
  }, {
1477
- options: E((e) => [s("div", cn, [e?.icon ? (g(), i(h, {
1481
+ options: R((e) => [S("div", Nn, [e?.icon ? (k(), y(c, {
1478
1482
  key: 0,
1479
1483
  icon: e.icon,
1480
1484
  class: "text-primary",
1481
1485
  "fixed-width": ""
1482
- }, null, 8, ["icon"])) : a("", !0), s("div", ln, [s("div", un, C(e?.libelle), 1), s("small", dn, C(e?.categorie) + " › " + C(e?.type) + " › " + C(e?.nature), 1)])])]),
1486
+ }, null, 8, ["icon"])) : b("", !0), S("div", Pn, [S("div", Fn, F(e?.libelle), 1), S("small", In, F(e?.categorie) + " › " + F(e?.type) + " › " + F(e?.nature), 1)])])]),
1483
1487
  _: 1
1484
1488
  }, 8, [
1485
1489
  "modelValue",
@@ -1489,67 +1493,67 @@ function Cn(e, t, r, c, d, f) {
1489
1493
  "get-input-libelle-from-id",
1490
1494
  "filtering-function"
1491
1495
  ])])),
1492
- f.motifFige ? a("", !0) : (g(), o("div", fn, [...t[3] ||= [
1493
- s("hr", { class: "flex-grow-1 my-0" }, null, -1),
1494
- s("span", null, "ou sélection guidée", -1),
1495
- s("hr", { class: "flex-grow-1 my-0" }, null, -1)
1496
+ a.motifFige ? b("", !0) : (k(), x("div", Ln, [...t[3] ||= [
1497
+ S("hr", { class: "flex-grow-1 my-0" }, null, -1),
1498
+ S("span", null, "ou sélection guidée", -1),
1499
+ S("hr", { class: "flex-grow-1 my-0" }, null, -1)
1496
1500
  ]])),
1497
- !f.motifFige && f.selectionChain.length ? (g(), o("div", pn, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1501
+ !a.motifFige && a.selectionChain.length ? (k(), x("div", Rn, [(k(!0), x(_, null, M(a.selectionChain, (e, t) => (k(), x(_, { key: e.level }, [t > 0 ? (k(), y(c, {
1498
1502
  key: 0,
1499
1503
  icon: "fa-solid fa-chevron-right",
1500
1504
  class: "text-muted fs-7"
1501
- })) : a("", !0), s("button", {
1505
+ })) : b("", !0), S("button", {
1502
1506
  type: "button",
1503
1507
  class: "btn btn-sm btn-primary rounded-pill d-inline-flex align-items-center gap-2",
1504
- onClick: (t) => f.goBackTo(e.level)
1508
+ onClick: (t) => a.goBackTo(e.level)
1505
1509
  }, [
1506
- e.icon ? (g(), i(h, {
1510
+ e.icon ? (k(), y(c, {
1507
1511
  key: 0,
1508
1512
  icon: e.icon,
1509
1513
  "fixed-width": ""
1510
- }, null, 8, ["icon"])) : a("", !0),
1511
- s("span", null, C(e.libelle), 1),
1512
- u(h, {
1514
+ }, null, 8, ["icon"])) : b("", !0),
1515
+ S("span", null, F(e.libelle), 1),
1516
+ T(c, {
1513
1517
  icon: "fa-solid fa-xmark",
1514
1518
  class: "fs-7 opacity-75"
1515
1519
  })
1516
- ], 8, mn)], 64))), 128))])) : a("", !0),
1517
- !f.motifFige && f.currentLevel ? (g(), o("div", hn, [s("label", gn, C(f.currentLevel.title), 1), s("div", _n, [(g(!0), o(n, null, b(f.currentLevel.options, (e) => (g(), o("div", {
1520
+ ], 8, zn)], 64))), 128))])) : b("", !0),
1521
+ !a.motifFige && a.currentLevel ? (k(), x("div", Bn, [S("label", Vn, F(a.currentLevel.title), 1), S("div", Hn, [(k(!0), x(_, null, M(a.currentLevel.options, (e) => (k(), x("div", {
1518
1522
  key: e.id,
1519
1523
  class: "col-3 text-center"
1520
- }, [s("button", {
1524
+ }, [S("button", {
1521
1525
  type: "button",
1522
1526
  class: "btn btn-lg btn-outline-primary btn-circle d-flex align-items-center justify-content-center mx-auto",
1523
1527
  title: e.libelle,
1524
- onClick: (t) => f.currentLevel.select(e.id)
1525
- }, [e.icon ? (g(), i(h, {
1528
+ onClick: (t) => a.currentLevel.select(e.id)
1529
+ }, [e.icon ? (k(), y(c, {
1526
1530
  key: 0,
1527
1531
  icon: e.icon,
1528
1532
  size: "lg"
1529
- }, null, 8, ["icon"])) : a("", !0)], 8, vn), s("div", yn, C(e.libelle), 1)]))), 128)), f.currentLevel.options.length ? a("", !0) : (g(), o("div", bn, " Aucun choix disponible "))])])) : a("", !0),
1530
- f.motifsAssocies.length ? (g(), o(n, { key: 7 }, [t[4] ||= s("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
1531
- s("hr", { class: "flex-grow-1 my-0" }),
1532
- s("span", null, "Autres motifs liés"),
1533
- s("hr", { class: "flex-grow-1 my-0" })
1534
- ], -1), (g(!0), o(n, null, b(f.motifsAssocies, (e) => (g(), o("div", {
1533
+ }, null, 8, ["icon"])) : b("", !0)], 8, Un), S("div", Wn, F(e.libelle), 1)]))), 128)), a.currentLevel.options.length ? b("", !0) : (k(), x("div", Gn, " Aucun choix disponible "))])])) : b("", !0),
1534
+ a.motifsAssocies.length ? (k(), x(_, { key: 7 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
1535
+ S("hr", { class: "flex-grow-1 my-0" }),
1536
+ S("span", null, "Autres motifs liés"),
1537
+ S("hr", { class: "flex-grow-1 my-0" })
1538
+ ], -1), (k(!0), x(_, null, M(a.motifsAssocies, (e) => (k(), x("div", {
1535
1539
  key: e.idMotif,
1536
1540
  class: "form-check form-switch"
1537
- }, [s("input", {
1541
+ }, [S("input", {
1538
1542
  id: `assoc-${e.idMotif}`,
1539
1543
  class: "form-check-input",
1540
1544
  type: "checkbox",
1541
- checked: f.isActive(e.idMotif),
1542
- disabled: f.motifFige,
1543
- onChange: (t) => f.toggleMotifAssocie(e)
1544
- }, null, 40, xn), s("label", {
1545
+ checked: a.isActive(e.idMotif),
1546
+ disabled: a.motifFige,
1547
+ onChange: (t) => a.toggleMotifAssocie(e)
1548
+ }, null, 40, Kn), S("label", {
1545
1549
  class: "form-check-label fs-7",
1546
1550
  for: `assoc-${e.idMotif}`
1547
- }, C(e.libelle) + " ? ", 9, Sn)]))), 128))], 64)) : a("", !0)
1548
- ])) : a("", !0)]),
1551
+ }, F(e.libelle) + " ? ", 9, qn)]))), 128))], 64)) : b("", !0)
1552
+ ])) : b("", !0)]),
1549
1553
  _: 1
1550
1554
  }, 8, ["loading"]);
1551
1555
  }
1552
- var wn = /*#__PURE__*/ z(tn, [["render", Cn]]), Tn = {
1556
+ var Yn = /*#__PURE__*/ K(Dn, [["render", Jn]]), Xn = {
1553
1557
  B: "briefcase",
1554
1558
  M: "store",
1555
1559
  W: "dungeon",
@@ -1559,17 +1563,17 @@ var wn = /*#__PURE__*/ z(tn, [["render", Cn]]), Tn = {
1559
1563
  S: "square-parking",
1560
1564
  V: "hands-holding"
1561
1565
  };
1562
- function En(e, t = !1, n = "circle-question") {
1563
- return e === "L" ? t ? "building" : "house" : Tn[e] ?? n;
1566
+ function Zn(e, t = !1, n = "circle-question") {
1567
+ return e === "L" ? t ? "building" : "house" : Xn[e] ?? n;
1564
1568
  }
1565
- function Dn(e) {
1569
+ function Qn(e) {
1566
1570
  return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
1567
1571
  }
1568
1572
  //#endregion
1569
1573
  //#region src/components/CiblePickerBlock.vue
1570
- var On = 0, kn = {
1574
+ var $n = 0, er = {
1571
1575
  name: "CiblePickerBlock",
1572
- components: { AmsomAutocomplete: D },
1576
+ components: { AmsomAutocomplete: z },
1573
1577
  props: {
1574
1578
  patrimoine: {
1575
1579
  type: Object,
@@ -1620,11 +1624,11 @@ var On = 0, kn = {
1620
1624
  "set-module-precis"
1621
1625
  ],
1622
1626
  setup() {
1623
- return { data: J() };
1627
+ return { data: Z() };
1624
1628
  },
1625
1629
  data() {
1626
1630
  return {
1627
- uid: ++On,
1631
+ uid: ++$n,
1628
1632
  rechercheContrat: "",
1629
1633
  contratsTrouves: [],
1630
1634
  rechercheEnCours: !1,
@@ -1771,7 +1775,7 @@ var On = 0, kn = {
1771
1775
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
1772
1776
  },
1773
1777
  methods: {
1774
- formatDate: X,
1778
+ formatDate: Pt,
1775
1779
  rechercherPlusTard(e) {
1776
1780
  clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
1777
1781
  },
@@ -1799,8 +1803,8 @@ var On = 0, kn = {
1799
1803
  let n = ($(e) ?? "").trim();
1800
1804
  return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || ($(this.moduleInputLibelle(e)) ?? "").includes(n) || ($(e?._autreLibelle) ?? "").includes(n)) : t;
1801
1805
  },
1802
- getCategorieModuleIcon: En,
1803
- categorieLibelle: Dn,
1806
+ getCategorieModuleIcon: Zn,
1807
+ categorieLibelle: Qn,
1804
1808
  moduleLibelle(e) {
1805
1809
  return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
1806
1810
  },
@@ -1812,84 +1816,84 @@ var On = 0, kn = {
1812
1816
  return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
1813
1817
  }
1814
1818
  }
1815
- }, An = { class: "d-flex flex-column gap-3" }, jn = {
1819
+ }, tr = { class: "d-flex flex-column gap-3" }, nr = {
1816
1820
  class: "btn-group w-100",
1817
1821
  role: "group"
1818
- }, Mn = ["onClick"], Nn = { class: "text-muted d-block mt-1" }, Pn = {
1822
+ }, rr = ["onClick"], ir = { class: "text-muted d-block mt-1" }, ar = {
1819
1823
  key: 0,
1820
1824
  class: "form-check"
1821
- }, Fn = ["id", "checked"], In = ["for"], Ln = { key: 1 }, Rn = { class: "min-w-0" }, zn = { class: "fw-medium text-truncate text-capitalize" }, Bn = { class: "d-flex flex-wrap align-items-center gap-1" }, Vn = { class: "text-muted" }, Hn = {
1825
+ }, or = ["id", "checked"], sr = ["for"], cr = { key: 1 }, lr = { class: "min-w-0" }, ur = { class: "fw-medium text-truncate text-capitalize" }, dr = { class: "d-flex flex-wrap align-items-center gap-1" }, fr = { class: "text-muted" }, pr = {
1822
1826
  key: 0,
1823
1827
  class: "badge bg-info"
1824
- }, Un = {
1828
+ }, mr = {
1825
1829
  key: 1,
1826
1830
  class: "badge bg-warning"
1827
- }, Wn = {
1831
+ }, hr = {
1828
1832
  key: 0,
1829
1833
  class: "text-muted d-block text-truncate"
1830
- }, Gn = { key: 1 }, Kn = { class: "row g-2" }, qn = ["aria-pressed", "onClick"], Jn = { class: "min-w-0" }, Yn = { class: "d-block fw-semibold fs-6" }, Xn = { class: "d-block text-muted" }, Zn = {
1834
+ }, gr = { key: 1 }, _r = { class: "row g-2" }, vr = ["aria-pressed", "onClick"], yr = { class: "min-w-0" }, br = { class: "d-block fw-semibold fs-6" }, xr = { class: "d-block text-muted" }, Sr = {
1831
1835
  key: 2,
1832
1836
  class: "row g-3"
1833
- }, Qn = { class: "min-w-0" }, $n = { class: "fw-medium text-truncate" }, er = { class: "text-muted d-block text-truncate" }, tr = ["value"], nr = ["value"], rr = ["value"], ir = {
1837
+ }, Cr = { class: "min-w-0" }, wr = { class: "fw-medium text-truncate" }, Tr = { class: "text-muted d-block text-truncate" }, Er = ["value"], Dr = ["value"], Or = ["value"], kr = {
1834
1838
  key: 0,
1835
1839
  class: "col-12 col-md-6"
1836
- }, ar = { class: "d-flex flex-wrap align-items-center gap-1" }, or = ["title"], sr = { class: "text-muted" }, cr = {
1840
+ }, Ar = { class: "d-flex flex-wrap align-items-center gap-1" }, jr = ["title"], Mr = { class: "text-muted" }, Nr = {
1837
1841
  key: 1,
1838
1842
  class: "d-block text-truncate"
1839
- }, lr = {
1843
+ }, Pr = {
1840
1844
  key: 2,
1841
1845
  class: "text-muted d-block"
1842
- }, ur = {
1846
+ }, Fr = {
1843
1847
  key: 0,
1844
1848
  class: "mt-2 d-flex flex-column gap-2"
1845
- }, dr = { class: "form-check mb-0 ms-3" }, fr = ["id", "checked"], pr = ["for"];
1846
- function mr(e, t, r, c, d, f) {
1847
- let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
1848
- return g(), o("div", An, [
1849
- s("div", null, [
1850
- t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
1851
- s("div", jn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
1849
+ }, Ir = { class: "form-check mb-0 ms-3" }, Lr = ["id", "checked"], Rr = ["for"];
1850
+ function zr(e, t, n, r, i, a) {
1851
+ let o = P("font-awesome-icon"), s = P("amsom-autocomplete");
1852
+ return k(), x("div", tr, [
1853
+ S("div", null, [
1854
+ t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
1855
+ S("div", nr, [(k(!0), x(_, null, M(a.availableModes, (t) => (k(), x("button", {
1852
1856
  key: t.key,
1853
1857
  type: "button",
1854
- class: m(["btn btn-sm", r.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
1858
+ class: D(["btn btn-sm", n.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
1855
1859
  onClick: (n) => e.$emit("change-mode", t.key)
1856
- }, [u(p, {
1860
+ }, [T(o, {
1857
1861
  icon: t.icon,
1858
1862
  class: "me-1"
1859
- }, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, Mn))), 128))]),
1860
- s("small", Nn, C(f.currentMode?.aide), 1)
1863
+ }, null, 8, ["icon"]), w(" " + F(t.label), 1)], 10, rr))), 128))]),
1864
+ S("small", ir, F(a.currentMode?.aide), 1)
1861
1865
  ]),
1862
- r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div", Pn, [s("input", {
1863
- id: `contrat-reclamant-${d.uid}`,
1866
+ n.cibleMode === "contrat" ? (k(), x(_, { key: 0 }, [n.afficheCaseContratReclamant ? (k(), x("div", ar, [S("input", {
1867
+ id: `contrat-reclamant-${i.uid}`,
1864
1868
  class: "form-check-input",
1865
1869
  type: "checkbox",
1866
- checked: r.contratReclamant,
1870
+ checked: n.contratReclamant,
1867
1871
  onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
1868
- }, null, 40, Fn), s("label", {
1872
+ }, null, 40, or), S("label", {
1869
1873
  class: "form-check-label fs-7",
1870
- for: `contrat-reclamant-${d.uid}`
1871
- }, " Contrat du réclamant ", 8, In)])) : a("", !0), r.contratReclamant ? a("", !0) : (g(), o("div", Ln, [t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), u(h, {
1872
- modelValue: f.selectedContrat,
1873
- "onUpdate:modelValue": t[1] ||= (e) => f.selectedContrat = e,
1874
- items: d.contratsTrouves,
1874
+ for: `contrat-reclamant-${i.uid}`
1875
+ }, " Contrat du réclamant ", 8, sr)])) : b("", !0), n.contratReclamant ? b("", !0) : (k(), x("div", cr, [t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), T(s, {
1876
+ modelValue: a.selectedContrat,
1877
+ "onUpdate:modelValue": t[1] ||= (e) => a.selectedContrat = e,
1878
+ items: i.contratsTrouves,
1875
1879
  "filtering-function": ({ items: e }) => e,
1876
- loading: d.rechercheEnCours,
1880
+ loading: i.rechercheEnCours,
1877
1881
  "get-id": (e) => e ? `${e.typeContrat}|${e.idContrat}` : null,
1878
- "get-input-libelle": f.contratInputLibelle,
1882
+ "get-input-libelle": a.contratInputLibelle,
1879
1883
  placeholder: "N° de contrat, locataire, module ou adresse…",
1880
1884
  "input-size": "sm",
1881
1885
  "hide-choices": "",
1882
1886
  "debounce-delay": 0,
1883
- onSearch: f.rechercherPlusTard
1887
+ onSearch: a.rechercherPlusTard
1884
1888
  }, {
1885
- options: E((e) => [s("div", Rn, [
1886
- s("div", zn, C(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1887
- s("div", Bn, [
1888
- s("small", Vn, "N° " + C(e?.typeContrat) + "/" + C(e?.idContrat), 1),
1889
- e?.nbModules > 1 ? (g(), o("span", Hn, C(e.nbModules) + " modules", 1)) : a("", !0),
1890
- e?.estSorti ? (g(), o("span", Un, C(e.dateSortie ? `Sorti le ${f.formatDate(e.dateSortie)}` : "Sorti"), 1)) : a("", !0)
1889
+ options: R((e) => [S("div", lr, [
1890
+ S("div", ur, F(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1891
+ S("div", dr, [
1892
+ S("small", fr, "N° " + F(e?.typeContrat) + "/" + F(e?.idContrat), 1),
1893
+ e?.nbModules > 1 ? (k(), x("span", pr, F(e.nbModules) + " modules", 1)) : b("", !0),
1894
+ e?.estSorti ? (k(), x("span", mr, F(e.dateSortie ? `Sorti le ${a.formatDate(e.dateSortie)}` : "Sorti"), 1)) : b("", !0)
1891
1895
  ]),
1892
- f.contratAdresse(e) ? (g(), o("small", Wn, C(f.contratAdresse(e)), 1)) : a("", !0)
1896
+ a.contratAdresse(e) ? (k(), x("small", hr, F(a.contratAdresse(e)), 1)) : b("", !0)
1893
1897
  ])]),
1894
1898
  _: 1
1895
1899
  }, 8, [
@@ -1900,28 +1904,28 @@ function mr(e, t, r, c, d, f) {
1900
1904
  "get-id",
1901
1905
  "get-input-libelle",
1902
1906
  "onSearch"
1903
- ])]))], 64)) : a("", !0),
1904
- r.cibleMode === "patrimoine" ? (g(), o("div", Gn, [t[9] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), s("div", Kn, [(g(!0), o(n, null, b(f.portees, (t) => (g(), o("div", {
1907
+ ])]))], 64)) : b("", !0),
1908
+ n.cibleMode === "patrimoine" ? (k(), x("div", gr, [t[9] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), S("div", _r, [(k(!0), x(_, null, M(a.portees, (t) => (k(), x("div", {
1905
1909
  key: t.titre,
1906
1910
  class: "col-12 col-md-6"
1907
- }, [s("button", {
1911
+ }, [S("button", {
1908
1912
  type: "button",
1909
- class: m(["btn w-100 h-100 text-start d-flex align-items-center gap-3 p-3 rounded border text-primary", t.modulePrecis === r.modulePrecis ? "border-primary bg-light" : "bg-white"]),
1910
- "aria-pressed": t.modulePrecis === r.modulePrecis,
1913
+ class: D(["btn w-100 h-100 text-start d-flex align-items-center gap-3 p-3 rounded border text-primary", t.modulePrecis === n.modulePrecis ? "border-primary bg-light" : "bg-white"]),
1914
+ "aria-pressed": t.modulePrecis === n.modulePrecis,
1911
1915
  onClick: (n) => e.$emit("set-module-precis", t.modulePrecis)
1912
- }, [u(p, {
1916
+ }, [T(o, {
1913
1917
  icon: t.icon,
1914
1918
  class: "fs-4",
1915
1919
  "fixed-width": ""
1916
- }, null, 8, ["icon"]), s("span", Jn, [s("span", Yn, C(t.titre), 1), s("small", Xn, C(t.aide), 1)])], 10, qn)]))), 128))])])) : a("", !0),
1917
- r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div", Zn, [s("div", { class: m(["col-12 d-flex flex-column gap-3", { "col-md-6": f.afficheModule }]) }, [r.cibleMode === "patrimoine" ? (g(), o(n, { key: 0 }, [
1918
- s("div", null, [t[10] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), u(h, {
1919
- modelValue: f.selectedCommune,
1920
- "onUpdate:modelValue": t[2] ||= (e) => f.selectedCommune = e,
1921
- items: c.data.cache.communes || [],
1920
+ }, null, 8, ["icon"]), S("span", yr, [S("span", br, F(t.titre), 1), S("small", xr, F(t.aide), 1)])], 10, vr)]))), 128))])])) : b("", !0),
1921
+ n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (k(), x("div", Sr, [S("div", { class: D(["col-12 d-flex flex-column gap-3", { "col-md-6": a.afficheModule }]) }, [n.cibleMode === "patrimoine" ? (k(), x(_, { key: 0 }, [
1922
+ S("div", null, [t[10] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), T(s, {
1923
+ modelValue: a.selectedCommune,
1924
+ "onUpdate:modelValue": t[2] ||= (e) => a.selectedCommune = e,
1925
+ items: r.data.cache.communes || [],
1922
1926
  "get-id": (e) => e?.idCommune,
1923
1927
  "get-input-libelle": (e) => e?.commune ?? "",
1924
- "filtering-function": f.filterOn("commune"),
1928
+ "filtering-function": a.filterOn("commune"),
1925
1929
  placeholder: "Rechercher une commune…",
1926
1930
  "input-size": "sm",
1927
1931
  "hide-choices": ""
@@ -1932,19 +1936,19 @@ function mr(e, t, r, c, d, f) {
1932
1936
  "get-input-libelle",
1933
1937
  "filtering-function"
1934
1938
  ])]),
1935
- s("div", null, [t[11] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), u(h, {
1936
- modelValue: f.selectedAdresse,
1937
- "onUpdate:modelValue": t[3] ||= (e) => f.selectedAdresse = e,
1938
- items: f.adresses,
1939
+ S("div", null, [t[11] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), T(s, {
1940
+ modelValue: a.selectedAdresse,
1941
+ "onUpdate:modelValue": t[3] ||= (e) => a.selectedAdresse = e,
1942
+ items: a.adresses,
1939
1943
  "get-id": (e) => e?.idEntree,
1940
1944
  "get-input-libelle": (e) => e?.entree ?? "",
1941
- "filtering-function": f.filterOn("entree"),
1942
- disabled: !r.patrimoine.idCommune,
1945
+ "filtering-function": a.filterOn("entree"),
1946
+ disabled: !n.patrimoine.idCommune,
1943
1947
  placeholder: "Rechercher une adresse…",
1944
1948
  "input-size": "sm",
1945
1949
  "hide-choices": ""
1946
1950
  }, {
1947
- options: E((e) => [s("div", Qn, [s("div", $n, C(e?.entree), 1), s("small", er, C(e?.commune) + " — Programme " + C(e?.codeProgramme), 1)])]),
1951
+ options: R((e) => [S("div", Cr, [S("div", wr, F(e?.entree), 1), S("small", Tr, F(e?.commune) + " — Programme " + F(e?.codeProgramme), 1)])]),
1948
1952
  _: 1
1949
1953
  }, 8, [
1950
1954
  "modelValue",
@@ -1954,13 +1958,13 @@ function mr(e, t, r, c, d, f) {
1954
1958
  "filtering-function",
1955
1959
  "disabled"
1956
1960
  ])]),
1957
- s("div", null, [t[12] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), u(h, {
1958
- modelValue: f.selectedEtage,
1959
- "onUpdate:modelValue": t[4] ||= (e) => f.selectedEtage = e,
1960
- items: f.etages,
1961
+ S("div", null, [t[12] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), T(s, {
1962
+ modelValue: a.selectedEtage,
1963
+ "onUpdate:modelValue": t[4] ||= (e) => a.selectedEtage = e,
1964
+ items: a.etages,
1961
1965
  "get-id": (e) => e?.id,
1962
1966
  "get-input-libelle": (e) => e?.libelle ?? "",
1963
- disabled: !r.patrimoine.idEntree,
1967
+ disabled: !n.patrimoine.idEntree,
1964
1968
  placeholder: "Tous les étages…",
1965
1969
  "input-size": "sm",
1966
1970
  "hide-choices": ""
@@ -1971,50 +1975,50 @@ function mr(e, t, r, c, d, f) {
1971
1975
  "get-input-libelle",
1972
1976
  "disabled"
1973
1977
  ])])
1974
- ], 64)) : (g(), o(n, { key: 1 }, [
1975
- s("div", null, [t[13] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), s("input", {
1978
+ ], 64)) : (k(), x(_, { key: 1 }, [
1979
+ S("div", null, [t[13] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), S("input", {
1976
1980
  class: "form-control form-control-sm",
1977
1981
  disabled: "",
1978
- value: r.patrimoine.commune ?? "—"
1979
- }, null, 8, tr)]),
1980
- s("div", null, [t[14] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), s("input", {
1982
+ value: n.patrimoine.commune ?? "—"
1983
+ }, null, 8, Er)]),
1984
+ S("div", null, [t[14] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), S("input", {
1981
1985
  class: "form-control form-control-sm",
1982
1986
  disabled: "",
1983
- value: r.patrimoine.entree ?? "—"
1984
- }, null, 8, nr)]),
1985
- s("div", null, [t[15] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), s("input", {
1987
+ value: n.patrimoine.entree ?? "—"
1988
+ }, null, 8, Dr)]),
1989
+ S("div", null, [t[15] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), S("input", {
1986
1990
  class: "form-control form-control-sm",
1987
1991
  disabled: "",
1988
- value: r.patrimoine.etage ?? "—"
1989
- }, null, 8, rr)])
1990
- ], 64))], 2), f.afficheModule ? (g(), o("div", ir, [
1991
- t[16] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
1992
- u(h, {
1993
- modelValue: f.selectedModule,
1994
- "onUpdate:modelValue": t[5] ||= (e) => f.selectedModule = e,
1995
- items: f.modules,
1992
+ value: n.patrimoine.etage ?? "—"
1993
+ }, null, 8, Or)])
1994
+ ], 64))], 2), a.afficheModule ? (k(), x("div", kr, [
1995
+ t[16] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
1996
+ T(s, {
1997
+ modelValue: a.selectedModule,
1998
+ "onUpdate:modelValue": t[5] ||= (e) => a.selectedModule = e,
1999
+ items: a.modules,
1996
2000
  "get-id": (e) => e?.idModule,
1997
- "get-input-libelle": (e) => f.moduleInputLibelle(e),
1998
- "filtering-function": f.filterModules,
1999
- disabled: f.areModulesLocked,
2001
+ "get-input-libelle": (e) => a.moduleInputLibelle(e),
2002
+ "filtering-function": a.filterModules,
2003
+ disabled: a.areModulesLocked,
2000
2004
  placeholder: "Rechercher un module…",
2001
2005
  "input-size": "sm",
2002
2006
  "hide-choices": ""
2003
2007
  }, {
2004
- options: E((e) => [s("div", { class: m(["min-w-0 w-100 rounded position-relative", e?._autreLibelle ? "bg-yellow-subtle p-2" : ""]) }, [
2005
- e?._autreLibelle ? (g(), i(p, {
2008
+ options: R((e) => [S("div", { class: D(["min-w-0 w-100 rounded position-relative", e?._autreLibelle ? "bg-yellow-subtle p-2" : ""]) }, [
2009
+ e?._autreLibelle ? (k(), y(o, {
2006
2010
  key: 0,
2007
2011
  icon: "building",
2008
2012
  class: "position-absolute top-0 end-0 m-1 text-muted",
2009
2013
  title: "Autre adresse ou étage du même programme"
2010
- })) : a("", !0),
2011
- s("div", { class: m(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", f.isExit(e) ? "text-decoration-line-through" : ""]]) }, C(f.moduleLibelle(e)), 3),
2012
- s("div", ar, [f.categorieLibelle(e) ? (g(), o("span", {
2014
+ })) : b("", !0),
2015
+ S("div", { class: D(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", a.isExit(e) ? "text-decoration-line-through" : ""]]) }, F(a.moduleLibelle(e)), 3),
2016
+ S("div", Ar, [a.categorieLibelle(e) ? (k(), x("span", {
2013
2017
  key: 0,
2014
2018
  class: "badge bg-info",
2015
2019
  title: e?.categorieModule
2016
- }, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, or)) : a("", !0), s("small", sr, "N° " + C(e?.idModule), 1)]),
2017
- e?._autreLibelle ? (g(), o("small", cr, C(e._autreLibelle), 1)) : e?.etage == null ? a("", !0) : (g(), o("small", lr, " Étage " + C(e.etage), 1))
2020
+ }, [T(o, { icon: a.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, jr)) : b("", !0), S("small", Mr, "N° " + F(e?.idModule), 1)]),
2021
+ e?._autreLibelle ? (k(), x("small", Nr, F(e._autreLibelle), 1)) : e?.etage == null ? b("", !0) : (k(), x("small", Pr, " Étage " + F(e.etage), 1))
2018
2022
  ], 2)]),
2019
2023
  _: 1
2020
2024
  }, 8, [
@@ -2025,35 +2029,35 @@ function mr(e, t, r, c, d, f) {
2025
2029
  "filtering-function",
2026
2030
  "disabled"
2027
2031
  ]),
2028
- r.locataireActuelOption ? (g(), o("div", ur, [s("div", { class: m(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", r.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [u(p, {
2032
+ n.locataireActuelOption ? (k(), x("div", Fr, [S("div", { class: D(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", n.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [T(o, {
2029
2033
  icon: "circle-info",
2030
2034
  class: "mt-1"
2031
- }), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div", dr, [s("input", {
2032
- id: `locataire-actuel-${d.uid}`,
2035
+ }), S("span", null, F(n.locataireActuelOption.hint), 1)], 2), S("div", Ir, [S("input", {
2036
+ id: `locataire-actuel-${i.uid}`,
2033
2037
  class: "form-check-input",
2034
2038
  type: "checkbox",
2035
- checked: r.locataireActuelOption.reprendre,
2039
+ checked: n.locataireActuelOption.reprendre,
2036
2040
  onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
2037
- }, null, 40, fr), s("label", {
2041
+ }, null, 40, Lr), S("label", {
2038
2042
  class: "form-check-label fs-7",
2039
- for: `locataire-actuel-${d.uid}`
2040
- }, " Rattacher au locataire actuel du module ", 8, pr)])])) : a("", !0)
2041
- ])) : a("", !0)])) : a("", !0)
2043
+ for: `locataire-actuel-${i.uid}`
2044
+ }, " Rattacher au locataire actuel du module ", 8, Rr)])])) : b("", !0)
2045
+ ])) : b("", !0)])) : b("", !0)
2042
2046
  ]);
2043
2047
  }
2044
2048
  //#endregion
2045
2049
  //#region src/components/EtapeCibleBlock.vue
2046
- var hr = {
2050
+ var Br = {
2047
2051
  name: "EtapeCibleBlock",
2048
2052
  components: {
2049
- AmsomOverlay: t,
2050
- CiblePickerBlock: /* @__PURE__ */ z(kn, [["render", mr]])
2053
+ AmsomOverlay: g,
2054
+ CiblePickerBlock: /* @__PURE__ */ K(er, [["render", zr]])
2051
2055
  },
2052
2056
  setup() {
2053
2057
  return {
2054
- draft: R(),
2055
- data: J(),
2056
- options: Z()
2058
+ draft: G(),
2059
+ data: Z(),
2060
+ options: Q()
2057
2061
  };
2058
2062
  },
2059
2063
  computed: {
@@ -2153,78 +2157,78 @@ var hr = {
2153
2157
  e === "contrat" ? this.draft.prefillFromModule(t, this.mainModule) : this.mainModule && (this.draft.prefillFromModule(t, this.mainModule), this.mainModule.idCommune != null && await this.data.loadAdresses(this.mainModule.idCommune), this.mainModule.codeProgramme != null && await this.data.loadModulesOfProgramme(this.mainModule.codeProgramme));
2154
2158
  }
2155
2159
  }
2156
- }, gr = { class: "d-flex flex-column gap-3" }, _r = {
2160
+ }, Vr = { class: "d-flex flex-column gap-3" }, Hr = {
2157
2161
  key: 0,
2158
2162
  class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
2159
- }, vr = { class: "fs-7" }, yr = {
2163
+ }, Ur = { class: "fs-7" }, Wr = {
2160
2164
  key: 1,
2161
2165
  class: "d-flex flex-column gap-1"
2162
- }, br = {
2166
+ }, Gr = {
2163
2167
  key: 0,
2164
2168
  class: "text-muted me-1"
2165
- }, xr = { class: "d-flex align-items-center gap-2" }, Sr = { class: "fw-medium fs-7" }, Cr = { class: "form-check form-switch mb-0" }, wr = [
2169
+ }, Kr = { class: "d-flex align-items-center gap-2" }, qr = { class: "fw-medium fs-7" }, Jr = { class: "form-check form-switch mb-0" }, Yr = [
2166
2170
  "id",
2167
2171
  "checked",
2168
2172
  "onChange"
2169
- ], Tr = ["for"], Er = {
2173
+ ], Xr = ["for"], Zr = {
2170
2174
  key: 0,
2171
2175
  class: "mt-2"
2172
2176
  };
2173
- function Dr(e, t, r, c, d, f) {
2174
- let m = S("font-awesome-icon"), h = S("cible-picker-block"), _ = S("amsom-overlay");
2175
- return g(), i(_, { loading: c.data.isLoading }, {
2176
- default: E(() => [s("div", gr, [
2177
- f.motifLibelle ? (g(), o("div", _r, [u(m, {
2177
+ function Qr(e, t, n, r, i, a) {
2178
+ let o = P("font-awesome-icon"), s = P("cible-picker-block"), c = P("amsom-overlay");
2179
+ return k(), y(c, { loading: r.data.isLoading }, {
2180
+ default: R(() => [S("div", Vr, [
2181
+ a.motifLibelle ? (k(), x("div", Hr, [T(o, {
2178
2182
  icon: "tag",
2179
2183
  class: "text-primary"
2180
- }), s("span", vr, [t[9] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), l(C(f.motifLibelle), 1)])])) : a("", !0),
2181
- f.cibleFigee ? (g(), o("div", yr, [(g(!0), o(n, null, b(c.draft.draft.lignes, (e, t) => (g(), o("span", {
2184
+ }), S("span", Ur, [t[9] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), w(F(a.motifLibelle), 1)])])) : b("", !0),
2185
+ a.cibleFigee ? (k(), x("div", Wr, [(k(!0), x(_, null, M(r.draft.draft.lignes, (e, t) => (k(), x("span", {
2182
2186
  key: t,
2183
2187
  class: "fs-7"
2184
2188
  }, [
2185
- u(m, {
2189
+ T(o, {
2186
2190
  icon: "location-dot",
2187
2191
  class: "text-primary me-2"
2188
2192
  }),
2189
- f.lignesAssociees.length ? (g(), o("span", br, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
2190
- l(" " + C(c.draft.cibleResume(e)), 1)
2191
- ]))), 128))])) : (g(), i(h, p({ key: 2 }, f.pickerProps(f.lignePrincipale), {
2192
- onChangeMode: t[0] ||= (e) => f.onChangeMode(e),
2193
- onSelectCommune: t[1] ||= (e) => f.onSelectCommune(e),
2194
- onSelectAdresse: t[2] ||= (e) => f.onSelectAdresse(e),
2195
- onSelectEtage: t[3] ||= (e) => f.onSelectEtage(e),
2196
- onSelectModule: t[4] ||= (e) => f.onSelectModule(e),
2197
- onSelectContrat: t[5] ||= (e) => f.onSelectContrat(e),
2198
- onToggleContratReclamant: t[6] ||= (e) => f.onToggleContratReclamant(e),
2199
- onToggleReprendreLocataireActuel: t[7] ||= (e) => f.onToggleReprendre(e),
2200
- onSetModulePrecis: t[8] ||= (e) => c.draft.setModulePrecis(0, e)
2193
+ a.lignesAssociees.length ? (k(), x("span", Gr, F(t === 0 ? a.motifLibelle : e.libelle) + " : ", 1)) : b("", !0),
2194
+ w(" " + F(r.draft.cibleResume(e)), 1)
2195
+ ]))), 128))])) : (k(), y(s, fe({ key: 2 }, a.pickerProps(a.lignePrincipale), {
2196
+ onChangeMode: t[0] ||= (e) => a.onChangeMode(e),
2197
+ onSelectCommune: t[1] ||= (e) => a.onSelectCommune(e),
2198
+ onSelectAdresse: t[2] ||= (e) => a.onSelectAdresse(e),
2199
+ onSelectEtage: t[3] ||= (e) => a.onSelectEtage(e),
2200
+ onSelectModule: t[4] ||= (e) => a.onSelectModule(e),
2201
+ onSelectContrat: t[5] ||= (e) => a.onSelectContrat(e),
2202
+ onToggleContratReclamant: t[6] ||= (e) => a.onToggleContratReclamant(e),
2203
+ onToggleReprendreLocataireActuel: t[7] ||= (e) => a.onToggleReprendre(e),
2204
+ onSetModulePrecis: t[8] ||= (e) => r.draft.setModulePrecis(0, e)
2201
2205
  }), null, 16)),
2202
- !f.cibleFigee && f.lignesAssociees.length && f.reclamantType !== "D" ? (g(), o(n, { key: 3 }, [t[10] ||= s("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
2203
- s("hr", { class: "flex-grow-1 my-0" }),
2204
- s("span", null, "Cible des autres motifs"),
2205
- s("hr", { class: "flex-grow-1 my-0" })
2206
- ], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, t) => (g(), o("div", {
2206
+ !a.cibleFigee && a.lignesAssociees.length && a.reclamantType !== "D" ? (k(), x(_, { key: 3 }, [t[10] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
2207
+ S("hr", { class: "flex-grow-1 my-0" }),
2208
+ S("span", null, "Cible des autres motifs"),
2209
+ S("hr", { class: "flex-grow-1 my-0" })
2210
+ ], -1), (k(!0), x(_, null, M(a.lignesAssociees, (e, t) => (k(), x("div", {
2207
2211
  key: e.idMotif,
2208
2212
  class: "border rounded p-2"
2209
- }, [s("div", xr, [s("span", Sr, C(e.libelle), 1), s("div", Cr, [s("input", {
2213
+ }, [S("div", Kr, [S("span", qr, F(e.libelle), 1), S("div", Jr, [S("input", {
2210
2214
  id: `memecible-${e.idMotif}`,
2211
2215
  class: "form-check-input",
2212
2216
  type: "checkbox",
2213
2217
  checked: !e.patrimoine,
2214
- onChange: (e) => c.draft.toggleCibleOverride(t + 1)
2215
- }, null, 40, wr), s("label", {
2218
+ onChange: (e) => r.draft.toggleCibleOverride(t + 1)
2219
+ }, null, 40, Yr), S("label", {
2216
2220
  class: "form-check-label fs-7",
2217
2221
  for: `memecible-${e.idMotif}`
2218
- }, " Même cible que la ligne principale ", 8, Tr)])]), e.patrimoine ? (g(), o("div", Er, [u(h, p({ ref_for: !0 }, f.pickerProps(e), {
2219
- onChangeMode: (e) => f.onChangeMode(e, t + 1),
2220
- onSelectCommune: (e) => f.onSelectCommune(e, t + 1),
2221
- onSelectAdresse: (e) => f.onSelectAdresse(e, t + 1),
2222
- onSelectEtage: (e) => f.onSelectEtage(e, t + 1),
2223
- onSelectModule: (e) => f.onSelectModule(e, t + 1),
2224
- onSelectContrat: (e) => f.onSelectContrat(e, t + 1),
2225
- onToggleContratReclamant: (e) => f.onToggleContratReclamant(e, t + 1),
2226
- onToggleReprendreLocataireActuel: (e) => f.onToggleReprendre(e, t + 1),
2227
- onSetModulePrecis: (e) => c.draft.setModulePrecis(t + 1, e)
2222
+ }, " Même cible que la ligne principale ", 8, Xr)])]), e.patrimoine ? (k(), x("div", Zr, [T(s, fe({ ref_for: !0 }, a.pickerProps(e), {
2223
+ onChangeMode: (e) => a.onChangeMode(e, t + 1),
2224
+ onSelectCommune: (e) => a.onSelectCommune(e, t + 1),
2225
+ onSelectAdresse: (e) => a.onSelectAdresse(e, t + 1),
2226
+ onSelectEtage: (e) => a.onSelectEtage(e, t + 1),
2227
+ onSelectModule: (e) => a.onSelectModule(e, t + 1),
2228
+ onSelectContrat: (e) => a.onSelectContrat(e, t + 1),
2229
+ onToggleContratReclamant: (e) => a.onToggleContratReclamant(e, t + 1),
2230
+ onToggleReprendreLocataireActuel: (e) => a.onToggleReprendre(e, t + 1),
2231
+ onSetModulePrecis: (e) => r.draft.setModulePrecis(t + 1, e)
2228
2232
  }), null, 16, [
2229
2233
  "onChangeMode",
2230
2234
  "onSelectCommune",
@@ -2235,14 +2239,14 @@ function Dr(e, t, r, c, d, f) {
2235
2239
  "onToggleContratReclamant",
2236
2240
  "onToggleReprendreLocataireActuel",
2237
2241
  "onSetModulePrecis"
2238
- ])])) : a("", !0)]))), 128))], 64)) : a("", !0)
2242
+ ])])) : b("", !0)]))), 128))], 64)) : b("", !0)
2239
2243
  ])]),
2240
2244
  _: 1
2241
2245
  }, 8, ["loading"]);
2242
2246
  }
2243
- var Or = /*#__PURE__*/ z(hr, [["render", Dr]]), kr = {
2247
+ var $r = /*#__PURE__*/ K(Br, [["render", Qr]]), ei = {
2244
2248
  name: "LigneDocumentBlock",
2245
- components: { AmsomUploadFile: ce },
2249
+ components: { AmsomUploadFile: xe },
2246
2250
  props: {
2247
2251
  index: {
2248
2252
  type: Number,
@@ -2259,9 +2263,9 @@ var Or = /*#__PURE__*/ z(hr, [["render", Dr]]), kr = {
2259
2263
  },
2260
2264
  emits: ["update"]
2261
2265
  };
2262
- function Ar(e, t, n, r, i, a) {
2263
- let c = S("amsom-upload-file");
2264
- return g(), o("div", null, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), u(c, {
2266
+ function ti(e, t, n, r, i, a) {
2267
+ let o = P("amsom-upload-file");
2268
+ return k(), x("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), T(o, {
2265
2269
  "model-value": n.fichier,
2266
2270
  renameable: "",
2267
2271
  "output-format": "object",
@@ -2275,12 +2279,12 @@ function Ar(e, t, n, r, i, a) {
2275
2279
  "read-only"
2276
2280
  ])]);
2277
2281
  }
2278
- var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
2282
+ var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
2279
2283
  name: "LigneDetailBlock",
2280
2284
  components: {
2281
- AmsomAutocomplete: D,
2282
- AmsomTextarea: se,
2283
- LigneDocumentBlock: jr
2285
+ AmsomAutocomplete: z,
2286
+ AmsomTextarea: be,
2287
+ LigneDocumentBlock: ni
2284
2288
  },
2285
2289
  props: { index: {
2286
2290
  type: Number,
@@ -2288,12 +2292,12 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
2288
2292
  } },
2289
2293
  setup() {
2290
2294
  return {
2291
- draft: R(),
2292
- data: J()
2295
+ draft: G(),
2296
+ data: Z()
2293
2297
  };
2294
2298
  },
2295
2299
  computed: {
2296
- descriptionMaxLength: () => Mr,
2300
+ descriptionMaxLength: () => ri,
2297
2301
  isPrincipale() {
2298
2302
  return this.index === 0;
2299
2303
  },
@@ -2311,8 +2315,8 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
2311
2315
  }
2312
2316
  },
2313
2317
  methods: {
2314
- timestampToDateInput: lt,
2315
- dateInputToTimestamp: ut,
2318
+ timestampToDateInput: Mt,
2319
+ dateInputToTimestamp: Nt,
2316
2320
  responsableLibelle(e) {
2317
2321
  let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
2318
2322
  return t ? `${t.prenom} ${t.nom}` : "";
@@ -2322,96 +2326,96 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
2322
2326
  return n ? t.filter((e) => ($(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
2323
2327
  }
2324
2328
  }
2325
- }, Pr = { class: "d-flex flex-column gap-2" }, Fr = { class: "d-flex align-items-center gap-2 mb-1" }, Ir = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Lr = {
2329
+ }, ai = { class: "d-flex flex-column gap-2" }, oi = { class: "d-flex align-items-center gap-2 mb-1" }, si = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, ci = {
2326
2330
  key: 0,
2327
2331
  class: "ms-1 text-danger"
2328
- }, Rr = {
2332
+ }, li = {
2329
2333
  key: 0,
2330
2334
  class: "form-check form-switch mb-0"
2331
- }, zr = [
2335
+ }, ui = [
2332
2336
  "id",
2333
2337
  "checked",
2334
2338
  "disabled"
2335
- ], Br = ["for"], Vr = {
2339
+ ], di = ["for"], fi = {
2336
2340
  key: 1,
2337
2341
  class: "text-muted d-block",
2338
2342
  style: { "white-space": "pre-line" }
2339
- }, Hr = { class: "row g-3" }, Ur = { class: "col-6" }, Wr = { class: "d-flex align-items-center gap-2 mb-1" }, Gr = {
2343
+ }, pi = { class: "row g-3" }, mi = { class: "col-6" }, hi = { class: "d-flex align-items-center gap-2 mb-1" }, gi = {
2340
2344
  key: 0,
2341
2345
  class: "form-check form-switch mb-0"
2342
- }, Kr = [
2346
+ }, _i = [
2343
2347
  "id",
2344
2348
  "checked",
2345
2349
  "disabled"
2346
- ], qr = ["for"], Jr = ["value"], Yr = {
2350
+ ], vi = ["for"], yi = ["value"], bi = {
2347
2351
  key: 1,
2348
2352
  class: "text-muted d-block"
2349
- }, Xr = {
2353
+ }, xi = {
2350
2354
  key: 0,
2351
2355
  class: "text-muted d-block"
2352
- }, Zr = { class: "min-w-0" }, Qr = { class: "fw-medium text-truncate" }, $r = {
2356
+ }, Si = { class: "min-w-0" }, Ci = { class: "fw-medium text-truncate" }, wi = {
2353
2357
  key: 0,
2354
2358
  class: "text-muted d-block"
2355
- }, ei = {
2359
+ }, Ti = {
2356
2360
  key: 2,
2357
2361
  class: "text-muted"
2358
- }, ti = { class: "col-12 col-md-6" };
2359
- function ni(e, t, n, r, c, d) {
2360
- let f = S("amsom-textarea"), p = S("amsom-autocomplete"), m = S("ligne-document-block");
2361
- return g(), o("div", Pr, [s("div", null, [s("div", Fr, [s("label", Ir, [t[6] ||= l(" Description", -1), d.isPrincipale ? (g(), o("span", Lr, "*")) : a("", !0)]), d.isPrincipale ? a("", !0) : (g(), o("div", Rr, [s("input", {
2362
- id: `memedetail-${d.ligne.idMotif}`,
2362
+ }, Ei = { class: "col-12 col-md-6" };
2363
+ function Di(e, t, n, r, i, a) {
2364
+ let o = P("amsom-textarea"), s = P("amsom-autocomplete"), c = P("ligne-document-block");
2365
+ return k(), x("div", ai, [S("div", null, [S("div", oi, [S("label", si, [t[6] ||= w(" Description", -1), a.isPrincipale ? (k(), x("span", ci, "*")) : b("", !0)]), a.isPrincipale ? b("", !0) : (k(), x("div", li, [S("input", {
2366
+ id: `memedetail-${a.ligne.idMotif}`,
2363
2367
  class: "form-check-input",
2364
2368
  type: "checkbox",
2365
- checked: d.ligne.description == null,
2369
+ checked: a.ligne.description == null,
2366
2370
  disabled: r.draft.isReadonly("description"),
2367
2371
  onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
2368
- }, null, 40, zr), s("label", {
2372
+ }, null, 40, ui), S("label", {
2369
2373
  class: "form-check-label fs-7",
2370
- for: `memedetail-${d.ligne.idMotif}`
2371
- }, " Même description ", 8, Br)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
2374
+ for: `memedetail-${a.ligne.idMotif}`
2375
+ }, " Même description ", 8, di)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (k(), y(o, {
2372
2376
  key: 0,
2373
- "model-value": d.ligne.description,
2377
+ "model-value": a.ligne.description,
2374
2378
  "input-size": "sm",
2375
- rows: d.isPrincipale ? 4 : 3,
2376
- maxlength: d.descriptionMaxLength,
2377
- placeholder: d.isPrincipale ? "Décrivez la sollicitation…" : "Décrivez ce motif…",
2379
+ rows: a.isPrincipale ? 4 : 3,
2380
+ maxlength: a.descriptionMaxLength,
2381
+ placeholder: a.isPrincipale ? "Décrivez la sollicitation…" : "Décrivez ce motif…",
2378
2382
  "onUpdate:modelValue": t[1] ||= (e) => r.draft.setDescription(n.index, e)
2379
2383
  }, null, 8, [
2380
2384
  "model-value",
2381
2385
  "rows",
2382
2386
  "maxlength",
2383
2387
  "placeholder"
2384
- ])) : (g(), o("small", Vr, C((d.ligne.description ?? d.lignePrincipale.description) || "—"), 1))]), s("div", Hr, [s("div", Ur, [s("div", null, [s("div", Wr, [t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), d.isPrincipale ? a("", !0) : (g(), o("div", Gr, [s("input", {
2385
- id: `memedate-${d.ligne.idMotif}`,
2388
+ ])) : (k(), x("small", fi, F((a.ligne.description ?? a.lignePrincipale.description) || "—"), 1))]), S("div", pi, [S("div", mi, [S("div", null, [S("div", hi, [t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), a.isPrincipale ? b("", !0) : (k(), x("div", gi, [S("input", {
2389
+ id: `memedate-${a.ligne.idMotif}`,
2386
2390
  class: "form-check-input",
2387
2391
  type: "checkbox",
2388
- checked: !d.ligne.dateFaitsOverride,
2392
+ checked: !a.ligne.dateFaitsOverride,
2389
2393
  disabled: r.draft.isReadonly("dateFaits"),
2390
2394
  onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
2391
- }, null, 40, Kr), s("label", {
2395
+ }, null, 40, _i), S("label", {
2392
2396
  class: "form-check-label fs-7",
2393
- for: `memedate-${d.ligne.idMotif}`
2394
- }, " Même date ", 8, qr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
2397
+ for: `memedate-${a.ligne.idMotif}`
2398
+ }, " Même date ", 8, vi)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (k(), x("input", {
2395
2399
  key: 0,
2396
- value: d.timestampToDateInput(d.ligne.dateFaits),
2400
+ value: a.timestampToDateInput(a.ligne.dateFaits),
2397
2401
  type: "date",
2398
2402
  class: "form-control form-control-sm",
2399
- onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, d.dateInputToTimestamp(e.target.value))
2400
- }, null, 40, Jr)) : (g(), o("small", Yr, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
2401
- t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
2402
- r.draft.isReadonly("responsable") ? (g(), o("small", Xr, C(d.responsableLibelle(d.ligne.responsable) || "Déterminé automatiquement"), 1)) : (g(), i(p, {
2403
+ onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, a.dateInputToTimestamp(e.target.value))
2404
+ }, null, 40, yi)) : (k(), x("small", bi, F(a.timestampToDateInput(a.dateFaits) || "—"), 1))]), S("div", null, [
2405
+ t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
2406
+ r.draft.isReadonly("responsable") ? (k(), x("small", xi, F(a.responsableLibelle(a.ligne.responsable) || "Déterminé automatiquement"), 1)) : (k(), y(s, {
2403
2407
  key: 1,
2404
- "model-value": d.ligne.responsable,
2405
- items: d.collaborateurs,
2408
+ "model-value": a.ligne.responsable,
2409
+ items: a.collaborateurs,
2406
2410
  "get-id": (e) => e?.id,
2407
- "get-input-libelle": d.responsableLibelle,
2408
- "filtering-function": d.filterCollaborateurs,
2411
+ "get-input-libelle": a.responsableLibelle,
2412
+ "filtering-function": a.filterCollaborateurs,
2409
2413
  placeholder: "Rechercher un responsable…",
2410
2414
  "input-size": "sm",
2411
2415
  "hide-choices": "",
2412
2416
  "onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
2413
2417
  }, {
2414
- options: E((e) => [s("div", Zr, [s("div", Qr, C(e?.prenom) + " " + C(e?.nom), 1), e?.service ? (g(), o("small", $r, C(e.service), 1)) : a("", !0)])]),
2418
+ options: R((e) => [S("div", Si, [S("div", Ci, F(e?.prenom) + " " + F(e?.nom), 1), e?.service ? (k(), x("small", wi, F(e.service), 1)) : b("", !0)])]),
2415
2419
  _: 1
2416
2420
  }, 8, [
2417
2421
  "model-value",
@@ -2420,10 +2424,10 @@ function ni(e, t, n, r, c, d) {
2420
2424
  "get-input-libelle",
2421
2425
  "filtering-function"
2422
2426
  ])),
2423
- d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small", ei, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : a("", !0)
2424
- ])]), s("div", ti, [u(m, {
2427
+ a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (k(), x("small", Ti, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : b("", !0)
2428
+ ])]), S("div", Ei, [T(c, {
2425
2429
  index: n.index,
2426
- fichier: d.ligne.fichier,
2430
+ fichier: a.ligne.fichier,
2427
2431
  readonly: r.draft.isReadonly("fichier"),
2428
2432
  onUpdate: t[5] ||= (e) => r.draft.setFichier(n.index, e)
2429
2433
  }, null, 8, [
@@ -2434,16 +2438,16 @@ function ni(e, t, n, r, c, d) {
2434
2438
  }
2435
2439
  //#endregion
2436
2440
  //#region src/components/EtapeDetailsBlock.vue
2437
- var ri = {
2441
+ var Oi = {
2438
2442
  name: "EtapeDetailsBlock",
2439
2443
  components: {
2440
- AmsomOverlay: t,
2441
- LigneDetailBlock: /* @__PURE__ */ z(Nr, [["render", ni]])
2444
+ AmsomOverlay: g,
2445
+ LigneDetailBlock: /* @__PURE__ */ K(ii, [["render", Di]])
2442
2446
  },
2443
2447
  setup() {
2444
2448
  return {
2445
- draft: R(),
2446
- data: J()
2449
+ draft: G(),
2450
+ data: Z()
2447
2451
  };
2448
2452
  },
2449
2453
  computed: {
@@ -2494,67 +2498,67 @@ var ri = {
2494
2498
  }
2495
2499
  }
2496
2500
  }
2497
- }, ii = { class: "d-flex flex-column gap-3" }, ai = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, oi = {
2501
+ }, ki = { class: "d-flex flex-column gap-3" }, Ai = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, ji = {
2498
2502
  key: 0,
2499
2503
  class: "fs-7"
2500
- }, si = { class: "fs-7" }, ci = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, li = { class: "fs-7" }, ui = { class: "fs-7" };
2501
- function di(e, t, r, c, d, f) {
2502
- let p = S("font-awesome-icon"), m = S("ligne-detail-block"), h = S("amsom-overlay");
2503
- return g(), i(h, { loading: c.data.isLoading && !c.data.cache.collaborateurs }, {
2504
- default: E(() => [s("div", ii, [
2505
- s("div", ai, [f.motifLibelle ? (g(), o("span", oi, [
2506
- u(p, {
2504
+ }, Mi = { class: "fs-7" }, Ni = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, Pi = { class: "fs-7" }, Fi = { class: "fs-7" };
2505
+ function Ii(e, t, n, r, i, a) {
2506
+ let o = P("font-awesome-icon"), s = P("ligne-detail-block"), c = P("amsom-overlay");
2507
+ return k(), y(c, { loading: r.data.isLoading && !r.data.cache.collaborateurs }, {
2508
+ default: R(() => [S("div", ki, [
2509
+ S("div", Ai, [a.motifLibelle ? (k(), x("span", ji, [
2510
+ T(o, {
2507
2511
  icon: "tag",
2508
2512
  class: "text-primary me-2"
2509
2513
  }),
2510
- t[0] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2511
- l(C(f.motifLibelle), 1)
2512
- ])) : a("", !0), s("span", si, [
2513
- u(p, {
2514
+ t[0] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2515
+ w(F(a.motifLibelle), 1)
2516
+ ])) : b("", !0), S("span", Mi, [
2517
+ T(o, {
2514
2518
  icon: "location-dot",
2515
2519
  class: "text-primary me-2"
2516
2520
  }),
2517
- t[1] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
2518
- l(" " + C(c.draft.cibleResume(f.lignePrincipale)), 1)
2521
+ t[1] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
2522
+ w(" " + F(r.draft.cibleResume(a.lignePrincipale)), 1)
2519
2523
  ])]),
2520
- u(m, { index: 0 }),
2521
- f.lignesAssociees.length ? (g(), o(n, { key: 0 }, [t[4] ||= s("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
2522
- s("hr", { class: "flex-grow-1 my-0" }),
2523
- s("span", null, "Détail des autres motifs"),
2524
- s("hr", { class: "flex-grow-1 my-0" })
2525
- ], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, n) => (g(), o("div", {
2524
+ T(s, { index: 0 }),
2525
+ a.lignesAssociees.length ? (k(), x(_, { key: 0 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
2526
+ S("hr", { class: "flex-grow-1 my-0" }),
2527
+ S("span", null, "Détail des autres motifs"),
2528
+ S("hr", { class: "flex-grow-1 my-0" })
2529
+ ], -1), (k(!0), x(_, null, M(a.lignesAssociees, (e, n) => (k(), x("div", {
2526
2530
  key: e.idMotif,
2527
2531
  class: "border rounded p-2 d-flex flex-column gap-2"
2528
- }, [s("div", ci, [s("span", li, [
2529
- u(p, {
2532
+ }, [S("div", Ni, [S("span", Pi, [
2533
+ T(o, {
2530
2534
  icon: "tag",
2531
2535
  class: "text-primary me-2"
2532
2536
  }),
2533
- t[2] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2534
- l(" " + C(e.libelle), 1)
2535
- ]), s("span", ui, [
2536
- u(p, {
2537
+ t[2] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2538
+ w(" " + F(e.libelle), 1)
2539
+ ]), S("span", Fi, [
2540
+ T(o, {
2537
2541
  icon: "location-dot",
2538
2542
  class: "text-primary me-2"
2539
2543
  }),
2540
- t[3] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
2541
- l(" " + C(c.draft.cibleResume(e)), 1)
2542
- ])]), u(m, { index: n + 1 }, null, 8, ["index"])]))), 128))], 64)) : a("", !0)
2544
+ t[3] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
2545
+ w(" " + F(r.draft.cibleResume(e)), 1)
2546
+ ])]), T(s, { index: n + 1 }, null, 8, ["index"])]))), 128))], 64)) : b("", !0)
2543
2547
  ])]),
2544
2548
  _: 1
2545
2549
  }, 8, ["loading"]);
2546
2550
  }
2547
2551
  //#endregion
2548
2552
  //#region src/components/StepperBlock.vue
2549
- var fi = {
2553
+ var Li = {
2550
2554
  name: "StepperBlock",
2551
2555
  components: {
2552
- AmsomHorizontalStepper: ie,
2553
- AmsomOverlay: t,
2554
- EtapeReclamantBlock: Kt,
2555
- EtapeCategorieBlock: wn,
2556
- EtapeCibleBlock: Or,
2557
- EtapeDetailsBlock: /* @__PURE__ */ z(ri, [["render", di]])
2556
+ AmsomHorizontalStepper: ve,
2557
+ AmsomOverlay: g,
2558
+ EtapeReclamantBlock: vn,
2559
+ EtapeCategorieBlock: Yn,
2560
+ EtapeCibleBlock: $r,
2561
+ EtapeDetailsBlock: /* @__PURE__ */ K(Oi, [["render", Ii]])
2558
2562
  },
2559
2563
  props: {
2560
2564
  step: {
@@ -2573,9 +2577,9 @@ var fi = {
2573
2577
  ],
2574
2578
  setup() {
2575
2579
  return {
2576
- draft: R(),
2577
- data: J(),
2578
- options: Z()
2580
+ draft: G(),
2581
+ data: Z(),
2582
+ options: Q()
2579
2583
  };
2580
2584
  },
2581
2585
  computed: {
@@ -2669,73 +2673,73 @@ var fi = {
2669
2673
  }));
2670
2674
  }
2671
2675
  }
2672
- }, pi = { class: "d-flex flex-column gap-3" }, mi = {
2676
+ }, Ri = { class: "d-flex flex-column gap-3" }, zi = {
2673
2677
  key: 0,
2674
2678
  class: "w-100 fs-6 fw-medium my-3 alert alert-info",
2675
2679
  style: { "white-space": "pre-line" }
2676
- }, hi = { style: { "min-height": "260px" } }, gi = { class: "d-flex justify-content-between" }, _i = { key: 1 }, vi = ["disabled"], yi = ["disabled"];
2677
- function bi(e, t, n, r, f, p) {
2678
- let m = S("amsom-horizontal-stepper"), _ = S("font-awesome-icon"), v = S("etape-reclamant-block"), y = S("etape-categorie-block"), b = S("etape-cible-block"), ee = S("etape-details-block"), w = S("amsom-overlay");
2679
- return g(), i(w, { loading: n.creating }, {
2680
- default: E(() => [s("div", pi, [
2681
- u(m, {
2682
- steps: p.stepperSteps,
2680
+ }, Bi = { style: { "min-height": "260px" } }, Vi = { class: "d-flex justify-content-between" }, Hi = { key: 1 }, Ui = ["disabled"], Wi = ["disabled"];
2681
+ function Gi(e, t, n, r, i, a) {
2682
+ let o = P("amsom-horizontal-stepper"), s = P("font-awesome-icon"), c = P("etape-reclamant-block"), l = P("etape-categorie-block"), u = P("etape-cible-block"), d = P("etape-details-block"), f = P("amsom-overlay");
2683
+ return k(), y(f, { loading: n.creating }, {
2684
+ default: R(() => [S("div", Ri, [
2685
+ T(o, {
2686
+ steps: a.stepperSteps,
2683
2687
  size: "md",
2684
- onStepClick: p.onStepClick
2688
+ onStepClick: a.onStepClick
2685
2689
  }, null, 8, ["steps", "onStepClick"]),
2686
- p.aideMotif ? (g(), o("div", mi, [u(_, {
2690
+ a.aideMotif ? (k(), x("div", zi, [T(s, {
2687
2691
  icon: "circle-info",
2688
2692
  class: "text-info-emphasis me-2"
2689
- }), s("span", null, C(p.aideMotif), 1)])) : a("", !0),
2690
- s("div", hi, [p.currentKey === "reclamant" ? (g(), i(v, {
2693
+ }), S("span", null, F(a.aideMotif), 1)])) : b("", !0),
2694
+ S("div", Bi, [a.currentKey === "reclamant" ? (k(), y(c, {
2691
2695
  key: 0,
2692
2696
  premiere: n.step === 1
2693
- }, c({ _: 2 }, [e.$slots.reclamant ? {
2697
+ }, C({ _: 2 }, [e.$slots.reclamant ? {
2694
2698
  name: "reclamant",
2695
- fn: E((t) => [x(e.$slots, "reclamant", h(d(t)))]),
2699
+ fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
2696
2700
  key: "0"
2697
- } : void 0]), 1032, ["premiere"])) : p.currentKey === "categorie" ? (g(), i(y, {
2701
+ } : void 0]), 1032, ["premiere"])) : a.currentKey === "categorie" ? (k(), y(l, {
2698
2702
  key: 1,
2699
2703
  premiere: n.step === 1
2700
- }, null, 8, ["premiere"])) : p.currentKey === "cible" ? (g(), i(b, { key: 2 })) : p.currentKey === "details" ? (g(), i(ee, { key: 3 })) : a("", !0)]),
2701
- s("div", gi, [n.step > 1 ? (g(), o("button", {
2704
+ }, null, 8, ["premiere"])) : a.currentKey === "cible" ? (k(), y(u, { key: 2 })) : a.currentKey === "details" ? (k(), y(d, { key: 3 })) : b("", !0)]),
2705
+ S("div", Vi, [n.step > 1 ? (k(), x("button", {
2702
2706
  key: 0,
2703
2707
  class: "btn btn-sm btn-outline-secondary",
2704
- onClick: t[0] ||= (...e) => p.goPrevious && p.goPrevious(...e)
2705
- }, [u(_, {
2708
+ onClick: t[0] ||= (...e) => a.goPrevious && a.goPrevious(...e)
2709
+ }, [T(s, {
2706
2710
  icon: "chevron-left",
2707
2711
  class: "me-1"
2708
- }), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span", _i)), n.step < p.steps.length ? (g(), o("button", {
2712
+ }), t[3] ||= w(" Précédent ", -1)])) : (k(), x("span", Hi)), n.step < a.steps.length ? (k(), x("button", {
2709
2713
  key: 2,
2710
2714
  class: "btn btn-sm btn-primary",
2711
- disabled: !p.canGoNext,
2712
- onClick: t[1] ||= (...e) => p.goNext && p.goNext(...e)
2713
- }, [t[4] ||= l(" Suivant ", -1), u(_, {
2715
+ disabled: !a.canGoNext,
2716
+ onClick: t[1] ||= (...e) => a.goNext && a.goNext(...e)
2717
+ }, [t[4] ||= w(" Suivant ", -1), T(s, {
2714
2718
  icon: "chevron-right",
2715
2719
  class: "ms-1"
2716
- })], 8, vi)) : (g(), o("button", {
2720
+ })], 8, Ui)) : (k(), x("button", {
2717
2721
  key: 3,
2718
2722
  class: "btn btn-sm btn-success",
2719
- disabled: !p.canCreer || n.creating,
2723
+ disabled: !a.canCreer || n.creating,
2720
2724
  onClick: t[2] ||= (t) => e.$emit("submit")
2721
- }, [u(_, {
2725
+ }, [T(s, {
2722
2726
  icon: "check",
2723
2727
  class: "me-1"
2724
- }), t[5] ||= l(" Créer la sollicitation ", -1)], 8, yi))])
2728
+ }), t[5] ||= w(" Créer la sollicitation ", -1)], 8, Wi))])
2725
2729
  ])]),
2726
2730
  _: 3
2727
2731
  }, 8, ["loading"]);
2728
2732
  }
2729
- var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n } = {}) => ze("/v2/cresol/creer_sollicitation", e, {
2733
+ var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n } = {}) => it("/v2/cresol/creer_sollicitation", e, {
2730
2734
  signal: t,
2731
2735
  baseUrl: n
2732
- }), Ci = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => ze("/v2/cresol/upload_sollicitation_ged", {
2736
+ }), Ji = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => it("/v2/cresol/upload_sollicitation_ged", {
2733
2737
  idSollicitation: e,
2734
2738
  pj: t
2735
2739
  }, {
2736
2740
  signal: n,
2737
2741
  baseUrl: r
2738
- }), wi = {
2742
+ }), Yi = {
2739
2743
  modelValue: {
2740
2744
  type: Object,
2741
2745
  default: null
@@ -2757,16 +2761,16 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2757
2761
  typesReclamant: {
2758
2762
  type: Array,
2759
2763
  default: null,
2760
- validator: (e) => e.every((e) => M.includes(e))
2764
+ validator: (e) => e.every((e) => U.includes(e))
2761
2765
  },
2762
2766
  typesReclamantExclus: {
2763
2767
  type: Array,
2764
2768
  default: () => [],
2765
- validator: (e) => e.every((e) => M.includes(e))
2769
+ validator: (e) => e.every((e) => U.includes(e))
2766
2770
  },
2767
2771
  provenances: {
2768
2772
  type: Array,
2769
- default: () => [...de]
2773
+ default: () => [...we]
2770
2774
  },
2771
2775
  provenancesExclues: {
2772
2776
  type: Array,
@@ -2775,7 +2779,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2775
2779
  readonly: {
2776
2780
  type: [Boolean, Array],
2777
2781
  default: !1,
2778
- validator: (e) => typeof e == "boolean" || e.every((e) => I.includes(e))
2782
+ validator: (e) => typeof e == "boolean" || e.every((e) => Ne.includes(e))
2779
2783
  },
2780
2784
  modules: {
2781
2785
  type: Array,
@@ -2801,7 +2805,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2801
2805
  type: String,
2802
2806
  default: null
2803
2807
  }
2804
- }, Ti = Object.keys(wi), Ei = [
2808
+ }, Xi = Object.keys(Yi), Zi = [
2805
2809
  "update:modelValue",
2806
2810
  "reclamantChange",
2807
2811
  "motifChange",
@@ -2810,44 +2814,44 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2810
2814
  "created",
2811
2815
  "createError",
2812
2816
  "error"
2813
- ], Di = {
2817
+ ], Qi = {
2814
2818
  name: "CreerSollicitationForm",
2815
2819
  components: {
2816
- AsideBlock: Me,
2817
- StepperBlock: xi
2820
+ AsideBlock: Xe,
2821
+ StepperBlock: Ki
2818
2822
  },
2819
- props: { ...wi },
2820
- emits: [...Ei],
2823
+ props: { ...Yi },
2824
+ emits: [...Zi],
2821
2825
  setup(e, { emit: t }) {
2822
- let n = (e) => t("error", e), i = { baseUrl: w(e, "baseUrl") }, a = st(ot({
2826
+ let n = (e) => t("error", e), r = { baseUrl: I(e, "baseUrl") }, i = kt(Ot({
2823
2827
  onError: n,
2824
- ...i
2825
- })), o = y(null), s = r(() => o.value ?? e.modules ?? []), c = Te(we({
2826
- reclamants: r(() => e.reclamantMode === "step" ? [] : e.reclamants),
2827
- modules: s,
2828
- idModulePrefere: w(e, "idModule"),
2829
- readonly: w(e, "readonly")
2828
+ ...r
2829
+ })), a = j(null), o = v(() => a.value ?? e.modules ?? []), s = Ue(He({
2830
+ reclamants: v(() => e.reclamantMode === "step" ? [] : e.reclamants),
2831
+ modules: o,
2832
+ idModulePrefere: I(e, "idModule"),
2833
+ readonly: I(e, "readonly")
2830
2834
  }));
2831
- return ft(v({
2832
- nomenclatureFilter: w(e, "nomenclatureFilter"),
2833
- reclamantMode: w(e, "reclamantMode"),
2834
- typesReclamant: r(() => (e.typesReclamant ?? M).filter((t) => !e.typesReclamantExclus.includes(t))),
2835
- provenances: r(() => {
2836
- let t = a.cache.provenances ?? [];
2835
+ return It(A({
2836
+ nomenclatureFilter: I(e, "nomenclatureFilter"),
2837
+ reclamantMode: I(e, "reclamantMode"),
2838
+ typesReclamant: v(() => (e.typesReclamant ?? U).filter((t) => !e.typesReclamantExclus.includes(t))),
2839
+ provenances: v(() => {
2840
+ let t = i.cache.provenances ?? [];
2837
2841
  return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
2838
2842
  let n = t.find((t) => t.id === e);
2839
2843
  return n ? [{
2840
2844
  ...n,
2841
- icon: ue(e)
2845
+ icon: Ce(e)
2842
2846
  }] : [];
2843
2847
  });
2844
2848
  }),
2845
- modulesReclamant: s,
2846
- ...i
2849
+ modulesReclamant: o,
2850
+ ...r
2847
2851
  })), {
2848
- data: a,
2849
- draft: c,
2850
- modulesCharges: o,
2852
+ data: i,
2853
+ draft: s,
2854
+ modulesCharges: a,
2851
2855
  onError: n
2852
2856
  };
2853
2857
  },
@@ -2903,10 +2907,10 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2903
2907
  if (!await this.autoriserCreation(e)) return;
2904
2908
  let t;
2905
2909
  try {
2906
- t = await Si(e, this.requestOptions) ?? [];
2910
+ t = await qi(e, this.requestOptions) ?? [];
2907
2911
  } catch (t) {
2908
- if (tt(t)) return;
2909
- let n = U(t);
2912
+ if (xt(t)) return;
2913
+ let n = bt(t);
2910
2914
  this.$emit("createError", {
2911
2915
  error: t,
2912
2916
  message: n,
@@ -2956,7 +2960,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2956
2960
  message: t
2957
2961
  };
2958
2962
  };
2959
- return a?.id ? Ci({
2963
+ return a?.id ? Ji({
2960
2964
  idSollicitation: a.id,
2961
2965
  pj: {
2962
2966
  name: n.name,
@@ -2967,34 +2971,34 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
2967
2971
  ...o,
2968
2972
  ok: !0,
2969
2973
  message: null
2970
- })).catch((e) => s(U(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
2974
+ })).catch((e) => s(bt(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
2971
2975
  });
2972
2976
  return Promise.all(n);
2973
2977
  }
2974
2978
  }
2975
- }, Oi = { class: "row g-3" }, ki = {
2979
+ }, $i = { class: "row g-3" }, ea = {
2976
2980
  key: 0,
2977
2981
  class: "col-12 col-lg-4"
2978
2982
  };
2979
- function Ai(e, t, n, r, i, l) {
2980
- let f = S("aside-block"), p = S("stepper-block");
2981
- return g(), o("div", Oi, [e.aside ? (g(), o("div", ki, [x(e.$slots, "aside", {}, () => [u(f, { "nb-similaires": e.nbSimilaires }, c({ _: 2 }, [e.$slots["aside-similaires"] ? {
2983
+ function ta(e, t, n, r, i, a) {
2984
+ let o = P("aside-block"), s = P("stepper-block");
2985
+ return k(), x("div", $i, [e.aside ? (k(), x("div", ea, [N(e.$slots, "aside", {}, () => [T(o, { "nb-similaires": e.nbSimilaires }, C({ _: 2 }, [e.$slots["aside-similaires"] ? {
2982
2986
  name: "similaires",
2983
- fn: E((t) => [x(e.$slots, "aside-similaires", h(d(t)))]),
2987
+ fn: R((t) => [N(e.$slots, "aside-similaires", O(E(t)))]),
2984
2988
  key: "0"
2985
2989
  } : void 0, e.$slots["aside-evenements"] ? {
2986
2990
  name: "evenements",
2987
- fn: E(() => [x(e.$slots, "aside-evenements")]),
2991
+ fn: R(() => [N(e.$slots, "aside-evenements")]),
2988
2992
  key: "1"
2989
- } : void 0]), 1032, ["nb-similaires"])])])) : a("", !0), s("div", { class: m(["col-12", e.aside ? "col-lg-8" : ""]) }, [u(p, {
2993
+ } : void 0]), 1032, ["nb-similaires"])])])) : b("", !0), S("div", { class: D(["col-12", e.aside ? "col-lg-8" : ""]) }, [T(s, {
2990
2994
  step: i.currentStep,
2991
2995
  "onUpdate:step": t[0] ||= (e) => i.currentStep = e,
2992
2996
  creating: i.creating,
2993
2997
  onStepChange: t[1] ||= (t) => e.$emit("stepChange", t),
2994
- onSubmit: l.creer
2995
- }, c({ _: 2 }, [e.$slots.reclamant ? {
2998
+ onSubmit: a.creer
2999
+ }, C({ _: 2 }, [e.$slots.reclamant ? {
2996
3000
  name: "reclamant",
2997
- fn: E((t) => [x(e.$slots, "reclamant", h(d(t)))]),
3001
+ fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
2998
3002
  key: "0"
2999
3003
  } : void 0]), 1032, [
3000
3004
  "step",
@@ -3002,14 +3006,14 @@ function Ai(e, t, n, r, i, l) {
3002
3006
  "onSubmit"
3003
3007
  ])], 2)]);
3004
3008
  }
3005
- var ji = /*#__PURE__*/ z(Di, [["render", Ai]]), Mi = {
3009
+ var na = /*#__PURE__*/ K(Qi, [["render", ta]]), ra = {
3006
3010
  name: "CreerSollicitationModal",
3007
3011
  components: {
3008
- AmsomModal: e,
3009
- CreerSollicitationForm: ji
3012
+ AmsomModal: ue,
3013
+ CreerSollicitationForm: na
3010
3014
  },
3011
3015
  props: {
3012
- ...wi,
3016
+ ...Yi,
3013
3017
  titre: {
3014
3018
  type: String,
3015
3019
  default: "Nouvelle sollicitation"
@@ -3019,36 +3023,36 @@ var ji = /*#__PURE__*/ z(Di, [["render", Ai]]), Mi = {
3019
3023
  default: !0
3020
3024
  }
3021
3025
  },
3022
- emits: [...Ei, "close"],
3026
+ emits: [...Zi, "close"],
3023
3027
  computed: {
3024
3028
  formProps() {
3025
- return Object.fromEntries(Ti.map((e) => [e, this[e]]));
3029
+ return Object.fromEntries(Xi.map((e) => [e, this[e]]));
3026
3030
  },
3027
3031
  formListeners() {
3028
- return Object.fromEntries(Ei.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
3032
+ return Object.fromEntries(Zi.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
3029
3033
  }
3030
3034
  },
3031
3035
  methods: { onCreated(...e) {
3032
3036
  this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
3033
3037
  } }
3034
- }, Ni = { class: "fw-medium fs-5" };
3035
- function Pi(e, t, n, r, a, o) {
3036
- let l = S("creer-sollicitation-form"), f = S("amsom-modal");
3037
- return g(), i(f, {
3038
+ }, ia = { class: "fw-medium fs-5" };
3039
+ function aa(e, t, n, r, i, a) {
3040
+ let o = P("creer-sollicitation-form"), s = P("amsom-modal");
3041
+ return k(), y(s, {
3038
3042
  "close-option": "",
3039
3043
  size: "xl",
3040
3044
  onClose: t[0] ||= (t) => e.$emit("close")
3041
3045
  }, {
3042
- default: E(() => [s("span", Ni, C(n.titre), 1), u(l, p({ class: "pt-3" }, o.formProps, ee(o.formListeners), { onCreated: o.onCreated }), c({ _: 2 }, [b(e.$slots, (t, n) => ({
3046
+ default: R(() => [S("span", ia, F(n.titre), 1), T(o, fe({ class: "pt-3" }, a.formProps, me(a.formListeners), { onCreated: a.onCreated }), C({ _: 2 }, [M(e.$slots, (t, n) => ({
3043
3047
  name: n,
3044
- fn: E((t) => [x(e.$slots, n, h(d(t ?? {})))])
3048
+ fn: R((t) => [N(e.$slots, n, O(E(t ?? {})))])
3045
3049
  }))]), 1040, ["onCreated"])]),
3046
3050
  _: 3
3047
3051
  });
3048
3052
  }
3049
- var Fi = /*#__PURE__*/ z(Mi, [["render", Pi]]), Ii = {
3050
- CreerSollicitationModal: Fi,
3051
- CreerSollicitationForm: ji
3053
+ var oa = /*#__PURE__*/ K(ra, [["render", aa]]), sa = {
3054
+ CreerSollicitationModal: oa,
3055
+ CreerSollicitationForm: na
3052
3056
  };
3053
3057
  //#endregion
3054
- export { ji as CreerSollicitationForm, Fi as CreerSollicitationModal, fe as DEFAULT_PROVENANCE_CONTACT, de as PROVENANCES_CONTACT_DEFAUT, k as PROVENANCE_CONTACT_ICONS, I as READONLY_FIELDS, Pe as configureCresol, Ii as default, L as getDefaultDraft, F as getDefaultLigne, P as getDefaultPatrimoine, at as resetCresolCache };
3058
+ export { na as CreerSollicitationForm, oa as CreerSollicitationModal, Te as DEFAULT_PROVENANCE_CONTACT, we as PROVENANCES_CONTACT_DEFAUT, V as PROVENANCE_CONTACT_ICONS, Ne as READONLY_FIELDS, Qe as configureCresol, sa as default, Pe as getDefaultDraft, Me as getDefaultLigne, W as getDefaultPatrimoine, Et as resetCresolCache };