@tricoteuses/assemblee 2.5.1 → 2.5.2

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,19 +1,19 @@
1
- import Q from "node:assert";
2
- import i from "fs-extra";
3
- import n from "node:path";
1
+ import q from "node:assert";
2
+ import n from "fs-extra";
3
+ import i from "node:path";
4
4
  import "node:crypto";
5
- import { L as r, a1 as R, a2 as Z, a3 as q, a4 as B, a5 as J, a6 as N, Y, $ as G, a0 as K, X as ee, Z as te, _ as se } from "./uids-DaRrTkI-.js";
5
+ import { L as a, a1 as C, a2 as M, a3 as R, a4 as Z, a5 as B, a6 as J, Y, $ as G, a0 as K, X as ee, Z as te, _ as se } from "./uids-DaRrTkI-.js";
6
6
  import { w as P } from "./file_systems-CzTtoLWb.js";
7
- import { C as w } from "./amendements-40Z7OJLT.js";
7
+ import { C as N } from "./amendements-40Z7OJLT.js";
8
8
  var I = /* @__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.All = 255] = "All", t))(I || {});
9
- function y(t, s) {
10
- const e = n.join(s, t.filename);
11
- i.existsSync(e) && i.removeSync(e), i.existsSync(n.join(s, `${t.filename}.temp`, "json")) ? i.moveSync(
12
- n.join(s, `${t.filename}.temp`, "json"),
9
+ async function h(t, s) {
10
+ const e = i.join(s, t.filename);
11
+ await n.pathExists(e) && await n.remove(e), await n.pathExists(i.join(s, `${t.filename}.temp`, "json")) ? await n.move(
12
+ i.join(s, `${t.filename}.temp`, "json"),
13
13
  e
14
- ) : i.mkdirSync(e);
14
+ ) : await n.mkdir(e);
15
15
  }
16
- const S = {
16
+ const A = {
17
17
  acteursEtOrganes: [
18
18
  {
19
19
  // AMO10 (XVII)
@@ -38,8 +38,8 @@ const S = {
38
38
  // Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
39
39
  filename: "AMO10_deputes_actifs_mandats_actifs_organes_XVII.json",
40
40
  ignoreForWeb: !0,
41
- legislature: r.DixSept,
42
- repairZip: y,
41
+ legislature: a.DixSept,
42
+ repairZip: h,
43
43
  structure: 1,
44
44
  title: "Députés actifs et organes de la XVIIème législature",
45
45
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes.json.zip"
@@ -67,8 +67,8 @@ const S = {
67
67
  // Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
68
68
  filename: "AMO10_deputes_actifs_mandats_actifs_organes_XVI.json",
69
69
  ignoreForWeb: !0,
70
- legislature: r.Seize,
71
- repairZip: y,
70
+ legislature: a.Seize,
71
+ repairZip: h,
72
72
  structure: 1,
73
73
  title: "Députés actifs et organes de la XVIème législature",
74
74
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes.json.zip"
@@ -96,8 +96,8 @@ const S = {
96
96
  // Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
97
97
  filename: "AMO10_deputes_actifs_mandats_actifs_organes_XV.json",
98
98
  ignoreForWeb: !0,
99
- legislature: r.Quinze,
100
- repairZip: y,
99
+ legislature: a.Quinze,
100
+ repairZip: h,
101
101
  structure: 1,
102
102
  title: "Députés actifs et organes de la XVème législature",
103
103
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes_XV.json.zip"
@@ -125,8 +125,8 @@ const S = {
125
125
  // Il n'apporte donc absolument rien par rapport à l'AMO30.
126
126
  filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XVII.json",
127
127
  ignoreForWeb: !0,
128
- legislature: r.DixSept,
129
- repairZip: y,
128
+ legislature: a.DixSept,
129
+ repairZip: h,
130
130
  structure: 1,
131
131
  title: "Acteurs et organes de la XVIIème législature",
132
132
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes.json.zip"
@@ -154,8 +154,8 @@ const S = {
154
154
  // Il n'apporte donc absolument rien par rapport à l'AMO30.
155
155
  filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XVI.json",
156
156
  ignoreForWeb: !0,
157
- legislature: r.Seize,
158
- repairZip: y,
157
+ legislature: a.Seize,
158
+ repairZip: h,
159
159
  structure: 1,
160
160
  title: "Acteurs et organes de la XVIème législature",
161
161
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes.json.zip"
@@ -183,8 +183,8 @@ const S = {
183
183
  // Il n'apporte donc absolument rien par rapport à l'AMO30.
184
184
  filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XV.json",
185
185
  ignoreForWeb: !0,
186
- legislature: r.Quinze,
187
- repairZip: y,
186
+ legislature: a.Quinze,
187
+ repairZip: h,
188
188
  structure: 1,
189
189
  title: "Acteurs et organes de la XVème législature",
190
190
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes_XV.json.zip"
@@ -202,7 +202,7 @@ const S = {
202
202
  // Il n'apporte donc quasiment rien par rapport à l'AMO30.
203
203
  filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XIV.json",
204
204
  ignoreForWeb: !0,
205
- legislature: r.Quatorze,
205
+ legislature: a.Quatorze,
206
206
  structure: 0,
207
207
  title: "Acteurs et organes de la XIVème législature",
208
208
  url: "https://data.assemblee-nationale.fr/static/openData/repository/14/amo/deputes_senateurs_ministres_legislatures_XIV/AMO20_dep_sen_min_tous_mandats_et_organes_XIV.json.zip"
@@ -213,8 +213,8 @@ const S = {
213
213
  // Ce fichier contient tous les acteurs et organes.
214
214
  // C'est un sur-ensemble des fichiers AMO20.
215
215
  filename: "AMO30_tous_acteurs_tous_mandats_tous_organes_historique.json",
216
- legislature: r.All,
217
- repairZip: y,
216
+ legislature: a.All,
217
+ repairZip: h,
218
218
  structure: 1,
219
219
  title: "Historique de tous les acteurs et organes depuis la XIème législature",
220
220
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/tous_acteurs_mandats_organes_xi_legislature/AMO30_tous_acteurs_tous_mandats_tous_organes_historique.json.zip"
@@ -278,17 +278,17 @@ const S = {
278
278
  // précédentes.
279
279
  filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVII.json",
280
280
  ignoreForWeb: !0,
281
- legislature: r.DixSept,
282
- repairZip: (t, s) => {
283
- const e = n.join(s, t.filename);
284
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.pathExistsSync(
285
- n.join(s, `${t.filename}.temp`, "acteur")
286
- ) && i.moveSync(
287
- n.join(s, `${t.filename}.temp`, "acteur"),
288
- n.join(e, "acteur")
289
- ), i.moveSync(
290
- n.join(s, `${t.filename}.temp`, "organe"),
291
- n.join(e, "organe")
281
+ legislature: a.DixSept,
282
+ repairZip: async (t, s) => {
283
+ const e = i.join(s, t.filename);
284
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.pathExists(
285
+ i.join(s, `${t.filename}.temp`, "acteur")
286
+ ) && await n.move(
287
+ i.join(s, `${t.filename}.temp`, "acteur"),
288
+ i.join(e, "acteur")
289
+ ), await n.move(
290
+ i.join(s, `${t.filename}.temp`, "organe"),
291
+ i.join(e, "organe")
292
292
  );
293
293
  },
294
294
  structure: 1,
@@ -322,17 +322,17 @@ const S = {
322
322
  // précédentes.
323
323
  filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVI.json",
324
324
  ignoreForWeb: !0,
325
- legislature: r.Seize,
326
- repairZip: (t, s) => {
327
- const e = n.join(s, t.filename);
328
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.pathExistsSync(
329
- n.join(s, `${t.filename}.temp`, "acteur")
330
- ) && i.moveSync(
331
- n.join(s, `${t.filename}.temp`, "acteur"),
332
- n.join(e, "acteur")
333
- ), i.moveSync(
334
- n.join(s, `${t.filename}.temp`, "organe"),
335
- n.join(e, "organe")
325
+ legislature: a.Seize,
326
+ repairZip: async (t, s) => {
327
+ const e = i.join(s, t.filename);
328
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.pathExists(
329
+ i.join(s, `${t.filename}.temp`, "acteur")
330
+ ) && await n.move(
331
+ i.join(s, `${t.filename}.temp`, "acteur"),
332
+ i.join(e, "acteur")
333
+ ), await n.move(
334
+ i.join(s, `${t.filename}.temp`, "organe"),
335
+ i.join(e, "organe")
336
336
  );
337
337
  },
338
338
  structure: 1,
@@ -366,15 +366,15 @@ const S = {
366
366
  // précédentes.
367
367
  filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XV.json",
368
368
  ignoreForWeb: !0,
369
- legislature: r.Quinze,
370
- repairZip: (t, s) => {
371
- const e = n.join(s, t.filename);
372
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.moveSync(
373
- n.join(s, `${t.filename}.temp`, "acteur"),
374
- n.join(e, "acteur")
375
- ), i.moveSync(
376
- n.join(s, `${t.filename}.temp`, "organe"),
377
- n.join(e, "organe")
369
+ legislature: a.Quinze,
370
+ repairZip: async (t, s) => {
371
+ const e = i.join(s, t.filename);
372
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
373
+ i.join(s, `${t.filename}.temp`, "acteur"),
374
+ i.join(e, "acteur")
375
+ ), await n.move(
376
+ i.join(s, `${t.filename}.temp`, "organe"),
377
+ i.join(e, "organe")
378
378
  );
379
379
  },
380
380
  structure: 1,
@@ -398,18 +398,18 @@ const S = {
398
398
  // dont il est un sous ensemble obsolète.
399
399
  filename: "AMO50_acteurs_mandats_organes_divises_XVII.json",
400
400
  ignoreForWeb: !0,
401
- legislature: r.DixSept,
402
- repairZip: (t, s) => {
403
- const e = n.join(s, t.filename);
404
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.moveSync(
405
- n.join(s, `${t.filename}.temp`, "mandat"),
406
- n.join(e, "mandat")
407
- ), i.moveSync(
408
- n.join(s, `${t.filename}.temp`, "acteur"),
409
- n.join(e, "acteur")
410
- ), i.moveSync(
411
- n.join(s, `${t.filename}.temp`, "organe"),
412
- n.join(e, "organe")
401
+ legislature: a.DixSept,
402
+ repairZip: async (t, s) => {
403
+ const e = i.join(s, t.filename);
404
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
405
+ i.join(s, `${t.filename}.temp`, "mandat"),
406
+ i.join(e, "mandat")
407
+ ), await n.move(
408
+ i.join(s, `${t.filename}.temp`, "acteur"),
409
+ i.join(e, "acteur")
410
+ ), await n.move(
411
+ i.join(s, `${t.filename}.temp`, "organe"),
412
+ i.join(e, "organe")
413
413
  );
414
414
  },
415
415
  structure: 1,
@@ -433,18 +433,18 @@ const S = {
433
433
  // dont il est un sous ensemble obsolète.
434
434
  filename: "AMO50_acteurs_mandats_organes_divises_XVI.json",
435
435
  ignoreForWeb: !0,
436
- legislature: r.Seize,
437
- repairZip: (t, s) => {
438
- const e = n.join(s, t.filename);
439
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.moveSync(
440
- n.join(s, `${t.filename}.temp`, "mandat"),
441
- n.join(e, "mandat")
442
- ), i.moveSync(
443
- n.join(s, `${t.filename}.temp`, "acteur"),
444
- n.join(e, "acteur")
445
- ), i.moveSync(
446
- n.join(s, `${t.filename}.temp`, "organe"),
447
- n.join(e, "organe")
436
+ legislature: a.Seize,
437
+ repairZip: async (t, s) => {
438
+ const e = i.join(s, t.filename);
439
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
440
+ i.join(s, `${t.filename}.temp`, "mandat"),
441
+ i.join(e, "mandat")
442
+ ), await n.move(
443
+ i.join(s, `${t.filename}.temp`, "acteur"),
444
+ i.join(e, "acteur")
445
+ ), await n.move(
446
+ i.join(s, `${t.filename}.temp`, "organe"),
447
+ i.join(e, "organe")
448
448
  );
449
449
  },
450
450
  structure: 1,
@@ -468,18 +468,18 @@ const S = {
468
468
  // dont il est un sous ensemble obsolète.
469
469
  filename: "AMO50_acteurs_mandats_organes_divises_XV.json",
470
470
  ignoreForWeb: !0,
471
- legislature: r.Quinze,
472
- repairZip: (t, s) => {
473
- const e = n.join(s, t.filename);
474
- i.existsSync(e) && i.removeSync(e), i.mkdirSync(e), i.moveSync(
475
- n.join(s, `${t.filename}.temp`, "mandat"),
476
- n.join(e, "mandat")
477
- ), i.moveSync(
478
- n.join(s, `${t.filename}.temp`, "acteur"),
479
- n.join(e, "acteur")
480
- ), i.moveSync(
481
- n.join(s, `${t.filename}.temp`, "organe"),
482
- n.join(e, "organe")
471
+ legislature: a.Quinze,
472
+ repairZip: async (t, s) => {
473
+ const e = i.join(s, t.filename);
474
+ await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
475
+ i.join(s, `${t.filename}.temp`, "mandat"),
476
+ i.join(e, "mandat")
477
+ ), await n.move(
478
+ i.join(s, `${t.filename}.temp`, "acteur"),
479
+ i.join(e, "acteur")
480
+ ), await n.move(
481
+ i.join(s, `${t.filename}.temp`, "organe"),
482
+ i.join(e, "organe")
483
483
  );
484
484
  },
485
485
  structure: 1,
@@ -490,31 +490,31 @@ const S = {
490
490
  agendas: [
491
491
  {
492
492
  filename: "Agenda_XVII.json",
493
- legislature: r.DixSept,
494
- repairZip: y,
493
+ legislature: a.DixSept,
494
+ repairZip: h,
495
495
  structure: 1,
496
496
  title: "Agenda de la XVIIème législature",
497
497
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/vp/reunions/Agenda.json.zip"
498
498
  },
499
499
  {
500
500
  filename: "Agenda_XVI.json",
501
- legislature: r.Seize,
502
- repairZip: y,
501
+ legislature: a.Seize,
502
+ repairZip: h,
503
503
  structure: 1,
504
504
  title: "Agenda de la XVIème législature",
505
505
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/reunions/Agenda.json.zip"
506
506
  },
507
507
  {
508
508
  filename: "Agenda_XV.json",
509
- legislature: r.Quinze,
510
- repairZip: y,
509
+ legislature: a.Quinze,
510
+ repairZip: h,
511
511
  structure: 1,
512
512
  title: "Agenda de la XVème législature",
513
513
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/vp/reunions/Agenda_XV.json.zip"
514
514
  },
515
515
  {
516
516
  filename: "Agenda_XIV.json",
517
- legislature: r.Quatorze,
517
+ legislature: a.Quatorze,
518
518
  structure: 0,
519
519
  title: "Agenda de la XIVème législature",
520
520
  url: "https://data.assemblee-nationale.fr/static/openData/repository/14/vp/reunions/Agenda_XIV.json.zip"
@@ -523,24 +523,24 @@ const S = {
523
523
  amendements: [
524
524
  {
525
525
  filename: "Amendements_XVII.json",
526
- legislature: r.DixSept,
527
- repairZip: y,
526
+ legislature: a.DixSept,
527
+ repairZip: h,
528
528
  structure: 1,
529
529
  title: "Amendements de la XVIIème législature",
530
530
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/amendements_div_legis/Amendements.json.zip"
531
531
  },
532
532
  {
533
533
  filename: "Amendements_XVI.json",
534
- legislature: r.Seize,
535
- repairZip: y,
534
+ legislature: a.Seize,
535
+ repairZip: h,
536
536
  structure: 1,
537
537
  title: "Amendements de la XVIème législature",
538
538
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/amendements_div_legis/Amendements.json.zip"
539
539
  },
540
540
  {
541
541
  filename: "Amendements_XV.json",
542
- legislature: r.Quinze,
543
- repairZip: y,
542
+ legislature: a.Quinze,
543
+ repairZip: h,
544
544
  structure: 1,
545
545
  title: "Amendements de la XVème législature",
546
546
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/amendements_legis/Amendements_XV.json.zip"
@@ -558,31 +558,31 @@ const S = {
558
558
  dossiersLegislatifs: [
559
559
  {
560
560
  filename: "Dossiers_Legislatifs_XVII.json",
561
- legislature: r.DixSept,
562
- repairZip: y,
561
+ legislature: a.DixSept,
562
+ repairZip: h,
563
563
  structure: 1,
564
564
  title: "Dossiers législatifs de la XVIIème législature",
565
565
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/dossiers_legislatifs/Dossiers_Legislatifs.json.zip"
566
566
  },
567
567
  {
568
568
  filename: "Dossiers_Legislatifs_XVI.json",
569
- legislature: r.Seize,
570
- repairZip: y,
569
+ legislature: a.Seize,
570
+ repairZip: h,
571
571
  structure: 1,
572
572
  title: "Dossiers législatifs de la XVIème législature",
573
573
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/dossiers_legislatifs/Dossiers_Legislatifs.json.zip"
574
574
  },
575
575
  {
576
576
  filename: "Dossiers_Legislatifs_XV.json",
577
- legislature: r.Quinze,
578
- repairZip: y,
577
+ legislature: a.Quinze,
578
+ repairZip: h,
579
579
  structure: 1,
580
580
  title: "Dossiers législatifs de la XVème législature",
581
581
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/dossiers_legislatifs/Dossiers_Legislatifs_XV.json.zip"
582
582
  },
583
583
  {
584
584
  filename: "Dossiers_Legislatifs_XIV.json",
585
- legislature: r.Quatorze,
585
+ legislature: a.Quatorze,
586
586
  structure: 0,
587
587
  title: "Dossiers législatifs de la XIVème législature",
588
588
  url: "https://data.assemblee-nationale.fr/static/openData/repository/14/loi/dossiers_legislatifs/Dossiers_Legislatifs_XIV.json.zip"
@@ -591,31 +591,31 @@ const S = {
591
591
  scrutins: [
592
592
  {
593
593
  filename: "Scrutins_XVII.json",
594
- legislature: r.DixSept,
595
- repairZip: y,
594
+ legislature: a.DixSept,
595
+ repairZip: h,
596
596
  structure: 1,
597
597
  title: "Scrutins de la XVIIème législature",
598
598
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/scrutins/Scrutins.json.zip"
599
599
  },
600
600
  {
601
601
  filename: "Scrutins_XVI.json",
602
- legislature: r.Seize,
603
- repairZip: y,
602
+ legislature: a.Seize,
603
+ repairZip: h,
604
604
  structure: 1,
605
605
  title: "Scrutins de la XVIème législature",
606
606
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/scrutins/Scrutins.json.zip"
607
607
  },
608
608
  {
609
609
  filename: "Scrutins_XV.json",
610
- legislature: r.Quinze,
611
- repairZip: y,
610
+ legislature: a.Quinze,
611
+ repairZip: h,
612
612
  structure: 1,
613
613
  title: "Scrutins de la XVème législature",
614
614
  url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/scrutins/Scrutins_XV.json.zip"
615
615
  },
616
616
  {
617
617
  filename: "Scrutins_XIV.json",
618
- legislature: r.Quatorze,
618
+ legislature: a.Quatorze,
619
619
  structure: 0,
620
620
  title: "Scrutins de la XIVème législature",
621
621
  url: "https://data.assemblee-nationale.fr/static/openData/repository/14/loi/scrutins/Scrutins_XIV.json.zip"
@@ -624,48 +624,48 @@ const S = {
624
624
  questions: [
625
625
  {
626
626
  filename: "Questions_ecrites_XVII.json",
627
- legislature: r.DixSept,
628
- repairZip: y,
627
+ legislature: a.DixSept,
628
+ repairZip: h,
629
629
  structure: 1,
630
630
  title: "Questions écrites de la XVIIème législature",
631
631
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_ecrites/Questions_ecrites.json.zip"
632
632
  },
633
633
  {
634
634
  filename: "Questions_ecrites_XVI.json",
635
- legislature: r.Seize,
636
- repairZip: y,
635
+ legislature: a.Seize,
636
+ repairZip: h,
637
637
  structure: 1,
638
638
  title: "Questions écrites de la XVIème législature",
639
639
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_ecrites/Questions_ecrites.json.zip"
640
640
  },
641
641
  {
642
642
  filename: "Questions_gouvernement_XVII.json",
643
- legislature: r.DixSept,
644
- repairZip: y,
643
+ legislature: a.DixSept,
644
+ repairZip: h,
645
645
  structure: 1,
646
646
  title: "Questions au gouvernement de la XVIIème législature",
647
647
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_gouvernement/Questions_gouvernement.json.zip"
648
648
  },
649
649
  {
650
650
  filename: "Questions_gouvernement_XVI.json",
651
- legislature: r.Seize,
652
- repairZip: y,
651
+ legislature: a.Seize,
652
+ repairZip: h,
653
653
  structure: 1,
654
654
  title: "Questions au gouvernement de la XVIème législature",
655
655
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_gouvernement/Questions_gouvernement.json.zip"
656
656
  },
657
657
  {
658
658
  filename: "Questions_orales_XVII.json",
659
- legislature: r.DixSept,
660
- repairZip: y,
659
+ legislature: a.DixSept,
660
+ repairZip: h,
661
661
  structure: 1,
662
662
  title: "Questions orales sans débats de la XVIIème législature",
663
663
  url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_orales_sans_debat/Questions_orales_sans_debat.json.zip"
664
664
  },
665
665
  {
666
666
  filename: "Questions_orales_XVI.json",
667
- legislature: r.Seize,
668
- repairZip: y,
667
+ legislature: a.Seize,
668
+ repairZip: h,
669
669
  structure: 1,
670
670
  title: "Questions orales sans débats de la XVIème législature",
671
671
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_orales_sans_debat/Questions_orales_sans_debat.json.zip"
@@ -674,11 +674,11 @@ const S = {
674
674
  comptesRendusSeances: [
675
675
  {
676
676
  filename: "Comptes_Rendus_Seances_XVII.xml",
677
- legislature: r.DixSept,
678
- repairZip: (t, s) => {
679
- const e = n.join(s, t.filename);
680
- i.existsSync(e) && i.removeSync(e), i.moveSync(
681
- n.join(s, `${t.filename}.temp`, "xml"),
677
+ legislature: a.DixSept,
678
+ repairZip: async (t, s) => {
679
+ const e = i.join(s, t.filename);
680
+ await n.pathExists(e) && await n.remove(e), await n.move(
681
+ i.join(s, `${t.filename}.temp`, "xml"),
682
682
  e
683
683
  );
684
684
  },
@@ -688,11 +688,11 @@ const S = {
688
688
  },
689
689
  {
690
690
  filename: "Comptes_Rendus_Seances_XVI.xml",
691
- legislature: r.Seize,
692
- repairZip: (t, s) => {
693
- const e = n.join(s, t.filename);
694
- i.existsSync(e) && i.removeSync(e), i.moveSync(
695
- n.join(s, `${t.filename}.temp`, "xml"),
691
+ legislature: a.Seize,
692
+ repairZip: async (t, s) => {
693
+ const e = i.join(s, t.filename);
694
+ await n.pathExists(e) && await n.remove(e), await n.move(
695
+ i.join(s, `${t.filename}.temp`, "xml"),
696
696
  e
697
697
  );
698
698
  },
@@ -701,7 +701,7 @@ const S = {
701
701
  url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
702
702
  }
703
703
  ]
704
- }, W = [
704
+ }, Q = [
705
705
  1e3,
706
706
  "M",
707
707
  900,
@@ -729,23 +729,23 @@ const S = {
729
729
  1,
730
730
  "I"
731
731
  ];
732
- function ne(t) {
732
+ function ie(t) {
733
733
  if (t < 0)
734
734
  return;
735
735
  if (t === 0)
736
736
  return "0I";
737
737
  let s = "";
738
- for (let e = 0; e < W.length; e += 2)
739
- for (; t >= W[e]; )
740
- s += W[e + 1], t -= W[e];
738
+ for (let e = 0; e < Q.length; e += 2)
739
+ for (; t >= Q[e]; )
740
+ s += Q[e + 1], t -= Q[e];
741
741
  return s;
742
742
  }
743
- function* z(t, s, e, a, l, d = "json", { enriched: _ = !1, log: j = !1, noValidation: h = !1 } = {}) {
743
+ function* z(t, s, e, r, l, d = "json", { enriched: _ = !1, log: j = !1, noValidation: y = !1 } = {}) {
744
744
  const F = /* @__PURE__ */ new Set();
