@treeviz/gedcom-parser 2.0.9 → 2.0.12

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 (50) hide show
  1. package/dist/classes/common.d.ts +6 -1
  2. package/dist/classes/common.d.ts.map +1 -1
  3. package/dist/classes/fam.d.ts +9 -1
  4. package/dist/classes/fam.d.ts.map +1 -1
  5. package/dist/classes/gedcom.d.ts +6 -2
  6. package/dist/classes/gedcom.d.ts.map +1 -1
  7. package/dist/classes/index.js +740 -51
  8. package/dist/classes/indi.d.ts +6 -0
  9. package/dist/classes/indi.d.ts.map +1 -1
  10. package/dist/cli/index.js +3194 -2499
  11. package/dist/constants/constants.d.ts +7 -0
  12. package/dist/constants/constants.d.ts.map +1 -1
  13. package/dist/constants/index.js +1531 -916
  14. package/dist/factories/index.js +654 -40
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +5201 -4407
  18. package/dist/interfaces/fam.d.ts +7 -1
  19. package/dist/interfaces/fam.d.ts.map +1 -1
  20. package/dist/interfaces/gedcom.d.ts +4 -0
  21. package/dist/interfaces/gedcom.d.ts.map +1 -1
  22. package/dist/interfaces/indi.d.ts +5 -1
  23. package/dist/interfaces/indi.d.ts.map +1 -1
  24. package/dist/kinship-translator/index.d.ts +1 -0
  25. package/dist/kinship-translator/index.d.ts.map +1 -1
  26. package/dist/kinship-translator/index.js +655 -41
  27. package/dist/kinship-translator/kinship-translator.ru.d.ts +18 -0
  28. package/dist/kinship-translator/kinship-translator.ru.d.ts.map +1 -0
  29. package/dist/kinship-translator/patterns.ru.d.ts +2 -0
  30. package/dist/kinship-translator/patterns.ru.d.ts.map +1 -0
  31. package/dist/kinship-translator/translators.d.ts +1 -0
  32. package/dist/kinship-translator/translators.d.ts.map +1 -1
  33. package/dist/kinship-translator/types.d.ts +1 -1
  34. package/dist/kinship-translator/types.d.ts.map +1 -1
  35. package/dist/structures/gedcom.d.ts +1 -0
  36. package/dist/structures/gedcom.d.ts.map +1 -1
  37. package/dist/types/types.d.ts +10 -0
  38. package/dist/types/types.d.ts.map +1 -1
  39. package/dist/utils/fact-edit.d.ts +22 -0
  40. package/dist/utils/fact-edit.d.ts.map +1 -0
  41. package/dist/utils/family-edit.d.ts +23 -0
  42. package/dist/utils/family-edit.d.ts.map +1 -0
  43. package/dist/utils/gedcom-trailer.d.ts +6 -0
  44. package/dist/utils/gedcom-trailer.d.ts.map +1 -0
  45. package/dist/utils/index.d.ts +4 -1
  46. package/dist/utils/index.d.ts.map +1 -1
  47. package/dist/utils/index.js +850 -56
  48. package/dist/utils/parser.d.ts +3 -0
  49. package/dist/utils/parser.d.ts.map +1 -1
  50. package/package.json +1 -1
@@ -63,7 +63,8 @@ __export(translators_exports, {
63
63
  en: () => KinshipTranslatorEn,
64
64
  es: () => KinshipTranslatorEs,
65
65
  fr: () => KinshipTranslatorFr,
66
- hu: () => KinshipTranslatorHU
66
+ hu: () => KinshipTranslatorHU,
67
+ ru: () => KinshipTranslatorRu
67
68
  });
68
69
 
69
70
  // src/constants/filters.ts
