@tricoteuses/assemblee 3.0.18 → 3.1.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/README.md +2 -2
- package/lib/{amendements-Bab1iUCY.js → amendements-Blw6Aa6-.js} +3 -3
- package/lib/amendements-DiMsxlUL.js +178 -0
- package/lib/cleaners/actes_legislatifs.d.ts +2 -2
- package/lib/cleaners/acteurs.d.ts +7 -2
- package/lib/cleaners/amendements.d.ts +2 -2
- package/lib/cleaners/documents.d.ts +1 -1
- package/lib/cleaners/dossiers_legislatifs.d.ts +1 -1
- package/lib/cleaners/organes.d.ts +1 -1
- package/lib/cleaners/reunions.d.ts +1 -1
- package/lib/cleaners/scrutins.d.ts +10 -2
- package/lib/cleaners.js +576 -485
- package/lib/datasets.d.ts +2 -6
- package/lib/git.js +54 -51
- package/lib/index.js +263 -257
- package/lib/inserters.d.ts +22 -2
- package/lib/loaders.js +495 -544
- package/lib/logger.d.ts +1 -1
- package/lib/parsers.js +5 -5
- package/lib/{questions-BiakXZ6q.js → questions-XokaUGcy.js} +4 -1
- package/lib/registries.d.ts +4 -4
- package/lib/schemas/clean/acteurs_et_organes.d.ts +37 -37
- package/lib/schemas/clean/amendements.d.ts +38 -25
- package/lib/schemas/clean/dossiers_legislatifs.d.ts +16 -16
- package/lib/schemas/clean/scrutins.d.ts +2 -2
- package/lib/schemas/enriched/acteurs_et_organes.d.ts +2 -2
- package/lib/schemas/enriched/amendements.d.ts +135 -15
- package/lib/schemas/enriched/dossiers_legislatifs.d.ts +12 -12
- package/lib/schemas/enriched/scrutins.d.ts +2 -2
- package/lib/schemas/raw/acteurs_et_organes.d.ts +99 -99
- package/lib/schemas/raw/agendas.d.ts +11 -11
- package/lib/schemas/raw/amendements.d.ts +49 -37
- package/lib/schemas/raw/dossiers_legislatifs.d.ts +146 -63
- package/lib/schemas/raw/questions.d.ts +44 -44
- package/lib/schemas/raw/scrutins.d.ts +4 -4
- package/lib/scripts/retrieve_documents.d.ts +5 -1
- package/lib/scripts/retrieve_open_data.d.ts +4 -0
- package/lib/scripts/shared/cli_helpers.d.ts +8 -0
- package/package.json +26 -26
- package/lib/amendements-BKGwufEi.js +0 -170
package/lib/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as le, i as de, j as me, l as ye, p as ge, x as Re, t as Se, y as ve, z as Ae, r as he } from "./amendements-
|
|
2
|
-
import { a0 as Te, C as xe, W as _e, b as Pe, a2 as Ce, e as Ee, a4 as Ue, S as Be, D as
|
|
1
|
+
import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as le, i as de, j as me, l as ye, p as ge, x as Re, t as Se, y as ve, z as Ae, r as he } from "./amendements-Blw6Aa6-.js";
|
|
2
|
+
import { a0 as Te, C as xe, W as _e, b as Pe, a2 as Ce, e as Ee, a4 as Ue, S as Be, D as be, E as De, F as Le, q as Ie, L as Ne, a6 as Me, a8 as je, aa as $e, M as Ve, ac as Xe, N as we, O as qe, ap as Fe, u as Ge, ae as ke, P as Qe, w as Je, y as ze, Q as He, Y as We, R as Ye, j as Ke, B as Ze, ag as ei, T as ii, _ as ti, I as oi, U as ni, aq as ri, $ as si, c as ai, V as ci, a as ui, a1 as fi, d as pi, a3 as li, ah as di, K as mi, f as yi, ai as gi, ar as Ri, as as Si, aj as vi, an as Ai, k as hi, g as Oi, n as Ti, l as xi, h as _i, a5 as Pi, a7 as Ci, a9 as Ei, m as Ui, ab as Bi, s as bi, o as Di, ao as Li, t as Ii, ad as Ni, p as Mi, v as ji, x as $i, z as Vi, ak as Xi, X as wi, r as qi, i as Fi, al as Gi, A as ki, am as Qi, at as Ji, af as zi, G as Hi, Z as Wi, H as Yi, J as Ki } from "./questions-XokaUGcy.js";
|
|
3
3
|
var R = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(R || {});
|
|
4
|
-
const
|
|
4
|
+
const L = Object.values(R);
|
|
5
5
|
var S = /* @__PURE__ */ ((e) => (e.Acte_organe = "acte.organe", e.Acte_provenance = "acte.provenance", e.Acte_rapporteurs_acteur = "acte.rapporteurs.acteur", e.Acte_reunion = "acte.reunion", e.Acte_texteAdopte = "acte.texteAdopte", e.Acte_texteAssocie = "acte.texteAssocie", e.Acte_textesAssocies_texteAssocie = "acte.textesAssocies.texteAssocie", e.Acte_votes = "acte.votes", e.Acteur_mandats_organes = "acteur.mandats.organes", e.Amendement_signataires_auteur_acteur = "amendement.signataires.auteur.acteur", e.Amendement_signataires_auteur_auteurRapporteurOrgane = "amendement.signataires.auteur.auteurRapporteurOrgane", e.Amendement_signataires_auteur_gouvernement = "amendement.signataires.auteur.gouvernement", e.Amendement_signataires_auteur_groupePolitique = "amendement.signataires.auteur.groupePolitique", e.Amendement_signataires_cosignataires = "amendement.signataires.cosignataires", e.Amendement_texteLegislatif = "amendement.texteLegislatif", e.Document_auteurs_acteur_acteur = "document.auteurs.acteur.acteur", e.Document_auteurs_organe = "document.auteurs.organe", e.Document_dossier = "document.dossier", e.Dossier_initiateur_acteurs_acteur = "dossier.initiateur.acteurs.acteur", e.Dossier_initiateur_organe = "dossier.initiateur.organe", e.Organe_organeParent = "organe.organeParent", e.Organe_organePrecedent = "organe.organePrecedent", e.Reunion_demandeurs_acteurs_acteur = "reunion.demandeurs.acteurs.acteur", e.Reunion_demandeurs_organe_organe = "reunion.demandeurs.organe.organe", e.Reunion_organeReuni = "reunion.organeReuni", e.Reunion_participants_participantsInternes_acteur = "reunion.participants.participantsInternes.acteur", e.Scrutin_miseAuPoint = "scrutin.miseAuPoint", e.Scrutin_organe = "scrutin.organe", e.Scrutin_ventilationVotes_groupes_organe = "scrutin.ventilationVotes.groupes.organe", e))(S || {});
|
|
6
|
-
const
|
|
6
|
+
const I = Object.values(S);
|
|
7
7
|
function N(e) {
|
|
8
8
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
9
9
|
}
|
|
@@ -13,9 +13,9 @@ function c(e) {
|
|
|
13
13
|
var x = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.Success = "SUCCESS", e))(x || {}), _ = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.InProgress = "IN_PROGRESS", e.Success = "SUCCESS", e))(_ || {});
|
|
14
14
|
function M(e) {
|
|
15
15
|
if (e.actesLegislatifs !== void 0) {
|
|
16
|
-
for (const
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
16
|
+
for (const i of A(e.actesLegislatifs))
|
|
17
|
+
if (i.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && i.organeRef !== void 0 && i.organeRef !== "PO211494")
|
|
18
|
+
return i.organeRef;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function u(e) {
|
|
@@ -51,65 +51,71 @@ function u(e) {
|
|
|
51
51
|
return "IN_PROGRESS";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function P(e,
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
switch (
|
|
58
|
-
case "Adoption_Europe_Type":
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
function P(e, i) {
|
|
55
|
+
const n = i[i.length - 1];
|
|
56
|
+
let t;
|
|
57
|
+
switch (n.xsiType) {
|
|
58
|
+
case "Adoption_Europe_Type": {
|
|
59
|
+
const o = n.statutAdoption.libelle;
|
|
60
|
+
return o === void 0 ? null : {
|
|
61
|
+
currentStatus: u(o),
|
|
62
|
+
label: c(o)
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
}
|
|
65
|
+
case "ConclusionEtapeCC_Type": {
|
|
66
|
+
const o = n.statutConclusion.libelle;
|
|
67
|
+
return o === void 0 ? null : {
|
|
68
|
+
currentStatus: u(o),
|
|
69
|
+
label: c(o)
|
|
67
70
|
};
|
|
71
|
+
}
|
|
68
72
|
case "Decision_Type": {
|
|
69
|
-
|
|
73
|
+
const o = n.statutConclusion.libelle;
|
|
74
|
+
if (o === void 0)
|
|
70
75
|
return null;
|
|
71
|
-
|
|
76
|
+
const r = u(o);
|
|
77
|
+
let s;
|
|
72
78
|
switch (e.procedureParlementaire.code) {
|
|
73
79
|
case "PROCEDURE_PARLEMENTAIRE_2":
|
|
74
|
-
["rejeté", "rejetée"].includes(
|
|
80
|
+
["rejeté", "rejetée"].includes(o) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (s = "FAILURE");
|
|
75
81
|
break;
|
|
76
82
|
case "PROCEDURE_PARLEMENTAIRE_8":
|
|
77
83
|
// Résolution
|
|
78
84
|
case "PROCEDURE_PARLEMENTAIRE_22":
|
|
79
|
-
|
|
85
|
+
r === "SUCCESS" ? s = "SUCCESS" : r === "FAILURE" && (s = "FAILURE");
|
|
80
86
|
break;
|
|
81
87
|
}
|
|
82
88
|
return {
|
|
83
|
-
currentStatus:
|
|
84
|
-
finalStatus:
|
|
85
|
-
label: c(
|
|
89
|
+
currentStatus: r,
|
|
90
|
+
finalStatus: s,
|
|
91
|
+
label: c(o)
|
|
86
92
|
};
|
|
87
93
|
}
|
|
88
94
|
case "DecisionMotionCensure_Type":
|
|
89
|
-
return
|
|
90
|
-
currentStatus: u(
|
|
95
|
+
return t = n.decision.libelle, t === void 0 ? null : {
|
|
96
|
+
currentStatus: u(t),
|
|
91
97
|
finalStatus: (
|
|
92
98
|
// Not sure for other cases => To improve.
|
|
93
99
|
// Engagement de la responsabilité gouvernementale
|
|
94
|
-
e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" &&
|
|
100
|
+
e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && t === "Motion rejeté(e)" ? "FAILURE" : "SUCCESS"
|
|
95
101
|
),
|
|
96
102
|
// TODO: Not sure of this `true` value
|
|
97
|
-
label: c(
|
|
103
|
+
label: c(t)
|
|
98
104
|
};
|
|
99
105
|
case "DecisionRecevabiliteBureau_Type":
|
|
100
|
-
return
|
|
101
|
-
currentStatus: u(
|
|
102
|
-
label: c(
|
|
106
|
+
return t = n.decision.libelle, t === void 0 ? null : {
|
|
107
|
+
currentStatus: u(t),
|
|
108
|
+
label: c(t)
|
|
103
109
|
};
|
|
104
110
|
case "DeclarationGouvernement_Type":
|
|
105
|
-
return
|
|
106
|
-
currentStatus: u(
|
|
107
|
-
label: c(
|
|
111
|
+
return t = n.typeDeclaration.libelle, t === void 0 ? null : {
|
|
112
|
+
currentStatus: u(t),
|
|
113
|
+
label: c(t)
|
|
108
114
|
};
|
|
109
115
|
case "DepotMotionCensure_Type":
|
|
110
|
-
return
|
|
111
|
-
currentStatus: u(
|
|
112
|
-
label: c(
|
|
116
|
+
return t = n.typeMotionCensure.libelle, t === void 0 ? null : {
|
|
117
|
+
currentStatus: u(t),
|
|
118
|
+
label: c(t)
|
|
113
119
|
};
|
|
114
120
|
case "DepotRapport_Type":
|
|
115
121
|
return [
|
|
@@ -117,14 +123,14 @@ function P(e, t) {
|
|
|
117
123
|
"DossierMissionControle_Type",
|
|
118
124
|
"DossierMissionInformation_Type"
|
|
119
125
|
].includes(e.xsiType) ? {
|
|
120
|
-
currentStatus:
|
|
126
|
+
currentStatus: i[0].organe.codeType,
|
|
121
127
|
finalStatus: "SUCCESS",
|
|
122
128
|
label: "rapport déposé"
|
|
123
129
|
} : null;
|
|
124
130
|
case "MotionProcedure_Type":
|
|
125
|
-
return
|
|
126
|
-
currentStatus: u(
|
|
127
|
-
label: c(
|
|
131
|
+
return t = n.typeMotion.libelle, t === void 0 ? null : {
|
|
132
|
+
currentStatus: u(t),
|
|
133
|
+
label: c(t)
|
|
128
134
|
};
|
|
129
135
|
case "Promulgation_Type":
|
|
130
136
|
return {
|
|
@@ -139,64 +145,64 @@ function P(e, t) {
|
|
|
139
145
|
label: "retiré"
|
|
140
146
|
};
|
|
141
147
|
case "SaisineConseilConstit_Type":
|
|
142
|
-
return
|
|
143
|
-
currentStatus: u(
|
|
144
|
-
label: c(
|
|
148
|
+
return t = n.casSaisine.libelle, t === void 0 ? null : {
|
|
149
|
+
currentStatus: u(t),
|
|
150
|
+
label: c(t)
|
|
145
151
|
};
|
|
146
152
|
default:
|
|
147
153
|
return null;
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
|
-
function v(e,
|
|
151
|
-
if (
|
|
152
|
-
for (const
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
return
|
|
156
|
+
function v(e, i, n) {
|
|
157
|
+
if (n !== void 0)
|
|
158
|
+
for (const t of [...n].reverse()) {
|
|
159
|
+
const o = t.actesLegislatifs ? v(e, [...i, t], t.actesLegislatifs) : P(e, [...i, t]);
|
|
160
|
+
if (o !== null)
|
|
161
|
+
return o;
|
|
156
162
|
}
|
|
157
163
|
return null;
|
|
158
164
|
}
|
|
159
165
|
function j(e) {
|
|
160
|
-
const
|
|
161
|
-
return
|
|
166
|
+
const i = v(e, [], e.actesLegislatifs);
|
|
167
|
+
return i !== null ? i : {
|
|
162
168
|
currentStatus: "IN_PROGRESS",
|
|
163
169
|
label: "en cours"
|
|
164
170
|
};
|
|
165
171
|
}
|
|
166
172
|
function* A(e) {
|
|
167
|
-
for (const
|
|
168
|
-
yield
|
|
173
|
+
for (const i of e)
|
|
174
|
+
yield i, i.actesLegislatifs !== void 0 && (yield* A(i.actesLegislatifs));
|
|
169
175
|
}
|
|
170
176
|
function* C(e) {
|
|
171
177
|
yield e;
|
|
172
|
-
for (const
|
|
173
|
-
yield* C(
|
|
178
|
+
for (const i of e.divisions ?? [])
|
|
179
|
+
yield* C(i);
|
|
174
180
|
}
|
|
175
|
-
function h(e,
|
|
176
|
-
if (!
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
179
|
-
|
|
181
|
+
function h(e, i, n) {
|
|
182
|
+
if (!n.has(e.uid)) {
|
|
183
|
+
if (n.add(e.uid), i.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
|
|
184
|
+
const t = i.documentByUid[e.depotInitialLectureDefinitiveRef];
|
|
185
|
+
t !== void 0 && (e.depotInitialLectureDefinitive = t, m(t, i, n));
|
|
180
186
|
}
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
|
|
187
|
+
if (i.organeByUid !== void 0 && e.organeRef !== void 0) {
|
|
188
|
+
const t = i.organeByUid[e.organeRef];
|
|
189
|
+
t !== void 0 && (e.organe = t, a(t, i, n));
|
|
184
190
|
}
|
|
185
|
-
if (
|
|
186
|
-
const
|
|
187
|
-
|
|
191
|
+
if (i.organeByUid !== void 0 && e.provenanceRef !== void 0) {
|
|
192
|
+
const t = i.organeByUid[e.provenanceRef];
|
|
193
|
+
t !== void 0 && (e.provenance = t, a(t, i, n));
|
|
188
194
|
}
|
|
189
|
-
if (
|
|
190
|
-
for (const
|
|
191
|
-
const
|
|
192
|
-
|
|
195
|
+
if (i.acteurByUid !== void 0 && e.rapporteurs !== void 0)
|
|
196
|
+
for (const t of e.rapporteurs) {
|
|
197
|
+
const o = i.acteurByUid[t.acteurRef];
|
|
198
|
+
o !== void 0 && (t.acteur = o, p(o, i, n));
|
|
193
199
|
}
|
|
194
|
-
if (
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
for (const r of
|
|
200
|
+
if (i.reunionByUid !== void 0 && e.reunionRef !== void 0) {
|
|
201
|
+
const t = i.reunionByUid[e.reunionRef];
|
|
202
|
+
if (t !== void 0 && (e.reunion = t, E(t, i, n), e.odjRef !== void 0)) {
|
|
203
|
+
const o = t.odj;
|
|
204
|
+
if (o !== void 0 && o.pointsOdj !== void 0) {
|
|
205
|
+
for (const r of o.pointsOdj)
|
|
200
206
|
if (r.uid === e.odjRef) {
|
|
201
207
|
e.odj = r;
|
|
202
208
|
break;
|
|
@@ -204,192 +210,192 @@ function h(e, t, o) {
|
|
|
204
210
|
}
|
|
205
211
|
}
|
|
206
212
|
}
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
|
|
213
|
+
if (i.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
|
|
214
|
+
const t = i.documentByUid[e.texteAdopteRef];
|
|
215
|
+
t !== void 0 && (e.texteAdopte = t, m(t, i, n));
|
|
210
216
|
}
|
|
211
|
-
if (
|
|
212
|
-
const
|
|
213
|
-
|
|
217
|
+
if (i.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
|
|
218
|
+
const t = i.documentByUid[e.texteAssocieRef];
|
|
219
|
+
t !== void 0 && (e.texteAssocie = t, m(t, i, n));
|
|
214
220
|
}
|
|
215
|
-
if (
|
|
216
|
-
for (const
|
|
217
|
-
const
|
|
218
|
-
|
|
221
|
+
if (i.documentByUid !== void 0 && e.textesAssocies !== void 0)
|
|
222
|
+
for (const t of e.textesAssocies) {
|
|
223
|
+
const o = i.documentByUid[t.texteAssocieRef];
|
|
224
|
+
o !== void 0 && (t.texteAssocie = o, m(o, i, n));
|
|
219
225
|
}
|
|
220
|
-
if (
|
|
221
|
-
const
|
|
222
|
-
for (const
|
|
223
|
-
const r =
|
|
224
|
-
r !== void 0 && (
|
|
226
|
+
if (i.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
|
|
227
|
+
const t = [];
|
|
228
|
+
for (const o of e.voteRefs) {
|
|
229
|
+
const r = i.scrutinByUid[o];
|
|
230
|
+
r !== void 0 && (t.push(r), U(r, i, n));
|
|
225
231
|
}
|
|
226
|
-
e.votes =
|
|
232
|
+
e.votes = t;
|
|
227
233
|
}
|
|
228
|
-
for (const
|
|
229
|
-
h(
|
|
234
|
+
for (const t of e.actesLegislatifs || [])
|
|
235
|
+
h(t, i, n);
|
|
230
236
|
}
|
|
231
237
|
return e;
|
|
232
238
|
}
|
|
233
|
-
function p(e,
|
|
234
|
-
if (!
|
|
235
|
-
for (const
|
|
236
|
-
const
|
|
237
|
-
for (const r of
|
|
238
|
-
const s =
|
|
239
|
-
s !== void 0 && (
|
|
239
|
+
function p(e, i, n) {
|
|
240
|
+
if (!n.has(e.uid) && (n.add(e.uid), i.organeByUid !== void 0))
|
|
241
|
+
for (const t of e.mandats || []) {
|
|
242
|
+
const o = [];
|
|
243
|
+
for (const r of t.organesRefs) {
|
|
244
|
+
const s = i.organeByUid[r];
|
|
245
|
+
s !== void 0 && (o.push(s), a(s, i, n));
|
|
240
246
|
}
|
|
241
|
-
|
|
247
|
+
t.organes = o;
|
|
242
248
|
}
|
|
243
249
|
return e;
|
|
244
250
|
}
|
|
245
|
-
function $(e,
|
|
246
|
-
if (!
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const r =
|
|
251
|
-
r !== void 0 && (
|
|
251
|
+
function $(e, i, n) {
|
|
252
|
+
if (!n.has(e.uid)) {
|
|
253
|
+
n.add(e.uid);
|
|
254
|
+
const t = e.signataires, o = t.auteur;
|
|
255
|
+
if (i.acteurByUid !== void 0 && o.acteurRef !== void 0) {
|
|
256
|
+
const r = i.acteurByUid[o.acteurRef];
|
|
257
|
+
r !== void 0 && (o.acteur = r, p(r, i, n));
|
|
252
258
|
}
|
|
253
|
-
if (
|
|
254
|
-
const r =
|
|
255
|
-
r !== void 0 && (
|
|
259
|
+
if (i.organeByUid !== void 0 && o.auteurRapporteurOrganeRef !== void 0) {
|
|
260
|
+
const r = i.organeByUid[o.auteurRapporteurOrganeRef];
|
|
261
|
+
r !== void 0 && (o.auteurRapporteurOrgane = r, a(r, i, n));
|
|
256
262
|
}
|
|
257
|
-
if (
|
|
258
|
-
const r =
|
|
259
|
-
r !== void 0 && (
|
|
263
|
+
if (i.organeByUid !== void 0 && o.gouvernementRef !== void 0) {
|
|
264
|
+
const r = i.organeByUid[o.gouvernementRef];
|
|
265
|
+
r !== void 0 && (o.gouvernement = r, a(r, i, n));
|
|
260
266
|
}
|
|
261
|
-
if (
|
|
262
|
-
const r =
|
|
263
|
-
r !== void 0 && (
|
|
267
|
+
if (i.organeByUid !== void 0 && o.groupePolitiqueRef !== void 0) {
|
|
268
|
+
const r = i.organeByUid[o.groupePolitiqueRef];
|
|
269
|
+
r !== void 0 && (o.groupePolitique = r, a(r, i, n));
|
|
264
270
|
}
|
|
265
|
-
if (
|
|
271
|
+
if (i.acteurByUid !== void 0 && t.cosignatairesRefs !== void 0) {
|
|
266
272
|
const s = [];
|
|
267
|
-
for (const l of
|
|
268
|
-
const f =
|
|
269
|
-
f !== void 0 && (s.push(f), p(f,
|
|
273
|
+
for (const l of t.cosignatairesRefs || []) {
|
|
274
|
+
const f = i.acteurByUid[l];
|
|
275
|
+
f !== void 0 && (s.push(f), p(f, i, n));
|
|
270
276
|
}
|
|
271
|
-
|
|
277
|
+
t.cosignataires = s;
|
|
272
278
|
}
|
|
273
279
|
}
|
|
274
280
|
return e;
|
|
275
281
|
}
|
|
276
|
-
function O(e,
|
|
277
|
-
for (const
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const r =
|
|
281
|
-
r !== void 0 && (
|
|
282
|
+
function O(e, i, n) {
|
|
283
|
+
for (const t of e.auteurs) {
|
|
284
|
+
const o = t.acteur;
|
|
285
|
+
if (i.acteurByUid !== void 0 && o !== void 0) {
|
|
286
|
+
const r = i.acteurByUid[o.acteurRef];
|
|
287
|
+
r !== void 0 && (o.acteur = r, p(r, i, n));
|
|
282
288
|
}
|
|
283
|
-
if (
|
|
284
|
-
const r =
|
|
285
|
-
r !== void 0 && (
|
|
289
|
+
if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
|
|
290
|
+
const r = i.organeByUid[t.organeRef];
|
|
291
|
+
r !== void 0 && (t.organe = r, a(r, i, n));
|
|
286
292
|
}
|
|
287
293
|
}
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
|
|
294
|
+
if (i.dossierByUid !== void 0) {
|
|
295
|
+
const t = i.dossierByUid[e.dossierRef];
|
|
296
|
+
t !== void 0 && (e.dossier = t, T(t, i, n));
|
|
291
297
|
}
|
|
292
|
-
for (const
|
|
293
|
-
O(
|
|
298
|
+
for (const t of e.divisions || [])
|
|
299
|
+
O(t, i, n);
|
|
294
300
|
return e;
|
|
295
301
|
}
|
|
296
|
-
function m(e,
|
|
297
|
-
if (!
|
|
298
|
-
|
|
299
|
-
for (const
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
302
|
-
const r =
|
|
303
|
-
r !== void 0 && (
|
|
302
|
+
function m(e, i, n) {
|
|
303
|
+
if (!n.has(e.uid)) {
|
|
304
|
+
n.add(e.uid);
|
|
305
|
+
for (const t of e.auteurs) {
|
|
306
|
+
const o = t.acteur;
|
|
307
|
+
if (i.acteurByUid !== void 0 && o !== void 0) {
|
|
308
|
+
const r = i.acteurByUid[o.acteurRef];
|
|
309
|
+
r !== void 0 && (o.acteur = r, p(r, i, n));
|
|
304
310
|
}
|
|
305
|
-
if (
|
|
306
|
-
const r =
|
|
307
|
-
r !== void 0 && (
|
|
311
|
+
if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
|
|
312
|
+
const r = i.organeByUid[t.organeRef];
|
|
313
|
+
r !== void 0 && (t.organe = r, a(r, i, n));
|
|
308
314
|
}
|
|
309
315
|
}
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
|
|
316
|
+
if (i.dossierByUid !== void 0) {
|
|
317
|
+
const t = i.dossierByUid[e.dossierRef];
|
|
318
|
+
t !== void 0 && (e.dossier = t, T(t, i, n));
|
|
313
319
|
}
|
|
314
|
-
for (const
|
|
315
|
-
O(
|
|
320
|
+
for (const t of e.divisions || [])
|
|
321
|
+
O(t, i, n);
|
|
316
322
|
}
|
|
317
323
|
return e;
|
|
318
324
|
}
|
|
319
|
-
function T(e,
|
|
320
|
-
if (!
|
|
321
|
-
|
|
322
|
-
for (const
|
|
323
|
-
h(
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
if (
|
|
327
|
-
for (const
|
|
328
|
-
const r =
|
|
329
|
-
if (r !== void 0 && (
|
|
325
|
+
function T(e, i, n) {
|
|
326
|
+
if (!n.has(e.uid)) {
|
|
327
|
+
n.add(e.uid);
|
|
328
|
+
for (const o of e.actesLegislatifs ?? [])
|
|
329
|
+
h(o, i, n);
|
|
330
|
+
const t = e.initiateur;
|
|
331
|
+
if (t !== void 0) {
|
|
332
|
+
if (i.acteurByUid !== void 0)
|
|
333
|
+
for (const o of t.acteurs || []) {
|
|
334
|
+
const r = i.acteurByUid[o.acteurRef];
|
|
335
|
+
if (r !== void 0 && (o.acteur = r, p(r, i, n)), r !== void 0 && o.mandatRef !== void 0) {
|
|
330
336
|
for (const s of r.mandats || [])
|
|
331
|
-
if (s.uid ===
|
|
332
|
-
|
|
337
|
+
if (s.uid === o.mandatRef) {
|
|
338
|
+
o.mandat = s;
|
|
333
339
|
break;
|
|
334
340
|
}
|
|
335
341
|
}
|
|
336
342
|
}
|
|
337
|
-
if (
|
|
338
|
-
const
|
|
339
|
-
|
|
343
|
+
if (i.organeByUid !== void 0 && t.organeRef !== void 0) {
|
|
344
|
+
const o = i.organeByUid[t.organeRef];
|
|
345
|
+
o !== void 0 && (t.organe = o, a(o, i, n));
|
|
340
346
|
}
|
|
341
347
|
}
|
|
342
348
|
}
|
|
343
349
|
return e;
|
|
344
350
|
}
|
|
345
|
-
function a(e,
|
|
346
|
-
if (!
|
|
347
|
-
if (
|
|
348
|
-
const
|
|
349
|
-
|
|
351
|
+
function a(e, i, n) {
|
|
352
|
+
if (!n.has(e.uid)) {
|
|
353
|
+
if (n.add(e.uid), i.organeByUid !== void 0 && e.organeParentRef !== void 0) {
|
|
354
|
+
const t = i.organeByUid[e.organeParentRef];
|
|
355
|
+
t !== void 0 && (e.organeParent = t, a(t, i, n));
|
|
350
356
|
}
|
|
351
|
-
if (
|
|
352
|
-
const
|
|
353
|
-
|
|
357
|
+
if (i.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
|
|
358
|
+
const t = i.organeByUid[e.organePrecedentRef];
|
|
359
|
+
t !== void 0 && (e.organePrecedent = t, a(t, i, n));
|
|
354
360
|
}
|
|
355
361
|
}
|
|
356
362
|
return e;
|
|
357
363
|
}
|
|
358
|
-
function E(e,
|
|
359
|
-
if (!
|
|
360
|
-
|
|
361
|
-
const
|
|
362
|
-
if (
|
|
363
|
-
if (
|
|
364
|
-
for (const
|
|
365
|
-
const r =
|
|
366
|
-
r !== void 0 && (
|
|
364
|
+
function E(e, i, n) {
|
|
365
|
+
if (!n.has(e.uid)) {
|
|
366
|
+
n.add(e.uid);
|
|
367
|
+
const t = e.demandeurs;
|
|
368
|
+
if (t !== void 0) {
|
|
369
|
+
if (i.acteurByUid !== void 0)
|
|
370
|
+
for (const o of t.acteurs || []) {
|
|
371
|
+
const r = i.acteurByUid[o.acteurRef];
|
|
372
|
+
r !== void 0 && (o.acteur = r, p(r, i, n));
|
|
367
373
|
}
|
|
368
|
-
if (
|
|
369
|
-
const
|
|
370
|
-
if (
|
|
371
|
-
const r =
|
|
372
|
-
r !== void 0 && (
|
|
374
|
+
if (i.organeByUid !== void 0) {
|
|
375
|
+
const o = t.organe;
|
|
376
|
+
if (o !== void 0) {
|
|
377
|
+
const r = i.organeByUid[o.organeRef];
|
|
378
|
+
r !== void 0 && (o.organe = r, a(r, i, n));
|
|
373
379
|
}
|
|
374
380
|
}
|
|
375
381
|
}
|
|
376
|
-
if (
|
|
377
|
-
const
|
|
378
|
-
|
|
382
|
+
if (i.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
|
|
383
|
+
const o = i.organeByUid[e.organeReuniRef];
|
|
384
|
+
o !== void 0 && (e.organeReuni = o, a(o, i, n));
|
|
379
385
|
}
|
|
380
|
-
if (
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
383
|
-
for (const r of
|
|
384
|
-
const s =
|
|
385
|
-
s !== void 0 && (r.acteur = s, p(s,
|
|
386
|
+
if (i.acteurByUid !== void 0) {
|
|
387
|
+
const o = e.participants;
|
|
388
|
+
if (o !== void 0)
|
|
389
|
+
for (const r of o.participantsInternes || []) {
|
|
390
|
+
const s = i.acteurByUid[r.acteurRef];
|
|
391
|
+
s !== void 0 && (r.acteur = s, p(s, i, n));
|
|
386
392
|
}
|
|
387
393
|
}
|
|
388
394
|
}
|
|
389
395
|
return e;
|
|
390
396
|
}
|
|
391
|
-
function U(e,
|
|
392
|
-
return
|
|
397
|
+
function U(e, i, n) {
|
|
398
|
+
return n.has(e.uid) || n.add(e.uid), e;
|
|
393
399
|
}
|
|
394
400
|
function V(e) {
|
|
395
401
|
if (e == null)
|
|
@@ -404,7 +410,7 @@ function V(e) {
|
|
|
404
410
|
}
|
|
405
411
|
}
|
|
406
412
|
var B = /* @__PURE__ */ ((e) => (e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e))(B || {});
|
|
407
|
-
const
|
|
413
|
+
const b = {
|
|
408
414
|
ACIN: {
|
|
409
415
|
directory: "projets",
|
|
410
416
|
prefix: "pl",
|
|
@@ -516,7 +522,7 @@ const D = {
|
|
|
516
522
|
suffix: "-a0"
|
|
517
523
|
}
|
|
518
524
|
};
|
|
519
|
-
function
|
|
525
|
+
function D(e) {
|
|
520
526
|
switch (e) {
|
|
521
527
|
case "html":
|
|
522
528
|
return ".asp";
|
|
@@ -526,8 +532,8 @@ function b(e) {
|
|
|
526
532
|
return ".asp";
|
|
527
533
|
}
|
|
528
534
|
}
|
|
529
|
-
function* X(e,
|
|
530
|
-
if (
|
|
535
|
+
function* X(e, i = void 0, n = !1) {
|
|
536
|
+
if (i === void 0 || i === "raw-html") {
|
|
531
537
|
yield {
|
|
532
538
|
format: "raw-html",
|
|
533
539
|
type: "dyn-opendata",
|
|
@@ -537,30 +543,30 @@ function* X(e, t = void 0, o = !1) {
|
|
|
537
543
|
type: "dyn-docs",
|
|
538
544
|
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
|
|
539
545
|
};
|
|
540
|
-
const
|
|
546
|
+
const t = y(
|
|
541
547
|
e,
|
|
542
548
|
"raw-html",
|
|
543
|
-
|
|
549
|
+
n
|
|
544
550
|
);
|
|
545
|
-
|
|
551
|
+
t !== null && (yield {
|
|
546
552
|
format: "raw-html",
|
|
547
|
-
type:
|
|
548
|
-
url:
|
|
553
|
+
type: t.directory.replaceAll("/", "-"),
|
|
554
|
+
url: t.url
|
|
549
555
|
});
|
|
550
556
|
}
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
557
|
+
if (i === void 0 || i === "html") {
|
|
558
|
+
const t = y(
|
|
553
559
|
e,
|
|
554
560
|
"html",
|
|
555
|
-
|
|
561
|
+
n
|
|
556
562
|
);
|
|
557
|
-
|
|
563
|
+
t !== null && (yield {
|
|
558
564
|
format: "html",
|
|
559
|
-
type:
|
|
560
|
-
url:
|
|
565
|
+
type: t.directory.replaceAll("/", "-"),
|
|
566
|
+
url: t.url
|
|
561
567
|
});
|
|
562
568
|
}
|
|
563
|
-
if (
|
|
569
|
+
if (i === void 0 || i === "pdf") {
|
|
564
570
|
yield {
|
|
565
571
|
format: "raw-html",
|
|
566
572
|
type: "dyn-opendata",
|
|
@@ -570,65 +576,65 @@ function* X(e, t = void 0, o = !1) {
|
|
|
570
576
|
type: "dyn-docs",
|
|
571
577
|
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
|
|
572
578
|
};
|
|
573
|
-
const
|
|
579
|
+
const t = y(
|
|
574
580
|
e,
|
|
575
581
|
"pdf"
|
|
576
582
|
/* Pdf */
|
|
577
583
|
);
|
|
578
|
-
|
|
584
|
+
t !== null && (yield {
|
|
579
585
|
format: "pdf",
|
|
580
|
-
type:
|
|
581
|
-
url:
|
|
586
|
+
type: t.directory.replaceAll("/", "-"),
|
|
587
|
+
url: t.url
|
|
582
588
|
});
|
|
583
589
|
}
|
|
584
590
|
}
|
|
585
|
-
function w(e,
|
|
586
|
-
const
|
|
587
|
-
return
|
|
591
|
+
function w(e, i) {
|
|
592
|
+
const n = y(e, i);
|
|
593
|
+
return n === null ? null : n.url;
|
|
588
594
|
}
|
|
589
595
|
function q(e) {
|
|
590
|
-
const
|
|
591
|
-
if (
|
|
596
|
+
const i = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
|
|
597
|
+
if (i === null)
|
|
592
598
|
return console.log(
|
|
593
599
|
`Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`
|
|
594
600
|
), null;
|
|
595
|
-
const
|
|
596
|
-
return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${
|
|
601
|
+
const n = i[2], t = i[3];
|
|
602
|
+
return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${n}/(num)/${t}`;
|
|
597
603
|
}
|
|
598
|
-
function y(e,
|
|
599
|
-
const
|
|
604
|
+
function y(e, i, n = !1) {
|
|
605
|
+
const t = D(i), o = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(
|
|
600
606
|
e.uid
|
|
601
607
|
);
|
|
602
|
-
if (
|
|
603
|
-
return
|
|
608
|
+
if (o === null)
|
|
609
|
+
return n && console.log(
|
|
604
610
|
`Unable to generate URL from document or division with unexpected UID: "${e.uid}"`
|
|
605
611
|
), null;
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
612
|
+
if (o[2] === "SN")
|
|
613
|
+
return n && console.log(
|
|
608
614
|
`Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`
|
|
609
615
|
), null;
|
|
610
|
-
const s =
|
|
611
|
-
let l =
|
|
612
|
-
if (
|
|
616
|
+
const s = o[5];
|
|
617
|
+
let l = o[7];
|
|
618
|
+
if (i === "raw-html")
|
|
613
619
|
return {
|
|
614
620
|
directory: "textes",
|
|
615
|
-
url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${
|
|
621
|
+
url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${t}`
|
|
616
622
|
};
|
|
617
623
|
let f = {
|
|
618
624
|
BTC: "TCOM",
|
|
619
625
|
BTA: "TADO",
|
|
620
626
|
TAP: "TADO"
|
|
621
|
-
}[
|
|
627
|
+
}[o[6]] || o[1];
|
|
622
628
|
e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (l = l.replace(/-COMPA/, "-aCOMPA")), f == "AVCE" && (f = `AVCE${e.classification.famille?.classe.code}`);
|
|
623
|
-
const d =
|
|
629
|
+
const d = b[f];
|
|
624
630
|
if (d === void 0)
|
|
625
|
-
return
|
|
631
|
+
return n && console.log(
|
|
626
632
|
`Unable to generate URL from document or division of UID "${e.uid}" and type "${f}"`
|
|
627
633
|
), null;
|
|
628
|
-
const g =
|
|
634
|
+
const g = i === "pdf" ? `pdf/${d.directory}` : d.directory;
|
|
629
635
|
return {
|
|
630
636
|
directory: g,
|
|
631
|
-
url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${
|
|
637
|
+
url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${t}`
|
|
632
638
|
};
|
|
633
639
|
}
|
|
634
640
|
export {
|
|
@@ -644,15 +650,15 @@ export {
|
|
|
644
650
|
Ee as CodeTypeOrganeSchema,
|
|
645
651
|
Ue as CodeTypeVoteSchema,
|
|
646
652
|
Be as DecisionSchema,
|
|
647
|
-
|
|
653
|
+
be as DepNaisSchema,
|
|
648
654
|
H as DivisionTypeSchema,
|
|
649
655
|
B as DocumentUrlFormat,
|
|
650
|
-
|
|
656
|
+
De as EtatSchema,
|
|
651
657
|
R as Facet,
|
|
652
|
-
|
|
658
|
+
Le as FamSocProEnumSchema,
|
|
653
659
|
x as FinalStatus,
|
|
654
660
|
S as Follow,
|
|
655
|
-
|
|
661
|
+
Ie as FormatReunionSchema,
|
|
656
662
|
Ne as LibelleSchema,
|
|
657
663
|
Me as LibelleSortScrutinSchema,
|
|
658
664
|
je as LibelleTypeVoteSchema,
|
|
@@ -683,8 +689,8 @@ export {
|
|
|
683
689
|
K as accordGouvernementDepotHorsDelaiOptions,
|
|
684
690
|
ri as acteLegislatifXsiTypeOptions,
|
|
685
691
|
Z as actionOptions,
|
|
686
|
-
|
|
687
|
-
|
|
692
|
+
L as allFacets,
|
|
693
|
+
I as allFollows,
|
|
688
694
|
ee as avantAApresOptions,
|
|
689
695
|
N as capitalizeFirstLetter,
|
|
690
696
|
si as causePositionVoteOptions,
|
|
@@ -736,11 +742,11 @@ export {
|
|
|
736
742
|
ye as localIso8601StringFromDate,
|
|
737
743
|
Ui as mandatXsiTypeOptions,
|
|
738
744
|
Bi as modePublicationDesVotesOptions,
|
|
739
|
-
|
|
740
|
-
|
|
745
|
+
bi as natureTravauxOdjOptions,
|
|
746
|
+
Di as organeXsiTypeOptions,
|
|
741
747
|
ge as patchedDateToJson,
|
|
742
|
-
|
|
743
|
-
|
|
748
|
+
Li as personneAuditionneeXsiTypeOptions,
|
|
749
|
+
Ii as pointOdjXsiTypeOptions,
|
|
744
750
|
Ni as positionMajoritaireOptions,
|
|
745
751
|
Mi as positionPolitiqueOptions,
|
|
746
752
|
ji as presenceOptions,
|