745
745
  for (const v of e) {
746
- if (v.ignoreForWeb || !ie(s, v))
746
+ if (v.ignoreForWeb || !ne(s, v))
747
747
  continue;
748
- const b = new RegExp(`\\.${d}$`), x = n.join(
748
+ const b = new RegExp(`\\.${d}$`), x = i.join(
749
749
  t,
750
750
  v.filename.replace(
751
751
  b,
@@ -755,10 +755,10 @@ function* z(t, s, e, a, l, d = "json", { enriched: _ = !1, log: j = !1, noValida
755
755
  for (const D of P(x, l)) {
756
756
  if (!D[D.length - 1].endsWith(".json"))
757
757
  continue;
758
- const X = n.join(x, ...D);
758
+ const X = i.join(x, ...D);
759
759
  j && console.log(`Loading file: ${X}…`);
760
- let V = i.readFileSync(X, { encoding: "utf8" });
761
- const $ = h ? JSON.parse(V) : a(V);
760
+ let V = n.readFileSync(X, { encoding: "utf8" });
761
+ const $ = y ? JSON.parse(V) : r(V);
762
762
  F.has($.uid) || (F.add($.uid), yield {
763
763
  datasetLegislature: v.legislature,
764
764
  filePath: X,
@@ -768,160 +768,160 @@ function* z(t, s, e, a, l, d = "json", { enriched: _ = !1, log: j = !1, noValida
768
768
  }
769
769
  F.clear();
770
770
  }
771
- function ie(t, s) {
771
+ function ne(t, s) {
772
772
  const e = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
773
- return t === void 0 || e.includes(0) || s.legislature === r.All ? !0 : e.includes(s.legislature);
773
+ return t === void 0 || e.includes(0) || s.legislature === a.All ? !0 : e.includes(s.legislature);
774
774
  }
775
775
  function* de(t, s, e = {}) {
776
776
  for (const {
777
- datasetLegislature: a,
777
+ datasetLegislature: r,
778
778
  item: l,
779
779
  filePath: d
780
780
  } of z(
781
781
  t,
782
782
  s,
783
- S.acteursEtOrganes,
784
- R.toActeur,
783
+ A.acteursEtOrganes,
784
+ C.toActeur,
785
785
  ["acteurs"],
786
786
  "json",
787
787
  e
788
788
  ))
789
- yield { acteur: l, datasetLegislature: a, filePath: d };
789
+ yield { acteur: l, datasetLegislature: r, filePath: d };
790
790
  }
791
791
  function* pe(t, s, e = {}) {
792
792
  for (const {
793
- item: a,
793
+ item: r,
794
794
  datasetLegislature: l,
795
795
  filePath: d
796
796
  } of z(
797
797
  t,
798
798
  s,
799
- S.acteursEtOrganes,
800
- R.toOrgane,
799
+ A.acteursEtOrganes,
800
+ C.toOrgane,
801
801
  ["organes"],
802
802
  "json",
803
803
  e
804
804
  ))
805
- yield { organe: a, datasetLegislature: l, filePath: d };
805
+ yield { organe: r, datasetLegislature: l, filePath: d };
806
806
  }
807
807
  function* ge(t, s, e = {}) {
808
808
  for (const {
809
- datasetLegislature: a,
809
+ datasetLegislature: r,
810
810
  item: l,
811
811
  filePath: d
812
812
  } of z(
813
813
  t,
814
814
  s,
815
- S.amendements,
816
- w.toAmendement,
815
+ A.amendements,
816
+ N.toAmendement,
817
817
  [],
818
818
  "json",
819
819
  e
820
820
  ))
821
- yield { amendement: l, datasetLegislature: a, filePath: d };
821
+ yield { amendement: l, datasetLegislature: r, filePath: d };
822
822
  }
823
823
  function* _e(t, s, e = {}) {
824
824
  for (const {
825
- item: a,
825
+ item: r,
826
826
  datasetLegislature: l,
827
827
  filePath: d
828
828
  } of z(
829
829
  t,
830
830
  s,
831
- S.dossiersLegislatifs,
832
- q.toDocument,
831
+ A.dossiersLegislatifs,
832
+ R.toDocument,
833
833
  ["documents"],
834
834
  "json",
835
835
  e
836
836
  ))
837
- yield { document: a, datasetLegislature: l, filePath: d };
837
+ yield { document: r, datasetLegislature: l, filePath: d };
838
838
  }
839
839
  function* je(t, s, e = {}) {
840
840
  for (const {
841
- item: a,
841
+ item: r,
842
842
  datasetLegislature: l,
843
843
  filePath: d
844
844
  } of z(
845
845
  t,
846
846
  s,
847
- S.dossiersLegislatifs,
848
- q.toDossierParlementaire,
847
+ A.dossiersLegislatifs,
848
+ R.toDossierParlementaire,
849
849
  ["dossiers"],
850
850
  "json",
851
851
  e
852
852
  ))
853
- yield { dossierParlementaire: a, datasetLegislature: l, filePath: d };
853
+ yield { dossierParlementaire: r, datasetLegislature: l, filePath: d };
854
854
  }
855
- function* ye(t, s, e = {}) {
855
+ function* he(t, s, e = {}) {
856
856
  for (const {
857
- item: a,
857
+ item: r,
858
858
  datasetLegislature: l,
859
859
  filePath: d
860
860
  } of z(
861
861
  t,
862
862
  s,
863
- S.agendas,
864
- Z.toReunion,
863
+ A.agendas,
864
+ M.toReunion,
865
865
  [],
866
866
  "json",
867
867
  e
868
868
  ))
869
- yield { reunion: a, datasetLegislature: l, filePath: d };
869
+ yield { reunion: r, datasetLegislature: l, filePath: d };
870
870
  }
871
- function* he(t, s, e = {}) {
871
+ function* ye(t, s, e = {}) {
872
872
  for (const {
873
- item: a,
873
+ item: r,
874
874
  datasetLegislature: l,
875
875
  filePath: d
876
876
  } of z(
877
877
  t,
878
878
  s,
879
- S.scrutins,
880
- B.toScrutin,
879
+ A.scrutins,
880
+ Z.toScrutin,
881
881
  [],
882
882
  "json",
883
883
  e
884
884
  ))
885
- yield { scrutin: a, datasetLegislature: l, filePath: d };
885
+ yield { scrutin: r, datasetLegislature: l, filePath: d };
886
886
  }
887
- function* Se(t, s, e = {}) {
887
+ function* Ae(t, s, e = {}) {
888
888
  for (const {
889
- item: a,
889
+ item: r,
890
890
  datasetLegislature: l,
891
891
  filePath: d
892
892
  } of z(
893
893
  t,
894
894
  s,
895
- S.questions,
896
- J.toQuestion,
895
+ A.questions,
896
+ B.toQuestion,
897
897
  [],
898
898
  "json",
899
899
  e
900
900
  ))
901
- yield { question: a, datasetLegislature: l, filePath: d };
901
+ yield { question: r, datasetLegislature: l, filePath: d };
902
902
  }
903
- function* Ae(t, s, e = {}) {
903
+ function* Se(t, s, e = {}) {
904
904
  for (const {
905
- item: a,
905
+ item: r,
906
906
  datasetLegislature: l,
907
907
  filePath: d
908
908
  } of z(
909
909
  t,
910
910
  s,
911
- S.comptesRendusSeances,
912
- N.toCompteRendu,
911
+ A.comptesRendusSeances,
912
+ J.toCompteRendu,
913
913
  [],
914
914
  "xml",
915
915
  e
916
916
  ))
917
- yield { compteRendu: a, datasetLegislature: l, filePath: d };
917
+ yield { compteRendu: r, datasetLegislature: l, filePath: d };
918
918
  }
919
919
  function* Fe(t, s, { enriched: e = !1 } = {}) {
920
- const a = `Comptes_Rendus_Commissions_${ne(s)}${e ? "_enrichi" : "_nettoye"}`, l = n.join(t, a);
921
- if (i.existsSync(l))
922
- for (const d of T(l))
920
+ const r = `Comptes_Rendus_Commissions_${ie(s)}${e ? "_enrichi" : "_nettoye"}`, l = i.join(t, r);
921
+ if (n.existsSync(l))
922
+ for (const d of k(l))
923
923
  try {
924
- const _ = i.readFileSync(d, "utf-8");
924
+ const _ = n.readFileSync(d, "utf-8");
925
925
  yield {
926
926
  compteRendu: JSON.parse(_),
927
927
  datasetLegislature: s,
@@ -931,209 +931,209 @@ function* Fe(t, s, { enriched: e = !1 } = {}) {
931
931
  console.warn(`Erreur lors de la lecture du fichier ${d} :`, _);
932
932
  }
933
933
  }
934
- function* T(t) {
935
- if (i.existsSync(t))
936
- for (const s of i.readdirSync(t, { withFileTypes: !0 })) {
937
- const e = n.join(t, s.name);
938
- s.isDirectory() ? yield* T(e) : s.isFile() && e.endsWith(".json") && (yield e);
934
+ function* k(t) {
935
+ if (n.existsSync(t))
936
+ for (const s of n.readdirSync(t, { withFileTypes: !0 })) {
937
+ const e = i.join(t, s.name);
938
+ s.isDirectory() ? yield* k(e) : s.isFile() && e.endsWith(".json") && (yield e);
939
939
  }
940
940
  }
941
- function ve(t, s, e, { enriched: a = !1, log: l = !1 } = {}) {
941
+ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
942
942
  const d = {}, _ = {};
943
943
  if (s & I.ActeursEtOrganes)
944
- for (const o of S.acteursEtOrganes) {
945
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
944
+ for (const o of A.acteursEtOrganes) {
945
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
946
946
  continue;
947
- const m = n.join(
947
+ const m = i.join(
948
948
  t,
949
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
949
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
950
950
  );
951
951
  for (const u of P(m, ["acteurs"])) {
952
952
  if (!u[u.length - 1].endsWith(".json"))
953
953
  continue;
954
- const g = n.join(m, ...u);
954
+ const g = i.join(m, ...u);
955
955
  l && console.log(`Loading file: ${g}…`);
956
- const A = i.readFileSync(g, {
956
+ const S = n.readFileSync(g, {
957
957
  encoding: "utf8"
958
- }), f = R.toActeur(A);
958
+ }), f = C.toActeur(S);
959
959
  d[f.uid] === void 0 && (d[f.uid] = f);
960
960
  }
961
961
  for (const u of P(m, ["organes"])) {
962
962
  if (!u[u.length - 1].endsWith(".json"))
963
963
  continue;
964
- const g = n.join(m, ...u);
964
+ const g = i.join(m, ...u);
965
965
  l && console.log(`Loading file: ${g}…`);
966
- const A = i.readFileSync(g, {
966
+ const S = n.readFileSync(g, {
967
967
  encoding: "utf8"
968
- }), f = R.toOrgane(A);
968
+ }), f = C.toOrgane(S);
969
969
  _[f.uid] === void 0 && (_[f.uid] = f);
970
970
  }
971
971
  }
972
- const j = {}, h = {}, F = {};
972
+ const j = {}, y = {}, F = {};
973
973
  if (s & I.Agendas)
974
- for (const o of S.agendas) {
975
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
974
+ for (const o of A.agendas) {
975
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
976
976
  continue;
977
- const m = n.join(
977
+ const m = i.join(
978
978
  t,
979
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
979
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
980
980
  );
981
981
  for (const u of P(m)) {
982
982
  if (!u[u.length - 1].endsWith(".json"))
983
983
  continue;
984
- const g = n.join(m, ...u);
984
+ const g = i.join(m, ...u);
985
985
  l && console.log(`Loading file: ${g}…`);
986
- const A = i.readFileSync(g, {
986
+ const S = n.readFileSync(g, {
987
987
  encoding: "utf8"
988
- }), f = Z.toReunion(A);
988
+ }), f = M.toReunion(S);
989
989
  j[f.uid] === void 0 && (j[f.uid] = f);
990
990
  const L = f.timestampDebut.toISOString().split("T")[0];
991
- let U = h[L];
992
- U === void 0 && (U = h[L] = []), U.push(f);
993
- const C = f.odj;
994
- if (C !== void 0)
995
- for (const H of C.pointsOdj || [])
996
- for (const k of H.dossiersLegislatifsRefs || []) {
997
- let M = F[k];
998
- M === void 0 && (M = F[k] = []), M.push(f);
991
+ let w = y[L];
992
+ w === void 0 && (w = y[L] = []), w.push(f);
993
+ const U = f.odj;
994
+ if (U !== void 0)
995
+ for (const H of U.pointsOdj || [])
996
+ for (const E of H.dossiersLegislatifsRefs || []) {
997
+ let W = F[E];
998
+ W === void 0 && (W = F[E] = []), W.push(f);
999
999
  }
1000
1000
  }
1001
1001
  }
1002
1002
  const v = {};
1003
1003
  if (s & I.Amendements)
1004
- for (const o of S.amendements) {
1005
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
1004
+ for (const o of A.amendements) {
1005
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1006
1006
  continue;
1007
- const m = n.join(
1007
+ const m = i.join(
1008
1008
  t,
1009
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
1009
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
1010
1010
  );
1011
1011
  for (const u of P(m)) {
1012
1012
  if (!u[u.length - 1].endsWith(".json"))
1013
1013
  continue;
1014
- const g = n.join(m, ...u);
1014
+ const g = i.join(m, ...u);
1015
1015
  l && console.log(`Loading file: ${g}…`);
1016
- const A = i.readFileSync(g, {
1016
+ const S = n.readFileSync(g, {
1017
1017
  encoding: "utf8"
1018
- }), f = w.toAmendement(A);
1018
+ }), f = N.toAmendement(S);
1019
1019
  v[f.uid] === void 0 && (v[f.uid] = f);
1020
1020
  }
1021
1021
  }
1022
1022
  const b = {}, x = {}, D = {}, O = {};
1023
1023
  if (s & I.DossiersLegislatifs)
1024
- for (const o of S.dossiersLegislatifs) {
1025
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
1024
+ for (const o of A.dossiersLegislatifs) {
1025
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1026
1026
  continue;
1027
- const m = n.join(
1027
+ const m = i.join(
1028
1028
  t,
1029
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
1029
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
1030
1030
  );
1031
1031
  for (const u of P(m, ["documents"])) {
1032
1032
  if (!u[u.length - 1].endsWith(".json"))
1033
1033
  continue;
1034
- const g = n.join(m, ...u);
1034
+ const g = i.join(m, ...u);
1035
1035
  l && console.log(`Loading file: ${g}…`);
1036
- const A = i.readFileSync(g, {
1036
+ const S = n.readFileSync(g, {
1037
1037
  encoding: "utf8"
1038
- }), f = q.toDocument(A);
1038
+ }), f = R.toDocument(S);
1039
1039
  b[f.uid] === void 0 && (b[f.uid] = f);
1040
1040
  }
1041
1041
  for (const u of P(m, ["dossiers"])) {
1042
1042
  if (!u[u.length - 1].endsWith(".json"))
1043
1043
  continue;
1044
- const g = n.join(m, ...u);
1044
+ const g = i.join(m, ...u);
1045
1045
  l && console.log(`Loading file: ${g}…`);
1046
- const A = i.readFileSync(g, {
1046
+ const S = n.readFileSync(g, {
1047
1047
  encoding: "utf8"
1048
- }), f = q.toDossierParlementaire(A), L = f.titreDossier;
1048
+ }), f = R.toDossierParlementaire(S), L = f.titreDossier;
1049
1049
  L.senatChemin && x[L.senatChemin] === void 0 && (x[L.senatChemin] = f), L.titreChemin && D[L.titreChemin] === void 0 && (D[L.titreChemin] = f), O[f.uid] === void 0 && (O[f.uid] = f);
1050
1050
  }
1051
1051
  }
1052
1052
  let X = {};
1053
1053
  if (s & I.Photos) {
1054
1054
  {
1055
- const o = n.join(
1055
+ const o = i.join(
1056
1056
  t,
1057
1057
  `photos_deputes_${// TODO: Handle Legislature.All.
1058
- e === r.All ? r.DixSept : e}`,
1058
+ e === a.All ? a.DixSept : e}`,
1059
1059
  "deputes.json"
1060
1060
  );
1061
- if (i.existsSync(o)) {
1061
+ if (n.existsSync(o)) {
1062
1062
  l && console.log(`Loading file: ${o}`);
1063
- const m = i.readFileSync(o, { encoding: "utf8" });
1063
+ const m = n.readFileSync(o, { encoding: "utf8" });
1064
1064
  Object.assign(X, JSON.parse(m));
1065
1065
  } else l && console.log(`Ignoring missing file: ${o}`);
1066
1066
  }
1067
1067
  {
1068
- const o = n.join(
1068
+ const o = i.join(
1069
1069
  t,
1070
1070
  "photos_senateurs",
1071
1071
  "senateurs.json"
1072
1072
  );
1073
- if (i.existsSync(o)) {
1073
+ if (n.existsSync(o)) {
1074
1074
  l && console.log(`Loading file: ${o}`);
1075
- const m = i.readFileSync(o, { encoding: "utf8" });
1075
+ const m = n.readFileSync(o, { encoding: "utf8" });
1076
1076
  Object.assign(X, JSON.parse(m));
1077
1077
  } else l && console.log(`Ignoring missing file: ${o}`);
1078
1078
  }
1079
1079
  }
1080
1080
  const V = {};
1081
1081
  if (s & I.Scrutins)
1082
- for (const o of S.scrutins) {
1083
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
1082
+ for (const o of A.scrutins) {
1083
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1084
1084
  continue;
1085
- const m = n.join(
1085
+ const m = i.join(
1086
1086
  t,
1087
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
1087
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
1088
1088
  );
1089
1089
  for (const u of P(m)) {
1090
1090
  if (!u[u.length - 1].endsWith(".json"))
1091
1091
  continue;
1092
- const g = n.join(m, ...u);
1092
+ const g = i.join(m, ...u);
1093
1093
  l && console.log(`Loading file: ${g}…`);
1094
- const A = i.readFileSync(g, {
1094
+ const S = n.readFileSync(g, {
1095
1095
  encoding: "utf8"
1096
- }), f = B.toScrutin(A);
1096
+ }), f = Z.toScrutin(S);
1097
1097
  V[f.uid] === void 0 && (V[f.uid] = f);
1098
1098
  }
1099
1099
  }
1100
1100
  const $ = {};
1101
1101
  if (s & I.Questions)
1102
- for (const o of S.questions) {
1103
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
1102
+ for (const o of A.questions) {
1103
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1104
1104
  continue;
1105
- const m = n.join(
1105
+ const m = i.join(
1106
1106
  t,
1107
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
1107
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
1108
1108
  );
1109
1109
  for (const u of P(m)) {
1110
1110
  if (!u[u.length - 1].endsWith(".json"))
1111
1111
  continue;
1112
- const g = n.join(m, ...u);
1112
+ const g = i.join(m, ...u);
1113
1113
  l && console.log(`Loading file: ${g}…`);
1114
- const A = i.readFileSync(g, {
1114
+ const S = n.readFileSync(g, {
1115
1115
  encoding: "utf8"
1116
- }), f = J.toQuestion(A);
1116
+ }), f = B.toQuestion(S);
1117
1117
  $[f.uid] === void 0 && ($[f.uid] = f);
1118
1118
  }
1119
1119
  }
1120
1120
  const p = {};
1121
1121
  if (s & I.ComptesRendusSeances)
1122
- for (const o of S.comptesRendusSeances) {
1123
- if (o.ignoreForWeb || e !== r.All && o.legislature !== r.All && e !== o.legislature)
1122
+ for (const o of A.comptesRendusSeances) {
1123
+ if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
1124
1124
  continue;
1125
- const m = n.join(
1125
+ const m = i.join(
1126
1126
  t,
1127
- o.filename.replace(/\.json$/, a ? "_enrichi" : "_nettoye")
1127
+ o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
1128
1128
  );
1129
1129
  for (const u of P(m)) {
1130
1130
  if (!u[u.length - 1].endsWith(".json"))
1131
1131
  continue;
1132
- const g = n.join(m, ...u);
1132
+ const g = i.join(m, ...u);
1133
1133
  l && console.log(`Loading file: ${g}…`);
1134
- const A = i.readFileSync(g, {
1134
+ const S = n.readFileSync(g, {
1135
1135
  encoding: "utf8"
1136
- }), f = N.toCompteRendu(A);
1136
+ }), f = J.toCompteRendu(S);
1137
1137
  p[f.uid] === void 0 && (p[f.uid] = f);
1138
1138
  }
1139
1139
  }
@@ -1147,81 +1147,81 @@ function ve(t, s, e, { enriched: a = !1, log: l = !1 } = {}) {
1147
1147
  organeByUid: _,
1148
1148
  photoByUid: X,
1149
1149
  reunionByUid: j,
1150
- reunionsByDay: h,
1150
+ reunionsByDay: y,
1151
1151
  reunionsByDossierUid: F,
1152
1152
  scrutinByUid: V,
1153
1153
  questionByUid: $,
1154
1154
  compteRenduByUid: p
1155
1155
  };
1156
1156
  }
1157
- function Ie(t, s, e, { log: a = !1 } = {}) {
1157
+ function Ie(t, s, e, { log: r = !1 } = {}) {
1158
1158
  const l = {}, d = {};
1159
1159
  if (s & I.ActeursEtOrganes)
1160
- for (const p of S.acteursEtOrganes) {
1161
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1160
+ for (const p of A.acteursEtOrganes) {
1161
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1162
1162
  continue;
1163
- const o = n.join(
1163
+ const o = i.join(
1164
1164
  t,
1165
1165
  p.filename.replace(/\.json$/, "_nettoye.json")
1166
1166
  );
1167
- a && console.log(`Loading file: ${o}`);
1168
- const m = i.readFileSync(o, { encoding: "utf8" }), u = R.toActeursEtOrganes(m);
1167
+ r && console.log(`Loading file: ${o}`);
1168
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = C.toActeursEtOrganes(m);
1169
1169
  for (const c of u.acteurs)
1170
1170
  l[c.uid] === void 0 && (l[c.uid] = c);
1171
1171
  for (const c of u.organes)
1172
1172
  d[c.uid] === void 0 && (d[c.uid] = c);
1173
1173
  }
1174
- const _ = {}, j = {}, h = {};
1174
+ const _ = {}, j = {}, y = {};
1175
1175
  if (s & I.Agendas)
1176
- for (const p of S.agendas) {
1177
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1176
+ for (const p of A.agendas) {
1177
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1178
1178
  continue;
1179
- const o = n.join(
1179
+ const o = i.join(
1180
1180
  t,
1181
1181
  p.filename.replace(/\.json$/, "_nettoye.json")
1182
1182
  );
1183
- a && console.log(`Loading file: ${o}`);
1184
- const m = i.readFileSync(o, { encoding: "utf8" }), u = Z.toAgendas(m);
1183
+ r && console.log(`Loading file: ${o}`);
1184
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = M.toAgendas(m);
1185
1185
  for (const c of u.reunions) {
1186
1186
  _[c.uid] === void 0 && (_[c.uid] = c);
1187
1187
  const g = c.timestampDebut.toISOString().split("T")[0];
1188
- let A = j[g];
1189
- A === void 0 && (A = j[g] = []), A.push(c);
1188
+ let S = j[g];
1189
+ S === void 0 && (S = j[g] = []), S.push(c);
1190
1190
  const f = c.odj;
1191
1191
  if (f !== void 0)
1192
1192
  for (const L of f.pointsOdj || [])
1193
- for (const U of L.dossiersLegislatifsRefs || []) {
1194
- let C = h[U];
1195
- C === void 0 && (C = h[U] = []), C.push(c);
1193
+ for (const w of L.dossiersLegislatifsRefs || []) {
1194
+ let U = y[w];
1195
+ U === void 0 && (U = y[w] = []), U.push(c);
1196
1196
  }
1197
1197
  }
1198
1198
  }
1199
1199
  const F = {};
1200
1200
  if (s & I.Amendements)
1201
- for (const p of S.amendements) {
1202
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1201
+ for (const p of A.amendements) {
1202
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1203
1203
  continue;
1204
- const o = n.join(
1204
+ const o = i.join(
1205
1205
  t,
1206
1206
  p.filename.replace(/\.json$/, "_nettoye.json")
1207
1207
  );
1208
- a && console.log(`Loading file: ${o}`);
1209
- const m = i.readFileSync(o, { encoding: "utf8" }), u = w.toAmendements(m);
1208
+ r && console.log(`Loading file: ${o}`);
1209
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = N.toAmendements(m);
1210
1210
  for (const c of u.textesLegislatifs)
1211
1211
  for (const g of c.amendements)
1212
1212
  F[g.uid] === void 0 && (F[g.uid] = g);
1213
1213
  }
1214
1214
  const v = {}, b = {}, x = {}, D = {};
1215
1215
  if (s & I.DossiersLegislatifs)
1216
- for (const p of S.dossiersLegislatifs) {
1217
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1216
+ for (const p of A.dossiersLegislatifs) {
1217
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1218
1218
  continue;
1219
- const o = n.join(
1219
+ const o = i.join(
1220
1220
  t,
1221
1221
  p.filename.replace(/\.json$/, "_nettoye.json")
1222
1222
  );
1223
- a && console.log(`Loading file: ${o}`);
1224
- const m = i.readFileSync(o, { encoding: "utf8" }), u = q.toDossiersLegislatifs(m);
1223
+ r && console.log(`Loading file: ${o}`);
1224
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = R.toDossiersLegislatifs(m);
1225
1225
  for (const c of u.textesLegislatifs)
1226
1226
  v[c.uid] === void 0 && (v[c.uid] = c);
1227
1227
  for (const c of u.dossiersParlementaires) {
@@ -1233,70 +1233,70 @@ function Ie(t, s, e, { log: a = !1 } = {}) {
1233
1233
  if (s & I.Photos) {
1234
1234
  const p = {};
1235
1235
  {
1236
- const o = n.join(
1236
+ const o = i.join(
1237
1237
  t,
1238
1238
  `photos_deputes_${// TODO: Handle Legislature.All.
1239
- e === r.All ? r.DixSept : e}`,
1239
+ e === a.All ? a.DixSept : e}`,
1240
1240
  "deputes.json"
1241
1241
  );
1242
- if (i.existsSync(o)) {
1243
- a && console.log(`Loading file: ${o}`);
1244
- const m = i.readFileSync(o, { encoding: "utf8" });
1242
+ if (n.existsSync(o)) {
1243
+ r && console.log(`Loading file: ${o}`);
1244
+ const m = n.readFileSync(o, { encoding: "utf8" });
1245
1245
  Object.assign(p, JSON.parse(m));
1246
- } else a && console.log(`Ignoring missing file: ${o}`);
1246
+ } else r && console.log(`Ignoring missing file: ${o}`);
1247
1247
  }
1248
1248
  {
1249
- const o = n.join(
1249
+ const o = i.join(
1250
1250
  t,
1251
1251
  "photos_senateurs",
1252
1252
  "senateurs.json"
1253
1253
  );
1254
- if (i.existsSync(o)) {
1255
- a && console.log(`Loading file: ${o}`);
1256
- const m = i.readFileSync(o, { encoding: "utf8" });
1254
+ if (n.existsSync(o)) {
1255
+ r && console.log(`Loading file: ${o}`);
1256
+ const m = n.readFileSync(o, { encoding: "utf8" });
1257
1257
  Object.assign(p, JSON.parse(m));
1258
- } else a && console.log(`Ignoring missing file: ${o}`);
1258
+ } else r && console.log(`Ignoring missing file: ${o}`);
1259
1259
  }
1260
1260
  }
1261
1261
  const X = {};
1262
1262
  if (s & I.Scrutins)
1263
- for (const p of S.scrutins) {
1264
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1263
+ for (const p of A.scrutins) {
1264
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1265
1265
  continue;
1266
- const o = n.join(
1266
+ const o = i.join(
1267
1267
  t,
1268
1268
  p.filename.replace(/\.json$/, "_nettoye.json")
1269
1269
  );
1270
- a && console.log(`Loading file: ${o}`);
1271
- const m = i.readFileSync(o, { encoding: "utf8" }), u = B.toScrutins(m);
1270
+ r && console.log(`Loading file: ${o}`);
1271
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = Z.toScrutins(m);
1272
1272
  for (const c of u.scrutins)
1273
1273
  X[c.uid] === void 0 && (X[c.uid] = c);
1274
1274
  }
1275
1275
  const V = {};
1276
1276
  if (s & I.Questions)
1277
- for (const p of S.questions) {
1278
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1277
+ for (const p of A.questions) {
1278
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1279
1279
  continue;
1280
- const o = n.join(
1280
+ const o = i.join(
1281
1281
  t,
1282
1282
  p.filename.replace(/\.json$/, "_nettoye.json")
1283
1283
  );
1284
- a && console.log(`Loading file: ${o}`);
1285
- const m = i.readFileSync(o, { encoding: "utf8" }), u = J.toQuestions(m);
1284
+ r && console.log(`Loading file: ${o}`);
1285
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = B.toQuestions(m);
1286
1286
  for (const c of u.questions)
1287
1287
  V[c.uid] === void 0 && (V[c.uid] = c);
1288
1288
  }
1289
1289
  const $ = {};
1290
1290
  if (s & I.ComptesRendusSeances)
1291
- for (const p of S.comptesRendusSeances) {
1292
- if (p.ignoreForWeb || e !== r.All && p.legislature !== r.All && e !== p.legislature)
1291
+ for (const p of A.comptesRendusSeances) {
1292
+ if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
1293
1293
  continue;
1294
- const o = n.join(
1294
+ const o = i.join(
1295
1295
  t,
1296
1296
  p.filename.replace(/\.json$/, "_nettoye.json")
1297
1297
  );
1298
- a && console.log(`Loading file: ${o}`);
1299
- const m = i.readFileSync(o, { encoding: "utf8" }), u = N.toComptesRendus(m);
1298
+ r && console.log(`Loading file: ${o}`);
1299
+ const m = n.readFileSync(o, { encoding: "utf8" }), u = J.toComptesRendus(m);
1300
1300
  for (const c of u.comptesRendus)
1301
1301
  $[c.uid] === void 0 && ($[c.uid] = c);
1302
1302
  }
@@ -1311,138 +1311,138 @@ function Ie(t, s, e, { log: a = !1 } = {}) {
1311
1311
  photoByUid: O,
1312
1312
  reunionByUid: _,
1313
1313
  reunionsByDay: j,
1314
- reunionsByDossierUid: h,
1314
+ reunionsByDossierUid: y,
1315
1315
  scrutinByUid: X,
1316
1316
  questionByUid: V,
1317
1317
  compteRenduByUid: $
1318
1318
  };
1319
1319
  }
1320
1320
  function be(t, s, e) {
1321
- const a = n.join(t, "Documents"), l = oe(a, s), d = n.join(l, "index.json");
1322
- if (!i.pathExistsSync(d))
1321
+ const r = i.join(t, "Documents"), l = oe(r, s), d = i.join(l, "index.json");
1322
+ if (!n.pathExistsSync(d))
1323
1323
  return;
1324
- const _ = i.readJsonSync(d);
1324
+ const _ = n.readJsonSync(d);
1325
1325
  for (const j of e)
1326
- for (const { filename: h, url: F } of _[j] ?? [])
1327
- if (h !== void 0)
1328
- return { format: j, path: n.join(l, h), url: F };
1326
+ for (const { filename: y, url: F } of _[j] ?? [])
1327
+ if (y !== void 0)
1328
+ return { format: j, path: i.join(l, y), url: F };
1329
1329
  }
1330
1330
  function De(t, s, { log: e = !1 } = {}) {
1331
- const a = n.join(
1331
+ const r = i.join(
1332
1332
  t,
1333
1333
  `photos_deputes_${// TODO: Handle Legislature.All.
1334
- s === r.All ? r.DixSept : s}`,
1334
+ s === a.All ? a.DixSept : s}`,
1335
1335
  "deputes.json"
1336
1336
  );
1337
- e && console.log(`Loading file: ${a}`);
1338
- const l = i.readFileSync(a, { encoding: "utf8" });
1337
+ e && console.log(`Loading file: ${r}`);
1338
+ const l = n.readFileSync(r, { encoding: "utf8" });
1339
1339
  return JSON.parse(l);
1340
1340
  }
1341
1341
  function Xe(t, { log: s = !1 } = {}) {
1342
- const e = n.join(
1342
+ const e = i.join(
1343
1343
  t,
1344
1344
  "photos_senateurs",
1345
1345
  "senateurs.json"
1346
1346
  );
1347
1347
  s && console.log(`Loading file: ${e}`);
1348
- const a = i.readFileSync(e, { encoding: "utf8" });
1349
- return JSON.parse(a);
1348
+ const r = n.readFileSync(e, { encoding: "utf8" });
1349
+ return JSON.parse(r);
1350
1350
  }
1351
1351
  function oe(t, s) {
1352
1352
  const e = s.match(Y);
1353
- Q.notStrictEqual(
1353
+ q.notStrictEqual(
1354
1354
  e,
1355
1355
  null,
1356
1356
  `Unexpected structure for document UID: ${s}`
1357
1357
  );
1358
- const a = e.groups, l = n.join(
1358
+ const r = e.groups, l = i.join(
1359
1359
  t,
1360
- a.documentType ?? a.documentType2
1361
- ), d = n.join(l, a.chambre ?? a.chambre2), _ = n.join(
1360
+ r.documentType ?? r.documentType2
1361
+ ), d = i.join(l, r.chambre ?? r.chambre2), _ = i.join(
1362
1362
  d,
1363
- a.republique ?? a.republique2
1364
- ), j = n.join(
1363
+ r.republique ?? r.republique2
1364
+ ), j = i.join(
1365
1365
  _,
1366
- a.legislature ?? a.legislature2
1367
- ), h = a.etat;
1368
- if (h === void 0)
1369
- return i.ensureDirSync(j), n.join(j, s);
1370
- const F = n.join(j, h);
1371
- let v = "000000" + (a.numero ?? a.numero2);
1366
+ r.legislature ?? r.legislature2
1367
+ ), y = r.etat;
1368
+ if (y === void 0)
1369
+ return n.ensureDirSync(j), i.join(j, s);
1370
+ const F = i.join(j, y);
1371
+ let v = "000000" + (r.numero ?? r.numero2);
1372
1372
  v = v.substring(v.length - 6);
1373
- const b = n.join(F, v.substring(0, 3));
1374
- return i.ensureDirSync(b), n.join(b, s);
1373
+ const b = i.join(F, v.substring(0, 3));
1374
+ return n.ensureDirSync(b), i.join(b, s);
1375
1375
  }
1376
1376
  function Ve(t, s) {
1377
- return E(t, s, te);
1377
+ return T(t, s, te);
1378
1378
  }
1379
1379
  function $e(t, s) {
1380
1380
  const e = G.exec(s);
1381
- Q.notStrictEqual(
1381
+ q.notStrictEqual(
1382
1382
  e,
1383
1383
  null,
1384
1384
  `Unexpected structure for reunion UID: ${s}`
1385
1385
  );
1386
- const a = n.join(t, e[1]), l = n.join(a, e[2]), d = n.join(l, e[3]), _ = n.join(d, e[4]), j = n.join(_, e[5]);
1387
- let h = "000000000" + e[6];
1388
- h = h.substring(h.length - 9);
1389
- const F = n.join(j, h.substring(0, 3)), v = n.join(F, h.substring(3, 3));
1390
- return i.ensureDirSync(v), n.join(v, s);
1386
+ const r = i.join(t, e[1]), l = i.join(r, e[2]), d = i.join(l, e[3]), _ = i.join(d, e[4]), j = i.join(_, e[5]);
1387
+ let y = "000000000" + e[6];
1388
+ y = y.substring(y.length - 9);
1389
+ const F = i.join(j, y.substring(0, 3)), v = i.join(F, y.substring(3, 3));
1390
+ return n.ensureDirSync(v), i.join(v, s);
1391
1391
  }
1392
1392
  function Le(t, s) {
1393
1393
  const e = K.exec(s);
1394
- Q.notStrictEqual(
1394
+ q.notStrictEqual(
1395
1395
  e,
1396
1396
  null,
1397
1397
  `Unexpected structure for scrutin UID: ${s}`
1398
1398
  );
1399
- const a = n.join(t, e[1]), l = n.join(a, e[2]), d = n.join(l, e[3]);
1399
+ const r = i.join(t, e[1]), l = i.join(r, e[2]), d = i.join(l, e[3]);
1400
1400
  let _ = "000000" + e[4];
1401
1401
  _ = _.substring(_.length - 6);
1402
- const j = n.join(d, _.substring(0, 3));
1403
- return i.ensureDirSync(j), n.join(j, s);
1402
+ const j = i.join(d, _.substring(0, 3));
1403
+ return n.ensureDirSync(j), i.join(j, s);
1404
1404
  }
1405
1405
  function xe(t, s) {
1406
- return E(t, s, se);
1406
+ return T(t, s, se);
1407
1407
  }
1408
1408
  function Pe(t, s) {
1409
1409
  const e = ee.exec(s);
1410
- Q.notStrictEqual(
1410
+ q.notStrictEqual(
1411
1411
  e,
1412
1412
  null,
1413
1413
  `Unexpected structure for object with UID: ${s}`
1414
1414
  );
1415
- const a = n.join(t, e[2]), l = n.join(a, e[3]), d = n.join(l, e[4]), _ = n.join(d, e[5]);
1415
+ const r = i.join(t, e[2]), l = i.join(r, e[3]), d = i.join(l, e[4]), _ = i.join(d, e[5]);
1416
1416
  let j = "000000000" + e[7];
1417
1417
  j = j.substring(j.length - 9);
1418
- const h = n.join(_, j.substring(0, 3)), F = n.join(h, j.substring(3, 3));
1419
- return i.ensureDirSync(F), n.join(F, s);
1418
+ const y = i.join(_, j.substring(0, 3)), F = i.join(y, j.substring(3, 3));
1419
+ return n.ensureDirSync(F), i.join(F, s);
1420
1420
  }
1421
- function E(t, s, e) {
1422
- const a = e.exec(s);
1423
- Q.notStrictEqual(
1424
- a,
1421
+ function T(t, s, e) {
1422
+ const r = e.exec(s);
1423
+ q.notStrictEqual(
1424
+ r,
1425
1425
  null,
1426
1426
  `Unexpected structure for object with UID: ${s}`
1427
1427
  );
1428
- const l = n.join(t, a[1]), d = n.join(l, a[2]);
1429
- let _ = "000000" + a[3];
1428
+ const l = i.join(t, r[1]), d = i.join(l, r[2]);
1429
+ let _ = "000000" + r[3];
1430
1430
  _ = _.substring(_.length - 6);
1431
- const j = n.join(d, _.substring(0, 3));
1432
- return i.ensureDirSync(j), n.join(j, s);
1431
+ const j = i.join(d, _.substring(0, 3));
1432
+ return n.ensureDirSync(j), i.join(j, s);
1433
1433
  }
1434
1434
  export {
1435
1435
  I as EnabledDatasets,
1436
1436
  de as iterLoadAssembleeActeurs,
1437
1437
  ge as iterLoadAssembleeAmendements,
1438
- Ae as iterLoadAssembleeComptesRendus,
1438
+ Se as iterLoadAssembleeComptesRendus,
1439
1439
  Fe as iterLoadAssembleeComptesRendusCommissions,
1440
1440
  _e as iterLoadAssembleeDocuments,
1441
1441
  je as iterLoadAssembleeDossiersParlementaires,
1442
1442
  pe as iterLoadAssembleeOrganes,
1443
- Se as iterLoadAssembleeQuestions,
1444
- ye as iterLoadAssembleeReunions,
1445
- he as iterLoadAssembleeScrutins,
1443
+ Ae as iterLoadAssembleeQuestions,
1444
+ he as iterLoadAssembleeReunions,
1445
+ ye as iterLoadAssembleeScrutins,
1446
1446
  ve as loadAssembleeData,
1447
1447
  Ie as loadAssembleeDataFromBigFiles,
1448
1448
  be as loadAssembleeDocumentFile,