@tricoteuses/assemblee 3.2.7 → 3.2.8
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/lib/{amendements-BXPskmEj.js → amendements-CudMDSl9.js} +1 -1
- package/lib/{amendements-DvACs8jj.js → amendements-NUU1Ei_X.js} +5 -5
- package/lib/cleaners.js +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +133 -122
- package/lib/{loaders-Dd4mhFYb.js → loaders-Do7OTkWb.js} +2 -2
- package/lib/loaders.js +1 -1
- package/lib/parsers.js +2 -2
- package/lib/{scrutins-Dgargfhk.js → scrutins-vscL0izO.js} +1 -1
- package/lib/urls.d.ts +2 -0
- package/lib/urls.test.d.ts +1 -0
- package/package.json +4 -2
|
@@ -664,7 +664,7 @@ var x = {
|
|
|
664
664
|
night: "night"
|
|
665
665
|
}, be = {
|
|
666
666
|
G: function(e, t, n) {
|
|
667
|
-
let r = e.getFullYear() > 0
|
|
667
|
+
let r = +(e.getFullYear() > 0);
|
|
668
668
|
switch (t) {
|
|
669
669
|
case "G":
|
|
670
670
|
case "GG":
|
|
@@ -1564,7 +1564,7 @@ function $e(e) {
|
|
|
1564
1564
|
return typeof e == "function" && e.prototype?.constructor === e;
|
|
1565
1565
|
}
|
|
1566
1566
|
//#endregion
|
|
1567
|
-
//#region \0@oxc-project+runtime@0.
|
|
1567
|
+
//#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
|
|
1568
1568
|
function O(e) {
|
|
1569
1569
|
"@babel/helpers - typeof";
|
|
1570
1570
|
return O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -1574,7 +1574,7 @@ function O(e) {
|
|
|
1574
1574
|
}, O(e);
|
|
1575
1575
|
}
|
|
1576
1576
|
//#endregion
|
|
1577
|
-
//#region \0@oxc-project+runtime@0.
|
|
1577
|
+
//#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
|
|
1578
1578
|
function et(e, t) {
|
|
1579
1579
|
if (O(e) != "object" || !e) return e;
|
|
1580
1580
|
var n = e[Symbol.toPrimitive];
|
|
@@ -1586,13 +1586,13 @@ function et(e, t) {
|
|
|
1586
1586
|
return (t === "string" ? String : Number)(e);
|
|
1587
1587
|
}
|
|
1588
1588
|
//#endregion
|
|
1589
|
-
//#region \0@oxc-project+runtime@0.
|
|
1589
|
+
//#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
|
|
1590
1590
|
function tt(e) {
|
|
1591
1591
|
var t = et(e, "string");
|
|
1592
1592
|
return O(t) == "symbol" ? t : t + "";
|
|
1593
1593
|
}
|
|
1594
1594
|
//#endregion
|
|
1595
|
-
//#region \0@oxc-project+runtime@0.
|
|
1595
|
+
//#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
|
|
1596
1596
|
function k(e, t, n) {
|
|
1597
1597
|
return (t = tt(t)) in e ? Object.defineProperty(e, t, {
|
|
1598
1598
|
value: n,
|
package/lib/cleaners.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Tt as e, Xn as t, rr as n } from "./scrutins-
|
|
2
|
-
import { i as r, n as i, r as a, t as o } from "./amendements-
|
|
3
|
-
import "./loaders-
|
|
1
|
+
import { Tt as e, Xn as t, rr as n } from "./scrutins-vscL0izO.js";
|
|
2
|
+
import { i as r, n as i, r as a, t as o } from "./amendements-CudMDSl9.js";
|
|
3
|
+
import "./loaders-Do7OTkWb.js";
|
|
4
4
|
import s from "node:assert";
|
|
5
5
|
import "fs-extra";
|
|
6
6
|
import "node:path";
|
package/lib/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { questionXsiTypeOptions, QuestionXsiTypeSchema, type QuestionXsiType, ty
|
|
|
13
13
|
export { causePositionVoteOptions, CausePositionVoteSchema, type CausePositionVote, codeSortScrutinOptions, CodeSortScrutinSchema, type CodeSortScrutin, codeTypeVoteOptions, CodeTypeVoteSchema, type CodeTypeVote, libelleSortScrutinOptions, LibelleSortScrutinSchema, type LibelleSortScrutin, libelleTypeVoteOptions, LibelleTypeVoteSchema, type LibelleTypeVote, lieuVoteOptions, LieuVoteSchema, type LieuVote, modePublicationDesVotesOptions, ModePublicationDesVotesSchema, type ModePublicationDesVotes, positionMajoritaireOptions, PositionMajoritaireSchema, type PositionMajoritaire, typeMajoriteOptions, TypeMajoriteSchema, type TypeMajorite, } from './schemas/raw/scrutins.js';
|
|
14
14
|
export { capitalizeFirstLetter, uncapitalizeFirstLetter } from './strings.js';
|
|
15
15
|
export { compteRenduUidRegex, documentUidRegex, dossierUidRegex, questionUidRegex, reunionUidRegex, scrutinUidRegex, } from './uids.js';
|
|
16
|
-
export { DocumentUrlFormat, iterDocumentOrDivisionUrls, urlFromDocument, urlFromScrutin, } from './urls.js';
|
|
16
|
+
export { type AmendementUrlFormat, DocumentUrlFormat, iterDocumentOrDivisionUrls, urlFromAmendementUid, urlFromDocument, urlFromScrutin, } from './urls.js';
|
|
17
17
|
export { type ActeurClean as Acteur, ActeurCleanSchema as ActeurSchema, type AdresseClean as Adresse, AdresseCleanSchema as AdresseSchema, type CibleClean as Cible, CibleCleanSchema as CibleSchema, type CollaborateurClean as Collaborateur, CollaborateurCleanSchema as CollaborateurSchema, type DepartementClean as Departement, DepartementCleanSchema as DepartementSchema, type DeportClean as Deport, DeportCleanSchema as DeportSchema, type ElectionClean as Election, ElectionCleanSchema as ElectionSchema, type EtatCivilClean as EtatCivil, EtatCivilCleanSchema as EtatCivilSchema, type IdentClean as Ident, IdentCleanSchema as IdentSchema, type InfoNaissanceClean as InfoNaissance, InfoNaissanceCleanSchema as InfoNaissanceSchema, type InfosQualiteClean as InfosQualite, InfosQualiteCleanSchema as InfosQualiteSchema, type MandatClean as Mandat, MandatCleanSchema as MandatSchema, type MandatureClean as Mandature, MandatureCleanSchema as MandatureSchema, type OrganeClean as Organe, OrganeCleanSchema as OrganeSchema, type OrganeLieuClean as OrganeLieu, OrganeLieuCleanSchema as OrganeLieuSchema, type PhotoClean as Photo, PhotoCleanSchema as PhotoSchema, type ProfessionClean as Profession, ProfessionCleanSchema as ProfessionSchema, type RegionClean as Region, RegionCleanSchema as RegionSchema, type SecretariatClean as Secretariat, SecretariatCleanSchema as SecretariatSchema, type SocProcInseeClean as SocProcInsee, SocProcInseeCleanSchema as SocProcInseeSchema, type SuppleantClean as Suppleant, SuppleantCleanSchema as SuppleantSchema, type ViMoDeClean as ViMoDe, ViMoDeCleanSchema as ViMoDeSchema, } from './schemas/clean/acteurs_et_organes.js';
|
|
18
18
|
export { etatCycleDeVieOptions, personneAuditionneeXsiTypeOptions, PersonneAuditionneeXsiTypeSchema, type ChronoClean as Chrono, ChronoCleanSchema as ChronoSchema, type CycleDeVieClean as CycleDeVieReunion, CycleDeVieCleanSchema as CycleDeVieReunionSchema, type DemandeurActeurClean as DemandeurActeur, DemandeurActeurCleanSchema as DemandeurActeurSchema, type DemandeurOrganeClean as DemandeurOrgane, DemandeurOrganeCleanSchema as DemandeurOrganeSchema, type DemandeursClean as Demandeurs, DemandeursCleanSchema as DemandeursSchema, type EtatCycleDeVie, type IdentifiantsClean as Identifiants, IdentifiantsCleanSchema as IdentifiantsSchema, type IdentPersonneAuditionneeClean as IdentPersonneAuditionnee, IdentPersonneAuditionneeCleanSchema as IdentPersonneAuditionneeSchema, type InfosReunionsInternationaleClean as InfosReunionsInternationale, InfosReunionsInternationaleCleanSchema as InfosReunionsInternationaleSchema, type LieuReunionClean as LieuReunion, LieuReunionCleanSchema as LieuReunionSchema, type OdjClean as Odj, OdjCleanSchema as OdjSchema, type ParticipantInterneClean as ParticipantInterne, ParticipantInterneCleanSchema as ParticipantInterneSchema, type ParticipantsClean as Participants, ParticipantsCleanSchema as ParticipantsSchema, type PersonneAuditionneeClean as PersonneAuditionnee, PersonneAuditionneeCleanSchema as PersonneAuditionneeSchema, type PersonneAuditionneeXsiType, type PointOdjClean as PointOdj, PointOdjCleanSchema as PointOdjSchema, type ReunionClean as Reunion, ReunionCleanSchema as ReunionSchema, } from './schemas/clean/agendas.js';
|
|
19
19
|
export { avantAApresOptions, etatAmendementCodeOptions, etatAmendementLibelleOptions, sortAmendementOptions, typeMimeNomOptions, typeMimeTypeOptions, type AlineaClean as Alinea, AlineaCleanSchema as AlineaSchema, type AmendementClean as Amendement, AmendementCleanSchema as AmendementSchema, type AmendementsClean as Amendements, AmendementsCleanSchema as AmendementsSchema, AmendementsCleanConvert as AmendementsConvert, type AuteurAmendementClean as AuteurAmendement, AuteurAmendementCleanSchema as AuteurAmendementSchema, type AvantAApres, type AvantAppelClean as AvantAppel, AvantAppelCleanSchema as AvantAppelSchema, type ContenuAmendementClean as ContenuAmendement, ContenuAmendementCleanSchema as ContenuAmendementSchema, type ContenuAuteurClean as ContenuAuteur, ContenuAuteurCleanSchema as ContenuAuteurSchema, type CorpsAmendementClean as CorpsAmendement, CorpsAmendementCleanSchema as CorpsAmendementSchema, type CycleDeVieClean as CycleDeVie, CycleDeVieCleanSchema as CycleDeVieSchema, type DiscussionClean as Discussion, DiscussionCleanSchema as DiscussionSchema, type DispositifAmdtCreditPLFClean as DispositifAmdtCreditPLF, DispositifAmdtCreditPLFCleanSchema as DispositifAmdtCreditPLFSchema, type DispositifAmdtCreditPLFRClean as DispositifAmdtCreditPLFR, DispositifAmdtCreditPLFRCleanSchema as DispositifAmdtCreditPLFRSchema, type DivisionClean as PointeurFragmentTexteDivision, DivisionCleanSchema as PointeurFragmentTexteDivisionSchema, type EtatAmendementClean as EtatAmendement, EtatAmendementCleanSchema as EtatAmendementSchema, type EtatAmendementCode, type EtatAmendementLibelle, type EtatDesTraitementsClean as EtatDesTraitements, EtatDesTraitementsCleanSchema as EtatDesTraitementsSchema, type IdentificationClean as Identification, IdentificationCleanSchema as IdentificationSchema, type LigneCreditPLFClean as LigneCreditPLF, LigneCreditPLFCleanSchema as LigneCreditPLFSchema, type LigneCreditPLFRClean as LigneCreditPLFR, LigneCreditPLFRCleanSchema as LigneCreditPLFRSchema, type LoiReferenceClean as LoiReference, LoiReferenceCleanSchema as LoiReferenceSchema, type MissionViseeClean as MissionVisee, MissionViseeCleanSchema as MissionViseeSchema, type PointeurFragmentTexteClean as PointeurFragmentTexte, PointeurFragmentTexteCleanSchema as PointeurFragmentTexteSchema, type ProgrammePlfClean as ProgrammePlf, ProgrammePlfCleanSchema as ProgrammePlfSchema, type RepresentationClean as Representation, RepresentationCleanSchema as RepresentationSchema, type SignatairesClean as Signataires, SignatairesCleanSchema as SignatairesSchema, type SortAmendement, type SousEtatAmendementClean as SousEtatAmendement, SousEtatAmendementCleanSchema as SousEtatAmendementSchema, type StatutRepresentationClean as StatutRepresentation, StatutRepresentationCleanSchema as StatutRepresentationSchema, type TexteLegislatifClean as TexteLegislatif, TexteLegislatifCleanSchema as TexteLegislatifSchema, type TotalClean as Total, TotalCleanSchema as TotalSchema, type TypeMimeClean as TypeMime, TypeMimeCleanSchema as TypeMimeSchema, type TypeMimeNom, type TypeMimeType, } from './schemas/clean/amendements.js';
|
package/lib/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as ee, L as te, M as ne, N as re, O as ie, P as ae, R as oe, S as se, T as ce, U as le, V as ue, W as de, _ as fe, a as pe, at as me, b as he, c as ge, ct as _e, d as ve, dt as ye, f as be, ft as xe, g as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as ee, L as te, M as ne, N as re, O as ie, P as ae, R as oe, S as se, T as ce, U as le, V as ue, W as de, _ as fe, a as pe, at as me, b as he, c as ge, ct as _e, d as ve, dt as ye, f as be, ft as xe, g as Se, h as u, ht as d, i as f, it as p, j as m, k as h, l as g, lt as _, m as v, mt as y, n as b, o as x, ot as S, p as C, pt as w, q as T, r as E, s as D, st as O, t as k, u as A, ut as j, v as Ce, w as we, x as Te, y as Ee, z as De } from "./amendements-NUU1Ei_X.js";
|
|
2
|
+
import { $ as Oe, $n as ke, $t as Ae, A as je, An as Me, Ar as Ne, At as Pe, B as Fe, Bn as Ie, Br as Le, Bt as Re, C as ze, Cn as Be, Cr as Ve, Ct as He, D as Ue, Dn as We, Dr as Ge, E as Ke, En as qe, Er as Je, Et as Ye, F as Xe, Fn as Ze, Fr as Qe, Ft as $e, G as et, Gn as tt, Gr as nt, Gt as rt, H as it, Hn as at, Hr as ot, Ht as st, I as ct, In as lt, Ir as ut, It as dt, J as ft, Jn as pt, Jr as mt, Jt as ht, K as gt, Kn as _t, Kr as vt, Kt as yt, L as bt, Ln as xt, Lr as St, Lt as Ct, M as wt, Mn as Tt, Mr as Et, Mt as Dt, N as Ot, Nn as kt, Nr as At, Nt as jt, On as Mt, Or as Nt, Ot as Pt, P as Ft, Pn as It, Pr as Lt, Pt as Rt, Qn as zt, Qt as Bt, R as Vt, Rn as Ht, Rr as Ut, S as Wt, Sn as Gt, Sr as Kt, St as qt, T as Jt, Tn as Yt, Tr as Xt, Tt as Zt, U as Qt, Un as $t, Ur as en, Ut as tn, V as nn, Vn as rn, Vr as an, Vt as on, W as sn, Wn as cn, Wr as ln, Wt as un, X as dn, Xt as fn, Y as pn, Yn as mn, Yr as hn, Yt as gn, Z as _n, Zn as vn, Zr as yn, Zt as bn, _ as xn, _n as Sn, _r as Cn, _t as wn, a as M, an as Tn, ar as En, at as Dn, b as On, bn as kn, br as An, bt as jn, c as Mn, cn as Nn, cr as Pn, ct as Fn, d as In, dn as Ln, dr as Rn, dt as zn, en as Bn, er as Vn, et as Hn, f as Un, fn as Wn, fr as Gn, ft as Kn, g as qn, gn as Jn, gr as Yn, gt as Xn, h as Zn, hn as Qn, hr as $n, ht as er, i as tr, ir as nr, it as rr, j as ir, jn as ar, jr as or, jt as sr, k as cr, kn as lr, kr as ur, kt as dr, ln as fr, lr as pr, lt as mr, m as hr, mn as gr, mr as _r, mt as vr, n as yr, nn as br, nr as xr, nt as Sr, o as Cr, on as wr, or as Tr, ot as Er, p as Dr, pn as Or, pr as kr, pt as Ar, q as jr, qn as Mr, qr as Nr, qt as Pr, r as Fr, rn as Ir, rt as Lr, s as Rr, sn as zr, sr as Br, st as Vr, t as Hr, tn as Ur, tr as Wr, tt as Gr, u as Kr, un as qr, ur as Jr, ut as Yr, v as Xr, vn as Zr, vr as Qr, vt as $r, w as ei, wn as ti, wr as ni, wt as ri, x as ii, xn as ai, xr as oi, xt as si, y as ci, yn as li, yr as ui, yt as di, z as fi, zn as pi, zr as mi, zt as hi } from "./scrutins-vscL0izO.js";
|
|
3
3
|
//#region src/api.ts
|
|
4
|
-
var
|
|
4
|
+
var N = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.Amendements = "amendements", e;
|
|
6
|
-
}({}),
|
|
6
|
+
}({}), gi = Object.values(N), P = /* @__PURE__ */ function(e) {
|
|
7
7
|
return 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;
|
|
8
|
-
}({}),
|
|
8
|
+
}({}), _i = Object.values(P);
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/strings.ts
|
|
11
|
-
function
|
|
11
|
+
function vi(e) {
|
|
12
12
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function F(e) {
|
|
15
15
|
return e.charAt(0).toLowerCase() + e.slice(1);
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/dossiers_legislatifs.ts
|
|
19
|
-
var
|
|
19
|
+
var I = /* @__PURE__ */ function(e) {
|
|
20
20
|
return e.Failure = "FAILURE", e.Success = "SUCCESS", e;
|
|
21
|
-
}({}),
|
|
21
|
+
}({}), L = /* @__PURE__ */ function(e) {
|
|
22
22
|
return e.Failure = "FAILURE", e.InProgress = "IN_PROGRESS", e.Success = "SUCCESS", e;
|
|
23
23
|
}({});
|
|
24
|
-
function
|
|
24
|
+
function yi(e) {
|
|
25
25
|
if (e.actesLegislatifs !== void 0) {
|
|
26
|
-
for (let t of
|
|
26
|
+
for (let t of V(e.actesLegislatifs)) if (t.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && t.organeRef !== void 0 && t.organeRef !== "PO211494") return t.organeRef;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function R(e) {
|
|
30
30
|
switch (e) {
|
|
31
31
|
case "Accord":
|
|
32
32
|
case "adopté":
|
|
@@ -37,76 +37,76 @@ function z(e) {
|
|
|
37
37
|
case "Conforme":
|
|
38
38
|
case "considérée comme définitive en application de l'article 151-7 du Règlement":
|
|
39
39
|
case "considérée comme définitive en application de l'article 151-9 du Règlement":
|
|
40
|
-
case "Motion adopté(e)": return
|
|
40
|
+
case "Motion adopté(e)": return L.Success;
|
|
41
41
|
case "Désaccord":
|
|
42
42
|
case "Motion rejeté(e)":
|
|
43
43
|
case "rejeté":
|
|
44
|
-
case "rejetée": return
|
|
44
|
+
case "rejetée": return L.Failure;
|
|
45
45
|
case "adopté avec modifications":
|
|
46
46
|
case "adoptée avec modifications":
|
|
47
47
|
case "De droit (article 61 alinéa 1 de la Constitution)":
|
|
48
48
|
case "modifié":
|
|
49
49
|
case "modifiée":
|
|
50
50
|
case "Motion de censure 49-2":
|
|
51
|
-
case "Partiellement conforme": return
|
|
51
|
+
case "Partiellement conforme": return L.InProgress;
|
|
52
52
|
case "Soixante députés au moins":
|
|
53
53
|
case "Soixante sénateurs au moins": return "CONSTITU";
|
|
54
|
-
default: return
|
|
54
|
+
default: return L.InProgress;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function z(e, t) {
|
|
58
58
|
let n = t[t.length - 1], r;
|
|
59
59
|
switch (n.xsiType) {
|
|
60
60
|
case "Adoption_Europe_Type": {
|
|
61
61
|
let e = n.statutAdoption.libelle;
|
|
62
62
|
return e === void 0 ? null : {
|
|
63
|
-
currentStatus:
|
|
64
|
-
label:
|
|
63
|
+
currentStatus: R(e),
|
|
64
|
+
label: F(e)
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
case "ConclusionEtapeCC_Type": {
|
|
68
68
|
let e = n.statutConclusion.libelle;
|
|
69
69
|
return e === void 0 ? null : {
|
|
70
|
-
currentStatus:
|
|
71
|
-
label:
|
|
70
|
+
currentStatus: R(e),
|
|
71
|
+
label: F(e)
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
case "Decision_Type": {
|
|
75
75
|
let t = n.statutConclusion.libelle;
|
|
76
76
|
if (t === void 0) return null;
|
|
77
|
-
let r =
|
|
77
|
+
let r = R(t), i;
|
|
78
78
|
switch (e.procedureParlementaire.code) {
|
|
79
79
|
case "PROCEDURE_PARLEMENTAIRE_2":
|
|
80
|
-
["rejeté", "rejetée"].includes(t) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (i =
|
|
80
|
+
["rejeté", "rejetée"].includes(t) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (i = I.Failure);
|
|
81
81
|
break;
|
|
82
82
|
case "PROCEDURE_PARLEMENTAIRE_8":
|
|
83
83
|
case "PROCEDURE_PARLEMENTAIRE_22":
|
|
84
|
-
r ===
|
|
84
|
+
r === L.Success ? i = I.Success : r === L.Failure && (i = I.Failure);
|
|
85
85
|
break;
|
|
86
86
|
default: break;
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
currentStatus: r,
|
|
90
90
|
finalStatus: i,
|
|
91
|
-
label:
|
|
91
|
+
label: F(t)
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
case "DecisionMotionCensure_Type": return r = n.decision.libelle, r === void 0 ? null : {
|
|
95
|
-
currentStatus:
|
|
96
|
-
finalStatus: e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && r === "Motion rejeté(e)" ?
|
|
97
|
-
label:
|
|
95
|
+
currentStatus: R(r),
|
|
96
|
+
finalStatus: e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && r === "Motion rejeté(e)" ? I.Failure : I.Success,
|
|
97
|
+
label: F(r)
|
|
98
98
|
};
|
|
99
99
|
case "DecisionRecevabiliteBureau_Type": return r = n.decision.libelle, r === void 0 ? null : {
|
|
100
|
-
currentStatus:
|
|
101
|
-
label:
|
|
100
|
+
currentStatus: R(r),
|
|
101
|
+
label: F(r)
|
|
102
102
|
};
|
|
103
103
|
case "DeclarationGouvernement_Type": return r = n.typeDeclaration.libelle, r === void 0 ? null : {
|
|
104
|
-
currentStatus:
|
|
105
|
-
label:
|
|
104
|
+
currentStatus: R(r),
|
|
105
|
+
label: F(r)
|
|
106
106
|
};
|
|
107
107
|
case "DepotMotionCensure_Type": return r = n.typeMotionCensure.libelle, r === void 0 ? null : {
|
|
108
|
-
currentStatus:
|
|
109
|
-
label:
|
|
108
|
+
currentStatus: R(r),
|
|
109
|
+
label: F(r)
|
|
110
110
|
};
|
|
111
111
|
case "DepotRapport_Type": return [
|
|
112
112
|
"DossierCommissionEnquete_Type",
|
|
@@ -114,74 +114,74 @@ function B(e, t) {
|
|
|
114
114
|
"DossierMissionInformation_Type"
|
|
115
115
|
].includes(e.xsiType) ? {
|
|
116
116
|
currentStatus: t[0].organe.codeType,
|
|
117
|
-
finalStatus:
|
|
117
|
+
finalStatus: I.Success,
|
|
118
118
|
label: "rapport déposé"
|
|
119
119
|
} : null;
|
|
120
120
|
case "MotionProcedure_Type": return r = n.typeMotion.libelle, r === void 0 ? null : {
|
|
121
|
-
currentStatus:
|
|
122
|
-
label:
|
|
121
|
+
currentStatus: R(r),
|
|
122
|
+
label: F(r)
|
|
123
123
|
};
|
|
124
124
|
case "Promulgation_Type": return {
|
|
125
|
-
currentStatus:
|
|
126
|
-
finalStatus:
|
|
125
|
+
currentStatus: L.Success,
|
|
126
|
+
finalStatus: I.Success,
|
|
127
127
|
label: "promulgué"
|
|
128
128
|
};
|
|
129
129
|
case "RetraitInitiative_Type": return {
|
|
130
|
-
currentStatus:
|
|
131
|
-
finalStatus:
|
|
130
|
+
currentStatus: L.Failure,
|
|
131
|
+
finalStatus: I.Failure,
|
|
132
132
|
label: "retiré"
|
|
133
133
|
};
|
|
134
134
|
case "SaisineConseilConstit_Type": return r = n.casSaisine.libelle, r === void 0 ? null : {
|
|
135
|
-
currentStatus:
|
|
136
|
-
label:
|
|
135
|
+
currentStatus: R(r),
|
|
136
|
+
label: F(r)
|
|
137
137
|
};
|
|
138
138
|
default: return null;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function B(e, t, n) {
|
|
142
142
|
if (n !== void 0) for (let r of [...n].reverse()) {
|
|
143
|
-
let n = r.actesLegislatifs ?
|
|
143
|
+
let n = r.actesLegislatifs ? B(e, [...t, r], r.actesLegislatifs) : z(e, [...t, r]);
|
|
144
144
|
if (n !== null) return n;
|
|
145
145
|
}
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
let t =
|
|
148
|
+
function bi(e) {
|
|
149
|
+
let t = B(e, [], e.actesLegislatifs);
|
|
150
150
|
return t === null ? {
|
|
151
|
-
currentStatus:
|
|
151
|
+
currentStatus: L.InProgress,
|
|
152
152
|
label: "en cours"
|
|
153
153
|
} : t;
|
|
154
154
|
}
|
|
155
|
-
function*
|
|
156
|
-
for (let t of e) yield t, t.actesLegislatifs !== void 0 && (yield*
|
|
155
|
+
function* V(e) {
|
|
156
|
+
for (let t of e) yield t, t.actesLegislatifs !== void 0 && (yield* V(t.actesLegislatifs));
|
|
157
157
|
}
|
|
158
|
-
function*
|
|
158
|
+
function* H(e) {
|
|
159
159
|
yield e;
|
|
160
|
-
for (let t of e.divisions ?? []) yield*
|
|
160
|
+
for (let t of e.divisions ?? []) yield* H(t);
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/inserters.ts
|
|
164
|
-
function
|
|
164
|
+
function U(e, t, n) {
|
|
165
165
|
if (!n.has(e.uid)) {
|
|
166
166
|
if (n.add(e.uid), t.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
|
|
167
167
|
let r = t.documentByUid[e.depotInitialLectureDefinitiveRef];
|
|
168
|
-
r !== void 0 && (e.depotInitialLectureDefinitive = r,
|
|
168
|
+
r !== void 0 && (e.depotInitialLectureDefinitive = r, K(r, t, n));
|
|
169
169
|
}
|
|
170
170
|
if (t.organeByUid !== void 0 && e.organeRef !== void 0) {
|
|
171
171
|
let r = t.organeByUid[e.organeRef];
|
|
172
|
-
r !== void 0 && (e.organe = r,
|
|
172
|
+
r !== void 0 && (e.organe = r, J(r, t, n));
|
|
173
173
|
}
|
|
174
174
|
if (t.organeByUid !== void 0 && e.provenanceRef !== void 0) {
|
|
175
175
|
let r = t.organeByUid[e.provenanceRef];
|
|
176
|
-
r !== void 0 && (e.provenance = r,
|
|
176
|
+
r !== void 0 && (e.provenance = r, J(r, t, n));
|
|
177
177
|
}
|
|
178
178
|
if (t.acteurByUid !== void 0 && e.rapporteurs !== void 0) for (let r of e.rapporteurs) {
|
|
179
179
|
let e = t.acteurByUid[r.acteurRef];
|
|
180
|
-
e !== void 0 && (r.acteur = e,
|
|
180
|
+
e !== void 0 && (r.acteur = e, W(e, t, n));
|
|
181
181
|
}
|
|
182
182
|
if (t.reunionByUid !== void 0 && e.reunionRef !== void 0) {
|
|
183
183
|
let r = t.reunionByUid[e.reunionRef];
|
|
184
|
-
if (r !== void 0 && (e.reunion = r,
|
|
184
|
+
if (r !== void 0 && (e.reunion = r, Y(r, t, n), e.odjRef !== void 0)) {
|
|
185
185
|
let t = r.odj;
|
|
186
186
|
if (t !== void 0 && t.pointsOdj !== void 0) {
|
|
187
187
|
for (let n of t.pointsOdj) if (n.uid === e.odjRef) {
|
|
@@ -193,120 +193,120 @@ function W(e, t, n) {
|
|
|
193
193
|
}
|
|
194
194
|
if (t.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
|
|
195
195
|
let r = t.documentByUid[e.texteAdopteRef];
|
|
196
|
-
r !== void 0 && (e.texteAdopte = r,
|
|
196
|
+
r !== void 0 && (e.texteAdopte = r, K(r, t, n));
|
|
197
197
|
}
|
|
198
198
|
if (t.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
|
|
199
199
|
let r = t.documentByUid[e.texteAssocieRef];
|
|
200
|
-
r !== void 0 && (e.texteAssocie = r,
|
|
200
|
+
r !== void 0 && (e.texteAssocie = r, K(r, t, n));
|
|
201
201
|
}
|
|
202
202
|
if (t.documentByUid !== void 0 && e.textesAssocies !== void 0) for (let r of e.textesAssocies) {
|
|
203
203
|
let e = t.documentByUid[r.texteAssocieRef];
|
|
204
|
-
e !== void 0 && (r.texteAssocie = e,
|
|
204
|
+
e !== void 0 && (r.texteAssocie = e, K(e, t, n));
|
|
205
205
|
}
|
|
206
206
|
if (t.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
|
|
207
207
|
let r = [];
|
|
208
208
|
for (let i of e.voteRefs) {
|
|
209
209
|
let e = t.scrutinByUid[i];
|
|
210
|
-
e !== void 0 && (r.push(e),
|
|
210
|
+
e !== void 0 && (r.push(e), X(e, t, n));
|
|
211
211
|
}
|
|
212
212
|
e.votes = r;
|
|
213
213
|
}
|
|
214
|
-
for (let r of e.actesLegislatifs || [])
|
|
214
|
+
for (let r of e.actesLegislatifs || []) U(r, t, n);
|
|
215
215
|
}
|
|
216
216
|
return e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function W(e, t, n) {
|
|
219
219
|
if (!n.has(e.uid) && (n.add(e.uid), t.organeByUid !== void 0)) for (let r of e.mandats || []) {
|
|
220
220
|
let e = [];
|
|
221
221
|
for (let i of r.organesRefs) {
|
|
222
222
|
let r = t.organeByUid[i];
|
|
223
|
-
r !== void 0 && (e.push(r),
|
|
223
|
+
r !== void 0 && (e.push(r), J(r, t, n));
|
|
224
224
|
}
|
|
225
225
|
r.organes = e;
|
|
226
226
|
}
|
|
227
227
|
return e;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function xi(e, t, n) {
|
|
230
230
|
if (!n.has(e.uid)) {
|
|
231
231
|
n.add(e.uid);
|
|
232
232
|
let r = e.signataires, i = r.auteur;
|
|
233
233
|
if (t.acteurByUid !== void 0 && i.acteurRef !== void 0) {
|
|
234
234
|
let e = t.acteurByUid[i.acteurRef];
|
|
235
|
-
e !== void 0 && (i.acteur = e,
|
|
235
|
+
e !== void 0 && (i.acteur = e, W(e, t, n));
|
|
236
236
|
}
|
|
237
237
|
if (t.organeByUid !== void 0 && i.auteurRapporteurOrganeRef !== void 0) {
|
|
238
238
|
let e = t.organeByUid[i.auteurRapporteurOrganeRef];
|
|
239
|
-
e !== void 0 && (i.auteurRapporteurOrgane = e,
|
|
239
|
+
e !== void 0 && (i.auteurRapporteurOrgane = e, J(e, t, n));
|
|
240
240
|
}
|
|
241
241
|
if (t.organeByUid !== void 0 && i.gouvernementRef !== void 0) {
|
|
242
242
|
let e = t.organeByUid[i.gouvernementRef];
|
|
243
|
-
e !== void 0 && (i.gouvernement = e,
|
|
243
|
+
e !== void 0 && (i.gouvernement = e, J(e, t, n));
|
|
244
244
|
}
|
|
245
245
|
if (t.organeByUid !== void 0 && i.groupePolitiqueRef !== void 0) {
|
|
246
246
|
let e = t.organeByUid[i.groupePolitiqueRef];
|
|
247
|
-
e !== void 0 && (i.groupePolitique = e,
|
|
247
|
+
e !== void 0 && (i.groupePolitique = e, J(e, t, n));
|
|
248
248
|
}
|
|
249
249
|
if (t.acteurByUid !== void 0 && r.cosignatairesRefs !== void 0) {
|
|
250
250
|
let e = [];
|
|
251
251
|
for (let i of r.cosignatairesRefs || []) {
|
|
252
252
|
let r = t.acteurByUid[i];
|
|
253
|
-
r !== void 0 && (e.push(r),
|
|
253
|
+
r !== void 0 && (e.push(r), W(r, t, n));
|
|
254
254
|
}
|
|
255
255
|
r.cosignataires = e;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
return e;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function G(e, t, n) {
|
|
261
261
|
for (let r of e.auteurs) {
|
|
262
262
|
let e = r.acteur;
|
|
263
263
|
if (t.acteurByUid !== void 0 && e !== void 0) {
|
|
264
264
|
let r = t.acteurByUid[e.acteurRef];
|
|
265
|
-
r !== void 0 && (e.acteur = r,
|
|
265
|
+
r !== void 0 && (e.acteur = r, W(r, t, n));
|
|
266
266
|
}
|
|
267
267
|
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
268
268
|
let e = t.organeByUid[r.organeRef];
|
|
269
|
-
e !== void 0 && (r.organe = e,
|
|
269
|
+
e !== void 0 && (r.organe = e, J(e, t, n));
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
if (t.dossierByUid !== void 0) {
|
|
273
273
|
let r = t.dossierByUid[e.dossierRef];
|
|
274
|
-
r !== void 0 && (e.dossier = r,
|
|
274
|
+
r !== void 0 && (e.dossier = r, q(r, t, n));
|
|
275
275
|
}
|
|
276
|
-
for (let r of e.divisions || [])
|
|
276
|
+
for (let r of e.divisions || []) G(r, t, n);
|
|
277
277
|
return e;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function K(e, t, n) {
|
|
280
280
|
if (!n.has(e.uid)) {
|
|
281
281
|
n.add(e.uid);
|
|
282
282
|
for (let r of e.auteurs) {
|
|
283
283
|
let e = r.acteur;
|
|
284
284
|
if (t.acteurByUid !== void 0 && e !== void 0) {
|
|
285
285
|
let r = t.acteurByUid[e.acteurRef];
|
|
286
|
-
r !== void 0 && (e.acteur = r,
|
|
286
|
+
r !== void 0 && (e.acteur = r, W(r, t, n));
|
|
287
287
|
}
|
|
288
288
|
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
289
289
|
let e = t.organeByUid[r.organeRef];
|
|
290
|
-
e !== void 0 && (r.organe = e,
|
|
290
|
+
e !== void 0 && (r.organe = e, J(e, t, n));
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
if (t.dossierByUid !== void 0) {
|
|
294
294
|
let r = t.dossierByUid[e.dossierRef];
|
|
295
|
-
r !== void 0 && (e.dossier = r,
|
|
295
|
+
r !== void 0 && (e.dossier = r, q(r, t, n));
|
|
296
296
|
}
|
|
297
|
-
for (let r of e.divisions || [])
|
|
297
|
+
for (let r of e.divisions || []) G(r, t, n);
|
|
298
298
|
}
|
|
299
299
|
return e;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function q(e, t, n) {
|
|
302
302
|
if (!n.has(e.uid)) {
|
|
303
303
|
n.add(e.uid);
|
|
304
|
-
for (let r of e.actesLegislatifs ?? [])
|
|
304
|
+
for (let r of e.actesLegislatifs ?? []) U(r, t, n);
|
|
305
305
|
let r = e.initiateur;
|
|
306
306
|
if (r !== void 0) {
|
|
307
307
|
if (t.acteurByUid !== void 0) for (let e of r.acteurs || []) {
|
|
308
308
|
let r = t.acteurByUid[e.acteurRef];
|
|
309
|
-
if (r !== void 0 && (e.acteur = r,
|
|
309
|
+
if (r !== void 0 && (e.acteur = r, W(r, t, n)), r !== void 0 && e.mandatRef !== void 0) {
|
|
310
310
|
for (let t of r.mandats || []) if (t.uid === e.mandatRef) {
|
|
311
311
|
e.mandat = t;
|
|
312
312
|
break;
|
|
@@ -315,62 +315,62 @@ function J(e, t, n) {
|
|
|
315
315
|
}
|
|
316
316
|
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
317
317
|
let e = t.organeByUid[r.organeRef];
|
|
318
|
-
e !== void 0 && (r.organe = e,
|
|
318
|
+
e !== void 0 && (r.organe = e, J(e, t, n));
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
return e;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function J(e, t, n) {
|
|
325
325
|
if (!n.has(e.uid)) {
|
|
326
326
|
if (n.add(e.uid), t.organeByUid !== void 0 && e.organeParentRef !== void 0) {
|
|
327
327
|
let r = t.organeByUid[e.organeParentRef];
|
|
328
|
-
r !== void 0 && (e.organeParent = r,
|
|
328
|
+
r !== void 0 && (e.organeParent = r, J(r, t, n));
|
|
329
329
|
}
|
|
330
330
|
if (t.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
|
|
331
331
|
let r = t.organeByUid[e.organePrecedentRef];
|
|
332
|
-
r !== void 0 && (e.organePrecedent = r,
|
|
332
|
+
r !== void 0 && (e.organePrecedent = r, J(r, t, n));
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
return e;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function Y(e, t, n) {
|
|
338
338
|
if (!n.has(e.uid)) {
|
|
339
339
|
n.add(e.uid);
|
|
340
340
|
let r = e.demandeurs;
|
|
341
341
|
if (r !== void 0) {
|
|
342
342
|
if (t.acteurByUid !== void 0) for (let e of r.acteurs || []) {
|
|
343
343
|
let r = t.acteurByUid[e.acteurRef];
|
|
344
|
-
r !== void 0 && (e.acteur = r,
|
|
344
|
+
r !== void 0 && (e.acteur = r, W(r, t, n));
|
|
345
345
|
}
|
|
346
346
|
if (t.organeByUid !== void 0) {
|
|
347
347
|
let e = r.organe;
|
|
348
348
|
if (e !== void 0) {
|
|
349
349
|
let r = t.organeByUid[e.organeRef];
|
|
350
|
-
r !== void 0 && (e.organe = r,
|
|
350
|
+
r !== void 0 && (e.organe = r, J(r, t, n));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
if (t.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
|
|
355
355
|
let r = t.organeByUid[e.organeReuniRef];
|
|
356
|
-
r !== void 0 && (e.organeReuni = r,
|
|
356
|
+
r !== void 0 && (e.organeReuni = r, J(r, t, n));
|
|
357
357
|
}
|
|
358
358
|
if (t.acteurByUid !== void 0) {
|
|
359
359
|
let r = e.participants;
|
|
360
360
|
if (r !== void 0) for (let e of r.participantsInternes || []) {
|
|
361
361
|
let r = t.acteurByUid[e.acteurRef];
|
|
362
|
-
r !== void 0 && (e.acteur = r,
|
|
362
|
+
r !== void 0 && (e.acteur = r, W(r, t, n));
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
return e;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function X(e, t, n) {
|
|
369
369
|
return n.has(e.uid) || n.add(e.uid), e;
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
372
|
//#region src/organes.ts
|
|
373
|
-
function
|
|
373
|
+
function Si(e) {
|
|
374
374
|
if (e == null) return "Organe inconnu";
|
|
375
375
|
switch (e.codeType) {
|
|
376
376
|
case "CMP": return "Commission mixte paritaire";
|
|
@@ -380,9 +380,9 @@ function xi(e) {
|
|
|
380
380
|
}
|
|
381
381
|
//#endregion
|
|
382
382
|
//#region src/urls.ts
|
|
383
|
-
var
|
|
383
|
+
var Z = /* @__PURE__ */ function(e) {
|
|
384
384
|
return e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e;
|
|
385
|
-
}({}),
|
|
385
|
+
}({}), Q = /^AMANR\d+L(?<legislature>\d+)PO\d+[A-Z]+(?<texteNumero>\d+)P\d+D\d+N(?<numero>\d+)$/, Ci = {
|
|
386
386
|
ACIN: {
|
|
387
387
|
directory: "projets",
|
|
388
388
|
prefix: "pl",
|
|
@@ -494,71 +494,82 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
494
494
|
suffix: "-a0"
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
function
|
|
497
|
+
function wi(e) {
|
|
498
498
|
switch (e) {
|
|
499
|
-
case
|
|
500
|
-
case
|
|
501
|
-
case
|
|
499
|
+
case Z.Html: return ".asp";
|
|
500
|
+
case Z.Pdf: return ".pdf";
|
|
501
|
+
case Z.RawHtml: return ".asp";
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function*
|
|
505
|
-
if (t === void 0 || t ===
|
|
504
|
+
function* Ti(e, t = void 0, n = !1) {
|
|
505
|
+
if (t === void 0 || t === Z.RawHtml) {
|
|
506
506
|
yield {
|
|
507
|
-
format:
|
|
507
|
+
format: Z.RawHtml,
|
|
508
508
|
type: "dyn-opendata",
|
|
509
509
|
url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
|
|
510
510
|
}, yield {
|
|
511
|
-
format:
|
|
511
|
+
format: Z.RawHtml,
|
|
512
512
|
type: "dyn-docs",
|
|
513
513
|
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
|
|
514
514
|
};
|
|
515
|
-
let t = $(e,
|
|
515
|
+
let t = $(e, Z.RawHtml, n);
|
|
516
516
|
t !== null && (yield {
|
|
517
|
-
format:
|
|
517
|
+
format: Z.RawHtml,
|
|
518
518
|
type: t.directory.replaceAll("/", "-"),
|
|
519
519
|
url: t.url
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
|
-
if (t === void 0 || t ===
|
|
523
|
-
let t = $(e,
|
|
522
|
+
if (t === void 0 || t === Z.Html) {
|
|
523
|
+
let t = $(e, Z.Html, n);
|
|
524
524
|
t !== null && (yield {
|
|
525
|
-
format:
|
|
525
|
+
format: Z.Html,
|
|
526
526
|
type: t.directory.replaceAll("/", "-"),
|
|
527
527
|
url: t.url
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
if (t === void 0 || t ===
|
|
530
|
+
if (t === void 0 || t === Z.Pdf) {
|
|
531
531
|
yield {
|
|
532
|
-
format:
|
|
532
|
+
format: Z.RawHtml,
|
|
533
533
|
type: "dyn-opendata",
|
|
534
534
|
url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
|
|
535
535
|
}, yield {
|
|
536
|
-
format:
|
|
536
|
+
format: Z.Pdf,
|
|
537
537
|
type: "dyn-docs",
|
|
538
538
|
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
|
|
539
539
|
};
|
|
540
|
-
let t = $(e,
|
|
540
|
+
let t = $(e, Z.Pdf);
|
|
541
541
|
t !== null && (yield {
|
|
542
|
-
format:
|
|
542
|
+
format: Z.Pdf,
|
|
543
543
|
type: t.directory.replaceAll("/", "-"),
|
|
544
544
|
url: t.url
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Ei(e, t) {
|
|
549
549
|
let n = $(e, t);
|
|
550
550
|
return n === null ? null : n.url;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function Di(e, t) {
|
|
553
|
+
if (t === "json" || t === "xml") return Q.test(e) ? `https://www.assemblee-nationale.fr/dyn/opendata/${e}.${t}` : null;
|
|
554
|
+
let n = e.match(Q);
|
|
555
|
+
if (n?.groups === void 0) return null;
|
|
556
|
+
let { legislature: r, texteNumero: i, numero: a } = n.groups, o = `https://www.assemblee-nationale.fr/dyn/${Number.parseInt(r, 10)}/amendements/${i}/AN/${Number.parseInt(a, 10)}`;
|
|
557
|
+
switch (t) {
|
|
558
|
+
case "html": return o;
|
|
559
|
+
case "pdf":
|
|
560
|
+
case "rtf": return `${o}.${t}`;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
function Oi(e) {
|
|
553
564
|
let t = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
|
|
554
565
|
return t === null ? (console.log(`Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`), null) : `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${t[2]}/(num)/${t[3]}`;
|
|
555
566
|
}
|
|
556
567
|
function $(e, t, n = !1) {
|
|
557
|
-
let r =
|
|
568
|
+
let r = wi(t), i = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(e.uid);
|
|
558
569
|
if (i === null) return n && console.log(`Unable to generate URL from document or division with unexpected UID: "${e.uid}"`), null;
|
|
559
570
|
if (i[2] === "SN") return n && console.log(`Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`), null;
|
|
560
571
|
let a = i[5], o = i[7];
|
|
561
|
-
if (t ===
|
|
572
|
+
if (t === Z.RawHtml) return {
|
|
562
573
|
directory: "textes",
|
|
563
574
|
url: `https://www.assemblee-nationale.fr/${a}/textes/${o}${r}`
|
|
564
575
|
};
|
|
@@ -568,13 +579,13 @@ function $(e, t, n = !1) {
|
|
|
568
579
|
TAP: "TADO"
|
|
569
580
|
}[i[6]] || i[1];
|
|
570
581
|
e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (o = o.replace(/-COMPA/, "-aCOMPA")), s == "AVCE" && (s = `AVCE${e.classification.famille?.classe.code}`);
|
|
571
|
-
let c =
|
|
582
|
+
let c = Ci[s];
|
|
572
583
|
if (c === void 0) return n && console.log(`Unable to generate URL from document or division of UID "${e.uid}" and type "${s}"`), null;
|
|
573
|
-
let l = t ===
|
|
584
|
+
let l = t === Z.Pdf ? `pdf/${c.directory}` : c.directory;
|
|
574
585
|
return {
|
|
575
586
|
directory: l,
|
|
576
587
|
url: `https://www.assemblee-nationale.fr/${a}/${l}/${c.prefix}${o}${c.suffix}${r}`
|
|
577
588
|
};
|
|
578
589
|
}
|
|
579
590
|
//#endregion
|
|
580
|
-
export { te as AccordGouvernementDepotHorsDelaiSchema,
|
|
591
|
+
export { te as AccordGouvernementDepotHorsDelaiSchema, ct as ActeLegislatifSchema, Ir as ActeurSchema, oe as ActionSchema, Tn as AdresseSchema, k as AlineaSchema, b as AmendementSchema, bt as AmendementsCommissionSchema, E as AmendementsConvert, f as AmendementsSchema, Vt as AmendementsSeanceSchema, xn as AnalyseSchema, fi as AuteurActeurSchema, pe as AuteurAmendementSchema, Xr as AuteurQuestionSchema, Fe as AuteurSchema, x as AvantAppelSchema, Tt as CausePositionVoteSchema, nn as ChronoDocumentSchema, hi as ChronoSchema, wr as CibleSchema, Nt as CivSchema, it as ClassificationSchema, ci as ClotureSchema, Qt as CoSignataireElementSchema, sn as CoSignataireOrganeSchema, Wr as CodeActeSchema, De as CodeEtatSchema, ur as CodeNatureDepSchema, kt as CodeSortScrutinSchema, Ne as CodeTypeOrganeSchema, It as CodeTypeVoteSchema, zr as CollaborateurSchema, Zt as CompteRenduSchema, D as ContenuAmendementSchema, ge as ContenuAuteurSchema, Ye as ContenuSchema, et as ContributionInternauteSchema, g as CorpsAmendementSchema, gt as CorrectionSchema, jr as CycleDeVieDocumentSchema, Re as CycleDeVieReunionSchema, A as CycleDeVieSchema, nr as DecisionSchema, Hr as DecompteNominatifSchema, yr as DecompteVoixSchema, on as DemandeurActeurSchema, st as DemandeurOrganeSchema, Fr as DemandeurSchema, tn as DemandeursSchema, or as DepNaisSchema, Nn as DepartementSchema, fr as DeportSchema, ft as DepotAmendementsSchema, ve as DiscussionSchema, C as DispositifAmdtCreditPLFRSchema, be as DispositifAmdtCreditPLFSchema, pn as DivisionSchema, t as DivisionTypeSchema, dn as DocumentSchema, Z as DocumentUrlFormat, tr as DossierLegislatifObjetSchema, _n as DossierParlementaireSchema, M as DysfonctionnementSchema, qr as ElectionSchema, u as EtatAmendementSchema, Ln as EtatCivilSchema, Se as EtatDesTraitementsSchema, Tr as EtatSchema, Oe as EtudePlfSchema, N as Facet, Hn as FamCodeEtLibelleSchema, Et as FamSocProEnumSchema, Gr as FamilleSchema, Pt as FinSeanceSchema, I as FinalStatus, P as Follow, Br as FormatReunionSchema, Sr as FusionDossierSchema, On as GroupeSchema, un as IdentPersonneAuditionneeSchema, Wn as IdentSchema, ii as IdentifiantSchema, rt as IdentifiantsSchema, fe as IdentificationSchema, Wt as IdentiteAuteurQuestionSchema, Lr as ImprimerieSchema, ze as IndexationAnSchema, rr as IndexationSchema, ei as InfoJoQuestionSchema, Dn as InfoJoSchema, Er as InfoJoceSchema, Or as InfoNaissanceSchema, gr as InfosQualiteSchema, yt as InfosReunionsInternationaleSchema, Vr as InitiateurActeurSchema, Fn as InitiateurSchema, mr as LibelleActeSchema, At as LibelleSchema, Ze as LibelleSortScrutinSchema, lt as LibelleTypeVoteSchema, Pr as LieuReunionSchema, xt as LieuVoteSchema, Ee as LigneCreditPLFRSchema, Ce as LigneCreditPLFSchema, he as LoiReferenceSchema, Qn as MandatSchema, Lt as MandatXsiTypeSchema, Jn as MandatureSchema, dr as MetadonneesSchema, Jt as MinAttribElementSchema, Ke as MinAttribsSchema, Cr as MiseAuPointSchema, Yr as MissionMinefiSchema, Te as MissionViseeSchema, Ht as ModePublicationDesVotesSchema, Pn as NatureTravauxOdjSchema, zn as NoticeSchema, Rr as ObjetVoteSchema, ht as OdjSchema, Pe as OrateurElementSchema, sr as OrateursSchema, Zr as OrganeLieuSchema, Sn as OrganeSchema, Qe as OrganeXsiTypeSchema, gn as ParticipantInterneSchema, fn as ParticipantsSchema, bn as PersonneAuditionneeSchema, Bt as PersonneAuditionneeXsiTypeSchema, li as PhotoSchema, Ae as PointOdjSchema, pr as PointOdjXsiTypeSchema, Dt as PointSchema, v as PointeurFragmentTexteDivisionSchema, se as PointeurFragmentTexteSchema, pi as PositionMajoritaireSchema, ut as PositionPolitiqueSchema, Jr as PresenceSchema, Kn as ProcedureParlementaireSchema, Rn as ProcedureSchema, kn as ProfessionSchema, n as ProgrammePlfSchema, Gn as QuantiemeSchema, jt as QuantiemesSchema, Ue as QuestionSchema, vn as QuestionXsiTypeSchema, Ar as RapporteurSchema, St as RegimeSchema, ai as RegionSchema, Ut as RegionTypeSchema, cr as RenouvellementSchema, je as RenouvellementsSchema, we as RepresentationSchema, Bn as ReunionSchema, kr as ReunionXsiTypeSchema, Mn as ScrutinSchema, Gt as SecretariatSchema, ir as SignalementSchema, ce as SignatairesSchema, Be as SocProcInseeSchema, $e as SommaireElementSchema, Rt as SommaireSchema, Kr as SortScrutinSchema, i as SousEtatAmendementSchema, vr as SousTypeSchema, L as StatusOnly, r as StatutRepresentationSchema, ti as SuppleantSchema, In as SyntheseVoteSchema, er as TexteAssocieSchema, Xn as TexteEuropeenSchema, wn as TexteExterneAssocieSchema, ie as TexteLegislatifSchema, wt as TexteQuestionSchema, dt as TexteSchema, Ot as TextesQuestionSchema, Ft as TextesReponseSchema, $r as ThemeSchema, di as ThemesSchema, jn as TitreDossierSchema, Ct as TitreStructSchema, si as TitresSchema, h as TotalSchema, ue as TypeAuteurSchema, Ie as TypeMajoriteSchema, e as TypeMimeSchema, _r as TypePointOdjSchema, s as TypePositionSchema, zt as TypeQuestionSchema, $n as TypeReunionSchema, Un as TypeVoteSchema, Yn as UidXsiTypeSchema, hr as VentilationVotesGroupeSchema, Dr as VentilationVotesSchema, Yt as ViMoDeSchema, Zn as VotantSchema, qn as VoteSchema, le as accordGouvernementDepotHorsDelaiOptions, qt as acteLegislatifXsiTypeOptions, de as actionOptions, gi as allFacets, _i as allFollows, m as avantAApresOptions, vi as capitalizeFirstLetter, rn as causePositionVoteOptions, mi as civOptions, xr as codeActeOptions, o as codeEtatOptions, Le as codeNatureDepOptions, at as codeSortScrutinOptions, an as codeTypeOrganeOptions, $t as codeTypeVoteOptions, yi as commissionFondUidFromDossier, qe as compteRenduUidRegex, p as dateFromNullableDateOrIsoString, me as dateFromYearMonthDayTimezoneString, En as decisionOptions, ot as depNaisOptions, S as displayDateFromLocalIsoString, ee as divisionTypeOptions, We as documentUidRegex, He as documentXsiTypeOptions, ri as dossierParlementaireXsiTypeOptions, Mt as dossierUidRegex, ne as etatAmendementCodeOptions, re as etatAmendementLibelleOptions, Ur as etatCycleDeVieOptions, Cn as etatOptions, O as existingDateToJson, en as famSocProEnumOptions, _e as formatRelativeFrenchTime, Qr as formatReunionOptions, _ as frenchDateFormat, j as frenchDateSameYearShortFormat, ye as frenchDateWithoutDayOfWeekFromDateOrString, xe as frenchTimeFormat, w as frenchTimeFromDateOrString, W as insertActeurReferences, xi as insertAmendementReferences, K as insertDocumentReferences, q as insertDossierReferences, J as insertOrganeReferences, Y as insertReunionReferences, X as insertScrutinReferences, Ti as iterDocumentOrDivisionUrls, yn as legislatureOptions, ln as libelleOptions, cn as libelleSortScrutinOptions, tt as libelleTypeVoteOptions, _t as lieuVoteOptions, y as localIso8601StringFromDate, nt as mandatXsiTypeOptions, Mr as modePublicationDesVotesOptions, ui as natureTravauxOdjOptions, vt as organeXsiTypeOptions, d as patchedDateToJson, br as personneAuditionneeXsiTypeOptions, An as pointOdjXsiTypeOptions, pt as positionMajoritaireOptions, Nr as positionPolitiqueOptions, oi as presenceOptions, Kt as procedureOptions, Ve as quantiemeOptions, lr as questionUidRegex, ke as questionXsiTypeOptions, mt as regimeOptions, hn as regionTypeOptions, Me as reunionUidRegex, ni as reunionXsiTypeOptions, ar as scrutinUidRegex, Si as shortNameFromOrgane, ae as sortAmendementOptions, z as stateFromActePath, B as stateFromActes, bi as stateFromDossier, R as statusFromCodierLibelle, T as typeAuteurOptions, Xe as typeJoQuestionOptions, mn as typeMajoriteOptions, a as typeMimeNomOptions, c as typeMimeTypeOptions, Xt as typePointOdjOptions, l as typePositionOptions, Vn as typeQuestionOptions, Je as typeReunionOptions, Ge as uidXsiTypeOptions, F as uncapitalizeFirstLetter, Di as urlFromAmendementUid, Ei as urlFromDocument, Oi as urlFromScrutin, V as walkActes, H as walkDocumentAndDivisions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "./amendements-
|
|
2
|
-
import { An as t, Dn as n, Dt as r, En as i, O as a, On as o, Q as s, Rt as c, Xr as l, in as u, jn as d, kn as f, l as p } from "./scrutins-
|
|
1
|
+
import { r as e } from "./amendements-NUU1Ei_X.js";
|
|
2
|
+
import { An as t, Dn as n, Dt as r, En as i, O as a, On as o, Q as s, Rt as c, Xr as l, in as u, jn as d, kn as f, l as p } from "./scrutins-vscL0izO.js";
|
|
3
3
|
import { getChangedFilesSinceCommit as m } from "./git.js";
|
|
4
4
|
import h from "node:assert";
|
|
5
5
|
import g from "fs-extra";
|
package/lib/loaders.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./loaders-
|
|
1
|
+
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./loaders-Do7OTkWb.js";
|
|
2
2
|
export { e as EnabledDatasets, v as datasets, p as iterLoadAssembleeActeurs, g as iterLoadAssembleeAmendements, u as iterLoadAssembleeComptesRendus, r as iterLoadAssembleeDocuments, m as iterLoadAssembleeDossiersParlementaires, _ as iterLoadAssembleeOrganes, a as iterLoadAssembleeQuestions, d as iterLoadAssembleeReunions, y as iterLoadAssembleeScrutins, o as loadAssembleeData, s as loadAssembleeDataFromBigFiles, h as loadAssembleeDocumentFile, f as loadAssembleePhotosDeputes, l as loadAssembleePhotosSenateurs, c as pathFromCompteRenduUid, n as pathFromDocumentUid, b as pathFromDossierParlementaireUid, S as pathFromQuestionUid, i as pathFromReunionUid, x as pathFromScrutinUid, t as walkDir };
|
package/lib/parsers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _t as e, gt as t, r as n, vt as r, yt as i } from "./amendements-
|
|
2
|
-
import { t as a } from "./amendements-
|
|
1
|
+
import { _t as e, gt as t, r as n, vt as r, yt as i } from "./amendements-NUU1Ei_X.js";
|
|
2
|
+
import { t as a } from "./amendements-CudMDSl9.js";
|
|
3
3
|
import o from "node:assert";
|
|
4
4
|
import s from "fs-extra";
|
|
5
5
|
import c from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-
|
|
1
|
+
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-NUU1Ei_X.js";
|
|
2
2
|
import { z as l } from "zod";
|
|
3
3
|
//#region src/legislatures.ts
|
|
4
4
|
var u = /* @__PURE__ */ function(e) {
|
package/lib/urls.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ export declare enum DocumentUrlFormat {
|
|
|
5
5
|
Pdf = "pdf",
|
|
6
6
|
RawHtml = "raw-html"
|
|
7
7
|
}
|
|
8
|
+
export type AmendementUrlFormat = "html" | "json" | "pdf" | "rtf" | "xml";
|
|
8
9
|
export declare function iterDocumentOrDivisionUrls(documentOrDivision: Document | Division, format?: DocumentUrlFormat | undefined, verbose?: boolean): Generator<{
|
|
9
10
|
format: DocumentUrlFormat;
|
|
10
11
|
type: string;
|
|
11
12
|
url: string;
|
|
12
13
|
}, void, unknown>;
|
|
13
14
|
export declare function urlFromDocument(documentOrDivision: Document | Division, format: DocumentUrlFormat): string | null;
|
|
15
|
+
export declare function urlFromAmendementUid(amendementUid: string, format: AmendementUrlFormat): string | null;
|
|
14
16
|
export declare function urlFromScrutin(scrutin: Scrutin): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tricoteuses/assemblee",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.8",
|
|
4
4
|
"description": "Retrieve, clean up & handle French Assemblée nationale's open data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Assemblée nationale",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"lint": "eslint .",
|
|
83
83
|
"prepare": "npm run build",
|
|
84
84
|
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
85
|
+
"test": "vitest run",
|
|
85
86
|
"test:iter_load": "tsx src/scripts/test_iter_load.ts",
|
|
86
87
|
"type-check": "tsc --noEmit",
|
|
87
88
|
"type-check:watch": "npm run type-check -- --watch"
|
|
@@ -125,7 +126,8 @@
|
|
|
125
126
|
"typescript": "^5.9.3",
|
|
126
127
|
"typescript-eslint": "^8.57.2",
|
|
127
128
|
"vite": "^8.0.3",
|
|
128
|
-
"vite-plugin-dts": "^4.5.4"
|
|
129
|
+
"vite-plugin-dts": "^4.5.4",
|
|
130
|
+
"vitest": "^4.0.14"
|
|
129
131
|
},
|
|
130
132
|
"overrides": {
|
|
131
133
|
"@microsoft/api-extractor": "7.55.0"
|