@@ -342,6 +343,11 @@ var inRange = (year, range, trueIfNoYear = false) => {
342
343
  // src/constants/constants.ts
343
344
  var ID_REG = /^@[_a-zA-Z0-9]+@/;
344
345
  var ID_GETTER_REG = /^(?<at>@)?(?<letter>[A-Z])?/i;
346
+ var ORIG_HEAD_TAG = "_ORIGHEAD";
347
+
348
+ // src/utils/gedcom-trailer.ts
349
+ var GEDCOM_TRAILER_TAG = "TRLR";
350
+ var isGedcomTrailerTag = (tag) => tag === GEDCOM_TRAILER_TAG;
345
351
  var List = class _List {
346
352
  // length = 0;
347
353
  constructor(items) {
@@ -852,6 +858,9 @@ var Common = class _Common {
852
858
  delete this._value;
853
859
  }
854
860
  set(name, value) {
861
+ if (isGedcomTrailerTag(name)) {
862
+ return void 0;
863
+ }
855
864
  if (typeof value === "string") {
856
865
  const usedValue = createCommon(this._gedcom, void 0, this.main);
857
866
  usedValue.value = value;
@@ -862,6 +871,9 @@ var Common = class _Common {
862
871
  return get(this, name);
863
872
  }
864
873
  assign(name, value, unique = false) {
874
+ if (isGedcomTrailerTag(name)) {
875
+ return void 0;
876
+ }
865
877
  let curValue = this.get(name);
866
878
  if (curValue?.isListable) {
867
879
  if (curValue instanceof _Common) {
@@ -1084,30 +1096,47 @@ var Common = class _Common {
1084
1096
  });
1085
1097
  return gedcom;
1086
1098
  }
1099
+ getHeadRecord() {
1100
+ return get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1101
+ }
1102
+ getOriginalHeadRecord() {
1103
+ return get(this, ORIG_HEAD_TAG) || get(this.getGedcom(), ORIG_HEAD_TAG) || get(this.getHeadRecord(), ORIG_HEAD_TAG);
1104
+ }
1105
+ getSourceHeads() {
1106
+ const heads = [this.getOriginalHeadRecord(), this.getHeadRecord()];
1107
+ return heads.filter((head, index) => {
1108
+ return Boolean(head && heads.indexOf(head) === index);
1109
+ });
1110
+ }
1111
+ getFromSourceHeads(path) {
1112
+ for (const head of this.getSourceHeads()) {
1113
+ const value = get(head, path);
1114
+ if (value !== void 0 && value !== null && value !== "") {
1115
+ return value;
1116
+ }
1117
+ }
1118
+ return void 0;
1119
+ }
1120
+ sourStartsWith(prefix) {
1121
+ return this.getSourceHeads().some((head) => {
1122
+ const sour = get(head, "SOUR.value");
1123
+ return !!sour?.toLowerCase()?.startsWith(prefix);
1124
+ });
1125
+ }
1087
1126
  isGenoPro() {
1088
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1089
- const sour = get(head, "SOUR.value");
1090
- return !!sour?.toLowerCase()?.startsWith("genopro");
1127
+ return this.sourStartsWith("genopro");
1091
1128
  }
1092
1129
  isAhnenblatt() {
1093
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1094
- const sour = get(head, "SOUR.value");
1095
- return !!sour?.toLowerCase()?.startsWith("ahnenblatt");
1130
+ return this.sourStartsWith("ahnenblatt");
1096
1131
  }
1097
1132
  isGeni() {
1098
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1099
- const sour = get(head, "SOUR.value");
1100
- return !!sour?.toLowerCase()?.startsWith("geni");
1133
+ return this.sourStartsWith("geni");
1101
1134
  }
1102
1135
  isAncestry() {
1103
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1104
- const sour = get(head, "SOUR.value");
1105
- return !!sour?.toLowerCase()?.startsWith("ancestry");
1136
+ return this.sourStartsWith("ancestry");
1106
1137
  }
1107
1138
  isMyHeritage() {
1108
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1109
- const sour = get(head, "SOUR.value");
1110
- return !!sour?.toLowerCase()?.startsWith("myheritage");
1139
+ return this.sourStartsWith("myheritage");
1111
1140
  }
1112
1141
  /**
1113
1142
  * Get the source type as a string (for prefixing tree IDs and names)
@@ -1124,22 +1153,22 @@ var Common = class _Common {
1124
1153
  return void 0;
1125
1154
  }
1126
1155
  isFamilySearch() {
1127
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1128
- const sourName = get(head, "SOUR.NAME.value");
1129
- return sourName === "FamilySearch API";
1156
+ return this.getSourceHeads().some((head) => {
1157
+ const sourName = get(head, "SOUR.NAME.value");
1158
+ return sourName === "FamilySearch API";
1159
+ });
1130
1160
  }
1131
1161
  isGNO2GED() {
1132
- const head = get(this, "HEAD") || get(this.getGedcom(), "HEAD");
1133
- const sour = get(head, "SOUR.value");
1134
- return sour === "GNO2GED";
1162
+ return this.getSourceHeads().some((head) => {
1163
+ const sour = get(head, "SOUR.value");
1164
+ return sour === "GNO2GED";
1165
+ });
1135
1166
  }
1136
1167
  getAncestryTreeId() {
1137
- const path = "HEAD.SOUR._TREE.RIN.value";
1138
- return get(this, path) || get(this.getGedcom(), path);
1168
+ return this.getFromSourceHeads("SOUR._TREE.RIN.value") || (get(this, "HEAD.SOUR._TREE.RIN.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.RIN.value"));
1139
1169
  }
1140
1170
  getMyHeritageTreeId() {
1141
- const path = "HEAD._EXPORTED_FROM_SITE_ID.value";
1142
- return get(this, path) || get(this.getGedcom(), path);
1171
+ return this.getFromSourceHeads("_EXPORTED_FROM_SITE_ID.value") || (get(this, "HEAD._EXPORTED_FROM_SITE_ID.value") || get(this.getGedcom(), "HEAD._EXPORTED_FROM_SITE_ID.value"));
1143
1172
  }
1144
1173
  getTreeId() {
1145
1174
  if (this?.isAncestry()) {
@@ -1173,8 +1202,7 @@ var Common = class _Common {
1173
1202
  return this.getUniversalTreeId();
1174
1203
  }
1175
1204
  getAncestryTreeName() {
1176
- const path = "HEAD.SOUR._TREE.value";
1177
- return get(this, path) || get(this.getGedcom(), path);
1205
+ return this.getFromSourceHeads("SOUR._TREE.value") || (get(this, "HEAD.SOUR._TREE.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.value"));
1178
1206
  }
1179
1207
  getMyHeritageTreeName() {
1180
1208
  const path = "HEAD.FILE.value";
@@ -1184,14 +1212,14 @@ var Common = class _Common {
1184
1212
  )?.groups?.tree;
1185
1213
  }
1186
1214
  getFamilySearchTreeId() {
1187
- const rin = get(this, "HEAD.SOUR._TREE.RIN.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.RIN.value");
1215
+ const rin = this.getFromSourceHeads("SOUR._TREE.RIN.value") || get(this, "HEAD.SOUR._TREE.RIN.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.RIN.value");
1188
1216
  if (rin) {
1189
1217
  return rin;
1190
1218
  }
1191
1219
  return "familysearch";
1192
1220
  }
1193
1221
  getFamilySearchTreeName() {
1194
- const treeName = get(this, "HEAD.SOUR._TREE.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.value");
1222
+ const treeName = this.getFromSourceHeads("SOUR._TREE.value") || get(this, "HEAD.SOUR._TREE.value") || get(this.getGedcom(), "HEAD.SOUR._TREE.value");
1195
1223
  if (treeName) {
1196
1224
  return treeName;
1197
1225
  }
@@ -1283,11 +1311,11 @@ var Common = class _Common {
1283
1311
  const cleanName = fileName.replace(/\.ged$/i, "").replace(/_/g, " ");
1284
1312
  return `${prefix}${cleanName}`;
1285
1313
  }
1286
- const sourName = get(this, "HEAD.SOUR.NAME.value") || get(this.getGedcom(), "HEAD.SOUR.NAME.value");
1314
+ const sourName = this.getFromSourceHeads("SOUR.NAME.value") || get(this, "HEAD.SOUR.NAME.value") || get(this.getGedcom(), "HEAD.SOUR.NAME.value");
1287
1315
  if (sourName) {
1288
1316
  return `${prefix}${sourName}`;
1289
1317
  }
1290
- const sourValue = get(this, "HEAD.SOUR.value") || get(this.getGedcom(), "HEAD.SOUR.value");
1318
+ const sourValue = this.getFromSourceHeads("SOUR.value") || get(this, "HEAD.SOUR.value") || get(this.getGedcom(), "HEAD.SOUR.value");
1291
1319
  if (sourValue) {
1292
1320
  return `${prefix}${sourValue}`;
1293
1321
  }
@@ -1353,7 +1381,7 @@ var isOnlyMainProp = (key) => {
1353
1381
  };
1354
1382
  var isValidKey = (common, key) => {
1355
1383
  const prop = get(common, key);
1356
- return key !== "_gedcom" && key !== "_main" && key !== "_parent" && key !== "_uniqueId" && key !== "_refs" && key !== "_type" && (key === "id" || key === "_id" || key === "value" || key === "_value" || prop instanceof Common || prop instanceof List);
1384
+ return key !== "_gedcom" && key !== "_main" && key !== "_parent" && key !== "_uniqueId" && key !== "_refs" && key !== "_type" && !(typeof key === "string" && isGedcomTrailerTag(key)) && (key === "id" || key === "_id" || key === "value" || key === "_value" || prop instanceof Common || prop instanceof List);
1357
1385
  };
1358
1386
  var getValidKeys = (common) => {
1359
1387
  return Object.keys(common).filter((key) => {
@@ -2028,6 +2056,239 @@ var cacheDiscoveredPath = (gedcom, path) => {
2028
2056
  }
2029
2057
  };
2030
2058
 
2059
+ // src/utils/fact-edit.ts
2060
+ var SINGLETON_TAGS = /* @__PURE__ */ new Set(["BIRT", "DEAT", "SSN", "SEX", "DSCR"]);
2061
+ var firstRecord = (node) => {
2062
+ if (!node) {
2063
+ return void 0;
2064
+ }
2065
+ if (node instanceof List) {
2066
+ return node.index(0);
2067
+ }
2068
+ return node.index(0) ?? node;
2069
+ };
2070
+ var setDateOn = (gedcom, owner, parent, date) => {
2071
+ const trimmed = date.trim();
2072
+ if (!trimmed) {
2073
+ return;
2074
+ }
2075
+ let dateNode = parent.get("DATE");
2076
+ if (!dateNode || dateNode instanceof List) {
2077
+ dateNode = createCommonDate(gedcom, void 0, owner, parent);
2078
+ dateNode.type = "DATE";
2079
+ parent.set("DATE", dateNode);
2080
+ }
2081
+ dateNode.value = trimmed;
2082
+ };
2083
+ var fillFact = (gedcom, owner, event, input) => {
2084
+ if (input.value?.trim()) {
2085
+ event.value = input.value.trim();
2086
+ }
2087
+ if (input.type?.trim()) {
2088
+ event.set("TYPE", input.type.trim());
2089
+ }
2090
+ if (input.date) {
2091
+ setDateOn(gedcom, owner, event, input.date);
2092
+ }
2093
+ if (input.place?.trim()) {
2094
+ event.set("PLAC", input.place.trim());
2095
+ }
2096
+ if (input.note?.trim()) {
2097
+ event.set("NOTE", input.note.trim());
2098
+ }
2099
+ };
2100
+ var addIndividualFact = (indi, input) => {
2101
+ const gedcom = indi.getGedcom();
2102
+ if (!gedcom) {
2103
+ return void 0;
2104
+ }
2105
+ const tag = input.tag;
2106
+ let event = SINGLETON_TAGS.has(tag) ? firstRecord(indi.get(tag)) : void 0;
2107
+ if (!event) {
2108
+ event = createCommon(gedcom, void 0, indi);
2109
+ event.type = tag;
2110
+ if (SINGLETON_TAGS.has(tag)) {
2111
+ indi.set(tag, event);
2112
+ } else {
2113
+ indi.assign(tag, event);
2114
+ }
2115
+ }
2116
+ fillFact(gedcom, indi, event, input);
2117
+ return event;
2118
+ };
2119
+ var addFamilyFact = (fam, input) => {
2120
+ const gedcom = fam.getGedcom();
2121
+ if (!gedcom) {
2122
+ return void 0;
2123
+ }
2124
+ const event = createCommon(gedcom, void 0, fam);
2125
+ event.type = input.tag;
2126
+ fam.assign(input.tag, event);
2127
+ fillFact(gedcom, fam, event, input);
2128
+ return event;
2129
+ };
2130
+
2131
+ // src/utils/family-edit.ts
2132
+ var PEDIGREE_VALUES = [
2133
+ "birth" /* BIRTH */,
2134
+ "adopted" /* ADOPTED */,
2135
+ "foster" /* FOSTER */,
2136
+ "step" /* STEP */,
2137
+ "sealing" /* SEALING */
2138
+ ];
2139
+ var toGedcomPedigree = (value) => {
2140
+ const normalized = String(value || "birth" /* BIRTH */).toLowerCase();
2141
+ if (normalized === "biological" /* BIOLOGICAL */ || normalized === "birth" /* BIRTH */) {
2142
+ return "birth" /* BIRTH */;
2143
+ }
2144
+ const match = PEDIGREE_VALUES.find((item) => item === normalized);
2145
+ return match ?? "birth" /* BIRTH */;
2146
+ };
2147
+ var pointerIds = (tag) => {
2148
+ if (!tag) {
2149
+ return [];
2150
+ }
2151
+ if (tag instanceof List) {
2152
+ return tag.values().map((item) => item?.toValue?.()).filter((value2) => !!value2);
2153
+ }
2154
+ const value = tag.toValue?.();
2155
+ return value ? [String(value)] : [];
2156
+ };
2157
+ var firstPointerId = (tag) => pointerIds(tag)[0];
2158
+ var makePointer = (gedcom, parent, value, refType) => {
2159
+ const pointer = createCommon(gedcom, void 0, parent);
2160
+ pointer.value = value;
2161
+ pointer.refType = refType;
2162
+ return pointer;
2163
+ };
2164
+ var familyHasParent = (fam, indiId) => pointerIds(fam.get("HUSB")).includes(indiId) || pointerIds(fam.get("WIFE")).includes(indiId);
2165
+ var familyHasChild = (fam, indiId) => pointerIds(fam.get("CHIL")).includes(indiId);
2166
+ var spouseTagFor = (indi, fam) => {
2167
+ const husbId = firstPointerId(fam.get("HUSB"));
2168
+ const wifeId = firstPointerId(fam.get("WIFE"));
2169
+ if (husbId === indi.id) {
2170
+ return "HUSB";
2171
+ }
2172
+ if (wifeId === indi.id) {
2173
+ return "WIFE";
2174
+ }
2175
+ if (indi.isFemale()) {
2176
+ return wifeId && wifeId !== indi.id ? "HUSB" : "WIFE";
2177
+ }
2178
+ if (indi.isMale()) {
2179
+ return husbId && husbId !== indi.id ? "WIFE" : "HUSB";
2180
+ }
2181
+ return husbId ? "WIFE" : "HUSB";
2182
+ };
2183
+ var canAttachAsSpouse = (fam, indi) => {
2184
+ if (!indi.id) {
2185
+ return false;
2186
+ }
2187
+ if (familyHasParent(fam, indi.id)) {
2188
+ return true;
2189
+ }
2190
+ const tag = spouseTagFor(indi, fam);
2191
+ const occupied = firstPointerId(fam.get(tag));
2192
+ return !occupied || occupied === indi.id;
2193
+ };
2194
+ var pointerByValue = (tag, id) => {
2195
+ if (!tag) {
2196
+ return void 0;
2197
+ }
2198
+ const fromValues = tag.toValueList?.().item(id);
2199
+ if (fromValues) {
2200
+ return fromValues;
2201
+ }
2202
+ return tag.toList()?.values().find((item) => item?.toValue?.() === id);
2203
+ };
2204
+ var setChildPedigree = (fam, child, pedigree, parent) => {
2205
+ if (!fam.id || !child.id) {
2206
+ return;
2207
+ }
2208
+ const pedi = toGedcomPedigree(pedigree);
2209
+ const famc = pointerByValue(child.get("FAMC"), fam.id);
2210
+ if (famc) {
2211
+ famc.set("PEDI", pedi);
2212
+ }
2213
+ const chil = pointerByValue(fam.get("CHIL"), child.id);
2214
+ if (!chil) {
2215
+ return;
2216
+ }
2217
+ const setFather = !parent || parent.isMale() || parent.isUnknownSex();
2218
+ const setMother = !parent || parent.isFemale() || parent.isUnknownSex();
2219
+ if (setFather) {
2220
+ chil.set("_FREL", pedi);
2221
+ }
2222
+ if (setMother) {
2223
+ chil.set("_MREL", pedi);
2224
+ }
2225
+ };
2226
+ var attachSpouseToFamily = (fam, indi) => {
2227
+ const gedcom = fam.getGedcom() ?? indi.getGedcom();
2228
+ if (!indi.id || !fam.id || !gedcom) {
2229
+ return false;
2230
+ }
2231
+ if (!canAttachAsSpouse(fam, indi)) {
2232
+ return false;
2233
+ }
2234
+ const tag = spouseTagFor(indi, fam);
2235
+ if (firstPointerId(fam.get(tag)) !== indi.id) {
2236
+ fam.set(tag, makePointer(gedcom, fam, indi.id, "INDI"));
2237
+ }
2238
+ indi.assign("FAMS", makePointer(gedcom, indi, fam.id, "FAM"), true);
2239
+ return true;
2240
+ };
2241
+ var attachChildToFamily = (fam, child, pedigree, parent) => {
2242
+ const gedcom = fam.getGedcom() ?? child.getGedcom();
2243
+ if (!child.id || !fam.id || !gedcom) {
2244
+ return false;
2245
+ }
2246
+ if (!familyHasChild(fam, child.id)) {
2247
+ fam.assign("CHIL", makePointer(gedcom, fam, child.id, "INDI"), true);
2248
+ }
2249
+ const existingFamc = pointerByValue(child.get("FAMC"), fam.id);
2250
+ if (!existingFamc) {
2251
+ child.assign("FAMC", makePointer(gedcom, child, fam.id, "FAM"), true);
2252
+ }
2253
+ setChildPedigree(fam, child, pedigree, parent);
2254
+ return true;
2255
+ };
2256
+ var findReusableParentChildFamily = (parent, child) => {
2257
+ if (!parent.id || !child.id) {
2258
+ return void 0;
2259
+ }
2260
+ let reusableFamc;
2261
+ let already = false;
2262
+ child.getFamilies("FAMC")?.forEach((fam) => {
2263
+ if (!fam) {
2264
+ return;
2265
+ }
2266
+ if (familyHasParent(fam, parent.id) && familyHasChild(fam, child.id)) {
2267
+ already = true;
2268
+ return;
2269
+ }
2270
+ if (!reusableFamc && canAttachAsSpouse(fam, parent)) {
2271
+ reusableFamc = fam;
2272
+ }
2273
+ });
2274
+ if (already) {
2275
+ return "already";
2276
+ }
2277
+ if (reusableFamc) {
2278
+ return reusableFamc;
2279
+ }
2280
+ const parentFams = [];
2281
+ parent.getFamilies("FAMS")?.forEach((fam) => {
2282
+ if (fam) {
2283
+ parentFams.push(fam);
2284
+ }
2285
+ });
2286
+ if (parentFams.length === 1) {
2287
+ return parentFams[0];
2288
+ }
2289
+ return void 0;
2290
+ };
2291
+
2031
2292
  // src/utils/get-places.ts
2032
2293
  var getPlaces = (common, type = ["ALL" /* All */], maxLevel = 1, level = 0, mainKey) => {
2033
2294
  const types = Array.isArray(type) ? type : [type];
@@ -2686,6 +2947,31 @@ var Fam = class extends Common {
2686
2947
  getParents() {
2687
2948
  return this.getHusband().copy().merge(this.getWife());
2688
2949
  }
2950
+ hasParent(indi) {
2951
+ const indiId = typeof indi === "string" ? indi : indi?.id;
2952
+ return !!indiId && familyHasParent(this, indiId);
2953
+ }
2954
+ hasChild(indi) {
2955
+ const indiId = typeof indi === "string" ? indi : indi?.id;
2956
+ return !!indiId && familyHasChild(this, indiId);
2957
+ }
2958
+ canAddSpouse(indi) {
2959
+ return canAttachAsSpouse(this, indi);
2960
+ }
2961
+ addSpouse(indi) {
2962
+ return attachSpouseToFamily(this, indi);
2963
+ }
2964
+ addChild(child, pedigree, parent) {
2965
+ return attachChildToFamily(
2966
+ this,
2967
+ child,
2968
+ pedigree,
2969
+ parent
2970
+ );
2971
+ }
2972
+ addFact(input) {
2973
+ return addFamilyFact(this, input);
2974
+ }
2689
2975
  toList() {
2690
2976
  return new Families().concat(
2691
2977
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2786,19 +3072,51 @@ var ALLOWED_FACTS = [
2786
3072
  "OCCU",
2787
3073
  "OCCUPATIONS",
2788
3074
  "RESI",
3075
+ "BIRT",
3076
+ "DEAT",
2789
3077
  "BAPT",
3078
+ "BAPM",
2790
3079
  "CHRI",
2791
3080
  "CHR",
3081
+ "CHRA",
2792
3082
  "BURI",
2793
- "EDUC",
3083
+ "CREM",
3084
+ "ADOP",
3085
+ "BARM",
3086
+ "BASM",
3087
+ "BLES",
3088
+ "CONF",
3089
+ "FCOM",
3090
+ "ORDN",
3091
+ "NATU",
3092
+ "EMIG",
3093
+ "IMMI",
3094
+ "CENS",
3095
+ "PROB",
3096
+ "WILL",
2794
3097
  "GRAD",
3098
+ "RETI",
3099
+ "EDUC",
2795
3100
  "DIV",
2796
- "IMMI",
2797
3101
  "RELI",
3102
+ "CAST",
3103
+ "DSCR",
3104
+ "NATI",
3105
+ "PROP",
3106
+ "SSN",
3107
+ "TITL",
3108
+ "ADDR",
3109
+ "BAPL",
3110
+ "CONL",
3111
+ "ENDL",
3112
+ "SLGC",
2798
3113
  "_MILT",
2799
3114
  "_MILTID",
2800
3115
  "FACT",
2801
- "_ORIG"
3116
+ "_ORIG",
3117
+ "_WLNK",
3118
+ "WWW",
3119
+ "URL"
2802
3120
  ];
2803
3121
  var DISALLOWED_CUSTOM_FACTS = ["DNA Test", "Newspaper"];
2804
3122
  var CustomFactRenderers = {
@@ -3342,7 +3660,7 @@ var Indi = class extends Common {
3342
3660
  return result;
3343
3661
  }
3344
3662
  ancestryLink() {
3345
- const www = this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
3663
+ const www = this.getFromSourceHeads("SOUR.CORP.WWW.value") || this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
3346
3664
  const tree = this.getAncestryTreeId();
3347
3665
  if (this.id) {
3348
3666
  return `https://${www}/family-tree/person/tree/${tree}/person/${this.id.replace(
@@ -3354,7 +3672,7 @@ var Indi = class extends Common {
3354
3672
  async ancestryMedia(namespace) {
3355
3673
  const list = {};
3356
3674
  const objeList = this.get("OBJE")?.toList().copy();
3357
- const www = this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
3675
+ const www = this.getFromSourceHeads("SOUR.CORP.WWW.value") || this._gedcom?.HEAD?.SOUR?.CORP?.WWW?.value;
3358
3676
  const tree = this.getAncestryTreeId();
3359
3677
  if (objeList) {
3360
3678
  await Promise.all(
@@ -3414,7 +3732,7 @@ var Indi = class extends Common {
3414
3732
  return list;
3415
3733
  }
3416
3734
  myheritageLink(poolId = 0) {
3417
- const www = this._gedcom?.HEAD?.SOUR?.CORP?.value?.toLowerCase().replace(/^www\./gi, "");
3735
+ const www = (this.getFromSourceHeads("SOUR.CORP.value") || this._gedcom?.HEAD?.SOUR?.CORP?.value)?.toLowerCase().replace(/^www\./gi, "");
3418
3736
  const site = this.getMyHeritageTreeId();
3419
3737
  const file = this._gedcom?.HEAD?.get("FILE")?.toValue()?.match(/Exported by MyHeritage.com from .+ in (?<site>.+) on .+$/)?.groups?.site;
3420
3738
  const normalizedFile = file?.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-");
@@ -3935,6 +4253,57 @@ var Indi = class extends Common {
3935
4253
  isUnknownSex() {
3936
4254
  return !this.isMale() && !this.isFemale();
3937
4255
  }
4256
+ addSpouse(other) {
4257
+ if (!this.id || !other?.id || this.id === other.id || !this._gedcom) {
4258
+ return void 0;
4259
+ }
4260
+ const existing = getFamilyWith(this, other.id);
4261
+ if (existing) {
4262
+ return existing;
4263
+ }
4264
+ const fam = this._gedcom.createFamily();
4265
+ if (!fam.addSpouse(this) || !fam.addSpouse(other)) {
4266
+ return void 0;
4267
+ }
4268
+ return fam;
4269
+ }
4270
+ addChild(child, pedigree) {
4271
+ if (!this.id || !child?.id || this.id === child.id || !this._gedcom) {
4272
+ return void 0;
4273
+ }
4274
+ const existing = findReusableParentChildFamily(
4275
+ this,
4276
+ child
4277
+ );
4278
+ if (existing === "already") {
4279
+ const fam2 = child.getFamilies("FAMC")?.find(
4280
+ (item) => !!item && item.hasParent(this.id) && item.hasChild(child.id)
4281
+ );
4282
+ if (fam2) {
4283
+ setChildPedigree(
4284
+ fam2,
4285
+ child,
4286
+ pedigree,
4287
+ this
4288
+ );
4289
+ }
4290
+ return fam2;
4291
+ }
4292
+ const fam = existing ?? this._gedcom.createFamily();
4293
+ if (!fam.addSpouse(this)) {
4294
+ return void 0;
4295
+ }
4296
+ if (!fam.addChild(child, pedigree, this)) {
4297
+ return void 0;
4298
+ }
4299
+ return fam;
4300
+ }
4301
+ addParent(parent, pedigree) {
4302
+ return parent.addChild(this, pedigree);
4303
+ }
4304
+ addFact(input) {
4305
+ return addIndividualFact(this, input);
4306
+ }
3938
4307
  getParentType(id) {
3939
4308
  let indi;
3940
4309
  if (typeof id === "string" || typeof id === "number") {
@@ -4135,7 +4504,9 @@ var Indi = class extends Common {
4135
4504
  }
4136
4505
  }
4137
4506
  if (kinship !== "child" || !breakAfterSpouse) {
4138
- indi.getBiologicalFathers().copy().merge(indi.getBiologicalMothers()).merge(indi.getFathers().copy().merge(indi.getMothers())).forEach((relative) => {
4507
+ indi.getBiologicalFathers().copy().merge(indi.getBiologicalMothers()).merge(
4508
+ indi.getFathers().copy().merge(indi.getMothers())
4509
+ ).forEach((relative) => {
4139
4510
  if (!visited.has(relative)) {
4140
4511
  const currentRelation = indi.getParentType(relative);
4141
4512
  const isNonBiological = !!currentRelation && currentRelation !== "biological" /* BIOLOGICAL */;
@@ -6430,6 +6801,249 @@ var KinshipTranslatorEs = class extends KinshipTranslatorBasic {
6430
6801
  }
6431
6802
  };
6432
6803
 
6804
+ // src/kinship-translator/patterns.ru.ts
6805
+ var InLawsRu = {
6806
+ "\u0441\u0443\u043F\u0440\u0443\u0433(?:\u0430)? (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u0437\u044F\u0442\u044C/\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
6807
+ "\u0436\u0435\u043D\u0430 (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
6808
+ "\u043C\u0443\u0436 (\u0440\u0435\u0431\u0451\u043D\u043A\u0430|\u0434\u043E\u0447\u0435\u0440\u0438|\u0441\u044B\u043D\u0430)": "\u0437\u044F\u0442\u044C",
6809
+ "\u043C\u0430\u0442\u044C (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0451\u0449\u0430",
6810
+ "\u043E\u0442\u0435\u0446 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0435\u0441\u0442\u044C",
6811
+ "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0442\u0435\u0441\u0442\u044C/\u0442\u0451\u0449\u0430",
6812
+ "\u0436\u0435\u043D\u0430 (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
6813
+ "\u043C\u0443\u0436 (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u0437\u044F\u0442\u044C",
6814
+ "\u0441\u0443\u043F\u0440\u0443\u0433(?:\u0430)? (\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?(\u0431\u0440\u0430\u0442\u0430|\u0441\u0435\u0441\u0442\u0440\u044B|\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430)": "\u0437\u044F\u0442\u044C/\u043D\u0435\u0432\u0435\u0441\u0442\u043A\u0430",
6815
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0435\u0441\u0442\u0440\u0430 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0437\u043E\u043B\u043E\u0432\u043A\u0430",
6816
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0431\u0440\u0430\u0442 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0448\u0443\u0440\u0438\u043D",
6817
+ "(\u0441\u0432\u043E\u0434\u043D(?:\u044B\u0439|\u0430\u044F) )?\u0441\u0438\u0431\u043B\u0438\u043D\u0433 (\u0441\u0443\u043F\u0440\u0443\u0433\u0430|\u0436\u0435\u043D\u044B|\u043C\u0443\u0436\u0430)": "\u0448\u0443\u0440\u0438\u043D/\u0437\u043E\u043B\u043E\u0432\u043A\u0430"
6818
+ };
6819
+
6820
+ // src/kinship-translator/kinship-translator.ru.ts
6821
+ var GENITIVE = {
6822
+ \u0441\u044B\u043D: "\u0441\u044B\u043D\u0430",
6823
+ \u0434\u043E\u0447\u044C: "\u0434\u043E\u0447\u0435\u0440\u0438",
6824
+ \u0440\u0435\u0431\u0451\u043D\u043E\u043A: "\u0440\u0435\u0431\u0451\u043D\u043A\u0430",
6825
+ \u0431\u0440\u0430\u0442: "\u0431\u0440\u0430\u0442\u0430",
6826
+ \u0441\u0435\u0441\u0442\u0440\u0430: "\u0441\u0435\u0441\u0442\u0440\u044B",
6827
+ \u0441\u0438\u0431\u043B\u0438\u043D\u0433: "\u0441\u0438\u0431\u043B\u0438\u043D\u0433\u0430",
6828
+ \u043E\u0442\u0435\u0446: "\u043E\u0442\u0446\u0430",
6829
+ \u043C\u0430\u0442\u044C: "\u043C\u0430\u0442\u0435\u0440\u0438",
6830
+ \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C: "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044F",
6831
+ \u043C\u0443\u0436: "\u043C\u0443\u0436\u0430",
6832
+ \u0436\u0435\u043D\u0430: "\u0436\u0435\u043D\u044B",
6833
+ \u0441\u0443\u043F\u0440\u0443\u0433: "\u0441\u0443\u043F\u0440\u0443\u0433\u0430",
6834
+ \u0441\u0443\u043F\u0440\u0443\u0433\u0430: "\u0441\u0443\u043F\u0440\u0443\u0433\u0438"
6835
+ };
6836
+ var toGenitive = (word) => GENITIVE[word] ?? word;
6837
+ var cousinWord = (degree, sex) => {
6838
+ const stem = degree <= 1 ? "\u0434\u0432\u043E\u044E\u0440\u043E\u0434\u043D" : degree === 2 ? "\u0442\u0440\u043E\u044E\u0440\u043E\u0434\u043D" : degree === 3 ? "\u0447\u0435\u0442\u0432\u0435\u0440\u043E\u044E\u0440\u043E\u0434\u043D" : `${degree + 1}-\u044E\u0440\u043E\u0434\u043D`;
6839
+ if (sex === "m") {
6840
+ return `${stem}\u044B\u0439 \u0431\u0440\u0430\u0442`;
6841
+ }
6842
+ if (sex === "f") {
6843
+ return `${stem}\u0430\u044F \u0441\u0435\u0441\u0442\u0440\u0430`;
6844
+ }
6845
+ return `${stem}\u044B\u0439 \u0431\u0440\u0430\u0442/\u0441\u0435\u0441\u0442\u0440\u0430`;
6846
+ };
6847
+ var praRepeat = (count) => count > 0 ? "\u043F\u0440\u0430".repeat(count) : "";
6848
+ var sexOf = (person) => {
6849
+ if (person?.isMale?.()) {
6850
+ return "m";
6851
+ }
6852
+ if (person?.isFemale?.()) {
6853
+ return "f";
6854
+ }
6855
+ return "n";
6856
+ };
6857
+ var KinshipTranslatorRu = class extends KinshipTranslatorBasic {
6858
+ indirect() {
6859
+ let degree = Math.abs(this.pathN?.degree ?? 0);
6860
+ if (degree > 0) {
6861
+ degree = degree - 1;
6862
+ }
6863
+ return cousinWord(degree, sexOf(this.personN));
6864
+ }
6865
+ removal() {
6866
+ const level = this.pathN?.level ?? 0;
6867
+ let degree = Math.abs(this.pathN?.degree ?? 0);
6868
+ if (degree > 0) {
6869
+ degree = degree - 1;
6870
+ }
6871
+ if (!degree) {
6872
+ return level < 0 ? this.nibling() : this.auncle();
6873
+ }
6874
+ const removed = Math.abs(level);
6875
+ return `${cousinWord(degree, sexOf(this.personN))} (${removed}\xD7 \u0447\u0435\u0440\u0435\u0437 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435)`;
6876
+ }
6877
+ auncle() {
6878
+ const level = Math.abs(this.pathN?.level ?? 0);
6879
+ const pra = praRepeat(Math.max(0, level - 2));
6880
+ const sex = sexOf(this.personN);
6881
+ if (sex === "m") {
6882
+ return `${pra}\u0434\u044F\u0434\u044F`;
6883
+ }
6884
+ if (sex === "f") {
6885
+ return `${pra}\u0442\u0451\u0442\u044F`;
6886
+ }
6887
+ return `${pra}\u0434\u044F\u0434\u044F/\u0442\u0451\u0442\u044F`;
6888
+ }
6889
+ nibling() {
6890
+ const level = Math.abs(this.pathN?.level ?? 0);
6891
+ const pra = praRepeat(Math.max(0, level - 2));
6892
+ const sex = sexOf(this.personN);
6893
+ if (sex === "m") {
6894
+ return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A`;
6895
+ }
6896
+ if (sex === "f") {
6897
+ return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
6898
+ }
6899
+ return `${pra}\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u043A/\u043F\u043B\u0435\u043C\u044F\u043D\u043D\u0438\u0446\u0430`;
6900
+ }
6901
+ parent() {
6902
+ const level = Math.abs(this.pathN?.level ?? 0);
6903
+ const sex = sexOf(this.personN);
6904
+ if (level <= 1) {
6905
+ if (sex === "m") {
6906
+ return "\u043E\u0442\u0435\u0446";
6907
+ }
6908
+ if (sex === "f") {
6909
+ return "\u043C\u0430\u0442\u044C";
6910
+ }
6911
+ return "\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C";
6912
+ }
6913
+ if (level === 2) {
6914
+ if (sex === "m") {
6915
+ return "\u0434\u0435\u0434";
6916
+ }
6917
+ if (sex === "f") {
6918
+ return "\u0431\u0430\u0431\u0443\u0448\u043A\u0430";
6919
+ }
6920
+ return "\u0434\u0435\u0434/\u0431\u0430\u0431\u0443\u0448\u043A\u0430";
6921
+ }
6922
+ const pra = praRepeat(level - 2);
6923
+ if (sex === "m") {
6924
+ return `${pra}\u0434\u0435\u0434`;
6925
+ }
6926
+ if (sex === "f") {
6927
+ return `${pra}\u0431\u0430\u0431\u0443\u0448\u043A\u0430`;
6928
+ }
6929
+ return `${pra}\u0434\u0435\u0434/\u0431\u0430\u0431\u0443\u0448\u043A\u0430`;
6930
+ }
6931
+ child() {
6932
+ const level = Math.abs(this.pathN?.level ?? 0);
6933
+ const sex = sexOf(this.personN);
6934
+ if (level <= 1) {
6935
+ if (sex === "m") {
6936
+ return "\u0441\u044B\u043D";
6937
+ }
6938
+ if (sex === "f") {
6939
+ return "\u0434\u043E\u0447\u044C";
6940
+ }
6941
+ return "\u0440\u0435\u0431\u0451\u043D\u043E\u043A";
6942
+ }
6943
+ if (level === 2) {
6944
+ if (sex === "m") {
6945
+ return "\u0432\u043D\u0443\u043A";
6946
+ }
6947
+ if (sex === "f") {
6948
+ return "\u0432\u043D\u0443\u0447\u043A\u0430";
6949
+ }
6950
+ return "\u0432\u043D\u0443\u043A/\u0432\u043D\u0443\u0447\u043A\u0430";
6951
+ }
6952
+ const pra = praRepeat(level - 2);
6953
+ if (sex === "m") {
6954
+ return `${pra}\u0432\u043D\u0443\u043A`;
6955
+ }
6956
+ if (sex === "f") {
6957
+ return `${pra}\u0432\u043D\u0443\u0447\u043A\u0430`;
6958
+ }
6959
+ return `${pra}\u0432\u043D\u0443\u043A/\u0432\u043D\u0443\u0447\u043A\u0430`;
6960
+ }
6961
+ sibling() {
6962
+ const sex = sexOf(this.personN);
6963
+ if (sex === "m") {
6964
+ return "\u0431\u0440\u0430\u0442";
6965
+ }
6966
+ if (sex === "f") {
6967
+ return "\u0441\u0435\u0441\u0442\u0440\u0430";
6968
+ }
6969
+ return "\u0441\u0438\u0431\u043B\u0438\u043D\u0433";
6970
+ }
6971
+ halfBlood(relation) {
6972
+ if (!relation || !this.isHalfBlood) {
6973
+ return relation ?? "";
6974
+ }
6975
+ if (/сестра|дочь|мать|тётя|бабушка|жена|племянница|внучка/.test(
6976
+ relation
6977
+ )) {
6978
+ return `\u0441\u0432\u043E\u0434\u043D\u0430\u044F ${relation}`;
6979
+ }
6980
+ return `\u0441\u0432\u043E\u0434\u043D\u044B\u0439 ${relation}`;
6981
+ }
6982
+ spouse() {
6983
+ const sex = sexOf(this.personN);
6984
+ if (sex === "m") {
6985
+ return "\u043C\u0443\u0436";
6986
+ }
6987
+ if (sex === "f") {
6988
+ return "\u0436\u0435\u043D\u0430";
6989
+ }
6990
+ return "\u0441\u0443\u043F\u0440\u0443\u0433";
6991
+ }
6992
+ ofSpouse(relation) {
6993
+ if (!relation) {
6994
+ return "";
6995
+ }
6996
+ const spouse = this.path?.[1].indi;
6997
+ const sex = sexOf(spouse);
6998
+ const spouseType = sex === "m" ? "\u043C\u0443\u0436" : sex === "f" ? "\u0436\u0435\u043D\u0430" : "\u0441\u0443\u043F\u0440\u0443\u0433";
6999
+ return `${relation} ${toGenitive(spouseType)}`;
7000
+ }
7001
+ spouseOf(relation) {
7002
+ if (!relation) {
7003
+ return "";
7004
+ }
7005
+ const spouse = this.path?.[this.path.length - 1].indi;
7006
+ const sex = sexOf(spouse);
7007
+ const spouseType = sex === "m" ? "\u043C\u0443\u0436" : sex === "f" ? "\u0436\u0435\u043D\u0430" : "\u0441\u0443\u043F\u0440\u0443\u0433";
7008
+ return `${spouseType} ${toGenitive(relation)}`;
7009
+ }
7010
+ of(relation) {
7011
+ const formattedName = nameFormatter(this.path?.[0]?.indi, {
7012
+ nameOrder: "first-last"
7013
+ });
7014
+ let name = formattedName.inOrder.filter(Boolean).join(" ");
7015
+ if (this.displayName === "none") {
7016
+ name = "";
7017
+ } else if (this.displayName === "givenname") {
7018
+ name = formattedName.givenname;
7019
+ } else if (this.displayName === "surname") {
7020
+ name = `${formattedName.surname}`;
7021
+ }
7022
+ if (!name || !relation) {
7023
+ return relation ?? "";
7024
+ }
7025
+ return `${name}: ${relation}`;
7026
+ }
7027
+ inLaw(relation) {
7028
+ let inLawRelation = relation;
7029
+ Object.keys(InLawsRu).find((pattern) => {
7030
+ const regex = new RegExp(`^${pattern}$`);
7031
+ if (relation?.match(regex)) {
7032
+ inLawRelation = InLawsRu[pattern];
7033
+ return true;
7034
+ }
7035
+ return false;
7036
+ });
7037
+ return inLawRelation ?? "";
7038
+ }
7039
+ relationType(relation) {
7040
+ if (!relation || !this.pathN?.relation) {
7041
+ return relation ?? "";
7042
+ }
7043
+ return `${this.pathN.relation} ${relation}`;
7044
+ }
7045
+ };
7046
+
6433
7047
  // src/kinship-translator/kinship-translator.ts
6434
7048
  var KinshipTranslator = class {
6435
7049
  constructor(person1, person2, lang = "en", entirePath, displayName = "givenname") {