@tricoteuses/tisseuse 0.20.0 → 0.21.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 +79 -0
- package/dist/{html-C07GdZ0O.js → html-jaUHsXKQ.js} +5810 -5370
- package/dist/index.js +126 -126
- package/dist/{resolver-4v_fWVor.js → resolver-CzmDH4S3.js} +138 -130
- package/dist/server-f-legi.js +73 -92
- package/dist/server.js +554 -516
- package/dist/src/lib/extractors/action_directives_cpu.test.d.ts +1 -0
- package/dist/src/lib/extractors/links.citation_scope.test.d.ts +1 -0
- package/dist/src/lib/extractors/portion_references_cpu.test.d.ts +1 -0
- package/dist/src/lib/extractors/references.d.ts +8 -8
- package/dist/src/lib/f_legi/resolver.d.ts +0 -2
- package/dist/src/lib/index.d.ts +1 -0
- package/dist/src/lib/legi/canutes_article_preload.test.d.ts +1 -0
- package/dist/src/lib/legi/canutes_candidates.test.d.ts +1 -0
- package/dist/src/lib/legi/canutes_resolver.d.ts +5 -4
- package/dist/src/lib/legi/canutes_resolver_cache.test.d.ts +1 -0
- package/dist/src/lib/legi/canutes_section_roots.test.d.ts +1 -0
- package/dist/src/lib/legi/canutes_sql.d.ts +4 -0
- package/dist/src/lib/legi/canutes_text_titles_cache.d.ts +24 -0
- package/dist/src/lib/legi/canutes_text_titles_cache.integration.test.d.ts +1 -0
- package/dist/src/lib/legi/canutes_titles_metrics.d.ts +13 -0
- package/dist/src/lib/legi/text_titles_infos.d.ts +1 -0
- package/dist/src/lib/linkers/html.d.ts +3 -3
- package/dist/src/lib/linkers/markdown.d.ts +2 -2
- package/dist/src/lib/server/akn_rendering.test.d.ts +1 -0
- package/dist/src/lib/server/bill_action_resolver_invariance.test.d.ts +1 -0
- package/dist/src/lib/server/bill_action_target_fixtures.d.ts +7 -0
- package/dist/src/lib/server/bill_citation_anaphora.test.d.ts +1 -0
- package/dist/src/lib/server/bill_comparison.d.ts +42 -0
- package/dist/src/lib/server/bill_comparison.test.d.ts +1 -0
- package/dist/src/lib/server/bill_target_scope.test.d.ts +1 -0
- package/dist/src/lib/server/canutes_legacy_candidates.d.ts +19 -0
- package/dist/src/lib/server/canutes_only_compatibility.test.d.ts +1 -0
- package/dist/src/lib/server/databases/canutes_text_titles_cache.d.ts +8 -0
- package/dist/src/lib/server/flegi_profiling.d.ts +14 -0
- package/dist/src/lib/server/flegi_profiling.test.d.ts +1 -0
- package/dist/src/lib/server/masquage-typesense.test.d.ts +1 -0
- package/dist/src/lib/server/masquage_typesense.d.ts +36 -0
- package/dist/src/lib/server/sql_profiling.d.ts +30 -0
- package/dist/src/lib/server/sql_profiling.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/action_words.d.ts +2 -0
- package/dist/src/lib/text_parsers/action_words.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/texts.d.ts +1 -0
- package/dist/src/scripts/compare_legi_bills.d.ts +1 -0
- package/dist/src/scripts/configure_postgres_legi_resolver.d.ts +1 -0
- package/dist/src/scripts/profile_canutes_bill.d.ts +1 -0
- package/dist/src/scripts/test_canutes_titles_cache.d.ts +1 -0
- package/dist/src/scripts/warm_canutes_text_titles_cache.d.ts +1 -0
- package/package.json +7 -1
package/dist/server-f-legi.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as e, i as t, o as n, r, t as i } from "./resolver-CzmDH4S3.js";
|
|
2
2
|
//#region src/lib/f_legi/resolver.ts
|
|
3
3
|
var a = [
|
|
4
4
|
"article_location_diffs",
|
|
@@ -41,14 +41,14 @@ var l = class extends i {
|
|
|
41
41
|
async getActiveArticlesByTextAndNum({ date: e, num: t, textId: n }) {
|
|
42
42
|
return t === void 0 ? [] : (await this.getActiveArticleRowsByNum(n, e, t)).get(t) ?? [];
|
|
43
43
|
}
|
|
44
|
-
async getDirectSectionChildren({ date:
|
|
45
|
-
let r = `${
|
|
44
|
+
async getDirectSectionChildren({ date: t, parentPath: n }) {
|
|
45
|
+
let r = `${n}\0${t}`, i = this.directSectionChildrenByParentAndDate.get(r);
|
|
46
46
|
if (i === void 0) {
|
|
47
|
-
let a = new
|
|
48
|
-
if (await a.time("preloadDirectSectionChildrenByRootPath", () => this.preloadDirectSectionChildrenByRootPath(
|
|
49
|
-
o = await a.time("getRootTextIdsFromTextId", () => this.getRootTextIdsFromTextId(
|
|
50
|
-
let
|
|
51
|
-
|
|
47
|
+
let a = new e("f_legi.getDirectSectionChildren"), o, s = !1;
|
|
48
|
+
if (await a.time("preloadDirectSectionChildrenByRootPath", () => this.preloadDirectSectionChildrenByRootPath(n, t)), i = this.directSectionChildrenByParentAndDate.get(r) ?? [], i.length === 0 && !n.includes(".")) {
|
|
49
|
+
o = await a.time("getRootTextIdsFromTextId", () => this.getRootTextIdsFromTextId(n));
|
|
50
|
+
let e = o;
|
|
51
|
+
e.length > 1 && (s = !0, i = await a.time("queryRootDirectSectionChildren", () => this.flegiDb`
|
|
52
52
|
SELECT
|
|
53
53
|
dernier_segment AS id,
|
|
54
54
|
chemin::text AS path,
|
|
@@ -57,11 +57,11 @@ var l = class extends i {
|
|
|
57
57
|
date_fin::text AS "dateFin"
|
|
58
58
|
FROM scta
|
|
59
59
|
WHERE
|
|
60
|
-
subltree(chemin, 0, 1) = ANY(${this.flegiDb.array(
|
|
60
|
+
subltree(chemin, 0, 1) = ANY(${this.flegiDb.array(e)}::ltree[])
|
|
61
61
|
AND nlevel(chemin) = 2
|
|
62
62
|
AND type_objet = 'scta'
|
|
63
|
-
AND date_debut <= ${
|
|
64
|
-
AND date_fin >= ${
|
|
63
|
+
AND date_debut <= ${t}::date
|
|
64
|
+
AND date_fin >= ${t}::date
|
|
65
65
|
ORDER BY tri_hierarchique
|
|
66
66
|
`, { count: o.length }));
|
|
67
67
|
}
|
|
@@ -69,7 +69,7 @@ var l = class extends i {
|
|
|
69
69
|
exactResultCount: o === void 0 ? i.length : 0,
|
|
70
70
|
fallbackResultCount: s ? i.length : void 0,
|
|
71
71
|
fallbackRootTextIdCount: o?.length,
|
|
72
|
-
parentPath:
|
|
72
|
+
parentPath: n,
|
|
73
73
|
resultCount: i.length,
|
|
74
74
|
usedFallbackQuery: s
|
|
75
75
|
}), this.directSectionChildrenByParentAndDate.set(r, i);
|
|
@@ -80,33 +80,33 @@ var l = class extends i {
|
|
|
80
80
|
let t = this.textIdBySegmentId.get(e);
|
|
81
81
|
return t === void 0 && (t = await this.getTextIdFromSegmentIdUsingContextHeuristic(e) ?? await this.getTextIdFromSegmentIdUsingSctaHeuristic(e) ?? null, this.textIdBySegmentId.set(e, t)), t ?? void 0;
|
|
82
82
|
}
|
|
83
|
-
async preloadTextTitlesInfos(
|
|
84
|
-
let
|
|
85
|
-
|
|
83
|
+
async preloadTextTitlesInfos(t = {}) {
|
|
84
|
+
let n = (e, n = {}) => {
|
|
85
|
+
t.onProgress?.({
|
|
86
86
|
...n,
|
|
87
|
-
phase:
|
|
87
|
+
phase: e,
|
|
88
88
|
resolver: "f_legi"
|
|
89
89
|
});
|
|
90
|
-
}, r = new
|
|
90
|
+
}, r = new e("f_legi.preloadTextTitlesInfos");
|
|
91
91
|
if (this.schemaValidationPromise ??= c(this.flegiDb).catch((e) => {
|
|
92
92
|
throw this.schemaValidationPromise = void 0, e;
|
|
93
93
|
}), await this.schemaValidationPromise, this.textTitlesInfosLoaded) {
|
|
94
94
|
let e = await this.getTextTitlesInfosParserCacheMeta(r);
|
|
95
95
|
if (e !== void 0 && e.formatVersion === 2 && e.generatedAt === o) {
|
|
96
|
-
|
|
96
|
+
n("already-loaded");
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
this.textTitlesInfosLoaded = !1;
|
|
100
100
|
}
|
|
101
101
|
s === void 0 ? s = (async () => await this.loadOrBuildTextTitlesInfosParserCache({
|
|
102
|
-
progress:
|
|
102
|
+
progress: n,
|
|
103
103
|
timings: r
|
|
104
104
|
}))().catch((e) => {
|
|
105
105
|
throw s = void 0, e;
|
|
106
|
-
}) :
|
|
106
|
+
}) : n("waiting-for-shared-preload"), o = await s, s = void 0, n("setTextTitlesInfos:done"), r.log(), this.textTitlesInfosLoaded = !0;
|
|
107
107
|
}
|
|
108
|
-
async buildAndCacheTextTitlesInfos({ progress:
|
|
109
|
-
await a.time("lockTextTitlesInfos", () => i`SELECT lock_text_titles_infos_for_parser_cache()`),
|
|
108
|
+
async buildAndCacheTextTitlesInfos({ progress: e, sql: i, timings: a }) {
|
|
109
|
+
await a.time("lockTextTitlesInfos", () => i`SELECT lock_text_titles_infos_for_parser_cache()`), e("queryTextTitlesInfos:start");
|
|
110
110
|
let o = await a.time("queryTextTitlesInfos", () => i`
|
|
111
111
|
SELECT
|
|
112
112
|
t.cid,
|
|
@@ -124,13 +124,13 @@ var l = class extends i {
|
|
|
124
124
|
AND v.legi_id_lien = t.legi_id
|
|
125
125
|
ORDER BY t.legi_id
|
|
126
126
|
`);
|
|
127
|
-
|
|
128
|
-
let s = performance.now(), c = await r(o, { onProgress: ({ count:
|
|
127
|
+
e("queryTextTitlesInfos:done", { count: o.length }), e("buildTextTitlesInfos:start", { count: o.length });
|
|
128
|
+
let s = performance.now(), c = await r(o, { onProgress: ({ count: t, phase: n }) => e(`buildTextTitlesInfos:${n}`, { count: t }) });
|
|
129
129
|
a.add({
|
|
130
130
|
count: o.length,
|
|
131
131
|
durationMs: Math.round((performance.now() - s) * 10) / 10,
|
|
132
132
|
phase: "buildTextTitlesInfos"
|
|
133
|
-
}),
|
|
133
|
+
}), e("buildTextTitlesInfos:done"), e("writeTextTitlesInfosParserCache:start", { count: o.length });
|
|
134
134
|
let [l] = await a.time("writeTextTitlesInfosParserCache", () => i`
|
|
135
135
|
INSERT INTO text_titles_infos_parser_cache (
|
|
136
136
|
key,
|
|
@@ -139,7 +139,7 @@ var l = class extends i {
|
|
|
139
139
|
generated_at,
|
|
140
140
|
data
|
|
141
141
|
) VALUES (
|
|
142
|
-
${
|
|
142
|
+
${n},
|
|
143
143
|
${2},
|
|
144
144
|
${o.length},
|
|
145
145
|
now(),
|
|
@@ -153,22 +153,22 @@ var l = class extends i {
|
|
|
153
153
|
data = EXCLUDED.data
|
|
154
154
|
RETURNING generated_at::text AS "generatedAt"
|
|
155
155
|
`);
|
|
156
|
-
return
|
|
156
|
+
return e("writeTextTitlesInfosParserCache:done", { count: o.length }), t(c), l.generatedAt;
|
|
157
157
|
}
|
|
158
|
-
async getTextTitlesInfosParserCacheMeta(
|
|
159
|
-
let [
|
|
158
|
+
async getTextTitlesInfosParserCacheMeta(e) {
|
|
159
|
+
let [t] = await e.time("queryTextTitlesInfosParserCacheMeta", () => this.flegiDb`
|
|
160
160
|
SELECT
|
|
161
161
|
format_version AS "formatVersion",
|
|
162
162
|
generated_at::text AS "generatedAt",
|
|
163
163
|
source_row_count AS "sourceRowCount"
|
|
164
164
|
FROM text_titles_infos_parser_cache
|
|
165
|
-
WHERE key = ${
|
|
165
|
+
WHERE key = ${n}
|
|
166
166
|
`);
|
|
167
|
-
return
|
|
167
|
+
return t;
|
|
168
168
|
}
|
|
169
|
-
async loadTextTitlesInfosParserCache({ progress:
|
|
169
|
+
async loadTextTitlesInfosParserCache({ progress: e, sql: r, timings: i }) {
|
|
170
170
|
let a = r ?? this.flegiDb;
|
|
171
|
-
|
|
171
|
+
e("queryTextTitlesInfosParserCache:start");
|
|
172
172
|
let [o] = await i.time("queryTextTitlesInfosParserCache", () => a`
|
|
173
173
|
SELECT
|
|
174
174
|
data,
|
|
@@ -176,17 +176,17 @@ var l = class extends i {
|
|
|
176
176
|
generated_at::text AS "generatedAt",
|
|
177
177
|
source_row_count AS "sourceRowCount"
|
|
178
178
|
FROM text_titles_infos_parser_cache
|
|
179
|
-
WHERE key = ${
|
|
179
|
+
WHERE key = ${n}
|
|
180
180
|
`);
|
|
181
181
|
if (o === void 0) {
|
|
182
|
-
|
|
182
|
+
e("queryTextTitlesInfosParserCache:miss");
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
if (o.formatVersion !== 2) {
|
|
186
|
-
|
|
186
|
+
e("queryTextTitlesInfosParserCache:format-mismatch");
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
e("queryTextTitlesInfosParserCache:done", { count: o.sourceRowCount });
|
|
190
190
|
let s = performance.now();
|
|
191
191
|
return t(o.data), i.add({
|
|
192
192
|
count: o.sourceRowCount,
|
|
@@ -218,16 +218,16 @@ var l = class extends i {
|
|
|
218
218
|
let n = `${t}\0${e}`, r = this.globalArticleRowsByNumAndDate.get(n);
|
|
219
219
|
return r === void 0 && (r = await this.queryUniqueActiveArticlesByNumsUsingContextHeuristic([t]), this.globalArticleRowsByNumAndDate.set(n, r)), r;
|
|
220
220
|
}
|
|
221
|
-
async preloadUniqueActiveArticlesByNums({ date:
|
|
221
|
+
async preloadUniqueActiveArticlesByNums({ date: t, nums: n }) {
|
|
222
222
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
223
|
-
for (let
|
|
224
|
-
if (
|
|
225
|
-
i.add(
|
|
226
|
-
let
|
|
227
|
-
this.globalArticleRowsByNumAndDate.has(
|
|
223
|
+
for (let e of n) {
|
|
224
|
+
if (e === void 0 || i.has(e)) continue;
|
|
225
|
+
i.add(e);
|
|
226
|
+
let n = `${e}\0${t}`;
|
|
227
|
+
this.globalArticleRowsByNumAndDate.has(n) || r.push(e);
|
|
228
228
|
}
|
|
229
229
|
if (r.length === 0) return;
|
|
230
|
-
let a = new
|
|
230
|
+
let a = new e("f_legi.preloadUniqueActiveArticlesByNums"), o = await a.time("queryGloballyUniqueArticleRowsByNums", () => this.queryGloballyUniqueArticleRowsByNums(r), { count: r.length }), s = new Set(o.map(({ num: e }) => e).filter((e) => e !== null)), c = r.filter((e) => !s.has(e)), l = await a.time("queryUniqueActiveArticlesByNumsUsingContextHeuristic", () => this.queryUniqueActiveArticlesByNumsUsingContextHeuristic(c), { count: c.length }), u = [...o, ...l].toSorted((e, t) => e.id < t.id ? -1 : +(e.id > t.id)), d = /* @__PURE__ */ new Map();
|
|
231
231
|
for (let e of r) d.set(e, []);
|
|
232
232
|
let f = /* @__PURE__ */ new Map();
|
|
233
233
|
for (let e of u) {
|
|
@@ -235,7 +235,7 @@ var l = class extends i {
|
|
|
235
235
|
let t = f.get(e.num) ?? 0;
|
|
236
236
|
f.set(e.num, t + 1), !(t >= 100) && d.get(e.num)?.push(e);
|
|
237
237
|
}
|
|
238
|
-
for (let [
|
|
238
|
+
for (let [e, n] of d) this.globalArticleRowsByNumAndDate.set(`${e}\0${t}`, n);
|
|
239
239
|
a.log({
|
|
240
240
|
articleRowCount: u.length,
|
|
241
241
|
globallyUniqueArticleRowCount: o.length,
|
|
@@ -244,23 +244,23 @@ var l = class extends i {
|
|
|
244
244
|
numCount: r.length
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
async preloadActiveArticlesByTextIds({ date:
|
|
248
|
-
let i =
|
|
249
|
-
if (
|
|
250
|
-
let n = `${
|
|
247
|
+
async preloadActiveArticlesByTextIds({ date: t, nums: n, textIds: r }) {
|
|
248
|
+
let i = n === void 0 ? void 0 : [...new Set(n)].filter(Boolean), a = [...new Set(r)].filter((e) => {
|
|
249
|
+
if (e === void 0) return !1;
|
|
250
|
+
let n = `${e}\0${t}`;
|
|
251
251
|
if (this.articleRowsByNumByTextAndDate.get(n) === void 0) return !0;
|
|
252
252
|
let r = this.articleNumsLoadedByTextAndDate.get(n);
|
|
253
253
|
return r === "all" ? !1 : i === void 0 ? !0 : i.some((e) => !r?.has(e));
|
|
254
254
|
});
|
|
255
255
|
if (a.length === 0) return;
|
|
256
|
-
let o = new
|
|
256
|
+
let o = new e("f_legi.preloadActiveArticlesByTextIds"), s = await o.time("getContextTextIdsByTextIds", () => this.getContextTextIdsByTextIds(a)), c = [...new Set([...s.values()].flat())], l = await o.time("getActiveArticleRowsForContextTextIds", () => i === void 0 ? this.getActiveArticleRowsForContextTextIdsWithRoots(c) : this.queryActiveArticleRowsForContextTextIds(c, i), { count: c.length }), u = /* @__PURE__ */ new Map(), d = (e, t) => {
|
|
257
257
|
if (e === null) return;
|
|
258
258
|
let n = u.get(e);
|
|
259
259
|
n === void 0 ? u.set(e, [t]) : n.push(t);
|
|
260
260
|
};
|
|
261
261
|
for (let e of l) d(e.rootTextId, e), d(e.textId, e);
|
|
262
|
-
for (let
|
|
263
|
-
let n = `${
|
|
262
|
+
for (let e of a) {
|
|
263
|
+
let n = `${e}\0${t}`, r = s.get(e) ?? [e], a = /* @__PURE__ */ new Map();
|
|
264
264
|
for (let e of r) for (let t of u.get(e) ?? []) a.set(`${t.id}\0${t.textId}`, {
|
|
265
265
|
id: t.id,
|
|
266
266
|
textId: t.textId,
|
|
@@ -297,26 +297,26 @@ var l = class extends i {
|
|
|
297
297
|
async queryUniqueActiveArticlesByNumsUsingContextHeuristic(e) {
|
|
298
298
|
return e.length === 0 ? [] : await this.flegiDb`
|
|
299
299
|
SELECT
|
|
300
|
-
id,
|
|
301
|
-
"textId",
|
|
302
|
-
num,
|
|
303
|
-
"dateDebut",
|
|
304
|
-
"dateFin"
|
|
305
|
-
|
|
300
|
+
candidate.id,
|
|
301
|
+
candidate."textId",
|
|
302
|
+
candidate.num,
|
|
303
|
+
candidate."dateDebut",
|
|
304
|
+
candidate."dateFin"
|
|
305
|
+
-- The (num, id, text_id) index stops each lookup after 100 rows;
|
|
306
|
+
-- a window over all matching articles only limited the output transfer.
|
|
307
|
+
FROM unnest(${this.flegiDb.array(e)}::text[]) AS requested(num)
|
|
308
|
+
CROSS JOIN LATERAL (
|
|
306
309
|
SELECT
|
|
307
310
|
id,
|
|
308
311
|
text_id AS "textId",
|
|
309
312
|
num,
|
|
310
313
|
date_debut::text AS "dateDebut",
|
|
311
|
-
date_fin::text AS "dateFin"
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
WHERE num IN ${this.flegiDb(e)}
|
|
318
|
-
) AS ranked_articles
|
|
319
|
-
WHERE "rowNumber" <= 100
|
|
314
|
+
date_fin::text AS "dateFin"
|
|
315
|
+
FROM article_num_candidates
|
|
316
|
+
WHERE num = requested.num
|
|
317
|
+
ORDER BY id
|
|
318
|
+
LIMIT 100
|
|
319
|
+
) AS candidate
|
|
320
320
|
`;
|
|
321
321
|
}
|
|
322
322
|
async queryGloballyUniqueArticleRowsByNums(e) {
|
|
@@ -364,32 +364,17 @@ var l = class extends i {
|
|
|
364
364
|
let r = `${e}\0${t}`, i = this.articleRowsByNumByTextAndDate.get(r);
|
|
365
365
|
if (i !== void 0) {
|
|
366
366
|
let a = this.articleNumsLoadedByTextAndDate.get(r);
|
|
367
|
-
return
|
|
367
|
+
return a === "all" || a?.has(n) ? i : (await this.preloadActiveArticlesByTextIds({
|
|
368
368
|
date: t,
|
|
369
369
|
nums: [n],
|
|
370
370
|
textIds: [e]
|
|
371
371
|
}), this.articleRowsByNumByTextAndDate.get(r) ?? i);
|
|
372
372
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
let t = i.get(e.num);
|
|
379
|
-
t === void 0 ? i.set(e.num, [e]) : t.push(e);
|
|
380
|
-
}
|
|
381
|
-
this.articleRowsByNumByTextAndDate.set(r, i), this.articleNumsLoadedByTextAndDate.set(r, "all");
|
|
382
|
-
}
|
|
383
|
-
return i;
|
|
384
|
-
}
|
|
385
|
-
async getActiveArticleRowsForContextTextIds(e) {
|
|
386
|
-
return (await this.getActiveArticleRowsForContextTextIdsWithRoots(e)).map((e) => ({
|
|
387
|
-
id: e.id,
|
|
388
|
-
textId: e.textId,
|
|
389
|
-
num: e.num,
|
|
390
|
-
dateDebut: e.dateDebut,
|
|
391
|
-
dateFin: e.dateFin
|
|
392
|
-
}));
|
|
373
|
+
return await this.preloadActiveArticlesByTextIds({
|
|
374
|
+
date: t,
|
|
375
|
+
nums: [n],
|
|
376
|
+
textIds: [e]
|
|
377
|
+
}), this.articleRowsByNumByTextAndDate.get(r) ?? /* @__PURE__ */ new Map();
|
|
393
378
|
}
|
|
394
379
|
async getActiveArticleRowsForContextTextIdsWithRoots(e) {
|
|
395
380
|
let t = [...new Set(e)], n = t.filter((e) => !this.articleRowsByContextTextId.has(e));
|
|
@@ -596,10 +581,6 @@ var l = class extends i {
|
|
|
596
581
|
LIMIT 1
|
|
597
582
|
`)[0]?.textId;
|
|
598
583
|
}
|
|
599
|
-
async getContextTextIdsFromTextId(e) {
|
|
600
|
-
let t = this.contextTextIdsByTextId.get(e);
|
|
601
|
-
return t === void 0 && (t = (await this.getContextTextIdsByTextIds([e])).get(e) ?? [e], this.contextTextIdsByTextId.set(e, t)), t;
|
|
602
|
-
}
|
|
603
584
|
async getContextTextIdsByTextIds(e) {
|
|
604
585
|
let t = /* @__PURE__ */ new Map(), n = e.filter((e) => !this.contextTextIdsByTextId.has(e)), r = new Set(n);
|
|
605
586
|
for (let n of e) {
|