@tricoteuses/tisseuse 0.19.3 → 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.
Files changed (54) hide show
  1. package/README.md +79 -0
  2. package/dist/{html-EuDDYMr2.js → html-jaUHsXKQ.js} +6449 -5951
  3. package/dist/index.js +115 -115
  4. package/dist/{resolver-tBQRf8TL.js → resolver-CzmDH4S3.js} +125 -97
  5. package/dist/server-f-legi.js +73 -92
  6. package/dist/server.js +892 -722
  7. package/dist/src/lib/extractors/action_directives_cpu.test.d.ts +1 -0
  8. package/dist/src/lib/extractors/links.citation_scope.test.d.ts +1 -0
  9. package/dist/src/lib/extractors/links.d.ts +2 -1
  10. package/dist/src/lib/extractors/portion_references_cpu.test.d.ts +1 -0
  11. package/dist/src/lib/extractors/qualified_versions.d.ts +6 -0
  12. package/dist/src/lib/extractors/references.d.ts +8 -8
  13. package/dist/src/lib/f_legi/resolver.d.ts +0 -2
  14. package/dist/src/lib/index.d.ts +1 -0
  15. package/dist/src/lib/legi/canutes_article_preload.test.d.ts +1 -0
  16. package/dist/src/lib/legi/canutes_candidates.test.d.ts +1 -0
  17. package/dist/src/lib/legi/canutes_resolver.d.ts +5 -4
  18. package/dist/src/lib/legi/canutes_resolver_cache.test.d.ts +1 -0
  19. package/dist/src/lib/legi/canutes_section_roots.test.d.ts +1 -0
  20. package/dist/src/lib/legi/canutes_sql.d.ts +4 -0
  21. package/dist/src/lib/legi/canutes_text_titles_cache.d.ts +24 -0
  22. package/dist/src/lib/legi/canutes_text_titles_cache.integration.test.d.ts +1 -0
  23. package/dist/src/lib/legi/canutes_titles_metrics.d.ts +13 -0
  24. package/dist/src/lib/legi/text_titles_infos.d.ts +1 -0
  25. package/dist/src/lib/linkers/html.d.ts +6 -4
  26. package/dist/src/lib/linkers/markdown.d.ts +2 -2
  27. package/dist/src/lib/server/akn_rendering.test.d.ts +1 -0
  28. package/dist/src/lib/server/bill_action_resolver_invariance.test.d.ts +1 -0
  29. package/dist/src/lib/server/bill_action_target_fixtures.d.ts +7 -0
  30. package/dist/src/lib/server/bill_citation_anaphora.test.d.ts +1 -0
  31. package/dist/src/lib/server/bill_comparison.d.ts +42 -0
  32. package/dist/src/lib/server/bill_comparison.test.d.ts +1 -0
  33. package/dist/src/lib/server/bill_target_scope.test.d.ts +1 -0
  34. package/dist/src/lib/server/canutes_legacy_candidates.d.ts +19 -0
  35. package/dist/src/lib/server/canutes_only_compatibility.test.d.ts +1 -0
  36. package/dist/src/lib/server/databases/canutes_text_titles_cache.d.ts +8 -0
  37. package/dist/src/lib/server/flegi_profiling.d.ts +14 -0
  38. package/dist/src/lib/server/flegi_profiling.test.d.ts +1 -0
  39. package/dist/src/lib/server/masquage-typesense.test.d.ts +1 -0
  40. package/dist/src/lib/server/masquage_typesense.d.ts +36 -0
  41. package/dist/src/lib/server/parsed_bills.d.ts +4 -0
  42. package/dist/src/lib/server/sql_profiling.d.ts +30 -0
  43. package/dist/src/lib/server/sql_profiling.test.d.ts +1 -0
  44. package/dist/src/lib/text_parsers/action_words.d.ts +2 -0
  45. package/dist/src/lib/text_parsers/action_words.test.d.ts +1 -0
  46. package/dist/src/lib/text_parsers/qualified_versions.d.ts +2 -0
  47. package/dist/src/lib/text_parsers/texts.d.ts +1 -0
  48. package/dist/src/lib/text_parsers/transformers.d.ts +2 -0
  49. package/dist/src/scripts/compare_legi_bills.d.ts +1 -0
  50. package/dist/src/scripts/configure_postgres_legi_resolver.d.ts +1 -0
  51. package/dist/src/scripts/profile_canutes_bill.d.ts +1 -0
  52. package/dist/src/scripts/test_canutes_titles_cache.d.ts +1 -0
  53. package/dist/src/scripts/warm_canutes_text_titles_cache.d.ts +1 -0
  54. package/package.json +7 -1
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, o as n, r, t as i } from "./resolver-tBQRf8TL.js";
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: e, parentPath: t }) {
45
- let r = `${t}\0${e}`, i = this.directSectionChildrenByParentAndDate.get(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 n("f_legi.getDirectSectionChildren"), o, s = !1;
48
- if (await a.time("preloadDirectSectionChildrenByRootPath", () => this.preloadDirectSectionChildrenByRootPath(t, e)), i = this.directSectionChildrenByParentAndDate.get(r) ?? [], i.length === 0 && !t.includes(".")) {
49
- o = await a.time("getRootTextIdsFromTextId", () => this.getRootTextIdsFromTextId(t));
50
- let n = o;
51
- n.length > 1 && (s = !0, i = await a.time("queryRootDirectSectionChildren", () => this.flegiDb`
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(n)}::ltree[])
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 <= ${e}::date
64
- AND date_fin >= ${e}::date
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: t,
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(e = {}) {
84
- let t = (t, n = {}) => {
85
- e.onProgress?.({
83
+ async preloadTextTitlesInfos(t = {}) {
84
+ let n = (e, n = {}) => {
85
+ t.onProgress?.({
86
86
  ...n,
87
- phase: t,
87
+ phase: e,
88
88
  resolver: "f_legi"
89
89
  });
90
- }, r = new n("f_legi.preloadTextTitlesInfos");
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
- t("already-loaded");
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: t,
102
+ progress: n,
103
103
  timings: r
104
104
  }))().catch((e) => {
105
105
  throw s = void 0, e;
106
- }) : t("waiting-for-shared-preload"), o = await s, s = void 0, t("setTextTitlesInfos:done"), r.log(), this.textTitlesInfosLoaded = !0;
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: n, sql: i, timings: a }) {
109
- await a.time("lockTextTitlesInfos", () => i`SELECT lock_text_titles_infos_for_parser_cache()`), n("queryTextTitlesInfos:start");
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
- n("queryTextTitlesInfos:done", { count: o.length }), n("buildTextTitlesInfos:start", { count: o.length });
128
- let s = performance.now(), c = await r(o, { onProgress: ({ count: e, phase: t }) => n(`buildTextTitlesInfos:${t}`, { count: e }) });
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
- }), n("buildTextTitlesInfos:done"), n("writeTextTitlesInfosParserCache:start", { count: o.length });
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
- ${e},
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 n("writeTextTitlesInfosParserCache:done", { count: o.length }), t(c), l.generatedAt;
156
+ return e("writeTextTitlesInfosParserCache:done", { count: o.length }), t(c), l.generatedAt;
157
157
  }
158
- async getTextTitlesInfosParserCacheMeta(t) {
159
- let [n] = await t.time("queryTextTitlesInfosParserCacheMeta", () => this.flegiDb`
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 = ${e}
165
+ WHERE key = ${n}
166
166
  `);
167
- return n;
167
+ return t;
168
168
  }
169
- async loadTextTitlesInfosParserCache({ progress: n, sql: r, timings: i }) {
169
+ async loadTextTitlesInfosParserCache({ progress: e, sql: r, timings: i }) {
170
170
  let a = r ?? this.flegiDb;
171
- n("queryTextTitlesInfosParserCache:start");
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 = ${e}
179
+ WHERE key = ${n}
180
180
  `);
181
181
  if (o === void 0) {
182
- n("queryTextTitlesInfosParserCache:miss");
182
+ e("queryTextTitlesInfosParserCache:miss");
183
183
  return;
184
184
  }
185
185
  if (o.formatVersion !== 2) {
186
- n("queryTextTitlesInfosParserCache:format-mismatch");
186
+ e("queryTextTitlesInfosParserCache:format-mismatch");
187
187
  return;
188
188
  }
189
- n("queryTextTitlesInfosParserCache:done", { count: o.sourceRowCount });
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: e, nums: t }) {
221
+ async preloadUniqueActiveArticlesByNums({ date: t, nums: n }) {
222
222
  let r = [], i = /* @__PURE__ */ new Set();
223
- for (let n of t) {
224
- if (n === void 0 || i.has(n)) continue;
225
- i.add(n);
226
- let t = `${n}\0${e}`;
227
- this.globalArticleRowsByNumAndDate.has(t) || r.push(n);
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 n("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();
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 [t, n] of d) this.globalArticleRowsByNumAndDate.set(`${t}\0${e}`, n);
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: e, nums: t, textIds: r }) {
248
- let i = t === void 0 ? void 0 : [...new Set(t)].filter(Boolean), a = [...new Set(r)].filter((t) => {
249
- if (t === void 0) return !1;
250
- let n = `${t}\0${e}`;
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 n("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) => {
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 t of a) {
263
- let n = `${t}\0${e}`, r = s.get(t) ?? [t], a = /* @__PURE__ */ new Map();
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
- FROM (
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
- row_number() OVER (
313
- PARTITION BY num
314
- ORDER BY id
315
- ) AS "rowNumber"
316
- FROM article_num_candidates
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 n === void 0 || a === "all" || a?.has(n) ? i : (await this.preloadActiveArticlesByTextIds({
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
- if (i === void 0) {
374
- let t = await this.getContextTextIdsFromTextId(e), n = await this.getActiveArticleRowsForContextTextIds(t);
375
- i = /* @__PURE__ */ new Map();
376
- for (let e of n) {
377
- if (e.num === null) continue;
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) {