@tricoteuses/assemblee 2.2.0 → 2.3.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/README.md +44 -23
- package/lib/cleaners/scrutins.d.ts +1 -0
- package/lib/cleaners.js +333 -324
- package/lib/index.js +943 -548
- package/lib/{loaders-Csd5rgG_.js → loaders-COCQTD-d.js} +1449 -2084
- package/lib/loaders.js +5 -5
- package/lib/parsers.js +9302 -578
- package/lib/raw_types/questions.d.ts +1 -1
- package/lib/raw_types/scrutins.d.ts +1 -1
- package/lib/schemas/agendas.json +8 -0
- package/lib/schemas/debats.json +0 -6
- package/lib/schemas/dossiers_legislatifs.json +8 -0
- package/lib/schemas/questions.json +9 -2
- package/lib/scripts/retrieve_documents.d.ts +6 -5
- package/lib/scripts/retrieve_videos.d.ts +14 -0
- package/lib/scripts/shared/cli_helpers.d.ts +5 -0
- package/lib/scripts/shared/utils.d.ts +2 -0
- package/lib/types/agendas.d.ts +8 -0
- package/lib/types/debats.d.ts +0 -2
- package/lib/types/questions.d.ts +1 -1
- package/package.json +3 -2
- package/lib/index-COAP8XeF.js +0 -8733
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 B, t as x, g as _, m as Q, a as s, b as X, d as V, e as z, f as J, h as Z, i as K, l as ee, j as te, k as ne, w as re, n as U, o as k, p as oe, q as C } from "./parse-Ccs6wcUg.js";
|
|
2
|
+
import { C as O } from "./loaders-COCQTD-d.js";
|
|
3
|
+
import { n as mt, H as gt, b as pt, a as yt, c as ht, I as Rt, J as xt, D as Tt, o as Dt, q as wt, E as vt, F as bt, f as St, L as At, K as Et, O as Ot, U as Ct, V as Mt, M as _t, N as Pt, g as Lt, h as Nt, W as It, P as Bt, i as Ut, j as kt, r as Yt, s as Ft, Q as qt, R as jt, d as $t, k as Wt, S as Ht, t as Gt, u as Qt, v as Xt, w as Vt, x as zt, y as Jt, G as Zt, X as Kt, T as en, z as tn, e as nn, l as rn, B as on, m as an, A as sn, p as cn } from "./loaders-COCQTD-d.js";
|
|
4
|
+
import { A as fn, a as dn, C as ln, b as mn, c as gn, D as pn, E as yn, d as hn, S as Rn, T as xn, e as Tn, f as Dn, g as wn } from "./amendements-40Z7OJLT.js";
|
|
5
|
+
var Y = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(Y || {});
|
|
6
|
+
const Qe = Object.values(Y);
|
|
7
|
+
var F = /* @__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))(F || {});
|
|
8
|
+
const Xe = Object.values(F);
|
|
9
|
+
function ie(e, ...t) {
|
|
10
|
+
const r = B.bind(
|
|
11
11
|
null,
|
|
12
|
-
t.find((
|
|
12
|
+
t.find((n) => typeof n == "object")
|
|
13
13
|
);
|
|
14
|
-
return t.map(
|
|
14
|
+
return t.map(r);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
16
|
+
function P(e, t) {
|
|
17
|
+
const r = x(e, t?.in);
|
|
18
|
+
return r.setHours(0, 0, 0, 0), r;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const [
|
|
22
|
-
|
|
20
|
+
function ae(e, t, r) {
|
|
21
|
+
const [n, o] = ie(
|
|
22
|
+
r?.in,
|
|
23
23
|
e,
|
|
24
24
|
t
|
|
25
|
-
), i =
|
|
26
|
-
return Math.round((
|
|
25
|
+
), i = P(n), a = P(o), u = +i - _(i), c = +a - _(a);
|
|
26
|
+
return Math.round((u - c) / Q);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
return
|
|
28
|
+
function se(e, t) {
|
|
29
|
+
const r = x(e, t?.in);
|
|
30
|
+
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
function ce(e, t) {
|
|
33
|
+
const r = x(e, t?.in);
|
|
34
|
+
return ae(r, se(r)) + 1;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const y = {
|
|
37
37
|
// Year
|
|
38
38
|
y(e, t) {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
|
|
40
|
+
return s(t === "yy" ? n % 100 : n, t.length);
|
|
41
41
|
},
|
|
42
42
|
// Month
|
|
43
43
|
M(e, t) {
|
|
44
|
-
const
|
|
45
|
-
return t === "M" ? String(
|
|
44
|
+
const r = e.getMonth();
|
|
45
|
+
return t === "M" ? String(r + 1) : s(r + 1, 2);
|
|
46
46
|
},
|
|
47
47
|
// Day of the month
|
|
48
48
|
d(e, t) {
|
|
49
|
-
return
|
|
49
|
+
return s(e.getDate(), t.length);
|
|
50
50
|
},
|
|
51
51
|
// AM or PM
|
|
52
52
|
a(e, t) {
|
|
53
|
-
const
|
|
53
|
+
const r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
54
54
|
switch (t) {
|
|
55
55
|
case "a":
|
|
56
56
|
case "aa":
|
|
57
|
-
return
|
|
57
|
+
return r.toUpperCase();
|
|
58
58
|
case "aaa":
|
|
59
|
-
return
|
|
59
|
+
return r;
|
|
60
60
|
case "aaaaa":
|
|
61
|
-
return
|
|
61
|
+
return r[0];
|
|
62
62
|
case "aaaa":
|
|
63
63
|
default:
|
|
64
|
-
return
|
|
64
|
+
return r === "am" ? "a.m." : "p.m.";
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
// Hour [1-12]
|
|
68
68
|
h(e, t) {
|
|
69
|
-
return
|
|
69
|
+
return s(e.getHours() % 12 || 12, t.length);
|
|
70
70
|
},
|
|
71
71
|
// Hour [0-23]
|
|
72
72
|
H(e, t) {
|
|
73
|
-
return
|
|
73
|
+
return s(e.getHours(), t.length);
|
|
74
74
|
},
|
|
75
75
|
// Minute
|
|
76
76
|
m(e, t) {
|
|
77
|
-
return
|
|
77
|
+
return s(e.getMinutes(), t.length);
|
|
78
78
|
},
|
|
79
79
|
// Second
|
|
80
80
|
s(e, t) {
|
|
81
|
-
return
|
|
81
|
+
return s(e.getSeconds(), t.length);
|
|
82
82
|
},
|
|
83
83
|
// Fraction of second
|
|
84
84
|
S(e, t) {
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
const r = t.length, n = e.getMilliseconds(), o = Math.trunc(
|
|
86
|
+
n * Math.pow(10, r - 3)
|
|
87
87
|
);
|
|
88
|
-
return
|
|
88
|
+
return s(o, t.length);
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, T = {
|
|
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
|
+
}, L = {
|
|
98
98
|
// Era
|
|
99
|
-
G: function(e, t,
|
|
100
|
-
const
|
|
99
|
+
G: function(e, t, r) {
|
|
100
|
+
const n = 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 r.era(n, { width: "abbreviated" });
|
|
107
107
|
// A, B
|
|
108
108
|
case "GGGGG":
|
|
109
|
-
return
|
|
109
|
+
return r.era(n, { width: "narrow" });
|
|
110
110
|
// Anno Domini, Before Christ
|
|
111
111
|
case "GGGG":
|
|
112
112
|
default:
|
|
113
|
-
return
|
|
113
|
+
return r.era(n, { width: "wide" });
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
// Year
|
|
117
|
-
y: function(e, t,
|
|
117
|
+
y: function(e, t, r) {
|
|
118
118
|
if (t === "yo") {
|
|
119
|
-
const
|
|
120
|
-
return
|
|
119
|
+
const n = e.getFullYear(), o = n > 0 ? n : 1 - n;
|
|
120
|
+
return r.ordinalNumber(o, { unit: "year" });
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return y.y(e, t);
|
|
123
123
|
},
|
|
124
124
|
// Local week-numbering year
|
|
125
|
-
Y: function(e, t,
|
|
126
|
-
const o =
|
|
125
|
+
Y: function(e, t, r, n) {
|
|
126
|
+
const o = J(e, n), i = o > 0 ? o : 1 - o;
|
|
127
127
|
if (t === "YY") {
|
|
128
|
-
const
|
|
129
|
-
return a
|
|
128
|
+
const a = i % 100;
|
|
129
|
+
return s(a, 2);
|
|
130
130
|
}
|
|
131
|
-
return t === "Yo" ?
|
|
131
|
+
return t === "Yo" ? r.ordinalNumber(i, { unit: "year" }) : s(i, t.length);
|
|
132
132
|
},
|
|
133
133
|
// ISO week-numbering year
|
|
134
134
|
R: function(e, t) {
|
|
135
|
-
const
|
|
136
|
-
return
|
|
135
|
+
const r = z(e);
|
|
136
|
+
return s(r, 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 h = {
|
|
|
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 r = e.getFullYear();
|
|
149
|
+
return s(r, t.length);
|
|
150
150
|
},
|
|
151
151
|
// Quarter
|
|
152
|
-
Q: function(e, t,
|
|
153
|
-
const
|
|
152
|
+
Q: function(e, t, r) {
|
|
153
|
+
const n = 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(n);
|
|
158
158
|
// 01, 02, 03, 04
|
|
159
159
|
case "QQ":
|
|
160
|
-
return
|
|
160
|
+
return s(n, 2);
|
|
161
161
|
// 1st, 2nd, 3rd, 4th
|
|
162
162
|
case "Qo":
|
|
163
|
-
return
|
|
163
|
+
return r.ordinalNumber(n, { unit: "quarter" });
|
|
164
164
|
// Q1, Q2, Q3, Q4
|
|
165
165
|
case "QQQ":
|
|
166
|
-
return
|
|
166
|
+
return r.quarter(n, {
|
|
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 r.quarter(n, {
|
|
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 r.quarter(n, {
|
|
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, r) {
|
|
187
|
+
const n = 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(n);
|
|
192
192
|
// 01, 02, 03, 04
|
|
193
193
|
case "qq":
|
|
194
|
-
return
|
|
194
|
+
return s(n, 2);
|
|
195
195
|
// 1st, 2nd, 3rd, 4th
|
|
196
196
|
case "qo":
|
|
197
|
-
return
|
|
197
|
+
return r.ordinalNumber(n, { unit: "quarter" });
|
|
198
198
|
// Q1, Q2, Q3, Q4
|
|
199
199
|
case "qqq":
|
|
200
|
-
return
|
|
200
|
+
return r.quarter(n, {
|
|
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 r.quarter(n, {
|
|
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 r.quarter(n, {
|
|
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, r) {
|
|
221
|
+
const n = e.getMonth();
|
|
222
222
|
switch (t) {
|
|
223
223
|
case "M":
|
|
224
224
|
case "MM":
|
|
225
|
-
return
|
|
225
|
+
return y.M(e, t);
|
|
226
226
|
// 1st, 2nd, ..., 12th
|
|
227
227
|
case "Mo":
|
|
228
|
-
return
|
|
228
|
+
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
229
229
|
// Jan, Feb, ..., Dec
|
|
230
230
|
case "MMM":
|
|
231
|
-
return
|
|
231
|
+
return r.month(n, {
|
|
232
232
|
width: "abbreviated",
|
|
233
233
|
context: "formatting"
|
|
234
234
|
});
|
|
235
235
|
// J, F, ..., D
|
|
236
236
|
case "MMMMM":
|
|
237
|
-
return
|
|
237
|
+
return r.month(n, {
|
|
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 r.month(n, { 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, r) {
|
|
249
|
+
const n = e.getMonth();
|
|
250
250
|
switch (t) {
|
|
251
251
|
// 1, 2, ..., 12
|
|
252
252
|
case "L":
|
|
253
|
-
return String(
|
|
253
|
+
return String(n + 1);
|
|
254
254
|
// 01, 02, ..., 12
|
|
255
255
|
case "LL":
|
|
256
|
-
return
|
|
256
|
+
return s(n + 1, 2);
|
|
257
257
|
// 1st, 2nd, ..., 12th
|
|
258
258
|
case "Lo":
|
|
259
|
-
return
|
|
259
|
+
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
260
260
|
// Jan, Feb, ..., Dec
|
|
261
261
|
case "LLL":
|
|
262
|
-
return
|
|
262
|
+
return r.month(n, {
|
|
263
263
|
width: "abbreviated",
|
|
264
264
|
context: "standalone"
|
|
265
265
|
});
|
|
266
266
|
// J, F, ..., D
|
|
267
267
|
case "LLLLL":
|
|
268
|
-
return
|
|
268
|
+
return r.month(n, {
|
|
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 r.month(n, { 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, r, n) {
|
|
280
|
+
const o = V(e, n);
|
|
281
|
+
return t === "wo" ? r.ordinalNumber(o, { unit: "week" }) : s(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, r) {
|
|
285
|
+
const n = X(e);
|
|
286
|
+
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : s(n, t.length);
|
|
287
287
|
},
|
|
288
288
|
// Day of the month
|
|
289
|
-
d: function(e, t,
|
|
290
|
-
return t === "do" ?
|
|
289
|
+
d: function(e, t, r) {
|
|
290
|
+
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : y.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, r) {
|
|
294
|
+
const n = ce(e);
|
|
295
|
+
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : s(n, t.length);
|
|
296
296
|
},
|
|
297
297
|
// Day of week
|
|
298
|
-
E: function(e, t,
|
|
299
|
-
const
|
|
298
|
+
E: function(e, t, r) {
|
|
299
|
+
const n = 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 r.day(n, {
|
|
306
306
|
width: "abbreviated",
|
|
307
307
|
context: "formatting"
|
|
308
308
|
});
|
|
309
309
|
// T
|
|
310
310
|
case "EEEEE":
|
|
311
|
-
return
|
|
311
|
+
return r.day(n, {
|
|
312
312
|
width: "narrow",
|
|
313
313
|
context: "formatting"
|
|
314
314
|
});
|
|
315
315
|
// Tu
|
|
316
316
|
case "EEEEEE":
|
|
317
|
-
return
|
|
317
|
+
return r.day(n, {
|
|
318
318
|
width: "short",
|
|
319
319
|
context: "formatting"
|
|
320
320
|
});
|
|
321
321
|
// Tuesday
|
|
322
322
|
case "EEEE":
|
|
323
323
|
default:
|
|
324
|
-
return
|
|
324
|
+
return r.day(n, {
|
|
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, r, n) {
|
|
332
|
+
const o = e.getDay(), i = (o - n.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 s(i, 2);
|
|
340
340
|
// 1st, 2nd, ..., 7th
|
|
341
341
|
case "eo":
|
|
342
|
-
return
|
|
342
|
+
return r.ordinalNumber(i, { unit: "day" });
|
|
343
343
|
case "eee":
|
|
344
|
-
return
|
|
344
|
+
return r.day(o, {
|
|
345
345
|
width: "abbreviated",
|
|
346
346
|
context: "formatting"
|
|
347
347
|
});
|
|
348
348
|
// T
|
|
349
349
|
case "eeeee":
|
|
350
|
-
return
|
|
350
|
+
return r.day(o, {
|
|
351
351
|
width: "narrow",
|
|
352
352
|
context: "formatting"
|
|
353
353
|
});
|
|
354
354
|
// Tu
|
|
355
355
|
case "eeeeee":
|
|
356
|
-
return
|
|
356
|
+
return r.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 r.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, r, n) {
|
|
371
|
+
const o = e.getDay(), i = (o - n.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 s(i, t.length);
|
|
379
379
|
// 1st, 2nd, ..., 7th
|
|
380
380
|
case "co":
|
|
381
|
-
return
|
|
381
|
+
return r.ordinalNumber(i, { unit: "day" });
|
|
382
382
|
case "ccc":
|
|
383
|
-
return
|
|
383
|
+
return r.day(o, {
|
|
384
384
|
width: "abbreviated",
|
|
385
385
|
context: "standalone"
|
|
386
386
|
});
|
|
387
387
|
// T
|
|
388
388
|
case "ccccc":
|
|
389
|
-
return
|
|
389
|
+
return r.day(o, {
|
|
390
390
|
width: "narrow",
|
|
391
391
|
context: "standalone"
|
|
392
392
|
});
|
|
393
393
|
// Tu
|
|
394
394
|
case "cccccc":
|
|
395
|
-
return
|
|
395
|
+
return r.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 r.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, r) {
|
|
410
|
+
const n = e.getDay(), o = n === 0 ? 7 : n;
|
|
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 s(o, t.length);
|
|
418
418
|
// 2nd
|
|
419
419
|
case "io":
|
|
420
|
-
return
|
|
420
|
+
return r.ordinalNumber(o, { unit: "day" });
|
|
421
421
|
// Tue
|
|
422
422
|
case "iii":
|
|
423
|
-
return
|
|
423
|
+
return r.day(n, {
|
|
424
424
|
width: "abbreviated",
|
|
425
425
|
context: "formatting"
|
|
426
426
|
});
|
|
427
427
|
// T
|
|
428
428
|
case "iiiii":
|
|
429
|
-
return
|
|
429
|
+
return r.day(n, {
|
|
430
430
|
width: "narrow",
|
|
431
431
|
context: "formatting"
|
|
432
432
|
});
|
|
433
433
|
// Tu
|
|
434
434
|
case "iiiiii":
|
|
435
|
-
return
|
|
435
|
+
return r.day(n, {
|
|
436
436
|
width: "short",
|
|
437
437
|
context: "formatting"
|
|
438
438
|
});
|
|
439
439
|
// Tuesday
|
|
440
440
|
case "iiii":
|
|
441
441
|
default:
|
|
442
|
-
return
|
|
442
|
+
return r.day(n, {
|
|
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, r) {
|
|
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 r.dayPeriod(o, {
|
|
455
455
|
width: "abbreviated",
|
|
456
456
|
context: "formatting"
|
|
457
457
|
});
|
|
458
458
|
case "aaa":
|
|
459
|
-
return
|
|
459
|
+
return r.dayPeriod(o, {
|
|
460
460
|
width: "abbreviated",
|
|
461
461
|
context: "formatting"
|
|
462
462
|
}).toLowerCase();
|
|
463
463
|
case "aaaaa":
|
|
464
|
-
return
|
|
464
|
+
return r.dayPeriod(o, {
|
|
465
465
|
width: "narrow",
|
|
466
466
|
context: "formatting"
|
|
467
467
|
});
|
|
468
468
|
case "aaaa":
|
|
469
469
|
default:
|
|
470
|
-
return
|
|
470
|
+
return r.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, r) {
|
|
478
|
+
const n = e.getHours();
|
|
479
479
|
let o;
|
|
480
|
-
switch (
|
|
480
|
+
switch (n === 12 ? o = T.noon : n === 0 ? o = T.midnight : o = n / 12 >= 1 ? "pm" : "am", t) {
|
|
481
481
|
case "b":
|
|
482
482
|
case "bb":
|
|
483
|
-
return
|
|
483
|
+
return r.dayPeriod(o, {
|
|
484
484
|
width: "abbreviated",
|
|
485
485
|
context: "formatting"
|
|
486
486
|
});
|
|
487
487
|
case "bbb":
|
|
488
|
-
return
|
|
488
|
+
return r.dayPeriod(o, {
|
|
489
489
|
width: "abbreviated",
|
|
490
490
|
context: "formatting"
|
|
491
491
|
}).toLowerCase();
|
|
492
492
|
case "bbbbb":
|
|
493
|
-
return
|
|
493
|
+
return r.dayPeriod(o, {
|
|
494
494
|
width: "narrow",
|
|
495
495
|
context: "formatting"
|
|
496
496
|
});
|
|
497
497
|
case "bbbb":
|
|
498
498
|
default:
|
|
499
|
-
return
|
|
499
|
+
return r.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, r) {
|
|
507
|
+
const n = e.getHours();
|
|
508
508
|
let o;
|
|
509
|
-
switch (
|
|
509
|
+
switch (n >= 17 ? o = T.evening : n >= 12 ? o = T.afternoon : n >= 4 ? o = T.morning : o = T.night, t) {
|
|
510
510
|
case "B":
|
|
511
511
|
case "BB":
|
|
512
512
|
case "BBB":
|
|
513
|
-
return
|
|
513
|
+
return r.dayPeriod(o, {
|
|
514
514
|
width: "abbreviated",
|
|
515
515
|
context: "formatting"
|
|
516
516
|
});
|
|
517
517
|
case "BBBBB":
|
|
518
|
-
return
|
|
518
|
+
return r.dayPeriod(o, {
|
|
519
519
|
width: "narrow",
|
|
520
520
|
context: "formatting"
|
|
521
521
|
});
|
|
522
522
|
case "BBBB":
|
|
523
523
|
default:
|
|
524
|
-
return
|
|
524
|
+
return r.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, r) {
|
|
532
532
|
if (t === "ho") {
|
|
533
|
-
let
|
|
534
|
-
return
|
|
533
|
+
let n = e.getHours() % 12;
|
|
534
|
+
return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return y.h(e, t);
|
|
537
537
|
},
|
|
538
538
|
// Hour [0-23]
|
|
539
|
-
H: function(e, t,
|
|
540
|
-
return t === "Ho" ?
|
|
539
|
+
H: function(e, t, r) {
|
|
540
|
+
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : y.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, r) {
|
|
544
|
+
const n = e.getHours() % 12;
|
|
545
|
+
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : s(n, t.length);
|
|
546
546
|
},
|
|
547
547
|
// Hour [1-24]
|
|
548
|
-
k: function(e, t,
|
|
549
|
-
let
|
|
550
|
-
return
|
|
548
|
+
k: function(e, t, r) {
|
|
549
|
+
let n = e.getHours();
|
|
550
|
+
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : s(n, t.length);
|
|
551
551
|
},
|
|
552
552
|
// Minute
|
|
553
|
-
m: function(e, t,
|
|
554
|
-
return t === "mo" ?
|
|
553
|
+
m: function(e, t, r) {
|
|
554
|
+
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : y.m(e, t);
|
|
555
555
|
},
|
|
556
556
|
// Second
|
|
557
|
-
s: function(e, t,
|
|
558
|
-
return t === "so" ?
|
|
557
|
+
s: function(e, t, r) {
|
|
558
|
+
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : y.s(e, t);
|
|
559
559
|
},
|
|
560
560
|
// Fraction of second
|
|
561
561
|
S: function(e, t) {
|
|
562
|
-
return
|
|
562
|
+
return y.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, r) {
|
|
566
|
+
const n = e.getTimezoneOffset();
|
|
567
|
+
if (n === 0)
|
|
568
568
|
return "Z";
|
|
569
569
|
switch (t) {
|
|
570
570
|
// Hours and optional minutes
|
|
571
571
|
case "X":
|
|
572
|
-
return
|
|
572
|
+
return I(n);
|
|
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 R(n);
|
|
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 h = {
|
|
|
583
583
|
case "XXX":
|
|
584
584
|
// Hours and minutes with `:` delimiter
|
|
585
585
|
default:
|
|
586
|
-
return
|
|
586
|
+
return R(n, ":");
|
|
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, r) {
|
|
591
|
+
const n = e.getTimezoneOffset();
|
|
592
592
|
switch (t) {
|
|
593
593
|
// Hours and optional minutes
|
|
594
594
|
case "x":
|
|
595
|
-
return
|
|
595
|
+
return I(n);
|
|
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 R(n);
|
|
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 h = {
|
|
|
606
606
|
case "xxx":
|
|
607
607
|
// Hours and minutes with `:` delimiter
|
|
608
608
|
default:
|
|
609
|
-
return
|
|
609
|
+
return R(n, ":");
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
// Timezone (GMT)
|
|
613
|
-
O: function(e, t,
|
|
614
|
-
const
|
|
613
|
+
O: function(e, t, r) {
|
|
614
|
+
const n = 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" + N(n, ":");
|
|
621
621
|
// Long
|
|
622
622
|
case "OOOO":
|
|
623
623
|
default:
|
|
624
|
-
return "GMT" +
|
|
624
|
+
return "GMT" + R(n, ":");
|
|
625
625
|
}
|
|
626
626
|
},
|
|
627
627
|
// Timezone (specific non-location)
|
|
628
|
-
z: function(e, t,
|
|
629
|
-
const
|
|
628
|
+
z: function(e, t, r) {
|
|
629
|
+
const n = 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" + N(n, ":");
|
|
636
636
|
// Long
|
|
637
637
|
case "zzzz":
|
|
638
638
|
default:
|
|
639
|
-
return "GMT" +
|
|
639
|
+
return "GMT" + R(n, ":");
|
|
640
640
|
}
|
|
641
641
|
},
|
|
642
642
|
// Seconds timestamp
|
|
643
|
-
t: function(e, t,
|
|
644
|
-
const
|
|
645
|
-
return
|
|
643
|
+
t: function(e, t, r) {
|
|
644
|
+
const n = Math.trunc(+e / 1e3);
|
|
645
|
+
return s(n, t.length);
|
|
646
646
|
},
|
|
647
647
|
// Milliseconds timestamp
|
|
648
|
-
T: function(e, t,
|
|
649
|
-
return
|
|
648
|
+
T: function(e, t, r) {
|
|
649
|
+
return s(+e, t.length);
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
|
-
function
|
|
653
|
-
const
|
|
654
|
-
return i === 0 ?
|
|
652
|
+
function N(e, t = "") {
|
|
653
|
+
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), i = n % 60;
|
|
654
|
+
return i === 0 ? r + String(o) : r + String(o) + t + s(i, 2);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
656
|
+
function I(e, t) {
|
|
657
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + s(Math.abs(e) / 60, 2) : R(e, t);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
const
|
|
661
|
-
return
|
|
659
|
+
function R(e, t = "") {
|
|
660
|
+
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = s(Math.trunc(n / 60), 2), i = s(n % 60, 2);
|
|
661
|
+
return r + o + t + i;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function ue(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 fe(e) {
|
|
667
|
+
return !(!ue(e) && typeof e != "number" || isNaN(+x(e)));
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
function
|
|
671
|
-
const
|
|
672
|
-
if (!
|
|
669
|
+
const de = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, le = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, me = /^'([^]*?)'?$/, ge = /''/g, pe = /[a-zA-Z]/;
|
|
670
|
+
function M(e, t, r) {
|
|
671
|
+
const n = Z(), o = r?.locale ?? n.locale ?? K, i = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, u = x(e, r?.in);
|
|
672
|
+
if (!fe(u))
|
|
673
673
|
throw new RangeError("Invalid time value");
|
|
674
|
-
let
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
const
|
|
678
|
-
return
|
|
674
|
+
let c = t.match(le).map((d) => {
|
|
675
|
+
const l = d[0];
|
|
676
|
+
if (l === "p" || l === "P") {
|
|
677
|
+
const A = ee[l];
|
|
678
|
+
return A(d, o.formatLong);
|
|
679
679
|
}
|
|
680
|
-
return
|
|
681
|
-
}).join("").match(
|
|
682
|
-
if (
|
|
680
|
+
return d;
|
|
681
|
+
}).join("").match(de).map((d) => {
|
|
682
|
+
if (d === "''")
|
|
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 l = d[0];
|
|
685
|
+
if (l === "'")
|
|
686
|
+
return { isToken: !1, value: ye(d) };
|
|
687
|
+
if (L[l])
|
|
688
|
+
return { isToken: !0, value: d };
|
|
689
|
+
if (l.match(pe))
|
|
690
690
|
throw new RangeError(
|
|
691
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
691
|
+
"Format string contains an unescaped latin alphabet character `" + l + "`"
|
|
692
692
|
);
|
|
693
|
-
return { isToken: !1, value:
|
|
693
|
+
return { isToken: !1, value: d };
|
|
694
694
|
});
|
|
695
|
-
o.localize.preprocessor && (
|
|
696
|
-
const
|
|
695
|
+
o.localize.preprocessor && (c = o.localize.preprocessor(u, c));
|
|
696
|
+
const f = {
|
|
697
697
|
firstWeekContainsDate: i,
|
|
698
|
-
weekStartsOn:
|
|
698
|
+
weekStartsOn: a,
|
|
699
699
|
locale: o
|
|
700
700
|
};
|
|
701
|
-
return
|
|
702
|
-
if (!
|
|
703
|
-
const
|
|
704
|
-
(!
|
|
705
|
-
const
|
|
706
|
-
return
|
|
701
|
+
return c.map((d) => {
|
|
702
|
+
if (!d.isToken) return d.value;
|
|
703
|
+
const l = d.value;
|
|
704
|
+
(!r?.useAdditionalWeekYearTokens && te(l) || !r?.useAdditionalDayOfYearTokens && ne(l)) && re(l, t, String(e));
|
|
705
|
+
const A = L[l[0]];
|
|
706
|
+
return A(u, l, o.localize, f);
|
|
707
707
|
}).join("");
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
const t = e.match(
|
|
711
|
-
return t ? t[1].replace(
|
|
709
|
+
function ye(e) {
|
|
710
|
+
const t = e.match(me);
|
|
711
|
+
return t ? t[1].replace(ge, "'") : e;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
const
|
|
713
|
+
function S(e, t) {
|
|
714
|
+
const r = () => B(t?.in, NaN), o = Te(e);
|
|
715
715
|
let i;
|
|
716
716
|
if (o.date) {
|
|
717
|
-
const
|
|
718
|
-
i =
|
|
717
|
+
const f = De(o.date, 2);
|
|
718
|
+
i = we(f.restDateString, f.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 r();
|
|
721
|
+
const a = +i;
|
|
722
|
+
let u = 0, c;
|
|
723
|
+
if (o.time && (u = ve(o.time), isNaN(u)))
|
|
724
|
+
return r();
|
|
725
725
|
if (o.timezone) {
|
|
726
|
-
if (
|
|
726
|
+
if (c = be(o.timezone), isNaN(c)) return r();
|
|
727
727
|
} else {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
),
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
),
|
|
728
|
+
const f = new Date(a + u), d = x(0, t?.in);
|
|
729
|
+
return d.setFullYear(
|
|
730
|
+
f.getUTCFullYear(),
|
|
731
|
+
f.getUTCMonth(),
|
|
732
|
+
f.getUTCDate()
|
|
733
|
+
), d.setHours(
|
|
734
|
+
f.getUTCHours(),
|
|
735
|
+
f.getUTCMinutes(),
|
|
736
|
+
f.getUTCSeconds(),
|
|
737
|
+
f.getUTCMilliseconds()
|
|
738
|
+
), d;
|
|
739
739
|
}
|
|
740
|
-
return
|
|
740
|
+
return x(a + u + c, t?.in);
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const w = {
|
|
743
743
|
dateTimeDelimiter: /[T ]/,
|
|
744
744
|
timeZoneDelimiter: /[Z ]/i,
|
|
745
745
|
timezone: /([Z+-].*)$/
|
|
746
|
-
},
|
|
747
|
-
function
|
|
748
|
-
const t = {},
|
|
749
|
-
let
|
|
750
|
-
if (
|
|
746
|
+
}, he = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Re = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, xe = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
747
|
+
function Te(e) {
|
|
748
|
+
const t = {}, r = e.split(w.dateTimeDelimiter);
|
|
749
|
+
let n;
|
|
750
|
+
if (r.length > 2)
|
|
751
751
|
return t;
|
|
752
|
-
if (/:/.test(
|
|
752
|
+
if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], w.timeZoneDelimiter.test(t.date) && (t.date = e.split(w.timeZoneDelimiter)[0], n = e.substr(
|
|
753
753
|
t.date.length,
|
|
754
754
|
e.length
|
|
755
|
-
))),
|
|
756
|
-
const o =
|
|
757
|
-
o ? (t.time =
|
|
755
|
+
))), n) {
|
|
756
|
+
const o = w.timezone.exec(n);
|
|
757
|
+
o ? (t.time = n.replace(o[1], ""), t.timezone = o[1]) : t.time = n;
|
|
758
758
|
}
|
|
759
759
|
return t;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
761
|
+
function De(e, t) {
|
|
762
|
+
const r = new RegExp(
|
|
763
763
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
|
|
764
|
-
),
|
|
765
|
-
if (!
|
|
766
|
-
const o =
|
|
764
|
+
), n = e.match(r);
|
|
765
|
+
if (!n) return { year: NaN, restDateString: "" };
|
|
766
|
+
const o = n[1] ? parseInt(n[1]) : null, i = n[2] ? parseInt(n[2]) : null;
|
|
767
767
|
return {
|
|
768
768
|
year: i === null ? o : i * 100,
|
|
769
|
-
restDateString: e.slice((
|
|
769
|
+
restDateString: e.slice((n[1] || n[2]).length)
|
|
770
770
|
};
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function we(e, t) {
|
|
773
773
|
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
774
|
-
const
|
|
775
|
-
if (!
|
|
776
|
-
const
|
|
777
|
-
if (
|
|
778
|
-
return
|
|
774
|
+
const r = e.match(he);
|
|
775
|
+
if (!r) return /* @__PURE__ */ new Date(NaN);
|
|
776
|
+
const n = !!r[4], o = D(r[1]), i = D(r[2]) - 1, a = D(r[3]), u = D(r[4]), c = D(r[5]) - 1;
|
|
777
|
+
if (n)
|
|
778
|
+
return Ce(t, u, c) ? Se(t, u, c) : /* @__PURE__ */ new Date(NaN);
|
|
779
779
|
{
|
|
780
|
-
const
|
|
781
|
-
return !
|
|
780
|
+
const f = /* @__PURE__ */ new Date(0);
|
|
781
|
+
return !Ee(t, i, a) || !Oe(t, o) ? /* @__PURE__ */ new Date(NaN) : (f.setUTCFullYear(t, i, Math.max(o, a)), f);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function D(e) {
|
|
785
785
|
return e ? parseInt(e) : 1;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
const t = e.match(
|
|
787
|
+
function ve(e) {
|
|
788
|
+
const t = e.match(Re);
|
|
789
789
|
if (!t) return NaN;
|
|
790
|
-
const
|
|
791
|
-
return
|
|
790
|
+
const r = E(t[1]), n = E(t[2]), o = E(t[3]);
|
|
791
|
+
return Me(r, n, o) ? r * U + n * k + o * 1e3 : NaN;
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function E(e) {
|
|
794
794
|
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function be(e) {
|
|
797
797
|
if (e === "Z") return 0;
|
|
798
|
-
const t = e.match(
|
|
798
|
+
const t = e.match(xe);
|
|
799
799
|
if (!t) return 0;
|
|
800
|
-
const
|
|
801
|
-
return
|
|
800
|
+
const r = t[1] === "+" ? -1 : 1, n = parseInt(t[2]), o = t[3] && parseInt(t[3]) || 0;
|
|
801
|
+
return _e(n, o) ? r * (n * U + o * k) : NaN;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
const o =
|
|
807
|
-
return
|
|
803
|
+
function Se(e, t, r) {
|
|
804
|
+
const n = /* @__PURE__ */ new Date(0);
|
|
805
|
+
n.setUTCFullYear(e, 0, 4);
|
|
806
|
+
const o = n.getUTCDay() || 7, i = (t - 1) * 7 + r + 1 - o;
|
|
807
|
+
return n.setUTCDate(n.getUTCDate() + i), n;
|
|
808
808
|
}
|
|
809
|
-
const
|
|
810
|
-
function
|
|
809
|
+
const Ae = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
810
|
+
function q(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 Ee(e, t, r) {
|
|
814
|
+
return t >= 0 && t <= 11 && r >= 1 && r <= (Ae[t] || (q(e) ? 29 : 28));
|
|
815
815
|
}
|
|
816
816
|
function Oe(e, t) {
|
|
817
|
-
return t >= 1 && t <= (
|
|
817
|
+
return t >= 1 && t <= (q(e) ? 366 : 365);
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
return t >= 1 && t <= 53 &&
|
|
819
|
+
function Ce(e, t, r) {
|
|
820
|
+
return t >= 1 && t <= 53 && r >= 0 && r <= 6;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
return e === 24 ? t === 0 &&
|
|
822
|
+
function Me(e, t, r) {
|
|
823
|
+
return e === 24 ? t === 0 && r === 0 : r >= 0 && r < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function _e(e, t) {
|
|
826
826
|
return t >= 0 && t <= 59;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Pe = Date.prototype.toJSON, Le = 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(), r = this.getSeconds(), n = this.getMilliseconds(), o = -(this.getTimezoneOffset() / 60);
|
|
831
|
+
if (o === 0.15 && e === 0 && t === 9 && r === 21 || e - o === 0 && t === 0 && r === 0 && n === 0)
|
|
832
832
|
return this.toISOString().split("T")[0];
|
|
833
833
|
const i = new Date(
|
|
834
834
|
this.getFullYear(),
|
|
@@ -836,77 +836,244 @@ const Me = Date.prototype.toJSON, _e = function() {
|
|
|
836
836
|
this.getDate(),
|
|
837
837
|
e,
|
|
838
838
|
t,
|
|
839
|
-
|
|
840
|
-
|
|
839
|
+
r,
|
|
840
|
+
n
|
|
841
841
|
);
|
|
842
842
|
i.setHours(this.getHours() + o);
|
|
843
|
-
const
|
|
844
|
-
return
|
|
843
|
+
const a = i.toISOString().replace(/(\.0+)?Z$/, ""), u = o >= 0 ? "+" : "-", c = Math.abs(o) < 10 ? "0" : "";
|
|
844
|
+
return a + u + c + Math.abs(o).toString().split(".")[0] + ":00";
|
|
845
845
|
} catch {
|
|
846
|
-
Date.prototype.toJSON =
|
|
846
|
+
Date.prototype.toJSON = Pe;
|
|
847
847
|
const t = this.toJSON();
|
|
848
|
-
return Date.prototype.toJSON =
|
|
848
|
+
return Date.prototype.toJSON = Le, t;
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, Ve = new Intl.DateTimeFormat("fr-FR", {
|
|
851
851
|
day: "numeric",
|
|
852
852
|
month: "long",
|
|
853
853
|
weekday: "long",
|
|
854
854
|
year: "numeric"
|
|
855
|
-
}),
|
|
855
|
+
}), Ne = new Intl.DateTimeFormat("fr-FR", {
|
|
856
856
|
day: "numeric",
|
|
857
857
|
month: "short"
|
|
858
|
-
}),
|
|
858
|
+
}), Ie = 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 ze(e, t) {
|
|
863
|
+
return e instanceof Date ? e : typeof e == "string" ? S(e) : t;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
return
|
|
865
|
+
function Je(e) {
|
|
866
|
+
return oe(e, "yyyy-MM-ddXXX", /* @__PURE__ */ new Date());
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
const t =
|
|
870
|
-
return e =
|
|
868
|
+
function Ze(e) {
|
|
869
|
+
const t = S(e);
|
|
870
|
+
return e = M(t, "EEEE d LLLL yyyy H'h'mm", { locale: C }), 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 Ke(e, t) {
|
|
873
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate() ? Ie.format(e) : Ne.format(e);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
const t = e instanceof Date ? e :
|
|
877
|
-
let
|
|
878
|
-
return
|
|
875
|
+
function et(e) {
|
|
876
|
+
const t = e instanceof Date ? e : S(e);
|
|
877
|
+
let r = M(t, "d LLLL yyyy H'h'mm", { locale: C });
|
|
878
|
+
return r.endsWith(" 0h00") && (r = r.substring(0, r.length - 5)), r;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
const t = e instanceof Date ? e :
|
|
882
|
-
return
|
|
880
|
+
function tt(e) {
|
|
881
|
+
const t = e instanceof Date ? e : S(e);
|
|
882
|
+
return M(t, "H'h'mm", { locale: C });
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function nt(e) {
|
|
885
885
|
return new Date(e.getTime() - e.getTimezoneOffset() * 6e4).toISOString().split("T")[0];
|
|
886
886
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
887
|
+
function rt(e) {
|
|
888
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
889
|
+
}
|
|
890
|
+
function g(e) {
|
|
891
|
+
return e.charAt(0).toLowerCase() + e.slice(1);
|
|
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));
|
|
892
1059
|
}
|
|
893
1060
|
if (t.organeByUid !== void 0 && e.organeRef !== void 0) {
|
|
894
|
-
const
|
|
895
|
-
|
|
1061
|
+
const n = t.organeByUid[e.organeRef];
|
|
1062
|
+
n !== void 0 && (e.organe = n, m(n, t, r));
|
|
896
1063
|
}
|
|
897
1064
|
if (t.organeByUid !== void 0 && e.provenanceRef !== void 0) {
|
|
898
|
-
const
|
|
899
|
-
|
|
1065
|
+
const n = t.organeByUid[e.provenanceRef];
|
|
1066
|
+
n !== void 0 && (e.provenance = n, m(n, t, r));
|
|
900
1067
|
}
|
|
901
1068
|
if (t.acteurByUid !== void 0 && e.rapporteurs !== void 0)
|
|
902
|
-
for (const
|
|
903
|
-
const o = t.acteurByUid[
|
|
904
|
-
o !== void 0 && (
|
|
1069
|
+
for (const n of e.rapporteurs) {
|
|
1070
|
+
const o = t.acteurByUid[n.acteurRef];
|
|
1071
|
+
o !== void 0 && (n.acteur = o, h(o, t, r));
|
|
905
1072
|
}
|
|
906
1073
|
if (t.reunionByUid !== void 0 && e.reunionRef !== void 0) {
|
|
907
|
-
const
|
|
908
|
-
if (
|
|
909
|
-
const o =
|
|
1074
|
+
const n = t.reunionByUid[e.reunionRef];
|
|
1075
|
+
if (n !== void 0 && (e.reunion = n, Fe(n, t, r), e.odjRef !== void 0)) {
|
|
1076
|
+
const o = n.odj;
|
|
910
1077
|
if (o !== void 0 && o.pointsOdj !== void 0) {
|
|
911
1078
|
for (const i of o.pointsOdj)
|
|
912
1079
|
if (i.uid === e.odjRef) {
|
|
@@ -917,305 +1084,533 @@ function I(e, t, n) {
|
|
|
917
1084
|
}
|
|
918
1085
|
}
|
|
919
1086
|
if (t.documentByUid !== void 0 && e.texteAdopteRef !== void 0) {
|
|
920
|
-
const
|
|
921
|
-
|
|
1087
|
+
const n = t.documentByUid[e.texteAdopteRef];
|
|
1088
|
+
n !== void 0 && (e.texteAdopte = n, v(n, t, r));
|
|
922
1089
|
}
|
|
923
1090
|
if (t.documentByUid !== void 0 && e.texteAssocieRef !== void 0) {
|
|
924
|
-
const
|
|
925
|
-
|
|
1091
|
+
const n = t.documentByUid[e.texteAssocieRef];
|
|
1092
|
+
n !== void 0 && (e.texteAssocie = n, v(n, t, r));
|
|
926
1093
|
}
|
|
927
1094
|
if (t.documentByUid !== void 0 && e.textesAssocies !== void 0)
|
|
928
|
-
for (const
|
|
929
|
-
const o = t.documentByUid[
|
|
930
|
-
o !== void 0 && (
|
|
1095
|
+
for (const n of e.textesAssocies) {
|
|
1096
|
+
const o = t.documentByUid[n.texteAssocieRef];
|
|
1097
|
+
o !== void 0 && (n.texteAssocie = o, v(o, t, r));
|
|
931
1098
|
}
|
|
932
1099
|
if (t.scrutinByUid !== void 0 && e.voteRefs !== void 0) {
|
|
933
|
-
const
|
|
1100
|
+
const n = [];
|
|
934
1101
|
for (const o of e.voteRefs) {
|
|
935
1102
|
const i = t.scrutinByUid[o];
|
|
936
|
-
i !== void 0 && (
|
|
1103
|
+
i !== void 0 && (n.push(i), qe(i, t, r));
|
|
937
1104
|
}
|
|
938
|
-
e.votes =
|
|
1105
|
+
e.votes = n;
|
|
939
1106
|
}
|
|
940
|
-
for (const
|
|
941
|
-
|
|
1107
|
+
for (const n of e.actesLegislatifs || [])
|
|
1108
|
+
W(n, t, r);
|
|
942
1109
|
}
|
|
943
1110
|
return e;
|
|
944
1111
|
}
|
|
945
|
-
function
|
|
946
|
-
if (!
|
|
947
|
-
for (const
|
|
1112
|
+
function h(e, t, r) {
|
|
1113
|
+
if (!r.has(e.uid) && (r.add(e.uid), t.organeByUid !== void 0))
|
|
1114
|
+
for (const n of e.mandats || []) {
|
|
948
1115
|
const o = [];
|
|
949
|
-
for (const i of
|
|
950
|
-
const
|
|
951
|
-
|
|
1116
|
+
for (const i of n.organesRefs) {
|
|
1117
|
+
const a = t.organeByUid[i];
|
|
1118
|
+
a !== void 0 && (o.push(a), m(a, t, r));
|
|
952
1119
|
}
|
|
953
|
-
|
|
1120
|
+
n.organes = o;
|
|
954
1121
|
}
|
|
955
1122
|
return e;
|
|
956
1123
|
}
|
|
957
|
-
function
|
|
958
|
-
if (!
|
|
959
|
-
|
|
960
|
-
const
|
|
1124
|
+
function at(e, t, r) {
|
|
1125
|
+
if (!r.has(e.uid)) {
|
|
1126
|
+
r.add(e.uid);
|
|
1127
|
+
const n = e.signataires, o = n.auteur;
|
|
961
1128
|
if (t.acteurByUid !== void 0 && o.acteurRef !== void 0) {
|
|
962
1129
|
const i = t.acteurByUid[o.acteurRef];
|
|
963
|
-
i !== void 0 && (o.acteur = i,
|
|
1130
|
+
i !== void 0 && (o.acteur = i, h(i, t, r));
|
|
964
1131
|
}
|
|
965
1132
|
if (t.organeByUid !== void 0 && o.auteurRapporteurOrganeRef !== void 0) {
|
|
966
1133
|
const i = t.organeByUid[o.auteurRapporteurOrganeRef];
|
|
967
|
-
i !== void 0 && (o.auteurRapporteurOrgane = i,
|
|
1134
|
+
i !== void 0 && (o.auteurRapporteurOrgane = i, m(i, t, r));
|
|
968
1135
|
}
|
|
969
1136
|
if (t.organeByUid !== void 0 && o.gouvernementRef !== void 0) {
|
|
970
1137
|
const i = t.organeByUid[o.gouvernementRef];
|
|
971
|
-
i !== void 0 && (o.gouvernement = i,
|
|
1138
|
+
i !== void 0 && (o.gouvernement = i, m(i, t, r));
|
|
972
1139
|
}
|
|
973
1140
|
if (t.organeByUid !== void 0 && o.groupePolitiqueRef !== void 0) {
|
|
974
1141
|
const i = t.organeByUid[o.groupePolitiqueRef];
|
|
975
|
-
i !== void 0 && (o.groupePolitique = i,
|
|
1142
|
+
i !== void 0 && (o.groupePolitique = i, m(i, t, r));
|
|
976
1143
|
}
|
|
977
|
-
if (t.acteurByUid !== void 0 &&
|
|
978
|
-
const
|
|
979
|
-
for (const
|
|
980
|
-
const
|
|
981
|
-
|
|
1144
|
+
if (t.acteurByUid !== void 0 && n.cosignatairesRefs !== void 0) {
|
|
1145
|
+
const a = [];
|
|
1146
|
+
for (const u of n.cosignatairesRefs || []) {
|
|
1147
|
+
const c = t.acteurByUid[u];
|
|
1148
|
+
c !== void 0 && (a.push(c), h(c, t, r));
|
|
982
1149
|
}
|
|
983
|
-
|
|
1150
|
+
n.cosignataires = a;
|
|
984
1151
|
}
|
|
985
1152
|
}
|
|
986
1153
|
return e;
|
|
987
1154
|
}
|
|
988
|
-
function
|
|
989
|
-
for (const
|
|
990
|
-
const o =
|
|
1155
|
+
function H(e, t, r) {
|
|
1156
|
+
for (const n of e.auteurs) {
|
|
1157
|
+
const o = n.acteur;
|
|
991
1158
|
if (t.acteurByUid !== void 0 && o !== void 0) {
|
|
992
1159
|
const i = t.acteurByUid[o.acteurRef];
|
|
993
|
-
i !== void 0 && (o.acteur = i,
|
|
1160
|
+
i !== void 0 && (o.acteur = i, h(i, t, r));
|
|
994
1161
|
}
|
|
995
|
-
if (t.organeByUid !== void 0 &&
|
|
996
|
-
const i = t.organeByUid[
|
|
997
|
-
i !== void 0 && (
|
|
1162
|
+
if (t.organeByUid !== void 0 && n.organeRef !== void 0) {
|
|
1163
|
+
const i = t.organeByUid[n.organeRef];
|
|
1164
|
+
i !== void 0 && (n.organe = i, m(i, t, r));
|
|
998
1165
|
}
|
|
999
1166
|
}
|
|
1000
1167
|
if (t.dossierByUid !== void 0) {
|
|
1001
|
-
const
|
|
1002
|
-
|
|
1168
|
+
const n = t.dossierByUid[e.dossierRef];
|
|
1169
|
+
n !== void 0 && (e.dossier = n, G(n, t, r));
|
|
1003
1170
|
}
|
|
1004
|
-
for (const
|
|
1005
|
-
|
|
1171
|
+
for (const n of e.divisions || [])
|
|
1172
|
+
H(n, t, r);
|
|
1006
1173
|
return e;
|
|
1007
1174
|
}
|
|
1008
|
-
function
|
|
1009
|
-
if (!
|
|
1010
|
-
|
|
1011
|
-
for (const
|
|
1012
|
-
const o =
|
|
1175
|
+
function v(e, t, r) {
|
|
1176
|
+
if (!r.has(e.uid)) {
|
|
1177
|
+
r.add(e.uid);
|
|
1178
|
+
for (const n of e.auteurs) {
|
|
1179
|
+
const o = n.acteur;
|
|
1013
1180
|
if (t.acteurByUid !== void 0 && o !== void 0) {
|
|
1014
1181
|
const i = t.acteurByUid[o.acteurRef];
|
|
1015
|
-
i !== void 0 && (o.acteur = i,
|
|
1182
|
+
i !== void 0 && (o.acteur = i, h(i, t, r));
|
|
1016
1183
|
}
|
|
1017
|
-
if (t.organeByUid !== void 0 &&
|
|
1018
|
-
const i = t.organeByUid[
|
|
1019
|
-
i !== void 0 && (
|
|
1184
|
+
if (t.organeByUid !== void 0 && n.organeRef !== void 0) {
|
|
1185
|
+
const i = t.organeByUid[n.organeRef];
|
|
1186
|
+
i !== void 0 && (n.organe = i, m(i, t, r));
|
|
1020
1187
|
}
|
|
1021
1188
|
}
|
|
1022
1189
|
if (t.dossierByUid !== void 0) {
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1190
|
+
const n = t.dossierByUid[e.dossierRef];
|
|
1191
|
+
n !== void 0 && (e.dossier = n, G(n, t, r));
|
|
1025
1192
|
}
|
|
1026
|
-
for (const
|
|
1027
|
-
|
|
1193
|
+
for (const n of e.divisions || [])
|
|
1194
|
+
H(n, t, r);
|
|
1028
1195
|
}
|
|
1029
1196
|
return e;
|
|
1030
1197
|
}
|
|
1031
|
-
function
|
|
1032
|
-
if (!
|
|
1033
|
-
|
|
1198
|
+
function G(e, t, r) {
|
|
1199
|
+
if (!r.has(e.uid)) {
|
|
1200
|
+
r.add(e.uid);
|
|
1034
1201
|
for (const o of e.actesLegislatifs ?? [])
|
|
1035
|
-
|
|
1036
|
-
const
|
|
1037
|
-
if (
|
|
1202
|
+
W(o, t, r);
|
|
1203
|
+
const n = e.initiateur;
|
|
1204
|
+
if (n !== void 0) {
|
|
1038
1205
|
if (t.acteurByUid !== void 0)
|
|
1039
|
-
for (const o of
|
|
1206
|
+
for (const o of n.acteurs || []) {
|
|
1040
1207
|
const i = t.acteurByUid[o.acteurRef];
|
|
1041
|
-
if (i !== void 0 && (o.acteur = i,
|
|
1042
|
-
for (const
|
|
1043
|
-
if (
|
|
1044
|
-
o.mandat =
|
|
1208
|
+
if (i !== void 0 && (o.acteur = i, h(i, t, r)), i !== void 0 && o.mandatRef !== void 0) {
|
|
1209
|
+
for (const a of i.mandats || [])
|
|
1210
|
+
if (a.uid === o.mandatRef) {
|
|
1211
|
+
o.mandat = a;
|
|
1045
1212
|
break;
|
|
1046
1213
|
}
|
|
1047
1214
|
}
|
|
1048
1215
|
}
|
|
1049
|
-
if (t.organeByUid !== void 0 &&
|
|
1050
|
-
const o = t.organeByUid[
|
|
1051
|
-
o !== void 0 && (
|
|
1216
|
+
if (t.organeByUid !== void 0 && n.organeRef !== void 0) {
|
|
1217
|
+
const o = t.organeByUid[n.organeRef];
|
|
1218
|
+
o !== void 0 && (n.organe = o, m(o, t, r));
|
|
1052
1219
|
}
|
|
1053
1220
|
}
|
|
1054
1221
|
}
|
|
1055
1222
|
return e;
|
|
1056
1223
|
}
|
|
1057
|
-
function
|
|
1058
|
-
if (!
|
|
1059
|
-
if (
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1224
|
+
function m(e, t, r) {
|
|
1225
|
+
if (!r.has(e.uid)) {
|
|
1226
|
+
if (r.add(e.uid), t.organeByUid !== void 0 && e.organeParentRef !== void 0) {
|
|
1227
|
+
const n = t.organeByUid[e.organeParentRef];
|
|
1228
|
+
n !== void 0 && (e.organeParent = n, m(n, t, r));
|
|
1062
1229
|
}
|
|
1063
1230
|
if (t.organeByUid !== void 0 && e.organePrecedentRef !== void 0) {
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1231
|
+
const n = t.organeByUid[e.organePrecedentRef];
|
|
1232
|
+
n !== void 0 && (e.organePrecedent = n, m(n, t, r));
|
|
1066
1233
|
}
|
|
1067
1234
|
}
|
|
1068
1235
|
return e;
|
|
1069
1236
|
}
|
|
1070
|
-
function
|
|
1071
|
-
if (!
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
if (
|
|
1237
|
+
function Fe(e, t, r) {
|
|
1238
|
+
if (!r.has(e.uid)) {
|
|
1239
|
+
r.add(e.uid);
|
|
1240
|
+
const n = e.demandeurs;
|
|
1241
|
+
if (n !== void 0) {
|
|
1075
1242
|
if (t.acteurByUid !== void 0)
|
|
1076
|
-
for (const o of
|
|
1243
|
+
for (const o of n.acteurs || []) {
|
|
1077
1244
|
const i = t.acteurByUid[o.acteurRef];
|
|
1078
|
-
i !== void 0 && (o.acteur = i,
|
|
1245
|
+
i !== void 0 && (o.acteur = i, h(i, t, r));
|
|
1079
1246
|
}
|
|
1080
1247
|
if (t.organeByUid !== void 0) {
|
|
1081
|
-
const o =
|
|
1248
|
+
const o = n.organe;
|
|
1082
1249
|
if (o !== void 0) {
|
|
1083
1250
|
const i = t.organeByUid[o.organeRef];
|
|
1084
|
-
i !== void 0 && (o.organe = i,
|
|
1251
|
+
i !== void 0 && (o.organe = i, m(i, t, r));
|
|
1085
1252
|
}
|
|
1086
1253
|
}
|
|
1087
1254
|
}
|
|
1088
1255
|
if (t.organeByUid !== void 0 && e.organeReuniRef !== void 0) {
|
|
1089
1256
|
const o = t.organeByUid[e.organeReuniRef];
|
|
1090
|
-
o !== void 0 && (e.organeReuni = o,
|
|
1257
|
+
o !== void 0 && (e.organeReuni = o, m(o, t, r));
|
|
1091
1258
|
}
|
|
1092
1259
|
if (t.acteurByUid !== void 0) {
|
|
1093
1260
|
const o = e.participants;
|
|
1094
1261
|
if (o !== void 0)
|
|
1095
1262
|
for (const i of o.participantsInternes || []) {
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1263
|
+
const a = t.acteurByUid[i.acteurRef];
|
|
1264
|
+
a !== void 0 && (i.acteur = a, h(a, t, r));
|
|
1098
1265
|
}
|
|
1099
1266
|
}
|
|
1100
1267
|
}
|
|
1101
1268
|
return e;
|
|
1102
1269
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return
|
|
1270
|
+
function qe(e, t, r) {
|
|
1271
|
+
return r.has(e.uid) || r.add(e.uid), e;
|
|
1105
1272
|
}
|
|
1106
|
-
function
|
|
1273
|
+
function st(e) {
|
|
1107
1274
|
if (e == null)
|
|
1108
1275
|
return "Organe inconnu";
|
|
1109
1276
|
switch (e.codeType) {
|
|
1110
|
-
case
|
|
1277
|
+
case O.Cmp:
|
|
1111
1278
|
return "Commission mixte paritaire";
|
|
1112
|
-
case
|
|
1279
|
+
case O.Gouvernement:
|
|
1113
1280
|
return e.libelle;
|
|
1114
1281
|
default:
|
|
1115
1282
|
return e.libelleAbrege;
|
|
1116
1283
|
}
|
|
1117
1284
|
}
|
|
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
|
+
}
|
|
1118
1513
|
export {
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1514
|
+
fn as AccordGouvernementDepotHorsDelai,
|
|
1515
|
+
dn as Action,
|
|
1516
|
+
ln as AmendementsConvert,
|
|
1517
|
+
mn as AvantAApres,
|
|
1518
|
+
mt as Cause,
|
|
1519
|
+
gt as CausePositionVote,
|
|
1520
|
+
pt as Civ,
|
|
1521
|
+
yt as CodeActe,
|
|
1522
|
+
gn as CodeEtat,
|
|
1523
|
+
ht as CodeNatureDep,
|
|
1524
|
+
Rt as CodeSortScrutin,
|
|
1525
|
+
O as CodeTypeOrgane,
|
|
1526
|
+
xt as CodeTypeVote,
|
|
1527
|
+
Tt as Decision,
|
|
1528
|
+
pn as DivisionType,
|
|
1529
|
+
Dt as DocumentDenominationStructurelle,
|
|
1530
|
+
je as DocumentUrlFormat,
|
|
1531
|
+
wt as DossierParlementaireXsiType,
|
|
1532
|
+
yn as EtatAmendementCode,
|
|
1138
1533
|
hn as EtatAmendementLibelle,
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1534
|
+
vt as EtatCycleDeVie,
|
|
1535
|
+
Y as Facet,
|
|
1536
|
+
bt as FamSocPro,
|
|
1537
|
+
Be as FinalStatus,
|
|
1538
|
+
F as Follow,
|
|
1539
|
+
St as FormatReunion,
|
|
1540
|
+
At as Legislature,
|
|
1541
|
+
Et as LibelleSortScrutin,
|
|
1542
|
+
Ot as LibelleTypeVote,
|
|
1543
|
+
Ct as LieuVote,
|
|
1544
|
+
Mt as ModePublicationDesVotes,
|
|
1545
|
+
_t as Motif,
|
|
1546
|
+
Pt as NatureTravauxOdj,
|
|
1547
|
+
Lt as PersonneAuditionneeXsiType,
|
|
1548
|
+
Nt as PointOdjXsiType,
|
|
1549
|
+
It as PositionMajoritaire,
|
|
1550
|
+
Bt as PositionPolitique,
|
|
1551
|
+
Ut as Presence,
|
|
1552
|
+
kt as Procedure,
|
|
1553
|
+
Yt as Provenance,
|
|
1554
|
+
Ft as Qualite,
|
|
1555
|
+
qt as Quantieme,
|
|
1556
|
+
jt as Regime,
|
|
1557
|
+
$t as RegionType,
|
|
1558
|
+
Wt as ReunionXsiType,
|
|
1559
|
+
Rn as SortAmendement,
|
|
1560
|
+
Ue as StatusOnly,
|
|
1561
|
+
Ht as StatutAdoption,
|
|
1562
|
+
Gt as TexteExterneAssocieTypeDoc,
|
|
1563
|
+
Qt as TypeActeLegislatif,
|
|
1564
|
+
xn as TypeAuteur,
|
|
1565
|
+
Xt as TypeBudget,
|
|
1566
|
+
Vt as TypeCorrection,
|
|
1567
|
+
zt as TypeDocument,
|
|
1568
|
+
Jt as TypeJo,
|
|
1569
|
+
Zt as TypeJoQuestion,
|
|
1570
|
+
Kt as TypeMajorite,
|
|
1571
|
+
en as TypeMandat,
|
|
1572
|
+
Tn as TypeMimeNom,
|
|
1178
1573
|
Dn as TypeMimeType,
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1574
|
+
tn as TypeMission,
|
|
1575
|
+
nn as TypeOrgane,
|
|
1576
|
+
rn as TypePointOdj,
|
|
1577
|
+
wn as TypePosition,
|
|
1578
|
+
on as TypeQuestion,
|
|
1579
|
+
an as TypeReunion,
|
|
1580
|
+
sn as TypeTexte,
|
|
1581
|
+
Qe as allFacets,
|
|
1582
|
+
Xe as allFollows,
|
|
1583
|
+
rt as capitalizeFirstLetter,
|
|
1584
|
+
ot as commissionFondUidFromDossier,
|
|
1585
|
+
ze as dateFromNullableDateOrIsoString,
|
|
1586
|
+
Je as dateFromYearMonthDayTimezoneString,
|
|
1587
|
+
Ze as displayDateFromLocalIsoString,
|
|
1588
|
+
Pe as existingDateToJson,
|
|
1589
|
+
Ke as formatRelativeFrenchTime,
|
|
1590
|
+
Ve as frenchDateFormat,
|
|
1591
|
+
Ne as frenchDateSameYearShortFormat,
|
|
1592
|
+
et as frenchDateWithoutDayOfWeekFromDateOrString,
|
|
1593
|
+
Ie as frenchTimeFormat,
|
|
1594
|
+
tt as frenchTimeFromDateOrString,
|
|
1595
|
+
h as insertActeurReferences,
|
|
1596
|
+
at as insertAmendementReferences,
|
|
1597
|
+
v as insertDocumentReferences,
|
|
1598
|
+
G as insertDossierReferences,
|
|
1599
|
+
m as insertOrganeReferences,
|
|
1600
|
+
Fe as insertReunionReferences,
|
|
1601
|
+
qe as insertScrutinReferences,
|
|
1602
|
+
ct as iterDocumentOrDivisionUrls,
|
|
1603
|
+
nt as localIso8601StringFromDate,
|
|
1604
|
+
Le as patchedDateToJson,
|
|
1605
|
+
cn as pathFromDocumentUid,
|
|
1606
|
+
st as shortNameFromOrgane,
|
|
1607
|
+
ke as stateFromActePath,
|
|
1608
|
+
j as stateFromActes,
|
|
1609
|
+
it as stateFromDossier,
|
|
1610
|
+
p as statusFromCodierLibelle,
|
|
1611
|
+
g as uncapitalizeFirstLetter,
|
|
1612
|
+
ut as urlFromDocument,
|
|
1613
|
+
ft as urlFromScrutin,
|
|
1614
|
+
$ as walkActes,
|
|
1615
|
+
Ye as walkDocumentAndDivisions
|
|
1221
1616
|
};
|