@tricoteuses/assemblee 2.1.2 → 2.2.0
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/LICENSE.md +1 -1
- package/README.md +7 -13
- package/lib/cleaners.js +50 -48
- package/lib/index-COAP8XeF.js +8733 -0
- package/lib/index.js +548 -943
- package/lib/{loaders-GjkDsv4D.js → loaders-Csd5rgG_.js} +2110 -1411
- package/lib/loaders.d.ts +4 -0
- package/lib/loaders.js +18 -17
- package/lib/parsers/compte_rendu_commission.d.ts +2 -0
- package/lib/parsers.js +583 -9288
- package/lib/raw_types/dossiers_legislatifs.d.ts +1 -1
- package/lib/schemas/compte_rendu_commission/CompteRenduCommission.json +63 -0
- package/lib/schemas/debats.json +6 -0
- package/lib/schemas/dossiers_legislatifs.json +5 -1
- package/lib/scripts/retrieve_documents.d.ts +9 -0
- package/lib/scripts/shared/cli_helpers.d.ts +1 -0
- package/lib/types/debats.d.ts +2 -0
- package/lib/types/dossiers_legislatifs.d.ts +5 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { C as
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const
|
|
1
|
+
import { c as L, t as p, g as M, m as H, a, b as F, d as j, e as Q, f as X, h as G, i as V, l as z, j as Z, k as J, w as $, n as E, o as Y, p as K, q as b } from "./parse-Ccs6wcUg.js";
|
|
2
|
+
import { C as _ } from "./loaders-Csd5rgG_.js";
|
|
3
|
+
import { y as ze, _ as Ze, h as Je, f as $e, i as Ke, $ as et, a0 as tt, D as nt, z as rt, a7 as ot, A as it, E as at, j as st, F as ut, m as ct, X as ft, a1 as dt, a2 as mt, a3 as gt, a4 as ht, M as lt, N as yt, n as pt, o as Dt, a5 as vt, P as Rt, q as xt, r as wt, B as Ot, G as Tt, Q as bt, R as Bt, k as Mt, t as _t, S as St, H as At, I as Pt, J as Nt, K as Lt, L as Et, O as Yt, U as kt, Z as Ct, a6 as Ut, T as It, V as qt, l as Wt, v as Ht, Y as Ft, x as jt, W as Qt, g as Xt, c as Gt, a8 as Vt, p as zt, s as Zt, a as Jt, b as $t, d as Kt, u as en, a9 as tn, aa as nn, w as rn, e as on } from "./loaders-Csd5rgG_.js";
|
|
4
|
+
import { A as sn, a as un, C as cn, b as fn, c as dn, D as mn, E as gn, d as hn, S as ln, T as yn, e as pn, f as Dn, g as vn } from "./amendements-40Z7OJLT.js";
|
|
5
|
+
var k = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(k || {});
|
|
6
|
+
const Ye = Object.values(k);
|
|
7
|
+
var C = /* @__PURE__ */ ((e) => (e.Acte_organe = "acte.organe", e.Acte_provenance = "acte.provenance", e.Acte_rapporteurs_acteur = "acte.rapporteurs.acteur", e.Acte_reunion = "acte.reunion", e.Acte_texteAdopte = "acte.texteAdopte", e.Acte_texteAssocie = "acte.texteAssocie", e.Acte_textesAssocies_texteAssocie = "acte.textesAssocies.texteAssocie", e.Acte_votes = "acte.votes", e.Acteur_mandats_organes = "acteur.mandats.organes", e.Amendement_signataires_auteur_acteur = "amendement.signataires.auteur.acteur", e.Amendement_signataires_auteur_auteurRapporteurOrgane = "amendement.signataires.auteur.auteurRapporteurOrgane", e.Amendement_signataires_auteur_gouvernement = "amendement.signataires.auteur.gouvernement", e.Amendement_signataires_auteur_groupePolitique = "amendement.signataires.auteur.groupePolitique", e.Amendement_signataires_cosignataires = "amendement.signataires.cosignataires", e.Amendement_texteLegislatif = "amendement.texteLegislatif", e.Document_auteurs_acteur_acteur = "document.auteurs.acteur.acteur", e.Document_auteurs_organe = "document.auteurs.organe", e.Document_dossier = "document.dossier", e.Dossier_initiateur_acteurs_acteur = "dossier.initiateur.acteurs.acteur", e.Dossier_initiateur_organe = "dossier.initiateur.organe", e.Organe_organeParent = "organe.organeParent", e.Organe_organePrecedent = "organe.organePrecedent", e.Reunion_demandeurs_acteurs_acteur = "reunion.demandeurs.acteurs.acteur", e.Reunion_demandeurs_organe_organe = "reunion.demandeurs.organe.organe", e.Reunion_organeReuni = "reunion.organeReuni", e.Reunion_participants_participantsInternes_acteur = "reunion.participants.participantsInternes.acteur", e.Scrutin_miseAuPoint = "scrutin.miseAuPoint", e.Scrutin_organe = "scrutin.organe", e.Scrutin_ventilationVotes_groupes_organe = "scrutin.ventilationVotes.groupes.organe", e))(C || {});
|
|
8
|
+
const ke = Object.values(C);
|
|
9
|
+
function ee(e, ...t) {
|
|
10
|
+
const n = L.bind(
|
|
11
11
|
null,
|
|
12
|
-
t.find((
|
|
12
|
+
t.find((r) => typeof r == "object")
|
|
13
13
|
);
|
|
14
|
-
return t.map(
|
|
14
|
+
return t.map(n);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
16
|
+
function S(e, t) {
|
|
17
|
+
const n = p(e, t?.in);
|
|
18
|
+
return n.setHours(0, 0, 0, 0), n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const [
|
|
22
|
-
|
|
20
|
+
function te(e, t, n) {
|
|
21
|
+
const [r, o] = ee(
|
|
22
|
+
n?.in,
|
|
23
23
|
e,
|
|
24
24
|
t
|
|
25
|
-
), i =
|
|
26
|
-
return Math.round((
|
|
25
|
+
), i = S(r), s = S(o), c = +i - M(i), u = +s - M(s);
|
|
26
|
+
return Math.round((c - u) / H);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
return
|
|
28
|
+
function ne(e, t) {
|
|
29
|
+
const n = p(e, t?.in);
|
|
30
|
+
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
function re(e, t) {
|
|
33
|
+
const n = p(e, t?.in);
|
|
34
|
+
return te(n, ne(n)) + 1;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const h = {
|
|
37
37
|
// Year
|
|
38
38
|
y(e, t) {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
40
|
+
return a(t === "yy" ? r % 100 : r, t.length);
|
|
41
41
|
},
|
|
42
42
|
// Month
|
|
43
43
|
M(e, t) {
|
|
44
|
-
const
|
|
45
|
-
return t === "M" ? String(
|
|
44
|
+
const n = e.getMonth();
|
|
45
|
+
return t === "M" ? String(n + 1) : a(n + 1, 2);
|
|
46
46
|
},
|
|
47
47
|
// Day of the month
|
|
48
48
|
d(e, t) {
|
|
49
|
-
return
|
|
49
|
+
return a(e.getDate(), t.length);
|
|
50
50
|
},
|
|
51
51
|
// AM or PM
|
|
52
52
|
a(e, t) {
|
|
53
|
-
const
|
|
53
|
+
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
54
54
|
switch (t) {
|
|
55
55
|
case "a":
|
|
56
56
|
case "aa":
|
|
57
|
-
return
|
|
57
|
+
return n.toUpperCase();
|
|
58
58
|
case "aaa":
|
|
59
|
-
return
|
|
59
|
+
return n;
|
|
60
60
|
case "aaaaa":
|
|
61
|
-
return
|
|
61
|
+
return n[0];
|
|
62
62
|
case "aaaa":
|
|
63
63
|
default:
|
|
64
|
-
return
|
|
64
|
+
return n === "am" ? "a.m." : "p.m.";
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
// Hour [1-12]
|
|
68
68
|
h(e, t) {
|
|
69
|
-
return
|
|
69
|
+
return a(e.getHours() % 12 || 12, t.length);
|
|
70
70
|
},
|
|
71
71
|
// Hour [0-23]
|
|
72
72
|
H(e, t) {
|
|
73
|
-
return
|
|
73
|
+
return a(e.getHours(), t.length);
|
|
74
74
|
},
|
|
75
75
|
// Minute
|
|
76
76
|
m(e, t) {
|
|
77
|
-
return
|
|
77
|
+
return a(e.getMinutes(), t.length);
|
|
78
78
|
},
|
|
79
79
|
// Second
|
|
80
80
|
s(e, t) {
|
|
81
|
-
return
|
|
81
|
+
return a(e.getSeconds(), t.length);
|
|
82
82
|
},
|
|
83
83
|
// Fraction of second
|
|
84
84
|
S(e, t) {
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
|
|
86
|
+
r * Math.pow(10, n - 3)
|
|
87
87
|
);
|
|
88
|
-
return
|
|
88
|
+
return a(o, t.length);
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, D = {
|
|
91
91
|
midnight: "midnight",
|
|
92
92
|
noon: "noon",
|
|
93
93
|
morning: "morning",
|
|
94
94
|
afternoon: "afternoon",
|
|
95
95
|
evening: "evening",
|
|
96
96
|
night: "night"
|
|
97
|
-
},
|
|
97
|
+
}, A = {
|
|
98
98
|
// Era
|
|
99
|
-
G: function(e, t,
|
|
100
|
-
const
|
|
99
|
+
G: function(e, t, n) {
|
|
100
|
+
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
101
101
|
switch (t) {
|
|
102
102
|
// AD, BC
|
|
103
103
|
case "G":
|
|
104
104
|
case "GG":
|
|
105
105
|
case "GGG":
|
|
106
|
-
return
|
|
106
|
+
return n.era(r, { width: "abbreviated" });
|
|
107
107
|
// A, B
|
|
108
108
|
case "GGGGG":
|
|
109
|
-
return
|
|
109
|
+
return n.era(r, { width: "narrow" });
|
|
110
110
|
// Anno Domini, Before Christ
|
|
111
111
|
case "GGGG":
|
|
112
112
|
default:
|
|
113
|
-
return
|
|
113
|
+
return n.era(r, { width: "wide" });
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
// Year
|
|
117
|
-
y: function(e, t,
|
|
117
|
+
y: function(e, t, n) {
|
|
118
118
|
if (t === "yo") {
|
|
119
|
-
const
|
|
120
|
-
return
|
|
119
|
+
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
120
|
+
return n.ordinalNumber(o, { unit: "year" });
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return h.y(e, t);
|
|
123
123
|
},
|
|
124
124
|
// Local week-numbering year
|
|
125
|
-
Y: function(e, t,
|
|
126
|
-
const o =
|
|
125
|
+
Y: function(e, t, n, r) {
|
|
126
|
+
const o = X(e, r), i = o > 0 ? o : 1 - o;
|
|
127
127
|
if (t === "YY") {
|
|
128
|
-
const
|
|
129
|
-
return s
|
|
128
|
+
const s = i % 100;
|
|
129
|
+
return a(s, 2);
|
|
130
130
|
}
|
|
131
|
-
return t === "Yo" ?
|
|
131
|
+
return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : a(i, t.length);
|
|
132
132
|
},
|
|
133
133
|
// ISO week-numbering year
|
|
134
134
|
R: function(e, t) {
|
|
135
|
-
const
|
|
136
|
-
return
|
|
135
|
+
const n = Q(e);
|
|
136
|
+
return a(n, t.length);
|
|
137
137
|
},
|
|
138
138
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
139
139
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -145,437 +145,437 @@ const y = {
|
|
|
145
145
|
// Also `yy` always returns the last two digits of a year,
|
|
146
146
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
147
147
|
u: function(e, t) {
|
|
148
|
-
const
|
|
149
|
-
return
|
|
148
|
+
const n = e.getFullYear();
|
|
149
|
+
return a(n, t.length);
|
|
150
150
|
},
|
|
151
151
|
// Quarter
|
|
152
|
-
Q: function(e, t,
|
|
153
|
-
const
|
|
152
|
+
Q: function(e, t, n) {
|
|
153
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
154
154
|
switch (t) {
|
|
155
155
|
// 1, 2, 3, 4
|
|
156
156
|
case "Q":
|
|
157
|
-
return String(
|
|
157
|
+
return String(r);
|
|
158
158
|
// 01, 02, 03, 04
|
|
159
159
|
case "QQ":
|
|
160
|
-
return
|
|
160
|
+
return a(r, 2);
|
|
161
161
|
// 1st, 2nd, 3rd, 4th
|
|
162
162
|
case "Qo":
|
|
163
|
-
return
|
|
163
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
164
164
|
// Q1, Q2, Q3, Q4
|
|
165
165
|
case "QQQ":
|
|
166
|
-
return
|
|
166
|
+
return n.quarter(r, {
|
|
167
167
|
width: "abbreviated",
|
|
168
168
|
context: "formatting"
|
|
169
169
|
});
|
|
170
170
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
171
171
|
case "QQQQQ":
|
|
172
|
-
return
|
|
172
|
+
return n.quarter(r, {
|
|
173
173
|
width: "narrow",
|
|
174
174
|
context: "formatting"
|
|
175
175
|
});
|
|
176
176
|
// 1st quarter, 2nd quarter, ...
|
|
177
177
|
case "QQQQ":
|
|
178
178
|
default:
|
|
179
|
-
return
|
|
179
|
+
return n.quarter(r, {
|
|
180
180
|
width: "wide",
|
|
181
181
|
context: "formatting"
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
// Stand-alone quarter
|
|
186
|
-
q: function(e, t,
|
|
187
|
-
const
|
|
186
|
+
q: function(e, t, n) {
|
|
187
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
188
188
|
switch (t) {
|
|
189
189
|
// 1, 2, 3, 4
|
|
190
190
|
case "q":
|
|
191
|
-
return String(
|
|
191
|
+
return String(r);
|
|
192
192
|
// 01, 02, 03, 04
|
|
193
193
|
case "qq":
|
|
194
|
-
return
|
|
194
|
+
return a(r, 2);
|
|
195
195
|
// 1st, 2nd, 3rd, 4th
|
|
196
196
|
case "qo":
|
|
197
|
-
return
|
|
197
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
198
198
|
// Q1, Q2, Q3, Q4
|
|
199
199
|
case "qqq":
|
|
200
|
-
return
|
|
200
|
+
return n.quarter(r, {
|
|
201
201
|
width: "abbreviated",
|
|
202
202
|
context: "standalone"
|
|
203
203
|
});
|
|
204
204
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
205
205
|
case "qqqqq":
|
|
206
|
-
return
|
|
206
|
+
return n.quarter(r, {
|
|
207
207
|
width: "narrow",
|
|
208
208
|
context: "standalone"
|
|
209
209
|
});
|
|
210
210
|
// 1st quarter, 2nd quarter, ...
|
|
211
211
|
case "qqqq":
|
|
212
212
|
default:
|
|
213
|
-
return
|
|
213
|
+
return n.quarter(r, {
|
|
214
214
|
width: "wide",
|
|
215
215
|
context: "standalone"
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
// Month
|
|
220
|
-
M: function(e, t,
|
|
221
|
-
const
|
|
220
|
+
M: function(e, t, n) {
|
|
221
|
+
const r = e.getMonth();
|
|
222
222
|
switch (t) {
|
|
223
223
|
case "M":
|
|
224
224
|
case "MM":
|
|
225
|
-
return
|
|
225
|
+
return h.M(e, t);
|
|
226
226
|
// 1st, 2nd, ..., 12th
|
|
227
227
|
case "Mo":
|
|
228
|
-
return
|
|
228
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
229
229
|
// Jan, Feb, ..., Dec
|
|
230
230
|
case "MMM":
|
|
231
|
-
return
|
|
231
|
+
return n.month(r, {
|
|
232
232
|
width: "abbreviated",
|
|
233
233
|
context: "formatting"
|
|
234
234
|
});
|
|
235
235
|
// J, F, ..., D
|
|
236
236
|
case "MMMMM":
|
|
237
|
-
return
|
|
237
|
+
return n.month(r, {
|
|
238
238
|
width: "narrow",
|
|
239
239
|
context: "formatting"
|
|
240
240
|
});
|
|
241
241
|
// January, February, ..., December
|
|
242
242
|
case "MMMM":
|
|
243
243
|
default:
|
|
244
|
-
return
|
|
244
|
+
return n.month(r, { width: "wide", context: "formatting" });
|
|
245
245
|
}
|
|
246
246
|
},
|
|
247
247
|
// Stand-alone month
|
|
248
|
-
L: function(e, t,
|
|
249
|
-
const
|
|
248
|
+
L: function(e, t, n) {
|
|
249
|
+
const r = e.getMonth();
|
|
250
250
|
switch (t) {
|
|
251
251
|
// 1, 2, ..., 12
|
|
252
252
|
case "L":
|
|
253
|
-
return String(
|
|
253
|
+
return String(r + 1);
|
|
254
254
|
// 01, 02, ..., 12
|
|
255
255
|
case "LL":
|
|
256
|
-
return
|
|
256
|
+
return a(r + 1, 2);
|
|
257
257
|
// 1st, 2nd, ..., 12th
|
|
258
258
|
case "Lo":
|
|
259
|
-
return
|
|
259
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
260
260
|
// Jan, Feb, ..., Dec
|
|
261
261
|
case "LLL":
|
|
262
|
-
return
|
|
262
|
+
return n.month(r, {
|
|
263
263
|
width: "abbreviated",
|
|
264
264
|
context: "standalone"
|
|
265
265
|
});
|
|
266
266
|
// J, F, ..., D
|
|
267
267
|
case "LLLLL":
|
|
268
|
-
return
|
|
268
|
+
return n.month(r, {
|
|
269
269
|
width: "narrow",
|
|
270
270
|
context: "standalone"
|
|
271
271
|
});
|
|
272
272
|
// January, February, ..., December
|
|
273
273
|
case "LLLL":
|
|
274
274
|
default:
|
|
275
|
-
return
|
|
275
|
+
return n.month(r, { width: "wide", context: "standalone" });
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
// Local week of year
|
|
279
|
-
w: function(e, t,
|
|
280
|
-
const o =
|
|
281
|
-
return t === "wo" ?
|
|
279
|
+
w: function(e, t, n, r) {
|
|
280
|
+
const o = j(e, r);
|
|
281
|
+
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : a(o, t.length);
|
|
282
282
|
},
|
|
283
283
|
// ISO week of year
|
|
284
|
-
I: function(e, t,
|
|
285
|
-
const
|
|
286
|
-
return t === "Io" ?
|
|
284
|
+
I: function(e, t, n) {
|
|
285
|
+
const r = F(e);
|
|
286
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : a(r, t.length);
|
|
287
287
|
},
|
|
288
288
|
// Day of the month
|
|
289
|
-
d: function(e, t,
|
|
290
|
-
return t === "do" ?
|
|
289
|
+
d: function(e, t, n) {
|
|
290
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : h.d(e, t);
|
|
291
291
|
},
|
|
292
292
|
// Day of year
|
|
293
|
-
D: function(e, t,
|
|
294
|
-
const
|
|
295
|
-
return t === "Do" ?
|
|
293
|
+
D: function(e, t, n) {
|
|
294
|
+
const r = re(e);
|
|
295
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : a(r, t.length);
|
|
296
296
|
},
|
|
297
297
|
// Day of week
|
|
298
|
-
E: function(e, t,
|
|
299
|
-
const
|
|
298
|
+
E: function(e, t, n) {
|
|
299
|
+
const r = e.getDay();
|
|
300
300
|
switch (t) {
|
|
301
301
|
// Tue
|
|
302
302
|
case "E":
|
|
303
303
|
case "EE":
|
|
304
304
|
case "EEE":
|
|
305
|
-
return
|
|
305
|
+
return n.day(r, {
|
|
306
306
|
width: "abbreviated",
|
|
307
307
|
context: "formatting"
|
|
308
308
|
});
|
|
309
309
|
// T
|
|
310
310
|
case "EEEEE":
|
|
311
|
-
return
|
|
311
|
+
return n.day(r, {
|
|
312
312
|
width: "narrow",
|
|
313
313
|
context: "formatting"
|
|
314
314
|
});
|
|
315
315
|
// Tu
|
|
316
316
|
case "EEEEEE":
|
|
317
|
-
return
|
|
317
|
+
return n.day(r, {
|
|
318
318
|
width: "short",
|
|
319
319
|
context: "formatting"
|
|
320
320
|
});
|
|
321
321
|
// Tuesday
|
|
322
322
|
case "EEEE":
|
|
323
323
|
default:
|
|
324
|
-
return
|
|
324
|
+
return n.day(r, {
|
|
325
325
|
width: "wide",
|
|
326
326
|
context: "formatting"
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
330
|
// Local day of week
|
|
331
|
-
e: function(e, t,
|
|
332
|
-
const o = e.getDay(), i = (o -
|
|
331
|
+
e: function(e, t, n, r) {
|
|
332
|
+
const o = e.getDay(), i = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
333
333
|
switch (t) {
|
|
334
334
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
335
335
|
case "e":
|
|
336
336
|
return String(i);
|
|
337
337
|
// Padded numerical value
|
|
338
338
|
case "ee":
|
|
339
|
-
return
|
|
339
|
+
return a(i, 2);
|
|
340
340
|
// 1st, 2nd, ..., 7th
|
|
341
341
|
case "eo":
|
|
342
|
-
return
|
|
342
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
343
343
|
case "eee":
|
|
344
|
-
return
|
|
344
|
+
return n.day(o, {
|
|
345
345
|
width: "abbreviated",
|
|
346
346
|
context: "formatting"
|
|
347
347
|
});
|
|
348
348
|
// T
|
|
349
349
|
case "eeeee":
|
|
350
|
-
return
|
|
350
|
+
return n.day(o, {
|
|
351
351
|
width: "narrow",
|
|
352
352
|
context: "formatting"
|
|
353
353
|
});
|
|
354
354
|
// Tu
|
|
355
355
|
case "eeeeee":
|
|
356
|
-
return
|
|
356
|
+
return n.day(o, {
|
|
357
357
|
width: "short",
|
|
358
358
|
context: "formatting"
|
|
359
359
|
});
|
|
360
360
|
// Tuesday
|
|
361
361
|
case "eeee":
|
|
362
362
|
default:
|
|
363
|
-
return
|
|
363
|
+
return n.day(o, {
|
|
364
364
|
width: "wide",
|
|
365
365
|
context: "formatting"
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
},
|
|
369
369
|
// Stand-alone local day of week
|
|
370
|
-
c: function(e, t,
|
|
371
|
-
const o = e.getDay(), i = (o -
|
|
370
|
+
c: function(e, t, n, r) {
|
|
371
|
+
const o = e.getDay(), i = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
372
372
|
switch (t) {
|
|
373
373
|
// Numerical value (same as in `e`)
|
|
374
374
|
case "c":
|
|
375
375
|
return String(i);
|
|
376
376
|
// Padded numerical value
|
|
377
377
|
case "cc":
|
|
378
|
-
return
|
|
378
|
+
return a(i, t.length);
|
|
379
379
|
// 1st, 2nd, ..., 7th
|
|
380
380
|
case "co":
|
|
381
|
-
return
|
|
381
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
382
382
|
case "ccc":
|
|
383
|
-
return
|
|
383
|
+
return n.day(o, {
|
|
384
384
|
width: "abbreviated",
|
|
385
385
|
context: "standalone"
|
|
386
386
|
});
|
|
387
387
|
// T
|
|
388
388
|
case "ccccc":
|
|
389
|
-
return
|
|
389
|
+
return n.day(o, {
|
|
390
390
|
width: "narrow",
|
|
391
391
|
context: "standalone"
|
|
392
392
|
});
|
|
393
393
|
// Tu
|
|
394
394
|
case "cccccc":
|
|
395
|
-
return
|
|
395
|
+
return n.day(o, {
|
|
396
396
|
width: "short",
|
|
397
397
|
context: "standalone"
|
|
398
398
|
});
|
|
399
399
|
// Tuesday
|
|
400
400
|
case "cccc":
|
|
401
401
|
default:
|
|
402
|
-
return
|
|
402
|
+
return n.day(o, {
|
|
403
403
|
width: "wide",
|
|
404
404
|
context: "standalone"
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
// ISO day of week
|
|
409
|
-
i: function(e, t,
|
|
410
|
-
const
|
|
409
|
+
i: function(e, t, n) {
|
|
410
|
+
const r = e.getDay(), o = r === 0 ? 7 : r;
|
|
411
411
|
switch (t) {
|
|
412
412
|
// 2
|
|
413
413
|
case "i":
|
|
414
414
|
return String(o);
|
|
415
415
|
// 02
|
|
416
416
|
case "ii":
|
|
417
|
-
return
|
|
417
|
+
return a(o, t.length);
|
|
418
418
|
// 2nd
|
|
419
419
|
case "io":
|
|
420
|
-
return
|
|
420
|
+
return n.ordinalNumber(o, { unit: "day" });
|
|
421
421
|
// Tue
|
|
422
422
|
case "iii":
|
|
423
|
-
return
|
|
423
|
+
return n.day(r, {
|
|
424
424
|
width: "abbreviated",
|
|
425
425
|
context: "formatting"
|
|
426
426
|
});
|
|
427
427
|
// T
|
|
428
428
|
case "iiiii":
|
|
429
|
-
return
|
|
429
|
+
return n.day(r, {
|
|
430
430
|
width: "narrow",
|
|
431
431
|
context: "formatting"
|
|
432
432
|
});
|
|
433
433
|
// Tu
|
|
434
434
|
case "iiiiii":
|
|
435
|
-
return
|
|
435
|
+
return n.day(r, {
|
|
436
436
|
width: "short",
|
|
437
437
|
context: "formatting"
|
|
438
438
|
});
|
|
439
439
|
// Tuesday
|
|
440
440
|
case "iiii":
|
|
441
441
|
default:
|
|
442
|
-
return
|
|
442
|
+
return n.day(r, {
|
|
443
443
|
width: "wide",
|
|
444
444
|
context: "formatting"
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
},
|
|
448
448
|
// AM or PM
|
|
449
|
-
a: function(e, t,
|
|
449
|
+
a: function(e, t, n) {
|
|
450
450
|
const o = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
451
451
|
switch (t) {
|
|
452
452
|
case "a":
|
|
453
453
|
case "aa":
|
|
454
|
-
return
|
|
454
|
+
return n.dayPeriod(o, {
|
|
455
455
|
width: "abbreviated",
|
|
456
456
|
context: "formatting"
|
|
457
457
|
});
|
|
458
458
|
case "aaa":
|
|
459
|
-
return
|
|
459
|
+
return n.dayPeriod(o, {
|
|
460
460
|
width: "abbreviated",
|
|
461
461
|
context: "formatting"
|
|
462
462
|
}).toLowerCase();
|
|
463
463
|
case "aaaaa":
|
|
464
|
-
return
|
|
464
|
+
return n.dayPeriod(o, {
|
|
465
465
|
width: "narrow",
|
|
466
466
|
context: "formatting"
|
|
467
467
|
});
|
|
468
468
|
case "aaaa":
|
|
469
469
|
default:
|
|
470
|
-
return
|
|
470
|
+
return n.dayPeriod(o, {
|
|
471
471
|
width: "wide",
|
|
472
472
|
context: "formatting"
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
// AM, PM, midnight, noon
|
|
477
|
-
b: function(e, t,
|
|
478
|
-
const
|
|
477
|
+
b: function(e, t, n) {
|
|
478
|
+
const r = e.getHours();
|
|
479
479
|
let o;
|
|
480
|
-
switch (
|
|
480
|
+
switch (r === 12 ? o = D.noon : r === 0 ? o = D.midnight : o = r / 12 >= 1 ? "pm" : "am", t) {
|
|
481
481
|
case "b":
|
|
482
482
|
case "bb":
|
|
483
|
-
return
|
|
483
|
+
return n.dayPeriod(o, {
|
|
484
484
|
width: "abbreviated",
|
|
485
485
|
context: "formatting"
|
|
486
486
|
});
|
|
487
487
|
case "bbb":
|
|
488
|
-
return
|
|
488
|
+
return n.dayPeriod(o, {
|
|
489
489
|
width: "abbreviated",
|
|
490
490
|
context: "formatting"
|
|
491
491
|
}).toLowerCase();
|
|
492
492
|
case "bbbbb":
|
|
493
|
-
return
|
|
493
|
+
return n.dayPeriod(o, {
|
|
494
494
|
width: "narrow",
|
|
495
495
|
context: "formatting"
|
|
496
496
|
});
|
|
497
497
|
case "bbbb":
|
|
498
498
|
default:
|
|
499
|
-
return
|
|
499
|
+
return n.dayPeriod(o, {
|
|
500
500
|
width: "wide",
|
|
501
501
|
context: "formatting"
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
},
|
|
505
505
|
// in the morning, in the afternoon, in the evening, at night
|
|
506
|
-
B: function(e, t,
|
|
507
|
-
const
|
|
506
|
+
B: function(e, t, n) {
|
|
507
|
+
const r = e.getHours();
|
|
508
508
|
let o;
|
|
509
|
-
switch (
|
|
509
|
+
switch (r >= 17 ? o = D.evening : r >= 12 ? o = D.afternoon : r >= 4 ? o = D.morning : o = D.night, t) {
|
|
510
510
|
case "B":
|
|
511
511
|
case "BB":
|
|
512
512
|
case "BBB":
|
|
513
|
-
return
|
|
513
|
+
return n.dayPeriod(o, {
|
|
514
514
|
width: "abbreviated",
|
|
515
515
|
context: "formatting"
|
|
516
516
|
});
|
|
517
517
|
case "BBBBB":
|
|
518
|
-
return
|
|
518
|
+
return n.dayPeriod(o, {
|
|
519
519
|
width: "narrow",
|
|
520
520
|
context: "formatting"
|
|
521
521
|
});
|
|
522
522
|
case "BBBB":
|
|
523
523
|
default:
|
|
524
|
-
return
|
|
524
|
+
return n.dayPeriod(o, {
|
|
525
525
|
width: "wide",
|
|
526
526
|
context: "formatting"
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
},
|
|
530
530
|
// Hour [1-12]
|
|
531
|
-
h: function(e, t,
|
|
531
|
+
h: function(e, t, n) {
|
|
532
532
|
if (t === "ho") {
|
|
533
|
-
let
|
|
534
|
-
return
|
|
533
|
+
let r = e.getHours() % 12;
|
|
534
|
+
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return h.h(e, t);
|
|
537
537
|
},
|
|
538
538
|
// Hour [0-23]
|
|
539
|
-
H: function(e, t,
|
|
540
|
-
return t === "Ho" ?
|
|
539
|
+
H: function(e, t, n) {
|
|
540
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : h.H(e, t);
|
|
541
541
|
},
|
|
542
542
|
// Hour [0-11]
|
|
543
|
-
K: function(e, t,
|
|
544
|
-
const
|
|
545
|
-
return t === "Ko" ?
|
|
543
|
+
K: function(e, t, n) {
|
|
544
|
+
const r = e.getHours() % 12;
|
|
545
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
|
|
546
546
|
},
|
|
547
547
|
// Hour [1-24]
|
|
548
|
-
k: function(e, t,
|
|
549
|
-
let
|
|
550
|
-
return
|
|
548
|
+
k: function(e, t, n) {
|
|
549
|
+
let r = e.getHours();
|
|
550
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
|
|
551
551
|
},
|
|
552
552
|
// Minute
|
|
553
|
-
m: function(e, t,
|
|
554
|
-
return t === "mo" ?
|
|
553
|
+
m: function(e, t, n) {
|
|
554
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : h.m(e, t);
|
|
555
555
|
},
|
|
556
556
|
// Second
|
|
557
|
-
s: function(e, t,
|
|
558
|
-
return t === "so" ?
|
|
557
|
+
s: function(e, t, n) {
|
|
558
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : h.s(e, t);
|
|
559
559
|
},
|
|
560
560
|
// Fraction of second
|
|
561
561
|
S: function(e, t) {
|
|
562
|
-
return
|
|
562
|
+
return h.S(e, t);
|
|
563
563
|
},
|
|
564
564
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
565
|
-
X: function(e, t,
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
565
|
+
X: function(e, t, n) {
|
|
566
|
+
const r = e.getTimezoneOffset();
|
|
567
|
+
if (r === 0)
|
|
568
568
|
return "Z";
|
|
569
569
|
switch (t) {
|
|
570
570
|
// Hours and optional minutes
|
|
571
571
|
case "X":
|
|
572
|
-
return
|
|
572
|
+
return N(r);
|
|
573
573
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
574
574
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
575
575
|
// so this token always has the same output as `XX`
|
|
576
576
|
case "XXXX":
|
|
577
577
|
case "XX":
|
|
578
|
-
return
|
|
578
|
+
return y(r);
|
|
579
579
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
580
580
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
581
581
|
// so this token always has the same output as `XXX`
|
|
@@ -583,22 +583,22 @@ const y = {
|
|
|
583
583
|
case "XXX":
|
|
584
584
|
// Hours and minutes with `:` delimiter
|
|
585
585
|
default:
|
|
586
|
-
return
|
|
586
|
+
return y(r, ":");
|
|
587
587
|
}
|
|
588
588
|
},
|
|
589
589
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
590
|
-
x: function(e, t,
|
|
591
|
-
const
|
|
590
|
+
x: function(e, t, n) {
|
|
591
|
+
const r = e.getTimezoneOffset();
|
|
592
592
|
switch (t) {
|
|
593
593
|
// Hours and optional minutes
|
|
594
594
|
case "x":
|
|
595
|
-
return
|
|
595
|
+
return N(r);
|
|
596
596
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
597
597
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
598
598
|
// so this token always has the same output as `xx`
|
|
599
599
|
case "xxxx":
|
|
600
600
|
case "xx":
|
|
601
|
-
return
|
|
601
|
+
return y(r);
|
|
602
602
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
603
603
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
604
604
|
// so this token always has the same output as `xxx`
|
|
@@ -606,229 +606,229 @@ const y = {
|
|
|
606
606
|
case "xxx":
|
|
607
607
|
// Hours and minutes with `:` delimiter
|
|
608
608
|
default:
|
|
609
|
-
return
|
|
609
|
+
return y(r, ":");
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
// Timezone (GMT)
|
|
613
|
-
O: function(e, t,
|
|
614
|
-
const
|
|
613
|
+
O: function(e, t, n) {
|
|
614
|
+
const r = e.getTimezoneOffset();
|
|
615
615
|
switch (t) {
|
|
616
616
|
// Short
|
|
617
617
|
case "O":
|
|
618
618
|
case "OO":
|
|
619
619
|
case "OOO":
|
|
620
|
-
return "GMT" +
|
|
620
|
+
return "GMT" + P(r, ":");
|
|
621
621
|
// Long
|
|
622
622
|
case "OOOO":
|
|
623
623
|
default:
|
|
624
|
-
return "GMT" +
|
|
624
|
+
return "GMT" + y(r, ":");
|
|
625
625
|
}
|
|
626
626
|
},
|
|
627
627
|
// Timezone (specific non-location)
|
|
628
|
-
z: function(e, t,
|
|
629
|
-
const
|
|
628
|
+
z: function(e, t, n) {
|
|
629
|
+
const r = e.getTimezoneOffset();
|
|
630
630
|
switch (t) {
|
|
631
631
|
// Short
|
|
632
632
|
case "z":
|
|
633
633
|
case "zz":
|
|
634
634
|
case "zzz":
|
|
635
|
-
return "GMT" +
|
|
635
|
+
return "GMT" + P(r, ":");
|
|
636
636
|
// Long
|
|
637
637
|
case "zzzz":
|
|
638
638
|
default:
|
|
639
|
-
return "GMT" +
|
|
639
|
+
return "GMT" + y(r, ":");
|
|
640
640
|
}
|
|
641
641
|
},
|
|
642
642
|
// Seconds timestamp
|
|
643
|
-
t: function(e, t,
|
|
644
|
-
const
|
|
645
|
-
return
|
|
643
|
+
t: function(e, t, n) {
|
|
644
|
+
const r = Math.trunc(+e / 1e3);
|
|
645
|
+
return a(r, t.length);
|
|
646
646
|
},
|
|
647
647
|
// Milliseconds timestamp
|
|
648
|
-
T: function(e, t,
|
|
649
|
-
return
|
|
648
|
+
T: function(e, t, n) {
|
|
649
|
+
return a(+e, t.length);
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
|
-
function
|
|
653
|
-
const
|
|
654
|
-
return i === 0 ?
|
|
652
|
+
function P(e, t = "") {
|
|
653
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), i = r % 60;
|
|
654
|
+
return i === 0 ? n + String(o) : n + String(o) + t + a(i, 2);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
656
|
+
function N(e, t) {
|
|
657
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + a(Math.abs(e) / 60, 2) : y(e, t);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
const
|
|
661
|
-
return
|
|
659
|
+
function y(e, t = "") {
|
|
660
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = a(Math.trunc(r / 60), 2), i = a(r % 60, 2);
|
|
661
|
+
return n + o + t + i;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function oe(e) {
|
|
664
664
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
return !(!
|
|
666
|
+
function ie(e) {
|
|
667
|
+
return !(!oe(e) && typeof e != "number" || isNaN(+p(e)));
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
function
|
|
671
|
-
const
|
|
672
|
-
if (!
|
|
669
|
+
const ae = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, se = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ue = /^'([^]*?)'?$/, ce = /''/g, fe = /[a-zA-Z]/;
|
|
670
|
+
function B(e, t, n) {
|
|
671
|
+
const r = G(), o = n?.locale ?? r.locale ?? V, i = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = p(e, n?.in);
|
|
672
|
+
if (!ie(c))
|
|
673
673
|
throw new RangeError("Invalid time value");
|
|
674
|
-
let
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
const
|
|
678
|
-
return
|
|
674
|
+
let u = t.match(se).map((f) => {
|
|
675
|
+
const m = f[0];
|
|
676
|
+
if (m === "p" || m === "P") {
|
|
677
|
+
const O = z[m];
|
|
678
|
+
return O(f, o.formatLong);
|
|
679
679
|
}
|
|
680
|
-
return
|
|
681
|
-
}).join("").match(
|
|
682
|
-
if (
|
|
680
|
+
return f;
|
|
681
|
+
}).join("").match(ae).map((f) => {
|
|
682
|
+
if (f === "''")
|
|
683
683
|
return { isToken: !1, value: "'" };
|
|
684
|
-
const
|
|
685
|
-
if (
|
|
686
|
-
return { isToken: !1, value:
|
|
687
|
-
if (
|
|
688
|
-
return { isToken: !0, value:
|
|
689
|
-
if (
|
|
684
|
+
const m = f[0];
|
|
685
|
+
if (m === "'")
|
|
686
|
+
return { isToken: !1, value: de(f) };
|
|
687
|
+
if (A[m])
|
|
688
|
+
return { isToken: !0, value: f };
|
|
689
|
+
if (m.match(fe))
|
|
690
690
|
throw new RangeError(
|
|
691
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
691
|
+
"Format string contains an unescaped latin alphabet character `" + m + "`"
|
|
692
692
|
);
|
|
693
|
-
return { isToken: !1, value:
|
|
693
|
+
return { isToken: !1, value: f };
|
|
694
694
|
});
|
|
695
|
-
o.localize.preprocessor && (
|
|
696
|
-
const
|
|
695
|
+
o.localize.preprocessor && (u = o.localize.preprocessor(c, u));
|
|
696
|
+
const d = {
|
|
697
697
|
firstWeekContainsDate: i,
|
|
698
|
-
weekStartsOn:
|
|
698
|
+
weekStartsOn: s,
|
|
699
699
|
locale: o
|
|
700
700
|
};
|
|
701
|
-
return
|
|
702
|
-
if (!
|
|
703
|
-
const
|
|
704
|
-
(!
|
|
705
|
-
const
|
|
706
|
-
return
|
|
701
|
+
return u.map((f) => {
|
|
702
|
+
if (!f.isToken) return f.value;
|
|
703
|
+
const m = f.value;
|
|
704
|
+
(!n?.useAdditionalWeekYearTokens && Z(m) || !n?.useAdditionalDayOfYearTokens && J(m)) && $(m, t, String(e));
|
|
705
|
+
const O = A[m[0]];
|
|
706
|
+
return O(c, m, o.localize, d);
|
|
707
707
|
}).join("");
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
const t = e.match(
|
|
711
|
-
return t ? t[1].replace(
|
|
709
|
+
function de(e) {
|
|
710
|
+
const t = e.match(ue);
|
|
711
|
+
return t ? t[1].replace(ce, "'") : e;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
const
|
|
713
|
+
function w(e, t) {
|
|
714
|
+
const n = () => L(t?.in, NaN), o = le(e);
|
|
715
715
|
let i;
|
|
716
716
|
if (o.date) {
|
|
717
|
-
const
|
|
718
|
-
i =
|
|
717
|
+
const d = ye(o.date, 2);
|
|
718
|
+
i = pe(d.restDateString, d.year);
|
|
719
719
|
}
|
|
720
|
-
if (!i || isNaN(+i)) return
|
|
721
|
-
const
|
|
722
|
-
let
|
|
723
|
-
if (o.time && (
|
|
724
|
-
return
|
|
720
|
+
if (!i || isNaN(+i)) return n();
|
|
721
|
+
const s = +i;
|
|
722
|
+
let c = 0, u;
|
|
723
|
+
if (o.time && (c = De(o.time), isNaN(c)))
|
|
724
|
+
return n();
|
|
725
725
|
if (o.timezone) {
|
|
726
|
-
if (
|
|
726
|
+
if (u = ve(o.timezone), isNaN(u)) return n();
|
|
727
727
|
} else {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
),
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
),
|
|
728
|
+
const d = new Date(s + c), f = p(0, t?.in);
|
|
729
|
+
return f.setFullYear(
|
|
730
|
+
d.getUTCFullYear(),
|
|
731
|
+
d.getUTCMonth(),
|
|
732
|
+
d.getUTCDate()
|
|
733
|
+
), f.setHours(
|
|
734
|
+
d.getUTCHours(),
|
|
735
|
+
d.getUTCMinutes(),
|
|
736
|
+
d.getUTCSeconds(),
|
|
737
|
+
d.getUTCMilliseconds()
|
|
738
|
+
), f;
|
|
739
739
|
}
|
|
740
|
-
return
|
|
740
|
+
return p(s + c + u, t?.in);
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const R = {
|
|
743
743
|
dateTimeDelimiter: /[T ]/,
|
|
744
744
|
timeZoneDelimiter: /[Z ]/i,
|
|
745
745
|
timezone: /([Z+-].*)$/
|
|
746
|
-
},
|
|
747
|
-
function
|
|
748
|
-
const t = {},
|
|
749
|
-
let
|
|
750
|
-
if (
|
|
746
|
+
}, me = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ge = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, he = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
747
|
+
function le(e) {
|
|
748
|
+
const t = {}, n = e.split(R.dateTimeDelimiter);
|
|
749
|
+
let r;
|
|
750
|
+
if (n.length > 2)
|
|
751
751
|
return t;
|
|
752
|
-
if (/:/.test(
|
|
752
|
+
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], R.timeZoneDelimiter.test(t.date) && (t.date = e.split(R.timeZoneDelimiter)[0], r = e.substr(
|
|
753
753
|
t.date.length,
|
|
754
754
|
e.length
|
|
755
|
-
))),
|
|
756
|
-
const o =
|
|
757
|
-
o ? (t.time =
|
|
755
|
+
))), r) {
|
|
756
|
+
const o = R.timezone.exec(r);
|
|
757
|
+
o ? (t.time = r.replace(o[1], ""), t.timezone = o[1]) : t.time = r;
|
|
758
758
|
}
|
|
759
759
|
return t;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
761
|
+
function ye(e, t) {
|
|
762
|
+
const n = new RegExp(
|
|
763
763
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
|
|
764
|
-
),
|
|
765
|
-
if (!
|
|
766
|
-
const o =
|
|
764
|
+
), r = e.match(n);
|
|
765
|
+
if (!r) return { year: NaN, restDateString: "" };
|
|
766
|
+
const o = r[1] ? parseInt(r[1]) : null, i = r[2] ? parseInt(r[2]) : null;
|
|
767
767
|
return {
|
|
768
768
|
year: i === null ? o : i * 100,
|
|
769
|
-
restDateString: e.slice((
|
|
769
|
+
restDateString: e.slice((r[1] || r[2]).length)
|
|
770
770
|
};
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function pe(e, t) {
|
|
773
773
|
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
774
|
-
const
|
|
775
|
-
if (!
|
|
776
|
-
const
|
|
777
|
-
if (
|
|
778
|
-
return
|
|
774
|
+
const n = e.match(me);
|
|
775
|
+
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
776
|
+
const r = !!n[4], o = v(n[1]), i = v(n[2]) - 1, s = v(n[3]), c = v(n[4]), u = v(n[5]) - 1;
|
|
777
|
+
if (r)
|
|
778
|
+
return Te(t, c, u) ? Re(t, c, u) : /* @__PURE__ */ new Date(NaN);
|
|
779
779
|
{
|
|
780
|
-
const
|
|
781
|
-
return !
|
|
780
|
+
const d = /* @__PURE__ */ new Date(0);
|
|
781
|
+
return !we(t, i, s) || !Oe(t, o) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(t, i, Math.max(o, s)), d);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function v(e) {
|
|
785
785
|
return e ? parseInt(e) : 1;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
const t = e.match(
|
|
787
|
+
function De(e) {
|
|
788
|
+
const t = e.match(ge);
|
|
789
789
|
if (!t) return NaN;
|
|
790
|
-
const
|
|
791
|
-
return
|
|
790
|
+
const n = T(t[1]), r = T(t[2]), o = T(t[3]);
|
|
791
|
+
return be(n, r, o) ? n * E + r * Y + o * 1e3 : NaN;
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function T(e) {
|
|
794
794
|
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function ve(e) {
|
|
797
797
|
if (e === "Z") return 0;
|
|
798
|
-
const t = e.match(
|
|
798
|
+
const t = e.match(he);
|
|
799
799
|
if (!t) return 0;
|
|
800
|
-
const
|
|
801
|
-
return
|
|
800
|
+
const n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), o = t[3] && parseInt(t[3]) || 0;
|
|
801
|
+
return Be(r, o) ? n * (r * E + o * Y) : NaN;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
const o =
|
|
807
|
-
return
|
|
803
|
+
function Re(e, t, n) {
|
|
804
|
+
const r = /* @__PURE__ */ new Date(0);
|
|
805
|
+
r.setUTCFullYear(e, 0, 4);
|
|
806
|
+
const o = r.getUTCDay() || 7, i = (t - 1) * 7 + n + 1 - o;
|
|
807
|
+
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
808
808
|
}
|
|
809
|
-
const
|
|
810
|
-
function
|
|
809
|
+
const xe = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
810
|
+
function U(e) {
|
|
811
811
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
return t >= 0 && t <= 11 &&
|
|
813
|
+
function we(e, t, n) {
|
|
814
|
+
return t >= 0 && t <= 11 && n >= 1 && n <= (xe[t] || (U(e) ? 29 : 28));
|
|
815
815
|
}
|
|
816
816
|
function Oe(e, t) {
|
|
817
|
-
return t >= 1 && t <= (
|
|
817
|
+
return t >= 1 && t <= (U(e) ? 366 : 365);
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
return t >= 1 && t <= 53 &&
|
|
819
|
+
function Te(e, t, n) {
|
|
820
|
+
return t >= 1 && t <= 53 && n >= 0 && n <= 6;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
return e === 24 ? t === 0 &&
|
|
822
|
+
function be(e, t, n) {
|
|
823
|
+
return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Be(e, t) {
|
|
826
826
|
return t >= 0 && t <= 59;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Me = Date.prototype.toJSON, _e = function() {
|
|
829
829
|
try {
|
|
830
|
-
const e = this.getHours(), t = this.getMinutes(),
|
|
831
|
-
if (o === 0.15 && e === 0 && t === 9 &&
|
|
830
|
+
const e = this.getHours(), t = this.getMinutes(), n = this.getSeconds(), r = this.getMilliseconds(), o = -(this.getTimezoneOffset() / 60);
|
|
831
|
+
if (o === 0.15 && e === 0 && t === 9 && n === 21 || e - o === 0 && t === 0 && n === 0 && r === 0)
|
|
832
832
|
return this.toISOString().split("T")[0];
|
|
833
833
|
const i = new Date(
|
|
834
834
|
this.getFullYear(),
|
|
@@ -836,244 +836,77 @@ const Pe = Date.prototype.toJSON, Le = function() {
|
|
|
836
836
|
this.getDate(),
|
|
837
837
|
e,
|
|
838
838
|
t,
|
|
839
|
-
|
|
840
|
-
|
|
839
|
+
n,
|
|
840
|
+
r
|
|
841
841
|
);
|
|
842
842
|
i.setHours(this.getHours() + o);
|
|
843
|
-
const
|
|
844
|
-
return
|
|
843
|
+
const s = i.toISOString().replace(/(\.0+)?Z$/, ""), c = o >= 0 ? "+" : "-", u = Math.abs(o) < 10 ? "0" : "";
|
|
844
|
+
return s + c + u + Math.abs(o).toString().split(".")[0] + ":00";
|
|
845
845
|
} catch {
|
|
846
|
-
Date.prototype.toJSON =
|
|
846
|
+
Date.prototype.toJSON = Me;
|
|
847
847
|
const t = this.toJSON();
|
|
848
|
-
return Date.prototype.toJSON =
|
|
848
|
+
return Date.prototype.toJSON = _e, t;
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, Ce = new Intl.DateTimeFormat("fr-FR", {
|
|
851
851
|
day: "numeric",
|
|
852
852
|
month: "long",
|
|
853
853
|
weekday: "long",
|
|
854
854
|
year: "numeric"
|
|
855
|
-
}),
|
|
855
|
+
}), Se = new Intl.DateTimeFormat("fr-FR", {
|
|
856
856
|
day: "numeric",
|
|
857
857
|
month: "short"
|
|
858
|
-
}),
|
|
858
|
+
}), Ae = new Intl.DateTimeFormat("fr-FR", {
|
|
859
859
|
hour: "numeric",
|
|
860
860
|
minute: "2-digit"
|
|
861
861
|
});
|
|
862
|
-
function
|
|
863
|
-
return e instanceof Date ? e : typeof e == "string" ?
|
|
862
|
+
function Ue(e, t) {
|
|
863
|
+
return e instanceof Date ? e : typeof e == "string" ? w(e) : t;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
return
|
|
865
|
+
function Ie(e) {
|
|
866
|
+
return K(e, "yyyy-MM-ddXXX", /* @__PURE__ */ new Date());
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
const t =
|
|
870
|
-
return e =
|
|
868
|
+
function qe(e) {
|
|
869
|
+
const t = w(e);
|
|
870
|
+
return e = B(t, "EEEE d LLLL yyyy H'h'mm", { locale: b }), e.endsWith(" 0h00") && (e = e.substring(0, e.length - 5)), e;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate() ?
|
|
872
|
+
function We(e, t) {
|
|
873
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate() ? Ae.format(e) : Se.format(e);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
const t = e instanceof Date ? e :
|
|
877
|
-
let
|
|
878
|
-
return
|
|
875
|
+
function He(e) {
|
|
876
|
+
const t = e instanceof Date ? e : w(e);
|
|
877
|
+
let n = B(t, "d LLLL yyyy H'h'mm", { locale: b });
|
|
878
|
+
return n.endsWith(" 0h00") && (n = n.substring(0, n.length - 5)), n;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
const t = e instanceof Date ? e :
|
|
882
|
-
return
|
|
880
|
+
function Fe(e) {
|
|
881
|
+
const t = e instanceof Date ? e : w(e);
|
|
882
|
+
return B(t, "H'h'mm", { locale: b });
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function je(e) {
|
|
885
885
|
return new Date(e.getTime() - e.getTimezoneOffset() * 6e4).toISOString().split("T")[0];
|
|
886
886
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
var Be = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.Success = "SUCCESS", e))(Be || {}), Ue = /* @__PURE__ */ ((e) => (e.Failure = "FAILURE", e.InProgress = "IN_PROGRESS", e.Success = "SUCCESS", e))(Ue || {});
|
|
894
|
-
function ot(e) {
|
|
895
|
-
if (e.actesLegislatifs !== void 0) {
|
|
896
|
-
for (const t of $(e.actesLegislatifs))
|
|
897
|
-
if (t.codeActe.match(/^AN.*-COM-FOND-SAISIE$/) !== null && t.organeRef !== void 0 && t.organeRef !== "PO211494")
|
|
898
|
-
return t.organeRef;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
function p(e) {
|
|
902
|
-
switch (e) {
|
|
903
|
-
case "Accord":
|
|
904
|
-
case "adopté":
|
|
905
|
-
case "adopté, dans les conditions prévues à l'article 45, alinéa 3, de la Constitution":
|
|
906
|
-
case "adoptée":
|
|
907
|
-
case "adopté sans modification":
|
|
908
|
-
case "adoptée sans modification":
|
|
909
|
-
case "Conforme":
|
|
910
|
-
case "considérée comme définitive en application de l'article 151-7 du Règlement":
|
|
911
|
-
case "considérée comme définitive en application de l'article 151-9 du Règlement":
|
|
912
|
-
case "Motion adopté(e)":
|
|
913
|
-
return "SUCCESS";
|
|
914
|
-
case "Désaccord":
|
|
915
|
-
case "Motion rejeté(e)":
|
|
916
|
-
case "rejeté":
|
|
917
|
-
case "rejetée":
|
|
918
|
-
return "FAILURE";
|
|
919
|
-
case "adopté avec modifications":
|
|
920
|
-
case "adoptée avec modifications":
|
|
921
|
-
case "De droit (article 61 alinéa 1 de la Constitution)":
|
|
922
|
-
case "modifié":
|
|
923
|
-
case "modifiée":
|
|
924
|
-
case "Motion de censure 49-2":
|
|
925
|
-
case "Partiellement conforme":
|
|
926
|
-
return "IN_PROGRESS";
|
|
927
|
-
case "Soixante députés au moins":
|
|
928
|
-
case "Soixante sénateurs au moins":
|
|
929
|
-
return O.Constitu;
|
|
930
|
-
default:
|
|
931
|
-
return "IN_PROGRESS";
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
function ke(e, t) {
|
|
935
|
-
const r = t[t.length - 1];
|
|
936
|
-
let n = null;
|
|
937
|
-
switch (r.xsiType) {
|
|
938
|
-
case "Adoption_Europe_Type":
|
|
939
|
-
return n = r.statutAdoption.libelle, {
|
|
940
|
-
currentStatus: p(n),
|
|
941
|
-
label: g(n)
|
|
942
|
-
};
|
|
943
|
-
case "ConclusionEtapeCC_Type":
|
|
944
|
-
return n = r.statutConclusion.libelle, {
|
|
945
|
-
currentStatus: p(n),
|
|
946
|
-
label: g(n)
|
|
947
|
-
};
|
|
948
|
-
case "Decision_Type": {
|
|
949
|
-
n = r.statutConclusion.libelle;
|
|
950
|
-
let o = p(n), i;
|
|
951
|
-
switch (e.procedureParlementaire.code) {
|
|
952
|
-
case "PROCEDURE_PARLEMENTAIRE_2":
|
|
953
|
-
["rejeté", "rejetée"].includes(n) && e.actesLegislatifs !== void 0 && e.actesLegislatifs.length === 1 && (i = "FAILURE");
|
|
954
|
-
break;
|
|
955
|
-
case "PROCEDURE_PARLEMENTAIRE_8":
|
|
956
|
-
// Résolution
|
|
957
|
-
case "PROCEDURE_PARLEMENTAIRE_22":
|
|
958
|
-
o === "SUCCESS" ? i = "SUCCESS" : o === "FAILURE" && (i = "FAILURE");
|
|
959
|
-
break;
|
|
960
|
-
}
|
|
961
|
-
return {
|
|
962
|
-
currentStatus: o,
|
|
963
|
-
finalStatus: i,
|
|
964
|
-
label: g(n)
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
case "DecisionMotionCensure_Type":
|
|
968
|
-
return n = r.decision.libelle, {
|
|
969
|
-
currentStatus: p(n),
|
|
970
|
-
finalStatus: (
|
|
971
|
-
// Not sure for other cases => To improve.
|
|
972
|
-
// Engagement de la responsabilité gouvernementale
|
|
973
|
-
e.procedureParlementaire.code === "PROCEDURE_PARLEMENTAIRE_13" && n === "Motion rejeté(e)" ? "FAILURE" : "SUCCESS"
|
|
974
|
-
),
|
|
975
|
-
// TODO: Not sure of this `true` value
|
|
976
|
-
label: g(n)
|
|
977
|
-
};
|
|
978
|
-
case "DecisionRecevabiliteBureau_Type":
|
|
979
|
-
return n = r.decision.libelle, {
|
|
980
|
-
currentStatus: p(n),
|
|
981
|
-
label: g(n)
|
|
982
|
-
};
|
|
983
|
-
case "DeclarationGouvernement_Type":
|
|
984
|
-
return n = r.typeDeclaration.libelle, {
|
|
985
|
-
currentStatus: p(n),
|
|
986
|
-
label: g(n)
|
|
987
|
-
};
|
|
988
|
-
case "DepotMotionCensure_Type":
|
|
989
|
-
return n = r.typeMotionCensure.libelle, {
|
|
990
|
-
currentStatus: p(n),
|
|
991
|
-
label: g(n)
|
|
992
|
-
};
|
|
993
|
-
case "DepotRapport_Type":
|
|
994
|
-
return [
|
|
995
|
-
"DossierCommissionEnquete_Type",
|
|
996
|
-
"DossierMissionControle_Type",
|
|
997
|
-
"DossierMissionInformation_Type"
|
|
998
|
-
].includes(e.xsiType) ? {
|
|
999
|
-
currentStatus: t[0].organe.codeType,
|
|
1000
|
-
finalStatus: "SUCCESS",
|
|
1001
|
-
label: "rapport déposé"
|
|
1002
|
-
} : null;
|
|
1003
|
-
case "MotionProcedure_Type":
|
|
1004
|
-
return n = r.typeMotion.libelle, {
|
|
1005
|
-
currentStatus: p(n),
|
|
1006
|
-
label: g(n)
|
|
1007
|
-
};
|
|
1008
|
-
case "Promulgation_Type":
|
|
1009
|
-
return {
|
|
1010
|
-
currentStatus: "SUCCESS",
|
|
1011
|
-
finalStatus: "SUCCESS",
|
|
1012
|
-
label: "promulgué"
|
|
1013
|
-
};
|
|
1014
|
-
case "RetraitInitiative_Type":
|
|
1015
|
-
return {
|
|
1016
|
-
currentStatus: "FAILURE",
|
|
1017
|
-
finalStatus: "FAILURE",
|
|
1018
|
-
label: "retiré"
|
|
1019
|
-
};
|
|
1020
|
-
case "SaisineConseilConstit_Type":
|
|
1021
|
-
return n = r.casSaisine.libelle, {
|
|
1022
|
-
currentStatus: p(n),
|
|
1023
|
-
label: g(n)
|
|
1024
|
-
};
|
|
1025
|
-
default:
|
|
1026
|
-
return null;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
function j(e, t, r) {
|
|
1030
|
-
if (r !== void 0)
|
|
1031
|
-
for (const n of [...r].reverse()) {
|
|
1032
|
-
const o = n.actesLegislatifs ? j(e, [...t, n], n.actesLegislatifs) : ke(e, [...t, n]);
|
|
1033
|
-
if (o !== null)
|
|
1034
|
-
return o;
|
|
1035
|
-
}
|
|
1036
|
-
return null;
|
|
1037
|
-
}
|
|
1038
|
-
function it(e) {
|
|
1039
|
-
const t = j(e, [], e.actesLegislatifs);
|
|
1040
|
-
return t !== null ? t : {
|
|
1041
|
-
currentStatus: "IN_PROGRESS",
|
|
1042
|
-
label: "en cours"
|
|
1043
|
-
};
|
|
1044
|
-
}
|
|
1045
|
-
function* $(e) {
|
|
1046
|
-
for (const t of e)
|
|
1047
|
-
yield t, t.actesLegislatifs !== void 0 && (yield* $(t.actesLegislatifs));
|
|
1048
|
-
}
|
|
1049
|
-
function* Ye(e) {
|
|
1050
|
-
yield e;
|
|
1051
|
-
for (const t of e.divisions ?? [])
|
|
1052
|
-
yield* Ye(t);
|
|
1053
|
-
}
|
|
1054
|
-
function W(e, t, r) {
|
|
1055
|
-
if (!r.has(e.uid)) {
|
|
1056
|
-
if (r.add(e.uid), t.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
|
|
1057
|
-
const n = t.documentByUid[e.depotInitialLectureDefinitiveRef];
|
|
1058
|
-
n !== void 0 && (e.depotInitialLectureDefinitive = n, v(n, t, r));
|
|
887
|
+
function I(e, t, n) {
|
|
888
|
+
if (!n.has(e.uid)) {
|
|
889
|
+
if (n.add(e.uid), t.documentByUid !== void 0 && e.depotInitialLectureDefinitiveRef !== void 0) {
|
|
890
|
+
const r = t.documentByUid[e.depotInitialLectureDefinitiveRef];
|
|
891
|
+
r !== void 0 && (e.depotInitialLectureDefinitive = r, x(r, t, n));
|
|
1059
892
|
}
|
|
1060
893
|
if (t.organeByUid !== void 0 && e.organeRef !== void 0) {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
894
|
+
const r = t.organeByUid[e.organeRef];
|
|
895
|
+
r !== void 0 && (e.organe = r, g(r, t, n));
|
|
1063
896
|
}
|
|
1064
897
|
if (t.organeByUid !== void 0 && e.provenanceRef !== void 0) {
|
|
1065
|
-
const
|
|
1066
|
-
|
|
898
|
+
const r = t.organeByUid[e.provenanceRef];
|
|
899
|
+
r !== void 0 && (e.provenance = r, g(r, t, n));
|
|
1067
900
|
}
|
|
1068
901
|
if (t.acteurByUid !== void 0 && e.rapporteurs !== void 0)
|
|
1069
|
-
for (const
|
|
1070
|
-
const o = t.acteurByUid[
|
|
1071
|
-
o !== void 0 && (
|
|
902
|
+
for (const r of e.rapporteurs) {
|
|
903
|
+
const o = t.acteurByUid[r.acteurRef];
|
|
904
|
+
o !== void 0 && (r.acteur = o, l(o, t, n));
|
|
1072
905
|
}
|
|
1073
906
|
if (t.reunionByUid !== void 0 && e.reunionRef !== void 0) {
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
const o =
|
|
907
|
+
const r = t.reunionByUid[e.reunionRef];
|
|
908
|
+
if (r !== void 0 && (e.reunion = r, Pe(r, t, n), e.odjRef !== void 0)) {
|
|
909
|
+
const o = r.odj;
|
|
1077
910
|
if (o !== void 0 && o.pointsOdj !== void 0) {
|
|
1078
911
|
for (const i of o.pointsOdj)
|
|
1079
912
|
if (i.uid === e.odjRef) {
|
|
@@ -1084,533 +917,305 @@ function W(e, t, r) {
|
|
|
1084
917
|
}
|
|
1085
918
|
}
|
|
1086
919
|
if (t.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
|
|
1087
|
-
const
|
|
1088
|
-
|
|
920
|
+
const r = t.documentByUid[e.texteAdopteRef];
|
|
921
|
+
r !== void 0 && (e.texteAdopte = r, x(r, t, n));
|
|
1089
922
|
}
|
|
1090
923
|
if (t.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
|
|
1091
|
-
const
|
|
1092
|
-
|
|
924
|
+
const r = t.documentByUid[e.texteAssocieRef];
|
|
925
|
+
r !== void 0 && (e.texteAssocie = r, x(r, t, n));
|
|
1093
926
|
}
|
|
1094
927
|
if (t.documentByUid !== void 0 && e.textesAssocies !== void 0)
|
|
1095
|
-
for (const
|
|
1096
|
-
const o = t.documentByUid[
|
|
1097
|
-
o !== void 0 && (
|
|
928
|
+
for (const r of e.textesAssocies) {
|
|
929
|
+
const o = t.documentByUid[r.texteAssocieRef];
|
|
930
|
+
o !== void 0 && (r.texteAssocie = o, x(o, t, n));
|
|
1098
931
|
}
|
|
1099
932
|
if (t.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
|
|
1100
|
-
const
|
|
933
|
+
const r = [];
|
|
1101
934
|
for (const o of e.voteRefs) {
|
|
1102
935
|
const i = t.scrutinByUid[o];
|
|
1103
|
-
i !== void 0 && (
|
|
936
|
+
i !== void 0 && (r.push(i), Ne(i, t, n));
|
|
1104
937
|
}
|
|
1105
|
-
e.votes =
|
|
938
|
+
e.votes = r;
|
|
1106
939
|
}
|
|
1107
|
-
for (const
|
|
1108
|
-
|
|
940
|
+
for (const r of e.actesLegislatifs || [])
|
|
941
|
+
I(r, t, n);
|
|
1109
942
|
}
|
|
1110
943
|
return e;
|
|
1111
944
|
}
|
|
1112
|
-
function
|
|
1113
|
-
if (!
|
|
1114
|
-
for (const
|
|
945
|
+
function l(e, t, n) {
|
|
946
|
+
if (!n.has(e.uid) && (n.add(e.uid), t.organeByUid !== void 0))
|
|
947
|
+
for (const r of e.mandats || []) {
|
|
1115
948
|
const o = [];
|
|
1116
|
-
for (const i of
|
|
1117
|
-
const
|
|
1118
|
-
|
|
949
|
+
for (const i of r.organesRefs) {
|
|
950
|
+
const s = t.organeByUid[i];
|
|
951
|
+
s !== void 0 && (o.push(s), g(s, t, n));
|
|
1119
952
|
}
|
|
1120
|
-
|
|
953
|
+
r.organes = o;
|
|
1121
954
|
}
|
|
1122
955
|
return e;
|
|
1123
956
|
}
|
|
1124
|
-
function
|
|
1125
|
-
if (!
|
|
1126
|
-
|
|
1127
|
-
const
|
|
957
|
+
function Qe(e, t, n) {
|
|
958
|
+
if (!n.has(e.uid)) {
|
|
959
|
+
n.add(e.uid);
|
|
960
|
+
const r = e.signataires, o = r.auteur;
|
|
1128
961
|
if (t.acteurByUid !== void 0 && o.acteurRef !== void 0) {
|
|
1129
962
|
const i = t.acteurByUid[o.acteurRef];
|
|
1130
|
-
i !== void 0 && (o.acteur = i,
|
|
963
|
+
i !== void 0 && (o.acteur = i, l(i, t, n));
|
|
1131
964
|
}
|
|
1132
965
|
if (t.organeByUid !== void 0 && o.auteurRapporteurOrganeRef !== void 0) {
|
|
1133
966
|
const i = t.organeByUid[o.auteurRapporteurOrganeRef];
|
|
1134
|
-
i !== void 0 && (o.auteurRapporteurOrgane = i,
|
|
967
|
+
i !== void 0 && (o.auteurRapporteurOrgane = i, g(i, t, n));
|
|
1135
968
|
}
|
|
1136
969
|
if (t.organeByUid !== void 0 && o.gouvernementRef !== void 0) {
|
|
1137
970
|
const i = t.organeByUid[o.gouvernementRef];
|
|
1138
|
-
i !== void 0 && (o.gouvernement = i,
|
|
971
|
+
i !== void 0 && (o.gouvernement = i, g(i, t, n));
|
|
1139
972
|
}
|
|
1140
973
|
if (t.organeByUid !== void 0 && o.groupePolitiqueRef !== void 0) {
|
|
1141
974
|
const i = t.organeByUid[o.groupePolitiqueRef];
|
|
1142
|
-
i !== void 0 && (o.groupePolitique = i,
|
|
975
|
+
i !== void 0 && (o.groupePolitique = i, g(i, t, n));
|
|
1143
976
|
}
|
|
1144
|
-
if (t.acteurByUid !== void 0 &&
|
|
1145
|
-
const
|
|
1146
|
-
for (const
|
|
1147
|
-
const
|
|
1148
|
-
|
|
977
|
+
if (t.acteurByUid !== void 0 && r.cosignatairesRefs !== void 0) {
|
|
978
|
+
const s = [];
|
|
979
|
+
for (const c of r.cosignatairesRefs || []) {
|
|
980
|
+
const u = t.acteurByUid[c];
|
|
981
|
+
u !== void 0 && (s.push(u), l(u, t, n));
|
|
1149
982
|
}
|
|
1150
|
-
|
|
983
|
+
r.cosignataires = s;
|
|
1151
984
|
}
|
|
1152
985
|
}
|
|
1153
986
|
return e;
|
|
1154
987
|
}
|
|
1155
|
-
function
|
|
1156
|
-
for (const
|
|
1157
|
-
const o =
|
|
988
|
+
function q(e, t, n) {
|
|
989
|
+
for (const r of e.auteurs) {
|
|
990
|
+
const o = r.acteur;
|
|
1158
991
|
if (t.acteurByUid !== void 0 && o !== void 0) {
|
|
1159
992
|
const i = t.acteurByUid[o.acteurRef];
|
|
1160
|
-
i !== void 0 && (o.acteur = i,
|
|
993
|
+
i !== void 0 && (o.acteur = i, l(i, t, n));
|
|
1161
994
|
}
|
|
1162
|
-
if (t.organeByUid !== void 0 &&
|
|
1163
|
-
const i = t.organeByUid[
|
|
1164
|
-
i !== void 0 && (
|
|
995
|
+
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
996
|
+
const i = t.organeByUid[r.organeRef];
|
|
997
|
+
i !== void 0 && (r.organe = i, g(i, t, n));
|
|
1165
998
|
}
|
|
1166
999
|
}
|
|
1167
1000
|
if (t.dossierByUid !== void 0) {
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1001
|
+
const r = t.dossierByUid[e.dossierRef];
|
|
1002
|
+
r !== void 0 && (e.dossier = r, W(r, t, n));
|
|
1170
1003
|
}
|
|
1171
|
-
for (const
|
|
1172
|
-
|
|
1004
|
+
for (const r of e.divisions || [])
|
|
1005
|
+
q(r, t, n);
|
|
1173
1006
|
return e;
|
|
1174
1007
|
}
|
|
1175
|
-
function
|
|
1176
|
-
if (!
|
|
1177
|
-
|
|
1178
|
-
for (const
|
|
1179
|
-
const o =
|
|
1008
|
+
function x(e, t, n) {
|
|
1009
|
+
if (!n.has(e.uid)) {
|
|
1010
|
+
n.add(e.uid);
|
|
1011
|
+
for (const r of e.auteurs) {
|
|
1012
|
+
const o = r.acteur;
|
|
1180
1013
|
if (t.acteurByUid !== void 0 && o !== void 0) {
|
|
1181
1014
|
const i = t.acteurByUid[o.acteurRef];
|
|
1182
|
-
i !== void 0 && (o.acteur = i,
|
|
1015
|
+
i !== void 0 && (o.acteur = i, l(i, t, n));
|
|
1183
1016
|
}
|
|
1184
|
-
if (t.organeByUid !== void 0 &&
|
|
1185
|
-
const i = t.organeByUid[
|
|
1186
|
-
i !== void 0 && (
|
|
1017
|
+
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
1018
|
+
const i = t.organeByUid[r.organeRef];
|
|
1019
|
+
i !== void 0 && (r.organe = i, g(i, t, n));
|
|
1187
1020
|
}
|
|
1188
1021
|
}
|
|
1189
1022
|
if (t.dossierByUid !== void 0) {
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1023
|
+
const r = t.dossierByUid[e.dossierRef];
|
|
1024
|
+
r !== void 0 && (e.dossier = r, W(r, t, n));
|
|
1192
1025
|
}
|
|
1193
|
-
for (const
|
|
1194
|
-
|
|
1026
|
+
for (const r of e.divisions || [])
|
|
1027
|
+
q(r, t, n);
|
|
1195
1028
|
}
|
|
1196
1029
|
return e;
|
|
1197
1030
|
}
|
|
1198
|
-
function
|
|
1199
|
-
if (!
|
|
1200
|
-
|
|
1031
|
+
function W(e, t, n) {
|
|
1032
|
+
if (!n.has(e.uid)) {
|
|
1033
|
+
n.add(e.uid);
|
|
1201
1034
|
for (const o of e.actesLegislatifs ?? [])
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
if (
|
|
1035
|
+
I(o, t, n);
|
|
1036
|
+
const r = e.initiateur;
|
|
1037
|
+
if (r !== void 0) {
|
|
1205
1038
|
if (t.acteurByUid !== void 0)
|
|
1206
|
-
for (const o of
|
|
1039
|
+
for (const o of r.acteurs || []) {
|
|
1207
1040
|
const i = t.acteurByUid[o.acteurRef];
|
|
1208
|
-
if (i !== void 0 && (o.acteur = i,
|
|
1209
|
-
for (const
|
|
1210
|
-
if (
|
|
1211
|
-
o.mandat =
|
|
1041
|
+
if (i !== void 0 && (o.acteur = i, l(i, t, n)), i !== void 0 && o.mandatRef !== void 0) {
|
|
1042
|
+
for (const s of i.mandats || [])
|
|
1043
|
+
if (s.uid === o.mandatRef) {
|
|
1044
|
+
o.mandat = s;
|
|
1212
1045
|
break;
|
|
1213
1046
|
}
|
|
1214
1047
|
}
|
|
1215
1048
|
}
|
|
1216
|
-
if (t.organeByUid !== void 0 &&
|
|
1217
|
-
const o = t.organeByUid[
|
|
1218
|
-
o !== void 0 && (
|
|
1049
|
+
if (t.organeByUid !== void 0 && r.organeRef !== void 0) {
|
|
1050
|
+
const o = t.organeByUid[r.organeRef];
|
|
1051
|
+
o !== void 0 && (r.organe = o, g(o, t, n));
|
|
1219
1052
|
}
|
|
1220
1053
|
}
|
|
1221
1054
|
}
|
|
1222
1055
|
return e;
|
|
1223
1056
|
}
|
|
1224
|
-
function
|
|
1225
|
-
if (!
|
|
1226
|
-
if (
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1057
|
+
function g(e, t, n) {
|
|
1058
|
+
if (!n.has(e.uid)) {
|
|
1059
|
+
if (n.add(e.uid), t.organeByUid !== void 0 && e.organeParentRef !== void 0) {
|
|
1060
|
+
const r = t.organeByUid[e.organeParentRef];
|
|
1061
|
+
r !== void 0 && (e.organeParent = r, g(r, t, n));
|
|
1229
1062
|
}
|
|
1230
1063
|
if (t.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1064
|
+
const r = t.organeByUid[e.organePrecedentRef];
|
|
1065
|
+
r !== void 0 && (e.organePrecedent = r, g(r, t, n));
|
|
1233
1066
|
}
|
|
1234
1067
|
}
|
|
1235
1068
|
return e;
|
|
1236
1069
|
}
|
|
1237
|
-
function
|
|
1238
|
-
if (!
|
|
1239
|
-
|
|
1240
|
-
const
|
|
1241
|
-
if (
|
|
1070
|
+
function Pe(e, t, n) {
|
|
1071
|
+
if (!n.has(e.uid)) {
|
|
1072
|
+
n.add(e.uid);
|
|
1073
|
+
const r = e.demandeurs;
|
|
1074
|
+
if (r !== void 0) {
|
|
1242
1075
|
if (t.acteurByUid !== void 0)
|
|
1243
|
-
for (const o of
|
|
1076
|
+
for (const o of r.acteurs || []) {
|
|
1244
1077
|
const i = t.acteurByUid[o.acteurRef];
|
|
1245
|
-
i !== void 0 && (o.acteur = i,
|
|
1078
|
+
i !== void 0 && (o.acteur = i, l(i, t, n));
|
|
1246
1079
|
}
|
|
1247
1080
|
if (t.organeByUid !== void 0) {
|
|
1248
|
-
const o =
|
|
1081
|
+
const o = r.organe;
|
|
1249
1082
|
if (o !== void 0) {
|
|
1250
1083
|
const i = t.organeByUid[o.organeRef];
|
|
1251
|
-
i !== void 0 && (o.organe = i,
|
|
1084
|
+
i !== void 0 && (o.organe = i, g(i, t, n));
|
|
1252
1085
|
}
|
|
1253
1086
|
}
|
|
1254
1087
|
}
|
|
1255
1088
|
if (t.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
|
|
1256
1089
|
const o = t.organeByUid[e.organeReuniRef];
|
|
1257
|
-
o !== void 0 && (e.organeReuni = o,
|
|
1090
|
+
o !== void 0 && (e.organeReuni = o, g(o, t, n));
|
|
1258
1091
|
}
|
|
1259
1092
|
if (t.acteurByUid !== void 0) {
|
|
1260
1093
|
const o = e.participants;
|
|
1261
1094
|
if (o !== void 0)
|
|
1262
1095
|
for (const i of o.participantsInternes || []) {
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1096
|
+
const s = t.acteurByUid[i.acteurRef];
|
|
1097
|
+
s !== void 0 && (i.acteur = s, l(s, t, n));
|
|
1265
1098
|
}
|
|
1266
1099
|
}
|
|
1267
1100
|
}
|
|
1268
1101
|
return e;
|
|
1269
1102
|
}
|
|
1270
|
-
function
|
|
1271
|
-
return
|
|
1103
|
+
function Ne(e, t, n) {
|
|
1104
|
+
return n.has(e.uid) || n.add(e.uid), e;
|
|
1272
1105
|
}
|
|
1273
|
-
function
|
|
1106
|
+
function Xe(e) {
|
|
1274
1107
|
if (e == null)
|
|
1275
1108
|
return "Organe inconnu";
|
|
1276
1109
|
switch (e.codeType) {
|
|
1277
|
-
case
|
|
1110
|
+
case _.Cmp:
|
|
1278
1111
|
return "Commission mixte paritaire";
|
|
1279
|
-
case
|
|
1112
|
+
case _.Gouvernement:
|
|
1280
1113
|
return e.libelle;
|
|
1281
1114
|
default:
|
|
1282
1115
|
return e.libelleAbrege;
|
|
1283
1116
|
}
|
|
1284
1117
|
}
|
|
1285
|
-
var je = /* @__PURE__ */ ((e) => (e.Html = "html", e.Pdf = "pdf", e.RawHtml = "raw-html", e))(je || {});
|
|
1286
|
-
const $e = {
|
|
1287
|
-
ACIN: {
|
|
1288
|
-
directory: "projets",
|
|
1289
|
-
prefix: "pl",
|
|
1290
|
-
suffix: "-ai"
|
|
1291
|
-
},
|
|
1292
|
-
AVCEPRJLOI: {
|
|
1293
|
-
directory: "projets",
|
|
1294
|
-
prefix: "pl",
|
|
1295
|
-
suffix: "-ace"
|
|
1296
|
-
},
|
|
1297
|
-
AVCELETTRE: {
|
|
1298
|
-
directory: "projets",
|
|
1299
|
-
prefix: "pl",
|
|
1300
|
-
suffix: "-ace"
|
|
1301
|
-
},
|
|
1302
|
-
AVCEPIONLOI: {
|
|
1303
|
-
directory: "propositions",
|
|
1304
|
-
prefix: "pion",
|
|
1305
|
-
suffix: "-ace"
|
|
1306
|
-
},
|
|
1307
|
-
AVIS: {
|
|
1308
|
-
directory: "rapports",
|
|
1309
|
-
prefix: "r",
|
|
1310
|
-
suffix: ""
|
|
1311
|
-
},
|
|
1312
|
-
ETDI: {
|
|
1313
|
-
directory: "projets",
|
|
1314
|
-
prefix: "pl",
|
|
1315
|
-
suffix: "-ei"
|
|
1316
|
-
},
|
|
1317
|
-
LETT: {
|
|
1318
|
-
directory: "projets",
|
|
1319
|
-
prefix: "pl",
|
|
1320
|
-
suffix: "-l"
|
|
1321
|
-
},
|
|
1322
|
-
PION: {
|
|
1323
|
-
directory: "propositions",
|
|
1324
|
-
prefix: "pion",
|
|
1325
|
-
suffix: ""
|
|
1326
|
-
},
|
|
1327
|
-
PNRE: {
|
|
1328
|
-
directory: "propositions",
|
|
1329
|
-
prefix: "pion",
|
|
1330
|
-
suffix: ""
|
|
1331
|
-
},
|
|
1332
|
-
PNREAPPART341: {
|
|
1333
|
-
directory: "propositions",
|
|
1334
|
-
prefix: "pion",
|
|
1335
|
-
suffix: ""
|
|
1336
|
-
},
|
|
1337
|
-
PNRECOMENQ: {
|
|
1338
|
-
directory: "propositions",
|
|
1339
|
-
prefix: "pion",
|
|
1340
|
-
suffix: ""
|
|
1341
|
-
},
|
|
1342
|
-
PNREMODREGLTAN: {
|
|
1343
|
-
directory: "propositions",
|
|
1344
|
-
prefix: "pion",
|
|
1345
|
-
suffix: ""
|
|
1346
|
-
},
|
|
1347
|
-
PNRETVXINSTITEUROP: {
|
|
1348
|
-
directory: "europe/resolutions",
|
|
1349
|
-
prefix: "ppe",
|
|
1350
|
-
suffix: ""
|
|
1351
|
-
},
|
|
1352
|
-
PRJL: {
|
|
1353
|
-
directory: "projets",
|
|
1354
|
-
prefix: "pl",
|
|
1355
|
-
suffix: ""
|
|
1356
|
-
},
|
|
1357
|
-
RAPP: {
|
|
1358
|
-
directory: "rapports",
|
|
1359
|
-
prefix: "r",
|
|
1360
|
-
suffix: ""
|
|
1361
|
-
},
|
|
1362
|
-
RINF: {
|
|
1363
|
-
directory: "rap-info",
|
|
1364
|
-
prefix: "i",
|
|
1365
|
-
suffix: ""
|
|
1366
|
-
},
|
|
1367
|
-
RION: {
|
|
1368
|
-
directory: "",
|
|
1369
|
-
prefix: "",
|
|
1370
|
-
suffix: ""
|
|
1371
|
-
},
|
|
1372
|
-
TADO: {
|
|
1373
|
-
directory: "ta",
|
|
1374
|
-
prefix: "ta",
|
|
1375
|
-
suffix: ""
|
|
1376
|
-
},
|
|
1377
|
-
TCOM: {
|
|
1378
|
-
directory: "ta-commission",
|
|
1379
|
-
prefix: "r",
|
|
1380
|
-
suffix: "-a0"
|
|
1381
|
-
},
|
|
1382
|
-
TCOMCOMENQ: {
|
|
1383
|
-
directory: "ta-commission",
|
|
1384
|
-
prefix: "r",
|
|
1385
|
-
suffix: "-a0"
|
|
1386
|
-
},
|
|
1387
|
-
TCOMMODREGLTAN: {
|
|
1388
|
-
directory: "ta-commission",
|
|
1389
|
-
prefix: "r",
|
|
1390
|
-
suffix: "-a0"
|
|
1391
|
-
},
|
|
1392
|
-
TCOMTVXINSTITEUROP: {
|
|
1393
|
-
directory: "ta-commission",
|
|
1394
|
-
prefix: "r",
|
|
1395
|
-
suffix: "-a0"
|
|
1396
|
-
}
|
|
1397
|
-
};
|
|
1398
|
-
function We(e) {
|
|
1399
|
-
switch (e) {
|
|
1400
|
-
case "html":
|
|
1401
|
-
return ".asp";
|
|
1402
|
-
case "pdf":
|
|
1403
|
-
return ".pdf";
|
|
1404
|
-
case "raw-html":
|
|
1405
|
-
return ".asp";
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
function* ct(e, t = void 0) {
|
|
1409
|
-
if (t === void 0 || t === "raw-html") {
|
|
1410
|
-
yield {
|
|
1411
|
-
format: "raw-html",
|
|
1412
|
-
type: "dyn-opendata",
|
|
1413
|
-
url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
|
|
1414
|
-
}, yield {
|
|
1415
|
-
format: "raw-html",
|
|
1416
|
-
type: "dyn-docs",
|
|
1417
|
-
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.raw`
|
|
1418
|
-
};
|
|
1419
|
-
const r = b(
|
|
1420
|
-
e,
|
|
1421
|
-
"raw-html"
|
|
1422
|
-
/* RawHtml */
|
|
1423
|
-
);
|
|
1424
|
-
r !== null && (yield {
|
|
1425
|
-
format: "raw-html",
|
|
1426
|
-
type: r.directory.replaceAll("/", "-"),
|
|
1427
|
-
url: r.url
|
|
1428
|
-
});
|
|
1429
|
-
}
|
|
1430
|
-
if (t === void 0 || t === "html") {
|
|
1431
|
-
const r = b(
|
|
1432
|
-
e,
|
|
1433
|
-
"html"
|
|
1434
|
-
/* Html */
|
|
1435
|
-
);
|
|
1436
|
-
r !== null && (yield {
|
|
1437
|
-
format: "html",
|
|
1438
|
-
type: r.directory.replaceAll("/", "-"),
|
|
1439
|
-
url: r.url
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
if (t === void 0 || t === "pdf") {
|
|
1443
|
-
yield {
|
|
1444
|
-
format: "raw-html",
|
|
1445
|
-
type: "dyn-opendata",
|
|
1446
|
-
url: `https://www.assemblee-nationale.fr/dyn/opendata/${e.uid}.html`
|
|
1447
|
-
}, yield {
|
|
1448
|
-
format: "pdf",
|
|
1449
|
-
type: "dyn-docs",
|
|
1450
|
-
url: `https://www.assemblee-nationale.fr/dyn/docs/${e.uid}.pdf`
|
|
1451
|
-
};
|
|
1452
|
-
const r = b(
|
|
1453
|
-
e,
|
|
1454
|
-
"pdf"
|
|
1455
|
-
/* Pdf */
|
|
1456
|
-
);
|
|
1457
|
-
r !== null && (yield {
|
|
1458
|
-
format: "pdf",
|
|
1459
|
-
type: r.directory.replaceAll("/", "-"),
|
|
1460
|
-
url: r.url
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
function ut(e, t) {
|
|
1465
|
-
const r = b(e, t);
|
|
1466
|
-
return r === null ? null : r.url;
|
|
1467
|
-
}
|
|
1468
|
-
function ft(e) {
|
|
1469
|
-
const t = /^VTANR([0-9]+)L([0-9]+)V([0-9]+)$/.exec(e.uid);
|
|
1470
|
-
if (t === null)
|
|
1471
|
-
return console.log(
|
|
1472
|
-
`Unable to generate URL from scrutin with unexpected UID: "${e.uid}"`
|
|
1473
|
-
), null;
|
|
1474
|
-
const r = t[2], n = t[3];
|
|
1475
|
-
return `http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/${r}/(num)/${n}`;
|
|
1476
|
-
}
|
|
1477
|
-
function b(e, t) {
|
|
1478
|
-
const r = We(t), n = /^(.{4})([ANS]*)(R[0-9])([LS]*)([0-9]*)([BTACP]*)(.*)$/.exec(
|
|
1479
|
-
e.uid
|
|
1480
|
-
);
|
|
1481
|
-
if (n === null)
|
|
1482
|
-
return console.log(
|
|
1483
|
-
`Unable to generate URL from document or division with unexpected UID: "${e.uid}"`
|
|
1484
|
-
), null;
|
|
1485
|
-
if (n[2] === "SN")
|
|
1486
|
-
return console.log(
|
|
1487
|
-
`Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`
|
|
1488
|
-
), null;
|
|
1489
|
-
const i = n[5];
|
|
1490
|
-
let a = n[7];
|
|
1491
|
-
if (t === "raw-html")
|
|
1492
|
-
return {
|
|
1493
|
-
directory: "textes",
|
|
1494
|
-
url: `https://www.assemblee-nationale.fr/${i}/textes/${a}${r}`
|
|
1495
|
-
};
|
|
1496
|
-
let u = {
|
|
1497
|
-
BTC: "TCOM",
|
|
1498
|
-
BTA: "TADO",
|
|
1499
|
-
TAP: "TADO"
|
|
1500
|
-
}[n[6]] || n[1];
|
|
1501
|
-
e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (a = a.replace(/-COMPA/, "-aCOMPA")), u == "AVCE" && (u = `AVCE${e.classification.famille?.classe.code}`);
|
|
1502
|
-
const c = $e[u];
|
|
1503
|
-
if (c === void 0)
|
|
1504
|
-
return console.log(
|
|
1505
|
-
`Unable to generate URL from document or division of UID "${e.uid}" and type "${u}"`
|
|
1506
|
-
), null;
|
|
1507
|
-
const f = t === "pdf" ? `pdf/${c.directory}` : c.directory;
|
|
1508
|
-
return {
|
|
1509
|
-
directory: f,
|
|
1510
|
-
url: `https://www.assemblee-nationale.fr/${i}/${f}/${c.prefix}${a}${c.suffix}${r}`
|
|
1511
|
-
};
|
|
1512
|
-
}
|
|
1513
1118
|
export {
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1119
|
+
sn as AccordGouvernementDepotHorsDelai,
|
|
1120
|
+
un as Action,
|
|
1121
|
+
cn as AmendementsConvert,
|
|
1122
|
+
fn as AvantAApres,
|
|
1123
|
+
ze as Cause,
|
|
1124
|
+
Ze as CausePositionVote,
|
|
1125
|
+
Je as Civ,
|
|
1126
|
+
$e as CodeActe,
|
|
1127
|
+
dn as CodeEtat,
|
|
1128
|
+
Ke as CodeNatureDep,
|
|
1129
|
+
et as CodeSortScrutin,
|
|
1130
|
+
_ as CodeTypeOrgane,
|
|
1131
|
+
tt as CodeTypeVote,
|
|
1132
|
+
nt as Decision,
|
|
1133
|
+
mn as DivisionType,
|
|
1134
|
+
rt as DocumentDenominationStructurelle,
|
|
1135
|
+
ot as DocumentUrlFormat,
|
|
1136
|
+
it as DossierParlementaireXsiType,
|
|
1137
|
+
gn as EtatAmendementCode,
|
|
1533
1138
|
hn as EtatAmendementLibelle,
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1139
|
+
at as EtatCycleDeVie,
|
|
1140
|
+
k as Facet,
|
|
1141
|
+
st as FamSocPro,
|
|
1142
|
+
ut as FinalStatus,
|
|
1143
|
+
C as Follow,
|
|
1144
|
+
ct as FormatReunion,
|
|
1145
|
+
ft as Legislature,
|
|
1146
|
+
dt as LibelleSortScrutin,
|
|
1147
|
+
mt as LibelleTypeVote,
|
|
1148
|
+
gt as LieuVote,
|
|
1149
|
+
ht as ModePublicationDesVotes,
|
|
1150
|
+
lt as Motif,
|
|
1151
|
+
yt as NatureTravauxOdj,
|
|
1152
|
+
pt as PersonneAuditionneeXsiType,
|
|
1153
|
+
Dt as PointOdjXsiType,
|
|
1154
|
+
vt as PositionMajoritaire,
|
|
1155
|
+
Rt as PositionPolitique,
|
|
1156
|
+
xt as Presence,
|
|
1157
|
+
wt as Procedure,
|
|
1158
|
+
Ot as Provenance,
|
|
1159
|
+
Tt as Qualite,
|
|
1160
|
+
bt as Quantieme,
|
|
1161
|
+
Bt as Regime,
|
|
1162
|
+
Mt as RegionType,
|
|
1163
|
+
_t as ReunionXsiType,
|
|
1164
|
+
ln as SortAmendement,
|
|
1165
|
+
St as StatusOnly,
|
|
1166
|
+
At as StatutAdoption,
|
|
1167
|
+
Pt as TexteExterneAssocieTypeDoc,
|
|
1168
|
+
Nt as TypeActeLegislatif,
|
|
1169
|
+
yn as TypeAuteur,
|
|
1170
|
+
Lt as TypeBudget,
|
|
1171
|
+
Et as TypeCorrection,
|
|
1172
|
+
Yt as TypeDocument,
|
|
1173
|
+
kt as TypeJo,
|
|
1174
|
+
Ct as TypeJoQuestion,
|
|
1175
|
+
Ut as TypeMajorite,
|
|
1176
|
+
It as TypeMandat,
|
|
1177
|
+
pn as TypeMimeNom,
|
|
1573
1178
|
Dn as TypeMimeType,
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1179
|
+
qt as TypeMission,
|
|
1180
|
+
Wt as TypeOrgane,
|
|
1181
|
+
Ht as TypePointOdj,
|
|
1182
|
+
vn as TypePosition,
|
|
1183
|
+
Ft as TypeQuestion,
|
|
1184
|
+
jt as TypeReunion,
|
|
1185
|
+
Qt as TypeTexte,
|
|
1186
|
+
Ye as allFacets,
|
|
1187
|
+
ke as allFollows,
|
|
1188
|
+
Xt as capitalizeFirstLetter,
|
|
1189
|
+
Gt as commissionFondUidFromDossier,
|
|
1190
|
+
Ue as dateFromNullableDateOrIsoString,
|
|
1191
|
+
Ie as dateFromYearMonthDayTimezoneString,
|
|
1192
|
+
qe as displayDateFromLocalIsoString,
|
|
1193
|
+
Me as existingDateToJson,
|
|
1194
|
+
We as formatRelativeFrenchTime,
|
|
1195
|
+
Ce as frenchDateFormat,
|
|
1196
|
+
Se as frenchDateSameYearShortFormat,
|
|
1197
|
+
He as frenchDateWithoutDayOfWeekFromDateOrString,
|
|
1198
|
+
Ae as frenchTimeFormat,
|
|
1199
|
+
Fe as frenchTimeFromDateOrString,
|
|
1200
|
+
l as insertActeurReferences,
|
|
1201
|
+
Qe as insertAmendementReferences,
|
|
1202
|
+
x as insertDocumentReferences,
|
|
1203
|
+
W as insertDossierReferences,
|
|
1204
|
+
g as insertOrganeReferences,
|
|
1205
|
+
Pe as insertReunionReferences,
|
|
1206
|
+
Ne as insertScrutinReferences,
|
|
1207
|
+
Vt as iterDocumentOrDivisionUrls,
|
|
1208
|
+
je as localIso8601StringFromDate,
|
|
1209
|
+
_e as patchedDateToJson,
|
|
1210
|
+
zt as pathFromDocumentUid,
|
|
1211
|
+
Xe as shortNameFromOrgane,
|
|
1212
|
+
Zt as stateFromActePath,
|
|
1213
|
+
Jt as stateFromActes,
|
|
1214
|
+
$t as stateFromDossier,
|
|
1215
|
+
Kt as statusFromCodierLibelle,
|
|
1216
|
+
en as uncapitalizeFirstLetter,
|
|
1217
|
+
tn as urlFromDocument,
|
|
1218
|
+
nn as urlFromScrutin,
|
|
1219
|
+
rn as walkActes,
|
|
1220
|
+
on as walkDocumentAndDivisions
|
|
1616
1221
|
};
|