@amsom-habitat/cresol 0.3.0 → 0.3.1

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
@@ -62,7 +62,7 @@ var Se = {
62
62
  U: "autre",
63
63
  F: "fournisseur",
64
64
  E: "personnel"
65
- }, H = Object.keys(De), Oe = (e) => [...new Set(e.map((e) => De[e]))], ke = (e) => e ? V[e.categorie] ? e.categorie : De[e.type] ?? "inconnu" : null, Ae = (e) => V[ke(e)] ?? null, je = Symbol("cresol:draft"), U = () => ({
65
+ }, Oe = Object.keys(De), ke = (e) => [...new Set(e.map((e) => De[e]))], Ae = (e) => e ? V[e.categorie] ? e.categorie : De[e.type] ?? "inconnu" : null, je = (e) => V[Ae(e)] ?? null, Me = Symbol("cresol:draft"), H = () => ({
66
66
  idCommune: null,
67
67
  commune: null,
68
68
  idEntree: null,
@@ -77,7 +77,7 @@ var Se = {
77
77
  typeContratActuel: null,
78
78
  idContratActuel: null,
79
79
  occupantActuel: null
80
- }), Me = () => ({
80
+ }), U = () => ({
81
81
  idMotif: null,
82
82
  idCategorie: null,
83
83
  idType: null,
@@ -96,6 +96,17 @@ var Se = {
96
96
  dateFaitsOverride: !1,
97
97
  fichier: null
98
98
  }), Ne = [
99
+ "cibleOverride",
100
+ "cibleMode",
101
+ "contratReclamant",
102
+ "contratCible",
103
+ "reprendreLocataireActuel",
104
+ "modulePrecis",
105
+ "patrimoine"
106
+ ], Pe = (e) => Object.fromEntries(Ne.map((t) => {
107
+ let n = e?.[t] ?? U()[t];
108
+ return [t, n && typeof n == "object" ? { ...n } : n];
109
+ })), Fe = [
99
110
  "reclamant",
100
111
  "provenance",
101
112
  "motif",
@@ -104,19 +115,19 @@ var Se = {
104
115
  "dateFaits",
105
116
  "responsable",
106
117
  "fichier"
107
- ], Pe = (e = "T") => ({
118
+ ], Ie = (e = "T") => ({
108
119
  reclamant: {
109
120
  type: null,
110
121
  id: null
111
122
  },
112
123
  provenance: e,
113
124
  lignes: [{
114
- ...Me(),
125
+ ...U(),
115
126
  cibleMode: "contrat",
116
- patrimoine: U(),
127
+ patrimoine: H(),
117
128
  description: ""
118
129
  }]
119
- }), Fe = (e) => e?.id ?? e ?? null, Ie = (e) => {
130
+ }), Le = (e) => e?.id ?? e ?? null, Re = (e) => {
120
131
  if (!e) return "Cible non définie";
121
132
  let t = [
122
133
  e.commune,
@@ -124,17 +135,17 @@ var Se = {
124
135
  e.libelleModule
125
136
  ].filter(Boolean);
126
137
  return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
127
- }, 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 = {}) => {
138
+ }, ze = (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 : ze(e.patrimoine), Ve = (e, t) => e.description == null ? !t : e.description.trim().length > 0, He = (e = {}) => {
128
139
  let t = {
129
- ...Me(),
140
+ ...U(),
130
141
  ...e
131
142
  };
132
143
  return e.patrimoine && (t.patrimoine = {
133
- ...U(),
144
+ ...H(),
134
145
  ...e.patrimoine
135
146
  }), t;
136
- }, Ve = (e) => {
137
- let t = Pe();
147
+ }, Ue = (e) => {
148
+ let t = Ie();
138
149
  if (!e) return t;
139
150
  let n = Array.isArray(e.lignes) && e.lignes.length ? e.lignes : null;
140
151
  return {
@@ -147,14 +158,14 @@ var Se = {
147
158
  provenance: e.provenance ?? t.provenance,
148
159
  lignes: n ? n.map((e, n) => n === 0 ? {
149
160
  ...t.lignes[0],
150
- ...Be(e)
151
- } : Be(e)) : t.lignes
161
+ ...He(e)
162
+ } : He(e)) : t.lignes
152
163
  };
153
164
  };
154
- function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly: r = M(!1) } = {}) {
155
- let i = j(Pe()), a = b(() => {
165
+ function We({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly: r = M(!1) } = {}) {
166
+ let i = j(Ie()), a = b(() => {
156
167
  let e = R(r);
157
- return e === !0 ? Ne : Array.isArray(e) ? e : [];
168
+ return e === !0 ? Fe : Array.isArray(e) ? e : [];
158
169
  }), o = (e) => a.value.includes(e), s = b(() => i.lignes[0]), c = b(() => i.lignes.slice(1)), l = b(() => R(e) ?? []), u = M(null), d = (e, t) => e.type === t.type && String(e.id) === String(t.id), f = b(() => {
159
170
  let e = u.value;
160
171
  return !e || l.value.some((t) => d(t, e)) ? l.value : [...l.value, e];
@@ -170,13 +181,13 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
170
181
  reclamantSelectionne: p,
171
182
  moduleReclamantPrincipal: ee,
172
183
  reclamantEstContrat: g,
173
- ciblesValid: b(() => i.lignes.every((e) => Re(e, g.value))),
174
- detailsValid: b(() => i.lignes.every((e, t) => ze(e, t === 0))),
184
+ ciblesValid: b(() => i.lignes.every((e) => Be(e, g.value))),
185
+ detailsValid: b(() => i.lignes.every((e, t) => Ve(e, t === 0))),
175
186
  isReadonly: o,
176
187
  ciblesAssocieesReinitialisees: h,
177
188
  ligneCibleValid(e) {
178
189
  let t = i.lignes[e];
179
- return !!t && Re(t, g.value);
190
+ return !!t && Be(t, g.value);
180
191
  },
181
192
  reset(e = null) {
182
193
  let t = e?.lignes?.[0];
@@ -185,7 +196,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
185
196
  "patrimoine",
186
197
  "contratCible"
187
198
  ].some((e) => t[e] != null), h.value = 0;
188
- let n = Ve(e);
199
+ let n = Ue(e);
189
200
  Object.assign(i, n), i.lignes = n.lignes;
190
201
  },
191
202
  setProvenance(e) {
@@ -220,7 +231,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
220
231
  t > 0 && e.cibleOverride && _.toggleCibleOverride(t);
221
232
  }), e.length && (h.value = e.length);
222
233
  }
223
- e === "D" ? (r.cibleMode = "demande", r.patrimoine = null) : (r.cibleMode = g.value ? "contrat" : "patrimoine", r.contratReclamant = g.value, r.contratCible = null, r.reprendreLocataireActuel = !1, r.patrimoine = U(), _.prefillCiblePrincipale());
234
+ e === "D" ? (r.cibleMode = "demande", r.patrimoine = null) : (r.cibleMode = g.value ? "contrat" : "patrimoine", r.contratReclamant = g.value, r.contratCible = null, r.reprendreLocataireActuel = !1, r.patrimoine = H(), _.prefillCiblePrincipale());
224
235
  },
225
236
  prefillCiblePrincipale() {
226
237
  if (o("cible") || m.value) return;
@@ -252,7 +263,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
252
263
  toggleLigneAssociee(e, t = {}) {
253
264
  let n = i.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
254
265
  n === -1 ? i.lignes.push({
255
- ...Me(),
266
+ ...U(),
256
267
  idMotif: e,
257
268
  ...t
258
269
  }) : i.lignes.splice(n, 1);
@@ -262,7 +273,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
262
273
  },
263
274
  setCibleMode(e, t) {
264
275
  let n = i.lignes[e];
265
- 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 ??= U());
276
+ 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 ??= H());
266
277
  },
267
278
  setModulePrecis(e, t) {
268
279
  let n = i.lignes[e];
@@ -352,7 +363,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
352
363
  motif: e.idMotif,
353
364
  description: a,
354
365
  dateFaits: o,
355
- responsable: Fe(e.responsable)
366
+ responsable: Le(e.responsable)
356
367
  };
357
368
  if (r.cibleMode === "demande") return {
358
369
  ...c,
@@ -385,7 +396,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
385
396
  cibleResume(e) {
386
397
  let t = i.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
387
398
  if (n.cibleMode === "demande") return "La demande";
388
- let r = Ie(n.patrimoine);
399
+ let r = Re(n.patrimoine);
389
400
  if (n.cibleMode === "patrimoine" && !n.modulePrecis) return `Parties communes — ${r}`;
390
401
  if (n.cibleMode !== "contrat") return r;
391
402
  let a = "Contrat non défini";
@@ -411,11 +422,11 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = M(null), readonly:
411
422
  };
412
423
  return j(_);
413
424
  }
414
- function Ue(e) {
415
- return fe(je, e), e;
425
+ function Ge(e) {
426
+ return fe(Me, e), e;
416
427
  }
417
428
  function W() {
418
- let e = ue(je, null);
429
+ let e = ue(Me, null);
419
430
  if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
420
431
  return e;
421
432
  }
@@ -424,7 +435,7 @@ var G = (e, t) => {
424
435
  let n = e.__vccOpts || e;
425
436
  for (let [e, r] of t) n[e] = r;
426
437
  return n;
427
- }, We = {
438
+ }, Ke = {
428
439
  name: "AsideBlock",
429
440
  components: { AmsomNavTabsHorizontal: ge },
430
441
  props: { nbSimilaires: {
@@ -468,11 +479,11 @@ var G = (e, t) => {
468
479
  e.some((e) => e.id === this.activeTab) || (this.activeTab = e[0]?.id ?? null);
469
480
  }
470
481
  } }
471
- }, Ge = {
482
+ }, qe = {
472
483
  key: 0,
473
484
  class: "badge bg-danger ms-1"
474
- }, Ke = { style: { "min-height": "320px" } }, qe = { key: 0 }, Je = { key: 1 };
475
- function Ye(e, t, n, r, i, a) {
485
+ }, Je = { style: { "min-height": "320px" } }, Ye = { key: 0 }, Xe = { key: 1 };
486
+ function Ze(e, t, n, r, i, a) {
476
487
  let o = F("font-awesome-icon"), s = F("amsom-nav-tabs-horizontal");
477
488
  return a.tabs.length ? (A(), x(s, {
478
489
  key: 0,
@@ -485,13 +496,13 @@ function Ye(e, t, n, r, i, a) {
485
496
  libelle: z(({ item: e }) => [
486
497
  E(o, { icon: e.icon }, null, 8, ["icon"]),
487
498
  w("span", null, I(e.label), 1),
488
- e.id === "similarite" && n.nbSimilaires > 0 ? (A(), C("span", Ge, I(n.nbSimilaires), 1)) : S("", !0)
499
+ e.id === "similarite" && n.nbSimilaires > 0 ? (A(), C("span", qe, I(n.nbSimilaires), 1)) : S("", !0)
489
500
  ]),
490
- content: z(() => [w("div", Ke, [e.$slots.similaires ? he((A(), C("div", qe, [P(e.$slots, "similaires", k(D(a.scope)))], 512)), [[me, i.activeTab === "similarite"]]) : S("", !0), e.$slots.evenements ? he((A(), C("div", Je, [P(e.$slots, "evenements")], 512)), [[me, i.activeTab === "evenements"]]) : S("", !0)])]),
501
+ content: z(() => [w("div", Je, [e.$slots.similaires ? he((A(), C("div", Ye, [P(e.$slots, "similaires", k(D(a.scope)))], 512)), [[me, i.activeTab === "similarite"]]) : S("", !0), e.$slots.evenements ? he((A(), C("div", Xe, [P(e.$slots, "evenements")], 512)), [[me, i.activeTab === "evenements"]]) : S("", !0)])]),
491
502
  _: 3
492
503
  }, 8, ["modelValue", "items"])) : S("", !0);
493
504
  }
494
- var Xe = /*#__PURE__*/ G(We, [["render", Ye]]), Ze = {
505
+ var Qe = /*#__PURE__*/ G(Ke, [["render", Ze]]), $e = {
495
506
  name: "SectionComponent",
496
507
  props: {
497
508
  titre: {
@@ -503,19 +514,19 @@ var Xe = /*#__PURE__*/ G(We, [["render", Ye]]), Ze = {
503
514
  default: null
504
515
  }
505
516
  }
506
- }, Qe = { class: "d-flex flex-column gap-2" }, $e = { class: "d-flex flex-wrap align-items-center justify-content-between gap-2" }, et = { class: "fs-6 fw-semibold" }, tt = {
517
+ }, et = { class: "d-flex flex-column gap-2" }, tt = { class: "d-flex flex-wrap align-items-center justify-content-between gap-2" }, nt = { class: "fs-6 fw-semibold" }, rt = {
507
518
  key: 0,
508
519
  class: "text-muted d-flex align-items-center gap-1"
509
520
  };
510
- function nt(e, t, n, r, i, a) {
521
+ function it(e, t, n, r, i, a) {
511
522
  let o = F("font-awesome-icon");
512
- return A(), C("section", Qe, [w("div", null, [w("div", $e, [w("span", et, I(n.titre), 1), P(e.$slots, "actions")]), n.aide ? (A(), C("small", tt, [E(o, { icon: "circle-info" }), T(" " + I(n.aide), 1)])) : S("", !0)]), P(e.$slots, "default")]);
523
+ return A(), C("section", et, [w("div", null, [w("div", tt, [w("span", nt, I(n.titre), 1), P(e.$slots, "actions")]), n.aide ? (A(), C("small", rt, [E(o, { icon: "circle-info" }), T(" " + I(n.aide), 1)])) : S("", !0)]), P(e.$slots, "default")]);
513
524
  }
514
- var rt = /*#__PURE__*/ G(Ze, [["render", nt]]), it = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
515
- async function at(t) {
525
+ var at = /*#__PURE__*/ G($e, [["render", it]]), ot = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
526
+ async function st(t) {
516
527
  let n = await import("@fortawesome/free-solid-svg-icons");
517
528
  [...new Set(t.filter(Boolean))].forEach((t) => {
518
- let r = n[it(t)];
529
+ let r = n[ot(t)];
519
530
  r && e.add(r);
520
531
  });
521
532
  }
@@ -526,7 +537,7 @@ function K(e, t = !0) {
526
537
  return t ? n.toLowerCase() : n;
527
538
  }
528
539
  // src/components/IconSelectComponent.vue
529
- var ot = {
540
+ var ct = {
530
541
  name: "IconSelectComponent",
531
542
  components: { AmsomAutocomplete: B },
532
543
  props: {
@@ -565,20 +576,20 @@ var ot = {
565
576
  watch: { items: {
566
577
  immediate: !0,
567
578
  async handler(e) {
568
- await at(e.map((e) => e.icon)), this.iconsReady = !0;
579
+ await st(e.map((e) => e.icon)), this.iconsReady = !0;
569
580
  }
570
581
  } },
571
582
  methods: { filtrer({ search: e, items: t }) {
572
583
  let n = (K(e) ?? "").trim();
573
584
  return n ? t.filter((e) => (K(e?.libelle) ?? "").includes(n)) : t;
574
585
  } }
575
- }, st = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, ct = {
586
+ }, lt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, ut = {
576
587
  key: 0,
577
588
  class: "ms-1 text-danger"
578
- }, lt = { class: "d-inline-flex align-items-center gap-2" };
579
- function ut(e, t, n, r, i, a) {
589
+ }, dt = { class: "d-inline-flex align-items-center gap-2" };
590
+ function ft(e, t, n, r, i, a) {
580
591
  let o = F("font-awesome-icon"), s = F("amsom-autocomplete");
581
- return A(), C("div", null, [w("label", st, [T(I(n.label), 1), n.required ? (A(), C("span", ct, "*")) : S("", !0)]), i.iconsReady ? (A(), x(s, {
592
+ return A(), C("div", null, [w("label", lt, [T(I(n.label), 1), n.required ? (A(), C("span", ut, "*")) : S("", !0)]), i.iconsReady ? (A(), x(s, {
582
593
  key: 0,
583
594
  "model-value": a.selected,
584
595
  items: n.items,
@@ -591,7 +602,7 @@ function ut(e, t, n, r, i, a) {
591
602
  "input-size": "sm",
592
603
  "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t?.id ?? null)
593
604
  }, {
594
- options: z((e) => [w("span", lt, [e?.icon ? (A(), x(o, {
605
+ options: z((e) => [w("span", dt, [e?.icon ? (A(), x(o, {
595
606
  key: 0,
596
607
  icon: e.icon,
597
608
  "fixed-width": ""
@@ -607,20 +618,20 @@ function ut(e, t, n, r, i, a) {
607
618
  "placeholder"
608
619
  ])) : S("", !0)]);
609
620
  }
610
- var dt = /*#__PURE__*/ G(ot, [["render", ut]]), ft = {
621
+ var pt = /*#__PURE__*/ G(ct, [["render", ft]]), mt = {
611
622
  baseUrl: "",
612
623
  getToken: () => ye.getToken(),
613
624
  setToken: (e) => ye.setToken(e),
614
625
  logout: () => ye.logout(),
615
626
  goToLoginPage: () => ye.goToLoginPage()
616
627
  };
617
- function pt(e = {}) {
618
- Object.assign(ft, e);
628
+ function ht(e = {}) {
629
+ Object.assign(mt, e);
619
630
  }
620
- var mt = () => ft;
631
+ var gt = () => mt;
621
632
  // src/api/transport/axiosOverlayConnector.js
622
- function ht(e, t = {}) {
623
- let n = mt(), r = {
633
+ function _t(e, t = {}) {
634
+ let n = gt(), r = {
624
635
  getToken: () => n.getToken?.() ?? null,
625
636
  setToken: (e) => n.setToken?.(e),
626
637
  logout: () => n.logout?.(),
@@ -645,70 +656,70 @@ function ht(e, t = {}) {
645
656
  }, ve(e, t);
646
657
  }
647
658
  // src/api/transport/httpClient.js
648
- var gt = (e, t) => {
649
- let n = t || mt().baseUrl;
659
+ var vt = (e, t) => {
660
+ let n = t || gt().baseUrl;
650
661
  if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
651
662
  return `${n}${e}`;
652
- }, _t = (e = {}) => {
663
+ }, yt = (e = {}) => {
653
664
  let t = new URLSearchParams();
654
665
  Object.entries(e).forEach(([e, n]) => {
655
666
  n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
656
667
  });
657
668
  let n = t.toString();
658
669
  return n ? `?${n}` : "";
659
- }, vt = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => ht({
660
- url: gt(`${t}${_t(n)}`, a),
670
+ }, bt = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => _t({
671
+ url: vt(`${t}${yt(n)}`, a),
661
672
  method: e,
662
673
  ...r === void 0 ? {} : { data: r },
663
674
  ...i ? { signal: i } : {}
664
- }, o), q = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => vt({
675
+ }, o), q = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => bt({
665
676
  method: "GET",
666
677
  path: e,
667
678
  params: t,
668
679
  signal: n,
669
680
  baseUrl: i
670
- }, r).then((e) => e.data), yt = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => vt({
681
+ }, r).then((e) => e.data), xt = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => bt({
671
682
  method: "POST",
672
683
  path: e,
673
684
  params: n,
674
685
  data: t,
675
686
  signal: r,
676
687
  baseUrl: a
677
- }, i).then((e) => e.data), bt = { mustBeAuthenticated: !1 }, J = (e, { signal: t, baseUrl: n } = {}) => q(e, {
688
+ }, i).then((e) => e.data), St = { mustBeAuthenticated: !1 }, J = (e, { signal: t, baseUrl: n } = {}) => q(e, {
678
689
  signal: t,
679
690
  baseUrl: n,
680
- overlay: bt
681
- }), xt = (e) => J("/v2/sollicitation/motifs", e), St = (e) => J("/v2/sollicitation/categories", e), Ct = (e) => J("/v2/sollicitation/types", e), wt = (e) => J("/v2/sollicitation/natures", e), Tt = (e) => J("/v2/sollicitation/etats", e), Et = ({ signal: e, baseUrl: t } = {}) => q("/v2/sollicitation/provenances", {
691
+ overlay: St
692
+ }), Ct = (e) => J("/v2/sollicitation/motifs", e), wt = (e) => J("/v2/sollicitation/categories", e), Tt = (e) => J("/v2/sollicitation/types", e), Et = (e) => J("/v2/sollicitation/natures", e), Dt = (e) => J("/v2/sollicitation/etats", e), Ot = ({ signal: e, baseUrl: t } = {}) => q("/v2/sollicitation/provenances", {
682
693
  params: { estDesactive: !1 },
683
694
  signal: e,
684
695
  baseUrl: t,
685
- overlay: bt
686
- }), Dt = ({ signal: e, baseUrl: t } = {}) => q("/collaborateurs", {
696
+ overlay: St
697
+ }), kt = ({ signal: e, baseUrl: t } = {}) => q("/collaborateurs", {
687
698
  params: { actif: !0 },
688
699
  signal: e,
689
700
  baseUrl: t
690
- }), Ot = async ({ signal: e, baseUrl: t } = {}) => (await q("/v2/patrimoine/communes", {
701
+ }), At = async ({ signal: e, baseUrl: t } = {}) => (await q("/v2/patrimoine/communes", {
691
702
  signal: e,
692
703
  baseUrl: t
693
704
  }) ?? []).map((e) => ({
694
705
  idCommune: e.id,
695
706
  commune: e.libelle
696
- })), kt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/entrees", {
707
+ })), jt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/entrees", {
697
708
  params: { idCommune: e },
698
709
  signal: t,
699
710
  baseUrl: n
700
- }), At = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/modules", {
711
+ }), Mt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/modules", {
701
712
  params: { codeProgramme: e },
702
713
  signal: t,
703
714
  baseUrl: n
704
- }), jt = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => q("/v2/patrimoine/contrat_modules", {
715
+ }), Nt = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => q("/v2/patrimoine/contrat_modules", {
705
716
  params: {
706
717
  idContrat: e,
707
718
  typeContrat: t
708
719
  },
709
720
  signal: n,
710
721
  baseUrl: r
711
- }), Mt = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => q("/v2/sollicitation/responsables", {
722
+ }), Pt = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => q("/v2/sollicitation/responsables", {
712
723
  params: {
713
724
  motif: e,
714
725
  categorie: t,
@@ -717,11 +728,11 @@ var gt = (e, t) => {
717
728
  },
718
729
  signal: i,
719
730
  baseUrl: a
720
- }), Nt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/contrat_module_rechercher", {
731
+ }), Ft = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/contrat_module_rechercher", {
721
732
  params: { recherche: e },
722
733
  signal: t,
723
734
  baseUrl: n
724
- }), Pt = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => q("/v2/cresol/reclamant_rechercher", {
735
+ }), It = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => q("/v2/cresol/reclamant_rechercher", {
725
736
  params: {
726
737
  categorie: e,
727
738
  recherche: t
@@ -730,11 +741,11 @@ var gt = (e, t) => {
730
741
  baseUrl: r
731
742
  });
732
743
  // src/utils/apiError.js
733
- function Ft(e) {
744
+ function Lt(e) {
734
745
  let t = e?.response?.data;
735
746
  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";
736
747
  }
737
- var It = (e) => e?.name === "AbortError" || e?.name === "CanceledError", Lt = Symbol("cresol:data"), Rt = () => ({
748
+ var Rt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", zt = Symbol("cresol:data"), Bt = () => ({
738
749
  motifs: null,
739
750
  categories: null,
740
751
  types: null,
@@ -747,17 +758,17 @@ var It = (e) => e?.name === "AbortError" || e?.name === "CanceledError", Lt = Sy
747
758
  modulesByProgramme: {},
748
759
  modulesByContrat: {},
749
760
  responsablesByMotif: {}
750
- }), zt = /* @__PURE__ */ new Map(), Bt = (e) => (zt.has(e) || zt.set(e, j(Rt())), zt.get(e)), Y = /* @__PURE__ */ new Map();
751
- function Vt() {
752
- zt.clear(), Y.clear();
761
+ }), Vt = /* @__PURE__ */ new Map(), Ht = (e) => (Vt.has(e) || Vt.set(e, j(Bt())), Vt.get(e)), Y = /* @__PURE__ */ new Map();
762
+ function Ut() {
763
+ Vt.clear(), Y.clear();
753
764
  }
754
- var X = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, Ht = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
755
- function Ut({ onError: e, baseUrl: t } = {}) {
756
- let n = M(0), r = () => ({ baseUrl: R(t) || null }), i = () => R(t) || mt().baseUrl || "", a = () => Bt(i()), o = (t, r) => {
765
+ var X = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, Wt = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
766
+ function Gt({ onError: e, baseUrl: t } = {}) {
767
+ let n = M(0), r = () => ({ baseUrl: R(t) || null }), i = () => R(t) || gt().baseUrl || "", a = () => Ht(i()), o = (t, r) => {
757
768
  let a = `${i()}|${t}`;
758
769
  if (Y.has(a)) return Y.get(a);
759
770
  n.value += 1;
760
- let o = Promise.resolve().then(r).catch((t) => (It(t) || e?.(Ft(t)), null)).finally(() => {
771
+ let o = Promise.resolve().then(r).catch((t) => (Rt(t) || e?.(Lt(t)), null)).finally(() => {
761
772
  --n.value, Y.delete(a);
762
773
  });
763
774
  return Y.set(a, o), o;
@@ -769,27 +780,27 @@ function Ut({ onError: e, baseUrl: t } = {}) {
769
780
  isLoading: b(() => n.value > 0),
770
781
  loadNomenclature() {
771
782
  return Promise.all([
772
- s("motifs", xt),
773
- s("categories", St),
774
- s("types", Ct),
775
- s("natures", wt),
776
- s("etats", Tt)
783
+ s("motifs", Ct),
784
+ s("categories", wt),
785
+ s("types", Tt),
786
+ s("natures", Et),
787
+ s("etats", Dt)
777
788
  ]);
778
789
  },
779
- loadCollaborateurs: () => s("collaborateurs", Dt),
780
- loadProvenances: () => s("provenances", Et),
790
+ loadCollaborateurs: () => s("collaborateurs", kt),
791
+ loadProvenances: () => s("provenances", Ot),
781
792
  loadCommunes() {
782
- return a().communes?.length ? Promise.resolve(a().communes) : o("communes", async () => (a().communes = await Ot(r()), a().communes));
793
+ return a().communes?.length ? Promise.resolve(a().communes) : o("communes", async () => (a().communes = await At(r()), a().communes));
783
794
  },
784
795
  loadAdresses(e) {
785
796
  return e == null ? Promise.resolve([]) : a().adressesByCommune[e] ? Promise.resolve(a().adressesByCommune[e]) : o(`adresses:${e}`, async () => {
786
- let t = await kt(e, r());
797
+ let t = await jt(e, r());
787
798
  return a().adressesByCommune[e] = t ?? [], t;
788
799
  });
789
800
  },
790
801
  loadModulesOfProgramme(e) {
791
802
  return e == null ? Promise.resolve([]) : a().modulesByProgramme[e] ? Promise.resolve(a().modulesByProgramme[e]) : o(`modules:${e}`, async () => {
792
- let t = await At(e, r());
803
+ let t = await Mt(e, r());
793
804
  return a().modulesByProgramme[e] = t ?? [], t;
794
805
  });
795
806
  },
@@ -797,7 +808,7 @@ function Ut({ onError: e, baseUrl: t } = {}) {
797
808
  if (e == null) return Promise.resolve([]);
798
809
  let n = `${t ?? ""}|${e}`;
799
810
  return a().modulesByContrat[n] ? Promise.resolve(a().modulesByContrat[n]) : o(`contratModules:${n}`, async () => {
800
- let i = await jt({
811
+ let i = await Nt({
801
812
  idContrat: e,
802
813
  typeContrat: t
803
814
  }, r());
@@ -807,7 +818,7 @@ function Ut({ onError: e, baseUrl: t } = {}) {
807
818
  async searchContrats(e, { signal: t } = {}) {
808
819
  let n = (e ?? "").trim();
809
820
  if (!n) return [];
810
- let i = await Nt(n, {
821
+ let i = await Ft(n, {
811
822
  ...r(),
812
823
  signal: t
813
824
  }), a = /* @__PURE__ */ new Map();
@@ -829,7 +840,7 @@ function Ut({ onError: e, baseUrl: t } = {}) {
829
840
  async searchReclamants(e, t, { signal: n } = {}) {
830
841
  let i = (t ?? "").trim();
831
842
  if (!i) return [];
832
- let a = await Pt({
843
+ let a = await It({
833
844
  categorie: e,
834
845
  recherche: i
835
846
  }, {
@@ -865,7 +876,7 @@ function Ut({ onError: e, baseUrl: t } = {}) {
865
876
  },
866
877
  loadResponsables({ motif: e, categorie: t, type: n, nature: i }) {
867
878
  return e == null ? Promise.resolve([]) : a().responsablesByMotif[e] ? Promise.resolve(a().responsablesByMotif[e]) : o(`responsables:${e}`, async () => {
868
- let o = await Mt({
879
+ let o = await Pt({
869
880
  motif: e,
870
881
  categorie: t,
871
882
  type: n,
@@ -894,25 +905,25 @@ function Ut({ onError: e, baseUrl: t } = {}) {
894
905
  typeLibelle: (e) => X(a().types, "id", e),
895
906
  natureLibelle: (e) => X(a().natures, "id", e),
896
907
  etatLibelle: (e) => X(a().etats, "code", e),
897
- motifIcon: (e) => Ht(a().motifs, "id", e),
898
- categorieIcon: (e) => Ht(a().categories, "id", e),
899
- typeIcon: (e) => Ht(a().types, "id", e),
900
- natureIcon: (e) => Ht(a().natures, "id", e)
908
+ motifIcon: (e) => Wt(a().motifs, "id", e),
909
+ categorieIcon: (e) => Wt(a().categories, "id", e),
910
+ typeIcon: (e) => Wt(a().types, "id", e),
911
+ natureIcon: (e) => Wt(a().natures, "id", e)
901
912
  };
902
913
  return j(c);
903
914
  }
904
- function Wt(e) {
905
- return fe(Lt, e), e;
915
+ function Kt(e) {
916
+ return fe(zt, e), e;
906
917
  }
907
918
  function Z() {
908
- let e = ue(Lt, null);
919
+ let e = ue(zt, null);
909
920
  if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
910
921
  return e;
911
922
  }
912
923
  // src/composables/useCresolContext.js
913
- var Gt = Symbol("cresol:options"), Kt = (e) => fe(Gt, e), Q = () => ue(Gt, {}), qt = {
924
+ var qt = Symbol("cresol:options"), Jt = (e) => fe(qt, e), Q = () => ue(qt, {}), Yt = {
914
925
  name: "ProvenanceSelecteurBlock",
915
- components: { IconSelectComponent: dt },
926
+ components: { IconSelectComponent: pt },
916
927
  setup() {
917
928
  return {
918
929
  draft: W(),
@@ -937,41 +948,41 @@ var Gt = Symbol("cresol:options"), Kt = (e) => fe(Gt, e), Q = () => ue(Gt, {}),
937
948
  return this.provenances.find((e) => e.id === this.selected) ?? null;
938
949
  }
939
950
  }
940
- }, Jt = { key: 0 }, Yt = ["value"], Xt = { key: 1 }, Zt = {
951
+ }, Xt = { key: 0 }, Zt = ["value"], Qt = { key: 1 }, $t = {
941
952
  key: 0,
942
953
  class: "fs-7 text-danger mt-1"
943
954
  };
944
- function Qt(e, t, n, r, i, a) {
955
+ function en(e, t, n, r, i, a) {
945
956
  let o = F("icon-select-component");
946
- return r.draft.isReadonly("provenance") ? (A(), C("div", Jt, [t[1] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Provenance", -1), w("input", {
957
+ return r.draft.isReadonly("provenance") ? (A(), C("div", Xt, [t[1] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Provenance", -1), w("input", {
947
958
  class: "form-control form-control-sm",
948
959
  disabled: "",
949
960
  value: a.libelleFige
950
- }, null, 8, Yt)])) : (A(), C("div", Xt, [E(o, {
961
+ }, null, 8, Zt)])) : (A(), C("div", Qt, [E(o, {
951
962
  "model-value": a.provenanceChoisie?.id ?? null,
952
963
  items: a.provenances,
953
964
  label: "Provenance",
954
965
  required: "",
955
966
  "onUpdate:modelValue": t[0] ||= (e) => r.draft.setProvenance(e)
956
- }, null, 8, ["model-value", "items"]), a.loaded && !a.provenanceChoisie ? (A(), C("div", Zt, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : S("", !0)]));
967
+ }, null, 8, ["model-value", "items"]), a.loaded && !a.provenanceChoisie ? (A(), C("div", $t, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : S("", !0)]));
957
968
  }
958
- var $t = /*#__PURE__*/ G(qt, [["render", Qt]]);
969
+ var tn = /*#__PURE__*/ G(Yt, [["render", en]]);
959
970
  // src/utils/date.js
960
- function en(e) {
971
+ function nn(e) {
961
972
  return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
962
973
  }
963
- function tn(e) {
974
+ function rn(e) {
964
975
  return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
965
976
  }
966
- function nn(e) {
977
+ function an(e) {
967
978
  return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
968
979
  }
969
980
  // src/components/ReclamantTypeBadgeComponent.vue
970
- var rn = M(!1);
971
- at(Object.values(V).map((e) => e.icon)).then(() => {
972
- rn.value = !0;
981
+ var on = M(!1);
982
+ st(Object.values(V).map((e) => e.icon)).then(() => {
983
+ on.value = !0;
973
984
  });
974
- var an = {
985
+ var sn = {
975
986
  name: "ReclamantTypeBadgeComponent",
976
987
  props: {
977
988
  reclamant: {
@@ -984,13 +995,13 @@ var an = {
984
995
  }
985
996
  },
986
997
  setup() {
987
- return { iconsReady: rn };
998
+ return { iconsReady: on };
988
999
  },
989
1000
  computed: { type() {
990
- return Ae(this.reclamant);
1001
+ return je(this.reclamant);
991
1002
  } }
992
- }, on = ["title"], sn = { key: 1 };
993
- function cn(e, t, n, r, i, a) {
1003
+ }, cn = ["title"], ln = { key: 1 };
1004
+ function un(e, t, n, r, i, a) {
994
1005
  let o = F("font-awesome-icon");
995
1006
  return a.type ? (A(), C("span", {
996
1007
  key: 0,
@@ -1000,9 +1011,9 @@ function cn(e, t, n, r, i, a) {
1000
1011
  key: 0,
1001
1012
  icon: a.type.icon,
1002
1013
  "fixed-width": ""
1003
- }, null, 8, ["icon"])) : S("", !0), n.iconOnly ? S("", !0) : (A(), C("span", sn, I(a.type.libelle), 1))], 10, on)) : S("", !0);
1014
+ }, null, 8, ["icon"])) : S("", !0), n.iconOnly ? S("", !0) : (A(), C("span", ln, I(a.type.libelle), 1))], 10, cn)) : S("", !0);
1004
1015
  }
1005
- var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1016
+ var dn = /*#__PURE__*/ G(sn, [["render", un]]), fn = [
1006
1017
  {
1007
1018
  key: "locataire",
1008
1019
  label: "Locataire",
@@ -1059,17 +1070,17 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1059
1070
  aucun: "Aucun réclamant trouvé.",
1060
1071
  placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
1061
1072
  }
1062
- ], dn = {
1073
+ ], pn = {
1063
1074
  signataire: "Signataire",
1064
1075
  occupant: "Occupant",
1065
1076
  demandeur: "Demandeur"
1066
- }, fn = {
1077
+ }, mn = {
1067
1078
  name: "ReclamantRechercheBlock",
1068
1079
  components: {
1069
1080
  AmsomAutocomplete: B,
1070
1081
  AmsomOverlay: v,
1071
- IconSelectComponent: dt,
1072
- ReclamantTypeBadgeComponent: ln
1082
+ IconSelectComponent: pt,
1083
+ ReclamantTypeBadgeComponent: dn
1073
1084
  },
1074
1085
  setup() {
1075
1086
  return {
@@ -1089,13 +1100,13 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1089
1100
  },
1090
1101
  computed: {
1091
1102
  typesAutorises() {
1092
- return this.options.typesReclamant ?? H;
1103
+ return this.options.typesReclamant ?? Oe;
1093
1104
  },
1094
1105
  autorisees() {
1095
- return Oe(this.typesAutorises);
1106
+ return ke(this.typesAutorises);
1096
1107
  },
1097
1108
  categories() {
1098
- return un.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
1109
+ return fn.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
1099
1110
  },
1100
1111
  categoriesItems() {
1101
1112
  return this.categories.map((e) => ({
@@ -1105,11 +1116,14 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1105
1116
  }));
1106
1117
  },
1107
1118
  categorieCourante() {
1108
- return un.find((e) => e.key === this.categorie);
1119
+ return fn.find((e) => e.key === this.categorie);
1109
1120
  },
1110
1121
  selectionne() {
1111
1122
  return this.draft.reclamantSelectionne;
1112
1123
  },
1124
+ estFige() {
1125
+ return this.draft.isReadonly("reclamant");
1126
+ },
1113
1127
  selectedTrouve: {
1114
1128
  get() {
1115
1129
  return this.categorie === "tout" || this.categorieOf(this.selectionne) === this.categorie ? this.selectionne : null;
@@ -1123,17 +1137,17 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1123
1137
  this.categorie !== "tout" && (this.categorie = this.categorieOf(e) ?? this.categorie);
1124
1138
  } },
1125
1139
  async created() {
1126
- this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await at(un.map((e) => e.icon)), this.iconsReady = !0;
1140
+ this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await st(fn.map((e) => e.icon)), this.iconsReady = !0;
1127
1141
  },
1128
1142
  beforeUnmount() {
1129
1143
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
1130
1144
  },
1131
1145
  methods: {
1132
1146
  select(e) {
1133
- e && this.draft.selectReclamant(e);
1147
+ e && !this.estFige && this.draft.selectReclamant(e);
1134
1148
  },
1135
1149
  setCategorie(e) {
1136
- e && e !== this.categorie && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
1150
+ e && e !== this.categorie && !this.estFige && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
1137
1151
  },
1138
1152
  rechercherPlusTard(e) {
1139
1153
  clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercher(e), 400);
@@ -1150,11 +1164,11 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1150
1164
  return e ? `${e.type}|${e.id}` : null;
1151
1165
  },
1152
1166
  categorieOf(e) {
1153
- let t = ke(e);
1167
+ let t = Ae(e);
1154
1168
  return this.autorisees.includes(t) ? t : null;
1155
1169
  },
1156
1170
  sortiLibelle(e) {
1157
- return e?.dateSortie == null ? "sorti" : `sorti le ${nn(e.dateSortie)}`;
1171
+ return e?.dateSortie == null ? "sorti" : `sorti le ${an(e.dateSortie)}`;
1158
1172
  },
1159
1173
  nomsOf(e) {
1160
1174
  return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
@@ -1167,49 +1181,57 @@ var ln = /*#__PURE__*/ G(an, [["render", cn]]), un = [
1167
1181
  referenceOf(e) {
1168
1182
  if (!e?.individus) return "";
1169
1183
  let t = this.categorieOf(e);
1170
- 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;
1184
+ return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : je(e).libelle;
1171
1185
  },
1172
1186
  detailOf(e) {
1173
1187
  let t = e?.individus ?? [];
1174
- if (!["locataire", "demandeur"].includes(ke(e))) {
1188
+ if (!["locataire", "demandeur"].includes(Ae(e))) {
1175
1189
  let e = t[0];
1176
1190
  return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
1177
1191
  }
1178
1192
  return t.map((t) => {
1179
- let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${nn(t.dateSortie)}` : null, i = [dn[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
1193
+ let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${an(t.dateSortie)}` : null, i = [pn[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
1180
1194
  return i ? `${n} (${i})` : n;
1181
1195
  }).join(", ");
1182
1196
  }
1183
1197
  }
1184
- }, pn = { class: "row g-3" }, mn = {
1198
+ }, hn = { class: "row g-3" }, gn = {
1185
1199
  key: 0,
1186
1200
  class: "col-12 col-md-6"
1187
- }, hn = { class: "col-12" }, gn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, _n = { class: "min-w-0" }, vn = {
1201
+ }, _n = { class: "col-12" }, vn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, yn = {
1202
+ key: 0,
1203
+ class: "ms-1 text-danger"
1204
+ }, bn = { class: "min-w-0" }, xn = {
1188
1205
  key: 0,
1189
1206
  class: "badge bg-warning-subtle text-warning-emphasis ms-1"
1190
- }, yn = { class: "text-muted d-block text-truncate" }, bn = { key: 0 }, xn = {
1207
+ }, Sn = { class: "text-muted d-block text-truncate" }, Cn = { key: 0 }, wn = {
1191
1208
  key: 0,
1192
1209
  class: "text-muted d-block text-truncate"
1193
- }, Sn = {
1210
+ }, Tn = {
1194
1211
  key: 0,
1195
1212
  class: "text-muted"
1196
1213
  };
1197
- function Cn(e, t, n, r, i, a) {
1214
+ function En(e, t, n, r, i, a) {
1198
1215
  let o = F("icon-select-component"), s = F("reclamant-type-badge-component"), c = F("amsom-autocomplete"), l = F("amsom-overlay");
1199
1216
  return i.iconsReady ? (A(), x(l, {
1200
1217
  key: 0,
1201
1218
  loading: r.options.repriseReclamant
1202
1219
  }, {
1203
- default: z(() => [w("div", pn, [
1204
- e.$slots["avant-categorie"] ? (A(), C("div", mn, [P(e.$slots, "avant-categorie")])) : S("", !0),
1220
+ default: z(() => [w("div", hn, [
1221
+ e.$slots["avant-categorie"] ? (A(), C("div", gn, [P(e.$slots, "avant-categorie")])) : S("", !0),
1205
1222
  w("div", { class: O(["col-12", { "col-md-6": e.$slots["avant-categorie"] }]) }, [E(o, {
1206
1223
  "model-value": i.categorie,
1207
1224
  items: a.categoriesItems,
1208
1225
  label: "Le réclamant est…",
1226
+ disabled: a.estFige,
1209
1227
  "onUpdate:modelValue": t[0] ||= (e) => a.setCategorie(e)
1210
- }, null, 8, ["model-value", "items"])], 2),
1211
- w("div", hn, [
1212
- w("label", gn, [T(I(a.categorieCourante.recherche), 1), t[2] ||= w("span", { class: "ms-1 text-danger" }, "*", -1)]),
1228
+ }, null, 8, [
1229
+ "model-value",
1230
+ "items",
1231
+ "disabled"
1232
+ ])], 2),
1233
+ w("div", _n, [
1234
+ w("label", vn, [T(I(a.categorieCourante.recherche), 1), a.estFige ? S("", !0) : (A(), C("span", yn, "*"))]),
1213
1235
  (A(), x(c, {
1214
1236
  key: i.categorie,
1215
1237
  modelValue: a.selectedTrouve,
@@ -1221,11 +1243,12 @@ function Cn(e, t, n, r, i, a) {
1221
1243
  "get-input-libelle": (e) => e?.libelle ?? "",
1222
1244
  placeholder: a.categorieCourante.placeholder,
1223
1245
  "input-size": "sm",
1246
+ disabled: a.estFige,
1224
1247
  "hide-choices": "",
1225
1248
  "debounce-delay": 0,
1226
1249
  onSearch: a.rechercherPlusTard
1227
1250
  }, {
1228
- options: z((e) => [w("div", _n, [
1251
+ options: z((e) => [w("div", bn, [
1229
1252
  w("div", { class: O(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
1230
1253
  E(s, {
1231
1254
  reclamant: e,
@@ -1233,10 +1256,10 @@ function Cn(e, t, n, r, i, a) {
1233
1256
  class: "me-1"
1234
1257
  }, null, 8, ["reclamant"]),
1235
1258
  T(" " + I(a.titreOf(e)) + " ", 1),
1236
- e?.estActif ? S("", !0) : (A(), C("span", vn, I(a.categorieOf(e) === "demandeur" ? "inactive" : a.sortiLibelle(e)), 1))
1259
+ e?.estActif ? S("", !0) : (A(), C("span", xn, I(a.categorieOf(e) === "demandeur" ? "inactive" : a.sortiLibelle(e)), 1))
1237
1260
  ], 2),
1238
- w("small", yn, [T(I(a.referenceOf(e)) + " ", 1), e?.adresse ? (A(), C("span", bn, " — " + I(e.adresse), 1)) : S("", !0)]),
1239
- a.detailOf(e) ? (A(), C("small", xn, I(a.detailOf(e)), 1)) : S("", !0)
1261
+ w("small", Sn, [T(I(a.referenceOf(e)) + " ", 1), e?.adresse ? (A(), C("span", Cn, " — " + I(e.adresse), 1)) : S("", !0)]),
1262
+ a.detailOf(e) ? (A(), C("small", wn, I(a.detailOf(e)), 1)) : S("", !0)
1240
1263
  ])]),
1241
1264
  _: 1
1242
1265
  }, 8, [
@@ -1247,19 +1270,20 @@ function Cn(e, t, n, r, i, a) {
1247
1270
  "get-id",
1248
1271
  "get-input-libelle",
1249
1272
  "placeholder",
1273
+ "disabled",
1250
1274
  "onSearch"
1251
1275
  ])),
1252
- i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (A(), C("small", Sn, I(a.categorieCourante.aucun), 1)) : S("", !0)
1276
+ i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (A(), C("small", Tn, I(a.categorieCourante.aucun), 1)) : S("", !0)
1253
1277
  ])
1254
1278
  ])]),
1255
1279
  _: 3
1256
1280
  }, 8, ["loading"])) : S("", !0);
1257
1281
  }
1258
- var wn = /*#__PURE__*/ G(fn, [["render", Cn]]), Tn = {
1282
+ var Dn = /*#__PURE__*/ G(mn, [["render", En]]), On = {
1259
1283
  name: "ReclamantSelecteurBlock",
1260
1284
  components: {
1261
1285
  AmsomAutocomplete: B,
1262
- ReclamantTypeBadgeComponent: ln
1286
+ ReclamantTypeBadgeComponent: dn
1263
1287
  },
1264
1288
  props: { mode: {
1265
1289
  type: String,
@@ -1298,27 +1322,27 @@ var wn = /*#__PURE__*/ G(fn, [["render", Cn]]), Tn = {
1298
1322
  return n ? t.filter((e) => (K(e?.libelle) ?? "").includes(n)) : t;
1299
1323
  }
1300
1324
  }
1301
- }, En = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Dn = {
1325
+ }, kn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, An = {
1302
1326
  key: 0,
1303
1327
  class: "ms-1 text-danger"
1304
- }, On = ["value"], kn = {
1328
+ }, jn = ["value"], Mn = {
1305
1329
  key: 1,
1306
1330
  class: "btn-group btn-group-sm w-100",
1307
1331
  role: "group"
1308
- }, An = ["onClick"], jn = ["value"], Mn = ["value"];
1309
- function Nn(e, t, n, r, i, a) {
1332
+ }, Nn = ["onClick"], Pn = ["value"], Fn = ["value"];
1333
+ function In(e, t, n, r, i, a) {
1310
1334
  let o = F("reclamant-type-badge-component"), s = F("amsom-autocomplete");
1311
- return A(), C("div", null, [w("label", En, [t[2] ||= T(" Réclamant", -1), a.estFige ? S("", !0) : (A(), C("span", Dn, "*"))]), a.estFige ? (A(), C("input", {
1335
+ return A(), C("div", null, [w("label", kn, [t[2] ||= T(" Réclamant", -1), a.estFige ? S("", !0) : (A(), C("span", An, "*"))]), a.estFige ? (A(), C("input", {
1312
1336
  key: 0,
1313
1337
  class: "form-control form-control-sm",
1314
1338
  disabled: "",
1315
1339
  value: a.reclamantSelectionne?.libelle ?? "—"
1316
- }, null, 8, On)) : a.presentation === "switch" ? (A(), C("div", kn, [(A(!0), C(y, null, N(a.reclamants, (e, t) => (A(), C("button", {
1340
+ }, null, 8, jn)) : a.presentation === "switch" ? (A(), C("div", Mn, [(A(!0), C(y, null, N(a.reclamants, (e, t) => (A(), C("button", {
1317
1341
  key: t,
1318
1342
  type: "button",
1319
1343
  class: O(["btn d-inline-flex align-items-center justify-content-center", e === a.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
1320
1344
  onClick: (t) => a.select(e)
1321
- }, I(e.libelle), 11, An))), 128))])) : a.presentation === "autocomplete" ? (A(), x(s, {
1345
+ }, I(e.libelle), 11, Nn))), 128))])) : a.presentation === "autocomplete" ? (A(), x(s, {
1322
1346
  key: 2,
1323
1347
  "model-value": a.reclamantSelectionne,
1324
1348
  items: a.reclamants,
@@ -1350,9 +1374,9 @@ function Nn(e, t, n, r, i, a) {
1350
1374
  }, [(A(!0), C(y, null, N(a.reclamants, (e, t) => (A(), C("option", {
1351
1375
  key: t,
1352
1376
  value: t
1353
- }, I(e.libelle), 9, Mn))), 128))], 40, jn))]);
1377
+ }, I(e.libelle), 9, Fn))), 128))], 40, Pn))]);
1354
1378
  }
1355
- var Pn = /*#__PURE__*/ G(Tn, [["render", Nn]]), Fn = {
1379
+ var Ln = /*#__PURE__*/ G(On, [["render", In]]), Rn = {
1356
1380
  B: "briefcase",
1357
1381
  M: "store",
1358
1382
  W: "dungeon",
@@ -1362,14 +1386,14 @@ var Pn = /*#__PURE__*/ G(Tn, [["render", Nn]]), Fn = {
1362
1386
  S: "square-parking",
1363
1387
  V: "hands-holding"
1364
1388
  };
1365
- function In(e, t = !1, n = "circle-question") {
1366
- return e === "L" ? t ? "building" : "house" : Fn[e] ?? n;
1389
+ function zn(e, t = !1, n = "circle-question") {
1390
+ return e === "L" ? t ? "building" : "house" : Rn[e] ?? n;
1367
1391
  }
1368
- function Ln(e) {
1392
+ function Bn(e) {
1369
1393
  return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
1370
1394
  }
1371
1395
  // src/components/CiblePickerBlock.vue
1372
- var Rn = 0, zn = {
1396
+ var Vn = 0, Hn = {
1373
1397
  name: "CiblePickerBlock",
1374
1398
  components: { AmsomAutocomplete: B },
1375
1399
  props: {
@@ -1426,7 +1450,7 @@ var Rn = 0, zn = {
1426
1450
  },
1427
1451
  data() {
1428
1452
  return {
1429
- uid: ++Rn,
1453
+ uid: ++Vn,
1430
1454
  rechercheContrat: "",
1431
1455
  contratsTrouves: [],
1432
1456
  rechercheEnCours: !1,
@@ -1573,7 +1597,7 @@ var Rn = 0, zn = {
1573
1597
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
1574
1598
  },
1575
1599
  methods: {
1576
- formatDate: nn,
1600
+ formatDate: an,
1577
1601
  rechercherPlusTard(e) {
1578
1602
  clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
1579
1603
  },
@@ -1601,8 +1625,8 @@ var Rn = 0, zn = {
1601
1625
  let n = (K(e) ?? "").trim();
1602
1626
  return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || (K(this.moduleInputLibelle(e)) ?? "").includes(n) || (K(e?._autreLibelle) ?? "").includes(n)) : t;
1603
1627
  },
1604
- getCategorieModuleIcon: In,
1605
- categorieLibelle: Ln,
1628
+ getCategorieModuleIcon: zn,
1629
+ categorieLibelle: Bn,
1606
1630
  moduleLibelle(e) {
1607
1631
  return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
1608
1632
  },
@@ -1614,43 +1638,43 @@ var Rn = 0, zn = {
1614
1638
  return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
1615
1639
  }
1616
1640
  }
1617
- }, Bn = { class: "d-flex flex-column gap-3" }, Vn = {
1641
+ }, Un = { class: "d-flex flex-column gap-3" }, Wn = {
1618
1642
  class: "btn-group w-100",
1619
1643
  role: "group"
1620
- }, Hn = ["onClick"], Un = { class: "text-muted d-block mt-1" }, Wn = {
1644
+ }, Gn = ["onClick"], Kn = { class: "text-muted d-block mt-1" }, qn = {
1621
1645
  key: 0,
1622
1646
  class: "form-check"
1623
- }, Gn = ["id", "checked"], Kn = ["for"], qn = { key: 1 }, Jn = { class: "min-w-0" }, Yn = { class: "fw-medium text-truncate text-capitalize" }, Xn = { class: "d-flex flex-wrap align-items-center gap-1" }, Zn = { class: "text-muted" }, Qn = {
1647
+ }, Jn = ["id", "checked"], Yn = ["for"], Xn = { key: 1 }, Zn = { class: "min-w-0" }, Qn = { class: "fw-medium text-truncate text-capitalize" }, $n = { class: "d-flex flex-wrap align-items-center gap-1" }, er = { class: "text-muted" }, tr = {
1624
1648
  key: 0,
1625
1649
  class: "badge bg-info"
1626
- }, $n = {
1650
+ }, nr = {
1627
1651
  key: 1,
1628
1652
  class: "badge bg-warning"
1629
- }, er = {
1653
+ }, rr = {
1630
1654
  key: 0,
1631
1655
  class: "text-muted d-block text-truncate"
1632
- }, tr = { key: 1 }, nr = { class: "row g-2" }, rr = ["aria-pressed", "onClick"], ir = { class: "min-w-0" }, ar = { class: "d-block fw-semibold fs-6" }, or = { class: "d-block text-muted" }, sr = {
1656
+ }, ir = { key: 1 }, ar = { class: "row g-2" }, or = ["aria-pressed", "onClick"], sr = { class: "min-w-0" }, cr = { class: "d-block fw-semibold fs-6" }, lr = { class: "d-block text-muted" }, ur = {
1633
1657
  key: 2,
1634
1658
  class: "row g-3"
1635
- }, cr = { class: "min-w-0" }, lr = { class: "fw-medium text-truncate" }, ur = { class: "text-muted d-block text-truncate" }, dr = ["value"], fr = ["value"], pr = ["value"], mr = {
1659
+ }, dr = { class: "min-w-0" }, fr = { class: "fw-medium text-truncate" }, pr = { class: "text-muted d-block text-truncate" }, mr = ["value"], hr = ["value"], gr = ["value"], _r = {
1636
1660
  key: 0,
1637
1661
  class: "col-12 col-md-6"
1638
- }, hr = { class: "d-flex flex-wrap align-items-center gap-1" }, gr = ["title"], _r = { class: "text-muted" }, vr = {
1662
+ }, vr = { class: "d-flex flex-wrap align-items-center gap-1" }, yr = ["title"], br = { class: "text-muted" }, xr = {
1639
1663
  key: 1,
1640
1664
  class: "d-block text-truncate"
1641
- }, yr = {
1665
+ }, Sr = {
1642
1666
  key: 2,
1643
1667
  class: "text-muted d-block"
1644
- }, br = {
1668
+ }, Cr = {
1645
1669
  key: 0,
1646
1670
  class: "mt-2 d-flex flex-column gap-2"
1647
- }, xr = { class: "form-check mb-0 ms-3" }, Sr = ["id", "checked"], Cr = ["for"];
1648
- function wr(e, t, n, r, i, a) {
1671
+ }, wr = { class: "form-check mb-0 ms-3" }, Tr = ["id", "checked"], Er = ["for"];
1672
+ function Dr(e, t, n, r, i, a) {
1649
1673
  let o = F("font-awesome-icon"), s = F("amsom-autocomplete");
1650
- return A(), C("div", Bn, [
1674
+ return A(), C("div", Un, [
1651
1675
  w("div", null, [
1652
1676
  t[7] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
1653
- w("div", Vn, [(A(!0), C(y, null, N(a.availableModes, (t) => (A(), C("button", {
1677
+ w("div", Wn, [(A(!0), C(y, null, N(a.availableModes, (t) => (A(), C("button", {
1654
1678
  key: t.key,
1655
1679
  type: "button",
1656
1680
  class: O(["btn btn-sm", n.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
@@ -1658,19 +1682,19 @@ function wr(e, t, n, r, i, a) {
1658
1682
  }, [E(o, {
1659
1683
  icon: t.icon,
1660
1684
  class: "me-1"
1661
- }, null, 8, ["icon"]), T(" " + I(t.label), 1)], 10, Hn))), 128))]),
1662
- w("small", Un, I(a.currentMode?.aide), 1)
1685
+ }, null, 8, ["icon"]), T(" " + I(t.label), 1)], 10, Gn))), 128))]),
1686
+ w("small", Kn, I(a.currentMode?.aide), 1)
1663
1687
  ]),
1664
- n.cibleMode === "contrat" ? (A(), C(y, { key: 0 }, [n.afficheCaseContratReclamant ? (A(), C("div", Wn, [w("input", {
1688
+ n.cibleMode === "contrat" ? (A(), C(y, { key: 0 }, [n.afficheCaseContratReclamant ? (A(), C("div", qn, [w("input", {
1665
1689
  id: `contrat-reclamant-${i.uid}`,
1666
1690
  class: "form-check-input",
1667
1691
  type: "checkbox",
1668
1692
  checked: n.contratReclamant,
1669
1693
  onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
1670
- }, null, 40, Gn), w("label", {
1694
+ }, null, 40, Jn), w("label", {
1671
1695
  class: "form-check-label fs-7",
1672
1696
  for: `contrat-reclamant-${i.uid}`
1673
- }, " Contrat du réclamant ", 8, Kn)])) : S("", !0), n.contratReclamant ? S("", !0) : (A(), C("div", qn, [t[8] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), E(s, {
1697
+ }, " Contrat du réclamant ", 8, Yn)])) : S("", !0), n.contratReclamant ? S("", !0) : (A(), C("div", Xn, [t[8] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), E(s, {
1674
1698
  modelValue: a.selectedContrat,
1675
1699
  "onUpdate:modelValue": t[1] ||= (e) => a.selectedContrat = e,
1676
1700
  items: i.contratsTrouves,
@@ -1684,14 +1708,14 @@ function wr(e, t, n, r, i, a) {
1684
1708
  "debounce-delay": 0,
1685
1709
  onSearch: a.rechercherPlusTard
1686
1710
  }, {
1687
- options: z((e) => [w("div", Jn, [
1688
- w("div", Yn, I(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1689
- w("div", Xn, [
1690
- w("small", Zn, "N° " + I(e?.typeContrat) + "/" + I(e?.idContrat), 1),
1691
- e?.nbModules > 1 ? (A(), C("span", Qn, I(e.nbModules) + " modules", 1)) : S("", !0),
1692
- e?.estSorti ? (A(), C("span", $n, I(e.dateSortie ? `Sorti le ${a.formatDate(e.dateSortie)}` : "Sorti"), 1)) : S("", !0)
1711
+ options: z((e) => [w("div", Zn, [
1712
+ w("div", Qn, I(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1713
+ w("div", $n, [
1714
+ w("small", er, "N° " + I(e?.typeContrat) + "/" + I(e?.idContrat), 1),
1715
+ e?.nbModules > 1 ? (A(), C("span", tr, I(e.nbModules) + " modules", 1)) : S("", !0),
1716
+ e?.estSorti ? (A(), C("span", nr, I(e.dateSortie ? `Sorti le ${a.formatDate(e.dateSortie)}` : "Sorti"), 1)) : S("", !0)
1693
1717
  ]),
1694
- a.contratAdresse(e) ? (A(), C("small", er, I(a.contratAdresse(e)), 1)) : S("", !0)
1718
+ a.contratAdresse(e) ? (A(), C("small", rr, I(a.contratAdresse(e)), 1)) : S("", !0)
1695
1719
  ])]),
1696
1720
  _: 1
1697
1721
  }, 8, [
@@ -1703,7 +1727,7 @@ function wr(e, t, n, r, i, a) {
1703
1727
  "get-input-libelle",
1704
1728
  "onSearch"
1705
1729
  ])]))], 64)) : S("", !0),
1706
- n.cibleMode === "patrimoine" ? (A(), C("div", tr, [t[9] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), w("div", nr, [(A(!0), C(y, null, N(a.portees, (t) => (A(), C("div", {
1730
+ n.cibleMode === "patrimoine" ? (A(), C("div", ir, [t[9] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), w("div", ar, [(A(!0), C(y, null, N(a.portees, (t) => (A(), C("div", {
1707
1731
  key: t.titre,
1708
1732
  class: "col-12 col-md-6"
1709
1733
  }, [w("button", {
@@ -1715,8 +1739,8 @@ function wr(e, t, n, r, i, a) {
1715
1739
  icon: t.icon,
1716
1740
  class: "fs-4",
1717
1741
  "fixed-width": ""
1718
- }, null, 8, ["icon"]), w("span", ir, [w("span", ar, I(t.titre), 1), w("small", or, I(t.aide), 1)])], 10, rr)]))), 128))])])) : S("", !0),
1719
- n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (A(), C("div", sr, [w("div", { class: O(["col-12 d-flex flex-column gap-3", { "col-md-6": a.afficheModule }]) }, [n.cibleMode === "patrimoine" ? (A(), C(y, { key: 0 }, [
1742
+ }, null, 8, ["icon"]), w("span", sr, [w("span", cr, I(t.titre), 1), w("small", lr, I(t.aide), 1)])], 10, or)]))), 128))])])) : S("", !0),
1743
+ n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (A(), C("div", ur, [w("div", { class: O(["col-12 d-flex flex-column gap-3", { "col-md-6": a.afficheModule }]) }, [n.cibleMode === "patrimoine" ? (A(), C(y, { key: 0 }, [
1720
1744
  w("div", null, [t[10] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), E(s, {
1721
1745
  modelValue: a.selectedCommune,
1722
1746
  "onUpdate:modelValue": t[2] ||= (e) => a.selectedCommune = e,
@@ -1746,7 +1770,7 @@ function wr(e, t, n, r, i, a) {
1746
1770
  "input-size": "sm",
1747
1771
  "hide-choices": ""
1748
1772
  }, {
1749
- options: z((e) => [w("div", cr, [w("div", lr, I(e?.entree), 1), w("small", ur, I(e?.commune) + " — Programme " + I(e?.codeProgramme), 1)])]),
1773
+ options: z((e) => [w("div", dr, [w("div", fr, I(e?.entree), 1), w("small", pr, I(e?.commune) + " — Programme " + I(e?.codeProgramme), 1)])]),
1750
1774
  _: 1
1751
1775
  }, 8, [
1752
1776
  "modelValue",
@@ -1778,18 +1802,18 @@ function wr(e, t, n, r, i, a) {
1778
1802
  class: "form-control form-control-sm",
1779
1803
  disabled: "",
1780
1804
  value: n.patrimoine.commune ?? "—"
1781
- }, null, 8, dr)]),
1805
+ }, null, 8, mr)]),
1782
1806
  w("div", null, [t[14] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), w("input", {
1783
1807
  class: "form-control form-control-sm",
1784
1808
  disabled: "",
1785
1809
  value: n.patrimoine.entree ?? "—"
1786
- }, null, 8, fr)]),
1810
+ }, null, 8, hr)]),
1787
1811
  w("div", null, [t[15] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), w("input", {
1788
1812
  class: "form-control form-control-sm",
1789
1813
  disabled: "",
1790
1814
  value: n.patrimoine.etage ?? "—"
1791
- }, null, 8, pr)])
1792
- ], 64))], 2), a.afficheModule ? (A(), C("div", mr, [
1815
+ }, null, 8, gr)])
1816
+ ], 64))], 2), a.afficheModule ? (A(), C("div", _r, [
1793
1817
  t[16] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
1794
1818
  E(s, {
1795
1819
  modelValue: a.selectedModule,
@@ -1811,12 +1835,12 @@ function wr(e, t, n, r, i, a) {
1811
1835
  title: "Autre adresse ou étage du même programme"
1812
1836
  })) : S("", !0),
1813
1837
  w("div", { class: O(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", a.isExit(e) ? "text-decoration-line-through" : ""]]) }, I(a.moduleLibelle(e)), 3),
1814
- w("div", hr, [a.categorieLibelle(e) ? (A(), C("span", {
1838
+ w("div", vr, [a.categorieLibelle(e) ? (A(), C("span", {
1815
1839
  key: 0,
1816
1840
  class: "badge bg-info",
1817
1841
  title: e?.categorieModule
1818
- }, [E(o, { icon: a.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, gr)) : S("", !0), w("small", _r, "N° " + I(e?.idModule), 1)]),
1819
- e?._autreLibelle ? (A(), C("small", vr, I(e._autreLibelle), 1)) : e?.etage == null ? S("", !0) : (A(), C("small", yr, " Étage " + I(e.etage), 1))
1842
+ }, [E(o, { icon: a.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, yr)) : S("", !0), w("small", br, "N° " + I(e?.idModule), 1)]),
1843
+ e?._autreLibelle ? (A(), C("small", xr, I(e._autreLibelle), 1)) : e?.etage == null ? S("", !0) : (A(), C("small", Sr, " Étage " + I(e.etage), 1))
1820
1844
  ], 2)]),
1821
1845
  _: 1
1822
1846
  }, 8, [
@@ -1827,27 +1851,27 @@ function wr(e, t, n, r, i, a) {
1827
1851
  "filtering-function",
1828
1852
  "disabled"
1829
1853
  ]),
1830
- n.locataireActuelOption ? (A(), C("div", br, [w("div", { class: O(["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"]) }, [E(o, {
1854
+ n.locataireActuelOption ? (A(), C("div", Cr, [w("div", { class: O(["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"]) }, [E(o, {
1831
1855
  icon: "circle-info",
1832
1856
  class: "mt-1"
1833
- }), w("span", null, I(n.locataireActuelOption.hint), 1)], 2), w("div", xr, [w("input", {
1857
+ }), w("span", null, I(n.locataireActuelOption.hint), 1)], 2), w("div", wr, [w("input", {
1834
1858
  id: `locataire-actuel-${i.uid}`,
1835
1859
  class: "form-check-input",
1836
1860
  type: "checkbox",
1837
1861
  checked: n.locataireActuelOption.reprendre,
1838
1862
  onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
1839
- }, null, 40, Sr), w("label", {
1863
+ }, null, 40, Tr), w("label", {
1840
1864
  class: "form-check-label fs-7",
1841
1865
  for: `locataire-actuel-${i.uid}`
1842
- }, " Rattacher au locataire actuel du module ", 8, Cr)])])) : S("", !0)
1866
+ }, " Rattacher au locataire actuel du module ", 8, Er)])])) : S("", !0)
1843
1867
  ])) : S("", !0)])) : S("", !0)
1844
1868
  ]);
1845
1869
  }
1846
- var Tr = /*#__PURE__*/ G(zn, [["render", wr]]), Er = 0, Dr = {
1870
+ var Or = /*#__PURE__*/ G(Hn, [["render", Dr]]), kr = 0, Ar = {
1847
1871
  name: "LigneCibleBlock",
1848
1872
  components: {
1849
1873
  AmsomOverlay: v,
1850
- CiblePickerBlock: Tr
1874
+ CiblePickerBlock: Or
1851
1875
  },
1852
1876
  props: { index: {
1853
1877
  type: Number,
@@ -1861,7 +1885,7 @@ var Tr = /*#__PURE__*/ G(zn, [["render", wr]]), Er = 0, Dr = {
1861
1885
  };
1862
1886
  },
1863
1887
  data() {
1864
- return { uid: ++Er };
1888
+ return { uid: ++kr };
1865
1889
  },
1866
1890
  computed: {
1867
1891
  isPrincipale() {
@@ -1937,25 +1961,25 @@ var Tr = /*#__PURE__*/ G(zn, [["render", wr]]), Er = 0, Dr = {
1937
1961
  });
1938
1962
  }
1939
1963
  }
1940
- }, Or = {
1964
+ }, jr = {
1941
1965
  key: 0,
1942
1966
  class: "d-flex flex-wrap align-items-center gap-2"
1943
- }, kr = { class: "fw-medium fs-7" }, Ar = {
1967
+ }, Mr = { class: "fw-medium fs-7" }, Nr = {
1944
1968
  key: 0,
1945
1969
  class: "form-check form-switch mb-0"
1946
- }, jr = ["id", "checked"], Mr = ["for"];
1947
- function Nr(e, t, n, r, i, a) {
1970
+ }, Pr = ["id", "checked"], Fr = ["for"];
1971
+ function Ir(e, t, n, r, i, a) {
1948
1972
  let o = F("font-awesome-icon"), s = F("cible-picker-block"), c = F("amsom-overlay");
1949
- return A(), C("div", { class: O({ "border rounded p-2": !a.isPrincipale }) }, [a.isPrincipale ? S("", !0) : (A(), C("div", Or, [w("span", kr, I(a.ligne.libelle), 1), a.cibleFigee ? S("", !0) : (A(), C("div", Ar, [w("input", {
1973
+ return A(), C("div", { class: O({ "border rounded p-2": !a.isPrincipale }) }, [a.isPrincipale ? S("", !0) : (A(), C("div", jr, [w("span", Mr, I(a.ligne.libelle), 1), a.cibleFigee ? S("", !0) : (A(), C("div", Nr, [w("input", {
1950
1974
  id: `memecible-${i.uid}`,
1951
1975
  class: "form-check-input",
1952
1976
  type: "checkbox",
1953
1977
  checked: !a.ligne.cibleOverride,
1954
1978
  onChange: t[0] ||= (e) => r.draft.toggleCibleOverride(n.index)
1955
- }, null, 40, jr), w("label", {
1979
+ }, null, 40, Pr), w("label", {
1956
1980
  class: "form-check-label fs-7",
1957
1981
  for: `memecible-${i.uid}`
1958
- }, " Même cible que la ligne principale ", 8, Mr)]))])), a.cibleFigee ? (A(), C("div", {
1982
+ }, " Même cible que la ligne principale ", 8, Fr)]))])), a.cibleFigee ? (A(), C("div", {
1959
1983
  key: 1,
1960
1984
  class: O(["fs-7", { "mt-1": !a.isPrincipale }])
1961
1985
  }, [E(o, {
@@ -2004,14 +2028,14 @@ function Nr(e, t, n, r, i, a) {
2004
2028
  _: 1
2005
2029
  }, 8, ["loading"])) : S("", !0)], 2);
2006
2030
  }
2007
- var Pr = /*#__PURE__*/ G(Dr, [["render", Nr]]), Fr = {
2031
+ var Lr = /*#__PURE__*/ G(Ar, [["render", Ir]]), Rr = {
2008
2032
  name: "EtapeReclamantCibleBlock",
2009
2033
  components: {
2010
- SectionComponent: rt,
2011
- ProvenanceSelecteurBlock: $t,
2012
- ReclamantRechercheBlock: wn,
2013
- ReclamantSelecteurBlock: Pn,
2014
- LigneCibleBlock: Pr
2034
+ SectionComponent: at,
2035
+ ProvenanceSelecteurBlock: tn,
2036
+ ReclamantRechercheBlock: Dn,
2037
+ ReclamantSelecteurBlock: Ln,
2038
+ LigneCibleBlock: Lr
2015
2039
  },
2016
2040
  setup() {
2017
2041
  return {
@@ -2019,13 +2043,13 @@ var Pr = /*#__PURE__*/ G(Dr, [["render", Nr]]), Fr = {
2019
2043
  options: Q()
2020
2044
  };
2021
2045
  }
2022
- }, Ir = { class: "d-flex flex-column gap-4" }, Lr = {
2046
+ }, zr = { class: "d-flex flex-column gap-4" }, Br = {
2023
2047
  key: 2,
2024
2048
  class: "row g-3"
2025
- }, Rr = { class: "col-12 col-md-6" }, zr = { class: "col-12 col-md-6" };
2026
- function Br(e, t, n, r, i, a) {
2049
+ }, Vr = { class: "col-12 col-md-6" }, Hr = { class: "col-12 col-md-6" };
2050
+ function Ur(e, t, n, r, i, a) {
2027
2051
  let o = F("provenance-selecteur-block"), s = F("reclamant-recherche-block"), c = F("reclamant-selecteur-block"), l = F("section-component"), u = F("ligne-cible-block");
2028
- return A(), C("div", Ir, [E(l, {
2052
+ return A(), C("div", zr, [E(l, {
2029
2053
  titre: "Réclamant",
2030
2054
  aide: "La personne à l’origine de la sollicitation : locataire, tiers, fournisseur…"
2031
2055
  }, {
@@ -2035,7 +2059,7 @@ function Br(e, t, n, r, i, a) {
2035
2059
  })], 64)) : r.options.rechercheReclamant ? (A(), x(s, { key: 1 }, {
2036
2060
  "avant-categorie": z(() => [E(o)]),
2037
2061
  _: 1
2038
- })) : (A(), C("div", Lr, [w("div", Rr, [E(o)]), w("div", zr, [E(c)])]))]),
2062
+ })) : (A(), C("div", Br, [w("div", Vr, [E(o)]), w("div", Hr, [E(c)])]))]),
2039
2063
  _: 3
2040
2064
  }), r.draft.reclamantSelectionne ? (A(), x(l, {
2041
2065
  key: 0,
@@ -2046,21 +2070,21 @@ function Br(e, t, n, r, i, a) {
2046
2070
  _: 1
2047
2071
  }, 8, ["aide"])) : S("", !0)]);
2048
2072
  }
2049
- var Vr = /*#__PURE__*/ G(Fr, [["render", Br]]), Hr = {
2073
+ var Wr = /*#__PURE__*/ G(Rr, [["render", Ur]]), Gr = {
2050
2074
  name: "SeparateurComponent",
2051
2075
  props: { texte: {
2052
2076
  type: String,
2053
2077
  required: !0
2054
2078
  } }
2055
- }, Ur = { class: "d-flex align-items-center gap-2 text-muted fs-7" };
2056
- function Wr(e, t, n, r, i, a) {
2057
- return A(), C("div", Ur, [
2079
+ }, Kr = { class: "d-flex align-items-center gap-2 text-muted fs-7" };
2080
+ function qr(e, t, n, r, i, a) {
2081
+ return A(), C("div", Kr, [
2058
2082
  t[0] ||= w("hr", { class: "flex-grow-1 my-0" }, null, -1),
2059
2083
  w("span", null, I(n.texte), 1),
2060
2084
  t[1] ||= w("hr", { class: "flex-grow-1 my-0" }, null, -1)
2061
2085
  ]);
2062
2086
  }
2063
- var Gr = /*#__PURE__*/ G(Hr, [["render", Wr]]), Kr = {
2087
+ var Jr = /*#__PURE__*/ G(Gr, [["render", qr]]), Yr = {
2064
2088
  reclamant: {
2065
2089
  icon: "user",
2066
2090
  label: "Réclamant"
@@ -2073,7 +2097,7 @@ var Gr = /*#__PURE__*/ G(Hr, [["render", Wr]]), Kr = {
2073
2097
  icon: "tag",
2074
2098
  label: "Motif"
2075
2099
  }
2076
- }, qr = {
2100
+ }, Xr = {
2077
2101
  name: "RecapBlock",
2078
2102
  props: {
2079
2103
  index: {
@@ -2087,7 +2111,7 @@ var Gr = /*#__PURE__*/ G(Hr, [["render", Wr]]), Kr = {
2087
2111
  "cible",
2088
2112
  "motif"
2089
2113
  ],
2090
- validator: (e) => e.every((e) => Kr[e])
2114
+ validator: (e) => e.every((e) => Yr[e])
2091
2115
  }
2092
2116
  },
2093
2117
  setup() {
@@ -2125,15 +2149,15 @@ var Gr = /*#__PURE__*/ G(Hr, [["render", Wr]]), Kr = {
2125
2149
  items() {
2126
2150
  return this.champs.map((e) => ({
2127
2151
  champ: e,
2128
- ...Kr[e],
2152
+ ...Yr[e],
2129
2153
  valeur: this.valeurs[e]
2130
2154
  })).filter((e) => e.valeur);
2131
2155
  }
2132
2156
  }
2133
- }, Jr = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, Yr = { class: "text-muted text-uppercase fw-semibold text-nowrap" }, Xr = { class: "min-w-0" };
2134
- function Zr(e, t, n, r, i, a) {
2157
+ }, Zr = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, Qr = { class: "text-muted text-uppercase fw-semibold text-nowrap" }, $r = { class: "min-w-0" };
2158
+ function ei(e, t, n, r, i, a) {
2135
2159
  let o = F("font-awesome-icon");
2136
- return A(), C("div", Jr, [(A(!0), C(y, null, N(a.items, (e) => (A(), C("span", {
2160
+ return A(), C("div", Zr, [(A(!0), C(y, null, N(a.items, (e) => (A(), C("span", {
2137
2161
  key: e.champ,
2138
2162
  class: "fs-7 d-flex align-items-start gap-2"
2139
2163
  }, [
@@ -2142,11 +2166,11 @@ function Zr(e, t, n, r, i, a) {
2142
2166
  class: "text-primary mt-1",
2143
2167
  "fixed-width": ""
2144
2168
  }, null, 8, ["icon"]),
2145
- w("span", Yr, I(e.label), 1),
2146
- w("span", Xr, I(e.valeur), 1)
2169
+ w("span", Qr, I(e.label), 1),
2170
+ w("span", $r, I(e.valeur), 1)
2147
2171
  ]))), 128))]);
2148
2172
  }
2149
- var Qr = /*#__PURE__*/ G(qr, [["render", Zr]]), $r = {
2173
+ var ti = /*#__PURE__*/ G(Xr, [["render", ei]]), ni = {
2150
2174
  name: "MotifChaineComponent",
2151
2175
  props: {
2152
2176
  chaine: {
@@ -2159,17 +2183,17 @@ var Qr = /*#__PURE__*/ G(qr, [["render", Zr]]), $r = {
2159
2183
  }
2160
2184
  },
2161
2185
  emits: ["retirer"]
2162
- }, ei = { class: "d-flex flex-wrap align-items-center gap-2" }, ti = ["onClick"], ni = {
2186
+ }, ri = { class: "d-flex flex-wrap align-items-center gap-2" }, ii = ["onClick"], ai = {
2163
2187
  key: 2,
2164
2188
  class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2"
2165
2189
  };
2166
- function ri(e, t, n, r, i, a) {
2190
+ function oi(e, t, n, r, i, a) {
2167
2191
  let o = F("font-awesome-icon");
2168
- return A(), C("div", ei, [(A(!0), C(y, null, N(n.chaine, (t, r) => (A(), C(y, { key: t.key }, [r > 0 ? (A(), x(o, {
2192
+ return A(), C("div", ri, [(A(!0), C(y, null, N(n.chaine, (t, r) => (A(), C(y, { key: t.key }, [r > 0 ? (A(), x(o, {
2169
2193
  key: 0,
2170
2194
  icon: "chevron-right",
2171
2195
  class: "text-muted fs-7"
2172
- })) : S("", !0), n.readonly ? (A(), C("span", ni, [t.icon ? (A(), x(o, {
2196
+ })) : S("", !0), n.readonly ? (A(), C("span", ai, [t.icon ? (A(), x(o, {
2173
2197
  key: 0,
2174
2198
  icon: t.icon,
2175
2199
  "fixed-width": ""
@@ -2189,9 +2213,9 @@ function ri(e, t, n, r, i, a) {
2189
2213
  icon: "xmark",
2190
2214
  class: "fs-7 opacity-75"
2191
2215
  })
2192
- ], 8, ti))], 64))), 128))]);
2216
+ ], 8, ii))], 64))), 128))]);
2193
2217
  }
2194
- var ii = /*#__PURE__*/ G($r, [["render", ri]]), $ = [
2218
+ var si = /*#__PURE__*/ G(ni, [["render", oi]]), $ = [
2195
2219
  {
2196
2220
  key: "categorie",
2197
2221
  titre: "Catégorie",
@@ -2216,16 +2240,16 @@ var ii = /*#__PURE__*/ G($r, [["render", ri]]), $ = [
2216
2240
  idKey: "idMotif",
2217
2241
  libelleKey: "libelle"
2218
2242
  }
2219
- ], ai = (e) => e.filter((e) => e.selectedId != null).map((e) => {
2243
+ ], ci = (e) => e.filter((e) => e.selectedId != null).map((e) => {
2220
2244
  let t = e.options.find((t) => t.id === e.selectedId);
2221
2245
  return {
2222
2246
  key: e.key,
2223
2247
  libelle: t?.libelle ?? e.selectedId,
2224
2248
  icon: t?.icon ?? null
2225
2249
  };
2226
- }), oi = {
2250
+ }), li = {
2227
2251
  name: "MotifBubbleBlock",
2228
- components: { MotifChaineComponent: ii },
2252
+ components: { MotifChaineComponent: si },
2229
2253
  props: { niveaux: {
2230
2254
  type: Array,
2231
2255
  required: !0
@@ -2233,23 +2257,23 @@ var ii = /*#__PURE__*/ G($r, [["render", ri]]), $ = [
2233
2257
  emits: ["choisir", "retirer"],
2234
2258
  computed: {
2235
2259
  chaine() {
2236
- return ai(this.niveaux);
2260
+ return ci(this.niveaux);
2237
2261
  },
2238
2262
  courant() {
2239
2263
  return this.niveaux.find((e) => e.selectedId == null) ?? null;
2240
2264
  }
2241
2265
  }
2242
- }, si = { class: "d-flex flex-column gap-3" }, ci = { key: 1 }, li = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, ui = { class: "row justify-content-around g-3" }, di = ["title", "onClick"], fi = { class: "fs-7 mt-1 lh-sm" }, pi = {
2266
+ }, ui = { class: "d-flex flex-column gap-3" }, di = { key: 1 }, fi = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, pi = { class: "row justify-content-around g-3" }, mi = ["title", "onClick"], hi = { class: "fs-7 mt-1 lh-sm" }, gi = {
2243
2267
  key: 0,
2244
2268
  class: "col-12 text-muted fs-7"
2245
2269
  };
2246
- function mi(e, t, n, r, i, a) {
2270
+ function _i(e, t, n, r, i, a) {
2247
2271
  let o = F("motif-chaine-component"), s = F("font-awesome-icon");
2248
- return A(), C("div", si, [a.chaine.length ? (A(), x(o, {
2272
+ return A(), C("div", ui, [a.chaine.length ? (A(), x(o, {
2249
2273
  key: 0,
2250
2274
  chaine: a.chaine,
2251
2275
  onRetirer: t[0] ||= (t) => e.$emit("retirer", t)
2252
- }, null, 8, ["chaine"])) : S("", !0), a.courant ? (A(), C("div", ci, [w("label", li, I(a.courant.titre), 1), w("div", ui, [(A(!0), C(y, null, N(a.courant.options, (t) => (A(), C("div", {
2276
+ }, null, 8, ["chaine"])) : S("", !0), a.courant ? (A(), C("div", di, [w("label", fi, I(a.courant.titre), 1), w("div", pi, [(A(!0), C(y, null, N(a.courant.options, (t) => (A(), C("div", {
2253
2277
  key: t.id,
2254
2278
  class: "col-3 text-center"
2255
2279
  }, [w("button", {
@@ -2264,13 +2288,13 @@ function mi(e, t, n, r, i, a) {
2264
2288
  key: 0,
2265
2289
  icon: t.icon,
2266
2290
  size: "lg"
2267
- }, null, 8, ["icon"])) : S("", !0)], 8, di), w("div", fi, I(t.libelle), 1)]))), 128)), a.courant.options.length ? S("", !0) : (A(), C("div", pi, " Aucun choix disponible "))])])) : S("", !0)]);
2291
+ }, null, 8, ["icon"])) : S("", !0)], 8, mi), w("div", hi, I(t.libelle), 1)]))), 128)), a.courant.options.length ? S("", !0) : (A(), C("div", gi, " Aucun choix disponible "))])])) : S("", !0)]);
2268
2292
  }
2269
- var hi = /*#__PURE__*/ G(oi, [["render", mi]]), gi = {
2293
+ var vi = /*#__PURE__*/ G(li, [["render", _i]]), yi = {
2270
2294
  categorie: "une catégorie",
2271
2295
  type: "un type",
2272
2296
  nature: "une nature"
2273
- }, _i = {
2297
+ }, bi = {
2274
2298
  name: "MotifColonnesBlock",
2275
2299
  props: { niveaux: {
2276
2300
  type: Array,
@@ -2278,26 +2302,26 @@ var hi = /*#__PURE__*/ G(oi, [["render", mi]]), gi = {
2278
2302
  } },
2279
2303
  emits: ["choisir"],
2280
2304
  methods: { article(e) {
2281
- return gi[e.key] ?? e.titre.toLowerCase();
2305
+ return yi[e.key] ?? e.titre.toLowerCase();
2282
2306
  } }
2283
- }, vi = { class: "row g-0 border rounded overflow-hidden" }, yi = { class: "d-flex align-items-center justify-content-between bg-light border-bottom px-2 py-1" }, bi = { class: "fs-7 fw-semibold text-muted text-uppercase" }, xi = {
2307
+ }, xi = { class: "row g-0 border rounded overflow-hidden" }, Si = { class: "d-flex align-items-center justify-content-between bg-light border-bottom px-2 py-1" }, Ci = { class: "fs-7 fw-semibold text-muted text-uppercase" }, wi = {
2284
2308
  key: 0,
2285
2309
  class: "badge bg-secondary"
2286
- }, Si = {
2310
+ }, Ti = {
2287
2311
  class: "list-group list-group-flush overflow-auto",
2288
2312
  style: { "max-height": "260px" }
2289
- }, Ci = ["aria-pressed", "onClick"], wi = { class: "flex-grow-1 lh-sm text-start" }, Ti = {
2313
+ }, Ei = ["aria-pressed", "onClick"], Di = { class: "flex-grow-1 lh-sm text-start" }, Oi = {
2290
2314
  key: 0,
2291
2315
  class: "text-muted fst-italic p-2"
2292
2316
  };
2293
- function Ei(e, t, n, r, i, a) {
2317
+ function ki(e, t, n, r, i, a) {
2294
2318
  let o = F("font-awesome-icon");
2295
- return A(), C("div", vi, [(A(!0), C(y, null, N(n.niveaux, (t, r) => (A(), C("div", {
2319
+ return A(), C("div", xi, [(A(!0), C(y, null, N(n.niveaux, (t, r) => (A(), C("div", {
2296
2320
  key: t.key,
2297
2321
  class: O(["col-6 col-md-3 d-flex flex-column", { "border-start": r > 0 }])
2298
2322
  }, [
2299
- w("div", yi, [w("span", bi, I(t.titre), 1), t.options.length ? (A(), C("span", xi, I(t.options.length), 1)) : S("", !0)]),
2300
- w("div", Si, [(A(!0), C(y, null, N(t.options, (i) => (A(), C("button", {
2323
+ w("div", Si, [w("span", Ci, I(t.titre), 1), t.options.length ? (A(), C("span", wi, I(t.options.length), 1)) : S("", !0)]),
2324
+ w("div", Ti, [(A(!0), C(y, null, N(t.options, (i) => (A(), C("button", {
2301
2325
  key: i.id,
2302
2326
  type: "button",
2303
2327
  class: O(["list-group-item list-group-item-action d-flex align-items-center gap-2 fs-7 px-2 py-1", { active: i.id === t.selectedId }]),
@@ -2312,7 +2336,7 @@ function Ei(e, t, n, r, i, a) {
2312
2336
  icon: i.icon,
2313
2337
  "fixed-width": ""
2314
2338
  }, null, 8, ["icon"])) : S("", !0),
2315
- w("span", wi, I(i.libelle), 1),
2339
+ w("span", Di, I(i.libelle), 1),
2316
2340
  r < n.niveaux.length - 1 ? (A(), x(o, {
2317
2341
  key: 1,
2318
2342
  icon: "chevron-right",
@@ -2321,23 +2345,23 @@ function Ei(e, t, n, r, i, a) {
2321
2345
  key: 2,
2322
2346
  icon: "check"
2323
2347
  })) : S("", !0)
2324
- ], 10, Ci))), 128))]),
2325
- t.options.length ? S("", !0) : (A(), C("small", Ti, I(r > 0 ? `← Choisir ${a.article(n.niveaux[r - 1])}` : "Aucun choix disponible"), 1))
2348
+ ], 10, Ei))), 128))]),
2349
+ t.options.length ? S("", !0) : (A(), C("small", Oi, I(r > 0 ? `← Choisir ${a.article(n.niveaux[r - 1])}` : "Aucun choix disponible"), 1))
2326
2350
  ], 2))), 128))]);
2327
2351
  }
2328
2352
  // src/components/EtapeMotifBlock.vue
2329
- var Di = {
2353
+ var Ai = {
2330
2354
  name: "EtapeMotifBlock",
2331
2355
  components: {
2332
2356
  AmsomOverlay: v,
2333
2357
  AmsomAutocomplete: B,
2334
- SectionComponent: rt,
2335
- SeparateurComponent: Gr,
2336
- RecapBlock: Qr,
2337
- MotifChaineComponent: ii,
2338
- MotifBubbleBlock: hi,
2339
- MotifColonnesBlock: /* @__PURE__ */ G(_i, [["render", Ei]]),
2340
- LigneCibleBlock: Pr
2358
+ SectionComponent: at,
2359
+ SeparateurComponent: Jr,
2360
+ RecapBlock: ti,
2361
+ MotifChaineComponent: si,
2362
+ MotifBubbleBlock: vi,
2363
+ MotifColonnesBlock: /* @__PURE__ */ G(bi, [["render", ki]]),
2364
+ LigneCibleBlock: Lr
2341
2365
  },
2342
2366
  setup() {
2343
2367
  return {
@@ -2400,7 +2424,7 @@ var Di = {
2400
2424
  nature: this.data.natureIcon,
2401
2425
  motif: this.data.motifIcon
2402
2426
  };
2403
- return ai($.map((r) => {
2427
+ return ci($.map((r) => {
2404
2428
  let i = e[r.idKey];
2405
2429
  return {
2406
2430
  key: r.key,
@@ -2470,7 +2494,7 @@ var Di = {
2470
2494
  });
2471
2495
  },
2472
2496
  registerIcons() {
2473
- return at([
2497
+ return st([
2474
2498
  ...this.data.cache.categories ?? [],
2475
2499
  ...this.data.cache.types ?? [],
2476
2500
  ...this.data.cache.natures ?? [],
@@ -2499,32 +2523,32 @@ var Di = {
2499
2523
  return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
2500
2524
  }
2501
2525
  }
2502
- }, Oi = {
2526
+ }, ji = {
2503
2527
  key: 0,
2504
2528
  class: "d-flex flex-column gap-4"
2505
- }, ki = {
2529
+ }, Mi = {
2506
2530
  key: 0,
2507
2531
  class: "alert alert-info d-flex align-items-start gap-2 py-2 px-3 mb-0 fs-7"
2508
- }, Ai = {
2532
+ }, Ni = {
2509
2533
  key: 1,
2510
2534
  class: "alert alert-warning d-flex align-items-start gap-2 py-2 px-3 mb-0 fs-7"
2511
- }, ji = { class: "d-flex align-items-center gap-2" }, Mi = { class: "min-w-0" }, Ni = { class: "fw-medium text-truncate" }, Pi = { class: "text-muted d-block text-truncate" }, Fi = [
2535
+ }, Pi = { class: "d-flex align-items-center gap-2" }, Fi = { class: "min-w-0" }, Ii = { class: "fw-medium text-truncate" }, Li = { class: "text-muted d-block text-truncate" }, Ri = [
2512
2536
  "id",
2513
2537
  "checked",
2514
2538
  "disabled",
2515
2539
  "onChange"
2516
- ], Ii = ["for"], Li = {
2540
+ ], zi = ["for"], Bi = {
2517
2541
  key: 0,
2518
2542
  class: "alert alert-warning d-flex align-items-start gap-2 py-2 px-3 mb-0 fs-7"
2519
2543
  };
2520
- function Ri(e, t, n, r, i, a) {
2544
+ function Vi(e, t, n, r, i, a) {
2521
2545
  let o = F("recap-block"), s = F("font-awesome-icon"), c = F("motif-chaine-component"), l = F("amsom-autocomplete"), u = F("separateur-component"), d = F("motif-colonnes-block"), f = F("motif-bubble-block"), p = F("section-component"), m = F("ligne-cible-block"), h = F("amsom-overlay");
2522
2546
  return A(), x(h, { loading: r.data.isLoading && !r.data.cache.motifs || !i.iconsReady }, {
2523
- default: z(() => [i.iconsReady ? (A(), C("div", Oi, [
2547
+ default: z(() => [i.iconsReady ? (A(), C("div", ji, [
2524
2548
  E(o, { champs: ["reclamant", "cible"] }),
2525
2549
  E(p, { titre: "Motif" }, {
2526
2550
  default: z(() => [
2527
- r.options.motifRetire ? (A(), C("div", ki, [E(s, {
2551
+ r.options.motifRetire ? (A(), C("div", Mi, [E(s, {
2528
2552
  icon: "circle-info",
2529
2553
  class: "mt-1"
2530
2554
  }), w("span", null, [
@@ -2532,7 +2556,7 @@ function Ri(e, t, n, r, i, a) {
2532
2556
  r.options.motifRetire.associes.length ? (A(), C(y, { key: 0 }, [T(" avec ses motifs associés (" + I(r.options.motifRetire.associes.join(", ")) + ") ", 1)], 64)) : S("", !0),
2533
2557
  t[1] ||= T(" : il n’est pas proposé pour ce réclamant. ", -1)
2534
2558
  ])])) : S("", !0),
2535
- a.motifBloque ? (A(), C("div", Ai, [E(s, {
2559
+ a.motifBloque ? (A(), C("div", Ni, [E(s, {
2536
2560
  icon: "circle-exclamation",
2537
2561
  class: "mt-1"
2538
2562
  }), w("span", null, " Le motif « " + I(r.data.motifLibelle(a.mainLigne.idMotif)) + " » n’est pas proposé pour ce réclamant : choisissez-en un autre pour continuer. ", 1)])) : S("", !0),
@@ -2553,12 +2577,12 @@ function Ri(e, t, n, r, i, a) {
2553
2577
  "input-size": "sm",
2554
2578
  "hide-choices": ""
2555
2579
  }, {
2556
- options: z((e) => [w("div", ji, [e?.icon ? (A(), x(s, {
2580
+ options: z((e) => [w("div", Pi, [e?.icon ? (A(), x(s, {
2557
2581
  key: 0,
2558
2582
  icon: e.icon,
2559
2583
  class: "text-primary",
2560
2584
  "fixed-width": ""
2561
- }, null, 8, ["icon"])) : S("", !0), w("div", Mi, [w("div", Ni, I(e?.libelle), 1), w("small", Pi, I(e?.categorie) + " › " + I(e?.type) + " › " + I(e?.nature), 1)])])]),
2585
+ }, null, 8, ["icon"])) : S("", !0), w("div", Fi, [w("div", Ii, I(e?.libelle), 1), w("small", Li, I(e?.categorie) + " › " + I(e?.type) + " › " + I(e?.nature), 1)])])]),
2562
2586
  _: 1
2563
2587
  }, 8, [
2564
2588
  "modelValue",
@@ -2602,11 +2626,11 @@ function Ri(e, t, n, r, i, a) {
2602
2626
  checked: a.isActive(e.idMotif),
2603
2627
  disabled: a.motifFige,
2604
2628
  onChange: (t) => a.toggleMotifAssocie(e)
2605
- }, null, 40, Fi), w("label", {
2629
+ }, null, 40, Ri), w("label", {
2606
2630
  class: "form-check-label fs-7",
2607
2631
  for: `assoc-${e.idMotif}`
2608
- }, I(e.libelle) + " ? ", 9, Ii)]))), 128)),
2609
- r.draft.ciblesAssocieesReinitialisees && r.draft.draft.reclamant.type !== "D" ? (A(), C("div", Li, [E(s, {
2632
+ }, I(e.libelle) + " ? ", 9, zi)]))), 128)),
2633
+ r.draft.ciblesAssocieesReinitialisees && r.draft.draft.reclamant.type !== "D" ? (A(), C("div", Bi, [E(s, {
2610
2634
  icon: "circle-exclamation",
2611
2635
  class: "mt-1"
2612
2636
  }), w("span", null, " Le réclamant a changé : " + I(r.draft.ciblesAssocieesReinitialisees > 1 ? `${r.draft.ciblesAssocieesReinitialisees} motifs associés reprennent` : "un motif associé reprend") + " la cible de la ligne principale. Vérifiez-la ci-dessous si elle doit être différente. ", 1)])) : S("", !0),
@@ -2621,7 +2645,7 @@ function Ri(e, t, n, r, i, a) {
2621
2645
  _: 1
2622
2646
  }, 8, ["loading"]);
2623
2647
  }
2624
- var zi = /*#__PURE__*/ G(Di, [["render", Ri]]), Bi = {
2648
+ var Hi = /*#__PURE__*/ G(Ai, [["render", Vi]]), Ui = {
2625
2649
  name: "LigneDocumentBlock",
2626
2650
  components: { AmsomUploadFile: xe },
2627
2651
  props: {
@@ -2640,7 +2664,7 @@ var zi = /*#__PURE__*/ G(Di, [["render", Ri]]), Bi = {
2640
2664
  },
2641
2665
  emits: ["update"]
2642
2666
  };
2643
- function Vi(e, t, n, r, i, a) {
2667
+ function Wi(e, t, n, r, i, a) {
2644
2668
  let o = F("amsom-upload-file");
2645
2669
  return A(), C("div", null, [t[1] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), E(o, {
2646
2670
  "model-value": n.fichier,
@@ -2656,12 +2680,12 @@ function Vi(e, t, n, r, i, a) {
2656
2680
  "read-only"
2657
2681
  ])]);
2658
2682
  }
2659
- var Hi = /*#__PURE__*/ G(Bi, [["render", Vi]]), Ui = 4e3, Wi = {
2683
+ var Gi = /*#__PURE__*/ G(Ui, [["render", Wi]]), Ki = 4e3, qi = {
2660
2684
  name: "LigneDetailBlock",
2661
2685
  components: {
2662
2686
  AmsomAutocomplete: B,
2663
2687
  AmsomTextarea: be,
2664
- LigneDocumentBlock: Hi
2688
+ LigneDocumentBlock: Gi
2665
2689
  },
2666
2690
  props: { index: {
2667
2691
  type: Number,
@@ -2674,7 +2698,7 @@ var Hi = /*#__PURE__*/ G(Bi, [["render", Vi]]), Ui = 4e3, Wi = {
2674
2698
  };
2675
2699
  },
2676
2700
  computed: {
2677
- descriptionMaxLength: () => Ui,
2701
+ descriptionMaxLength: () => Ki,
2678
2702
  isPrincipale() {
2679
2703
  return this.index === 0;
2680
2704
  },
@@ -2695,8 +2719,8 @@ var Hi = /*#__PURE__*/ G(Bi, [["render", Vi]]), Ui = 4e3, Wi = {
2695
2719
  this.isPrincipale && this.$refs.description?.$el.querySelector("textarea")?.focus();
2696
2720
  },
2697
2721
  methods: {
2698
- timestampToDateInput: en,
2699
- dateInputToTimestamp: tn,
2722
+ timestampToDateInput: nn,
2723
+ dateInputToTimestamp: rn,
2700
2724
  responsableLibelle(e) {
2701
2725
  let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
2702
2726
  return t ? `${t.prenom} ${t.nom}` : "";
@@ -2706,43 +2730,43 @@ var Hi = /*#__PURE__*/ G(Bi, [["render", Vi]]), Ui = 4e3, Wi = {
2706
2730
  return n ? t.filter((e) => (K(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
2707
2731
  }
2708
2732
  }
2709
- }, Gi = { class: "d-flex flex-column gap-2" }, Ki = { class: "d-flex align-items-center gap-2 mb-1" }, qi = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Ji = {
2733
+ }, Ji = { class: "d-flex flex-column gap-2" }, Yi = { class: "d-flex align-items-center gap-2 mb-1" }, Xi = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Zi = {
2710
2734
  key: 0,
2711
2735
  class: "ms-1 text-danger"
2712
- }, Yi = {
2736
+ }, Qi = {
2713
2737
  key: 0,
2714
2738
  class: "form-check form-switch mb-0"
2715
- }, Xi = [
2739
+ }, $i = [
2716
2740
  "id",
2717
2741
  "checked",
2718
2742
  "disabled"
2719
- ], Zi = ["for"], Qi = ["rows", "value"], $i = { class: "row g-3" }, ea = { class: "col-6" }, ta = { class: "d-flex align-items-center gap-2 mb-1" }, na = {
2743
+ ], ea = ["for"], ta = ["rows", "value"], na = { class: "row g-3" }, ra = { class: "col-6" }, ia = { class: "d-flex align-items-center gap-2 mb-1" }, aa = {
2720
2744
  key: 0,
2721
2745
  class: "form-check form-switch mb-0"
2722
- }, ra = [
2746
+ }, oa = [
2723
2747
  "id",
2724
2748
  "checked",
2725
2749
  "disabled"
2726
- ], ia = ["for"], aa = ["value"], oa = ["value"], sa = ["value"], ca = { class: "min-w-0" }, la = { class: "fw-medium text-truncate" }, ua = {
2750
+ ], sa = ["for"], ca = ["value"], la = ["value"], ua = ["value"], da = { class: "min-w-0" }, fa = { class: "fw-medium text-truncate" }, pa = {
2727
2751
  key: 0,
2728
2752
  class: "text-muted d-block"
2729
- }, da = {
2753
+ }, ma = {
2730
2754
  key: 2,
2731
2755
  class: "text-muted"
2732
- }, fa = { class: "col-12 col-md-6" };
2733
- function pa(e, t, n, r, i, a) {
2756
+ }, ha = { class: "col-12 col-md-6" };
2757
+ function ga(e, t, n, r, i, a) {
2734
2758
  let o = F("amsom-textarea"), s = F("amsom-autocomplete"), c = F("ligne-document-block");
2735
- return A(), C("div", Gi, [w("div", null, [w("div", Ki, [w("label", qi, [t[6] ||= T(" Description", -1), a.isPrincipale ? (A(), C("span", Ji, "*")) : S("", !0)]), a.isPrincipale ? S("", !0) : (A(), C("div", Yi, [w("input", {
2759
+ return A(), C("div", Ji, [w("div", null, [w("div", Yi, [w("label", Xi, [t[6] ||= T(" Description", -1), a.isPrincipale ? (A(), C("span", Zi, "*")) : S("", !0)]), a.isPrincipale ? S("", !0) : (A(), C("div", Qi, [w("input", {
2736
2760
  id: `memedetail-${a.ligne.idMotif}`,
2737
2761
  class: "form-check-input",
2738
2762
  type: "checkbox",
2739
2763
  checked: a.ligne.description == null,
2740
2764
  disabled: r.draft.isReadonly("description"),
2741
2765
  onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
2742
- }, null, 40, Xi), w("label", {
2766
+ }, null, 40, $i), w("label", {
2743
2767
  class: "form-check-label fs-7",
2744
2768
  for: `memedetail-${a.ligne.idMotif}`
2745
- }, " Même description ", 8, Zi)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (A(), x(o, {
2769
+ }, " Même description ", 8, ea)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (A(), x(o, {
2746
2770
  key: 0,
2747
2771
  ref: "description",
2748
2772
  "model-value": a.ligne.description,
@@ -2762,36 +2786,36 @@ function pa(e, t, n, r, i, a) {
2762
2786
  disabled: "",
2763
2787
  rows: a.isPrincipale ? 7 : 5,
2764
2788
  value: (a.ligne.description ?? a.lignePrincipale.description) || ""
2765
- }, null, 8, Qi))]), w("div", $i, [w("div", ea, [w("div", null, [w("div", ta, [t[7] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), a.isPrincipale ? S("", !0) : (A(), C("div", na, [w("input", {
2789
+ }, null, 8, ta))]), w("div", na, [w("div", ra, [w("div", null, [w("div", ia, [t[7] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), a.isPrincipale ? S("", !0) : (A(), C("div", aa, [w("input", {
2766
2790
  id: `memedate-${a.ligne.idMotif}`,
2767
2791
  class: "form-check-input",
2768
2792
  type: "checkbox",
2769
2793
  checked: !a.ligne.dateFaitsOverride,
2770
2794
  disabled: r.draft.isReadonly("dateFaits"),
2771
2795
  onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
2772
- }, null, 40, ra), w("label", {
2796
+ }, null, 40, oa), w("label", {
2773
2797
  class: "form-check-label fs-7",
2774
2798
  for: `memedate-${a.ligne.idMotif}`
2775
- }, " Même date ", 8, ia)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (A(), C("input", {
2799
+ }, " Même date ", 8, sa)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (A(), C("input", {
2776
2800
  key: 0,
2777
2801
  value: a.timestampToDateInput(a.ligne.dateFaits),
2778
2802
  type: "date",
2779
2803
  class: "form-control form-control-sm",
2780
2804
  onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, a.dateInputToTimestamp(e.target.value))
2781
- }, null, 40, aa)) : (A(), C("input", {
2805
+ }, null, 40, ca)) : (A(), C("input", {
2782
2806
  key: 1,
2783
2807
  value: a.timestampToDateInput(a.dateFaits),
2784
2808
  type: "date",
2785
2809
  class: "form-control form-control-sm",
2786
2810
  disabled: ""
2787
- }, null, 8, oa))]), w("div", null, [
2811
+ }, null, 8, la))]), w("div", null, [
2788
2812
  t[8] ||= w("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
2789
2813
  r.draft.isReadonly("responsable") ? (A(), C("input", {
2790
2814
  key: 0,
2791
2815
  class: "form-control form-control-sm",
2792
2816
  disabled: "",
2793
2817
  value: a.responsableLibelle(a.ligne.responsable) || "Déterminé automatiquement"
2794
- }, null, 8, sa)) : (A(), x(s, {
2818
+ }, null, 8, ua)) : (A(), x(s, {
2795
2819
  key: 1,
2796
2820
  "model-value": a.ligne.responsable,
2797
2821
  items: a.collaborateurs,
@@ -2803,7 +2827,7 @@ function pa(e, t, n, r, i, a) {
2803
2827
  "hide-choices": "",
2804
2828
  "onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
2805
2829
  }, {
2806
- options: z((e) => [w("div", ca, [w("div", la, I(e?.prenom) + " " + I(e?.nom), 1), e?.service ? (A(), C("small", ua, I(e.service), 1)) : S("", !0)])]),
2830
+ options: z((e) => [w("div", da, [w("div", fa, I(e?.prenom) + " " + I(e?.nom), 1), e?.service ? (A(), C("small", pa, I(e.service), 1)) : S("", !0)])]),
2807
2831
  _: 1
2808
2832
  }, 8, [
2809
2833
  "model-value",
@@ -2812,8 +2836,8 @@ function pa(e, t, n, r, i, a) {
2812
2836
  "get-input-libelle",
2813
2837
  "filtering-function"
2814
2838
  ])),
2815
- a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (A(), C("small", da, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : S("", !0)
2816
- ])]), w("div", fa, [E(c, {
2839
+ a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (A(), C("small", ma, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : S("", !0)
2840
+ ])]), w("div", ha, [E(c, {
2817
2841
  index: n.index,
2818
2842
  fichier: a.ligne.fichier,
2819
2843
  readonly: r.draft.isReadonly("fichier"),
@@ -2825,13 +2849,13 @@ function pa(e, t, n, r, i, a) {
2825
2849
  ])])])]);
2826
2850
  }
2827
2851
  // src/components/EtapeDetailsBlock.vue
2828
- var ma = {
2852
+ var _a = {
2829
2853
  name: "EtapeDetailsBlock",
2830
2854
  components: {
2831
2855
  AmsomOverlay: v,
2832
- LigneDetailBlock: /* @__PURE__ */ G(Wi, [["render", pa]]),
2833
- RecapBlock: Qr,
2834
- SectionComponent: rt
2856
+ LigneDetailBlock: /* @__PURE__ */ G(qi, [["render", ga]]),
2857
+ RecapBlock: ti,
2858
+ SectionComponent: at
2835
2859
  },
2836
2860
  setup() {
2837
2861
  return {
@@ -2883,13 +2907,13 @@ var ma = {
2883
2907
  }
2884
2908
  }
2885
2909
  }
2886
- }, ha = { class: "d-flex flex-column gap-4" }, ga = { class: "text-muted d-flex align-items-start gap-2" };
2887
- function _a(e, t, n, r, i, a) {
2910
+ }, va = { class: "d-flex flex-column gap-4" }, ya = { class: "text-muted d-flex align-items-start gap-2" };
2911
+ function ba(e, t, n, r, i, a) {
2888
2912
  let o = F("recap-block"), s = F("font-awesome-icon"), c = F("ligne-detail-block"), l = F("section-component"), u = F("amsom-overlay");
2889
2913
  return A(), x(u, { loading: r.data.isLoading && !r.data.cache.collaborateurs }, {
2890
- default: z(() => [w("div", ha, [
2914
+ default: z(() => [w("div", va, [
2891
2915
  E(o),
2892
- w("small", ga, [E(s, {
2916
+ w("small", ya, [E(s, {
2893
2917
  icon: "circle-info",
2894
2918
  class: "mt-1"
2895
2919
  }), t[0] ||= T(" Rappel RGPD : ne saisissez que les informations nécessaires au traitement de la sollicitation, aucune donnée sensible (santé, opinions, situation judiciaire…) ni appréciation personnelle sur le réclamant. ", -1)]),
@@ -2914,7 +2938,7 @@ function _a(e, t, n, r, i, a) {
2914
2938
  _: 1
2915
2939
  }, 8, ["loading"]);
2916
2940
  }
2917
- var va = /*#__PURE__*/ G(ma, [["render", _a]]), ya = [
2941
+ var xa = /*#__PURE__*/ G(_a, [["render", ba]]), Sa = [
2918
2942
  {
2919
2943
  key: "reclamantCible",
2920
2944
  label: "Réclamant et cible",
@@ -2930,14 +2954,14 @@ var va = /*#__PURE__*/ G(ma, [["render", _a]]), ya = [
2930
2954
  label: "Détails",
2931
2955
  icon: "info"
2932
2956
  }
2933
- ], ba = {
2957
+ ], Ca = {
2934
2958
  name: "StepperBlock",
2935
2959
  components: {
2936
2960
  AmsomHorizontalStepper: _e,
2937
2961
  AmsomOverlay: v,
2938
- EtapeReclamantCibleBlock: Vr,
2939
- EtapeMotifBlock: zi,
2940
- EtapeDetailsBlock: va
2962
+ EtapeReclamantCibleBlock: Wr,
2963
+ EtapeMotifBlock: Hi,
2964
+ EtapeDetailsBlock: xa
2941
2965
  },
2942
2966
  props: {
2943
2967
  step: {
@@ -2962,7 +2986,7 @@ var va = /*#__PURE__*/ G(ma, [["render", _a]]), ya = [
2962
2986
  };
2963
2987
  },
2964
2988
  computed: {
2965
- steps: () => ya,
2989
+ steps: () => Sa,
2966
2990
  currentKey() {
2967
2991
  return this.steps[this.step - 1]?.key ?? null;
2968
2992
  },
@@ -3032,37 +3056,37 @@ var va = /*#__PURE__*/ G(ma, [["render", _a]]), ya = [
3032
3056
  }));
3033
3057
  }
3034
3058
  }
3035
- }, xa = { class: "d-flex flex-column gap-3" }, Sa = {
3059
+ }, wa = { class: "d-flex flex-column gap-3" }, Ta = {
3036
3060
  key: 0,
3037
3061
  class: "w-100 fs-6 fw-medium my-3 alert alert-info",
3038
3062
  style: { "white-space": "pre-line" }
3039
- }, Ca = { style: { "min-height": "260px" } }, wa = { class: "d-flex justify-content-between" }, Ta = { key: 1 }, Ea = ["disabled"], Da = ["disabled"];
3040
- function Oa(e, t, n, r, i, a) {
3063
+ }, Ea = { style: { "min-height": "260px" } }, Da = { class: "d-flex justify-content-between" }, Oa = { key: 1 }, ka = ["disabled"], Aa = ["disabled"];
3064
+ function ja(e, t, n, r, i, a) {
3041
3065
  let o = F("amsom-horizontal-stepper"), s = F("font-awesome-icon"), c = F("etape-reclamant-cible-block"), l = F("etape-motif-block"), u = F("etape-details-block"), d = F("amsom-overlay");
3042
3066
  return A(), x(d, { loading: n.creating }, {
3043
- default: z(() => [w("div", xa, [
3067
+ default: z(() => [w("div", wa, [
3044
3068
  E(o, {
3045
3069
  steps: a.stepperSteps,
3046
3070
  size: "md",
3047
3071
  onStepClick: a.onStepClick
3048
3072
  }, null, 8, ["steps", "onStepClick"]),
3049
- a.aideMotif ? (A(), C("div", Sa, [E(s, {
3073
+ a.aideMotif ? (A(), C("div", Ta, [E(s, {
3050
3074
  icon: "circle-info",
3051
3075
  class: "text-info-emphasis me-2"
3052
3076
  }), w("span", null, I(a.aideMotif), 1)])) : S("", !0),
3053
- w("div", Ca, [a.currentKey === "reclamantCible" ? (A(), x(c, { key: 0 }, le({ _: 2 }, [e.$slots.reclamant ? {
3077
+ w("div", Ea, [a.currentKey === "reclamantCible" ? (A(), x(c, { key: 0 }, le({ _: 2 }, [e.$slots.reclamant ? {
3054
3078
  name: "reclamant",
3055
3079
  fn: z((t) => [P(e.$slots, "reclamant", k(D(t)))]),
3056
3080
  key: "0"
3057
3081
  } : void 0]), 1024)) : a.currentKey === "motif" ? (A(), x(l, { key: 1 })) : a.currentKey === "details" ? (A(), x(u, { key: 2 })) : S("", !0)]),
3058
- w("div", wa, [n.step > 1 ? (A(), C("button", {
3082
+ w("div", Da, [n.step > 1 ? (A(), C("button", {
3059
3083
  key: 0,
3060
3084
  class: "btn btn-sm btn-outline-secondary",
3061
3085
  onClick: t[0] ||= (...e) => a.goPrevious && a.goPrevious(...e)
3062
3086
  }, [E(s, {
3063
3087
  icon: "chevron-left",
3064
3088
  class: "me-1"
3065
- }), t[3] ||= T(" Précédent ", -1)])) : (A(), C("span", Ta)), n.step < a.steps.length ? (A(), C("button", {
3089
+ }), t[3] ||= T(" Précédent ", -1)])) : (A(), C("span", Oa)), n.step < a.steps.length ? (A(), C("button", {
3066
3090
  key: 2,
3067
3091
  class: "btn btn-sm btn-primary",
3068
3092
  disabled: !a.canGoNext,
@@ -3070,7 +3094,7 @@ function Oa(e, t, n, r, i, a) {
3070
3094
  }, [t[4] ||= T(" Suivant ", -1), E(s, {
3071
3095
  icon: "chevron-right",
3072
3096
  class: "ms-1"
3073
- })], 8, Ea)) : (A(), C("button", {
3097
+ })], 8, ka)) : (A(), C("button", {
3074
3098
  key: 3,
3075
3099
  class: "btn btn-sm btn-success",
3076
3100
  disabled: !a.canCreer || n.creating,
@@ -3078,21 +3102,21 @@ function Oa(e, t, n, r, i, a) {
3078
3102
  }, [E(s, {
3079
3103
  icon: "check",
3080
3104
  class: "me-1"
3081
- }), t[5] ||= T(" Créer la sollicitation ", -1)], 8, Da))])
3105
+ }), t[5] ||= T(" Créer la sollicitation ", -1)], 8, Aa))])
3082
3106
  ])]),
3083
3107
  _: 3
3084
3108
  }, 8, ["loading"]);
3085
3109
  }
3086
- var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n } = {}) => yt("/v2/cresol/creer_sollicitation", e, {
3110
+ var Ma = /*#__PURE__*/ G(Ca, [["render", ja]]), Na = (e, { signal: t, baseUrl: n } = {}) => xt("/v2/cresol/creer_sollicitation", e, {
3087
3111
  signal: t,
3088
3112
  baseUrl: n
3089
- }), ja = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => yt("/v2/cresol/upload_sollicitation_ged", {
3113
+ }), Pa = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => xt("/v2/cresol/upload_sollicitation_ged", {
3090
3114
  idSollicitation: e,
3091
3115
  pj: t
3092
3116
  }, {
3093
3117
  signal: n,
3094
3118
  baseUrl: r
3095
- }), Ma = {
3119
+ }), Fa = {
3096
3120
  modelValue: {
3097
3121
  type: Object,
3098
3122
  default: null
@@ -3128,12 +3152,12 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3128
3152
  typesReclamant: {
3129
3153
  type: Array,
3130
3154
  default: null,
3131
- validator: (e) => e.every((e) => H.includes(e))
3155
+ validator: (e) => e.every((e) => Oe.includes(e))
3132
3156
  },
3133
3157
  typesReclamantExclus: {
3134
3158
  type: Array,
3135
3159
  default: () => [],
3136
- validator: (e) => e.every((e) => H.includes(e))
3160
+ validator: (e) => e.every((e) => Oe.includes(e))
3137
3161
  },
3138
3162
  provenances: {
3139
3163
  type: Array,
@@ -3146,12 +3170,16 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3146
3170
  readonly: {
3147
3171
  type: [Boolean, Array],
3148
3172
  default: !1,
3149
- validator: (e) => typeof e == "boolean" || e.every((e) => Ne.includes(e))
3173
+ validator: (e) => typeof e == "boolean" || e.every((e) => Fe.includes(e))
3150
3174
  },
3151
3175
  modules: {
3152
3176
  type: Array,
3153
3177
  default: null
3154
3178
  },
3179
+ idModuleCibleDefaut: {
3180
+ type: [String, Number],
3181
+ default: null
3182
+ },
3155
3183
  idModule: {
3156
3184
  type: [String, Number],
3157
3185
  default: null
@@ -3172,7 +3200,7 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3172
3200
  type: String,
3173
3201
  default: null
3174
3202
  }
3175
- }, Na = Object.keys(Ma), Pa = [
3203
+ }, Ia = Object.keys(Fa), La = [
3176
3204
  "update:modelValue",
3177
3205
  "reclamantChange",
3178
3206
  "motifChange",
@@ -3181,22 +3209,22 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3181
3209
  "created",
3182
3210
  "createError",
3183
3211
  "error"
3184
- ], Fa = {
3212
+ ], Ra = {
3185
3213
  name: "CreerSollicitationForm",
3186
3214
  components: {
3187
- AsideBlock: Xe,
3188
- StepperBlock: ka
3215
+ AsideBlock: Qe,
3216
+ StepperBlock: Ma
3189
3217
  },
3190
- props: { ...Ma },
3191
- emits: [...Pa],
3218
+ props: { ...Fa },
3219
+ emits: [...La],
3192
3220
  setup(e, { emit: t }) {
3193
- let n = (e) => t("error", e), r = { baseUrl: L(e, "baseUrl") }, i = Wt(Ut({
3221
+ let n = (e) => t("error", e), r = { baseUrl: L(e, "baseUrl") }, i = Kt(Gt({
3194
3222
  onError: n,
3195
3223
  ...r
3196
- })), a = M(null), o = M(!1), s = b(() => a.value ?? e.modules ?? []), c = b(() => e.reclamantMode === "recherche"), l = Ue(He({
3224
+ })), a = M(null), o = M(!1), s = b(() => a.value ?? e.modules ?? []), c = b(() => e.reclamantMode === "recherche"), l = Ge(We({
3197
3225
  reclamants: b(() => c.value ? [] : e.reclamants),
3198
3226
  modules: s,
3199
- idModulePrefere: L(e, "idModule"),
3227
+ idModulePrefere: b(() => e.idModuleCibleDefaut ?? e.idModule),
3200
3228
  readonly: L(e, "readonly")
3201
3229
  })), u = (t) => {
3202
3230
  if (!t || t.estDesactive) return !1;
@@ -3208,7 +3236,7 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3208
3236
  let t = i.cache.motifs?.find((t) => t.id === e);
3209
3237
  return !i.cache.motifs || u(t);
3210
3238
  }), f = M(null);
3211
- return Kt(j({
3239
+ return Jt(j({
3212
3240
  nomenclatureFilter: L(e, "nomenclatureFilter"),
3213
3241
  estMotifPropose: u,
3214
3242
  motifPrincipalPropose: d,
@@ -3217,7 +3245,7 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3217
3245
  reclamantMode: L(e, "reclamantMode"),
3218
3246
  rechercheReclamant: c,
3219
3247
  motifSelectionMode: L(e, "motifSelectionMode"),
3220
- typesReclamant: b(() => (e.typesReclamant ?? H).filter((t) => !e.typesReclamantExclus.includes(t))),
3248
+ typesReclamant: b(() => (e.typesReclamant ?? Oe).filter((t) => !e.typesReclamantExclus.includes(t))),
3221
3249
  provenances: b(() => {
3222
3250
  let t = i.cache.provenances ?? [];
3223
3251
  return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
@@ -3290,7 +3318,7 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3290
3318
  async reprendreReclamantFourni() {
3291
3319
  let { type: e, id: t } = this.draft.draft.reclamant;
3292
3320
  if (!e || t == null) return;
3293
- let n = (n) => n.type === e && String(n.id) === String(t), [r] = Oe([e]), i = null;
3321
+ let n = (n) => n.type === e && String(n.id) === String(t), [r] = ke([e]), i = null;
3294
3322
  if (r) {
3295
3323
  this.repriseReclamant = !0;
3296
3324
  try {
@@ -3322,10 +3350,10 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3322
3350
  if (!await this.autoriserCreation(e)) return;
3323
3351
  let t;
3324
3352
  try {
3325
- t = await Aa(e, this.requestOptions) ?? [];
3353
+ t = await Na(e, this.requestOptions) ?? [];
3326
3354
  } catch (t) {
3327
- if (It(t)) return;
3328
- let n = Ft(t);
3355
+ if (Rt(t)) return;
3356
+ let n = Lt(t);
3329
3357
  this.$emit("createError", {
3330
3358
  error: t,
3331
3359
  message: n,
@@ -3375,7 +3403,7 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3375
3403
  message: t
3376
3404
  };
3377
3405
  };
3378
- return a?.id ? ja({
3406
+ return a?.id ? Pa({
3379
3407
  idSollicitation: a.id,
3380
3408
  pj: {
3381
3409
  name: n.name,
@@ -3386,18 +3414,18 @@ var ka = /*#__PURE__*/ G(ba, [["render", Oa]]), Aa = (e, { signal: t, baseUrl: n
3386
3414
  ...o,
3387
3415
  ok: !0,
3388
3416
  message: null
3389
- })).catch((e) => s(Ft(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
3417
+ })).catch((e) => s(Lt(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
3390
3418
  });
3391
3419
  return Promise.all(n);
3392
3420
  }
3393
3421
  }
3394
- }, Ia = { class: "row g-3" }, La = {
3422
+ }, za = { class: "row g-3" }, Ba = {
3395
3423
  key: 0,
3396
3424
  class: "col-12 col-lg-4"
3397
3425
  };
3398
- function Ra(e, t, n, r, i, a) {
3426
+ function Va(e, t, n, r, i, a) {
3399
3427
  let o = F("aside-block"), s = F("stepper-block");
3400
- return A(), C("div", Ia, [e.aside ? (A(), C("div", La, [P(e.$slots, "aside", {}, () => [E(o, { "nb-similaires": e.nbSimilaires }, le({ _: 2 }, [e.$slots["aside-similaires"] ? {
3428
+ return A(), C("div", za, [e.aside ? (A(), C("div", Ba, [P(e.$slots, "aside", {}, () => [E(o, { "nb-similaires": e.nbSimilaires }, le({ _: 2 }, [e.$slots["aside-similaires"] ? {
3401
3429
  name: "similaires",
3402
3430
  fn: z((t) => [P(e.$slots, "aside-similaires", k(D(t)))]),
3403
3431
  key: "0"
@@ -3421,14 +3449,14 @@ function Ra(e, t, n, r, i, a) {
3421
3449
  "onSubmit"
3422
3450
  ])], 2)]);
3423
3451
  }
3424
- var za = /*#__PURE__*/ G(Fa, [["render", Ra]]), Ba = {
3452
+ var Ha = /*#__PURE__*/ G(Ra, [["render", Va]]), Ua = {
3425
3453
  name: "CreerSollicitationModal",
3426
3454
  components: {
3427
3455
  AmsomModal: ce,
3428
- CreerSollicitationForm: za
3456
+ CreerSollicitationForm: Ha
3429
3457
  },
3430
3458
  props: {
3431
- ...Ma,
3459
+ ...Fa,
3432
3460
  titre: {
3433
3461
  type: String,
3434
3462
  default: "Nouvelle sollicitation"
@@ -3438,35 +3466,35 @@ var za = /*#__PURE__*/ G(Fa, [["render", Ra]]), Ba = {
3438
3466
  default: !0
3439
3467
  }
3440
3468
  },
3441
- emits: [...Pa, "close"],
3469
+ emits: [...La, "close"],
3442
3470
  computed: {
3443
3471
  formProps() {
3444
- return Object.fromEntries(Na.map((e) => [e, this[e]]));
3472
+ return Object.fromEntries(Ia.map((e) => [e, this[e]]));
3445
3473
  },
3446
3474
  formListeners() {
3447
- return Object.fromEntries(Pa.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
3475
+ return Object.fromEntries(La.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
3448
3476
  }
3449
3477
  },
3450
3478
  methods: { onCreated(...e) {
3451
3479
  this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
3452
3480
  } }
3453
- }, Va = { class: "fw-medium fs-5" };
3454
- function Ha(e, t, n, r, i, a) {
3481
+ }, Wa = { class: "fw-medium fs-5" };
3482
+ function Ga(e, t, n, r, i, a) {
3455
3483
  let o = F("creer-sollicitation-form"), s = F("amsom-modal");
3456
3484
  return A(), x(s, {
3457
3485
  "close-option": "",
3458
3486
  size: "xl",
3459
3487
  onClose: t[0] ||= (t) => e.$emit("close")
3460
3488
  }, {
3461
- default: z(() => [w("span", Va, I(n.titre), 1), E(o, de({ class: "pt-3" }, a.formProps, pe(a.formListeners), { onCreated: a.onCreated }), le({ _: 2 }, [N(e.$slots, (t, n) => ({
3489
+ default: z(() => [w("span", Wa, I(n.titre), 1), E(o, de({ class: "pt-3" }, a.formProps, pe(a.formListeners), { onCreated: a.onCreated }), le({ _: 2 }, [N(e.$slots, (t, n) => ({
3462
3490
  name: n,
3463
3491
  fn: z((t) => [P(e.$slots, n, k(D(t ?? {})))])
3464
3492
  }))]), 1040, ["onCreated"])]),
3465
3493
  _: 3
3466
3494
  });
3467
3495
  }
3468
- var Ua = /*#__PURE__*/ G(Ba, [["render", Ha]]), Wa = {
3469
- CreerSollicitationModal: Ua,
3470
- CreerSollicitationForm: za
3496
+ var Ka = /*#__PURE__*/ G(Ua, [["render", Ga]]), qa = {
3497
+ CreerSollicitationModal: Ka,
3498
+ CreerSollicitationForm: Ha
3471
3499
  };
3472
- export { za as CreerSollicitationForm, Ua as CreerSollicitationModal, Te as DEFAULT_PROVENANCE_CONTACT, we as PROVENANCES_CONTACT_DEFAUT, Se as PROVENANCE_CONTACT_ICONS, Ne as READONLY_FIELDS, pt as configureCresol, Wa as default, Pe as getDefaultDraft, Me as getDefaultLigne, U as getDefaultPatrimoine, Vt as resetCresolCache };
3500
+ export { Ne as CIBLE_FIELDS, Ha as CreerSollicitationForm, Ka as CreerSollicitationModal, Te as DEFAULT_PROVENANCE_CONTACT, we as PROVENANCES_CONTACT_DEFAUT, Se as PROVENANCE_CONTACT_ICONS, Fe as READONLY_FIELDS, Pe as cibleOfLigne, ht as configureCresol, qa as default, Ie as getDefaultDraft, U as getDefaultLigne, H as getDefaultPatrimoine, Ut as resetCresolCache };