@tricoteuses/assemblee 3.0.16 → 3.0.18

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/loaders.js CHANGED
@@ -1,22 +1,21 @@
1
- import r from "fs-extra";
1
+ import o from "fs-extra";
2
2
  import B from "node:assert";
3
3
  import s from "node:path";
4
4
  import "glob";
5
5
  import "node:fs/promises";
6
6
  import { getChangedFilesSinceCommit as ue } from "./git.js";
7
7
  import { z as e } from "zod";
8
- import { E as x, F as Y, G as K, H as T, I as z, J as V, B as ie } from "./amendements-Bab1iUCY.js";
9
- import { C as me, D as se, F as Ce, j as de, L as pe, e as ge, M as Ie, b as Fe, P as Ve, R as De, O as Pe, a0 as fe, Y as Xe, aa as Oe, a2 as we, _ as qe, W as Le, a8 as Re, a4 as xe, a6 as $e, ao as l, ap as oe, aq as W, ar as ae, ac as Me, af as Ne, ag as ze, ab as ke, ad as Te, ae as Ue } from "./questions-DgERya4J.js";
10
- import { D as Je } from "./questions-C3qN4PsC.js";
11
- var h = /* @__PURE__ */ ((t) => (t[t.SingleFile = 0] = "SingleFile", t[t.SegmentedFiles = 1] = "SegmentedFiles", t))(h || {}), F = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ActeursEtOrganes = 1] = "ActeursEtOrganes", t[t.Agendas = 2] = "Agendas", t[t.Amendements = 4] = "Amendements", t[t.DossiersLegislatifs = 8] = "DossiersLegislatifs", t[t.Photos = 16] = "Photos", t[t.Scrutins = 32] = "Scrutins", t[t.Questions = 64] = "Questions", t[t.ComptesRendusSeances = 128] = "ComptesRendusSeances", t[t.ComptesRendusCommissions = 256] = "ComptesRendusCommissions", t[t.All = 511] = "All", t))(F || {});
12
- function* R(t, n = []) {
13
- const i = s.join(t, ...n);
14
- if (r.existsSync(i))
15
- for (const o of r.readdirSync(i)) {
16
- if (o[0] === ".")
8
+ import { E as x, F as K, G as Y, H as T, I as z, J as F, B as ie } from "./amendements-Bab1iUCY.js";
9
+ import { C as me, D as se, F as ve, j as de, L as pe, e as ge, M as Ie, b as Ve, P as Fe, R as De, O as Xe, S as Pe, a6 as fe, a2 as we, ag as Oe, a8 as Re, a4 as qe, a0 as Le, ae as xe, aa as $e, ac as Me, aw as l, ax as oe, ay as W, az as ae, ai as Ne, al as ze, am as ke, ah as Te, aj as Ue, ak as Je } from "./questions-BiakXZ6q.js";
10
+ var h = /* @__PURE__ */ ((t) => (t[t.SingleFile = 0] = "SingleFile", t[t.SegmentedFiles = 1] = "SegmentedFiles", t))(h || {}), V = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ActeursEtOrganes = 1] = "ActeursEtOrganes", t[t.Agendas = 2] = "Agendas", t[t.Amendements = 4] = "Amendements", t[t.DossiersLegislatifs = 8] = "DossiersLegislatifs", t[t.Photos = 16] = "Photos", t[t.Scrutins = 32] = "Scrutins", t[t.Questions = 64] = "Questions", t[t.ComptesRendusSeances = 128] = "ComptesRendusSeances", t[t.ComptesRendusCommissions = 256] = "ComptesRendusCommissions", t[t.ComptesRendus = 512] = "ComptesRendus", t[t.All = 1023] = "All", t))(V || {});
11
+ function* L(t, i = []) {
12
+ const n = s.join(t, ...i);
13
+ if (o.existsSync(n))
14
+ for (const a of o.readdirSync(n)) {
15
+ if (a[0] === ".")
17
16
  continue;
18
- const p = s.join(i, o), f = [...n, o];
19
- r.statSync(p).isDirectory() ? yield* R(t, f) : yield f;
17
+ const p = s.join(n, a), f = [...i, a];
18
+ o.statSync(p).isDirectory() ? yield* L(t, f) : yield f;
20
19
  }
21
20
  }
22
21
  const Qe = [
@@ -46,13 +45,13 @@ const Qe = [
46
45
  description: "L'état civil est la situation de la personne dans la société, résultat d'une procédure écrite d'identification administrative."
47
46
  }), Ge = e.object({
48
47
  catSocPro: e.string().optional().meta({ description: "Catégorie socio professionelle de l'INSEE." }),
49
- famSocPro: Ce.optional().meta({
48
+ famSocPro: ve.optional().meta({
50
49
  description: "Famille socio professionelle de l'INSEE."
51
50
  })
52
51
  }), He = e.object({
53
52
  libelleCourant: e.string().optional().meta({ description: "Profession." }),
54
53
  socProcInsee: Ge.optional()
55
- }).meta({ description: "Profession" }), Ye = e.object({
54
+ }).meta({ description: "Profession" }), Ke = e.object({
56
55
  xsiType: Ee,
57
56
  uid: e.string().meta({ description: "Identifiant unique." }),
58
57
  type: e.string().meta({
@@ -79,7 +78,7 @@ const Qe = [
79
78
  }).meta({
80
79
  title: "Adresse postale et électronique",
81
80
  description: "Les adresses postales, numéros de téléphones et les adresses électroniques de l'acteur."
82
- }), Ke = e.object({
81
+ }), Ye = e.object({
83
82
  codeQualite: e.string().optional().meta({
84
83
  description: "Abrégé de la qualité, unifié entre les {@link CodeTypeOrgane | types d'organes}."
85
84
  }),
@@ -88,13 +87,13 @@ const Qe = [
88
87
  description: "Titre donné en raison du mandat. (par exemple: Sénateur, Vice-Président, Membre, etc.)"
89
88
  })
90
89
  }), et = e.object({
91
- dateDebut: K().meta({
90
+ dateDebut: Y().meta({
92
91
  description: "Date de début de la nomination."
93
92
  }),
94
93
  dateFin: x().meta({
95
94
  description: "Date de fin de la fonction."
96
95
  }),
97
- suppleantRef: Y().meta({
96
+ suppleantRef: K().meta({
98
97
  description: "Référence au suppléant"
99
98
  })
100
99
  }).meta({
@@ -143,14 +142,14 @@ const Qe = [
143
142
  }), ot = e.object({
144
143
  xsiType: Ie.optional(),
145
144
  uid: T().meta({ description: "Identifiant unique du mandat" }),
146
- acteurRef: Y().meta({
145
+ acteurRef: K().meta({
147
146
  description: "Référence à l'acteur"
148
147
  }),
149
148
  legislature: e.string().optional().meta({
150
149
  description: "Numéro de {@link https://fr.wikipedia.org/wiki/Liste_des_l%C3%A9gislatures_fran%C3%A7aises | la législature} sous laquelle a été créé l'organe. Nombre entier."
151
150
  }),
152
151
  typeOrgane: ge,
153
- dateDebut: K().meta({
152
+ dateDebut: Y().meta({
154
153
  description: "Date de début de la nomination de l'acteur."
155
154
  }),
156
155
  datePublication: x().meta({
@@ -165,7 +164,7 @@ const Qe = [
165
164
  nominPrincipale: e.string().meta({
166
165
  description: "1 pour le mandat principal, 0 sinon. Si deux mandats pour un même organe coïncident dans le temps (c'est à dire que les intervalles de temps entre leurs dates de début et de fin ont une intersection), alors le mandat principal est celui dont le champ préséance a la plus petite valeur."
167
166
  }),
168
- infosQualite: Ke,
167
+ infosQualite: Ye,
169
168
  organesRefs: e.array(z()).meta({
170
169
  description: "Identifiants uniques (uid) des {@link Organe | organes} au sein desquels le mandat est exercé."
171
170
  }),
@@ -206,7 +205,7 @@ const Qe = [
206
205
  uriHatvp: e.string().optional().meta({
207
206
  description: "URL de la déclaration d'intérêt de l'acteur sur le site de la Haute Autorité pour la Transparence dans la Vie Publique."
208
207
  }),
209
- adresses: e.array(Ye).optional().meta({
208
+ adresses: e.array(Ke).optional().meta({
210
209
  description: "Les adresses postales, numéros de téléphones et les adresses électroniques de l'acteur."
211
210
  }),
212
211
  mandats: e.array(ot).optional().meta({
@@ -236,7 +235,7 @@ const Qe = [
236
235
  }).meta({
237
236
  description: "Le rôle du secrétaire administratif est d'assister le président dans tous les aspects du fonctionnement du groupe : à ce titre, il est notamment chargé de l'organisation matérielle des activités du groupe (dont les missions et les réceptions) et établit les comptes rendus de ses réunions. Cette définition {@link http://www2.assemblee-nationale.fr/decouvrir-l-assemblee/role-et-pouvoirs-de-l-assemblee-nationale/les-relations-interparlementaires/les-groupes-d-amitie | du secrétaire administratif d'un groupe d'amitié} se rapproche de celle des autres organes ({@link http://www.assemblee-nationale.fr/connaissance/reglement.pdf | Groupes Parlementaires} Article 20, etc.)"
238
237
  }), ct = e.object({
239
- codeNatureDep: Fe.optional(),
238
+ codeNatureDep: Ve.optional(),
240
239
  code: e.string().optional(),
241
240
  libelle: se.optional()
242
241
  }), ut = e.object({
@@ -248,7 +247,7 @@ const Qe = [
248
247
  }), H = e.lazy(
249
248
  () => e.object({
250
249
  schemaVersion: e.string().optional(),
251
- xsiType: Pe.optional(),
250
+ xsiType: Xe.optional(),
252
251
  uid: T().meta({ description: "Identifiant unique de l'organe" }),
253
252
  codeType: ge,
254
253
  libelle: e.string().meta({ description: "Nom complet." }),
@@ -274,7 +273,7 @@ const Qe = [
274
273
  secretariat: lt.optional(),
275
274
  numero: e.string().optional(),
276
275
  lieu: mt.optional(),
277
- positionPolitique: Ve.optional(),
276
+ positionPolitique: Fe.optional(),
278
277
  preseance: e.string().optional().meta({
279
278
  description: "Plus le groupe politique est important, plus la préséance est proche de 1. Nombre entier. Uniquement renseigné pour les groupes politiques (dont le codeType est égal à GP)."
280
279
  }),
@@ -296,8 +295,8 @@ const Qe = [
296
295
  uid: T().meta({ description: "Identifiant unique du déport" }),
297
296
  chronotag: e.string(),
298
297
  legislature: e.string(),
299
- refActeur: Y().meta({ description: "Référence à l'acteur" }),
300
- dateCreation: K(),
298
+ refActeur: K().meta({ description: "Référence à l'acteur" }),
299
+ dateCreation: Y(),
301
300
  datePublication: x(),
302
301
  portee: G,
303
302
  lecture: G,
@@ -309,28 +308,28 @@ const Qe = [
309
308
  acteurs: e.array(_e)
310
309
  });
311
310
  function gt(t) {
312
- const n = _e.safeParse(JSON.parse(t));
313
- if (!n.success)
314
- throw new Error(ee("ActeurClean", n.error));
315
- return n.data;
311
+ const i = _e.safeParse(JSON.parse(t));
312
+ if (!i.success)
313
+ throw new Error(ee("ActeurClean", i.error));
314
+ return i.data;
316
315
  }
317
316
  function ft(t) {
318
- const n = H.safeParse(JSON.parse(t));
319
- if (!n.success)
320
- throw new Error(ee("OrganeClean", n.error));
321
- return n.data;
317
+ const i = H.safeParse(JSON.parse(t));
318
+ if (!i.success)
319
+ throw new Error(ee("OrganeClean", i.error));
320
+ return i.data;
322
321
  }
323
322
  function _t(t) {
324
- const n = he.safeParse(JSON.parse(t));
325
- if (!n.success)
326
- throw new Error(ee("DeportClean", n.error));
327
- return n.data;
323
+ const i = he.safeParse(JSON.parse(t));
324
+ if (!i.success)
325
+ throw new Error(ee("DeportClean", i.error));
326
+ return i.data;
328
327
  }
329
328
  function ht(t) {
330
- const n = pt.safeParse(JSON.parse(t));
331
- if (!n.success)
332
- throw new Error(ee("ActeursEtOrganesClean", n.error));
333
- return n.data;
329
+ const i = pt.safeParse(JSON.parse(t));
330
+ if (!i.success)
331
+ throw new Error(ee("ActeursEtOrganesClean", i.error));
332
+ return i.data;
334
333
  }
335
334
  function jt(t) {
336
335
  return JSON.stringify(t, null, 2);
@@ -344,11 +343,11 @@ function bt(t) {
344
343
  function yt(t) {
345
344
  return JSON.stringify(t, null, 2);
346
345
  }
347
- function ee(t, n) {
348
- const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
346
+ function ee(t, i) {
347
+ const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
349
348
  `);
350
349
  return `Invalid ${t}:
351
- ${i}`;
350
+ ${n}`;
352
351
  }
353
352
  const Z = {
354
353
  toActeur: gt,
@@ -372,10 +371,10 @@ const Z = {
372
371
  id: e.string().optional(),
373
372
  qualite: e.string().optional()
374
373
  }).meta({ description: "Orateur de la séance du débat." }), At = e.object({
375
- orateur: V(ne)
376
- }), vt = e.union([
374
+ orateur: F(ne)
375
+ }), Ct = e.union([
377
376
  At,
378
- V(ne),
377
+ F(ne),
379
378
  ne,
380
379
  e.string()
381
380
  ]), M = e.lazy(
@@ -391,11 +390,11 @@ const Z = {
391
390
  code_style: e.string().optional(),
392
391
  code_parole: e.string().optional(),
393
392
  valeur: e.string().optional(),
394
- orateurs: vt.optional(),
393
+ orateurs: Ct.optional(),
395
394
  texte: e.union([k, e.string()]).optional(),
396
- paragraphe: V(M).optional(),
397
- interExtraction: V(M).optional(),
398
- point: V(M).optional(),
395
+ paragraphe: F(M).optional(),
396
+ interExtraction: F(M).optional(),
397
+ point: F(M).optional(),
399
398
  structure: e.string().optional(),
400
399
  id_acteur: e.string().optional(),
401
400
  id_mandat: e.string().optional(),
@@ -407,27 +406,27 @@ const Z = {
407
406
  adt: e.string().optional(),
408
407
  ssadt: e.string().optional(),
409
408
  roledebat: e.string().optional(),
410
- changementPresidence: V(M).optional(),
409
+ changementPresidence: F(M).optional(),
411
410
  type_debat: e.string().optional(),
412
- decision: Je.optional().meta({
411
+ decision: Pe.optional().meta({
413
412
  description: "Décision prise à l'issue du point de débat."
414
413
  }),
415
414
  ouvertureSeance: M.optional(),
416
415
  qualite: e.string().optional(),
417
416
  nom_orateur: e.string().optional()
418
417
  }).meta({ description: "Point de la séance du débat." })
419
- ), Ct = e.object({
418
+ ), vt = e.object({
420
419
  point: M
421
420
  }), It = e.object({
422
421
  journee: e.string(),
423
422
  session: e.string()
424
- }), Ft = e.object({
423
+ }), Vt = e.object({
425
424
  quantiemes: It,
426
- ouvertureSeance: V(M).optional(),
427
- point: V(M),
428
- finSeance: Ct.optional(),
429
- paragraphe: V(M).optional()
430
- }).meta({ description: "Contenu de la séance du débat." }), Vt = e.object({
425
+ ouvertureSeance: F(M).optional(),
426
+ point: F(M),
427
+ finSeance: vt.optional(),
428
+ paragraphe: F(M).optional()
429
+ }).meta({ description: "Contenu de la séance du débat." }), Ft = e.object({
431
430
  id_syceron: e.string(),
432
431
  intitule: e.string().optional(),
433
432
  sousIntitule: e.string().optional(),
@@ -435,26 +434,26 @@ const Z = {
435
434
  }), E = e.lazy(
436
435
  () => e.object({
437
436
  valeur_pts_odj: e.string().optional(),
438
- titreStruct: Vt,
439
- para: V(
437
+ titreStruct: Ft,
438
+ para: F(
440
439
  e.union([k, e.string(), e.unknown()])
441
440
  ).optional(),
442
- sommaire2: V(E).optional(),
443
- sommaire3: V(E).optional(),
444
- presidentSeance: V(k).optional(),
441
+ sommaire2: F(E).optional(),
442
+ sommaire3: F(E).optional(),
443
+ presidentSeance: F(k).optional(),
445
444
  type_debat: e.string().optional()
446
445
  }).meta({ description: "Sommaire de la séance du débat." })
447
446
  ), Dt = e.object({
448
447
  presidentSeance: k.meta({
449
448
  description: "Président de la séance."
450
449
  }),
451
- sommaire1: V(E).meta({
450
+ sommaire1: F(E).meta({
452
451
  description: "Premier niveau de sommaire."
453
452
  }),
454
- sommaire3: V(E).optional().meta({ description: "Troisième niveau de sommaire." }),
455
- sommaire2: V(E).optional().meta({ description: "Second niveau de sommaire." }),
456
- para: V(k).optional().meta({ description: "Paragraphe de texte libre dans le sommaire." })
457
- }).meta({ description: "Sommaire de la séance du débat." }), Pt = e.object({
453
+ sommaire3: F(E).optional().meta({ description: "Troisième niveau de sommaire." }),
454
+ sommaire2: F(E).optional().meta({ description: "Second niveau de sommaire." }),
455
+ para: F(k).optional().meta({ description: "Paragraphe de texte libre dans le sommaire." })
456
+ }).meta({ description: "Sommaire de la séance du débat." }), Xt = e.object({
458
457
  dateSeance: e.string(),
459
458
  dateSeanceJour: e.string(),
460
459
  numSeanceJour: e.string(),
@@ -477,55 +476,55 @@ const Z = {
477
476
  }),
478
477
  seanceRef: e.string(),
479
478
  sessionRef: e.string(),
480
- metadonnees: Pt,
481
- contenu: Ft,
479
+ metadonnees: Xt,
480
+ contenu: Vt,
482
481
  videoUrl: e.string().optional(),
483
482
  videoTimecode: e.number().optional()
484
483
  }).meta({
485
484
  title: "Débat",
486
485
  description: "Compte rendu des débats en séance."
487
- }), Xt = e.object({
486
+ }), Pt = e.object({
488
487
  comptesRendus: e.array(je)
489
488
  });
490
- function Ot(t) {
491
- const n = je.safeParse(JSON.parse(t));
492
- if (!n.success)
493
- throw new Error(Se("CompteRenduClean", n.error));
494
- return n.data;
495
- }
496
489
  function wt(t) {
497
- const n = Xt.safeParse(JSON.parse(t));
498
- if (!n.success)
499
- throw new Error(Se("ComptesRendusClean", n.error));
500
- return n.data;
490
+ const i = je.safeParse(JSON.parse(t));
491
+ if (!i.success)
492
+ throw new Error(Se("CompteRenduClean", i.error));
493
+ return i.data;
501
494
  }
502
- function qt(t) {
495
+ function Ot(t) {
496
+ const i = Pt.safeParse(JSON.parse(t));
497
+ if (!i.success)
498
+ throw new Error(Se("ComptesRendusClean", i.error));
499
+ return i.data;
500
+ }
501
+ function Rt(t) {
503
502
  return JSON.stringify(t, null, 2);
504
503
  }
505
- function Lt(t) {
504
+ function qt(t) {
506
505
  return JSON.stringify(t, null, 2);
507
506
  }
508
- function Se(t, n) {
509
- const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
507
+ function Se(t, i) {
508
+ const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
510
509
  `);
511
510
  return `Invalid ${t}:
512
- ${i}`;
511
+ ${n}`;
513
512
  }
514
513
  const re = {
515
- toCompteRendu: Ot,
516
- compteRenduToJson: qt,
517
- toComptesRendus: wt,
518
- comptesRendusToJson: Lt
519
- }, Rt = e.object({
514
+ toCompteRendu: wt,
515
+ compteRenduToJson: Rt,
516
+ toComptesRendus: Ot,
517
+ comptesRendusToJson: qt
518
+ }, Lt = e.object({
520
519
  texte: e.string().optional()
521
520
  }), xt = e.object({
522
521
  libelle: e.string()
523
522
  }), $t = e.object({
524
- code: Xe,
523
+ code: we,
525
524
  libelle: fe
526
525
  }), Mt = e.object({
527
526
  codeTypeVote: qe,
528
- libelleTypeVote: we,
527
+ libelleTypeVote: Re,
529
528
  typeMajorite: Oe.meta({
530
529
  description: "La signification de ce champ n'est pas définie."
531
530
  })
@@ -545,19 +544,19 @@ const re = {
545
544
  }),
546
545
  annonce: fe,
547
546
  decompte: be
548
- }), P = e.object({
549
- acteurRef: Y().meta({ description: "Référence à l'acteur votant" }),
547
+ }), X = e.object({
548
+ acteurRef: K().meta({ description: "Référence à l'acteur votant" }),
550
549
  mandatRef: e.string(),
551
550
  parDelegation: e.boolean().optional(),
552
551
  numPlace: e.number().optional(),
553
552
  causePositionVote: Le.optional()
554
553
  }), zt = e.object({
555
- nonVotants: e.array(P).optional(),
556
- pour: e.array(P).optional(),
557
- contre: e.array(P).optional(),
558
- abstentions: e.array(P).optional()
554
+ nonVotants: e.array(X).optional(),
555
+ pour: e.array(X).optional(),
556
+ contre: e.array(X).optional(),
557
+ abstentions: e.array(X).optional()
559
558
  }), kt = e.object({
560
- positionMajoritaire: Re,
559
+ positionMajoritaire: xe,
561
560
  decompteVoix: be,
562
561
  decompteNominatif: zt
563
562
  }), Tt = e.object({
@@ -568,17 +567,17 @@ const re = {
568
567
  organeRef: z(),
569
568
  groupes: e.array(Tt)
570
569
  }), Jt = e.object({
571
- nonVotants: e.array(P).optional(),
572
- pour: e.array(P).optional(),
573
- contre: e.array(P).optional(),
574
- abstentions: e.array(P).optional(),
575
- nonVotantsVolontaires: e.array(P).optional()
570
+ nonVotants: e.array(X).optional(),
571
+ pour: e.array(X).optional(),
572
+ contre: e.array(X).optional(),
573
+ abstentions: e.array(X).optional(),
574
+ nonVotantsVolontaires: e.array(X).optional()
576
575
  }), Qt = e.object({
577
- nonVotants: e.array(P).optional(),
578
- pour: e.array(P).optional(),
579
- contre: e.array(P).optional(),
580
- abstentions: e.array(P).optional(),
581
- nonVotantsVolontaires: e.array(P).optional(),
576
+ nonVotants: e.array(X).optional(),
577
+ pour: e.array(X).optional(),
578
+ contre: e.array(X).optional(),
579
+ abstentions: e.array(X).optional(),
580
+ nonVotantsVolontaires: e.array(X).optional(),
582
581
  dysfonctionnement: Jt.optional()
583
582
  }), ye = e.object({
584
583
  schemaVersion: e.string().optional(),
@@ -596,36 +595,36 @@ const re = {
596
595
  seanceRef: e.string().meta({
597
596
  description: "Identifiant unique (uid) de l'entrée de l'{@link Reunion | agenda} correspondant au moment ou le vote a lieu."
598
597
  }),
599
- dateScrutin: K().meta({
598
+ dateScrutin: Y().meta({
600
599
  description: "Date à laquelle le vote a eu lieu."
601
600
  }),
602
601
  quantiemeJourSeance: e.string().meta({ description: "Numéro de la séance dans la journée." }),
603
602
  typeVote: Mt,
604
603
  sort: $t,
605
604
  titre: e.string().meta({ description: "Objet du vote." }),
606
- demandeur: Rt,
605
+ demandeur: Lt,
607
606
  objet: xt,
608
- modePublicationDesVotes: $e.meta({
607
+ modePublicationDesVotes: Me.meta({
609
608
  description: "La signification de ce champ n'est pas définie."
610
609
  }),
611
610
  syntheseVote: Nt,
612
611
  ventilationVotes: Ut,
613
612
  miseAuPoint: Qt.optional(),
614
- lieuVote: xe.optional()
613
+ lieuVote: $e.optional()
615
614
  }), Et = e.object({
616
615
  scrutins: e.array(ye)
617
616
  });
618
617
  function Wt(t) {
619
- const n = ye.safeParse(JSON.parse(t));
620
- if (!n.success)
621
- throw new Error(Ae("ScrutinClean", n.error));
622
- return n.data;
618
+ const i = ye.safeParse(JSON.parse(t));
619
+ if (!i.success)
620
+ throw new Error(Ae("ScrutinClean", i.error));
621
+ return i.data;
623
622
  }
624
623
  function Zt(t) {
625
- const n = Et.safeParse(JSON.parse(t));
626
- if (!n.success)
627
- throw new Error(Ae("ScrutinsClean", n.error));
628
- return n.data;
624
+ const i = Et.safeParse(JSON.parse(t));
625
+ if (!i.success)
626
+ throw new Error(Ae("ScrutinsClean", i.error));
627
+ return i.data;
629
628
  }
630
629
  function Bt(t) {
631
630
  return JSON.stringify(t, null, 2);
@@ -633,11 +632,11 @@ function Bt(t) {
633
632
  function Gt(t) {
634
633
  return JSON.stringify(t, null, 2);
635
634
  }
636
- function Ae(t, n) {
637
- const i = n.issues.map((o) => ` - ${o.path.join(".")}: ${o.message}`).join(`
635
+ function Ae(t, i) {
636
+ const n = i.issues.map((a) => ` - ${a.path.join(".")}: ${a.message}`).join(`
638
637
  `);
639
638
  return `Invalid ${t}:
640
- ${i}`;
639
+ ${n}`;
641
640
  }
642
641
  const le = {
643
642
  toScrutin: Wt,
@@ -919,16 +918,16 @@ const le = {
919
918
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVII",
920
919
  ignoreForWeb: !0,
921
920
  legislature: l.DixSept,
922
- repairZip: async (t, n) => {
923
- const i = s.join(n, t.filename);
924
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.pathExists(
925
- s.join(n, `${t.filename}.temp`, "acteur")
926
- ) && await r.move(
927
- s.join(n, `${t.filename}.temp`, "acteur"),
928
- s.join(i, "acteur")
929
- ), await r.move(
930
- s.join(n, `${t.filename}.temp`, "organe"),
931
- s.join(i, "organe")
921
+ repairZip: async (t, i) => {
922
+ const n = s.join(i, t.filename);
923
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.pathExists(
924
+ s.join(i, `${t.filename}.temp`, "acteur")
925
+ ) && await o.move(
926
+ s.join(i, `${t.filename}.temp`, "acteur"),
927
+ s.join(n, "acteur")
928
+ ), await o.move(
929
+ s.join(i, `${t.filename}.temp`, "organe"),
930
+ s.join(n, "organe")
932
931
  );
933
932
  },
934
933
  structure: h.SegmentedFiles,
@@ -964,16 +963,16 @@ const le = {
964
963
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVI",
965
964
  ignoreForWeb: !0,
966
965
  legislature: l.Seize,
967
- repairZip: async (t, n) => {
968
- const i = s.join(n, t.filename);
969
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.pathExists(
970
- s.join(n, `${t.filename}.temp`, "acteur")
971
- ) && await r.move(
972
- s.join(n, `${t.filename}.temp`, "acteur"),
973
- s.join(i, "acteur")
974
- ), await r.move(
975
- s.join(n, `${t.filename}.temp`, "organe"),
976
- s.join(i, "organe")
966
+ repairZip: async (t, i) => {
967
+ const n = s.join(i, t.filename);
968
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.pathExists(
969
+ s.join(i, `${t.filename}.temp`, "acteur")
970
+ ) && await o.move(
971
+ s.join(i, `${t.filename}.temp`, "acteur"),
972
+ s.join(n, "acteur")
973
+ ), await o.move(
974
+ s.join(i, `${t.filename}.temp`, "organe"),
975
+ s.join(n, "organe")
977
976
  );
978
977
  },
979
978
  structure: h.SegmentedFiles,
@@ -1009,14 +1008,14 @@ const le = {
1009
1008
  name: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XV",
1010
1009
  ignoreForWeb: !0,
1011
1010
  legislature: l.Quinze,
1012
- repairZip: async (t, n) => {
1013
- const i = s.join(n, t.filename);
1014
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1015
- s.join(n, `${t.filename}.temp`, "acteur"),
1016
- s.join(i, "acteur")
1017
- ), await r.move(
1018
- s.join(n, `${t.filename}.temp`, "organe"),
1019
- s.join(i, "organe")
1011
+ repairZip: async (t, i) => {
1012
+ const n = s.join(i, t.filename);
1013
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1014
+ s.join(i, `${t.filename}.temp`, "acteur"),
1015
+ s.join(n, "acteur")
1016
+ ), await o.move(
1017
+ s.join(i, `${t.filename}.temp`, "organe"),
1018
+ s.join(n, "organe")
1020
1019
  );
1021
1020
  },
1022
1021
  structure: h.SegmentedFiles,
@@ -1042,17 +1041,17 @@ const le = {
1042
1041
  name: "AMO50_acteurs_mandats_organes_divises_XVII",
1043
1042
  ignoreForWeb: !0,
1044
1043
  legislature: l.DixSept,
1045
- repairZip: async (t, n) => {
1046
- const i = s.join(n, t.filename);
1047
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1048
- s.join(n, `${t.filename}.temp`, "mandat"),
1049
- s.join(i, "mandat")
1050
- ), await r.move(
1051
- s.join(n, `${t.filename}.temp`, "acteur"),
1052
- s.join(i, "acteur")
1053
- ), await r.move(
1054
- s.join(n, `${t.filename}.temp`, "organe"),
1055
- s.join(i, "organe")
1044
+ repairZip: async (t, i) => {
1045
+ const n = s.join(i, t.filename);
1046
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1047
+ s.join(i, `${t.filename}.temp`, "mandat"),
1048
+ s.join(n, "mandat")
1049
+ ), await o.move(
1050
+ s.join(i, `${t.filename}.temp`, "acteur"),
1051
+ s.join(n, "acteur")
1052
+ ), await o.move(
1053
+ s.join(i, `${t.filename}.temp`, "organe"),
1054
+ s.join(n, "organe")
1056
1055
  );
1057
1056
  },
1058
1057
  structure: h.SegmentedFiles,
@@ -1078,17 +1077,17 @@ const le = {
1078
1077
  name: "AMO50_acteurs_mandats_organes_divises_XVI",
1079
1078
  ignoreForWeb: !0,
1080
1079
  legislature: l.Seize,
1081
- repairZip: async (t, n) => {
1082
- const i = s.join(n, t.filename);
1083
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1084
- s.join(n, `${t.filename}.temp`, "mandat"),
1085
- s.join(i, "mandat")
1086
- ), await r.move(
1087
- s.join(n, `${t.filename}.temp`, "acteur"),
1088
- s.join(i, "acteur")
1089
- ), await r.move(
1090
- s.join(n, `${t.filename}.temp`, "organe"),
1091
- s.join(i, "organe")
1080
+ repairZip: async (t, i) => {
1081
+ const n = s.join(i, t.filename);
1082
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1083
+ s.join(i, `${t.filename}.temp`, "mandat"),
1084
+ s.join(n, "mandat")
1085
+ ), await o.move(
1086
+ s.join(i, `${t.filename}.temp`, "acteur"),
1087
+ s.join(n, "acteur")
1088
+ ), await o.move(
1089
+ s.join(i, `${t.filename}.temp`, "organe"),
1090
+ s.join(n, "organe")
1092
1091
  );
1093
1092
  },
1094
1093
  structure: h.SegmentedFiles,
@@ -1114,17 +1113,17 @@ const le = {
1114
1113
  name: "AMO50_acteurs_mandats_organes_divises_XV",
1115
1114
  ignoreForWeb: !0,
1116
1115
  legislature: l.Quinze,
1117
- repairZip: async (t, n) => {
1118
- const i = s.join(n, t.filename);
1119
- await r.pathExists(i) && await r.remove(i), await r.mkdir(i), await r.move(
1120
- s.join(n, `${t.filename}.temp`, "mandat"),
1121
- s.join(i, "mandat")
1122
- ), await r.move(
1123
- s.join(n, `${t.filename}.temp`, "acteur"),
1124
- s.join(i, "acteur")
1125
- ), await r.move(
1126
- s.join(n, `${t.filename}.temp`, "organe"),
1127
- s.join(i, "organe")
1116
+ repairZip: async (t, i) => {
1117
+ const n = s.join(i, t.filename);
1118
+ await o.pathExists(n) && await o.remove(n), await o.mkdir(n), await o.move(
1119
+ s.join(i, `${t.filename}.temp`, "mandat"),
1120
+ s.join(n, "mandat")
1121
+ ), await o.move(
1122
+ s.join(i, `${t.filename}.temp`, "acteur"),
1123
+ s.join(n, "acteur")
1124
+ ), await o.move(
1125
+ s.join(i, `${t.filename}.temp`, "organe"),
1126
+ s.join(n, "organe")
1128
1127
  );
1129
1128
  },
1130
1129
  structure: h.SegmentedFiles,
@@ -1342,11 +1341,11 @@ const le = {
1342
1341
  filename: "Comptes_Rendus_Seances_XVII.xml",
1343
1342
  name: "Comptes_Rendus_Seances_XVII",
1344
1343
  legislature: l.DixSept,
1345
- repairZip: async (t, n) => {
1346
- const i = s.join(n, t.filename);
1347
- await r.pathExists(i) && await r.remove(i), await r.move(
1348
- s.join(n, `${t.filename}.temp`, "xml"),
1349
- i
1344
+ repairZip: async (t, i) => {
1345
+ const n = s.join(i, t.filename);
1346
+ await o.pathExists(n) && await o.remove(n), await o.move(
1347
+ s.join(i, `${t.filename}.temp`, "xml"),
1348
+ n
1350
1349
  );
1351
1350
  },
1352
1351
  structure: h.SegmentedFiles,
@@ -1357,11 +1356,11 @@ const le = {
1357
1356
  filename: "Comptes_Rendus_Seances_XVI.xml",
1358
1357
  name: "Comptes_Rendus_Seances_XVI",
1359
1358
  legislature: l.Seize,
1360
- repairZip: async (t, n) => {
1361
- const i = s.join(n, t.filename);
1362
- await r.pathExists(i) && await r.remove(i), await r.move(
1363
- s.join(n, `${t.filename}.temp`, "xml"),
1364
- i
1359
+ repairZip: async (t, i) => {
1360
+ const n = s.join(i, t.filename);
1361
+ await o.pathExists(n) && await o.remove(n), await o.move(
1362
+ s.join(i, `${t.filename}.temp`, "xml"),
1363
+ n
1365
1364
  );
1366
1365
  },
1367
1366
  structure: h.SegmentedFiles,
@@ -1377,63 +1376,102 @@ const le = {
1377
1376
  structure: h.SegmentedFiles,
1378
1377
  title: "Comptes rendus des commissions de la XVIIème législature"
1379
1378
  }
1379
+ ],
1380
+ comptesRendus: [
1381
+ {
1382
+ filename: "Comptes_Rendus_Seances_XVII.xml",
1383
+ name: "Comptes_Rendus_Seances_XVII",
1384
+ legislature: l.DixSept,
1385
+ repairZip: async (t, i) => {
1386
+ const n = s.join(i, t.filename);
1387
+ await o.pathExists(n) && await o.remove(n), await o.move(
1388
+ s.join(i, `${t.filename}.temp`, "xml"),
1389
+ n
1390
+ );
1391
+ },
1392
+ structure: h.SegmentedFiles,
1393
+ title: "Comptes rendus des séances publiques de la XVIIème législature",
1394
+ url: "https://data.assemblee-nationale.fr/static/openData/repository/17/vp/syceronbrut/syseron.xml.zip"
1395
+ },
1396
+ {
1397
+ filename: "Comptes_Rendus_Seances_XVI.xml",
1398
+ name: "Comptes_Rendus_Seances_XVI",
1399
+ legislature: l.Seize,
1400
+ repairZip: async (t, i) => {
1401
+ const n = s.join(i, t.filename);
1402
+ await o.pathExists(n) && await o.remove(n), await o.move(
1403
+ s.join(i, `${t.filename}.temp`, "xml"),
1404
+ n
1405
+ );
1406
+ },
1407
+ structure: h.SegmentedFiles,
1408
+ title: "Comptes rendus des séances publiques de la XVIème législature",
1409
+ url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
1410
+ },
1411
+ {
1412
+ filename: "Comptes_Rendus_Commissions_XVII.xml",
1413
+ name: "Comptes_Rendus_Commissions_XVII",
1414
+ legislature: l.DixSept,
1415
+ structure: h.SegmentedFiles,
1416
+ title: "Comptes rendus des commissions de la XVIIème législature"
1417
+ }
1380
1418
  ]
1381
1419
  };
1382
- function* N(t, n, i, o, p, { log: f = !1, noValidation: _ = !1, sinceCommits: m } = {}) {
1420
+ function* N(t, i, n, a, p, { log: f = !1, noValidation: _ = !1, sinceCommits: m } = {}) {
1383
1421
  const S = /* @__PURE__ */ new Set();
1384
- for (const v of i) {
1385
- if (v.ignoreForWeb || !Ht(n, v))
1422
+ for (const C of n) {
1423
+ if (C.ignoreForWeb || !Ht(i, C))
1386
1424
  continue;
1387
- const C = s.join(t, `${v.name}_nettoye`), I = m ? m[v.name] : void 0, L = I ? ue(C, I, {
1425
+ const v = s.join(t, `${C.name}_nettoye`), I = m ? m[C.name] : void 0, q = I ? ue(v, I, {
1388
1426
  diffFilter: "AMR"
1389
1427
  }) : null;
1390
1428
  f && I && (console.log(
1391
- `Filtering files changed since commit ${I} in ${C}`
1392
- ), console.log(`Found ${L?.size || 0} changed files`));
1393
- for (const D of R(C, p)) {
1429
+ `Filtering files changed since commit ${I} in ${v}`
1430
+ ), console.log(`Found ${q?.size || 0} changed files`));
1431
+ for (const D of L(v, p)) {
1394
1432
  if (!D[D.length - 1].endsWith(".json"))
1395
1433
  continue;
1396
- const X = s.join(C, ...D), O = s.join(...D), w = L?.get(O);
1397
- if (L != null && w == null)
1434
+ const P = s.join(v, ...D), w = s.join(...D), O = q?.get(w);
1435
+ if (q != null && O == null)
1398
1436
  continue;
1399
- f && console.log(`Loading file: ${X}…`);
1400
- let a = r.readFileSync(X, { encoding: "utf8" });
1401
- const u = _ ? JSON.parse(a) : o(a);
1437
+ f && console.log(`Loading file: ${P}…`);
1438
+ let r = o.readFileSync(P, { encoding: "utf8" });
1439
+ const u = _ ? JSON.parse(r) : a(r);
1402
1440
  S.has(u.uid) || (S.add(u.uid), yield {
1403
- datasetLegislature: v.legislature,
1404
- filePath: X,
1441
+ datasetLegislature: C.legislature,
1442
+ filePath: P,
1405
1443
  item: u,
1406
- ...w && { gitStatus: w }
1407
- }, a = null);
1444
+ ...O && { gitStatus: O }
1445
+ }, r = null);
1408
1446
  }
1409
1447
  if (I) {
1410
1448
  const D = ue(
1411
- C,
1449
+ v,
1412
1450
  I,
1413
1451
  {
1414
1452
  diffFilter: "D"
1415
1453
  }
1416
1454
  );
1417
- for (const [$, X] of D.entries()) {
1418
- const O = s.join(C, $);
1419
- f && console.log(`Deleted file: ${O}`);
1420
- const a = { uid: s.parse($).name };
1455
+ for (const [$, P] of D.entries()) {
1456
+ const w = s.join(v, $);
1457
+ f && console.log(`Deleted file: ${w}`);
1458
+ const r = { uid: s.parse($).name };
1421
1459
  yield {
1422
- datasetLegislature: v.legislature,
1423
- filePath: O,
1424
- item: a,
1425
- gitStatus: X
1460
+ datasetLegislature: C.legislature,
1461
+ filePath: w,
1462
+ item: r,
1463
+ gitStatus: P
1426
1464
  };
1427
1465
  }
1428
1466
  }
1429
1467
  }
1430
1468
  S.clear();
1431
1469
  }
1432
- function Ht(t, n) {
1433
- const i = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
1434
- return t === void 0 || i.includes(0) || n.legislature === l.All ? !0 : i.includes(n.legislature);
1470
+ function Ht(t, i) {
1471
+ const n = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
1472
+ return t === void 0 || n.includes(0) || i.legislature === l.All ? !0 : n.includes(i.legislature);
1435
1473
  }
1436
- function* un(t, n, i = {}, o) {
1474
+ function* cn(t, i, n = {}, a) {
1437
1475
  for (const {
1438
1476
  datasetLegislature: p,
1439
1477
  item: f,
@@ -1441,11 +1479,11 @@ function* un(t, n, i = {}, o) {
1441
1479
  gitStatus: m
1442
1480
  } of N(
1443
1481
  t,
1444
- n,
1445
- o ?? A.acteursEtOrganes,
1482
+ i,
1483
+ a ?? A.acteursEtOrganes,
1446
1484
  Z.toActeur,
1447
1485
  ["acteurs"],
1448
- i
1486
+ n
1449
1487
  ))
1450
1488
  yield {
1451
1489
  acteur: f,
@@ -1454,7 +1492,7 @@ function* un(t, n, i = {}, o) {
1454
1492
  ...m && { gitStatus: m }
1455
1493
  };
1456
1494
  }
1457
- function* mn(t, n, i = {}, o) {
1495
+ function* un(t, i, n = {}, a) {
1458
1496
  for (const {
1459
1497
  item: p,
1460
1498
  datasetLegislature: f,
@@ -1462,11 +1500,11 @@ function* mn(t, n, i = {}, o) {
1462
1500
  gitStatus: m
1463
1501
  } of N(
1464
1502
  t,
1465
- n,
1466
- o ?? A.acteursEtOrganes,
1503
+ i,
1504
+ a ?? A.acteursEtOrganes,
1467
1505
  Z.toOrgane,
1468
1506
  ["organes"],
1469
- i
1507
+ n
1470
1508
  ))
1471
1509
  yield {
1472
1510
  organe: p,
@@ -1475,7 +1513,7 @@ function* mn(t, n, i = {}, o) {
1475
1513
  ...m && { gitStatus: m }
1476
1514
  };
1477
1515
  }
1478
- function* dn(t, n, i = {}, o) {
1516
+ function* mn(t, i, n = {}, a) {
1479
1517
  for (const {
1480
1518
  datasetLegislature: p,
1481
1519
  item: f,
@@ -1483,11 +1521,11 @@ function* dn(t, n, i = {}, o) {
1483
1521
  gitStatus: m
1484
1522
  } of N(
1485
1523
  t,
1486
- n,
1487
- o ?? A.amendements,
1524
+ i,
1525
+ a ?? A.amendements,
1488
1526
  ie.toAmendement,
1489
1527
  [],
1490
- i
1528
+ n
1491
1529
  ))
1492
1530
  yield {
1493
1531
  amendement: f,
@@ -1496,7 +1534,7 @@ function* dn(t, n, i = {}, o) {
1496
1534
  ...m && { gitStatus: m }
1497
1535
  };
1498
1536
  }
1499
- function* pn(t, n, i = {}, o) {
1537
+ function* dn(t, i, n = {}, a) {
1500
1538
  for (const {
1501
1539
  item: p,
1502
1540
  datasetLegislature: f,
@@ -1504,11 +1542,11 @@ function* pn(t, n, i = {}, o) {
1504
1542
  gitStatus: m
1505
1543
  } of N(
1506
1544
  t,
1507
- n,
1508
- o ?? A.dossiersLegislatifs,
1545
+ i,
1546
+ a ?? A.dossiersLegislatifs,
1509
1547
  W.toDocument,
1510
1548
  ["documents"],
1511
- i
1549
+ n
1512
1550
  ))
1513
1551
  yield {
1514
1552
  document: p,
@@ -1517,7 +1555,7 @@ function* pn(t, n, i = {}, o) {
1517
1555
  ...m && { gitStatus: m }
1518
1556
  };
1519
1557
  }
1520
- function* gn(t, n, i = {}, o) {
1558
+ function* pn(t, i, n = {}, a) {
1521
1559
  for (const {
1522
1560
  item: p,
1523
1561
  datasetLegislature: f,
@@ -1525,11 +1563,11 @@ function* gn(t, n, i = {}, o) {
1525
1563
  gitStatus: m
1526
1564
  } of N(
1527
1565
  t,
1528
- n,
1529
- o ?? A.dossiersLegislatifs,
1566
+ i,
1567
+ a ?? A.dossiersLegislatifs,
1530
1568
  W.toDossierParlementaire,
1531
1569
  ["dossiers"],
1532
- i
1570
+ n
1533
1571
  ))
1534
1572
  yield {
1535
1573
  dossierParlementaire: p,
@@ -1538,7 +1576,7 @@ function* gn(t, n, i = {}, o) {
1538
1576
  ...m && { gitStatus: m }
1539
1577
  };
1540
1578
  }
1541
- function* fn(t, n, i = {}, o) {
1579
+ function* gn(t, i, n = {}, a) {
1542
1580
  for (const {
1543
1581
  item: p,
1544
1582
  datasetLegislature: f,
@@ -1546,11 +1584,11 @@ function* fn(t, n, i = {}, o) {
1546
1584
  gitStatus: m
1547
1585
  } of N(
1548
1586
  t,
1549
- n,
1550
- o ?? A.agendas,
1587
+ i,
1588
+ a ?? A.agendas,
1551
1589
  oe.toReunion,
1552
1590
  [],
1553
- i
1591
+ n
1554
1592
  ))
1555
1593
  yield {
1556
1594
  reunion: p,
@@ -1559,7 +1597,7 @@ function* fn(t, n, i = {}, o) {
1559
1597
  ...m && { gitStatus: m }
1560
1598
  };
1561
1599
  }
1562
- function* _n(t, n, i = {}, o) {
1600
+ function* fn(t, i, n = {}, a) {
1563
1601
  for (const {
1564
1602
  item: p,
1565
1603
  datasetLegislature: f,
@@ -1567,11 +1605,11 @@ function* _n(t, n, i = {}, o) {
1567
1605
  gitStatus: m
1568
1606
  } of N(
1569
1607
  t,
1570
- n,
1571
- o ?? A.scrutins,
1608
+ i,
1609
+ a ?? A.scrutins,
1572
1610
  le.toScrutin,
1573
1611
  [],
1574
- i
1612
+ n
1575
1613
  ))
1576
1614
  yield {
1577
1615
  scrutin: p,
@@ -1580,7 +1618,7 @@ function* _n(t, n, i = {}, o) {
1580
1618
  ...m && { gitStatus: m }
1581
1619
  };
1582
1620
  }
1583
- function* hn(t, n, i = {}, o) {
1621
+ function* _n(t, i, n = {}, a) {
1584
1622
  for (const {
1585
1623
  item: p,
1586
1624
  datasetLegislature: f,
@@ -1588,11 +1626,11 @@ function* hn(t, n, i = {}, o) {
1588
1626
  gitStatus: m
1589
1627
  } of N(
1590
1628
  t,
1591
- n,
1592
- o ?? A.questions,
1629
+ i,
1630
+ a ?? A.questions,
1593
1631
  ae.toQuestion,
1594
1632
  [],
1595
- i
1633
+ n
1596
1634
  ))
1597
1635
  yield {
1598
1636
  question: p,
@@ -1601,7 +1639,7 @@ function* hn(t, n, i = {}, o) {
1601
1639
  ...m && { gitStatus: m }
1602
1640
  };
1603
1641
  }
1604
- function* jn(t, n, i = {}, o) {
1642
+ function* hn(t, i, n = {}, a) {
1605
1643
  for (const {
1606
1644
  item: p,
1607
1645
  datasetLegislature: f,
@@ -1609,11 +1647,11 @@ function* jn(t, n, i = {}, o) {
1609
1647
  gitStatus: m
1610
1648
  } of N(
1611
1649
  t,
1612
- n,
1613
- o ?? A.comptesRendusSeances.concat(A.comptesRendusCommissions),
1650
+ i,
1651
+ a ?? A.comptesRendusSeances.concat(A.comptesRendusCommissions),
1614
1652
  re.toCompteRendu,
1615
1653
  [],
1616
- i
1654
+ n
1617
1655
  ))
1618
1656
  yield {
1619
1657
  compteRendu: p,
@@ -1622,58 +1660,58 @@ function* jn(t, n, i = {}, o) {
1622
1660
  ...m && { gitStatus: m }
1623
1661
  };
1624
1662
  }
1625
- function Sn(t, n, i, { log: o = !1 } = {}) {
1663
+ function jn(t, i, n, { log: a = !1 } = {}) {
1626
1664
  const p = {}, f = {};
1627
- if (n & F.ActeursEtOrganes)
1628
- for (const a of A.acteursEtOrganes) {
1629
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1665
+ if (i & V.ActeursEtOrganes)
1666
+ for (const r of A.acteursEtOrganes) {
1667
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1630
1668
  continue;
1631
1669
  const u = s.join(
1632
1670
  t,
1633
- a.filename.replace(/\.json$/, "_nettoye")
1671
+ r.filename.replace(/\.json$/, "_nettoye")
1634
1672
  );
1635
- for (const d of R(u, ["acteurs"])) {
1673
+ for (const d of L(u, ["acteurs"])) {
1636
1674
  if (!d[d.length - 1].endsWith(".json"))
1637
1675
  continue;
1638
1676
  const c = s.join(u, ...d);
1639
- o && console.log(`Loading file: ${c}…`);
1640
- const j = r.readFileSync(c, {
1677
+ a && console.log(`Loading file: ${c}…`);
1678
+ const j = o.readFileSync(c, {
1641
1679
  encoding: "utf8"
1642
1680
  }), g = Z.toActeur(j);
1643
1681
  p[g.uid] === void 0 && (p[g.uid] = g);
1644
1682
  }
1645
- for (const d of R(u, ["organes"])) {
1683
+ for (const d of L(u, ["organes"])) {
1646
1684
  if (!d[d.length - 1].endsWith(".json"))
1647
1685
  continue;
1648
1686
  const c = s.join(u, ...d);
1649
- o && console.log(`Loading file: ${c}…`);
1650
- const j = r.readFileSync(c, {
1687
+ a && console.log(`Loading file: ${c}…`);
1688
+ const j = o.readFileSync(c, {
1651
1689
  encoding: "utf8"
1652
1690
  }), g = Z.toOrgane(j);
1653
1691
  f[g.uid] === void 0 && (f[g.uid] = g);
1654
1692
  }
1655
1693
  }
1656
1694
  const _ = {}, m = {}, S = {};
1657
- if (n & F.Agendas)
1658
- for (const a of A.agendas) {
1659
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1695
+ if (i & V.Agendas)
1696
+ for (const r of A.agendas) {
1697
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1660
1698
  continue;
1661
1699
  const u = s.join(
1662
1700
  t,
1663
- a.filename.replace(/\.json$/, "_nettoye")
1701
+ r.filename.replace(/\.json$/, "_nettoye")
1664
1702
  );
1665
- for (const d of R(u)) {
1703
+ for (const d of L(u)) {
1666
1704
  if (!d[d.length - 1].endsWith(".json"))
1667
1705
  continue;
1668
1706
  const c = s.join(u, ...d);
1669
- o && console.log(`Loading file: ${c}…`);
1670
- const j = r.readFileSync(c, {
1707
+ a && console.log(`Loading file: ${c}…`);
1708
+ const j = o.readFileSync(c, {
1671
1709
  encoding: "utf8"
1672
1710
  }), g = oe.toReunion(j);
1673
1711
  _[g.uid] === void 0 && (_[g.uid] = g);
1674
- const q = g.timestampDebut.toISOString().split("T")[0];
1675
- let U = m[q];
1676
- U === void 0 && (U = m[q] = []), U.push(g);
1712
+ const R = g.timestampDebut.toISOString().split("T")[0];
1713
+ let U = m[R];
1714
+ U === void 0 && (U = m[R] = []), U.push(g);
1677
1715
  const J = g.odj;
1678
1716
  if (J !== void 0)
1679
1717
  for (const Q of J.pointsOdj || [])
@@ -1683,251 +1721,251 @@ function Sn(t, n, i, { log: o = !1 } = {}) {
1683
1721
  }
1684
1722
  }
1685
1723
  }
1686
- const v = {};
1687
- if (n & F.Amendements)
1688
- for (const a of A.amendements) {
1689
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1724
+ const C = {};
1725
+ if (i & V.Amendements)
1726
+ for (const r of A.amendements) {
1727
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1690
1728
  continue;
1691
1729
  const u = s.join(
1692
1730
  t,
1693
- a.filename.replace(/\.json$/, "_nettoye")
1731
+ r.filename.replace(/\.json$/, "_nettoye")
1694
1732
  );
1695
- for (const d of R(u)) {
1733
+ for (const d of L(u)) {
1696
1734
  if (!d[d.length - 1].endsWith(".json"))
1697
1735
  continue;
1698
1736
  const c = s.join(u, ...d);
1699
- o && console.log(`Loading file: ${c}…`);
1700
- const j = r.readFileSync(c, {
1737
+ a && console.log(`Loading file: ${c}…`);
1738
+ const j = o.readFileSync(c, {
1701
1739
  encoding: "utf8"
1702
1740
  }), g = ie.toAmendement(j);
1703
- v[g.uid] === void 0 && (v[g.uid] = g);
1741
+ C[g.uid] === void 0 && (C[g.uid] = g);
1704
1742
  }
1705
1743
  }
1706
- const C = {}, I = {}, L = {}, D = {};
1707
- if (n & F.DossiersLegislatifs)
1708
- for (const a of A.dossiersLegislatifs) {
1709
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1744
+ const v = {}, I = {}, q = {}, D = {};
1745
+ if (i & V.DossiersLegislatifs)
1746
+ for (const r of A.dossiersLegislatifs) {
1747
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1710
1748
  continue;
1711
1749
  const u = s.join(
1712
1750
  t,
1713
- a.filename.replace(/\.json$/, "_nettoye")
1751
+ r.filename.replace(/\.json$/, "_nettoye")
1714
1752
  );
1715
- for (const d of R(u, ["documents"])) {
1753
+ for (const d of L(u, ["documents"])) {
1716
1754
  if (!d[d.length - 1].endsWith(".json"))
1717
1755
  continue;
1718
1756
  const c = s.join(u, ...d);
1719
- o && console.log(`Loading file: ${c}…`);
1720
- const j = r.readFileSync(c, {
1757
+ a && console.log(`Loading file: ${c}…`);
1758
+ const j = o.readFileSync(c, {
1721
1759
  encoding: "utf8"
1722
1760
  }), g = W.toDocument(j);
1723
- C[g.uid] === void 0 && (C[g.uid] = g);
1761
+ v[g.uid] === void 0 && (v[g.uid] = g);
1724
1762
  }
1725
- for (const d of R(u, ["dossiers"])) {
1763
+ for (const d of L(u, ["dossiers"])) {
1726
1764
  if (!d[d.length - 1].endsWith(".json"))
1727
1765
  continue;
1728
1766
  const c = s.join(u, ...d);
1729
- o && console.log(`Loading file: ${c}…`);
1730
- const j = r.readFileSync(c, {
1767
+ a && console.log(`Loading file: ${c}…`);
1768
+ const j = o.readFileSync(c, {
1731
1769
  encoding: "utf8"
1732
- }), g = W.toDossierParlementaire(j), q = g.titreDossier;
1733
- q.senatChemin && I[q.senatChemin] === void 0 && (I[q.senatChemin] = g), q.titreChemin && L[q.titreChemin] === void 0 && (L[q.titreChemin] = g), D[g.uid] === void 0 && (D[g.uid] = g);
1770
+ }), g = W.toDossierParlementaire(j), R = g.titreDossier;
1771
+ R.senatChemin && I[R.senatChemin] === void 0 && (I[R.senatChemin] = g), R.titreChemin && q[R.titreChemin] === void 0 && (q[R.titreChemin] = g), D[g.uid] === void 0 && (D[g.uid] = g);
1734
1772
  }
1735
1773
  }
1736
1774
  let $ = {};
1737
- if (n & F.Photos) {
1775
+ if (i & V.Photos) {
1738
1776
  {
1739
- const a = s.join(
1777
+ const r = s.join(
1740
1778
  t,
1741
1779
  `photos_deputes_${// TODO: Handle Legislature.All.
1742
- i === l.All ? l.DixSept : i}`,
1780
+ n === l.All ? l.DixSept : n}`,
1743
1781
  "deputes.json"
1744
1782
  );
1745
- if (r.existsSync(a)) {
1746
- o && console.log(`Loading file: ${a}`);
1747
- const u = r.readFileSync(a, { encoding: "utf8" });
1783
+ if (o.existsSync(r)) {
1784
+ a && console.log(`Loading file: ${r}`);
1785
+ const u = o.readFileSync(r, { encoding: "utf8" });
1748
1786
  Object.assign($, JSON.parse(u));
1749
- } else o && console.log(`Ignoring missing file: ${a}`);
1787
+ } else a && console.log(`Ignoring missing file: ${r}`);
1750
1788
  }
1751
1789
  {
1752
- const a = s.join(
1790
+ const r = s.join(
1753
1791
  t,
1754
1792
  "photos_senateurs",
1755
1793
  "senateurs.json"
1756
1794
  );
1757
- if (r.existsSync(a)) {
1758
- o && console.log(`Loading file: ${a}`);
1759
- const u = r.readFileSync(a, { encoding: "utf8" });
1795
+ if (o.existsSync(r)) {
1796
+ a && console.log(`Loading file: ${r}`);
1797
+ const u = o.readFileSync(r, { encoding: "utf8" });
1760
1798
  Object.assign($, JSON.parse(u));
1761
- } else o && console.log(`Ignoring missing file: ${a}`);
1799
+ } else a && console.log(`Ignoring missing file: ${r}`);
1762
1800
  }
1763
1801
  }
1764
- const X = {};
1765
- if (n & F.Scrutins)
1766
- for (const a of A.scrutins) {
1767
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1802
+ const P = {};
1803
+ if (i & V.Scrutins)
1804
+ for (const r of A.scrutins) {
1805
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1768
1806
  continue;
1769
1807
  const u = s.join(
1770
1808
  t,
1771
- a.filename.replace(/\.json$/, "_nettoye")
1809
+ r.filename.replace(/\.json$/, "_nettoye")
1772
1810
  );
1773
- for (const d of R(u)) {
1811
+ for (const d of L(u)) {
1774
1812
  if (!d[d.length - 1].endsWith(".json"))
1775
1813
  continue;
1776
1814
  const c = s.join(u, ...d);
1777
- o && console.log(`Loading file: ${c}…`);
1778
- const j = r.readFileSync(c, {
1815
+ a && console.log(`Loading file: ${c}…`);
1816
+ const j = o.readFileSync(c, {
1779
1817
  encoding: "utf8"
1780
1818
  }), g = le.toScrutin(j);
1781
- X[g.uid] === void 0 && (X[g.uid] = g);
1819
+ P[g.uid] === void 0 && (P[g.uid] = g);
1782
1820
  }
1783
1821
  }
1784
- const O = {};
1785
- if (n & F.Questions)
1786
- for (const a of A.questions) {
1787
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1822
+ const w = {};
1823
+ if (i & V.Questions)
1824
+ for (const r of A.questions) {
1825
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1788
1826
  continue;
1789
1827
  const u = s.join(
1790
1828
  t,
1791
- a.filename.replace(/\.json$/, "_nettoye")
1829
+ r.filename.replace(/\.json$/, "_nettoye")
1792
1830
  );
1793
- for (const d of R(u)) {
1831
+ for (const d of L(u)) {
1794
1832
  if (!d[d.length - 1].endsWith(".json"))
1795
1833
  continue;
1796
1834
  const c = s.join(u, ...d);
1797
- o && console.log(`Loading file: ${c}…`);
1798
- const j = r.readFileSync(c, {
1835
+ a && console.log(`Loading file: ${c}…`);
1836
+ const j = o.readFileSync(c, {
1799
1837
  encoding: "utf8"
1800
1838
  }), g = ae.toQuestion(j);
1801
- O[g.uid] === void 0 && (O[g.uid] = g);
1839
+ w[g.uid] === void 0 && (w[g.uid] = g);
1802
1840
  }
1803
1841
  }
1804
- const w = {};
1805
- if (n & F.ComptesRendusSeances)
1806
- for (const a of A.comptesRendusSeances) {
1807
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1842
+ const O = {};
1843
+ if (i & V.ComptesRendusSeances)
1844
+ for (const r of A.comptesRendusSeances) {
1845
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1808
1846
  continue;
1809
1847
  const u = s.join(
1810
1848
  t,
1811
- a.filename.replace(/\.json$/, "_nettoye")
1849
+ r.filename.replace(/\.json$/, "_nettoye")
1812
1850
  );
1813
- for (const d of R(u)) {
1851
+ for (const d of L(u)) {
1814
1852
  if (!d[d.length - 1].endsWith(".json"))
1815
1853
  continue;
1816
1854
  const c = s.join(u, ...d);
1817
- o && console.log(`Loading file: ${c}…`);
1818
- const j = r.readFileSync(c, {
1855
+ a && console.log(`Loading file: ${c}…`);
1856
+ const j = o.readFileSync(c, {
1819
1857
  encoding: "utf8"
1820
1858
  }), g = re.toCompteRendu(j);
1821
- w[g.uid] === void 0 && (w[g.uid] = g);
1859
+ O[g.uid] === void 0 && (O[g.uid] = g);
1822
1860
  }
1823
1861
  }
1824
1862
  return {
1825
1863
  acteurByUid: p,
1826
- amendementByUid: v,
1827
- documentByUid: C,
1864
+ amendementByUid: C,
1865
+ documentByUid: v,
1828
1866
  dossierParlementaireBySenatChemin: I,
1829
- dossierParlementaireByTitreChemin: L,
1867
+ dossierParlementaireByTitreChemin: q,
1830
1868
  dossierParlementaireByUid: D,
1831
1869
  organeByUid: f,
1832
1870
  photoByUid: $,
1833
1871
  reunionByUid: _,
1834
1872
  reunionsByDay: m,
1835
1873
  reunionsByDossierUid: S,
1836
- scrutinByUid: X,
1837
- questionByUid: O,
1838
- compteRenduByUid: w
1874
+ scrutinByUid: P,
1875
+ questionByUid: w,
1876
+ compteRenduByUid: O
1839
1877
  };
1840
1878
  }
1841
- function bn(t, n, i, { log: o = !1 } = {}) {
1879
+ function Sn(t, i, n, { log: a = !1 } = {}) {
1842
1880
  const p = {}, f = {};
1843
- if (n & F.ActeursEtOrganes)
1844
- for (const a of A.acteursEtOrganes) {
1845
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1881
+ if (i & V.ActeursEtOrganes)
1882
+ for (const r of A.acteursEtOrganes) {
1883
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1846
1884
  continue;
1847
1885
  const u = s.join(
1848
1886
  t,
1849
- a.filename.replace(/\.json$/, "_nettoye.json")
1887
+ r.filename.replace(/\.json$/, "_nettoye.json")
1850
1888
  );
1851
- o && console.log(`Loading file: ${u}`);
1852
- const d = r.readFileSync(u, { encoding: "utf8" }), y = Z.toActeursEtOrganes(d);
1889
+ a && console.log(`Loading file: ${u}`);
1890
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = Z.toActeursEtOrganes(d);
1853
1891
  for (const c of y.acteurs)
1854
1892
  p[c.uid] === void 0 && (p[c.uid] = c);
1855
1893
  for (const c of y.organes)
1856
1894
  f[c.uid] === void 0 && (f[c.uid] = c);
1857
1895
  }
1858
1896
  const _ = {}, m = {}, S = {};
1859
- if (n & F.Agendas)
1860
- for (const a of A.agendas) {
1861
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1897
+ if (i & V.Agendas)
1898
+ for (const r of A.agendas) {
1899
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1862
1900
  continue;
1863
1901
  const u = s.join(
1864
1902
  t,
1865
- a.filename.replace(/\.json$/, "_nettoye.json")
1903
+ r.filename.replace(/\.json$/, "_nettoye.json")
1866
1904
  );
1867
- o && console.log(`Loading file: ${u}`);
1868
- const d = r.readFileSync(u, { encoding: "utf8" }), y = oe.toAgendas(d);
1905
+ a && console.log(`Loading file: ${u}`);
1906
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = oe.toAgendas(d);
1869
1907
  for (const c of y.reunions) {
1870
1908
  _[c.uid] === void 0 && (_[c.uid] = c);
1871
1909
  const j = c.timestampDebut.toISOString().split("T")[0];
1872
1910
  let g = m[j];
1873
1911
  g === void 0 && (g = m[j] = []), g.push(c);
1874
- const q = c.odj;
1875
- if (q !== void 0)
1876
- for (const U of q.pointsOdj || [])
1912
+ const R = c.odj;
1913
+ if (R !== void 0)
1914
+ for (const U of R.pointsOdj || [])
1877
1915
  for (const J of U.dossiersLegislatifsRefs || []) {
1878
1916
  let Q = S[J];
1879
1917
  Q === void 0 && (Q = S[J] = []), Q.push(c);
1880
1918
  }
1881
1919
  }
1882
1920
  }
1883
- const v = {};
1884
- if (n & F.Amendements)
1885
- for (const a of A.amendements) {
1886
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1921
+ const C = {};
1922
+ if (i & V.Amendements)
1923
+ for (const r of A.amendements) {
1924
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1887
1925
  continue;
1888
1926
  const u = s.join(
1889
1927
  t,
1890
- a.filename.replace(/\.json$/, "_nettoye.json")
1928
+ r.filename.replace(/\.json$/, "_nettoye.json")
1891
1929
  );
1892
- o && console.log(`Loading file: ${u}`);
1893
- const d = r.readFileSync(u, { encoding: "utf8" }), y = ie.toAmendements(d);
1930
+ a && console.log(`Loading file: ${u}`);
1931
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = ie.toAmendements(d);
1894
1932
  for (const c of y.textesLegislatifs)
1895
1933
  for (const j of c.amendements)
1896
- v[j.uid] === void 0 && (v[j.uid] = j);
1934
+ C[j.uid] === void 0 && (C[j.uid] = j);
1897
1935
  }
1898
- const C = {}, I = {}, L = {}, D = {};
1899
- if (n & F.DossiersLegislatifs)
1900
- for (const a of A.dossiersLegislatifs) {
1901
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1936
+ const v = {}, I = {}, q = {}, D = {};
1937
+ if (i & V.DossiersLegislatifs)
1938
+ for (const r of A.dossiersLegislatifs) {
1939
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1902
1940
  continue;
1903
1941
  const u = s.join(
1904
1942
  t,
1905
- a.filename.replace(/\.json$/, "_nettoye.json")
1943
+ r.filename.replace(/\.json$/, "_nettoye.json")
1906
1944
  );
1907
- o && console.log(`Loading file: ${u}`);
1908
- const d = r.readFileSync(u, { encoding: "utf8" }), y = W.toDossiersLegislatifs(d);
1945
+ a && console.log(`Loading file: ${u}`);
1946
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = W.toDossiersLegislatifs(d);
1909
1947
  for (const c of y.textesLegislatifs)
1910
- C[c.uid] === void 0 && (C[c.uid] = c);
1948
+ v[c.uid] === void 0 && (v[c.uid] = c);
1911
1949
  for (const c of y.dossiersParlementaires) {
1912
1950
  const j = c.titreDossier;
1913
- j.senatChemin && I[j.senatChemin] === void 0 && (I[j.senatChemin] = c), j.titreChemin && L[j.titreChemin] === void 0 && (L[j.titreChemin] = c), D[c.uid] === void 0 && (D[c.uid] = c);
1951
+ j.senatChemin && I[j.senatChemin] === void 0 && (I[j.senatChemin] = c), j.titreChemin && q[j.titreChemin] === void 0 && (q[j.titreChemin] = c), D[c.uid] === void 0 && (D[c.uid] = c);
1914
1952
  }
1915
1953
  }
1916
1954
  const $ = {};
1917
- if (n & F.Photos) {
1918
- const a = {};
1955
+ if (i & V.Photos) {
1956
+ const r = {};
1919
1957
  {
1920
1958
  const u = s.join(
1921
1959
  t,
1922
1960
  `photos_deputes_${// TODO: Handle Legislature.All.
1923
- i === l.All ? l.DixSept : i}`,
1961
+ n === l.All ? l.DixSept : n}`,
1924
1962
  "deputes.json"
1925
1963
  );
1926
- if (r.existsSync(u)) {
1927
- o && console.log(`Loading file: ${u}`);
1928
- const d = r.readFileSync(u, { encoding: "utf8" });
1929
- Object.assign(a, JSON.parse(d));
1930
- } else o && console.log(`Ignoring missing file: ${u}`);
1964
+ if (o.existsSync(u)) {
1965
+ a && console.log(`Loading file: ${u}`);
1966
+ const d = o.readFileSync(u, { encoding: "utf8" });
1967
+ Object.assign(r, JSON.parse(d));
1968
+ } else a && console.log(`Ignoring missing file: ${u}`);
1931
1969
  }
1932
1970
  {
1933
1971
  const u = s.join(
@@ -1935,215 +1973,215 @@ function bn(t, n, i, { log: o = !1 } = {}) {
1935
1973
  "photos_senateurs",
1936
1974
  "senateurs.json"
1937
1975
  );
1938
- if (r.existsSync(u)) {
1939
- o && console.log(`Loading file: ${u}`);
1940
- const d = r.readFileSync(u, { encoding: "utf8" });
1941
- Object.assign(a, JSON.parse(d));
1942
- } else o && console.log(`Ignoring missing file: ${u}`);
1976
+ if (o.existsSync(u)) {
1977
+ a && console.log(`Loading file: ${u}`);
1978
+ const d = o.readFileSync(u, { encoding: "utf8" });
1979
+ Object.assign(r, JSON.parse(d));
1980
+ } else a && console.log(`Ignoring missing file: ${u}`);
1943
1981
  }
1944
1982
  }
1945
- const X = {};
1946
- if (n & F.Scrutins)
1947
- for (const a of A.scrutins) {
1948
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1983
+ const P = {};
1984
+ if (i & V.Scrutins)
1985
+ for (const r of A.scrutins) {
1986
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1949
1987
  continue;
1950
1988
  const u = s.join(
1951
1989
  t,
1952
- a.filename.replace(/\.json$/, "_nettoye.json")
1990
+ r.filename.replace(/\.json$/, "_nettoye.json")
1953
1991
  );
1954
- o && console.log(`Loading file: ${u}`);
1955
- const d = r.readFileSync(u, { encoding: "utf8" }), y = le.toScrutins(d);
1992
+ a && console.log(`Loading file: ${u}`);
1993
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = le.toScrutins(d);
1956
1994
  for (const c of y.scrutins)
1957
- X[c.uid] === void 0 && (X[c.uid] = c);
1995
+ P[c.uid] === void 0 && (P[c.uid] = c);
1958
1996
  }
1959
- const O = {};
1960
- if (n & F.Questions)
1961
- for (const a of A.questions) {
1962
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
1997
+ const w = {};
1998
+ if (i & V.Questions)
1999
+ for (const r of A.questions) {
2000
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1963
2001
  continue;
1964
2002
  const u = s.join(
1965
2003
  t,
1966
- a.filename.replace(/\.json$/, "_nettoye.json")
2004
+ r.filename.replace(/\.json$/, "_nettoye.json")
1967
2005
  );
1968
- o && console.log(`Loading file: ${u}`);
1969
- const d = r.readFileSync(u, { encoding: "utf8" }), y = ae.toQuestions(d);
2006
+ a && console.log(`Loading file: ${u}`);
2007
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = ae.toQuestions(d);
1970
2008
  for (const c of y.questions)
1971
- O[c.uid] === void 0 && (O[c.uid] = c);
2009
+ w[c.uid] === void 0 && (w[c.uid] = c);
1972
2010
  }
1973
- const w = {};
1974
- if (n & F.ComptesRendusSeances)
1975
- for (const a of A.comptesRendusSeances) {
1976
- if (a.ignoreForWeb || i !== l.All && a.legislature !== l.All && i !== a.legislature)
2011
+ const O = {};
2012
+ if (i & V.ComptesRendusSeances)
2013
+ for (const r of A.comptesRendusSeances) {
2014
+ if (r.ignoreForWeb || n !== l.All && r.legislature !== l.All && n !== r.legislature)
1977
2015
  continue;
1978
2016
  const u = s.join(
1979
2017
  t,
1980
- a.filename.replace(/\.json$/, "_nettoye.json")
2018
+ r.filename.replace(/\.json$/, "_nettoye.json")
1981
2019
  );
1982
- o && console.log(`Loading file: ${u}`);
1983
- const d = r.readFileSync(u, { encoding: "utf8" }), y = re.toComptesRendus(d);
2020
+ a && console.log(`Loading file: ${u}`);
2021
+ const d = o.readFileSync(u, { encoding: "utf8" }), y = re.toComptesRendus(d);
1984
2022
  for (const c of y.comptesRendus)
1985
- w[c.uid] === void 0 && (w[c.uid] = c);
2023
+ O[c.uid] === void 0 && (O[c.uid] = c);
1986
2024
  }
1987
2025
  return {
1988
2026
  acteurByUid: p,
1989
- amendementByUid: v,
1990
- documentByUid: C,
2027
+ amendementByUid: C,
2028
+ documentByUid: v,
1991
2029
  dossierParlementaireBySenatChemin: I,
1992
- dossierParlementaireByTitreChemin: L,
2030
+ dossierParlementaireByTitreChemin: q,
1993
2031
  dossierParlementaireByUid: D,
1994
2032
  organeByUid: f,
1995
2033
  photoByUid: $,
1996
2034
  reunionByUid: _,
1997
2035
  reunionsByDay: m,
1998
2036
  reunionsByDossierUid: S,
1999
- scrutinByUid: X,
2000
- questionByUid: O,
2001
- compteRenduByUid: w
2037
+ scrutinByUid: P,
2038
+ questionByUid: w,
2039
+ compteRenduByUid: O
2002
2040
  };
2003
2041
  }
2004
- function yn(t, n, i) {
2005
- const o = s.join(t, "Documents"), p = Yt(o, n), f = s.join(p, "index.json");
2006
- if (!r.pathExistsSync(f))
2042
+ function bn(t, i, n) {
2043
+ const a = s.join(t, "Documents"), p = Kt(a, i), f = s.join(p, "index.json");
2044
+ if (!o.pathExistsSync(f))
2007
2045
  return;
2008
- const _ = r.readJsonSync(f);
2009
- for (const m of i)
2010
- for (const { filename: S, url: v } of _[m] ?? [])
2046
+ const _ = o.readJsonSync(f);
2047
+ for (const m of n)
2048
+ for (const { filename: S, url: C } of _[m] ?? [])
2011
2049
  if (S !== void 0)
2012
- return { format: m, path: s.join(p, S), url: v };
2050
+ return { format: m, path: s.join(p, S), url: C };
2013
2051
  }
2014
- function An(t, n, { log: i = !1 } = {}) {
2015
- const o = s.join(
2052
+ function yn(t, i, { log: n = !1 } = {}) {
2053
+ const a = s.join(
2016
2054
  t,
2017
2055
  `photos_deputes_${// TODO: Handle Legislature.All.
2018
- n === l.All ? l.DixSept : n}`,
2056
+ i === l.All ? l.DixSept : i}`,
2019
2057
  "deputes.json"
2020
2058
  );
2021
- i && console.log(`Loading file: ${o}`);
2022
- const p = r.readFileSync(o, { encoding: "utf8" });
2059
+ n && console.log(`Loading file: ${a}`);
2060
+ const p = o.readFileSync(a, { encoding: "utf8" });
2023
2061
  return JSON.parse(p);
2024
2062
  }
2025
- function vn(t, { log: n = !1 } = {}) {
2026
- const i = s.join(
2063
+ function An(t, { log: i = !1 } = {}) {
2064
+ const n = s.join(
2027
2065
  t,
2028
2066
  "photos_senateurs",
2029
2067
  "senateurs.json"
2030
2068
  );
2031
- n && console.log(`Loading file: ${i}`);
2032
- const o = r.readFileSync(i, { encoding: "utf8" });
2033
- return JSON.parse(o);
2069
+ i && console.log(`Loading file: ${n}`);
2070
+ const a = o.readFileSync(n, { encoding: "utf8" });
2071
+ return JSON.parse(a);
2034
2072
  }
2035
- function Yt(t, n) {
2036
- const i = n.match(Me);
2073
+ function Kt(t, i) {
2074
+ const n = i.match(Ne);
2037
2075
  B.notStrictEqual(
2038
- i,
2076
+ n,
2039
2077
  null,
2040
- `Unexpected structure for document UID: ${n}`
2078
+ `Unexpected structure for document UID: ${i}`
2041
2079
  );
2042
- const o = i.groups, p = s.join(
2080
+ const a = n.groups, p = s.join(
2043
2081
  t,
2044
- o.documentType ?? o.documentType2
2045
- ), f = s.join(p, o.chambre ?? o.chambre2), _ = s.join(
2082
+ a.documentType ?? a.documentType2
2083
+ ), f = s.join(p, a.chambre ?? a.chambre2), _ = s.join(
2046
2084
  f,
2047
- o.republique ?? o.republique2
2085
+ a.republique ?? a.republique2
2048
2086
  ), m = s.join(
2049
2087
  _,
2050
- o.legislature ?? o.legislature2
2051
- ), S = o.etat;
2088
+ a.legislature ?? a.legislature2
2089
+ ), S = a.etat;
2052
2090
  if (S === void 0)
2053
- return r.ensureDirSync(m), s.join(m, n);
2054
- const v = s.join(m, S);
2055
- let C = "000000" + (o.numero ?? o.numero2);
2056
- C = C.substring(C.length - 6);
2057
- const I = s.join(v, C.substring(0, 3));
2058
- return r.ensureDirSync(I), s.join(I, n);
2091
+ return o.ensureDirSync(m), s.join(m, i);
2092
+ const C = s.join(m, S);
2093
+ let v = "000000" + (a.numero ?? a.numero2);
2094
+ v = v.substring(v.length - 6);
2095
+ const I = s.join(C, v.substring(0, 3));
2096
+ return o.ensureDirSync(I), s.join(I, i);
2059
2097
  }
2060
- function Cn(t, n) {
2061
- return ve(t, n, Te);
2098
+ function Cn(t, i) {
2099
+ return Ce(t, i, Ue);
2062
2100
  }
2063
- function In(t, n) {
2064
- const i = Ne.exec(n);
2101
+ function vn(t, i) {
2102
+ const n = ze.exec(i);
2065
2103
  B.notStrictEqual(
2066
- i,
2104
+ n,
2067
2105
  null,
2068
- `Unexpected structure for reunion UID: ${n}`
2106
+ `Unexpected structure for reunion UID: ${i}`
2069
2107
  );
2070
- const o = s.join(t, i[1]), p = s.join(o, i[2]), f = s.join(p, i[3]), _ = s.join(f, i[4]), m = s.join(_, i[5]);
2071
- let S = "000000000" + i[6];
2108
+ const a = s.join(t, n[1]), p = s.join(a, n[2]), f = s.join(p, n[3]), _ = s.join(f, n[4]), m = s.join(_, n[5]);
2109
+ let S = "000000000" + n[6];
2072
2110
  S = S.substring(S.length - 9);
2073
- const v = s.join(m, S.substring(0, 3)), C = s.join(v, S.substring(3, 3));
2074
- return r.ensureDirSync(C), s.join(C, n);
2111
+ const C = s.join(m, S.substring(0, 3)), v = s.join(C, S.substring(3, 3));
2112
+ return o.ensureDirSync(v), s.join(v, i);
2075
2113
  }
2076
- function Fn(t, n) {
2077
- const i = ze.exec(n);
2114
+ function In(t, i) {
2115
+ const n = ke.exec(i);
2078
2116
  B.notStrictEqual(
2079
- i,
2117
+ n,
2080
2118
  null,
2081
- `Unexpected structure for scrutin UID: ${n}`
2119
+ `Unexpected structure for scrutin UID: ${i}`
2082
2120
  );
2083
- const o = s.join(t, i[1]), p = s.join(o, i[2]), f = s.join(p, i[3]);
2084
- let _ = "000000" + i[4];
2121
+ const a = s.join(t, n[1]), p = s.join(a, n[2]), f = s.join(p, n[3]);
2122
+ let _ = "000000" + n[4];
2085
2123
  _ = _.substring(_.length - 6);
2086
2124
  const m = s.join(f, _.substring(0, 3));
2087
- return r.ensureDirSync(m), s.join(m, n);
2125
+ return o.ensureDirSync(m), s.join(m, i);
2088
2126
  }
2089
- function Vn(t, n) {
2090
- return ve(t, n, Ue);
2127
+ function Vn(t, i) {
2128
+ return Ce(t, i, Je);
2091
2129
  }
2092
- function Dn(t, n) {
2093
- const i = ke.exec(n);
2130
+ function Fn(t, i) {
2131
+ const n = Te.exec(i);
2094
2132
  B.notStrictEqual(
2095
- i,
2133
+ n,
2096
2134
  null,
2097
- `Unexpected structure for object with UID: ${n}`
2135
+ `Unexpected structure for object with UID: ${i}`
2098
2136
  );
2099
- const o = s.join(t, i[2]), p = s.join(o, i[3]), f = s.join(p, i[4]), _ = s.join(f, i[5]);
2100
- let m = "000000000" + i[7];
2137
+ const a = s.join(t, n[2]), p = s.join(a, n[3]), f = s.join(p, n[4]), _ = s.join(f, n[5]);
2138
+ let m = "000000000" + n[7];
2101
2139
  m = m.substring(m.length - 9);
2102
- const S = s.join(_, m.substring(0, 3)), v = s.join(S, m.substring(3, 3));
2103
- return r.ensureDirSync(v), s.join(v, n);
2140
+ const S = s.join(_, m.substring(0, 3)), C = s.join(S, m.substring(3, 3));
2141
+ return o.ensureDirSync(C), s.join(C, i);
2104
2142
  }
2105
- function ve(t, n, i) {
2106
- const o = i.exec(n);
2143
+ function Ce(t, i, n) {
2144
+ const a = n.exec(i);
2107
2145
  B.notStrictEqual(
2108
- o,
2146
+ a,
2109
2147
  null,
2110
- `Unexpected structure for object with UID: ${n}`
2148
+ `Unexpected structure for object with UID: ${i}`
2111
2149
  );
2112
- const p = s.join(t, o[1]), f = s.join(p, o[2]);
2113
- let _ = "000000" + o[3];
2150
+ const p = s.join(t, a[1]), f = s.join(p, a[2]);
2151
+ let _ = "000000" + a[3];
2114
2152
  _ = _.substring(_.length - 6);
2115
2153
  const m = s.join(f, _.substring(0, 3));
2116
- return r.ensureDirSync(m), s.join(m, n);
2154
+ return o.ensureDirSync(m), s.join(m, i);
2117
2155
  }
2118
- async function b(t, n) {
2119
- const i = s.join(n, t.filename);
2120
- await r.pathExists(i) && await r.remove(i), await r.pathExists(s.join(n, `${t.filename}.temp`, "json")) ? await r.move(
2121
- s.join(n, `${t.filename}.temp`, "json"),
2122
- i
2123
- ) : await r.mkdir(i);
2156
+ async function b(t, i) {
2157
+ const n = s.join(i, t.filename);
2158
+ await o.pathExists(n) && await o.remove(n), await o.pathExists(s.join(i, `${t.filename}.temp`, "json")) ? await o.move(
2159
+ s.join(i, `${t.filename}.temp`, "json"),
2160
+ n
2161
+ ) : await o.mkdir(n);
2124
2162
  }
2125
2163
  export {
2126
- F as EnabledDatasets,
2164
+ V as EnabledDatasets,
2127
2165
  A as datasets,
2128
- un as iterLoadAssembleeActeurs,
2129
- dn as iterLoadAssembleeAmendements,
2130
- jn as iterLoadAssembleeComptesRendus,
2131
- pn as iterLoadAssembleeDocuments,
2132
- gn as iterLoadAssembleeDossiersParlementaires,
2133
- mn as iterLoadAssembleeOrganes,
2134
- hn as iterLoadAssembleeQuestions,
2135
- fn as iterLoadAssembleeReunions,
2136
- _n as iterLoadAssembleeScrutins,
2137
- Sn as loadAssembleeData,
2138
- bn as loadAssembleeDataFromBigFiles,
2139
- yn as loadAssembleeDocumentFile,
2140
- An as loadAssembleePhotosDeputes,
2141
- vn as loadAssembleePhotosSenateurs,
2142
- Dn as pathFromCompteRenduUid,
2143
- Yt as pathFromDocumentUid,
2166
+ cn as iterLoadAssembleeActeurs,
2167
+ mn as iterLoadAssembleeAmendements,
2168
+ hn as iterLoadAssembleeComptesRendus,
2169
+ dn as iterLoadAssembleeDocuments,
2170
+ pn as iterLoadAssembleeDossiersParlementaires,
2171
+ un as iterLoadAssembleeOrganes,
2172
+ _n as iterLoadAssembleeQuestions,
2173
+ gn as iterLoadAssembleeReunions,
2174
+ fn as iterLoadAssembleeScrutins,
2175
+ jn as loadAssembleeData,
2176
+ Sn as loadAssembleeDataFromBigFiles,
2177
+ bn as loadAssembleeDocumentFile,
2178
+ yn as loadAssembleePhotosDeputes,
2179
+ An as loadAssembleePhotosSenateurs,
2180
+ Fn as pathFromCompteRenduUid,
2181
+ Kt as pathFromDocumentUid,
2144
2182
  Cn as pathFromDossierParlementaireUid,
2145
2183
  Vn as pathFromQuestionUid,
2146
- In as pathFromReunionUid,
2147
- Fn as pathFromScrutinUid,
2148
- R as walkDir
2184
+ vn as pathFromReunionUid,
2185
+ In as pathFromScrutinUid,
2186
+ L as walkDir
2149
2187
  };